@marimo-team/frontend 0.14.12-dev0 → 0.14.13-dev10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ConnectedDataExplorerComponent-B9BmPz9a.js → ConnectedDataExplorerComponent-Ck5QwQ0a.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-CNTqLdnf.js → ImageComparisonComponent-DQAEAFOW.js} +1 -1
- package/dist/assets/{VegaLite-DLKRDJvl.js → VegaLite-BOzn_ryg.js} +1 -1
- package/dist/assets/_baseEach-BVz2R7Ry.js +1 -0
- package/dist/assets/_baseMap-DqJoBV0R.js +1 -0
- package/dist/assets/_baseUniq-B2F6cQpe.js +1 -0
- package/dist/assets/{_createAggregator-C_WhAECr.js → _createAggregator-Ct2PFT_i.js} +1 -1
- package/dist/assets/{any-language-editor-DrZjy7mH.js → any-language-editor-dOgraDGZ.js} +1 -1
- package/dist/assets/{architectureDiagram-NQ2NVSRB-DqJfNlvg.js → architectureDiagram-SUXI7LT5-BO2rBGtW.js} +3 -3
- package/dist/assets/{blockDiagram-PHRCVELO-BMyZ52bP.js → blockDiagram-6J76NXCF-CrLniOkM.js} +6 -6
- package/dist/assets/{c4Diagram-6F6E4RAY-DveKwcb7.js → c4Diagram-6F6E4RAY-CFUpKWFc.js} +1 -1
- package/dist/assets/channel-BcScSnDr.js +1 -0
- package/dist/assets/{chunk-353BL4L5-DBdJb07A.js → chunk-353BL4L5-DzyKEFA4.js} +1 -1
- package/dist/assets/{chunk-67H74DCK-DG8iWVJ-.js → chunk-67H74DCK-0N6IqEGA.js} +1 -1
- package/dist/assets/{chunk-AACKK3MU-CDOdA9eC.js → chunk-AACKK3MU-B8_W5RRv.js} +1 -1
- package/dist/assets/{chunk-BFAMUDN2-Cf6198RO.js → chunk-BFAMUDN2-B9UXMKf_.js} +1 -1
- package/dist/assets/{chunk-E2GYISFI-fSvIEcyU.js → chunk-E2GYISFI-CG8sH_Xg.js} +1 -1
- package/dist/assets/{chunk-6OLS64BW-Dmt4rYEQ.js → chunk-OW32GOEJ-CTj-sha1.js} +1 -1
- package/dist/assets/{chunk-SKB7J2MH-B7Z1FsaJ.js → chunk-SKB7J2MH-rB7TBRdw.js} +1 -1
- package/dist/assets/{chunk-QEP2MXWD-D6FP1cQC.js → chunk-SZ463SBG-DqAq6e58.js} +1 -1
- package/dist/assets/{circle-play-CBftacWk.js → circle-play-AgRU-h6v.js} +1 -1
- package/dist/assets/classDiagram-M3E45YP4-B5WAgUkA.js +1 -0
- package/dist/assets/classDiagram-v2-YAWTLIQI-B5WAgUkA.js +1 -0
- package/dist/assets/clone-BXGJwgns.js +1 -0
- package/dist/assets/{compile-mbjlQ5nn.js → compile-ZfECztdZ.js} +8 -8
- package/dist/assets/cytoscape.esm-CzSnbbKZ.js +325 -0
- package/dist/assets/{dagre-FFZHY6LT-DX9cGWLP.js → dagre-JOIXM2OF-DM7s7GTa.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-C4fyHnn1.js → data-grid-overlay-editor-HnmhejXy.js} +1 -1
- package/dist/assets/{diagram-5UYTHUR4-BgOShMim.js → diagram-5UYTHUR4-BwQkSIWB.js} +1 -1
- package/dist/assets/diagram-VMROVX33-BhjzR-bS.js +24 -0
- package/dist/assets/{diagram-ZTM2IBQH-m55tqkSF.js → diagram-ZTM2IBQH-BVWZsPmq.js} +1 -1
- package/dist/assets/edit-page-BjQUbI6O.js +147 -0
- package/dist/assets/{erDiagram-R3QVA2FD-B8SQvwhp.js → erDiagram-3M52JZNH-DwouQakE.js} +1 -1
- package/dist/assets/{flowDiagram-PKI6S5ZS-BTbZVZp0.js → flowDiagram-KYDEHFYC-CnlYqbNS.js} +1 -1
- package/dist/assets/{ganttDiagram-EK5VF46D-Dkuqvb7b.js → ganttDiagram-EK5VF46D-D_rFrhg7.js} +3 -3
- package/dist/assets/{gitGraphDiagram-GW3U2K7C-BMQ8L_am.js → gitGraphDiagram-GW3U2K7C-BYzUNWbJ.js} +1 -1
- package/dist/assets/{glide-data-editor-BKZWFNVv.js → glide-data-editor-kbqtMmov.js} +11 -11
- package/dist/assets/{graph-CFDemIXQ.js → graph-Bzc_9T7Z.js} +1 -1
- package/dist/assets/{home-page-DUbYTF9g.js → home-page-ftUruW_7.js} +3 -3
- package/dist/assets/index-7YWL4ilz.js +1 -0
- package/dist/assets/{index-MUMVp22V.js → index-BcIYWZ4z.js} +1 -1
- package/dist/assets/index-BsQqaadY.js +1 -0
- package/dist/assets/index-C0wa0jVk.js +1 -0
- package/dist/assets/{index-CH2sakSJ.js → index-C4PrQF97.js} +1 -1
- package/dist/assets/index-CEJstxRo.js +1 -0
- package/dist/assets/{index-B0-K_sX8.js → index-CHkhiQws.js} +1 -1
- package/dist/assets/index-CW5gri1j.js +1 -0
- package/dist/assets/index-CbETz4y4.js +1 -0
- package/dist/assets/index-CtPsBk7s.js +1 -0
- package/dist/assets/{index-ChVO1Vdj.js → index-D3rzOfRt.js} +1 -1
- package/dist/assets/index-DAAlHwlR.js +507 -0
- package/dist/assets/{index-C_e9XjpS.js → index-DGA_VJHf.js} +1 -1
- package/dist/assets/index-DL6l9OWK.js +1 -0
- package/dist/assets/index-DbL69TAJ.js +1 -0
- package/dist/assets/{index-d0CXXxee.js → index-DsiQhNzu.js} +2 -2
- package/dist/assets/{index-CRY746sV.js → index-FXUBhLuE.js} +1 -1
- package/dist/assets/index-S3mjG3Uz.css +1 -0
- package/dist/assets/index-V6glfQmo.js +1 -0
- package/dist/assets/index-qXgG5A9i.js +1 -0
- package/dist/assets/{infoDiagram-RLU2ROGC-DAW5X38W.js → infoDiagram-LHK5PUON-DFdEld5N.js} +1 -1
- package/dist/assets/{journeyDiagram-EWQZEKCU--6lJjuiM.js → journeyDiagram-EWQZEKCU-FyIkYgSs.js} +1 -1
- package/dist/assets/{kanban-definition-ILFWEQ3N-CXNPWHB8.js → kanban-definition-ZSS6B67P-yo2c0q-3.js} +1 -1
- package/dist/assets/{layout-Jgv95YSr.js → layout-QKY6PUj_.js} +1 -1
- package/dist/assets/{linear-DtgEMbrz.js → linear-CK5t2L_A.js} +1 -1
- package/dist/assets/links-D70MXjM5.js +17 -0
- package/dist/assets/loro_wasm_bg-C3hKWL9L.js +2 -0
- package/dist/assets/mermaid-Cut2kLK5.js +207 -0
- package/dist/assets/min-BKYNLFi1.js +1 -0
- package/dist/assets/mindmap-definition-6CBA2TL7-CnmjmyNj.js +95 -0
- package/dist/assets/{number-overlay-editor-C3hemckO.js → number-overlay-editor-B7_yN0N8.js} +1 -1
- package/dist/assets/{pieDiagram-NIOCPIFQ-B-zGF99A.js → pieDiagram-NIOCPIFQ-BdmIGGSk.js} +3 -3
- package/dist/assets/{quadrantDiagram-2OG54O6I-2tF9b_2b.js → quadrantDiagram-2OG54O6I-DB_65PVP.js} +1 -1
- package/dist/assets/{react-plotly-CdJaKwaj.js → react-plotly-1--mWjBH.js} +200 -200
- package/dist/assets/{requirementDiagram-SO3GGRV7-DEa34SeY.js → requirementDiagram-QOLK2EJ7-a7c4o6ST.js} +1 -1
- package/dist/assets/run-page-Do8ldoOh.js +1 -0
- package/dist/assets/sankeyDiagram-4UZDY2LN-CmGjZUZw.js +10 -0
- package/dist/assets/sequenceDiagram-SKLFT4DO-DLSriKsU.js +122 -0
- package/dist/assets/{slides-component-C2uc6kmf.js → slides-component-C74LwRp7.js} +1 -1
- package/dist/assets/{sortBy-Bob7dKSt.js → sortBy-BDh2-FP_.js} +1 -1
- package/dist/assets/{stateDiagram-XX37X6EN-DUi_goR8.js → stateDiagram-MI5ZYTHO-Ckq7mDsU.js} +1 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-CvH_Saam.js +1 -0
- package/dist/assets/storage-Cdseu5cy.js +25 -0
- package/dist/assets/{terminal-BkOhnp-S.js → terminal-D3Tkwkgc.js} +1 -1
- package/dist/assets/{time-BXb9z1yv.js → time-Di6BDeju.js} +1 -1
- package/dist/assets/{timeline-definition-RI47OAVP-CTWn3WQu.js → timeline-definition-MYPXXCX6-hkbCGyMO.js} +3 -3
- package/dist/assets/tracing-DZD40337.js +2 -0
- package/dist/assets/{trash-BWRVB_br.js → trash-rBzmhCXp.js} +1 -1
- package/dist/assets/treemap-75Q7IDZK-AiR12CF4.js +126 -0
- package/dist/assets/{vega-component-CX_u3Hhp.js → vega-component-Cbc3kTAU.js} +1 -1
- package/dist/assets/{worker-BYA2ASe8.js → worker-Bma4sWEs.js} +1 -1
- package/dist/assets/{xychartDiagram-H2YORKM3-D0JoLNE8.js → xychartDiagram-H2YORKM3-CSXZBio0.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +9 -19
- package/dist/assets/_baseEach-BjDLzUwG.js +0 -1
- package/dist/assets/_baseMap-CuZ-LBtv.js +0 -1
- package/dist/assets/_baseUniq-DqHaT24V.js +0 -1
- package/dist/assets/channel-LYGgdr1R.js +0 -1
- package/dist/assets/classDiagram-BGRH5UQR-BQbZmSV-.js +0 -1
- package/dist/assets/classDiagram-v2-O24JOBDK-BQbZmSV-.js +0 -1
- package/dist/assets/clone-DD3sG0_1.js +0 -1
- package/dist/assets/cytoscape.esm-UYyVlru8.js +0 -10
- package/dist/assets/diagram-3EMPZRKU-BwXQu6c-.js +0 -24
- package/dist/assets/edit-page-BMW2Fhcz.js +0 -148
- package/dist/assets/index-1az6nvpO.js +0 -1
- package/dist/assets/index-B9WlbtVk.js +0 -1
- package/dist/assets/index-BWEPJWCF.js +0 -1
- package/dist/assets/index-CE3mbf8H.js +0 -1
- package/dist/assets/index-CaHkXpUp.js +0 -1
- package/dist/assets/index-CfvA7bvb.js +0 -1
- package/dist/assets/index-CsdFJkJw.css +0 -1
- package/dist/assets/index-CylrdBnG.js +0 -1
- package/dist/assets/index-D3Er-byj.js +0 -1
- package/dist/assets/index-D_Dmmo5g.js +0 -1
- package/dist/assets/index-Drq4Lpl3.js +0 -1
- package/dist/assets/index-NLK5-sPO.js +0 -1
- package/dist/assets/index-_lj65MZR.js +0 -507
- package/dist/assets/links-Bjf-1I2i.js +0 -17
- package/dist/assets/mermaid-DCMac0Ai.js +0 -152
- package/dist/assets/min-VDyC-auF.js +0 -1
- package/dist/assets/mindmap-definition-CZNETY7S-BEd6cR16.js +0 -95
- package/dist/assets/run-page-Bg1x8WTa.js +0 -1
- package/dist/assets/sankeyDiagram-4UZDY2LN-DUIUN-K8.js +0 -10
- package/dist/assets/sequenceDiagram-ZIKVLSP4-BZGddaB9.js +0 -122
- package/dist/assets/stateDiagram-v2-GD6S3NHB-CdRNmgeb.js +0 -1
- package/dist/assets/storage-CTvz5ejZ.js +0 -25
- package/dist/assets/tracing-Z4QREdu3.js +0 -2
- package/dist/assets/treemap-FKARHQ26-AlpUch0p.js +0 -126
@@ -0,0 +1,207 @@
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-JOIXM2OF-DM7s7GTa.js","./graph-Bzc_9T7Z.js","./index-DAAlHwlR.js","./index-S3mjG3Uz.css","./_baseUniq-B2F6cQpe.js","./_baseEach-BVz2R7Ry.js","./layout-QKY6PUj_.js","./min-BKYNLFi1.js","./_baseMap-DqJoBV0R.js","./sortBy-BDh2-FP_.js","./clone-BXGJwgns.js","./transform-CDNfLgV5.js","./timer-Bqd5yn_a.js","./step-BwsUM5iJ.js","./c4Diagram-6F6E4RAY-CFUpKWFc.js","./chunk-67H74DCK-0N6IqEGA.js","./flowDiagram-KYDEHFYC-CnlYqbNS.js","./chunk-E2GYISFI-CG8sH_Xg.js","./chunk-BFAMUDN2-B9UXMKf_.js","./chunk-SKB7J2MH-rB7TBRdw.js","./channel-BcScSnDr.js","./erDiagram-3M52JZNH-DwouQakE.js","./gitGraphDiagram-GW3U2K7C-BYzUNWbJ.js","./chunk-353BL4L5-DzyKEFA4.js","./chunk-AACKK3MU-B8_W5RRv.js","./treemap-75Q7IDZK-AiR12CF4.js","./_createAggregator-Ct2PFT_i.js","./ganttDiagram-EK5VF46D-D_rFrhg7.js","./time-Di6BDeju.js","./linear-CK5t2L_A.js","./init-DLRA0X12.js","./infoDiagram-LHK5PUON-DFdEld5N.js","./pieDiagram-NIOCPIFQ-BdmIGGSk.js","./arc-ZB5pDULS.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-2OG54O6I-DB_65PVP.js","./xychartDiagram-H2YORKM3-CSXZBio0.js","./range-CtcPcB_L.js","./requirementDiagram-QOLK2EJ7-a7c4o6ST.js","./sequenceDiagram-SKLFT4DO-DLSriKsU.js","./classDiagram-M3E45YP4-B5WAgUkA.js","./chunk-SZ463SBG-DqAq6e58.js","./classDiagram-v2-YAWTLIQI-B5WAgUkA.js","./stateDiagram-MI5ZYTHO-Ckq7mDsU.js","./chunk-OW32GOEJ-CTj-sha1.js","./stateDiagram-v2-5AN5P6BG-CvH_Saam.js","./journeyDiagram-EWQZEKCU-FyIkYgSs.js","./timeline-definition-MYPXXCX6-hkbCGyMO.js","./mindmap-definition-6CBA2TL7-CnmjmyNj.js","./cytoscape.esm-CzSnbbKZ.js","./kanban-definition-ZSS6B67P-yo2c0q-3.js","./sankeyDiagram-4UZDY2LN-CmGjZUZw.js","./colors-bszWmPJw.js","./diagram-5UYTHUR4-BwQkSIWB.js","./diagram-ZTM2IBQH-BVWZsPmq.js","./blockDiagram-6J76NXCF-CrLniOkM.js","./architectureDiagram-SUXI7LT5-BO2rBGtW.js","./diagram-VMROVX33-BhjzR-bS.js","./index-BEQfoZiP.js"])))=>i.map(i=>d[i]);
|
2
|
+
var gy=Object.defineProperty;var fy=(We,se,je)=>se in We?gy(We,se,{enumerable:!0,configurable:!0,writable:!0,value:je}):We[se]=je;var xt=(We,se,je)=>fy(We,typeof se!="symbol"?se+"":se,je);import{x as my,S as yy,c$ as xy,dg as by,dh as ky,cY as Cy,di as wy,dj as Sy,z as Ty,_ as mt,dk as Zo,df as By,a as vy,W as Ly,V as My,aJ as _y,L as Ay,j as Fy,__tla as Ey}from"./index-DAAlHwlR.js";import{s as dt}from"./transform-CDNfLgV5.js";import{o as yg,q as xg,r as bg,u as kg,v as Cg,x as wg,y as $y,z as Qo,A as Sg,B as Oy,C as Dy,D as Tg,E as Iy,F as Ry,G as zy,H as Py,I as qy,k as Jo,l as Ny}from"./step-BwsUM5iJ.js";let Ko,nr,ts,te,es,Si,It,$a,rs,is,as,Oa,ns,qe,Bg,Nr,Da,Ti,Ia,os,ss,tt,or,N,X,Ra,vg,p,ls,za,Lg,hs,St,xe,Bi,Pa,_e,qa,U,Na,cs,Wa,ds,Mg,_g,Ag,V,Fg,us,ps,gs,sr,fs,ms,ys,Eg,xs,ut,ja,Mt,oe,bs,Ae,ks,Ne,Ha,$,lr,$g,Og,Cs,ws,Dg,Ss,Ts,ee,Bs,vs,Ig,Ls,Rg,Wy=Promise.all([(()=>{try{return Ey}catch{}})()]).then(async()=>{var Lr,Mr,_r,Ar,Fr,Er,$r,Or,qo,ir;var We=Object.prototype.hasOwnProperty;Wa=function(e){if(e==null)return!0;if(my(e)&&(yy(e)||typeof e=="string"||typeof e.splice=="function"||xy(e)||by(e)||ky(e)))return!e.length;var t=Cy(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(wy(e))return!Sy(e).length;for(var r in e)if(We.call(e,r))return!1;return!0};class se{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)}this._x0=t,this._y0=r}}function je(e){return new se(e,!0)}function As(e){return new se(e,!1)}var Fs,Es={exports:{}},zg=(Fs||(Fs=1,Es.exports=function(){var e=1e3,t=6e4,r=36e5,i="millisecond",a="second",n="minute",s="hour",o="day",c="week",l="month",h="quarter",d="year",u="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var B=["th","st","nd","rd"],L=A%100;return"["+A+(B[(L-20)%10]||B[L]||B[0])+"]"}},y=function(A,B,L){var F=String(A);return!F||F.length>=B?A:""+Array(B+1-F.length).join(L)+A},b={s:y,z:function(A){var B=-A.utcOffset(),L=Math.abs(B),F=Math.floor(L/60),_=L%60;return(B<=0?"+":"-")+y(F,2,"0")+":"+y(_,2,"0")},m:function A(B,L){if(B.date()<L.date())return-A(L,B);var F=12*(L.year()-B.year())+(L.month()-B.month()),_=B.clone().add(F,l),E=L-_<0,O=B.clone().add(F+(E?-1:1),l);return+(-(F+(L-_)/(E?_-O:O-_))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:l,y:d,w:c,d:o,D:u,h:s,m:n,s:a,ms:i,Q:h}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},w="en",M={};M[w]=x;var v="$isDayjsObject",k=function(A){return A instanceof R||!(!A||!A[v])},S=function A(B,L,F){var _;if(!B)return w;if(typeof B=="string"){var E=B.toLowerCase();M[E]&&(_=E),L&&(M[E]=L,_=E);var O=B.split("-");if(!_&&O.length>1)return A(O[0])}else{var K=B.name;M[K]=B,_=K}return!F&&_&&(w=_),_||!F&&w},I=function(A,B){if(k(A))return A.clone();var L=typeof B=="object"?B:{};return L.date=A,L.args=arguments,new R(L)},D=b;D.l=S,D.i=k,D.w=function(A,B){return I(A,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var R=function(){function A(L){this.$L=S(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[v]=!0}var B=A.prototype;return B.parse=function(L){this.$d=function(F){var _=F.date,E=F.utc;if(_===null)return new Date(NaN);if(D.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var O=_.match(f);if(O){var K=O[2]-1||0,it=(O[7]||"0").substring(0,3);return E?new Date(Date.UTC(O[1],K,O[3]||1,O[4]||0,O[5]||0,O[6]||0,it)):new Date(O[1],K,O[3]||1,O[4]||0,O[5]||0,O[6]||0,it)}}return new Date(_)}(L),this.init()},B.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()},B.$utils=function(){return D},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(L,F){var _=I(L);return this.startOf(F)<=_&&_<=this.endOf(F)},B.isAfter=function(L,F){return I(L)<this.startOf(F)},B.isBefore=function(L,F){return this.endOf(F)<I(L)},B.$g=function(L,F,_){return D.u(L)?this[F]:this.set(_,L)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(L,F){var _=this,E=!!D.u(F)||F,O=D.p(L),K=function(ot,lt){var kt=D.w(_.$u?Date.UTC(_.$y,lt,ot):new Date(_.$y,lt,ot),_);return E?kt:kt.endOf(o)},it=function(ot,lt){return D.w(_.toDate()[ot].apply(_.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(lt)),_)},st=this.$W,rt=this.$M,wt=this.$D,yt="set"+(this.$u?"UTC":"");switch(O){case d:return E?K(1,0):K(31,11);case l:return E?K(1,rt):K(0,rt+1);case c:var Qt=this.$locale().weekStart||0,Z=(st<Qt?st+7:st)-Qt;return K(E?wt-Z:wt+(6-Z),rt);case o:case u:return it(yt+"Hours",0);case s:return it(yt+"Minutes",1);case n:return it(yt+"Seconds",2);case a:return it(yt+"Milliseconds",3);default:return this.clone()}},B.endOf=function(L){return this.startOf(L,!1)},B.$set=function(L,F){var _,E=D.p(L),O="set"+(this.$u?"UTC":""),K=(_={},_[o]=O+"Date",_[u]=O+"Date",_[l]=O+"Month",_[d]=O+"FullYear",_[s]=O+"Hours",_[n]=O+"Minutes",_[a]=O+"Seconds",_[i]=O+"Milliseconds",_)[E],it=E===o?this.$D+(F-this.$W):F;if(E===l||E===d){var st=this.clone().set(u,1);st.$d[K](it),st.init(),this.$d=st.set(u,Math.min(this.$D,st.daysInMonth())).$d}else K&&this.$d[K](it);return this.init(),this},B.set=function(L,F){return this.clone().$set(L,F)},B.get=function(L){return this[D.p(L)]()},B.add=function(L,F){var _,E=this;L=Number(L);var O=D.p(F),K=function(rt){var wt=I(E);return D.w(wt.date(wt.date()+Math.round(rt*L)),E)};if(O===l)return this.set(l,this.$M+L);if(O===d)return this.set(d,this.$y+L);if(O===o)return K(1);if(O===c)return K(7);var it=(_={},_[n]=t,_[s]=r,_[a]=e,_)[O]||1,st=this.$d.getTime()+L*it;return D.w(st,this)},B.subtract=function(L,F){return this.add(-1*L,F)},B.format=function(L){var F=this,_=this.$locale();if(!this.isValid())return _.invalidDate||g;var E=L||"YYYY-MM-DDTHH:mm:ssZ",O=D.z(this),K=this.$H,it=this.$m,st=this.$M,rt=_.weekdays,wt=_.months,yt=_.meridiem,Qt=function(lt,kt,Ht,Ot){return lt&&(lt[kt]||lt(F,E))||Ht[kt].slice(0,Ot)},Z=function(lt){return D.s(K%12||12,lt,"0")},ot=yt||function(lt,kt,Ht){var Ot=lt<12?"AM":"PM";return Ht?Ot.toLowerCase():Ot};return E.replace(m,function(lt,kt){return kt||function(Ht){switch(Ht){case"YY":return String(F.$y).slice(-2);case"YYYY":return D.s(F.$y,4,"0");case"M":return st+1;case"MM":return D.s(st+1,2,"0");case"MMM":return Qt(_.monthsShort,st,wt,3);case"MMMM":return Qt(wt,st);case"D":return F.$D;case"DD":return D.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Qt(_.weekdaysMin,F.$W,rt,2);case"ddd":return Qt(_.weekdaysShort,F.$W,rt,3);case"dddd":return rt[F.$W];case"H":return String(K);case"HH":return D.s(K,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return ot(K,it,!0);case"A":return ot(K,it,!1);case"m":return String(it);case"mm":return D.s(it,2,"0");case"s":return String(F.$s);case"ss":return D.s(F.$s,2,"0");case"SSS":return D.s(F.$ms,3,"0");case"Z":return O}return null}(lt)||O.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(L,F,_){var E,O=this,K=D.p(F),it=I(L),st=(it.utcOffset()-this.utcOffset())*t,rt=this-it,wt=function(){return D.m(O,it)};switch(K){case d:E=wt()/12;break;case l:E=wt();break;case h:E=wt()/3;break;case c:E=(rt-st)/6048e5;break;case o:E=(rt-st)/864e5;break;case s:E=rt/r;break;case n:E=rt/t;break;case a:E=rt/e;break;default:E=rt}return _?E:D.a(E)},B.daysInMonth=function(){return this.endOf(l).$D},B.$locale=function(){return M[this.$L]},B.locale=function(L,F){if(!L)return this.$L;var _=this.clone(),E=S(L,F,!0);return E&&(_.$L=E),_},B.clone=function(){return D.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},A}(),z=R.prototype;return I.prototype=z,[["$ms",i],["$s",a],["$m",n],["$H",s],["$W",o],["$M",l],["$y",d],["$D",u]].forEach(function(A){z[A[1]]=function(B){return this.$g(B,A[0],A[1])}}),I.extend=function(A,B){return A.$i||(A(B,R,I),A.$i=!0),I},I.locale=S,I.isDayjs=k,I.unix=function(A){return I(1e3*A)},I.en=M[w],I.Ls=M,I.p={},I}()),Es.exports);let Wr,be;ys=Ty(zg),Wr={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+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return 2.55*r;e/=360,t/=100;const a=(r/=100)<.5?r*(1+t):r+t-r*t,n=2*r-a;switch(i){case"r":return 255*Wr.hue2rgb(n,a,e+1/3);case"g":return 255*Wr.hue2rgb(n,a,e);case"b":return 255*Wr.hue2rgb(n,a,e-1/3)}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),n=Math.min(e,t,r),s=(a+n)/2;if(i==="l")return 100*s;if(a===n)return 0;const o=a-n;if(i==="s")return 100*(s>.5?o/(2-a-n):o/(a+n));switch(a){case e:return 60*((t-r)/o+(t<r?6:0));case t:return 60*((r-e)/o+2);case r:return 60*((e-t)/o+4);default:return-1}}},tt={channel:Wr,lang:{clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(1e10*e)/1e10},unit:{dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},be={};for(let e=0;e<=255;e++)be[e]=tt.unit.dec2hex(e);const Ya=0,hr=1,He=2;class Pg{constructor(){this.type=Ya}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=Ya}is(t){return this.type===t}}let jr,Ye,Fe,cr,dr,Ua,$s,Va,T,P,Ga,Xa,Os,Ds,Is;jr=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new Pg}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Ya,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:i}=e;t===void 0&&(e.h=tt.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=tt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=tt.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:i}=e;t===void 0&&(e.r=tt.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=tt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=tt.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(He)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(He)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(He)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(hr)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(hr)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(hr)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(hr),this.changed=!0,this.data.r=e}set g(e){this.type.set(hr),this.changed=!0,this.data.g=e}set b(e){this.type.set(hr),this.changed=!0,this.data.b=e}set h(e){this.type.set(He),this.changed=!0,this.data.h=e}set s(e){this.type.set(He),this.changed=!0,this.data.s=e}set l(e){this.type.set(He),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),Ye={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ye.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,n=a%4==0,s=a>4,o=s?1:17,c=s?8:4,l=n?0:-1,h=s?255:15;return jr.set({r:(i>>c*(l+3)&h)*o,g:(i>>c*(l+2)&h)*o,b:(i>>c*(l+1)&h)*o,a:n?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${be[Math.round(t)]}${be[Math.round(r)]}${be[Math.round(i)]}${be[Math.round(255*a)]}`:`#${be[Math.round(t)]}${be[Math.round(r)]}${be[Math.round(i)]}`}},Fe={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(Fe.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(.9*parseFloat(r));case"rad":return tt.channel.clamp.h(180*parseFloat(r)/Math.PI);case"turn":return tt.channel.clamp.h(360*parseFloat(r))}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Fe.re);if(!r)return;const[,i,a,n,s,o]=r;return jr.set({h:Fe._hue2deg(i),s:tt.channel.clamp.s(parseFloat(a)),l:tt.channel.clamp.l(parseFloat(n)),a:s?tt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${a})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},cr={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=cr.colors[e];if(t)return Ye.parse(t)},stringify:e=>{const t=Ye.stringify(e);for(const r in cr.colors)if(cr.colors[r]===t)return r}},dr={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(dr.re);if(!r)return;const[,i,a,n,s,o,c,l,h]=r;return jr.set({r:tt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:tt.channel.clamp.g(s?2.55*parseFloat(n):parseFloat(n)),b:tt.channel.clamp.b(c?2.55*parseFloat(o):parseFloat(o)),a:l?tt.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(a)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},te={format:{keyword:cr,hex:Ye,rgb:dr,rgba:dr,hsl:Fe,hsla:Fe},parse:e=>{if(typeof e!="string")return e;const t=Ye.parse(e)||dr.parse(e)||Fe.parse(e)||cr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(He)||e.data.r===void 0?Fe.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?dr.stringify(e):Ye.stringify(e)},Ua=(e,t)=>{const r=te.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return te.stringify(r)},nr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Ua(e,{a:t});const a=jr.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return te.stringify(a)},$s=e=>(t=>{const{r,g:i,b:a}=te.parse(t),n=.2126*tt.channel.toLinear(r)+.7152*tt.channel.toLinear(i)+.0722*tt.channel.toLinear(a);return tt.lang.round(n)})(e)>=.5,or=e=>!$s(e),Va=(e,t,r)=>{const i=te.parse(e),a=i[t],n=tt.channel.clamp[t](a+r);return a!==n&&(i[t]=n),te.stringify(i)},N=(e,t)=>Va(e,"l",t),X=(e,t)=>Va(e,"l",-t),T=(e,t)=>{const r=te.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return Ua(e,i)},P=(e,t=100)=>{const r=te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((i,a,n=50)=>{const{r:s,g:o,b:c,a:l}=te.parse(i),{r:h,g:d,b:u,a:g}=te.parse(a),f=n/100,m=2*f-1,x=l-g,y=((m*x===-1?m:(m+x)/(1+m*x))+1)/2,b=1-y;return nr(s*y+h*b,o*y+d*b,c*y+u*b,l*f+g*(1-f))})(r,e,t)},{entries:Ga,setPrototypeOf:Xa,isFrozen:Os,getPrototypeOf:Ds,getOwnPropertyDescriptor:Is}=Object;let{freeze:Rt,seal:Jt,create:Rs}=Object,{apply:Za,construct:Qa}=typeof Reflect<"u"&&Reflect;Rt||(Rt=function(e){return e}),Jt||(Jt=function(e){return e}),Za||(Za=function(e,t,r){return e.apply(t,r)}),Qa||(Qa=function(e,t){return new e(...t)});const vi=Pt(Array.prototype.forEach),qg=Pt(Array.prototype.lastIndexOf),zs=Pt(Array.prototype.pop),Hr=Pt(Array.prototype.push),Ng=Pt(Array.prototype.splice),Li=Pt(String.prototype.toLowerCase),Ja=Pt(String.prototype.toString),Ps=Pt(String.prototype.match),Yr=Pt(String.prototype.replace),Wg=Pt(String.prototype.indexOf),jg=Pt(String.prototype.trim),re=Pt(Object.prototype.hasOwnProperty),zt=Pt(RegExp.prototype.test),Ur=(qs=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Qa(qs,t)});var qs;function Pt(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 Za(e,t,i)}}function nt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Li;Xa&&Xa(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const n=r(a);n!==a&&(Os(t)||(t[i]=n),a=n)}e[a]=!0}return e}function Hg(e){for(let t=0;t<e.length;t++)re(e,t)||(e[t]=null);return e}function ke(e){const t=Rs(null);for(const[r,i]of Ga(e))re(e,r)&&(Array.isArray(i)?t[r]=Hg(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ke(i):t[r]=i);return t}function Vr(e,t){for(;e!==null;){const r=Is(e,t);if(r){if(r.get)return Pt(r.get);if(typeof r.value=="function")return Pt(r.value)}e=Ds(e)}return function(){return null}}const Ns=Rt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ka=Rt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tn=Rt(["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"]),Yg=Rt(["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"]),en=Rt(["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"]),Ug=Rt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ws=Rt(["#text"]),js=Rt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),rn=Rt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hs=Rt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mi=Rt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vg=Jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Gg=Jt(/<%[\w\W]*|[\w\W]*%>/gm),Xg=Jt(/\$\{[\w\W]*/gm),Zg=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Qg=Jt(/^aria-[\-\w]+$/),Ys=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Jg=Jt(/^(?:\w+script|data):/i),Kg=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Us=Jt(/^html$/i),tf=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Vs=Object.freeze({__proto__:null,ARIA_ATTR:Qg,ATTR_WHITESPACE:Kg,CUSTOM_ELEMENT:tf,DATA_ATTR:Zg,DOCTYPE_NAME:Us,ERB_EXPR:Gg,IS_ALLOWED_URI:Ys,IS_SCRIPT_OR_DATA:Jg,MUSTACHE_EXPR:Vg,TMPLIT_EXPR:Xg});const ef=1,rf=3,af=7,nf=8,of=9,sf=function(){return typeof window>"u"?null:window};let Gs,Ue,an,le,_i,Vt,nn,ur,Xs,on,Ee,Ai,Fi,sn,Zs,Ei,Gr,Xr,Et,Qs,Js,Ks,tl,el,rl,il,al,he,ie,ln,hn,nl,Zr,ol,Ve,qt,pr,Qr,Jr,sl,ll,hl,cn,dn,un,cl,Kr,dl,pn,ul,gn,pl,gl;Ue=function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sf();const r=C=>e(C);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==of||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const a=i,n=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:c,Element:l,NodeFilter:h,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:g,trustedTypes:f}=t,m=l.prototype,x=Vr(m,"cloneNode"),y=Vr(m,"remove"),b=Vr(m,"nextSibling"),w=Vr(m,"childNodes"),M=Vr(m,"parentNode");if(typeof o=="function"){const C=i.createElement("template");C.content&&C.content.ownerDocument&&(i=C.content.ownerDocument)}let v,k="";const{implementation:S,createNodeIterator:I,createDocumentFragment:D,getElementsByTagName:R}=i,{importNode:z}=a;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported=typeof Ga=="function"&&typeof M=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:L,TMPLIT_EXPR:F,DATA_ATTR:_,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:it}=Vs;let{IS_ALLOWED_URI:st}=Vs,rt=null;const wt=nt({},[...Ns,...Ka,...tn,...en,...Ws]);let yt=null;const Qt=nt({},[...js,...rn,...Hs,...Mi]);let Z=Object.seal(Rs(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}})),ot=null,lt=null,kt=!0,Ht=!0,Ot=!1,ki=!0,fe=!1,va=!0,ar=!1,No=!1,Wo=!1,Dr=!1,La=!1,Ma=!1,Kp=!0,tg=!1,jo=!0,Ci=!1,Ir={},Rr=null;const eg=nt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rg=null;const ig=nt({},["audio","video","img","source","image","track"]);let Ho=null;const ag=nt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_a="http://www.w3.org/1998/Math/MathML",Aa="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml";let zr=Le,Yo=!1,Uo=null;const hy=nt({},[_a,Aa,Le],Ja);let Fa=nt({},["mi","mo","mn","ms","mtext"]),Ea=nt({},["annotation-xml"]);const cy=nt({},["title","style","font","a","script"]);let wi=null;const dy=["application/xhtml+xml","text/html"];let At=null,Pr=null;const uy=i.createElement("form"),ng=function(C){return C instanceof RegExp||C instanceof Function},Vo=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Pr||Pr!==C){if(C&&typeof C=="object"||(C={}),C=ke(C),wi=dy.indexOf(C.PARSER_MEDIA_TYPE)===-1?"text/html":C.PARSER_MEDIA_TYPE,At=wi==="application/xhtml+xml"?Ja:Li,rt=re(C,"ALLOWED_TAGS")?nt({},C.ALLOWED_TAGS,At):wt,yt=re(C,"ALLOWED_ATTR")?nt({},C.ALLOWED_ATTR,At):Qt,Uo=re(C,"ALLOWED_NAMESPACES")?nt({},C.ALLOWED_NAMESPACES,Ja):hy,Ho=re(C,"ADD_URI_SAFE_ATTR")?nt(ke(ag),C.ADD_URI_SAFE_ATTR,At):ag,rg=re(C,"ADD_DATA_URI_TAGS")?nt(ke(ig),C.ADD_DATA_URI_TAGS,At):ig,Rr=re(C,"FORBID_CONTENTS")?nt({},C.FORBID_CONTENTS,At):eg,ot=re(C,"FORBID_TAGS")?nt({},C.FORBID_TAGS,At):ke({}),lt=re(C,"FORBID_ATTR")?nt({},C.FORBID_ATTR,At):ke({}),Ir=!!re(C,"USE_PROFILES")&&C.USE_PROFILES,kt=C.ALLOW_ARIA_ATTR!==!1,Ht=C.ALLOW_DATA_ATTR!==!1,Ot=C.ALLOW_UNKNOWN_PROTOCOLS||!1,ki=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,fe=C.SAFE_FOR_TEMPLATES||!1,va=C.SAFE_FOR_XML!==!1,ar=C.WHOLE_DOCUMENT||!1,Dr=C.RETURN_DOM||!1,La=C.RETURN_DOM_FRAGMENT||!1,Ma=C.RETURN_TRUSTED_TYPE||!1,Wo=C.FORCE_BODY||!1,Kp=C.SANITIZE_DOM!==!1,tg=C.SANITIZE_NAMED_PROPS||!1,jo=C.KEEP_CONTENT!==!1,Ci=C.IN_PLACE||!1,st=C.ALLOWED_URI_REGEXP||Ys,zr=C.NAMESPACE||Le,Fa=C.MATHML_TEXT_INTEGRATION_POINTS||Fa,Ea=C.HTML_INTEGRATION_POINTS||Ea,Z=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&ng(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&ng(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),fe&&(Ht=!1),La&&(Dr=!0),Ir&&(rt=nt({},Ws),yt=[],Ir.html===!0&&(nt(rt,Ns),nt(yt,js)),Ir.svg===!0&&(nt(rt,Ka),nt(yt,rn),nt(yt,Mi)),Ir.svgFilters===!0&&(nt(rt,tn),nt(yt,rn),nt(yt,Mi)),Ir.mathMl===!0&&(nt(rt,en),nt(yt,Hs),nt(yt,Mi))),C.ADD_TAGS&&(rt===wt&&(rt=ke(rt)),nt(rt,C.ADD_TAGS,At)),C.ADD_ATTR&&(yt===Qt&&(yt=ke(yt)),nt(yt,C.ADD_ATTR,At)),C.ADD_URI_SAFE_ATTR&&nt(Ho,C.ADD_URI_SAFE_ATTR,At),C.FORBID_CONTENTS&&(Rr===eg&&(Rr=ke(Rr)),nt(Rr,C.FORBID_CONTENTS,At)),jo&&(rt["#text"]=!0),ar&&nt(rt,["html","head","body"]),rt.table&&(nt(rt,["tbody"]),delete ot.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ur('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=C.TRUSTED_TYPES_POLICY,k=v.createHTML("")}else v===void 0&&(v=function(H,q){if(typeof H!="object"||typeof H.createPolicy!="function")return null;let ht=null;const pt="data-tt-policy-suffix";q&&q.hasAttribute(pt)&&(ht=q.getAttribute(pt));const at="dompurify"+(ht?"#"+ht:"");try{return H.createPolicy(at,{createHTML:Lt=>Lt,createScriptURL:Lt=>Lt})}catch{return console.warn("TrustedTypes policy "+at+" could not be created."),null}}(f,n)),v!==null&&typeof k=="string"&&(k=v.createHTML(""));Rt&&Rt(C),Pr=C}},og=nt({},[...Ka,...tn,...Yg]),sg=nt({},[...en,...Ug]),me=function(C){Hr(r.removed,{element:C});try{M(C).removeChild(C)}catch{y(C)}},qr=function(C,H){try{Hr(r.removed,{attribute:H.getAttributeNode(C),from:H})}catch{Hr(r.removed,{attribute:null,from:H})}if(H.removeAttribute(C),C==="is")if(Dr||La)try{me(H)}catch{}else try{H.setAttribute(C,"")}catch{}},lg=function(C){let H=null,q=null;if(Wo)C="<remove></remove>"+C;else{const at=Ps(C,/^[\r\n\t ]+/);q=at&&at[0]}wi==="application/xhtml+xml"&&zr===Le&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const ht=v?v.createHTML(C):C;if(zr===Le)try{H=new g().parseFromString(ht,wi)}catch{}if(!H||!H.documentElement){H=S.createDocument(zr,"template",null);try{H.documentElement.innerHTML=Yo?k:ht}catch{}}const pt=H.body||H.documentElement;return C&&q&&pt.insertBefore(i.createTextNode(q),pt.childNodes[0]||null),zr===Le?R.call(H,ar?"html":"body")[0]:ar?H.documentElement:pt},hg=function(C){return I.call(C.ownerDocument||C,C,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Go=function(C){return C instanceof u&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof d)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},cg=function(C){return typeof c=="function"&&C instanceof c};function Me(C,H,q){vi(C,ht=>{ht.call(r,H,q,Pr)})}const dg=function(C){let H=null;if(Me(A.beforeSanitizeElements,C,null),Go(C))return me(C),!0;const q=At(C.nodeName);if(Me(A.uponSanitizeElement,C,{tagName:q,allowedTags:rt}),va&&C.hasChildNodes()&&!cg(C.firstElementChild)&&zt(/<[/\w!]/g,C.innerHTML)&&zt(/<[/\w!]/g,C.textContent)||C.nodeType===af||va&&C.nodeType===nf&&zt(/<[/\w]/g,C.data))return me(C),!0;if(!rt[q]||ot[q]){if(!ot[q]&&pg(q)&&(Z.tagNameCheck instanceof RegExp&&zt(Z.tagNameCheck,q)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(q)))return!1;if(jo&&!Rr[q]){const ht=M(C)||C.parentNode,pt=w(C)||C.childNodes;if(pt&&ht)for(let at=pt.length-1;at>=0;--at){const Lt=x(pt[at],!0);Lt.__removalCount=(C.__removalCount||0)+1,ht.insertBefore(Lt,b(C))}}return me(C),!0}return C instanceof l&&!function(ht){let pt=M(ht);pt&&pt.tagName||(pt={namespaceURI:zr,tagName:"template"});const at=Li(ht.tagName),Lt=Li(pt.tagName);return!!Uo[ht.namespaceURI]&&(ht.namespaceURI===Aa?pt.namespaceURI===Le?at==="svg":pt.namespaceURI===_a?at==="svg"&&(Lt==="annotation-xml"||Fa[Lt]):!!og[at]:ht.namespaceURI===_a?pt.namespaceURI===Le?at==="math":pt.namespaceURI===Aa?at==="math"&&Ea[Lt]:!!sg[at]:ht.namespaceURI===Le?!(pt.namespaceURI===Aa&&!Ea[Lt])&&!(pt.namespaceURI===_a&&!Fa[Lt])&&!sg[at]&&(cy[at]||!og[at]):!(wi!=="application/xhtml+xml"||!Uo[ht.namespaceURI]))}(C)?(me(C),!0):q!=="noscript"&&q!=="noembed"&&q!=="noframes"||!zt(/<\/no(script|embed|frames)/i,C.innerHTML)?(fe&&C.nodeType===rf&&(H=C.textContent,vi([B,L,F],ht=>{H=Yr(H,ht," ")}),C.textContent!==H&&(Hr(r.removed,{element:C.cloneNode()}),C.textContent=H)),Me(A.afterSanitizeElements,C,null),!1):(me(C),!0)},ug=function(C,H,q){if(Kp&&(H==="id"||H==="name")&&(q in i||q in uy))return!1;if(!(Ht&&!lt[H]&&zt(_,H))){if(!(kt&&zt(E,H))){if(!yt[H]||lt[H]){if(!(pg(C)&&(Z.tagNameCheck instanceof RegExp&&zt(Z.tagNameCheck,C)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(C))&&(Z.attributeNameCheck instanceof RegExp&&zt(Z.attributeNameCheck,H)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(H))||H==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&zt(Z.tagNameCheck,q)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(q))))return!1}else if(!Ho[H]){if(!zt(st,Yr(q,K,""))){if((H!=="src"&&H!=="xlink:href"&&H!=="href"||C==="script"||Wg(q,"data:")!==0||!rg[C])&&!(Ot&&!zt(O,Yr(q,K,"")))){if(q)return!1}}}}}return!0},pg=function(C){return C!=="annotation-xml"&&Ps(C,it)},gg=function(C){Me(A.beforeSanitizeAttributes,C,null);const{attributes:H}=C;if(!H||Go(C))return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yt,forceKeepAttr:void 0};let ht=H.length;for(;ht--;){const pt=H[ht],{name:at,namespaceURI:Lt,value:Pe}=pt,ye=At(at),Xo=Pe;let Dt=at==="value"?Xo:jg(Xo);if(q.attrName=ye,q.attrValue=Dt,q.keepAttr=!0,q.forceKeepAttr=void 0,Me(A.uponSanitizeAttribute,C,q),Dt=q.attrValue,!tg||ye!=="id"&&ye!=="name"||(qr(at,C),Dt="user-content-"+Dt),va&&zt(/((--!?|])>)|<\/(style|title)/i,Dt)){qr(at,C);continue}if(q.forceKeepAttr)continue;if(!q.keepAttr){qr(at,C);continue}if(!ki&&zt(/\/>/i,Dt)){qr(at,C);continue}fe&&vi([B,L,F],mg=>{Dt=Yr(Dt,mg," ")});const fg=At(C.nodeName);if(ug(fg,ye,Dt)){if(v&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Lt)switch(f.getAttributeType(fg,ye)){case"TrustedHTML":Dt=v.createHTML(Dt);break;case"TrustedScriptURL":Dt=v.createScriptURL(Dt)}if(Dt!==Xo)try{Lt?C.setAttributeNS(Lt,at,Dt):C.setAttribute(at,Dt),Go(C)?me(C):zs(r.removed)}catch{qr(at,C)}}else qr(at,C)}Me(A.afterSanitizeAttributes,C,null)},py=function C(H){let q=null;const ht=hg(H);for(Me(A.beforeSanitizeShadowDOM,H,null);q=ht.nextNode();)Me(A.uponSanitizeShadowNode,q,null),dg(q),gg(q),q.content instanceof s&&C(q.content);Me(A.afterSanitizeShadowDOM,H,null)};return r.sanitize=function(C){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,ht=null,pt=null,at=null;if(Yo=!C,Yo&&(C="<!-->"),typeof C!="string"&&!cg(C)){if(typeof C.toString!="function")throw Ur("toString is not a function");if(typeof(C=C.toString())!="string")throw Ur("dirty is not a string, aborting")}if(!r.isSupported)return C;if(No||Vo(H),r.removed=[],typeof C=="string"&&(Ci=!1),Ci){if(C.nodeName){const ye=At(C.nodeName);if(!rt[ye]||ot[ye])throw Ur("root node is forbidden and cannot be sanitized in-place")}}else if(C instanceof c)q=lg("<!---->"),ht=q.ownerDocument.importNode(C,!0),ht.nodeType===ef&&ht.nodeName==="BODY"||ht.nodeName==="HTML"?q=ht:q.appendChild(ht);else{if(!Dr&&!fe&&!ar&&C.indexOf("<")===-1)return v&&Ma?v.createHTML(C):C;if(q=lg(C),!q)return Dr?null:Ma?k:""}q&&Wo&&me(q.firstChild);const Lt=hg(Ci?C:q);for(;pt=Lt.nextNode();)dg(pt),gg(pt),pt.content instanceof s&&py(pt.content);if(Ci)return C;if(Dr){if(La)for(at=D.call(q.ownerDocument);q.firstChild;)at.appendChild(q.firstChild);else at=q;return(yt.shadowroot||yt.shadowrootmode)&&(at=z.call(a,at,!0)),at}let Pe=ar?q.outerHTML:q.innerHTML;return ar&&rt["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&zt(Us,q.ownerDocument.doctype.name)&&(Pe="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
|
3
|
+
`+Pe),fe&&vi([B,L,F],ye=>{Pe=Yr(Pe,ye," ")}),v&&Ma?v.createHTML(Pe):Pe},r.setConfig=function(){Vo(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),No=!0},r.clearConfig=function(){Pr=null,No=!1},r.isValidAttribute=function(C,H,q){Pr||Vo({});const ht=At(C),pt=At(H);return ug(ht,pt,q)},r.addHook=function(C,H){typeof H=="function"&&Hr(A[C],H)},r.removeHook=function(C,H){if(H!==void 0){const q=qg(A[C],H);return q===-1?void 0:Ng(A[C],q,1)[0]}return zs(A[C])},r.removeHooks=function(C){A[C]=[]},r.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),an=Object.defineProperty,p=(e,t)=>an(e,"name",{value:t,configurable:!0}),ts=(e,t)=>{for(var r in t)an(e,r,{get:t[r],enumerable:!0})},le={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},$={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},_i=p(function(e="fatal"){let t=le.fatal;typeof e=="string"?e.toLowerCase()in le&&(t=le[e]):typeof e=="number"&&(t=e),$.trace=()=>{},$.debug=()=>{},$.info=()=>{},$.warn=()=>{},$.error=()=>{},$.fatal=()=>{},t<=le.fatal&&($.fatal=console.error?console.error.bind(console,Vt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Vt("FATAL"))),t<=le.error&&($.error=console.error?console.error.bind(console,Vt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Vt("ERROR"))),t<=le.warn&&($.warn=console.warn?console.warn.bind(console,Vt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Vt("WARN"))),t<=le.info&&($.info=console.info?console.info.bind(console,Vt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Vt("INFO"))),t<=le.debug&&($.debug=console.debug?console.debug.bind(console,Vt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("DEBUG"))),t<=le.trace&&($.trace=console.debug?console.debug.bind(console,Vt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("TRACE")))},"setLogLevel"),Vt=p(e=>`%c${ys().format("ss.SSS")} : ${e} : `,"format"),nn=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ur=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xs=/\s*%%.*\n/gm,on=(Lr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Lr,"UnknownDiagramError"),Lr),Ee={},Ai=p(function(e,t){e=e.replace(nn,"").replace(ur,"").replace(Xs,`
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(Ee))if(i(e,t))return r;throw new on(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Fi=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)sn(t,r,i)},"registerLazyLoadedDiagrams"),sn=p((e,t,r)=>{Ee[e]&&$.warn(`Detector with key ${e} already exists. Overwriting.`),Ee[e]={detector:t,loader:r},$.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Zs=p(e=>Ee[e].loader,"getDiagramLoader"),Ei=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(n=>Ei(e,n,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(n=>{e.includes(n)||e.push(n)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(n=>{typeof t[n]!="object"||e[n]!==void 0&&typeof e[n]!="object"?(i||typeof e[n]!="object"&&typeof t[n]!="object")&&(e[n]=t[n]):(e[n]===void 0&&(e[n]=Array.isArray(t[n])?[]:{}),e[n]=Ei(e[n],t[n],{depth:r-1,clobber:i}))}),e)},"assignWithDepth"),Mt=Ei,Gr="#ffffff",Xr="#f2f2f2",Et=p((e,t)=>T(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),Qs=(Mr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,n,s,o,c,l,h,d,u,g,f,m,x,y,b,w,M,v,k;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||T(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||T(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Et(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Et(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Et(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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?X(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||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||P(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10)):(this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.darkMode)for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=X(this["cScale"+S],75);else for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=X(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||P(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||N(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||X(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||T(this.mainBkg,{h:180,s:-15,l:t*(5+3*S)}),this["surfacePeer"+S]=this["surfacePeer"+S]||T(this.mainBkg,{h:180,s:-15,l:t*(8+3*S)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||T(this.primaryColor,{h:64}),this.fillType3=this.fillType3||T(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||T(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||T(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||T(this.primaryColor,{h:128}),this.fillType7=this.fillType7||T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-10}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((n=this.radar)==null?void 0:n.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||or(this.quadrant1Fill)?N(this.quadrant1Fill):X(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:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((x=this.xyChart)==null?void 0:x.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Mr,"Theme"),Mr),Js=p(e=>{const t=new Qs;return t.calculate(e),t},"getThemeVariables"),Ks=(_r=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=Et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Et(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(P("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=nr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=X("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=X(this.sectionBkgColor,10),this.taskBorderColor=nr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=nr(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||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,n,s,o,c,l,h,d,u,g,f,m,x,y,b,w,M,v;this.secondBkg=N(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=N(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=N(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330});for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||P(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScalePeer"+k]=this["cScalePeer"+k]||N(this["cScale"+k],10);for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||T(this.mainBkg,{h:30,s:-30,l:-(4*k-10)}),this["surfacePeer"+k]=this["surfacePeer"+k]||T(this.mainBkg,{h:30,s:-30,l:-(4*k-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["pie"+k]=this["cScale"+k];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||or(this.quadrant1Fill)?N(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((x=this.radar)==null?void 0:x.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((M=this.radar)==null?void 0:M.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=N(this.secondaryColor,20),this.git1=N(this.pie2||this.secondaryColor,20),this.git2=N(this.pie3||this.tertiaryColor,20),this.git3=N(this.pie4||T(this.primaryColor,{h:-30}),20),this.git4=N(this.pie5||T(this.primaryColor,{h:-60}),20),this.git5=N(this.pie6||T(this.primaryColor,{h:-90}),10),this.git6=N(this.pie7||T(this.primaryColor,{h:60}),10),this.git7=N(this.pie8||T(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||P(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||P(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||N(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||N(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(_r,"Theme"),_r),tl=p(e=>{const t=new Ks;return t.calculate(e),t},"getThemeVariables"),el=(Ar=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=T(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Et(this.primaryColor,this.darkMode),this.secondaryBorderColor=Et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Et(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=nr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,n,s,o,c,l,h,d,u,g,f,m,x,y,b,w,M,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=X(this["cScale"+k],10),this["cScalePeer"+k]=this["cScalePeer"+k]||X(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||T(this["cScale"+k],{h:180});for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||T(this.mainBkg,{h:30,l:-(5+5*k)}),this["surfacePeer"+k]=this["surfacePeer"+k]||T(this.mainBkg,{h:30,l:-(7+5*k)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||P(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||P(this.labelTextColor);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||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=N(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||N(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||N(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||T(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||T(this.primaryColor,{l:-10}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||T(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||or(this.quadrant1Fill)?N(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((u=this.xyChart)==null?void 0:u.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||X(P(this.git0),25),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||P(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||P(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ar,"Theme"),Ar),ns=p(e=>{const t=new el;return t.calculate(e),t},"getThemeVariables"),rl=(Fr=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=N("#cde498",10),this.primaryBorderColor=Et(this.primaryColor,this.darkMode),this.secondaryBorderColor=Et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Et(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.primaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,s,o,c,l,h,d,u,g,f,m,x,y,b,w,M,v;this.actorBorder=X(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||T(this.primaryColor,{h:30}),this.cScale4=this.cScale4||T(this.primaryColor,{h:60}),this.cScale5=this.cScale5||T(this.primaryColor,{h:90}),this.cScale6=this.cScale6||T(this.primaryColor,{h:120}),this.cScale7=this.cScale7||T(this.primaryColor,{h:150}),this.cScale8=this.cScale8||T(this.primaryColor,{h:210}),this.cScale9=this.cScale9||T(this.primaryColor,{h:270}),this.cScale10=this.cScale10||T(this.primaryColor,{h:300}),this.cScale11=this.cScale11||T(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=X(this["cScale"+k],10),this["cScalePeer"+k]=this["cScalePeer"+k]||X(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||T(this["cScale"+k],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||T(this.mainBkg,{h:30,s:-30,l:-(5+5*k)}),this["surfacePeer"+k]=this["surfacePeer"+k]||T(this.mainBkg,{h:30,s:-30,l:-(8+5*k)});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||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||T(this.primaryColor,{l:-30}),this.pie5=this.pie5||T(this.secondaryColor,{l:-30}),this.pie6=this.pie6||T(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||T(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||T(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||T(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||T(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||T(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||T(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||or(this.quadrant1Fill)?N(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((u=this.xyChart)==null?void 0:u.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||T(this.primaryColor,{h:-30}),this.git4=this.git4||T(this.primaryColor,{h:-60}),this.git5=this.git5||T(this.primaryColor,{h:-90}),this.git6=this.git6||T(this.primaryColor,{h:60}),this.git7=this.git7||T(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||P(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||P(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Fr,"Theme"),Fr),il=p(e=>{const t=new rl;return t.calculate(e),t},"getThemeVariables"),al=(Er=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=N(this.contrast,55),this.background="#ffffff",this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=Et(this.primaryColor,this.darkMode),this.secondaryBorderColor=Et(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Et(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,n,s,o,c,l,h,d,u,g,f,m,x,y,b,w,M,v;this.secondBkg=N(this.contrast,55),this.border2=this.contrast,this.actorBorder=N(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||P(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||N(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||X(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||T(this.mainBkg,{l:-(5+5*k)}),this["surfacePeer"+k]=this["surfacePeer"+k]||T(this.mainBkg,{l:-(8+5*k)});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=N(this.contrast,30),this.sectionBkgColor2=N(this.contrast,30),this.taskBorderColor=X(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=N(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=X(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=T(this.primaryColor,{h:64}),this.fillType3=T(this.secondaryColor,{h:64}),this.fillType4=T(this.primaryColor,{h:-64}),this.fillType5=T(this.secondaryColor,{h:-64}),this.fillType6=T(this.primaryColor,{h:128}),this.fillType7=T(this.secondaryColor,{h:128});for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["pie"+k]=this["cScale"+k];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||T(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||T(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||T(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||T(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||T(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||T(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||or(this.quadrant1Fill)?N(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((x=this.radar)==null?void 0:x.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((M=this.radar)==null?void 0:M.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||T(this.primaryColor,{h:-30}),this.git4=this.pie5||T(this.primaryColor,{h:-60}),this.git5=this.pie6||T(this.primaryColor,{h:-90}),this.git6=this.pie7||T(this.primaryColor,{h:60}),this.git7=this.pie8||T(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Gr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Xr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Er,"Theme"),Er),he={base:{getThemeVariables:Js},dark:{getThemeVariables:tl},default:{getThemeVariables:ns},forest:{getThemeVariables:il},neutral:{getThemeVariables:p(e=>{const t=new al;return t.calculate(e),t},"getThemeVariables")}},ie={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},ln={...ie,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:he.default.getThemeVariables(),sequence:{...ie.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ie.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ie.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ie.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ie.pie,useWidth:984},xyChart:{...ie.xyChart,useWidth:void 0},requirement:{...ie.requirement,useWidth:void 0},packet:{...ie.packet},radar:{...ie.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},hn=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...hn(e[i],"")]:[...r,t+i],[]),"keyify"),nl=new Set(hn(ln,"")),$a=ln,Zr=p(e=>{if($.debug("sanitizeDirective called with",e),typeof e=="object"&&e!=null)if(Array.isArray(e))e.forEach(t=>Zr(t));else{for(const t of Object.keys(e)){if($.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nl.has(t)||e[t]==null){$.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){$.debug("sanitizing object",t),Zr(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&($.debug("sanitizing css option",t),e[t]=ol(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]="")}$.debug("After sanitization",e)}},"sanitizeDirective"),ol=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ve=Object.freeze($a),qt=Mt({},Ve),pr=[],Qr=Mt({},Ve),Jr=p((e,t)=>{let r=Mt({},e),i={};for(const a of t)un(a),i=Mt(i,a);if(r=Mt(r,i),i.theme&&i.theme in he){const a=Mt({},Gs),n=Mt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in he&&(r.themeVariables=he[r.theme].getThemeVariables(n))}return gn(Qr=r),Qr},"updateCurrentConfig"),sl=p(e=>(qt=Mt({},Ve),qt=Mt(qt,e),e.theme&&he[e.theme]&&(qt.themeVariables=he[e.theme].getThemeVariables(e.themeVariables)),Jr(qt,pr),qt),"setSiteConfig"),ll=p(e=>{Gs=Mt({},e)},"saveConfigFromInitialize"),hl=p(e=>(qt=Mt(qt,e),Jr(qt,pr),qt),"updateSiteConfig"),cn=p(()=>Mt({},qt),"getSiteConfig"),dn=p(e=>(gn(e),Mt(Qr,e),It()),"setConfig"),It=p(()=>Mt({},Qr),"getConfig"),un=p(e=>{e&&(["secure",...qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&($.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"&&un(e[t])}))},"sanitize"),cl=p(e=>{var t;Zr(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),pr.push(e),Jr(qt,pr)},"addDirective"),Kr=p((e=qt)=>{Jr(e,pr=[])},"reset"),dl={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},pn={},ul=p(e=>{pn[e]||($.warn(dl[e]),pn[e]=!0)},"issueWarning"),gn=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ul("LAZY_LOAD_DEPRECATED")},"checkConfig"),lr=/<br\s*\/?>/gi,pl=p(e=>e?yn(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),gl=(()=>{let e=!1;return()=>{e||(fl(),e=!0)}})();function fl(){const e="data-temp-href-target";Ue.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ue.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(fl,"setupDompurifyHooks");let fn,mn,ml,yl,xl,bl,yn,kl,Cl,$i,wl,Sl,xn,Oi,Tl,Bl,ti,vl,Ll,Ml;fn=p(e=>(gl(),Ue.sanitize(e)),"removeScript"),mn=p((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=fn(e):i!=="loose"&&(e=(e=(e=yn(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=bl(e))}return e},"sanitizeMore"),Ae=p((e,t)=>e&&(e=t.dompurifyConfig?Ue.sanitize(mn(e,t),t.dompurifyConfig).toString():Ue.sanitize(mn(e,t),{FORBID_TAGS:["style"]}).toString()),"sanitizeText"),ml=p((e,t)=>typeof e=="string"?Ae(e,t):e.flat().map(r=>Ae(r,t)),"sanitizeTextOrArray"),yl=p(e=>lr.test(e),"hasBreaks"),xl=p(e=>e.split(lr),"splitBreaks"),bl=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),yn=p(e=>e.replace(lr,"#br#"),"breakToPlaceholder"),Da=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),St=p(e=>e!==!1&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),kl=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Cl=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ia=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const n=t[i-1],s=t[i+1];wl(n,s)&&(a=n+","+s,i++,r.pop())}r.push(Sl(a))}return r.join("")},"parseGenericTypes"),$i=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),wl=p((e,t)=>{const r=$i(e,"~"),i=$i(t,"~");return r===1&&i===1},"shouldCombineSets"),Sl=p(e=>{const t=$i(e,"~");let r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),xn=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Oi=/\$\$(.*)\$\$/g,qe=p(e=>{var t;return(((t=e.match(Oi))==null?void 0:t.length)??0)>0},"hasKatex"),Bg=p(async(e,t)=>{e=await Ti(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),Ti=p(async(e,t)=>{if(!qe(e))return e;if(!(xn()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Oi,"MathML is unsupported in this environment.");{const{default:r}=await mt(async()=>{const{default:a}=await import("./katex-LV4FpwlL.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!xn()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(lr).map(a=>qe(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Oi,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatex"),Ne={getRows:pl,sanitizeText:Ae,sanitizeTextOrArray:ml,hasBreaks:yl,splitBreaks:xl,lineBreakRegex:lr,removeScript:fn,getUrl:Da,evaluate:St,getMax:kl,getMin:Cl},Tl=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Bl=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),ja=p(function(e,t,r,i){const a=Bl(t,r,i);Tl(e,a)},"configureSvgSize"),ss=p(function(e,t,r,i){const a=t.node().getBBox(),n=a.width,s=a.height;$.info(`SVG bounds: ${n}x${s}`,a);let o=0,c=0;$.info(`Graph bounds: ${o}x${c}`,e),o=n+2*r,c=s+2*r,$.info(`Calculated bounds: ${o}x${c}`),ja(t,c,o,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),ti={},vl=p((e,t,r)=>{let i="";return e in ti&&ti[e]?i=ti[e](r):$.warn(`No theme found for ${e}`),` & {
|
5
|
+
font-family: ${r.fontFamily};
|
6
|
+
font-size: ${r.fontSize};
|
7
|
+
fill: ${r.textColor}
|
8
|
+
}
|
9
|
+
@keyframes edge-animation-frame {
|
10
|
+
from {
|
11
|
+
stroke-dashoffset: 0;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
@keyframes dash {
|
15
|
+
to {
|
16
|
+
stroke-dashoffset: 0;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
& .edge-animation-slow {
|
20
|
+
stroke-dasharray: 9,5 !important;
|
21
|
+
stroke-dashoffset: 900;
|
22
|
+
animation: dash 50s linear infinite;
|
23
|
+
stroke-linecap: round;
|
24
|
+
}
|
25
|
+
& .edge-animation-fast {
|
26
|
+
stroke-dasharray: 9,5 !important;
|
27
|
+
stroke-dashoffset: 900;
|
28
|
+
animation: dash 20s linear infinite;
|
29
|
+
stroke-linecap: round;
|
30
|
+
}
|
31
|
+
/* Classes common for multiple diagrams */
|
32
|
+
|
33
|
+
& .error-icon {
|
34
|
+
fill: ${r.errorBkgColor};
|
35
|
+
}
|
36
|
+
& .error-text {
|
37
|
+
fill: ${r.errorTextColor};
|
38
|
+
stroke: ${r.errorTextColor};
|
39
|
+
}
|
40
|
+
|
41
|
+
& .edge-thickness-normal {
|
42
|
+
stroke-width: 1px;
|
43
|
+
}
|
44
|
+
& .edge-thickness-thick {
|
45
|
+
stroke-width: 3.5px
|
46
|
+
}
|
47
|
+
& .edge-pattern-solid {
|
48
|
+
stroke-dasharray: 0;
|
49
|
+
}
|
50
|
+
& .edge-thickness-invisible {
|
51
|
+
stroke-width: 0;
|
52
|
+
fill: none;
|
53
|
+
}
|
54
|
+
& .edge-pattern-dashed{
|
55
|
+
stroke-dasharray: 3;
|
56
|
+
}
|
57
|
+
.edge-pattern-dotted {
|
58
|
+
stroke-dasharray: 2;
|
59
|
+
}
|
60
|
+
|
61
|
+
& .marker {
|
62
|
+
fill: ${r.lineColor};
|
63
|
+
stroke: ${r.lineColor};
|
64
|
+
}
|
65
|
+
& .marker.cross {
|
66
|
+
stroke: ${r.lineColor};
|
67
|
+
}
|
68
|
+
|
69
|
+
& svg {
|
70
|
+
font-family: ${r.fontFamily};
|
71
|
+
font-size: ${r.fontSize};
|
72
|
+
}
|
73
|
+
& p {
|
74
|
+
margin: 0
|
75
|
+
}
|
76
|
+
|
77
|
+
${i}
|
78
|
+
|
79
|
+
${t}
|
80
|
+
`},"getStyles"),Ll=p((e,t)=>{t!==void 0&&(ti[e]=t)},"addStylesForDiagram"),Ml=vl,Ra={},ts(Ra,{clear:()=>Ls,getAccDescription:()=>bs,getAccTitle:()=>ls,getDiagramTitle:()=>ws,setAccDescription:()=>Ss,setAccTitle:()=>xs,setDiagramTitle:()=>Cs});let Di,Ii,Ri,zi,bn,_l,ei,Al,ri,ii,Pi,Fl;Di="",Ii="",Ri="",zi=p(e=>Ae(e,It()),"sanitizeText"),Ls=p(()=>{Di="",Ri="",Ii=""},"clear"),xs=p(e=>{Di=zi(e).replace(/^\s+/g,"")},"setAccTitle"),ls=p(()=>Di,"getAccTitle"),Ss=p(e=>{Ri=zi(e).replace(/\n\s+/g,`
|
81
|
+
`)},"setAccDescription"),bs=p(()=>Ri,"getAccDescription"),Cs=p(e=>{Ii=zi(e)},"setDiagramTitle"),ws=p(()=>Ii,"getDiagramTitle"),bn=$,_l=_i,ut=It,$g=dn,Rg=Ve,ei=p(e=>Ae(e,ut()),"sanitizeText"),es=ss,Al=p(()=>Ra,"getCommonDb"),ri={},ii=p((e,t,r)=>{var i;ri[e]&&bn.warn(`Diagram with id ${e} already registered. Overwriting.`),ri[e]=t,r&&sn(e,r),Ll(e,t.styles),(i=t.injectUtils)==null||i.call(t,bn,_l,ut,ei,es,Al(),()=>{})},"registerDiagram"),Pi=p(e=>{if(e in ri)return ri[e];throw new Fl(e)},"getDiagram"),Fl=($r=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p($r,"DiagramNotFoundError"),$r);function kn(e){return e==null}function El(e){return typeof e=="object"&&e!==null}function $l(e){return Array.isArray(e)?e:kn(e)?[]:[e]}function Ol(e,t){var r,i,a,n;if(t)for(r=0,i=(n=Object.keys(t)).length;r<i;r+=1)e[a=n[r]]=t[a];return e}function Dl(e,t){var r,i="";for(r=0;r<t;r+=1)i+=e;return i}function Il(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(kn,"isNothing"),p(El,"isObject"),p($l,"toArray"),p(Ol,"extend"),p(Dl,"repeat"),p(Il,"isNegativeZero");var Bt={isNothing:kn,isObject:El,toArray:$l,repeat:Dl,isNegativeZero:Il,extend:Ol};function Cn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
82
|
+
|
83
|
+
`+e.mark.snippet),i+" "+r):i}function gr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Cn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Cn,"formatError"),p(gr,"YAMLException$1"),gr.prototype=Object.create(Error.prototype),gr.prototype.constructor=gr,gr.prototype.toString=p(function(e){return this.name+": "+Cn(this,e)},"toString");var Yt=gr;function qi(e,t,r,i,a){var n="",s="",o=Math.floor(a/2)-1;return i-t>o&&(t=i-o+(n=" ... ").length),r-i>o&&(r=i+o-(s=" ...").length),{str:n+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+n.length}}function Ni(e,t){return Bt.repeat(" ",t-e.length)+e}function Rl(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,i=/\r?\n|\r|\0/g,a=[0],n=[],s=-1;r=i.exec(e.buffer);)n.push(r.index),a.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var o,c,l="",h=Math.min(e.line+t.linesAfter,n.length).toString().length,d=t.maxLength-(t.indent+h+3);for(o=1;o<=t.linesBefore&&!(s-o<0);o++)c=qi(e.buffer,a[s-o],n[s-o],e.position-(a[s]-a[s-o]),d),l=Bt.repeat(" ",t.indent)+Ni((e.line-o+1).toString(),h)+" | "+c.str+`
|
84
|
+
`+l;for(c=qi(e.buffer,a[s],n[s],e.position,d),l+=Bt.repeat(" ",t.indent)+Ni((e.line+1).toString(),h)+" | "+c.str+`
|
85
|
+
`,l+=Bt.repeat("-",t.indent+h+3+c.pos)+`^
|
86
|
+
`,o=1;o<=t.linesAfter&&!(s+o>=n.length);o++)c=qi(e.buffer,a[s+o],n[s+o],e.position-(a[s]-a[s+o]),d),l+=Bt.repeat(" ",t.indent)+Ni((e.line+o+1).toString(),h)+" | "+c.str+`
|
87
|
+
`;return l.replace(/\n$/,"")}p(qi,"getLine"),p(Ni,"padStart"),p(Rl,"makeSnippet");var lf=Rl,hf=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],cf=["scalar","sequence","mapping"];function zl(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function Pl(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(hf.indexOf(r)===-1)throw new Yt('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=zl(t.styleAliases||null),cf.indexOf(this.kind)===-1)throw new Yt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(zl,"compileStyleAliases"),p(Pl,"Type$1");var $t=Pl;function wn(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(n,s){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=s)}),r[a]=i}),r}function ql(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(p(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function Wi(e){return this.extend(e)}p(wn,"compileList"),p(ql,"compileMap"),p(Wi,"Schema$1"),Wi.prototype.extend=p(function(e){var t=[],r=[];if(e instanceof $t)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new Yt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach(function(a){if(!(a instanceof $t))throw new Yt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Yt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Yt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof $t))throw new Yt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Wi.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=wn(i,"implicit"),i.compiledExplicit=wn(i,"explicit"),i.compiledTypeMap=ql(i.compiledImplicit,i.compiledExplicit),i},"extend");var df=new Wi({explicit:[new $t("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),new $t("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),new $t("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")})]});function Nl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Wl(){return null}function jl(e){return e===null}p(Nl,"resolveYamlNull"),p(Wl,"constructYamlNull"),p(jl,"isNull");var uf=new $t("tag:yaml.org,2002:null",{kind:"scalar",resolve:Nl,construct:Wl,predicate:jl,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Hl(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")}function Yl(e){return e==="true"||e==="True"||e==="TRUE"}function Ul(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Hl,"resolveYamlBoolean"),p(Yl,"constructYamlBoolean"),p(Ul,"isBoolean");var pf=new $t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hl,construct:Yl,predicate:Ul,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Vl(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Gl(e){return 48<=e&&e<=55}function Xl(e){return 48<=e&&e<=57}function Zl(e){if(e===null)return!1;var t,r=e.length,i=0,a=!1;if(!r)return!1;if((t=e[i])!=="-"&&t!=="+"||(t=e[++i]),t==="0"){if(i+1===r)return!0;if((t=e[++i])==="b"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(t!=="0"&&t!=="1")return!1;a=!0}return a&&t!=="_"}if(t==="x"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!Vl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}if(t==="o"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!Gl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}}if(t==="_")return!1;for(;i<r;i++)if((t=e[i])!=="_"){if(!Xl(e.charCodeAt(i)))return!1;a=!0}return!(!a||t==="_")}function Ql(e){var t,r=e,i=1;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),(t=r[0])!=="-"&&t!=="+"||(t==="-"&&(i=-1),t=(r=r.slice(1))[0]),r==="0")return 0;if(t==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Jl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1==0&&!Bt.isNegativeZero(e)}p(Vl,"isHexCode"),p(Gl,"isOctCode"),p(Xl,"isDecCode"),p(Zl,"resolveYamlInteger"),p(Ql,"constructYamlInteger"),p(Jl,"isInteger");var gf=new $t("tag:yaml.org,2002:int",{kind:"scalar",resolve:Zl,construct:Ql,predicate:Jl,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ff=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Kl(e){return e!==null&&!(!ff.test(e)||e[e.length-1]==="_")}function th(e){var t,r;return r=(t=e.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Kl,"resolveYamlFloat"),p(th,"constructYamlFloat");var mf=/^[-+]?[0-9]+e/;function eh(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(Bt.isNegativeZero(e))return"-0.0";return r=e.toString(10),mf.test(r)?r.replace("e",".e"):r}function rh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||Bt.isNegativeZero(e))}p(eh,"representYamlFloat"),p(rh,"isFloat");var yf=new $t("tag:yaml.org,2002:float",{kind:"scalar",resolve:Kl,construct:th,predicate:rh,represent:eh,defaultStyle:"lowercase"}),ih=df.extend({implicit:[uf,pf,gf,yf]}),xf=ih,ah=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),nh=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 oh(e){return e!==null&&(ah.exec(e)!==null||nh.exec(e)!==null)}function sh(e){var t,r,i,a,n,s,o,c,l=0,h=null;if((t=ah.exec(e))===null&&(t=nh.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(n=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=6e4*(60*+t[10]+ +(t[11]||0)),t[9]==="-"&&(h=-h)),c=new Date(Date.UTC(r,i,a,n,s,o,l)),h&&c.setTime(c.getTime()-h),c}function lh(e){return e.toISOString()}p(oh,"resolveYamlTimestamp"),p(sh,"constructYamlTimestamp"),p(lh,"representYamlTimestamp");var bf=new $t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:oh,construct:sh,instanceOf:Date,represent:lh});function hh(e){return e==="<<"||e===null}p(hh,"resolveYamlMerge");var kf=new $t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hh}),Sn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
88
|
+
\r`;function ch(e){if(e===null)return!1;var t,r,i=0,a=e.length,n=Sn;for(r=0;r<a;r++)if(!((t=n.indexOf(e.charAt(r)))>64)){if(t<0)return!1;i+=6}return i%8==0}function dh(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,n=Sn,s=0,o=[];for(t=0;t<a;t++)t%4==0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|n.indexOf(i.charAt(t));return(r=a%4*6)===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function uh(e){var t,r,i="",a=0,n=e.length,s=Sn;for(t=0;t<n;t++)t%3==0&&t&&(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]),a=(a<<8)+e[t];return(r=n%3)===0?(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]):r===2?(i+=s[a>>10&63],i+=s[a>>4&63],i+=s[a<<2&63],i+=s[64]):r===1&&(i+=s[a>>2&63],i+=s[a<<4&63],i+=s[64],i+=s[64]),i}function ph(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(ch,"resolveYamlBinary"),p(dh,"constructYamlBinary"),p(uh,"representYamlBinary"),p(ph,"isBinary");var Cf=new $t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ch,construct:dh,predicate:ph,represent:uh}),wf=Object.prototype.hasOwnProperty,Sf=Object.prototype.toString;function gh(e){if(e===null)return!0;var t,r,i,a,n,s=[],o=e;for(t=0,r=o.length;t<r;t+=1){if(i=o[t],n=!1,Sf.call(i)!=="[object Object]")return!1;for(a in i)if(wf.call(i,a)){if(n)return!1;n=!0}if(!n||s.indexOf(a)!==-1)return!1;s.push(a)}return!0}function fh(e){return e!==null?e:[]}p(gh,"resolveYamlOmap"),p(fh,"constructYamlOmap");var Tf=new $t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:gh,construct:fh}),Bf=Object.prototype.toString;function mh(e){if(e===null)return!0;var t,r,i,a,n,s=e;for(n=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Bf.call(i)!=="[object Object]"||(a=Object.keys(i)).length!==1)return!1;n[t]=[a[0],i[a[0]]]}return!0}function yh(e){if(e===null)return[];var t,r,i,a,n,s=e;for(n=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],a=Object.keys(i),n[t]=[a[0],i[a[0]]];return n}p(mh,"resolveYamlPairs"),p(yh,"constructYamlPairs");var vf=new $t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mh,construct:yh}),Lf=Object.prototype.hasOwnProperty;function xh(e){if(e===null)return!0;var t,r=e;for(t in r)if(Lf.call(r,t)&&r[t]!==null)return!1;return!0}function bh(e){return e!==null?e:{}}p(xh,"resolveYamlSet"),p(bh,"constructYamlSet");var Mf=new $t("tag:yaml.org,2002:set",{kind:"mapping",resolve:xh,construct:bh}),kh=xf.extend({implicit:[bf,kf],explicit:[Cf,Tf,vf,Mf]}),$e=Object.prototype.hasOwnProperty,_f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Af=/[\x85\u2028\u2029]/,Ff=/[,\[\]\{\}]/,Ch=/^(?:!|!!|![a-z\-]+!)$/i,wh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Tn(e){return Object.prototype.toString.call(e)}function ae(e){return e===10||e===13}function Oe(e){return e===9||e===32}function Nt(e){return e===9||e===32||e===10||e===13}function Ge(e){return e===44||e===91||e===93||e===123||e===125}function Sh(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Th(e){return e===120?2:e===117?4:e===85?8:0}function Bh(e){return 48<=e&&e<=57?e-48:-1}function Bn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
89
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function vh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}p(Tn,"_class"),p(ae,"is_EOL"),p(Oe,"is_WHITE_SPACE"),p(Nt,"is_WS_OR_EOL"),p(Ge,"is_FLOW_INDICATOR"),p(Sh,"fromHexCode"),p(Th,"escapedHexLen"),p(Bh,"fromDecimalCode"),p(Bn,"simpleEscapeSequence"),p(vh,"charFromCodepoint");var Xe,Lh=new Array(256),Mh=new Array(256);for(Xe=0;Xe<256;Xe++)Lh[Xe]=Bn(Xe)?1:0,Mh[Xe]=Bn(Xe);function _h(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||kh,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=[]}function vn(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=lf(r),new Yt(t,r)}function G(e,t){throw vn(e,t)}function ai(e,t){e.onWarning&&e.onWarning.call(null,vn(e,t))}p(_h,"State$1"),p(vn,"generateError"),p(G,"throwError"),p(ai,"throwWarning");var Ah={YAML:p(function(e,t,r){var i,a,n;e.version!==null&&G(e,"duplication of %YAML directive"),r.length!==1&&G(e,"YAML directive accepts exactly one argument"),(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))===null&&G(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),a!==1&&G(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=n<2,n!==1&&n!==2&&ai(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(e,t,r){var i,a;r.length!==2&&G(e,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],Ch.test(i)||G(e,"ill-formed tag handle (first argument) of the TAG directive"),$e.call(e.tagMap,i)&&G(e,'there is a previously declared suffix for "'+i+'" tag handle'),wh.test(a)||G(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function Ce(e,t,r,i){var a,n,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(a=0,n=o.length;a<n;a+=1)(s=o.charCodeAt(a))===9||32<=s&&s<=1114111||G(e,"expected valid JSON character");else _f.test(o)&&G(e,"the stream contains non-printable characters");e.result+=o}}function Ln(e,t,r,i){var a,n,s,o;for(Bt.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,o=(a=Object.keys(r)).length;s<o;s+=1)n=a[s],$e.call(t,n)||(t[n]=r[n],i[n]=!0)}function Ze(e,t,r,i,a,n,s,o,c){var l,h;if(Array.isArray(a))for(l=0,h=(a=Array.prototype.slice.call(a)).length;l<h;l+=1)Array.isArray(a[l])&&G(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Tn(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&Tn(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(l=0,h=n.length;l<h;l+=1)Ln(e,t,n[l],r);else Ln(e,t,n,r);else e.json||$e.call(r,a)||!$e.call(t,a)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=c||e.position,G(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[a]=n,delete r[a];return t}function ji(e){var t;(t=e.input.charCodeAt(e.position))===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):G(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ct(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Oe(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(!ae(a))break;for(ji(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return r!==-1&&i!==0&&e.lineIndent<r&&ai(e,"deficient indentation"),i}function ni(e){var t,r=e.position;return!((t=e.input.charCodeAt(r))!==45&&t!==46||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,(t=e.input.charCodeAt(r))!==0&&!Nt(t)))}function Hi(e,t){t===1?e.result+=" ":t>1&&(e.result+=Bt.repeat(`
|
90
|
+
`,t-1))}function Fh(e,t,r){var i,a,n,s,o,c,l,h,d=e.kind,u=e.result;if(Nt(h=e.input.charCodeAt(e.position))||Ge(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(Nt(i=e.input.charCodeAt(e.position+1))||r&&Ge(i)))return!1;for(e.kind="scalar",e.result="",a=n=e.position,s=!1;h!==0;){if(h===58){if(Nt(i=e.input.charCodeAt(e.position+1))||r&&Ge(i))break}else if(h===35){if(Nt(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ni(e)||r&&Ge(h))break;if(ae(h)){if(o=e.line,c=e.lineStart,l=e.lineIndent,Ct(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}e.position=n,e.line=o,e.lineStart=c,e.lineIndent=l;break}}s&&(Ce(e,a,n,!1),Hi(e,e.line-o),a=n=e.position,s=!1),Oe(h)||(n=e.position+1),h=e.input.charCodeAt(++e.position)}return Ce(e,a,n,!1),!!e.result||(e.kind=d,e.result=u,!1)}function Eh(e,t){var r,i,a;if((r=e.input.charCodeAt(e.position))!==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(Ce(e,i,e.position,!0),(r=e.input.charCodeAt(++e.position))!==39)return!0;i=e.position,e.position++,a=e.position}else ae(r)?(Ce(e,i,a,!0),Hi(e,Ct(e,!1,t)),i=a=e.position):e.position===e.lineStart&&ni(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}function $h(e,t){var r,i,a,n,s,o;if((o=e.input.charCodeAt(e.position))!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Ce(e,r,e.position,!0),e.position++,!0;if(o===92){if(Ce(e,r,e.position,!0),ae(o=e.input.charCodeAt(++e.position)))Ct(e,!1,t);else if(o<256&&Lh[o])e.result+=Mh[o],e.position++;else if((s=Th(o))>0){for(a=s,n=0;a>0;a--)(s=Sh(o=e.input.charCodeAt(++e.position)))>=0?n=(n<<4)+s:G(e,"expected hexadecimal character");e.result+=vh(n),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else ae(o)?(Ce(e,r,i,!0),Hi(e,Ct(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ni(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}function Oh(e,t){var r,i,a,n,s,o,c,l,h,d,u,g,f=!0,m=e.tag,x=e.anchor,y=Object.create(null);if((g=e.input.charCodeAt(e.position))===91)s=93,l=!1,n=[];else{if(g!==123)return!1;s=125,l=!0,n={}}for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),g=e.input.charCodeAt(++e.position);g!==0;){if(Ct(e,!0,t),(g=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=m,e.anchor=x,e.kind=l?"mapping":"sequence",e.result=n,!0;f?g===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),u=null,o=c=!1,g===63&&Nt(e.input.charCodeAt(e.position+1))&&(o=c=!0,e.position++,Ct(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,Qe(e,t,1,!1,!0),d=e.tag,h=e.result,Ct(e,!0,t),g=e.input.charCodeAt(e.position),!c&&e.line!==r||g!==58||(o=!0,g=e.input.charCodeAt(++e.position),Ct(e,!0,t),Qe(e,t,1,!1,!0),u=e.result),l?Ze(e,n,y,d,h,u,r,i,a):o?n.push(Ze(e,null,y,d,h,u,r,i,a)):n.push(h),Ct(e,!0,t),(g=e.input.charCodeAt(e.position))===44?(f=!0,g=e.input.charCodeAt(++e.position)):f=!1}G(e,"unexpected end of the stream within a flow collection")}function Dh(e,t){var r,i,a,n,s=1,o=!1,c=!1,l=t,h=0,d=!1;if((n=e.input.charCodeAt(e.position))===124)i=!1;else{if(n!==62)return!1;i=!0}for(e.kind="scalar",e.result="";n!==0;)if((n=e.input.charCodeAt(++e.position))===43||n===45)s===1?s=n===43?3:2:G(e,"repeat of a chomping mode identifier");else{if(!((a=Bh(n))>=0))break;a===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?G(e,"repeat of an indentation width identifier"):(l=t+a-1,c=!0)}if(Oe(n)){do n=e.input.charCodeAt(++e.position);while(Oe(n));if(n===35)do n=e.input.charCodeAt(++e.position);while(!ae(n)&&n!==0)}for(;n!==0;){for(ji(e),e.lineIndent=0,n=e.input.charCodeAt(e.position);(!c||e.lineIndent<l)&&n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>l&&(l=e.lineIndent),ae(n))h++;else{if(e.lineIndent<l){s===3?e.result+=Bt.repeat(`
|
91
|
+
`,o?1+h:h):s===1&&o&&(e.result+=`
|
92
|
+
`);break}for(i?Oe(n)?(d=!0,e.result+=Bt.repeat(`
|
93
|
+
`,o?1+h:h)):d?(d=!1,e.result+=Bt.repeat(`
|
94
|
+
`,h+1)):h===0?o&&(e.result+=" "):e.result+=Bt.repeat(`
|
95
|
+
`,h):e.result+=Bt.repeat(`
|
96
|
+
`,o?1+h:h),o=!0,c=!0,h=0,r=e.position;!ae(n)&&n!==0;)n=e.input.charCodeAt(++e.position);Ce(e,r,e.position,!1)}}return!0}function Mn(e,t){var r,i,a=e.tag,n=e.anchor,s=[],o=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);i!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i===45)&&Nt(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,Ct(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,Qe(e,t,3,!1,!0),s.push(e.result),Ct(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&i!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=a,e.anchor=n,e.kind="sequence",e.result=s,!0)}function Ih(e,t,r){var i,a,n,s,o,c,l,h=e.tag,d=e.anchor,u={},g=Object.create(null),f=null,m=null,x=null,y=!1,b=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),l=e.input.charCodeAt(e.position);l!==0;){if(y||e.firstTabInLine===-1||(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),n=e.line,l!==63&&l!==58||!Nt(i)){if(s=e.line,o=e.lineStart,c=e.position,!Qe(e,r,2,!1,!0))break;if(e.line===n){for(l=e.input.charCodeAt(e.position);Oe(l);)l=e.input.charCodeAt(++e.position);if(l===58)Nt(l=e.input.charCodeAt(++e.position))||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ze(e,u,g,f,m,null,s,o,c),f=m=x=null),b=!0,y=!1,a=!1,f=e.tag,m=e.result;else{if(!b)return e.tag=h,e.anchor=d,!0;G(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=h,e.anchor=d,!0;G(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else l===63?(y&&(Ze(e,u,g,f,m,null,s,o,c),f=m=x=null),b=!0,y=!0,a=!0):y?(y=!1,a=!0):G(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,l=i;if((e.line===n||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,c=e.position),Qe(e,t,4,!0,a)&&(y?m=e.result:x=e.result),y||(Ze(e,u,g,f,m,x,s,o,c),f=m=x=null),Ct(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===n||e.lineIndent>t)&&l!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ze(e,u,g,f,m,null,s,o,c),b&&(e.tag=h,e.anchor=d,e.kind="mapping",e.result=u),b}function Rh(e){var t,r,i,a,n=!1,s=!1;if((a=e.input.charCodeAt(e.position))!==33)return!1;if(e.tag!==null&&G(e,"duplication of a tag property"),(a=e.input.charCodeAt(++e.position))===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(s=!0,r="!!",a=e.input.charCodeAt(++e.position)):r="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):G(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Nt(a);)a===33&&(s?G(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),Ch.test(r)||G(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),Ff.test(i)&&G(e,"tag suffix cannot contain flow indicator characters")}i&&!wh.test(i)&&G(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{G(e,"tag name is malformed: "+i)}return n?e.tag=i:$e.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:r==="!"?e.tag="!"+i:r==="!!"?e.tag="tag:yaml.org,2002:"+i:G(e,'undeclared tag handle "'+r+'"'),!0}function zh(e){var t,r;if((r=e.input.charCodeAt(e.position))!==38)return!1;for(e.anchor!==null&&G(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Nt(r)&&!Ge(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Ph(e){var t,r,i;if((i=e.input.charCodeAt(e.position))!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Nt(i)&&!Ge(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),$e.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ct(e,!0,-1),!0}function Qe(e,t,r,i,a){var n,s,o,c,l,h,d,u,g,f=1,m=!1,x=!1;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,n=s=o=r===4||r===3,i&&Ct(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;Rh(e)||zh(e);)Ct(e,!0,-1)?(m=!0,o=n,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):o=!1;if(o&&(o=m||a),f!==1&&r!==4||(u=r===1||r===2?t:t+1,g=e.position-e.lineStart,f===1?o&&(Mn(e,g)||Ih(e,g,u))||Oh(e,u)?x=!0:(s&&Dh(e,u)||Eh(e,u)||$h(e,u)?x=!0:Ph(e)?(x=!0,e.tag===null&&e.anchor===null||G(e,"alias node should not have any properties")):Fh(e,u,r===1)&&(x=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(x=o&&Mn(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&G(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c<l;c+=1)if((d=e.implicitTypes[c]).resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if($e.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,c=0,l=(h=e.typeMap.multi[e.kind||"fallback"]).length;c<l;c+=1)if(e.tag.slice(0,h[c].tag.length)===h[c].tag){d=h[c];break}d||G(e,"unknown tag !<"+e.tag+">"),e.result!==null&&d.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||x}function qh(e){var t,r,i,a,n=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Ct(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!Nt(a);)a=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&G(e,"directive name must not be less than one character in length");a!==0;){for(;Oe(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ae(a));break}if(ae(a))break;for(t=e.position;a!==0&&!Nt(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}a!==0&&ji(e),$e.call(Ah,r)?Ah[r](e,r,i):ai(e,'unknown document directive "'+r+'"')}Ct(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,Ct(e,!0,-1)):s&&G(e,"directives end mark is expected"),Qe(e,e.lineIndent-1,4,!1,!0),Ct(e,!0,-1),e.checkLineBreaks&&Af.test(e.input.slice(n,e.position))&&ai(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ni(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,Ct(e,!0,-1)):e.position<e.length-1&&G(e,"end of the stream or a document separator is expected")}function _n(e,t){t=t||{},(e=String(e)).length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
97
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new _h(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,G(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;)qh(r);return r.documents}function Nh(e,t){var r=_n(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Yt("expected a single document in the stream, but found more")}}p(Ce,"captureSegment"),p(Ln,"mergeMappings"),p(Ze,"storeMappingPair"),p(ji,"readLineBreak"),p(Ct,"skipSeparationSpace"),p(ni,"testDocumentSeparator"),p(Hi,"writeFoldedLines"),p(Fh,"readPlainScalar"),p(Eh,"readSingleQuotedScalar"),p($h,"readDoubleQuotedScalar"),p(Oh,"readFlowCollection"),p(Dh,"readBlockScalar"),p(Mn,"readBlockSequence"),p(Ih,"readBlockMapping"),p(Rh,"readTagProperty"),p(zh,"readAnchorProperty"),p(Ph,"readAlias"),p(Qe,"composeNode"),p(qh,"readDocument"),p(_n,"loadDocuments"),p(function(e,t,r){t!==null&&typeof t=="object"&&r===void 0&&(r=t,t=null);var i=_n(e,r);if(typeof t!="function")return i;for(var a=0,n=i.length;a<n;a+=1)t(i[a])},"loadAll$1"),p(Nh,"load$1");var Ef={load:Nh},Wh=Object.prototype.toString,jh=Object.prototype.hasOwnProperty,An=65279,$f={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Of=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Df=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Hh(e,t){var r,i,a,n,s,o,c;if(t===null)return{};for(r={},a=0,n=(i=Object.keys(t)).length;a<n;a+=1)s=i[a],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),(c=e.compiledTypeMap.fallback[s])&&jh.call(c.styleAliases,o)&&(o=c.styleAliases[o]),r[s]=o;return r}function Yh(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))throw new Yt("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+Bt.repeat("0",i-t.length)+t}p(Hh,"compileStyleMap"),p(Yh,"encodeHex");function Uh(e){this.schema=e.schema||kh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Bt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Hh(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==='"'?2:1,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}function Fn(e,t){for(var r,i=Bt.repeat(" ",t),a=0,n=-1,s="",o=e.length;a<o;)(n=e.indexOf(`
|
98
|
+
`,a))===-1?(r=e.slice(a),a=o):(r=e.slice(a,n+1),a=n+1),r.length&&r!==`
|
99
|
+
`&&(s+=i),s+=r;return s}function Yi(e,t){return`
|
100
|
+
`+Bt.repeat(" ",e.indent*t)}function Vh(e,t){var r,i;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function oi(e){return e===32||e===9}function fr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==An||65536<=e&&e<=1114111}function En(e){return fr(e)&&e!==An&&e!==13&&e!==10}function $n(e,t,r){var i=En(e),a=i&&!oi(e);return(r?i:i&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!a)||En(t)&&!oi(t)&&e===35||t===58&&a}function Gh(e){return fr(e)&&e!==An&&!oi(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}function Xh(e){return!oi(e)&&e!==58}function mr(e,t){var r,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function On(e){return/^\n* /.test(e)}p(Uh,"State"),p(Fn,"indentString"),p(Yi,"generateNextLine"),p(Vh,"testImplicitResolving"),p(oi,"isWhitespace"),p(fr,"isPrintable"),p(En,"isNsCharOrWhitespace"),p($n,"isPlainSafe"),p(Gh,"isPlainSafeFirst"),p(Xh,"isPlainSafeLast"),p(mr,"codePointAt"),p(On,"needIndentIndicator");function Zh(e,t,r,i,a,n,s,o){var c,l=0,h=null,d=!1,u=!1,g=i!==-1,f=-1,m=Gh(mr(e,0))&&Xh(mr(e,e.length-1));if(t||s)for(c=0;c<e.length;l>=65536?c+=2:c++){if(!fr(l=mr(e,c)))return 5;m=m&&$n(l,h,o),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if((l=mr(e,c))===10)d=!0,g&&(u=u||c-f-1>i&&e[f+1]!==" ",f=c);else if(!fr(l))return 5;m=m&&$n(l,h,o),h=l}u=u||g&&c-f-1>i&&e[f+1]!==" "}return d||u?r>9&&On(e)?5:s?n===2?5:2:u?4:3:!m||s||a(e)?n===2?5:2:1}function Qh(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===2?'""':"''";if(!e.noCompatMode&&(Of.indexOf(t)!==-1||Df.test(t)))return e.quotingType===2?'"'+t+'"':"'"+t+"'";var n=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),o=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return Vh(e,l)}switch(p(c,"testAmbiguity"),Zh(t,o,e.indent,s,c,e.quotingType,e.forceQuotes&&!i,a)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+Dn(t,e.indent)+In(Fn(t,n));case 4:return">"+Dn(t,e.indent)+In(Fn(Jh(t,s),n));case 5:return'"'+Kh(t)+'"';default:throw new Yt("impossible error: invalid scalar style")}}()}function Dn(e,t){var r=On(e)?String(t):"",i=e[e.length-1]===`
|
101
|
+
`;return r+(i&&(e[e.length-2]===`
|
102
|
+
`||e===`
|
103
|
+
`)?"+":i?"":"-")+`
|
104
|
+
`}function In(e){return e[e.length-1]===`
|
105
|
+
`?e.slice(0,-1):e}function Jh(e,t){for(var r,i,a,n=/(\n+)([^\n]*)/g,s=(r=(r=e.indexOf(`
|
106
|
+
`))!==-1?r:e.length,n.lastIndex=r,Rn(e.slice(0,r),t)),o=e[0]===`
|
107
|
+
`||e[0]===" ";a=n.exec(e);){var c=a[1],l=a[2];i=l[0]===" ",s+=c+(o||i||l===""?"":`
|
108
|
+
`)+Rn(l,t),o=i}return s}function Rn(e,t){if(e===""||e[0]===" ")return e;for(var r,i,a=/ [^ ]/g,n=0,s=0,o=0,c="";r=a.exec(e);)(o=r.index)-n>t&&(i=s>n?s:o,c+=`
|
109
|
+
`+e.slice(n,i),n=i+1),s=o;return c+=`
|
110
|
+
`,e.length-n>t&&s>n?c+=e.slice(n,s)+`
|
111
|
+
`+e.slice(s+1):c+=e.slice(n),c.slice(1)}function Kh(e){for(var t,r="",i=0,a=0;a<e.length;i>=65536?a+=2:a++)i=mr(e,a),!(t=$f[i])&&fr(i)?(r+=e[a],i>=65536&&(r+=e[a+1])):r+=t||Yh(i);return r}function tc(e,t,r){var i,a,n,s="",o=e.tag;for(i=0,a=r.length;i<a;i+=1)n=r[i],e.replacer&&(n=e.replacer.call(r,String(i),n)),(ce(e,t,n,!1,!1)||n===void 0&&ce(e,t,null,!1,!1))&&(s!==""&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=o,e.dump="["+s+"]"}function zn(e,t,r,i){var a,n,s,o="",c=e.tag;for(a=0,n=r.length;a<n;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(ce(e,t+1,s,!0,!0,!1,!0)||s===void 0&&ce(e,t+1,null,!0,!0,!1,!0))&&(i&&o===""||(o+=Yi(e,t)),e.dump&&e.dump.charCodeAt(0)===10?o+="-":o+="- ",o+=e.dump);e.tag=c,e.dump=o||"[]"}function ec(e,t,r){var i,a,n,s,o,c="",l=e.tag,h=Object.keys(r);for(i=0,a=h.length;i<a;i+=1)o="",c!==""&&(o+=", "),e.condenseFlow&&(o+='"'),s=r[n=h[i]],e.replacer&&(s=e.replacer.call(r,n,s)),ce(e,t,n,!1,!1)&&(e.dump.length>1024&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ce(e,t,s,!1,!1)&&(c+=o+=e.dump));e.tag=l,e.dump="{"+c+"}"}function rc(e,t,r,i){var a,n,s,o,c,l,h="",d=e.tag,u=Object.keys(r);if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new Yt("sortKeys must be a boolean or a function");for(a=0,n=u.length;a<n;a+=1)l="",i&&h===""||(l+=Yi(e,t)),o=r[s=u[a]],e.replacer&&(o=e.replacer.call(r,s,o)),ce(e,t+1,s,!0,!0,!0)&&((c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024)&&(e.dump&&e.dump.charCodeAt(0)===10?l+="?":l+="? "),l+=e.dump,c&&(l+=Yi(e,t)),ce(e,t+1,o,!0,c)&&(e.dump&&e.dump.charCodeAt(0)===10?l+=":":l+=": ",h+=l+=e.dump));e.tag=d,e.dump=h||"{}"}function Pn(e,t,r){var i,a,n,s,o,c;for(n=0,s=(a=r?e.explicitTypes:e.implicitTypes).length;n<s;n+=1)if(((o=a[n]).instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(c=e.styleMap[o.tag]||o.defaultStyle,Wh.call(o.represent)==="[object Function]")i=o.represent(t,c);else{if(!jh.call(o.represent,c))throw new Yt("!<"+o.tag+'> tag resolver accepts not "'+c+'" style');i=o.represent[c](t,c)}e.dump=i}return!0}return!1}function ce(e,t,r,i,a,n,s){e.tag=null,e.dump=r,Pn(e,r,!1)||Pn(e,r,!0);var o,c=Wh.call(e.dump),l=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var h,d,u=c==="[object Object]"||c==="[object Array]";if(u&&(d=(h=e.duplicates.indexOf(r))!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(a=!1),d&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(u&&d&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(rc(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(ec(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?zn(e,t-1,e.dump,a):zn(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(tc(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else{if(c!=="[object String]"){if(c==="[object Undefined]"||e.skipInvalid)return!1;throw new Yt("unacceptable kind of an object to dump "+c)}e.tag!=="?"&&Qh(e,e.dump,t,n,l)}e.tag!==null&&e.tag!=="?"&&(o=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),o=e.tag[0]==="!"?"!"+o:o.slice(0,18)==="tag:yaml.org,2002:"?"!!"+o.slice(18):"!<"+o+">",e.dump=o+" "+e.dump)}return!0}function ic(e,t){var r,i,a=[],n=[];for(Ui(e,a,n),r=0,i=n.length;r<i;r+=1)t.duplicates.push(a[n[r]]);t.usedDuplicates=new Array(i)}function Ui(e,t,r){var i,a,n;if(e!==null&&typeof e=="object")if((a=t.indexOf(e))!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,n=e.length;a<n;a+=1)Ui(e[a],t,r);else for(a=0,n=(i=Object.keys(e)).length;a<n;a+=1)Ui(e[i[a]],t,r)}p(Zh,"chooseScalarStyle"),p(Qh,"writeScalar"),p(Dn,"blockHeader"),p(In,"dropEndingNewline"),p(Jh,"foldString"),p(Rn,"foldLine"),p(Kh,"escapeString"),p(tc,"writeFlowSequence"),p(zn,"writeBlockSequence"),p(ec,"writeFlowMapping"),p(rc,"writeBlockMapping"),p(Pn,"detectType"),p(ce,"writeNode"),p(ic,"getDuplicateReferences"),p(Ui,"inspectNode"),p(function(e,t){var r=new Uh(t=t||{});r.noRefs||ic(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ce(r,0,i,!0,!0)?r.dump+`
|
112
|
+
`:""},"dump$1"),p(function(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.")}},"renamed");let Gt;as=ih,Ts=Ef.load,Gt={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function si(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=bt(e),t=bt(t);const[r,i]=[e.x,e.y],[a,n]=[t.x,t.y],s=a-r,o=n-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(si,"calculateDeltaAndAngle");let ac,nc,bt,oc,Je,sc,Y,yr,vt;bt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),hs=p(e=>({x:p(function(t,r,i){let a=0;const n=bt(i[0]).x<bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaX:g}=si(i[0],i[1]);a=Gt[e.arrowTypeStart]*Math.cos(u)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaX:g}=si(i[i.length-1],i[i.length-2]);a=Gt[e.arrowTypeEnd]*Math.cos(u)*(g>=0?1:-1)}const s=Math.abs(bt(t).x-bt(i[i.length-1]).x),o=Math.abs(bt(t).y-bt(i[i.length-1]).y),c=Math.abs(bt(t).x-bt(i[0]).x),l=Math.abs(bt(t).y-bt(i[0]).y),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd];if(s<d&&s>0&&o<d){let u=d+1-s;u*=n==="right"?-1:1,a-=u}if(c<h&&c>0&&l<h){let u=h+1-c;u*=n==="right"?-1:1,a+=u}return bt(t).x+a},"x"),y:p(function(t,r,i){let a=0;const n=bt(i[0]).y<bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaY:g}=si(i[0],i[1]);a=Gt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaY:g}=si(i[i.length-1],i[i.length-2]);a=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(g>=0?1:-1)}const s=Math.abs(bt(t).y-bt(i[i.length-1]).y),o=Math.abs(bt(t).x-bt(i[i.length-1]).x),c=Math.abs(bt(t).y-bt(i[0]).y),l=Math.abs(bt(t).x-bt(i[0]).x),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd];if(s<d&&s>0&&o<d){let u=d+1-s;u*=n==="up"?-1:1,a-=u}if(c<h&&c>0&&l<h){let u=h+1-c;u*=n==="up"?-1:1,a+=u}return bt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Bi=p(({flowchart:e})=>{var i,a;const t=((i=e==null?void 0:e.subGraphTitleMargin)==null?void 0:i.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:t+r}},"getSubGraphTitleMargins"),oc=p(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Je=p(e=>{const t=sc([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),sc=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Na=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),U=p(e=>{const{stylesArray:t}=Je(e),r=[],i=[],a=[],n=[];return t.forEach(s=>{const o=s[0];Na(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&a.push(s.join(":")+" !important"),o==="fill"&&n.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:n}},"styles2String"),Y=p((e,t)=>{var o;const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:s}=Je(e);return Object.assign({roughness:.7,fill:s.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:((o=s.get("stroke-width"))==null?void 0:o.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),yr={},vt={};let lc,hc,cc,qn,dc,uc;ks=function(){if(nc)return yr;nc=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.sanitizeUrl=void 0;var e=(ac||(ac=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|:)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt);function t(i){return i.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,function(a,n){return String.fromCharCode(n)})}function r(i){try{return decodeURIComponent(i)}catch{return i}}return yr.sanitizeUrl=function(i){if(!i)return e.BLANK_URL;var a,n=r(i.trim());do a=(n=r(n=t(n).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||n.match(e.htmlEntitiesRegex)||n.match(e.htmlCtrlEntityRegex)||n.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var s=n;if(!s)return e.BLANK_URL;if(function(u){return e.relativeFirstCharacters.indexOf(u[0])>-1}(s))return s;var o=s.trimStart(),c=o.match(e.urlSchemeRegex);if(!c)return s;var l=c[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(l))return e.BLANK_URL;var h=o.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return h;if(l==="http:"||l==="https:"){if(!function(u){return URL.canParse(u)}(h))return e.BLANK_URL;var d=new URL(h);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return h},yr}(),vg="\u200B",lc={curveBasis:Jo,curveBasisClosed:qy,curveBasisOpen:Py,curveBumpX:je,curveBumpY:As,curveBundle:zy,curveCardinalClosed:Ry,curveCardinalOpen:Iy,curveCardinal:Tg,curveCatmullRomClosed:Dy,curveCatmullRomOpen:Oy,curveCatmullRom:Sg,curveLinear:Qo,curveLinearClosed:$y,curveMonotoneX:wg,curveMonotoneY:Cg,curveNatural:kg,curveStep:bg,curveStepAfter:xg,curveStepBefore:yg},hc=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,cc=p(function(e,t){const r=qn(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);Zr(s),i=Mt(i,[...s])}else i=r.args;if(!i)return;let a=Ai(e,t);const n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),qn=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${hc.source})(?=[}][%]{2}).*
|
113
|
+
`,"ig");let n;e=e.trim().replace(a,"").replace(/'/gm,'"'),$.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);const s=[];for(;(n=ur.exec(e))!==null;)if(n.index===ur.lastIndex&&ur.lastIndex++,n&&!t||t&&((r=n[1])==null?void 0:r.match(t))||t&&((i=n[2])==null?void 0:i.match(t))){const o=n[1]?n[1]:n[2],c=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;s.push({type:o,args:c})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(a){return $.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),dc=p(function(e){return e.replace(ur,"")},"removeDirectives"),uc=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Nn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return lc[r]??t}function pc(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?ks.sanitizeUrl(r):r}p(Nn,"interpolateToCurve"),p(pc,"formatUrl");var If=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let n=window;for(let s=0;s<i;s++)if(n=n[r[s]],!n)return void $.error(`Function name: ${e} not found in window`);n[a](...t)},"runFunc");function Wn(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function gc(e){let t,r=0;return e.forEach(i=>{r+=Wn(i,t),t=i}),jn(e,r/2)}function fc(e){return e.length===1?e[0]:gc(e)}p(Wn,"distance"),p(gc,"traverseEdge"),p(fc,"calcLabelPosition");var mc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),jn=p((e,t)=>{let r,i=t;for(const a of e){if(r){const n=Wn(a,r);if(n===0)return r;if(n<i)i-=n;else{const s=i/n;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:mc((1-s)*r.x+s*a.x,5),y:mc((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Rf=p((e,t,r)=>{$.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=jn(t,25),a=e?10:5,n=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(n)*a+(t[0].x+i.x)/2,s.y=-Math.cos(n)*a+(t[0].y+i.y)/2,s},"calcCardinalityPosition");function yc(e,t,r){const i=structuredClone(r);$.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=jn(i,25+e),n=10+.5*e,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),o={x:0,y:0};return t==="start_left"?(o.x=Math.sin(s+Math.PI)*n+(i[0].x+a.x)/2,o.y=-Math.cos(s+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(o.x=Math.sin(s-Math.PI)*n+(i[0].x+a.x)/2-5,o.y=-Math.cos(s-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(o.x=Math.sin(s)*n+(i[0].x+a.x)/2-5,o.y=-Math.cos(s)*n+(i[0].y+a.y)/2-5):(o.x=Math.sin(s)*n+(i[0].x+a.x)/2,o.y=-Math.cos(s)*n+(i[0].y+a.y)/2),o}qa=function(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}},p(yc,"calcTerminalLabelPosition"),p(qa,"getStylesFromArray");let Hn;Hn=0,os=p(()=>(Hn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Hn),"generateId");function xc(e){let t="";const r="0123456789abcdef";for(let i=0;i<e;i++)t+=r.charAt(Math.floor(16*Math.random()));return t}p(xc,"makeRandomHex");let bc,kc,Cc;rs=p(e=>xc(e.length),"random"),bc=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),kc=p(function(e,t){const r=t.text.replace(Ne.lineBreakRegex," "),[,i]=Nr(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const n=a.append("tspan");return n.attr("x",t.x+2*t.textMargin),n.attr("fill",t.fill),n.text(r),a},"drawSimpleText"),vs=Zo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ne.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let n="";return i.forEach((s,o)=>{const c=oe(`${s} `,r),l=oe(n,r);if(c>t){const{hyphenatedStrings:h,remainingWord:d}=Cc(s,t,"-",r);a.push(n,...h),n=d}else l+c>=t?(a.push(n),n=s):n=[n,s].filter(Boolean).join(" ");o+1===i.length&&a.push(n)}),a.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Cc=Zo((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],n=[];let s="";return a.forEach((o,c)=>{const l=`${s}${o}`;if(oe(l,i)>=t){const h=c+1,d=a.length===h,u=`${l}${r}`;n.push(d?l:u),s=""}else s=l}),{hyphenatedStrings:n,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`),Ha=function(e,t){return Yn(e,t).height},oe=function(e,t){return Yn(e,t).width},p(Ha,"calculateTextHeight"),p(oe,"calculateTextWidth");var Vi,Yn=Zo((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,n]=Nr(r),s=["sans-serif",i],o=e.split(Ne.lineBreakRegex),c=[],l=dt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const d of s){let u=0;const g={width:0,height:0,lineHeight:0};for(const f of o){const m=bc();m.text=f||"\u200B";const x=kc(h,m).style("font-size",n).style("font-weight",a).style("font-family",d),y=(x._groups||x)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),u=Math.round(y.height),g.height+=u,g.lineHeight=Math.round(Math.max(g.lineHeight,u))}c.push(g)}return h.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),zf=(Or=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Or,"InitIDGenerator"),Or),Pf=p(function(e){return Vi=Vi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Vi.innerHTML=e,unescape(Vi.textContent)},"entityDecode");function Un(e){return"str"in e}p(Un,"isDetailedError");let wc;wc=p((e,t,r,i)=>{var n;if(!i)return;const a=(n=e.node())==null?void 0:n.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Nr=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize"),Si=function(e,t){return By({},e,t)},p(Si,"cleanAndMerge");let Sc;ee={assignWithDepth:Mt,wrapLabel:vs,calculateTextHeight:Ha,calculateTextWidth:oe,calculateTextDimensions:Yn,cleanAndMerge:Si,detectInit:cc,detectDirective:qn,isSubstringInArray:uc,interpolateToCurve:Nn,calcLabelPosition:fc,calcCardinalityPosition:Rf,calcTerminalLabelPosition:yc,formatUrl:pc,getStylesFromArray:qa,generateId:os,random:rs,runFunc:If,entityDecode:Pf,insertTitle:wc,parseFontSize:Nr,InitIDGenerator:zf},Sc=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),_e=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Ig=p((e,t,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Wt(e){return e??null}p(Wt,"handleUndefinedAttr");const qf=Object.freeze({left:0,top:0,width:16,height:16}),Gi=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Tc=Object.freeze({...qf,...Gi}),Nf=Object.freeze({...Tc,body:"",hidden:!1}),Wf=Object.freeze({width:null,height:null}),jf=Object.freeze({...Wf,...Gi}),Vn=(e,t)=>!!e&&!(!(t&&e.prefix===""||e.prefix)||!e.name);function Bc(e,t){const r=function(i,a){const n={};!i.hFlip!=!a.hFlip&&(n.hFlip=!0),!i.vFlip!=!a.vFlip&&(n.vFlip=!0);const s=((i.rotate||0)+(a.rotate||0))%4;return s&&(n.rotate=s),n}(e,t);for(const i in Nf)i in Gi?i in e&&!(i in r)&&(r[i]=Gi[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function vc(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let n={};function s(o){n=Bc(i[o]||a[o],n)}return s(t),r.forEach(s),Bc(e,n)}function Hf(e,t){if(e.icons[t])return vc(e,t,[]);const r=function(i,a){const n=i.icons,s=i.aliases||Object.create(null),o=Object.create(null);return(a||Object.keys(n).concat(Object.keys(s))).forEach(function c(l){if(n[l])return o[l]=[];if(!(l in o)){o[l]=null;const h=s[l]&&s[l].parent,d=h&&c(h);d&&(o[l]=[h].concat(d))}return o[l]}),o}(e,[t])[t];return r?vc(e,t,r):null}const Yf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Lc(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(Yf);if(i===null||!i.length)return e;const a=[];let n=i.shift(),s=Uf.test(n);for(;;){if(s){const o=parseFloat(n);isNaN(o)?a.push(n):a.push(Math.ceil(o*t*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");s=!s}}const Vf=/\sid="(\S+)"/g,Gf="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Xf=0;function Zf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ke={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Mc(e){Ke=e}var li={exec:()=>null};function gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,n)=>{let s=typeof n=="string"?n:n.source;return s=s.replace(jt.caret,"$1"),r=r.replace(a,s),i},getRegex:()=>new RegExp(r,t)};return i}var jt={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+));?/gi,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")},hi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Gn=/(?:[*+-]|\d{1,9}[.)])/,_c=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ac=gt(_c).replace(/bull/g,Gn).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(),Qf=gt(_c).replace(/bull/g,Gn).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(),Xn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zn=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Jf=gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Kf=gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gn).getRegex(),Xi="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",Qn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tm=gt("^ {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",Qn).replace("tag",Xi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fc=gt(Xn).replace("hr",hi).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",Xi).getRegex(),Jn={blockquote:gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fc).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Jf,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:hi,html:tm,lheading:Ac,list:Kf,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Fc,table:li,text:/^[^\n]+/},Ec=gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hi).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",Xi).getRegex(),em={...Jn,lheading:Qf,table:Ec,paragraph:gt(Xn).replace("hr",hi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ec).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",Xi).getRegex()},rm={...Jn,html:gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qn).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:li,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gt(Xn).replace("hr",hi).replace("heading",` *#{1,6} *[^
|
114
|
+
]`).replace("lheading",Ac).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$c=/^( {2,}|\\)\n(?!\s*$)/,Zi=/[\p{P}\p{S}]/u,Kn=/[\s\p{P}\p{S}]/u,Oc=/[^\s\p{P}\p{S}]/u,im=gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Kn).getRegex(),Dc=/(?!~)[\p{P}\p{S}]/u,Ic=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,am=gt(Ic,"u").replace(/punct/g,Zi).getRegex(),nm=gt(Ic,"u").replace(/punct/g,Dc).getRegex(),Rc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",om=gt(Rc,"gu").replace(/notPunctSpace/g,Oc).replace(/punctSpace/g,Kn).replace(/punct/g,Zi).getRegex(),sm=gt(Rc,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Dc).getRegex(),lm=gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Oc).replace(/punctSpace/g,Kn).replace(/punct/g,Zi).getRegex(),hm=gt(/\\(punct)/,"gu").replace(/punct/g,Zi).getRegex(),cm=gt(/^<(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(),dm=gt(Qn).replace("(?:-->|$)","-->").getRegex(),um=gt("^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",dm).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pm=gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Qi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zc=gt(/^!?\[(label)\]\[(ref)\]/).replace("label",Qi).replace("ref",Zn).getRegex(),Pc=gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zn).getRegex(),to={_backpedal:li,anyPunctuation:hm,autolink:cm,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:$c,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:li,emStrongLDelim:am,emStrongRDelimAst:om,emStrongRDelimUnd:lm,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:pm,nolink:Pc,punctuation:im,reflink:zc,reflinkSearch:gt("reflink|nolink(?!\\()","g").replace("reflink",zc).replace("nolink",Pc).getRegex(),tag:um,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:li},gm={...to,link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",Qi).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qi).getRegex()},eo={...to,emStrongRDelimAst:sm,emStrongLDelim:nm,url:gt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},fm={...eo,br:gt($c).replace("{2,}","*").getRegex(),text:gt(eo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ji={normal:Jn,gfm:em,pedantic:rm},ci={normal:to,gfm:eo,breaks:fm,pedantic:gm},mm={"&":"&","<":"<",">":">",'"':""","'":"'"},qc=e=>mm[e];function de(e,t){if(t){if(jt.escapeTest.test(e))return e.replace(jt.escapeReplace,qc)}else if(jt.escapeTestNoEncode.test(e))return e.replace(jt.escapeReplaceNoEncode,qc);return e}function Nc(e){try{e=encodeURI(e).replace(jt.percentDecode,"%")}catch{return null}return e}function Wc(e,t){var n;let r=e.replace(jt.findPipe,(s,o,c)=>{let l=!1,h=o;for(;--h>=0&&c[h]==="\\";)l=!l;return l?"|":" |"}),i=r.split(jt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((n=i.at(-1))!=null&&n.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(jt.slashPipe,"|");return i}function di(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 jc(e,t,r,i,a){let n=t.href,s=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}var Ki=class{constructor(e){xt(this,"options");xt(this,"rules");xt(this,"lexer");this.options=e||Ke}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:di(r,`
|
115
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],i=function(a,n,s){let o=a.match(s.other.indentCodeCompensation);if(o===null)return n;let c=o[1];return n.split(`
|
116
|
+
`).map(l=>{let h=l.match(s.other.beginningSpace);if(h===null)return l;let[d]=h;return d.length>=c.length?l.slice(c.length):l}).join(`
|
117
|
+
`)}(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let i=di(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:di(t[0],`
|
118
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=di(t[0],`
|
119
|
+
`).split(`
|
120
|
+
`),i="",a="",n=[];for(;r.length>0;){let s,o=!1,c=[];for(s=0;s<r.length;s++)if(this.rules.other.blockquoteStart.test(r[s]))c.push(r[s]),o=!0;else{if(o)break;c.push(r[s])}r=r.slice(s);let l=c.join(`
|
121
|
+
`),h=l.replace(this.rules.other.blockquoteSetextReplace,`
|
122
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
123
|
+
${l}`:l,a=a?`${a}
|
124
|
+
${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,n,!0),this.lexer.state.top=d,r.length===0)break;let u=n.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let g=u,f=g.raw+`
|
125
|
+
`+r.join(`
|
126
|
+
`),m=this.blockquote(f);n[n.length-1]=m,i=i.substring(0,i.length-g.raw.length)+m.raw,a=a.substring(0,a.length-g.text.length)+m.text;break}if((u==null?void 0:u.type)==="list"){let g=u,f=g.raw+`
|
127
|
+
`+r.join(`
|
128
|
+
`),m=this.list(f);n[n.length-1]=m,i=i.substring(0,i.length-u.raw.length)+m.raw,a=a.substring(0,a.length-g.raw.length)+m.raw,r=f.substring(n.at(-1).raw.length).split(`
|
129
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:n,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let n=this.rules.other.listItemRegex(r),s=!1;for(;e;){let c=!1,l="",h="";if(!(t=n.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let d=t[2].split(`
|
130
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),u=e.split(`
|
131
|
+
`,1)[0],g=!d.trim(),f=0;if(this.options.pedantic?(f=2,h=d.trimStart()):g?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,h=d.slice(f),f+=t[1].length),g&&this.rules.other.blankLine.test(u)&&(l+=u+`
|
132
|
+
`,e=e.substring(u.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(f),b=this.rules.other.hrRegex(f),w=this.rules.other.fencesBeginRegex(f),M=this.rules.other.headingBeginRegex(f),v=this.rules.other.htmlBeginRegex(f);for(;e;){let k,S=e.split(`
|
133
|
+
`,1)[0];if(u=S,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),k=u):k=u.replace(this.rules.other.tabCharGlobal," "),w.test(u)||M.test(u)||v.test(u)||y.test(u)||b.test(u))break;if(k.search(this.rules.other.nonSpaceChar)>=f||!u.trim())h+=`
|
134
|
+
`+k.slice(f);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(d)||M.test(d)||b.test(d))break;h+=`
|
135
|
+
`+u}!g&&!u.trim()&&(g=!0),l+=S+`
|
136
|
+
`,e=e.substring(S.length+1),d=k.slice(f)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(s=!0));let m,x=null;this.options.gfm&&(x=this.rules.other.listIsTask.exec(h),x&&(m=x[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:l,task:!!x,checked:m,loose:!1,text:h,tokens:[]}),a.raw+=l}let o=a.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let l=a.items[c].tokens.filter(d=>d.type==="space"),h=l.length>0&&l.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=h}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:a}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Wc(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
137
|
+
`):[],n={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?n.align.push("right"):this.rules.other.tableAlignCenter.test(o)?n.align.push("center"):this.rules.other.tableAlignLeft.test(o)?n.align.push("left"):n.align.push(null);for(let o=0;o<r.length;o++)n.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:n.align[o]});for(let o of a)n.rows.push(Wc(o,n.header.length).map((c,l)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:n.align[l]})));return n}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
|
138
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let n=di(r.slice(0,-1),"\\");if((r.length-n.length)%2==0)return}else{let n=function(s,o){if(s.indexOf(o[1])===-1)return-1;let c=0;for(let l=0;l<s.length;l++)if(s[l]==="\\")l++;else if(s[l]===o[0])c++;else if(s[l]===o[1]&&(c--,c<0))return l;return c>0?-2:-1}(t[2],"()");if(n===-2)return;if(n>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let i=t[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(i);n&&(i=n[1],a=n[3])}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),jc(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return jc(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let a,n,s=[...i[0]].length-1,o=s,c=0,l=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+s);(i=l.exec(t))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(n=[...a].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+c);let h=[...i[0]][0].length,d=e.slice(0,s+i.index+h+n);if(Math.min(s,n)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let u=d.slice(2,-2);return{type:"strong",raw:d,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let i,a;if(t[2]==="@")i=t[0],a="mailto:"+i;else{let n;do n=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(n!==t[0]);i=t[0],a=t[1]==="www."?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},we=class Ms{constructor(t){xt(this,"tokens");xt(this,"options");xt(this,"state");xt(this,"tokenizer");xt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ke,this.options.tokenizer=this.options.tokenizer||new Ki,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:jt,block:Ji.normal,inline:ci.normal};this.options.pedantic?(r.block=Ji.pedantic,r.inline=ci.pedantic):this.options.gfm&&(r.block=Ji.gfm,this.options.breaks?r.inline=ci.breaks:r.inline=ci.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ji,inline:ci}}static lex(t,r){return new Ms(r).lex(t)}static lexInline(t,r){return new Ms(r).inlineTokens(t)}lex(t){t=t.replace(jt.carriageReturn,`
|
139
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,n,s;for(this.options.pedantic&&(t=t.replace(jt.tabCharGlobal," ").replace(jt.spaceLine,""));t;){let o;if((n=(a=this.options.extensions)==null?void 0:a.block)!=null&&n.some(l=>!!(o=l.call({lexer:this},t,r))&&(t=t.substring(o.raw.length),r.push(o),!0)))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let l=r.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
|
140
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
|
141
|
+
`+o.raw,l.text+=`
|
142
|
+
`+o.text,this.inlineQueue.at(-1).src=l.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=`
|
143
|
+
`+o.raw,l.text+=`
|
144
|
+
`+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let c=t;if((s=this.options.extensions)!=null&&s.startBlock){let l,h=1/0,d=t.slice(1);this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},d),typeof l=="number"&&l>=0&&(h=Math.min(h,l))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let l=r.at(-1);i&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=`
|
145
|
+
`+o.raw,l.text+=`
|
146
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(o),i=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=`
|
147
|
+
`+o.raw,l.text+=`
|
148
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(o);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var o,c,l;let i=t,a=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let n=!1,s="";for(;t;){let h;if(n||(s=""),n=!1,(c=(o=this.options.extensions)==null?void 0:o.inline)==null?void 0:c.some(u=>!!(h=u.call({lexer:this},t,r))&&(t=t.substring(h.raw.length),r.push(h),!0)))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let u=r.at(-1);h.type==="text"&&(u==null?void 0:u.type)==="text"?(u.raw+=h.raw,u.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,i,s)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let d=t;if((l=this.options.extensions)!=null&&l.startInline){let u,g=1/0,f=t.slice(1);this.options.extensions.startInline.forEach(m=>{u=m.call({lexer:this},f),typeof u=="number"&&u>=0&&(g=Math.min(g,u))}),g<1/0&&g>=0&&(d=t.substring(0,g+1))}if(h=this.tokenizer.inlineText(d)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(s=h.raw.slice(-1)),n=!0;let u=r.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=h.raw,u.text+=h.text):r.push(h);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}return r}},ta=class{constructor(e){xt(this,"options");xt(this,"parser");this.options=e||Ke}space(e){return""}code({text:e,lang:t,escaped:r}){var n;let i=(n=(t||"").match(jt.notSpaceStart))==null?void 0:n[0],a=e.replace(jt.endingNewline,"")+`
|
149
|
+
`;return i?'<pre><code class="language-'+de(i)+'">'+(r?a:de(a,!0))+`</code></pre>
|
150
|
+
`:"<pre><code>"+(r?a:de(a,!0))+`</code></pre>
|
151
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
152
|
+
${this.parser.parse(e)}</blockquote>
|
153
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
154
|
+
`}hr(e){return`<hr>
|
155
|
+
`}list(e){let t=e.ordered,r=e.start,i="";for(let n=0;n<e.items.length;n++){let s=e.items[n];i+=this.listitem(s)}let a=t?"ol":"ul";return"<"+a+(t&&r!==1?' start="'+r+'"':"")+`>
|
156
|
+
`+i+"</"+a+`>
|
157
|
+
`}listitem(e){var r;let t="";if(e.task){let i=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+de(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
158
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
159
|
+
`}table(e){let t="",r="";for(let a=0;a<e.header.length;a++)r+=this.tablecell(e.header[a]);t+=this.tablerow({text:r});let i="";for(let a=0;a<e.rows.length;a++){let n=e.rows[a];r="";for(let s=0;s<n.length;s++)r+=this.tablecell(n[s]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
160
|
+
<thead>
|
161
|
+
`+t+`</thead>
|
162
|
+
`+i+`</table>
|
163
|
+
`}tablerow({text:e}){return`<tr>
|
164
|
+
${e}</tr>
|
165
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
166
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${de(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let i=this.parser.parseInline(r),a=Nc(e);if(a===null)return i;let n='<a href="'+(e=a)+'"';return t&&(n+=' title="'+de(t)+'"'),n+=">"+i+"</a>",n}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let a=Nc(e);if(a===null)return de(r);let n=`<img src="${e=a}" alt="${r}"`;return t&&(n+=` title="${de(t)}"`),n+=">",n}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:de(e.text)}},ro=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Se=class _s{constructor(t){xt(this,"options");xt(this,"renderer");xt(this,"textRenderer");this.options=t||Ke,this.options.renderer=this.options.renderer||new ta,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ro}static parse(t,r){return new _s(r).parse(t)}static parseInline(t,r){return new _s(r).parseInline(t)}parse(t,r=!0){var a,n;let i="";for(let s=0;s<t.length;s++){let o=t[s];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[o.type]){let l=o,h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){i+=h||"";continue}}let c=o;switch(c.type){case"space":i+=this.renderer.space(c);continue;case"hr":i+=this.renderer.hr(c);continue;case"heading":i+=this.renderer.heading(c);continue;case"code":i+=this.renderer.code(c);continue;case"table":i+=this.renderer.table(c);continue;case"blockquote":i+=this.renderer.blockquote(c);continue;case"list":i+=this.renderer.list(c);continue;case"html":i+=this.renderer.html(c);continue;case"paragraph":i+=this.renderer.paragraph(c);continue;case"text":{let l=c,h=this.renderer.text(l);for(;s+1<t.length&&t[s+1].type==="text";)l=t[++s],h+=`
|
167
|
+
`+this.renderer.text(l);i+=r?this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):h;continue}default:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(t,r=this.renderer){var a,n;let i="";for(let s=0;s<t.length;s++){let o=t[s];if((n=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&n[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=l||"";continue}}let c=o;switch(c.type){case"escape":case"text":i+=r.text(c);break;case"html":i+=r.html(c);break;case"link":i+=r.link(c);break;case"image":i+=r.image(c);break;case"strong":i+=r.strong(c);break;case"em":i+=r.em(c);break;case"codespan":i+=r.codespan(c);break;case"br":i+=r.br(c);break;case"del":i+=r.del(c);break;default:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},ea=(qo=class{constructor(e){xt(this,"options");xt(this,"block");this.options=e||Ke}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?we.lex:we.lexInline}provideParser(){return this.block?Se.parse:Se.parseInline}},xt(qo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),qo),tr=new class{constructor(...e){xt(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null});xt(this,"options",this.setOptions);xt(this,"parse",this.parseMarkdown(!0));xt(this,"parseInline",this.parseMarkdown(!1));xt(this,"Parser",Se);xt(this,"Renderer",ta);xt(this,"TextRenderer",ro);xt(this,"Lexer",we);xt(this,"Tokenizer",Ki);xt(this,"Hooks",ea);this.use(...e)}walkTokens(e,t){var i,a;let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let s=n;for(let o of s.header)r=r.concat(this.walkTokens(o.tokens,t));for(let o of s.rows)for(let c of o)r=r.concat(this.walkTokens(c.tokens,t));break}case"list":{let s=n;r=r.concat(this.walkTokens(s.items,t));break}default:{let s=n;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let c=s[o].flat(1/0);r=r.concat(this.walkTokens(c,t))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=t.renderers[a.name];t.renderers[a.name]=n?function(...s){let o=a.renderer.apply(this,s);return o===!1&&(o=n.apply(this,s)),o}:a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=t[a.level];n?n.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),i.extensions=t),r.renderer){let a=this.defaults.renderer||new ta(this.defaults);for(let n in r.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let s=n,o=r.renderer[s],c=a[s];a[s]=(...l)=>{let h=o.apply(a,l);return h===!1&&(h=c.apply(a,l)),h||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new Ki(this.defaults);for(let n in r.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let s=n,o=r.tokenizer[s],c=a[s];a[s]=(...l)=>{let h=o.apply(a,l);return h===!1&&(h=c.apply(a,l)),h}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new ea;for(let n in r.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let s=n,o=r.hooks[s],c=a[s];ea.passThroughHooks.has(n)?a[s]=l=>{if(this.defaults.async)return Promise.resolve(o.call(a,l)).then(d=>c.call(a,d));let h=o.call(a,l);return c.call(a,h)}:a[s]=(...l)=>{let h=o.apply(a,l);return h===!1&&(h=c.apply(a,l)),h}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,n=r.walkTokens;i.walkTokens=function(s){let o=[];return o.push(n.call(this,s)),a&&(o=o.concat(a.call(this,s))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return we.lex(e,t??this.defaults)}parser(e,t){return Se.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let i={...r},a={...this.defaults,...i},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return n(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 t>"u"||t===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);let s=a.hooks?a.hooks.provideLexer():e?we.lex:we.lexInline,o=a.hooks?a.hooks.provideParser():e?Se.parse:Se.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then(c=>s(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>o(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(n);try{a.hooks&&(t=a.hooks.preprocess(t));let c=s(t,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let l=o(c,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(c){return n(c)}}}onError(e,t){return r=>{if(r.message+=`
|
168
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+de(r.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}};function ft(e,t){return tr.parse(e,t)}function Hc(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(o,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?o.concat(l.map(function(h){var d,u;return(u=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&u!==void 0?u:0})):o},[]);if(a.length){var n=new RegExp(`
|
169
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(o){return o.replace(n,`
|
170
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(o,c){var l=s.match(/(?:^|\n)( *)$/),h=l?l[1]:"",d=o;typeof o=="string"&&o.includes(`
|
171
|
+
`)&&(d=String(o).split(`
|
172
|
+
`).map(function(u,g){return g===0?u:""+h+u}).join(`
|
173
|
+
`)),s+=d+i[c+1]}),s}ft.options=ft.setOptions=function(e){return tr.setOptions(e),ft.defaults=tr.defaults,Mc(ft.defaults),ft},ft.getDefaults=Zf,ft.defaults=Ke,ft.use=function(...e){return tr.use(...e),ft.defaults=tr.defaults,Mc(ft.defaults),ft},ft.walkTokens=function(e,t){return tr.walkTokens(e,t)},ft.parseInline=tr.parseInline,ft.Parser=Se,ft.parser=Se.parse,ft.Renderer=ta,ft.TextRenderer=ro,ft.Lexer=we,ft.lexer=we.lex,ft.Tokenizer=Ki,ft.Hooks=ea,ft.parse=ft,ft.options,ft.setOptions,ft.use,ft.walkTokens,ft.parseInline,Se.parse,we.lex;let ra,io,ao,Yc;ms={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},ra=new Map,io=new Map,fs=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if($.debug("Registering icon pack:",t.name),"loader"in t)io.set(t.name,t.loader);else{if(!("icons"in t))throw $.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');ra.set(t.name,t.icons)}}},"registerIconPacks"),ao=p(async(e,t)=>{const r=((s,o,c,l="")=>{const h=s.split(":");if(s.slice(0,1)==="@"){if(h.length<2||h.length>3)return null;l=h.shift().slice(1)}if(h.length>3||!h.length)return null;if(h.length>1){const g=h.pop(),f=h.pop(),m={provider:h.length>0?h[0]:l,prefix:f,name:g};return Vn(m)?m:null}const d=h[0],u=d.split("-");if(u.length>1){const g={provider:l,prefix:u.shift(),name:u.join("-")};return Vn(g)?g:null}if(c&&l===""){const g={provider:l,prefix:"",name:d};return Vn(g,c)?g:null}return null})(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=ra.get(i);if(!a){const s=io.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},ra.set(i,a)}catch(o){throw $.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Hf(a,r.name);if(!n)throw new Error(`Icon not found: ${e}`);return n},"getRegisteredIconData"),Yc=p(async e=>{try{return await ao(e),!0}catch{return!1}},"isIconAvailable"),sr=p(async(e,t,r)=>{let i;try{i=await ao(e,t==null?void 0:t.fallbackPrefix)}catch(s){$.error(s),i=ms}const a=function(s,o){const c={...Tc,...s},l={...jf,...o},h={left:c.left,top:c.top,width:c.width,height:c.height};let d=c.body;[c,l].forEach(v=>{const k=[],S=v.hFlip,I=v.vFlip;let D,R=v.rotate;switch(S?I?R+=2:(k.push("translate("+(h.width+h.left).toString()+" "+(0-h.top).toString()+")"),k.push("scale(-1 1)"),h.top=h.left=0):I&&(k.push("translate("+(0-h.left).toString()+" "+(h.height+h.top).toString()+")"),k.push("scale(1 -1)"),h.top=h.left=0),R<0&&(R-=4*Math.floor(R/4)),R%=4,R){case 1:D=h.height/2+h.top,k.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:k.unshift("rotate(180 "+(h.width/2+h.left).toString()+" "+(h.height/2+h.top).toString()+")");break;case 3:D=h.width/2+h.left,k.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}R%2==1&&(h.left!==h.top&&(D=h.left,h.left=h.top,h.top=D),h.width!==h.height&&(D=h.width,h.width=h.height,h.height=D)),k.length&&(d=function(z,A,B){const L=function(E,O="defs"){let K="";const it=E.indexOf("<"+O);for(;it>=0;){const st=E.indexOf(">",it),rt=E.indexOf("</"+O);if(st===-1||rt===-1)break;const wt=E.indexOf(">",rt);if(wt===-1)break;K+=E.slice(st+1,rt).trim(),E=E.slice(0,it).trim()+E.slice(wt+1)}return{defs:K,content:E}}(z);return F=L.defs,_=A+L.content+B,F?"<defs>"+F+"</defs>"+_:_;var F,_}(d,'<g transform="'+k.join(" ")+'">',"</g>"))});const u=l.width,g=l.height,f=h.width,m=h.height;let x,y;u===null?(y=g===null?"1em":g==="auto"?m:g,x=Lc(y,f/m)):(x=u==="auto"?f:u,y=g===null?Lc(x,m/f):g==="auto"?m:g);const b={},w=(v,k)=>{(S=>S==="unset"||S==="undefined"||S==="none")(k)||(b[v]=k.toString())};w("width",x),w("height",y);const M=[h.left,h.top,f,m];return b.viewBox=M.join(" "),{attributes:b,viewBox:M,body:d}}(i,t);return function(s,o){let c=s.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in o)c+=" "+l+'="'+o[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+c+">"+s+"</svg>"}(function(s,o=Gf){const c=[];let l;for(;l=Vf.exec(s);)c.push(l[1]);if(!c.length)return s;const h="suffix"+(16777216*Math.random()|Date.now()).toString(16);return c.forEach(d=>{const u=typeof o=="function"?o(d):o+(Xf++).toString(),g=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");s=s.replace(new RegExp('([#;"])('+g+')([")]|\\.[a-z])',"g"),"$1"+u+h+"$3")}),s=s.replace(new RegExp(h,"g"),"")}(a.body),{...a.attributes,...r})},"getIconSVG");function Uc(e,{markdownAutoWrap:t}){const r=Hc(e.replace(/<br\/>/g,`
|
174
|
+
`).replace(/\n{2,}/g,`
|
175
|
+
`));return t===!1?r.replace(/ /g," "):r}function Vc(e,t={}){const r=Uc(e,t),i=ft.lexer(r),a=[[]];let n=0;function s(o,c="normal"){o.type==="text"?o.text.split(`
|
176
|
+
`).forEach((l,h)=>{h!==0&&(n++,a.push([])),l.split(" ").forEach(d=>{(d=d.replace(/'/g,"'"))&&a[n].push({content:d,type:c})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(l=>{s(l,o.type)}):o.type==="html"&&a[n].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{var c;o.type==="paragraph"?(c=o.tokens)==null||c.forEach(l=>{s(l)}):o.type==="html"&&a[n].push({content:o.text,type:"normal"})}),a}function Gc(e,{markdownAutoWrap:t}={}){const r=ft.lexer(e);function i(a){var n,s,o;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(n=a.tokens)==null?void 0:n.map(i).join("")}</strong>`:a.type==="em"?`<em>${(s=a.tokens)==null?void 0:s.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(o=a.tokens)==null?void 0:o.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:`Unsupported markdown: ${a.type}`}return p(i,"output"),r.map(i).join("")}function Xc(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function Zc(e,t){return no(e,[],Xc(t.content),t.type)}function no(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...n]=r,s=[...t,a];return e([{content:s.join(""),type:i}])?no(e,s,n,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function Qc(e,t){if(e.some(({content:r})=>r.includes(`
|
177
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ia(e,t)}function ia(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const n=e.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(n),t(s))return ia(e,t,r,s);if(i.length>0)r.push(i),e.unshift(n);else if(n.content){const[o,c]=Zc(t,n);r.push([o]),c.content&&e.unshift(c)}return ia(e,t,r)}function oo(e,t){t&&e.attr("style",t)}async function Jc(e,t,r,i,a=!1){const n=e.append("foreignObject");n.attr("width",10*r+"px"),n.attr("height",10*r+"px");const s=n.append("xhtml:div");let o=t.label;t.label&&qe(t.label)&&(o=await Ti(t.label.replace(Ne.lineBreakRegex,`
|
178
|
+
`),ut()));const c=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");l.html(o),oo(l,t.labelStyle),l.attr("class",`${c} ${i}`),oo(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),n.node()}function aa(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function Kc(e,t,r){const i=e.append("text"),a=aa(i,1,t);na(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}cs=function(e,t,r){var s;const i=e.append("text"),a=aa(i,1,t);na(a,[{content:r,type:"normal"}]);const n=(s=a.node())==null?void 0:s.getBoundingClientRect();return n&&i.remove(),n};function td(e,t,r,i=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let o=0;for(const c of r){const l=p(d=>Kc(a,1.1,d)<=e,"checkWidth"),h=l(c)?[c]:Qc(c,l);for(const d of h)na(aa(s,o,1.1),d),o++}if(i){const c=s.node().getBBox(),l=2;return n.attr("x",c.x-l).attr("y",c.y-l).attr("width",c.width+2*l).attr("height",c.height+2*l),a.node()}return s.node()}function na(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}Pa=async function(e){const t=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,n)=>(t.push((async()=>{const s=`${a}:${n}`;return await Yc(s)?await sr(s,void 0,{class:"label-icon"}):`<i class='${ei(i).replace(":"," ")}'></i>`})()),i));const r=await Promise.all(t);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")},p(Uc,"preprocessMarkdown"),p(Vc,"markdownToLines"),p(Gc,"markdownToHTML"),p(Xc,"splitTextToChars"),p(Zc,"splitWordToFitWidth"),p(no,"splitWordToFitWidthRecursion"),p(Qc,"splitLineToFitWidth"),p(ia,"splitLineToFitWidthRecursion"),p(oo,"applyStyle"),p(Jc,"addHtmlSpan"),p(aa,"createTspan"),p(Kc,"computeWidthOfText"),p(cs,"computeDimensionOfText"),p(td,"createFormattedText"),p(na,"updateTextContentAndStyles"),p(Pa,"replaceIconSubstring"),xe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:s=!0,width:o=200,addSvgBackground:c=!1}={},l)=>{if($.debug("XYZ createText",t,r,i,a,n,s,"addSvgBackground: ",c),n){const h=Gc(t,l),d=await Pa(_e(h)),u=t.replace(/\\\\/g,"\\"),g={isNode:s,label:qe(t)?u:d,labelStyle:r.replace("fill:","color:")};return await Jc(e,g,o,a,c)}{const h=td(o,e,Vc(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),l),!!t&&c);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(h).select("rect").attr("style",d.replace(/background:/g,"fill:"));const u=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).select("text").attr("style",u)}return h}},"createText");function so(e,t,r){if(e&&e.length){const[i,a]=t,n=Math.PI/180*r,s=Math.cos(n),o=Math.sin(n);for(const c of e){const[l,h]=c;c[0]=(l-i)*s-(h-a)*o+i,c[1]=(l-i)*o+(h-a)*s+a}}}function ym(e,t){return e[0]===t[0]&&e[1]===t[1]}function xm(e,t,r,i=1){const a=r,n=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(a)for(const l of s)so(l,o,a);const c=function(l,h,d){const u=[];for(const b of l){const w=[...b];ym(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&u.push(w)}const g=[];h=Math.max(h,.1);const f=[];for(const b of u)for(let w=0;w<b.length-1;w++){const M=b[w],v=b[w+1];if(M[1]!==v[1]){const k=Math.min(M[1],v[1]);f.push({ymin:k,ymax:Math.max(M[1],v[1]),x:k===M[1]?M[0]:v[0],islope:(v[0]-M[0])/(v[1]-M[1])})}}if(f.sort((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!f.length)return g;let m=[],x=f[0].ymin,y=0;for(;m.length||f.length;){if(f.length){let b=-1;for(let w=0;w<f.length&&!(f[w].ymin>x);w++)b=w;f.splice(0,b+1).forEach(w=>{m.push({s:x,edge:w})})}if(m=m.filter(b=>!(b.edge.ymax<=x)),m.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(d!==1||y%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const M=m[b].edge,v=m[w].edge;g.push([[Math.round(M.x),x],[Math.round(v.x),x]])}x+=d,m.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),y++}return g}(s,n,i);if(a){for(const l of s)so(l,o,-a);(function(l,h,d){const u=[];l.forEach(g=>u.push(...g)),so(u,h,d)})(c,o,-a)}return c}function ui(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),xm(e,a,i,n||1)}class lo{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ui(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 oa(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 bm extends lo{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=ui(t,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(n),c=.5*i*Math.sin(n);for(const[l,h]of a)oa([l,h])&&s.push([[l[0]-o,l[1]+c],[...h]],[[l[0]+o,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class km extends lo{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(t,a);return i.ops=i.ops.concat(n.ops),i}}class Cm{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const s=a/4;for(const o of t){const c=oa(o),l=c/a,h=Math.ceil(l)-1,d=c-h*a,u=(o[0][0]+o[1][0])/2-a/4,g=Math.min(o[0][1],o[1][1]);for(let f=0;f<h;f++){const m=g+d+f*a,x=u-s+2*Math.random()*s,y=m-s+2*Math.random()*s,b=this.helper.ellipse(x,y,n,n,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class wm{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,n=[];return t.forEach(s=>{const o=oa(s),c=Math.floor(o/(i+a)),l=(o+a-c*(i+a))/2;let h=s[0],d=s[1];h[0]>d[0]&&(h=s[1],d=s[0]);const u=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<c;g++){const f=g*(i+a),m=f+i,x=[h[0]+f*Math.cos(u)+l*Math.cos(u),h[1]+f*Math.sin(u)+l*Math.sin(u)],y=[h[0]+m*Math.cos(u)+l*Math.cos(u),h[1]+m*Math.sin(u)+l*Math.sin(u)];n.push(...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],r))}}),n}}class Sm{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,n=ui(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(n,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(n=>{const s=oa(n),o=Math.round(s/(2*r));let c=n[0],l=n[1];c[0]>l[0]&&(c=n[1],l=n[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let d=0;d<o;d++){const u=2*d*r,g=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+u*Math.cos(h),c[1]+u*Math.sin(h)],x=[c[0]+g*Math.cos(h),c[1]+g*Math.sin(h)],y=[m[0]+f*Math.cos(h+Math.PI/4),m[1]+f*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],y[0],y[1],i),...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i))}}),a}}const Ut={};class Tm{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const sa={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 ho(e,t){return e.type===t}function co(e){const t=[],r=function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:0,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:1,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:2,text:""},o}(e);let i="BOD",a=0,n=r[a];for(;!ho(n,2);){let s=0;const o=[];if(i==="BOD"){if(n.text!=="M"&&n.text!=="m")return co("M0,0"+e);a++,s=sa[n.text],i=n.text}else ho(n,1)?s=sa[i]:(a++,s=sa[n.text],i=n.text);if(!(a+s<r.length))throw new Error("Path data ended short");for(let c=a;c<a+s;c++){const l=r[c];if(!ho(l,1))throw new Error("Param not a number: "+i+","+l.text);o[o.length]=+l.text}if(typeof sa[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:o};t.push(c),a+=s,n=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function ed(e){let t=0,r=0,i=0,a=0;const n=[];for(const{key:s,data:o}of e)switch(s){case"M":n.push({key:"M",data:[...o]}),[t,r]=o,[i,a]=o;break;case"m":t+=o[0],r+=o[1],n.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":n.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],n.push({key:"L",data:[t,r]});break;case"C":n.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const c=o.map((l,h)=>h%2?l+r:l+t);n.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":n.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const c=o.map((l,h)=>h%2?l+r:l+t);n.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":n.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],n.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":n.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],n.push({key:"H",data:[t]});break;case"V":n.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const c=o.map((l,h)=>h%2?l+r:l+t);n.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":n.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],n.push({key:"T",data:[t,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),t=i,r=a}return n}function rd(e){const t=[];let r="",i=0,a=0,n=0,s=0,o=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[n,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],o=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let d=0,u=0;r==="C"||r==="S"?(d=i+(i-o),u=a+(a-c)):(d=i,u=a),t.push({key:"C",data:[d,u,...h]}),o=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[d,u]=h;let g=0,f=0;r==="Q"||r==="T"?(g=i+(i-o),f=a+(a-c)):(g=i,f=a);const m=i+2*(g-i)/3,x=a+2*(f-a)/3,y=d+2*(g-d)/3,b=u+2*(f-u)/3;t.push({key:"C",data:[m,x,y,b,d,u]}),o=g,c=f,i=d,a=u;break}case"Q":{const[d,u,g,f]=h,m=i+2*(d-i)/3,x=a+2*(u-a)/3,y=g+2*(d-g)/3,b=f+2*(u-f)/3;t.push({key:"C",data:[m,x,y,b,g,f]}),o=d,c=u,i=g,a=f;break}case"A":{const d=Math.abs(h[0]),u=Math.abs(h[1]),g=h[2],f=h[3],m=h[4],x=h[5],y=h[6];d===0||u===0?(t.push({key:"C",data:[i,a,x,y,x,y]}),i=x,a=y):i===x&&a===y||(id(i,a,x,y,d,u,g,f,m).forEach(function(b){t.push({key:"C",data:b})}),i=x,a=y);break}case"Z":t.push({key:"Z",data:[]}),i=n,a=s}r=l}return t}function pi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function id(e,t,r,i,a,n,s,o,c,l){const h=(d=s,Math.PI*d/180);var d;let u=[],g=0,f=0,m=0,x=0;if(l)[g,f,m,x]=l;else{[e,t]=pi(e,t,-h),[r,i]=pi(r,i,-h);const B=(e-r)/2,L=(t-i)/2;let F=B*B/(a*a)+L*L/(n*n);F>1&&(F=Math.sqrt(F),a*=F,n*=F);const _=a*a,E=n*n,O=_*E-_*L*L-E*B*B,K=_*L*L+E*B*B,it=(o===c?-1:1)*Math.sqrt(Math.abs(O/K));m=it*a*L/n+(e+r)/2,x=it*-n*B/a+(t+i)/2,g=Math.asin(parseFloat(((t-x)/n).toFixed(9))),f=Math.asin(parseFloat(((i-x)/n).toFixed(9))),e<m&&(g=Math.PI-g),r<m&&(f=Math.PI-f),g<0&&(g=2*Math.PI+g),f<0&&(f=2*Math.PI+f),c&&g>f&&(g-=2*Math.PI),!c&&f>g&&(f-=2*Math.PI)}let y=f-g;if(Math.abs(y)>120*Math.PI/180){const B=f,L=r,F=i;f=c&&f>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,u=id(r=m+a*Math.cos(f),i=x+n*Math.sin(f),L,F,a,n,s,0,c,[f,B,m,x])}y=f-g;const b=Math.cos(g),w=Math.sin(g),M=Math.cos(f),v=Math.sin(f),k=Math.tan(y/4),S=4/3*a*k,I=4/3*n*k,D=[e,t],R=[e+S*w,t-I*b],z=[r+S*v,i-I*M],A=[r,i];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],l)return[R,z,A].concat(u);{u=[R,z,A].concat(u);const B=[];for(let L=0;L<u.length;L+=3){const F=pi(u[L][0],u[L][1],h),_=pi(u[L+1][0],u[L+1][1],h),E=pi(u[L+2][0],u[L+2][1],h);B.push([F[0],F[1],_[0],_[1],E[0],E[1]])}return B}}const Bm={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,r){return ha(e,t,r)},ellipse:function(e,t,r,i,a){return uo(e,t,a,od(r,i,a)).opset},doubleLineOps:function(e,t,r,i,a){return De(e,t,r,i,a,!0)}};function ad(e,t,r,i,a){return{type:"path",ops:De(e,t,r,i,a)}}function la(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let n=0;n<i-1;n++)a.push(...De(e[n][0],e[n][1],e[n+1][0],e[n+1][1],r));return t&&a.push(...De(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?ad(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function nd(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ca(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:ca(r[0],1.5*(1+.22*t.roughness),hd(t));for(let n=1;n<r.length;n++){const s=r[n];if(s.length){const o=ca(s,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:ca(s,1.5*(1+.22*t.roughness),hd(t));for(const l of o)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function od(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let s=Math.abs(e/2),o=Math.abs(t/2);const c=1-r.curveFitting;return s+=J(s*c,r),o+=J(o*c,r),{increment:n,rx:s,ry:o}}function uo(e,t,r,i){const[a,n]=dd(i.increment,e,t,i.rx,i.ry,1,i.increment*ha(.1,ha(.4,1,r),r),r);let s=da(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=dd(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=da(o,null,r);s=s.concat(c)}return{estimatedPoints:n,opset:{type:"path",ops:s}}}function sd(e,t,r,i,a,n,s,o,c){const l=e,h=t;let d=Math.abs(r/2),u=Math.abs(i/2);d+=J(.01*d,c),u+=J(.01*u,c);let g=a,f=n;for(;g<0;)g+=2*Math.PI,f+=2*Math.PI;f-g>2*Math.PI&&(g=0,f=2*Math.PI);const m=2*Math.PI/c.curveStepCount,x=Math.min(m/2,(f-g)/2),y=ud(x,l,h,d,u,g,f,1,c);if(!c.disableMultiStroke){const b=ud(x,l,h,d,u,g,f,1.5,c);y.push(...b)}return s&&(o?y.push(...De(l,h,l+d*Math.cos(g),h+u*Math.sin(g),c),...De(l,h,l+d*Math.cos(f),h+u*Math.sin(f),c)):y.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+d*Math.cos(g),h+u*Math.sin(g)]})),{type:"path",ops:y}}function ld(e,t){const r=rd(ed(co(e))),i=[];let a=[0,0],n=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":n=[o[0],o[1]],a=[o[0],o[1]];break;case"L":i.push(...De(n[0],n[1],o[0],o[1],t)),n=[o[0],o[1]];break;case"C":{const[c,l,h,d,u,g]=o;i.push(...vm(c,l,h,d,u,g,n,t)),n=[u,g];break}case"Z":i.push(...De(n[0],n[1],a[0],a[1],t)),n=[a[0],a[1]]}return{type:"path",ops:i}}function po(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+J(a,t),i[0][1]+J(a,t)]});for(let s=1;s<n;s++)r.push({op:"lineTo",data:[i[s][0]+J(a,t),i[s][1]+J(a,t)]})}}return{type:"fillPath",ops:r}}function xr(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Ut[a])switch(a){case"zigzag":Ut[a]||(Ut[a]=new bm(i));break;case"cross-hatch":Ut[a]||(Ut[a]=new km(i));break;case"dots":Ut[a]||(Ut[a]=new Cm(i));break;case"dashed":Ut[a]||(Ut[a]=new wm(i));break;case"zigzag-line":Ut[a]||(Ut[a]=new Sm(i));break;default:a="hachure",Ut[a]||(Ut[a]=new lo(i))}return Ut[a]}(t,Bm).fillPolygons(e,t)}function hd(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function cd(e){return e.randomizer||(e.randomizer=new Tm(e.seed||0)),e.randomizer.next()}function ha(e,t,r,i=1){return r.roughness*i*(cd(r)*(t-e)+e)}function J(e,t,r=1){return ha(-e,e,t,r)}function De(e,t,r,i,a,n=!1){const s=n?a.disableMultiStrokeFill:a.disableMultiStroke,o=go(e,t,r,i,a,!0,!1);if(s)return o;const c=go(e,t,r,i,a,!0,!0);return o.concat(c)}function go(e,t,r,i,a,n,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(o);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>o&&(h=c/10);const d=h/2,u=.2+.2*cd(a);let g=a.bowing*a.maxRandomnessOffset*(i-t)/200,f=a.bowing*a.maxRandomnessOffset*(e-r)/200;g=J(g,a,l),f=J(f,a,l);const m=[],x=()=>J(d,a,l),y=()=>J(h,a,l),b=a.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):m.push({op:"move",data:[e+(b?0:J(h,a,l)),t+(b?0:J(h,a,l))]}),s?m.push({op:"bcurveTo",data:[g+e+(r-e)*u+x(),f+t+(i-t)*u+x(),g+e+2*(r-e)*u+x(),f+t+2*(i-t)*u+x(),r+(b?0:x()),i+(b?0:x())]}):m.push({op:"bcurveTo",data:[g+e+(r-e)*u+y(),f+t+(i-t)*u+y(),g+e+2*(r-e)*u+y(),f+t+2*(i-t)*u+y(),r+(b?0:y()),i+(b?0:y())]}),m}function ca(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]),i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]),a===e.length-1&&i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]);return da(i,null,r)}function da(e,t,r){const i=e.length,a=[];if(i>3){const n=[],s=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const c=e[o];n[0]=[c[0],c[1]],n[1]=[c[0]+(s*e[o+1][0]-s*e[o-1][0])/6,c[1]+(s*e[o+1][1]-s*e[o-1][1])/6],n[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],n[3]=[e[o+1][0],e[o+1][1]],a.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...go(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return a}function dd(e,t,r,i,a,n,s,o){const c=[],l=[];if(o.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+a*Math.sin(h)];c.push(d),l.push(d)}l.push([t+i*Math.cos(0),r+a*Math.sin(0)]),l.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=J(.5,o)-Math.PI/2;l.push([J(n,o)+t+.9*i*Math.cos(h-e),J(n,o)+r+.9*a*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let u=h;u<d;u+=e){const g=[J(n,o)+t+i*Math.cos(u),J(n,o)+r+a*Math.sin(u)];c.push(g),l.push(g)}l.push([J(n,o)+t+i*Math.cos(h+2*Math.PI+.5*s),J(n,o)+r+a*Math.sin(h+2*Math.PI+.5*s)]),l.push([J(n,o)+t+.98*i*Math.cos(h+s),J(n,o)+r+.98*a*Math.sin(h+s)]),l.push([J(n,o)+t+.9*i*Math.cos(h+.5*s),J(n,o)+r+.9*a*Math.sin(h+.5*s)])}return[l,c]}function ud(e,t,r,i,a,n,s,o,c){const l=n+J(.1,c),h=[];h.push([J(o,c)+t+.9*i*Math.cos(l-e),J(o,c)+r+.9*a*Math.sin(l-e)]);for(let d=l;d<=s;d+=e)h.push([J(o,c)+t+i*Math.cos(d),J(o,c)+r+a*Math.sin(d)]);return h.push([t+i*Math.cos(s),r+a*Math.sin(s)]),h.push([t+i*Math.cos(s),r+a*Math.sin(s)]),da(h,0,c)}function vm(e,t,r,i,a,n,s,o){const c=[],l=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const d=o.disableMultiStroke?1:2,u=o.preserveVertices;for(let g=0;g<d;g++)g===0?c.push({op:"move",data:[s[0],s[1]]}):c.push({op:"move",data:[s[0]+(u?0:J(l[0],o)),s[1]+(u?0:J(l[0],o))]}),h=u?[a,n]:[a+J(l[g],o),n+J(l[g],o)],c.push({op:"bcurveTo",data:[e+J(l[g],o),t+J(l[g],o),r+J(l[g],o),i+J(l[g],o),h[0],h[1]]});return c}function gi(e){return[...e]}function pd(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(gi(e[0]),gi(e[1]),gi(e[2]),gi(e[2]));else{const a=[];a.push(e[0],e[0]);for(let o=1;o<e.length;o++)a.push(e[o]),o===e.length-1&&a.push(e[o]);const n=[],s=1-t;i.push(gi(a[0]));for(let o=1;o+2<a.length;o++){const c=a[o];n[0]=[c[0],c[1]],n[1]=[c[0]+(s*a[o+1][0]-s*a[o-1][0])/6,c[1]+(s*a[o+1][1]-s*a[o-1][1])/6],n[2]=[a[o+1][0]+(s*a[o][0]-s*a[o+2][0])/6,a[o+1][1]+(s*a[o][1]-s*a[o+2][1])/6],n[3]=[a[o+1][0],a[o+1][1]],i.push(n[1],n[2],n[3])}}return i}function ua(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Lm(e,t,r){const i=ua(t,r);if(i===0)return ua(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)),ua(e,er(t,r,a))}function er(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function fo(e,t,r,i){const a=i||[];if(function(o,c){const l=o[c+0],h=o[c+1],d=o[c+2],u=o[c+3];let g=3*h[0]-2*l[0]-u[0];g*=g;let f=3*h[1]-2*l[1]-u[1];f*=f;let m=3*d[0]-2*u[0]-l[0];m*=m;let x=3*d[1]-2*u[1]-l[1];return x*=x,g<m&&(g=m),f<x&&(f=x),g+f}(e,t)<r){const o=e[t+0];a.length?(n=a[a.length-1],s=o,Math.sqrt(ua(n,s))>1&&a.push(o)):a.push(o),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],d=e[t+3],u=er(c,l,.5),g=er(l,h,.5),f=er(h,d,.5),m=er(u,g,.5),x=er(g,f,.5),y=er(m,x,.5);fo([c,u,m,y],0,r,a),fo([y,x,f,d],0,r,a)}var n,s;return a}function Mm(e,t){return pa(e,0,e.length,t)}function pa(e,t,r,i,a){const n=a||[],s=e[t],o=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const d=Lm(e[h],s,o);d>c&&(c=d,l=h)}return Math.sqrt(c)>i?(pa(e,t,l+1,i,n),pa(e,l,r,i,n)):(n.length||n.push(s),n.push(o)),n}function mo(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let n=0;n<a;n++)fo(e,3*n,t,i);return r&&r>0?pa(i,0,i.length,r):i}const Xt="none";class _m{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,n){const s=this._o(n);return this._d("line",[ad(t,r,i,a,s)],s)}rectangle(t,r,i,a,n){const s=this._o(n),o=[],c=function(l,h,d,u,g){return function(f,m){return la(f,!0,m)}([[l,h],[l+d,h],[l+d,h+u],[l,h+u]],g)}(t,r,i,a,s);if(s.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];s.fillStyle==="solid"?o.push(po([l],s)):o.push(xr([l],s))}return s.stroke!==Xt&&o.push(c),this._d("rectangle",o,s)}ellipse(t,r,i,a,n){const s=this._o(n),o=[],c=od(i,a,s),l=uo(t,r,s,c);if(s.fill)if(s.fillStyle==="solid"){const h=uo(t,r,s,c).opset;h.type="fillPath",o.push(h)}else o.push(xr([l.estimatedPoints],s));return s.stroke!==Xt&&o.push(l.opset),this._d("ellipse",o,s)}circle(t,r,i,a){const n=this.ellipse(t,r,i,i,a);return n.shape="circle",n}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[la(t,!1,i)],i)}arc(t,r,i,a,n,s,o=!1,c){const l=this._o(c),h=[],d=sd(t,r,i,a,n,s,o,!0,l);if(o&&l.fill)if(l.fillStyle==="solid"){const u=Object.assign({},l);u.disableMultiStroke=!0;const g=sd(t,r,i,a,n,s,!0,!1,u);g.type="fillPath",h.push(g)}else h.push(function(u,g,f,m,x,y,b){const w=u,M=g;let v=Math.abs(f/2),k=Math.abs(m/2);v+=J(.01*v,b),k+=J(.01*k,b);let S=x,I=y;for(;S<0;)S+=2*Math.PI,I+=2*Math.PI;I-S>2*Math.PI&&(S=0,I=2*Math.PI);const D=(I-S)/b.curveStepCount,R=[];for(let z=S;z<=I;z+=D)R.push([w+v*Math.cos(z),M+k*Math.sin(z)]);return R.push([w+v*Math.cos(I),M+k*Math.sin(I)]),R.push([w,M]),xr([R],b)}(t,r,i,a,n,s,l));return l.stroke!==Xt&&h.push(d),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],n=nd(t,i);if(i.fill&&i.fill!==Xt)if(i.fillStyle==="solid"){const s=nd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const c=typeof o[0][0]=="number"?[o]:o;for(const l of c)l.length<3?s.push(...l):l.length===3?s.push(...mo(pd([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):s.push(...mo(pd(l),10,(1+i.roughness)/2))}s.length&&a.push(xr([s],i))}return i.stroke!==Xt&&a.push(n),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],n=la(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(po([t],i)):a.push(xr([t],i))),i.stroke!==Xt&&a.push(n),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=i.fill&&i.fill!=="transparent"&&i.fill!==Xt,s=i.stroke!==Xt,o=!!(i.simplification&&i.simplification<1),c=function(h,d,u){const g=rd(ed(co(h))),f=[];let m=[],x=[0,0],y=[];const b=()=>{y.length>=4&&m.push(...mo(y,1)),y=[]},w=()=>{b(),m.length&&(f.push(m),m=[])};for(const{key:v,data:k}of g)switch(v){case"M":w(),x=[k[0],k[1]],m.push(x);break;case"L":b(),m.push([k[0],k[1]]);break;case"C":if(!y.length){const S=m.length?m[m.length-1]:x;y.push([S[0],S[1]])}y.push([k[0],k[1]]),y.push([k[2],k[3]]),y.push([k[4],k[5]]);break;case"Z":b(),m.push([x[0],x[1]])}if(w(),!u)return f;const M=[];for(const v of f){const k=Mm(v,u);k.length&&M.push(k)}return M}(t,0,o?4-4*(i.simplification||1):(1+i.roughness)/2),l=ld(t,i);if(n)if(i.fillStyle==="solid")if(c.length===1){const h=ld(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(po(c,i));else a.push(xr(c,i));return s&&(o?c.forEach(h=>{a.push(la(h,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const n=typeof r=="number"&&r>=0?a.data.map(s=>+s.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const n of r){let s=null;switch(n.type){case"path":s={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Xt};break;case"fillPath":s={d:this.opsToPath(n),stroke:Xt,strokeWidth:0,fill:i.fill||Xt};break;case"fillSketch":s=this.fillSketch(n,i)}s&&a.push(s)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Xt,strokeWidth:i,fill:Xt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}const ga="http://www.w3.org/2000/svg";class Am{constructor(t,r){this.svg=t,this.gen=new _m(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(ga,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let c=null;switch(o.type){case"path":c=a.createElementNS(ga,"path"),c.setAttribute("d",this.opsToPath(o,s)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(ga,"path"),c.setAttribute("d",this.opsToPath(o,s)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,o,i)}c&&n.appendChild(c)}return n}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const n=t.createElementNS(ga,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,n){const s=this.gen.line(t,r,i,a,n);return this.draw(s)}rectangle(t,r,i,a,n){const s=this.gen.rectangle(t,r,i,a,n);return this.draw(s)}ellipse(t,r,i,a,n){const s=this.gen.ellipse(t,r,i,a,n);return this.draw(s)}circle(t,r,i,a){const n=this.gen.circle(t,r,i,a);return this.draw(n)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,n,s,o=!1,c){const l=this.gen.arc(t,r,i,a,n,s,o,c);return this.draw(l)}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)}}let j,et,fa,Q;j=(e,t)=>new Am(e,t),et=p(async(e,t,r)=>{var d,u;let i;const a=t.useHtmlLabels||St((d=ut())==null?void 0:d.htmlLabels);i=r||"node default";const n=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=n.insert("g").attr("class","label").attr("style",Wt(t.labelStyle));let o;o=t.label===void 0?"":typeof t.label=="string"?t.label:t.label[0];const c=await xe(s,Ae(_e(o),ut()),{useHtmlLabels:a,width:t.width||((u=ut().flowchart)==null?void 0:u.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const g=c.children[0],f=dt(c),m=g.getElementsByTagName("img");if(m){const x=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(b=>{function w(){if(y.style.display="flex",y.style.flexDirection="column",x){const M=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,v=5,[k=$a.fontSize]=Nr(M),S=k*v+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";b(y)}p(w,"setupImage"),setTimeout(()=>{y.complete&&w()}),y.addEventListener("error",w),y.addEventListener("load",w)})))}l=g.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}return a?s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):s.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:n,bbox:l,halfPadding:h,label:s}},"labelHelper"),fa=p(async(e,t,r)=>{var c,l,h,d,u,g;const i=r.useHtmlLabels||St((l=(c=ut())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await xe(a,Ae(_e(t),ut()),{useHtmlLabels:i,width:r.width||((d=(h=ut())==null?void 0:h.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=n.getBBox();const o=r.padding/2;if(St((g=(u=ut())==null?void 0:u.flowchart)==null?void 0:g.htmlLabels)){const f=n.children[0],m=dt(n);s=f.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return i?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:a}},"insertLabel"),V=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Q=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ct(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Ie(e,t,r,i,a,n){const s=[],o=r-e,c=i-t,l=o/n,h=2*Math.PI/l,d=t+c/2;for(let u=0;u<=50;u++){const g=e+u/50*o,f=d+a*Math.sin(h*(g-e));s.push({x:g,y:f})}return s}function yo(e,t,r,i,a,n){const s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let l=0;l<i;l++){const h=o+l*c,d=e+r*Math.cos(h),u=t+r*Math.sin(h);s.push({x:-d,y:-u})}return s}p(ct,"createPathFromPoints"),p(Ie,"generateFullSineWavePoints"),p(yo,"generateCirclePoints");var Fm=p((e,t)=>{var r,i,a=e.x,n=e.y,s=t.x-a,o=t.y-n,c=e.width/2,l=e.height/2;return Math.abs(o)*c>Math.abs(s)*l?(o<0&&(l=-l),r=o===0?0:l*s/o,i=l):(s<0&&(c=-c),r=c,i=s===0?0:c*o/s),{x:a+r,y:n+i}},"intersectRect"),br=Fm;function gd(e,t){t&&e.attr("style",t)}async function fd(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&qe(e.label)&&(i=await Ti(e.label.replace(Ne.lineBreakRegex,`
|
179
|
+
`),ut()));const a=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),gd(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(gd,"applyStyle"),p(fd,"addHtmlLabel");let md,Re,ue,xo,yd,xd,bd,kd,Cd,bo;md=p(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),St(ut().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),$.info("vertexText"+a);const n={isNode:i,label:_e(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await fd(n)}{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",t.replace("color:","fill:"));let s=[];s=typeof a=="string"?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const o of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=o.trim(),n.appendChild(c)}return n}},"createLabel"),Re=md,ue=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),xo=p(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s}=i,{labelStyles:o,nodeStyles:c,borderStyles:l,backgroundStyles:h}=U(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),u=St(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await xe(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0});let m=f.getBBox();if(St(r.flowchart.htmlLabels)){const S=f.children[0],I=dt(f);m=S.getBoundingClientRect(),I.attr("width",m.width),I.attr("height",m.height)}const x=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-x/2,w=t.y-y/2;let M;if($.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=j(d),I=Y(t,{roughness:.7,fill:n,stroke:s,fillWeight:3,seed:a}),D=S.path(ue(b,w,x,y,0),I);M=d.insert(()=>($.debug("Rough node insert CXC",D),D),":first-child"),M.select("path:nth-child(2)").attr("style",l.join(";")),M.select("path").attr("style",h.join(";").replace("fill","stroke"))}else M=d.insert("rect",":first-child"),M.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:v}=Bi(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),o){const S=g.select("span");S&&S.attr("style",o)}const k=M.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return br(t,S)},{cluster:d,labelBBox:m}},"rect"),yd=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,n=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return br(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),xd=p(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:s,compositeTitleBackground:o,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),d=l.insert("g").attr("class","cluster-label");let u=l.append("rect");const g=d.node().appendChild(await Re(t.label,t.labelStyle,void 0,!0));let f=g.getBBox();if(St(r.flowchart.htmlLabels)){const D=g.children[0],R=dt(g);f=D.getBoundingClientRect(),R.attr("width",f.width),R.attr("height",f.height)}const m=0*t.padding,x=m/2,y=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+m;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-f.height-6,M=t.x-y/2,v=t.y-b/2;t.width=y;const k=t.y-t.height/2-x+f.height+2;let S;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),R=j(l),z=t.rx||t.ry?R.path(ue(M,v,y,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:c,seed:a}):R.rectangle(M,v,y,b,{seed:a});S=l.insert(()=>z,":first-child");const A=R.rectangle(M,k,y,w,{fill:D?n:s,fillStyle:D?"hachure":"solid",stroke:c,seed:a});S=l.insert(()=>z,":first-child"),u=l.insert(()=>A)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",M).attr("y",v).attr("width",y).attr("height",b).attr("data-look",t.look),u.attr("class","inner").attr("x",M).attr("y",k).attr("width",y).attr("height",w);d.attr("transform",`translate(${t.x-f.width/2}, ${v+1-(St(r.flowchart.htmlLabels)?0:3)})`);const I=S.node().getBBox();return t.height=I.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(D){return br(t,D)},{cluster:l,labelBBox:f}},"roundedWithTitle"),bd=p(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s}=i,{labelStyles:o,nodeStyles:c,borderStyles:l,backgroundStyles:h}=U(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),u=St(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await xe(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let m=f.getBBox();if(St(r.flowchart.htmlLabels)){const S=f.children[0],I=dt(f);m=S.getBoundingClientRect(),I.attr("width",m.width),I.attr("height",m.height)}const x=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-x/2,w=t.y-y/2;let M;if($.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=j(d),I=Y(t,{roughness:.7,fill:n,stroke:s,fillWeight:4,seed:a}),D=S.path(ue(b,w,x,y,t.rx),I);M=d.insert(()=>($.debug("Rough node insert CXC",D),D),":first-child"),M.select("path:nth-child(2)").attr("style",l.join(";")),M.select("path").attr("style",h.join(";").replace("fill","stroke"))}else M=d.insert("rect",":first-child"),M.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:v}=Bi(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),o){const S=g.select("span");S&&S.attr("style",o)}const k=M.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return br(t,S)},{cluster:d,labelBBox:m}},"kanbanSection"),kd=p((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,d=t.x-l/2,u=t.y-h/2;let g;if(t.width=l,t.look==="handDrawn"){const m=j(s).rectangle(d,u,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});g=s.insert(()=>m,":first-child")}else g=o.insert("rect",":first-child"),g.attr("class","divider").attr("x",d).attr("y",u).attr("width",l).attr("height",h).attr("data-look",t.look);const f=g.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return br(t,m)},{cluster:s,labelBBox:{}}},"divider"),Cd={rect:xo,squareRect:xo,roundedWithTitle:xd,noteGroup:yd,divider:kd,kanbanSection:bd},bo=new Map,Ko=p(async(e,t)=>{const r=t.shape||"rect",i=await Cd[r](e,t);return bo.set(t.id,i),i},"insertCluster"),Ag=p(()=>{bo=new Map},"clear");function wd(e,t){return e.intersect(t)}p(wd,"intersectNode");var Em=wd;function Sd(e,t,r,i){var a=e.x,n=e.y,s=a-i.x,o=n-i.y,c=Math.sqrt(t*t*o*o+r*r*s*s),l=Math.abs(t*r*s/c);i.x<a&&(l=-l);var h=Math.abs(t*r*o/c);return i.y<n&&(h=-h),{x:a+l,y:n+h}}p(Sd,"intersectEllipse");var Td=Sd;function Bd(e,t,r){return Td(e,t,t,r)}p(Bd,"intersectCircle");var $m=Bd;function vd(e,t,r,i){var a,n,s,o,c,l,h,d,u,g,f,m,x;if(a=t.y-e.y,s=e.x-t.x,c=t.x*e.y-e.x*t.y,u=a*r.x+s*r.y+c,g=a*i.x+s*i.y+c,!(u!==0&&g!==0&&ko(u,g)||(n=i.y-r.y,o=r.x-i.x,l=i.x*r.y-r.x*i.y,h=n*e.x+o*e.y+l,d=n*t.x+o*t.y+l,h!==0&&d!==0&&ko(h,d)||(f=a*o-n*s)===0)))return m=Math.abs(f/2),{x:(x=s*l-o*c)<0?(x-m)/f:(x+m)/f,y:(x=n*c-a*l)<0?(x-m)/f:(x+m)/f}}function ko(e,t){return e*t>0}p(vd,"intersectLine"),p(ko,"sameSign");var Om=vd;function Ld(e,t,r){let i=e.x,a=e.y,n=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let c=i-e.width/2-s,l=a-e.height/2-o;for(let h=0;h<t.length;h++){let d=t[h],u=t[h<t.length-1?h+1:0],g=Om(e,r,{x:c+d.x,y:l+d.y},{x:c+u.x,y:l+u.y});g&&n.push(g)}return n.length?(n.length>1&&n.sort(function(h,d){let u=h.x-r.x,g=h.y-r.y,f=Math.sqrt(u*u+g*g),m=d.x-r.x,x=d.y-r.y,y=Math.sqrt(m*m+x*x);return f<y?-1:f===y?0:1}),n[0]):e}p(Ld,"intersectPolygon");var W={node:Em,circle:$m,ellipse:Td,polygon:Ld,rect:br};function Md(e,t){const{labelStyles:r}=U(t);t.labelStyle=r;const i=Q(t);let a=i;i||(a="anchor");const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),{cssStyles:s}=t,o=j(n),c=Y(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=o.circle(0,0,2,c),h=n.insert(()=>l,":first-child");return h.attr("class","anchor").attr("style",Wt(s)),V(t,h),t.intersect=function(d){return $.info("Circle intersect",t,1,d),W.circle(t,1,d)},n}function Co(e,t,r,i,a,n,s){const o=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),h=(r-e)/2/a,d=(i-t)/2/n,u=Math.sqrt(h**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-u**2),f=o+g*n*Math.sin(l)*(s?-1:1),m=c-g*a*Math.cos(l)*(s?-1:1),x=Math.atan2((t-m)/n,(e-f)/a);let y=Math.atan2((i-m)/n,(r-f)/a)-x;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const b=[];for(let w=0;w<20;w++){const M=x+w/19*y,v=f+a*Math.cos(M),k=m+n*Math.sin(M);b.push({x:v,y:k})}return b}async function _d(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=n.width+t.padding+20,o=n.height+t.padding,c=o/2,l=c/(2.5+o/50),{cssStyles:h}=t,d=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...Co(-s/2,-o/2,-s/2,o/2,l,c,!1),{x:s/2,y:o/2},...Co(s/2,o/2,s/2,-o/2,l,c,!0)],u=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=ct(d),m=u.path(f,g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${l/2}, 0)`),V(t,x),t.intersect=function(y){return W.polygon(t,d,y)},a}function Te(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+")")}async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=n.height+t.padding,o=n.width+t.padding+12,c=-s,l=[{x:12,y:c},{x:o,y:c},{x:o,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const u=j(a),g=Y(t,{}),f=ct(l),m=u.path(f,g);h=a.insert(()=>m,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&h.attr("style",d)}else h=Te(a,o,s,l);return i&&h.attr("style",i),V(t,h),t.intersect=function(u){return W.polygon(t,l,u)},a}function Fd(e,t){const{nodeStyles:r}=U(t);t.label="";const i=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(28,t.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],o=j(i),c=Y(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=ct(s),h=o.path(l,c),d=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(u){return W.polygon(t,s,u)},i}async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:s}=await et(e,t,Q(t)),o=n.width/2+s;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=Y(t,{}),u=h.circle(0,0,2*o,d);c=a.insert(()=>u,":first-child"),c.attr("class","basic label-container").attr("style",Wt(l))}else c=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",o).attr("cx",0).attr("cy",0);return V(t,c),t.intersect=function(h){return $.info("Circle intersect",t,o,h),W.circle(t,o,h)},a}function $d(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*e;return`M ${-i/2*t},${i/2*r} L ${i/2*t},${-i/2*r}
|
180
|
+
M ${i/2*t},${i/2*r} L ${-i/2*t},${-i/2*r}`}function Od(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),n=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:s}=t,o=j(a),c=Y(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=o.circle(0,0,2*n,c),h=$d(n),d=o.path(h,c),u=a.insert(()=>l,":first-child");return u.insert(()=>d),s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),V(t,u),t.intersect=function(g){return $.info("crossedCircle intersect",t,{radius:n,point:g}),W.circle(t,n,g)},a}function Be(e,t,r,i=100,a=0,n=180){const s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let l=0;l<i;l++){const h=o+l*c,d=e+r*Math.cos(h),u=t+r*Math.sin(h);s.push({x:-d,y:-u})}return s}async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=n.width+(t.padding??0),c=n.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...Be(o/2,-c/2,l,30,-90,0),{x:-o/2-l,y:l},...Be(o/2+2*l,-l,l,20,-180,-270),...Be(o/2+2*l,l,l,20,-90,-180),{x:-o/2-l,y:-c/2},...Be(o/2,c/2,l,20,0,90)],u=[{x:o/2,y:-c/2-l},{x:-o/2,y:-c/2-l},...Be(o/2,-c/2,l,20,-90,0),{x:-o/2-l,y:-l},...Be(o/2+.1*o,-l,l,20,-180,-270),...Be(o/2+.1*o,l,l,20,-90,-180),{x:-o/2-l,y:c/2},...Be(o/2,c/2,l,20,0,90),{x:-o/2,y:c/2+l},{x:o/2,y:c/2+l}],g=j(a),f=Y(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=ct(d).replace("Z",""),x=g.path(m,f),y=ct(u),b=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>b,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${l}, 0)`),s.attr("transform",`translate(${-o/2+l-(n.x-(n.left??0))},${-c/2+(t.padding??0)/2-(n.y-(n.top??0))})`),V(t,w),t.intersect=function(M){return W.polygon(t,u,M)},a}function ve(e,t,r,i=100,a=0,n=180){const s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let l=0;l<i;l++){const h=o+l*c,d=e+r*Math.cos(h),u=t+r*Math.sin(h);s.push({x:d,y:u})}return s}async function Id(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=n.width+(t.padding??0),c=n.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...ve(o/2,-c/2,l,20,-90,0),{x:o/2+l,y:-l},...ve(o/2+2*l,-l,l,20,-180,-270),...ve(o/2+2*l,l,l,20,-90,-180),{x:o/2+l,y:c/2},...ve(o/2,c/2,l,20,0,90)],u=[{x:-o/2,y:-c/2-l},{x:o/2,y:-c/2-l},...ve(o/2,-c/2,l,20,-90,0),{x:o/2+l,y:-l},...ve(o/2+2*l,-l,l,20,-180,-270),...ve(o/2+2*l,l,l,20,-90,-180),{x:o/2+l,y:c/2},...ve(o/2,c/2,l,20,0,90),{x:o/2,y:c/2+l},{x:-o/2,y:c/2+l}],g=j(a),f=Y(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=ct(d).replace("Z",""),x=g.path(m,f),y=ct(u),b=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>b,":first-child").attr("stroke-opacity",0),w.insert(()=>x,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-l}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(n.x-(n.left??0))},${-c/2+(t.padding??0)/2-(n.y-(n.top??0))})`),V(t,w),t.intersect=function(M){return W.polygon(t,u,M)},a}function Ft(e,t,r,i=100,a=0,n=180){const s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let l=0;l<i;l++){const h=o+l*c,d=e+r*Math.cos(h),u=t+r*Math.sin(h);s.push({x:-d,y:-u})}return s}async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=n.width+(t.padding??0),c=n.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...Ft(o/2,-c/2,l,30,-90,0),{x:-o/2-l,y:l},...Ft(o/2+2*l,-l,l,20,-180,-270),...Ft(o/2+2*l,l,l,20,-90,-180),{x:-o/2-l,y:-c/2},...Ft(o/2,c/2,l,20,0,90)],u=[...Ft(-o/2+l+l/2,-c/2,l,20,-90,-180),{x:o/2-l/2,y:l},...Ft(-o/2-l/2,-l,l,20,0,90),...Ft(-o/2-l/2,l,l,20,-90,0),{x:o/2-l/2,y:-l},...Ft(-o/2+l+l/2,c/2,l,30,-180,-270)],g=[{x:o/2,y:-c/2-l},{x:-o/2,y:-c/2-l},...Ft(o/2,-c/2,l,20,-90,0),{x:-o/2-l,y:-l},...Ft(o/2+2*l,-l,l,20,-180,-270),...Ft(o/2+2*l,l,l,20,-90,-180),{x:-o/2-l,y:c/2},...Ft(o/2,c/2,l,20,0,90),{x:-o/2,y:c/2+l},{x:o/2-l-l/2,y:c/2+l},...Ft(-o/2+l+l/2,-c/2,l,20,-90,-180),{x:o/2-l/2,y:l},...Ft(-o/2-l/2,-l,l,20,0,90),...Ft(-o/2-l/2,l,l,20,-90,0),{x:o/2-l/2,y:-l},...Ft(-o/2+l+l/2,c/2,l,30,-180,-270)],f=j(a),m=Y(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ct(d).replace("Z",""),y=f.path(x,m),b=ct(u).replace("Z",""),w=f.path(b,m),M=ct(g),v=f.path(M,{...m}),k=a.insert("g",":first-child");return k.insert(()=>v,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>w,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${l-l/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(n.x-(n.left??0))},${-c/2+(t.padding??0)/2-(n.y-(n.top??0))})`),V(t,k),t.intersect=function(S){return W.polygon(t,g,S)},a}async function zd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(80,1.25*(n.width+2*(t.padding??0)),(t==null?void 0:t.width)??0),o=Math.max(20,n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=o/2,{cssStyles:l}=t,h=j(a),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=s-c,g=o/4,f=[{x:u,y:0},{x:g,y:0},{x:0,y:o/2},{x:g,y:o},{x:u,y:o},...yo(-u,-o/2,c,50,270,90)],m=ct(f),x=h.path(m,d),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(${-s/2}, ${-o/2})`),V(t,y),t.intersect=function(b){return W.polygon(t,f,b)},a}p(Md,"anchor"),p(Co,"generateArcPoints"),p(_d,"bowTieRect"),p(Te,"insertPolygonShape"),p(Ad,"card"),p(Fd,"choice"),p(Ed,"circle"),p($d,"createLine"),p(Od,"crossedCircle"),p(Be,"generateCirclePoints"),p(Dd,"curlyBraceLeft"),p(ve,"generateCirclePoints"),p(Id,"curlyBraceRight"),p(Ft,"generateCirclePoints"),p(Rd,"curlyBraces"),p(zd,"curvedTrapezoid");var Dm=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),Im=p((e,t,r,i,a,n)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),Rm=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+t.padding,t.width??0),c=o/2,l=c/(2.5+o/50),h=Math.max(n.height+l+t.padding,t.height??0);let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=j(a),f=Im(0,0,o,h,c,l),m=Rm(0,l,o,h,c,l),x=g.path(f,Y(t,{})),y=g.path(m,Y(t,{fill:"none"}));d=a.insert(()=>y,":first-child"),d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container"),u&&d.attr("style",u)}else{const g=Dm(0,0,o,h,c,l);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Wt(u)).attr("style",i)}return d.attr("label-offset-y",l),d.attr("transform",`translate(${-o/2}, ${-(h/2+l)})`),V(t,d),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(g){const f=W.rect(t,g),m=f.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(f.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-m*m/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),f.y+=x}return f},a}async function qd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=n.width+t.padding,c=n.height+t.padding,l=.2*c,h=-o/2,d=-c/2-l/2,{cssStyles:u}=t,g=j(a),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:h,y:d+l},{x:-h,y:d+l},{x:-h,y:-d},{x:h,y:-d},{x:h,y:d},{x:-h,y:d},{x:-h,y:d+l}],x=g.polygon(m.map(b=>[b.x,b.y]),f),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+l+(t.padding??0)/2-(n.y-(n.top??0))})`),V(t,y),t.intersect=function(b){return W.rect(t,b)},a}async function Nd(e,t){var d,u;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:s}=await et(e,t,Q(t)),o=n.width/2+s+5,c=n.width/2+s;let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const g=j(a),f=Y(t,{roughness:.2,strokeWidth:2.5}),m=Y(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,2*o,f),y=g.circle(0,0,2*c,m);l=a.insert("g",":first-child"),l.attr("class",Wt(t.cssClasses)).attr("style",Wt(h)),(d=l.node())==null||d.appendChild(x),(u=l.node())==null||u.appendChild(y)}else{l=a.insert("g",":first-child");const g=l.insert("circle",":first-child"),f=l.insert("circle");l.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",o).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return V(t,l),t.intersect=function(g){return $.info("DoubleCircle intersect",t,o,g),W.circle(t,o,g)},a}function Wd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.label="",t.labelStyle=i;const n=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=j(n),{nodeBorder:c}=r,l=Y(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=o.circle(0,0,14,l),d=n.insert(()=>h,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),V(t,d),t.intersect=function(u){return $.info("filledCircle intersect",t,{radius:7,point:u}),W.circle(t,7,u)},n}async function jd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=n.width+(t.padding??0),c=o+n.height,l=o+n.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:d}=t,u=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=ct(h),m=u.path(f,g),x=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=o,t.height=c,V(t,x),s.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(y){return $.info("Triangle intersect",t,h,y),W.polygon(t,h,y)},a}function Hd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:n}=U(t);t.label="";const s=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,d=-1*l/2,u=j(s),g=Y(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=u.rectangle(h,d,c,l,g),m=s.insert(()=>f,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),V(t,m);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(y){return W.rect(t,y)},s}async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(80,n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(50,n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=o/2,{cssStyles:l}=t,h=j(a),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=[{x:-s/2,y:-o/2},{x:s/2-c,y:-o/2},...yo(-s/2+c,0,c,50,90,270),{x:s/2-c,y:o/2},{x:-s/2,y:o/2}],g=ct(u),f=h.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),V(t,m),t.intersect=function(x){return $.info("Pill intersect",t,{radius:c,point:x}),W.polygon(t,u,x)},a}p(Pd,"cylinder"),p(qd,"dividedRectangle"),p(Nd,"doublecircle"),p(Wd,"filledCircle"),p(jd,"flippedTriangle"),p(Hd,"forkJoin"),p(Yd,"halfRoundedRectangle");var zm=p((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 Ud(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=n.height+t.padding,o=s/4,c=n.width+2*o+t.padding,l=[{x:o,y:0},{x:c-o,y:0},{x:c,y:-s/2},{x:c-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const u=j(a),g=Y(t,{}),f=zm(0,0,c,s,o),m=u.path(f,g);h=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),d&&h.attr("style",d)}else h=Te(a,c,s,l);return i&&h.attr("style",i),t.width=c,t.height=s,V(t,h),t.intersect=function(u){return W.polygon(t,l,u)},a}async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,Q(t)),n=Math.max(30,(t==null?void 0:t.width)??0),s=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,c=j(a),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],d=ct(h),u=c.path(d,l),g=a.insert(()=>u,":first-child");return g.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-n/2}, ${-s/2})`),V(t,g),t.intersect=function(f){return $.info("Pill intersect",t,{points:h}),W.polygon(t,h,f)},a}async function Gd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(n,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:l,bbox:h,label:d}=await et(e,t,"icon-shape default"),u=t.pos==="t",g=o,f=o,{nodeBorder:m}=r,{stylesMap:x}=Je(t),y=-f/2,b=-g/2,w=t.label?8:0,M=j(l),v=Y(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=M.rectangle(y,b,f,g,v),S=Math.max(f,h.width),I=g+h.height+w,D=M.rectangle(-S/2,-I/2,S,I,{...v,fill:"transparent",stroke:"none"}),R=l.insert(()=>k,":first-child"),z=l.insert(()=>D);if(t.icon){const A=l.append("g");A.html(`<g>${await sr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=A.node().getBBox(),L=B.width,F=B.height,_=B.x,E=B.y;A.attr("transform",`translate(${-L/2-_},${u?h.height/2+w/2-F/2-E:-h.height/2-w/2-F/2-E})`),A.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-I/2:I/2-h.height})`),R.attr("transform",`translate(0,${u?h.height/2+w/2:-h.height/2-w/2})`),V(t,z),t.intersect=function(A){if($.info("iconSquare intersect",t,A),!t.label)return W.rect(t,A);const B=t.x??0,L=t.y??0,F=t.height??0;let _=[];return _=u?[{x:B-h.width/2,y:L-F/2},{x:B+h.width/2,y:L-F/2},{x:B+h.width/2,y:L-F/2+h.height+w},{x:B+f/2,y:L-F/2+h.height+w},{x:B+f/2,y:L+F/2},{x:B-f/2,y:L+F/2},{x:B-f/2,y:L-F/2+h.height+w},{x:B-h.width/2,y:L-F/2+h.height+w}]:[{x:B-f/2,y:L-F/2},{x:B+f/2,y:L-F/2},{x:B+f/2,y:L-F/2+g},{x:B+h.width/2,y:L-F/2+g},{x:B+h.width/2/2,y:L+F/2},{x:B-h.width/2,y:L+F/2},{x:B-h.width/2,y:L-F/2+g},{x:B-f/2,y:L-F/2+g}],W.polygon(t,_,A)},l}async function Xd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(n,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:l,bbox:h,label:d}=await et(e,t,"icon-shape default"),u=t.label?8:0,g=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:x}=Je(t),y=j(l),b=Y(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=x.get("fill");b.stroke=w??m;const M=l.append("g");t.icon&&M.html(`<g>${await sr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),k=v.width,S=v.height,I=v.x,D=v.y,R=Math.max(k,S)*Math.SQRT2+40,z=y.circle(0,0,R,b),A=Math.max(R,h.width),B=R+h.height+u,L=y.rectangle(-A/2,-B/2,A,B,{...b,fill:"transparent",stroke:"none"}),F=l.insert(()=>z,":first-child"),_=l.insert(()=>L);return M.attr("transform",`translate(${-k/2-I},${g?h.height/2+u/2-S/2-D:-h.height/2-u/2-S/2-D})`),M.attr("style",`color: ${x.get("stroke")??f};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-B/2:B/2-h.height})`),F.attr("transform",`translate(0,${g?h.height/2+u/2:-h.height/2-u/2})`),V(t,_),t.intersect=function(E){return $.info("iconSquare intersect",t,E),W.rect(t,E)},l}async function Zd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(n,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:u}=await et(e,t,"icon-shape default"),g=t.pos==="t",f=o+2*d,m=o+2*d,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Je(t),w=-m/2,M=-f/2,v=t.label?8:0,k=j(l),S=Y(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const I=b.get("fill");S.stroke=I??y;const D=k.path(ue(w,M,m,f,5),S),R=Math.max(m,h.width),z=f+h.height+v,A=k.rectangle(-R/2,-z/2,R,z,{...S,fill:"transparent",stroke:"none"}),B=l.insert(()=>D,":first-child").attr("class","icon-shape2"),L=l.insert(()=>A);if(t.icon){const F=l.append("g");F.html(`<g>${await sr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const _=F.node().getBBox(),E=_.width,O=_.height,K=_.x,it=_.y;F.attr("transform",`translate(${-E/2-K},${g?h.height/2+v/2-O/2-it:-h.height/2-v/2-O/2-it})`),F.attr("style",`color: ${b.get("stroke")??x};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-z/2:z/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+v/2:-h.height/2-v/2})`),V(t,L),t.intersect=function(F){if($.info("iconSquare intersect",t,F),!t.label)return W.rect(t,F);const _=t.x??0,E=t.y??0,O=t.height??0;let K=[];return K=g?[{x:_-h.width/2,y:E-O/2},{x:_+h.width/2,y:E-O/2},{x:_+h.width/2,y:E-O/2+h.height+v},{x:_+m/2,y:E-O/2+h.height+v},{x:_+m/2,y:E+O/2},{x:_-m/2,y:E+O/2},{x:_-m/2,y:E-O/2+h.height+v},{x:_-h.width/2,y:E-O/2+h.height+v}]:[{x:_-m/2,y:E-O/2},{x:_+m/2,y:E-O/2},{x:_+m/2,y:E-O/2+f},{x:_+h.width/2,y:E-O/2+f},{x:_+h.width/2/2,y:E+O/2},{x:_-h.width/2,y:E+O/2},{x:_-h.width/2,y:E-O/2+f},{x:_-m/2,y:E-O/2+f}],W.polygon(t,K,F)},l}async function Qd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const n=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(n,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:u}=await et(e,t,"icon-shape default"),g=t.pos==="t",f=o+2*d,m=o+2*d,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Je(t),w=-m/2,M=-f/2,v=t.label?8:0,k=j(l),S=Y(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const I=b.get("fill");S.stroke=I??y;const D=k.path(ue(w,M,m,f,.1),S),R=Math.max(m,h.width),z=f+h.height+v,A=k.rectangle(-R/2,-z/2,R,z,{...S,fill:"transparent",stroke:"none"}),B=l.insert(()=>D,":first-child"),L=l.insert(()=>A);if(t.icon){const F=l.append("g");F.html(`<g>${await sr(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const _=F.node().getBBox(),E=_.width,O=_.height,K=_.x,it=_.y;F.attr("transform",`translate(${-E/2-K},${g?h.height/2+v/2-O/2-it:-h.height/2-v/2-O/2-it})`),F.attr("style",`color: ${b.get("stroke")??x};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-z/2:z/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+v/2:-h.height/2-v/2})`),V(t,L),t.intersect=function(F){if($.info("iconSquare intersect",t,F),!t.label)return W.rect(t,F);const _=t.x??0,E=t.y??0,O=t.height??0;let K=[];return K=g?[{x:_-h.width/2,y:E-O/2},{x:_+h.width/2,y:E-O/2},{x:_+h.width/2,y:E-O/2+h.height+v},{x:_+m/2,y:E-O/2+h.height+v},{x:_+m/2,y:E+O/2},{x:_-m/2,y:E+O/2},{x:_-m/2,y:E-O/2+h.height+v},{x:_-h.width/2,y:E-O/2+h.height+v}]:[{x:_-m/2,y:E-O/2},{x:_+m/2,y:E-O/2},{x:_+m/2,y:E-O/2+f},{x:_+h.width/2,y:E-O/2+f},{x:_+h.width/2/2,y:E+O/2},{x:_-h.width/2,y:E+O/2},{x:_-h.width/2,y:E-O/2+f},{x:_-m/2,y:E-O/2+f}],W.polygon(t,K,F)},l}async function Jd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/n;const{labelStyles:s}=U(t);t.labelStyle=s;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??a),l=t.constraint==="on"&&(t!=null&&t.assetHeight)?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??n;t.width=Math.max(l,o??0);const{shapeSvg:d,bbox:u,label:g}=await et(e,t,"image-shape default"),f=t.pos==="t",m=-l/2,x=-h/2,y=t.label?8:0,b=j(d),w=Y(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const M=b.rectangle(m,x,l,h,w),v=Math.max(l,u.width),k=h+u.height+y,S=b.rectangle(-v/2,-k/2,v,k,{...w,fill:"none",stroke:"none"}),I=d.insert(()=>M,":first-child"),D=d.insert(()=>S);if(t.img){const R=d.append("image");R.attr("href",t.img),R.attr("width",l),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-l/2},${f?k/2-h:-k/2})`)}return g.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-h/2-u.height/2-y/2:h/2-u.height/2+y/2})`),I.attr("transform",`translate(0,${f?u.height/2+y/2:-u.height/2-y/2})`),V(t,D),t.intersect=function(R){if($.info("iconSquare intersect",t,R),!t.label)return W.rect(t,R);const z=t.x??0,A=t.y??0,B=t.height??0;let L=[];return L=f?[{x:z-u.width/2,y:A-B/2},{x:z+u.width/2,y:A-B/2},{x:z+u.width/2,y:A-B/2+u.height+y},{x:z+l/2,y:A-B/2+u.height+y},{x:z+l/2,y:A+B/2},{x:z-l/2,y:A+B/2},{x:z-l/2,y:A-B/2+u.height+y},{x:z-u.width/2,y:A-B/2+u.height+y}]:[{x:z-l/2,y:A-B/2},{x:z+l/2,y:A-B/2},{x:z+l/2,y:A-B/2+h},{x:z+u.width/2,y:A-B/2+h},{x:z+u.width/2/2,y:A+B/2},{x:z-u.width/2,y:A+B/2},{x:z-u.width/2,y:A-B/2+h},{x:z-l/2,y:A-B/2+h}],W.polygon(t,L,R)},d}async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),u=Y(t,{}),g=ct(c),f=d.path(g,u);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&l.attr("style",h)}else l=Te(a,s,o,c);return i&&l.attr("style",i),t.width=s,t.height=o,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}async function fi(e,t,r){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{shapeSvg:n,bbox:s}=await et(e,t,Q(t)),o=Math.max(s.width+2*r.labelPaddingX,(t==null?void 0:t.width)||0),c=Math.max(s.height+2*r.labelPaddingY,(t==null?void 0:t.height)||0),l=-o/2,h=-c/2;let d,{rx:u,ry:g}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(u=r.rx,g=r.ry),t.look==="handDrawn"){const m=j(n),x=Y(t,{}),y=u||g?m.path(ue(l,h,o,c,u||0),x):m.rectangle(l,h,o,c,x);d=n.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",Wt(f))}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",Wt(u)).attr("ry",Wt(g)).attr("x",l).attr("y",h).attr("width",o).attr("height",c);return V(t,d),t.intersect=function(m){return W.rect(t,m)},n}async function tu(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),V(t,n),t.intersect=function(s){return W.rect(t,s)},r}async function eu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),u=Y(t,{}),g=ct(c),f=d.path(g,u);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&l.attr("style",h)}else l=Te(a,s,o,c);return i&&l.attr("style",i),t.width=s,t.height=o,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}async function ru(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),u=Y(t,{}),g=ct(c),f=d.path(g,u);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&l.attr("style",h)}else l=Te(a,s,o,c);return i&&l.attr("style",i),t.width=s,t.height=o,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}function iu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",Q(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,s=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],l=j(a),h=Y(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=ct(c),u=l.path(d,h),g=a.insert(()=>u,":first-child");return n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),V(t,g),t.intersect=function(f){return $.info("lightningBolt intersect",t,f),W.polygon(t,c,f)},a}p(Ud,"hexagon"),p(Vd,"hourglass"),p(Gd,"icon"),p(Xd,"iconCircle"),p(Zd,"iconRounded"),p(Qd,"iconSquare"),p(Jd,"imageSquare"),p(Kd,"inv_trapezoid"),p(fi,"drawRect"),p(tu,"labelRect"),p(eu,"lean_left"),p(ru,"lean_right"),p(iu,"lightningBolt");var Pm=p((e,t,r,i,a,n,s)=>[`M${e},${t+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+n+s}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),qm=p((e,t,r,i,a,n,s)=>[`M${e},${t+n}`,`M${e+r},${t+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+n+s}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Nm=p((e,t,r,i,a,n)=>[`M${e-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function au(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+(t.padding??0),t.width??0),c=o/2,l=c/(2.5+o/50),h=Math.max(n.height+l+(t.padding??0),t.height??0),d=.1*h;let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=j(a),m=qm(0,0,o,h,c,l,d),x=Nm(0,l,o,h,c,l),y=Y(t,{}),b=f.path(m,y),w=f.path(x,y);a.insert(()=>w,":first-child").attr("class","line"),u=a.insert(()=>b,":first-child"),u.attr("class","basic label-container"),g&&u.attr("style",g)}else{const f=Pm(0,0,o,h,c,l,d);u=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Wt(g)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-o/2}, ${-(h/2+l)})`),V(t,u),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+l-(n.y-(n.top??0))})`),t.intersect=function(f){const m=W.rect(t,f),x=m.x-(t.x??0);if(c!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-x*x/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,f.y-(t.y??0)>0&&(y=-y),m.y+=y}return m},a}async function nu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:d}=t,u=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Ie(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,l,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=u.polygon(f.map(y=>[y.x,y.y]),g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(n.x-(n.left??0))},${-c/2+(t.padding??0)-l/2-(n.y-(n.top??0))})`),V(t,x),t.intersect=function(y){return W.polygon(t,f,y)},a}async function ou(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-o/2,h=-c/2,{cssStyles:d}=t,u=j(a),g=Y(t,{}),f=[{x:l-5,y:h+5},{x:l-5,y:h+c+5},{x:l+o-5,y:h+c+5},{x:l+o-5,y:h+c},{x:l+o,y:h+c},{x:l+o,y:h+c-5},{x:l+o+5,y:h+c-5},{x:l+o+5,y:h-5},{x:l+5,y:h-5},{x:l+5,y:h},{x:l,y:h},{x:l,y:h+5}],m=[{x:l,y:h+5},{x:l+o-5,y:h+5},{x:l+o-5,y:h+c},{x:l+o,y:h+c},{x:l+o,y:h},{x:l,y:h}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ct(f),y=u.path(x,g),b=ct(m),w=u.path(b,{...g,fill:"none"}),M=a.insert(()=>w,":first-child");return M.insert(()=>y,":first-child"),M.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),s.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),V(t,M),t.intersect=function(v){return W.polygon(t,f,v)},a}async function su(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,d=-o/2,u=-h/2,{cssStyles:g}=t,f=Ie(d-5,u+h+5,d+o-5,u+h+5,l,.8),m=f==null?void 0:f[f.length-1],x=[{x:d-5,y:u+5},{x:d-5,y:u+h+5},...f,{x:d+o-5,y:m.y-5},{x:d+o,y:m.y-5},{x:d+o,y:m.y-10},{x:d+o+5,y:m.y-10},{x:d+o+5,y:u-5},{x:d+5,y:u-5},{x:d+5,y:u},{x:d,y:u},{x:d,y:u+5}],y=[{x:d,y:u+5},{x:d+o-5,y:u+5},{x:d+o-5,y:m.y-5},{x:d+o,y:m.y-5},{x:d+o,y:u},{x:d,y:u}],b=j(a),w=Y(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const M=ct(x),v=b.path(M,w),k=ct(y),S=b.path(k,w),I=a.insert(()=>v,":first-child");return I.insert(()=>S),I.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-l/2-(n.y-(n.top??0))})`),V(t,I),t.intersect=function(D){return W.polygon(t,x,D)},a}async function lu(e,t,{config:{themeVariables:r}}){var y;const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i,t.useHtmlLabels||((y=It().flowchart)==null?void 0:y.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:n,bbox:s,label:o}=await et(e,t,Q(t)),c=Math.max(s.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(s.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-c/2,d=-l/2,{cssStyles:u}=t,g=j(n),f=Y(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=g.rectangle(h,d,c,l,f),x=n.insert(()=>m,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),V(t,x),t.intersect=function(b){return W.rect(t,b)},n}p(au,"linedCylinder"),p(nu,"linedWaveEdgedRect"),p(ou,"multiRect"),p(su,"multiWaveEdgedRectangle"),p(lu,"note");var Wm=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function hu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=n.width+t.padding+(n.height+t.padding),o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=Y(t,{}),u=Wm(0,0,s),g=h.path(u,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`),l&&c.attr("style",l)}else c=Te(a,s,s,o);return i&&c.attr("style",i),V(t,c),t.intersect=function(h){return $.debug(`APA12 Intersect called SPLIT
|
181
|
+
point:`,h,`
|
182
|
+
node:
|
183
|
+
`,t,`
|
184
|
+
res:`,W.polygon(t,o,h)),W.polygon(t,o,h)},a}async function cu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=-Math.max(n.width+(t.padding??0),(t==null?void 0:t.width)??0)/2,c=-Math.max(n.height+(t.padding??0),(t==null?void 0:t.height)??0)/2,l=c/2,h=[{x:o+l,y:c},{x:o,y:0},{x:o+l,y:-c},{x:-o,y:-c},{x:-o,y:c}],{cssStyles:d}=t,u=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=ct(h),m=u.path(f,g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-l/2},0)`),s.attr("transform",`translate(${-l/2-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),V(t,x),t.intersect=function(y){return W.polygon(t,h,y)},a}async function du(e,t){var I,D;const{labelStyles:r,nodeStyles:i}=U(t);let a;t.labelStyle=r,a=t.cssClasses?"node "+t.cssClasses:"node default";const n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=n.insert("g"),o=n.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=o.node().appendChild(await Re(l,t.labelStyle,!0,!0));let d={width:0,height:0};if(St((D=(I=ut())==null?void 0:I.flowchart)==null?void 0:D.htmlLabels)){const R=h.children[0],z=dt(h);d=R.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}$.info("Text 2",c);const u=c||[],g=h.getBBox(),f=o.node().appendChild(await Re(u.join?u.join("<br/>"):u,t.labelStyle,!0,!0)),m=f.children[0],x=dt(f);d=m.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);const y=(t.padding||0)/2;dt(f).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),dt(h).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")");const b=d.width+(t.padding||0),w=d.height+(t.padding||0),M=-d.width/2-y,v=-d.height/2-y;let k,S;if(t.look==="handDrawn"){const R=j(n),z=Y(t,{}),A=R.path(ue(M,v,b,w,t.rx||0),z),B=R.line(-d.width/2-y,-d.height/2-y+g.height+y,d.width/2+y,-d.height/2-y+g.height+y,z);S=n.insert(()=>($.debug("Rough node insert CXC",A),B),":first-child"),k=n.insert(()=>($.debug("Rough node insert CXC",A),A),":first-child")}else k=s.insert("rect",":first-child"),S=s.insert("line"),k.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),S.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y);return V(t,k),t.intersect=function(R){return W.rect(t,R)},n}async function uu(e,t){return fi(e,t,{rx:5,ry:5,labelPaddingX:1*((t==null?void 0:t.padding)||0),labelPaddingY:1*((t==null?void 0:t.padding)||0)})}async function pu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=(t==null?void 0:t.padding)??0,c=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-n.width/2-o,d=-n.height/2-o,{cssStyles:u}=t,g=j(a),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:h,y:d},{x:h+c+8,y:d},{x:h+c+8,y:d+l},{x:h-8,y:d+l},{x:h-8,y:d},{x:h,y:d},{x:h,y:d+l}],x=g.polygon(m.map(b=>[b.x,b.y]),f),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container").attr("style",Wt(u)),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-c/2+4+(t.padding??0)-(n.x-(n.left??0))},${-l/2+(t.padding??0)-(n.y-(n.top??0))})`),V(t,y),t.intersect=function(b){return W.rect(t,b)},a}async function gu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-o/2,h=-c/2,{cssStyles:d}=t,u=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:l,y:h},{x:l,y:h+c},{x:l+o,y:h+c},{x:l+o,y:h-c/2}],m=ct(f),x=u.path(m,g),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),V(t,y),t.intersect=function(b){return W.polygon(t,f,b)},a}async function fu(e,t){return fi(e,t,{rx:0,ry:0,labelPaddingX:2*((t==null?void 0:t.padding)||0),labelPaddingY:1*((t==null?void 0:t.padding)||0)})}async function mu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=n.height+t.padding,o=n.width+s/4+t.padding;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=Y(t,{}),u=ue(-o/2,-s/2,o,s,s/2),g=h.path(u,d);c=a.insert(()=>g,":first-child"),c.attr("class","basic label-container").attr("style",Wt(l))}else c=a.insert("rect",":first-child"),c.attr("class","basic label-container").attr("style",i).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return V(t,c),t.intersect=function(h){return W.rect(t,h)},a}async function yu(e,t){return fi(e,t,{rx:5,ry:5})}function xu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{cssStyles:n}=t,{lineColor:s,stateBorder:o,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j(l),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=h.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),g=o??c,f=h.circle(0,0,5,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>u,":first-child");return m.insert(()=>f),n&&m.selectAll("path").attr("style",n),a&&m.selectAll("path").attr("style",a),V(t,m),t.intersect=function(x){return W.circle(t,7,x)},l}function bu(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const s=j(a).circle(0,0,14,oc(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return V(t,n),t.intersect=function(s){return W.circle(t,7,s)},a}async function ku(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=((t==null?void 0:t.padding)||0)/2,o=n.width+t.padding,c=n.height+t.padding,l=-n.width/2-s,h=-n.height/2-s,d=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const u=j(a),g=Y(t,{}),f=u.rectangle(l-8,h,o+16,c,g),m=u.line(l,h,l,h+c,g),x=u.line(l+o,h,l+o,h+c,g);a.insert(()=>m,":first-child"),a.insert(()=>x,":first-child");const y=a.insert(()=>f,":first-child"),{cssStyles:b}=t;y.attr("class","basic label-container").attr("style",Wt(b)),V(t,y)}else{const u=Te(a,o,c,d);i&&u.attr("style",i),V(t,u)}return t.intersect=function(u){return W.polygon(t,d,u)},a}async function Cu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,l=-o/2,h=.2*o,d=.2*o,{cssStyles:u}=t,g=j(a),f=Y(t,{}),m=[{x:c-h/2,y:l},{x:c+s+h/2,y:l},{x:c+s+h/2,y:l+o},{x:c-h/2,y:l+o}],x=[{x:c+s-h/2,y:l+o},{x:c+s+h/2,y:l+o},{x:c+s+h/2,y:l+o-d}];t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=ct(m),b=g.path(y,f),w=ct(x),M=g.path(w,{...f,fillStyle:"solid"}),v=a.insert(()=>M,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),V(t,v),t.intersect=function(k){return W.polygon(t,m,k)},a}async function wu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=.2*o,d=.2*c,u=c+l,{cssStyles:g}=t,f=j(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:u/2},...Ie(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,l,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2}],y=-o/2+o/2*.1,b=-u/2-.4*d,w=[{x:y+o-h,y:1.4*(b+c)},{x:y+o,y:b+c-d},{x:y+o,y:.9*(b+c)},...Ie(y+o,1.3*(b+c),y+o-h,1.5*(b+c),.03*-c,.5)],M=ct(x),v=f.path(M,m),k=ct(w),S=f.path(k,{...m,fillStyle:"solid"}),I=a.insert(()=>S,":first-child");return I.insert(()=>v,":first-child"),I.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-l/2-(n.y-(n.top??0))})`),V(t,I),t.intersect=function(D){return W.polygon(t,x,D)},a}async function Su(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(n.width+t.padding,(t==null?void 0:t.width)||0),o=Math.max(n.height+t.padding,(t==null?void 0:t.height)||0),c=-s/2,l=-o/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",s).attr("height",o),V(t,h),t.intersect=function(d){return W.rect(t,d)},a}p(hu,"question"),p(cu,"rect_left_inv_arrow"),p(du,"rectWithTitle"),p(uu,"roundedRect"),p(pu,"shadedProcess"),p(gu,"slopedRect"),p(fu,"squareRect"),p(mu,"stadium"),p(yu,"state"),p(xu,"stateEnd"),p(bu,"stateStart"),p(ku,"subroutine"),p(Cu,"taggedRect"),p(wu,"taggedWaveEdgedRectangle"),p(Su,"text");var jm=p((e,t,r,i,a,n)=>`M${e},${t}
|
185
|
+
a${a},${n} 0,0,1 0,${-i}
|
186
|
+
l${r},0
|
187
|
+
a${a},${n} 0,0,1 0,${i}
|
188
|
+
M${r},${-i}
|
189
|
+
a${a},${n} 0,0,0 0,${i}
|
190
|
+
l${-r},0`,"createCylinderPathD"),Hm=p((e,t,r,i,a,n)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Ym=p((e,t,r,i,a,n)=>[`M${e+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Tu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s,halfPadding:o}=await et(e,t,Q(t)),c=t.look==="neo"?2*o:o,l=n.height+c,h=l/2,d=h/(2.5+l/50),u=n.width+d+c,{cssStyles:g}=t;let f;if(t.look==="handDrawn"){const m=j(a),x=Hm(0,0,u,l,d,h),y=Ym(0,0,u,l,d,h),b=m.path(x,Y(t,{})),w=m.path(y,Y(t,{fill:"none"}));f=a.insert(()=>w,":first-child"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),g&&f.attr("style",g)}else{const m=jm(0,0,u,l,d,h);f=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Wt(g)).attr("style",i),f.attr("class","basic label-container"),g&&f.selectAll("path").attr("style",g),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",d),f.attr("transform",`translate(${-u/2}, ${l/2} )`),s.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),V(t,f),t.intersect=function(m){const x=W.rect(t,m),y=x.y-(t.y??0);if(h!=0&&(Math.abs(y)<(t.height??0)/2||Math.abs(y)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-y*y/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),x.x+=b}return x},a}async function Bu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=n.width+t.padding,o=n.height+t.padding,c=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),u=Y(t,{}),g=ct(c),f=d.path(g,u);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&l.attr("style",h)}else l=Te(a,s,o,c);return i&&l.attr("style",i),t.width=s,t.height=o,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}async function vu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(60,n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(20,n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),{cssStyles:c}=t,l=j(a),h=Y(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-s/2*.8,y:-o/2},{x:s/2*.8,y:-o/2},{x:s/2,y:-o/2*.6},{x:s/2,y:o/2},{x:-s/2,y:o/2},{x:-s/2,y:-o/2*.6}],u=ct(d),g=l.path(u,h),f=a.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),V(t,f),t.intersect=function(m){return W.polygon(t,d,m)},a}async function Lu(e,t){var b;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=St((b=ut().flowchart)==null?void 0:b.htmlLabels),c=n.width+(t.padding??0),l=c+n.height,h=c+n.height,d=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:u}=t,g=j(a),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=ct(d),x=g.path(m,f),y=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=c,t.height=l,V(t,y),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${l/2-(n.height+(t.padding??0)/(o?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return $.info("Triangle intersect",t,d,w),W.polygon(t,d,w)},a}async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:d}=t,u=70-o,g=u>0?u/2:0,f=j(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...Ie(-o/2-g,h/2,o/2+g,h/2,l,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],y=ct(x),b=f.path(y,m),w=a.insert(()=>b,":first-child");return w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))},${-c/2+(t.padding??0)-l-(n.y-(n.top??0))})`),V(t,w),t.intersect=function(M){return W.polygon(t,x,M)},a}async function _u(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n}=await et(e,t,Q(t)),s=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),o=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=s/o;let l=s,h=o;l>h*c?h=l/c:l=h*c,l=Math.max(l,100),h=Math.max(h,50);const d=Math.min(.2*h,h/4),u=h+2*d,{cssStyles:g}=t,f=j(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-l/2,y:u/2},...Ie(-l/2,u/2,l/2,u/2,d,1),{x:l/2,y:-u/2},...Ie(l/2,-u/2,-l/2,-u/2,d,-1)],y=ct(x),b=f.path(y,m),w=a.insert(()=>b,":first-child");return w.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),V(t,w),t.intersect=function(M){return W.polygon(t,x,M)},a}async function Au(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:n,label:s}=await et(e,t,Q(t)),o=Math.max(n.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(n.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-o/2,h=-c/2,{cssStyles:d}=t,u=j(a),g=Y(t,{}),f=[{x:l-5,y:h-5},{x:l-5,y:h+c},{x:l+o,y:h+c},{x:l+o,y:h-5}],m=`M${l-5},${h-5} L${l+o},${h-5} L${l+o},${h+c} L${l-5},${h+c} L${l-5},${h-5}
|
191
|
+
M${l-5},${h} L${l+o},${h}
|
192
|
+
M${l},${h-5} L${l},${h+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=u.path(m,g),y=a.insert(()=>x,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-n.width/2+2.5-(n.x-(n.left??0))}, ${-n.height/2+2.5-(n.y-(n.top??0))})`),V(t,y),t.intersect=function(b){return W.polygon(t,f,b)},a}async function wo(e,t){var rt,wt,yt,Qt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Z}=It(),{background:ot}=Z,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ot}`]};await wo(e,lt)}const i=It();t.useHtmlLabels=i.htmlLabels;let a=((rt=i.er)==null?void 0:rt.diagramPadding)??10,n=((wt=i.er)==null?void 0:wt.entityPadding)??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:c}=U(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a};oe(t.label,i)+2*Z.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ot=await fi(e,t,Z);if(!St(i.htmlLabels)){const lt=ot.select("text"),kt=(yt=lt.node())==null?void 0:yt.getBBox();lt.attr("transform",`translate(${-kt.width/2}, 0)`)}return ot}i.htmlLabels||(a*=1.25,n*=1.25);let l=Q(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),d=await kr(h,t.label??"",i,0,0,["name"],o);d.height+=n;let u=0;const g=[],f=[];let m=0,x=0,y=0,b=0,w=!0,M=!0;for(const Z of r.attributes){const ot=await kr(h,Z.type,i,0,u,["attribute-type"],o);m=Math.max(m,ot.width+a);const lt=await kr(h,Z.name,i,0,u,["attribute-name"],o);x=Math.max(x,lt.width+a);const kt=await kr(h,Z.keys.join(),i,0,u,["attribute-keys"],o);y=Math.max(y,kt.width+a);const Ht=await kr(h,Z.comment,i,0,u,["attribute-comment"],o);b=Math.max(b,Ht.width+a);const Ot=Math.max(ot.height,lt.height,kt.height,Ht.height)+n;f.push({yOffset:u,rowHeight:Ot}),u+=Ot}let v=4;y<=a&&(w=!1,y=0,v--),b<=a&&(M=!1,b=0,v--);const k=h.node().getBBox();if(d.width+2*a-(m+x+y+b)>0){const Z=d.width+2*a-(m+x+y+b);m+=Z/v,x+=Z/v,y>0&&(y+=Z/v),b>0&&(b+=Z/v)}const S=m+x+y+b,I=j(h),D=Y(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let R=0;f.length>0&&(R=f.reduce((Z,ot)=>Z+((ot==null?void 0:ot.rowHeight)??0),0));const z=Math.max(k.width+2*a,(t==null?void 0:t.width)||0,S),A=Math.max((R??0)+d.height,(t==null?void 0:t.height)||0),B=-z/2,L=-A/2;h.selectAll("g:not(:first-child)").each((Z,ot,lt)=>{const kt=dt(lt[ot]),Ht=kt.attr("transform");let Ot=0,ki=0;if(Ht){const fe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ht);fe&&(Ot=parseFloat(fe[1]),ki=parseFloat(fe[2]),kt.attr("class").includes("attribute-name")?Ot+=m:kt.attr("class").includes("attribute-keys")?Ot+=m+x:kt.attr("class").includes("attribute-comment")&&(Ot+=m+x+y))}kt.attr("transform",`translate(${B+a/2+Ot}, ${ki+L+d.height+n/2})`)}),h.select(".name").attr("transform","translate("+-d.width/2+", "+(L+n/2)+")");const F=I.rectangle(B,L,z,A,D),_=h.insert(()=>F,":first-child").attr("style",s.join("")),{themeVariables:E}=It(),{rowEven:O,rowOdd:K,nodeBorder:it}=E;g.push(0);for(const[Z,ot]of f.entries()){const lt=(Z+1)%2==0&&ot.yOffset!==0,kt=I.rectangle(B,d.height+L+(ot==null?void 0:ot.yOffset),z,ot==null?void 0:ot.rowHeight,{...D,fill:lt?O:K,stroke:it});h.insert(()=>kt,"g.label").attr("style",s.join("")).attr("class","row-rect-"+(lt?"even":"odd"))}let st=I.line(B,d.height+L,z+B,d.height+L,D);h.insert(()=>st).attr("class","divider"),st=I.line(m+B,d.height+L,m+B,A+L,D),h.insert(()=>st).attr("class","divider"),w&&(st=I.line(m+x+B,d.height+L,m+x+B,A+L,D),h.insert(()=>st).attr("class","divider")),M&&(st=I.line(m+x+y+B,d.height+L,m+x+y+B,A+L,D),h.insert(()=>st).attr("class","divider"));for(const Z of g)st=I.line(B,d.height+L+Z,z+B,d.height+L+Z,D),h.insert(()=>st).attr("class","divider");if(V(t,_),c&&t.look!=="handDrawn"){const Z=c.split(";"),ot=(Qt=Z==null?void 0:Z.filter(lt=>lt.includes("stroke")))==null?void 0:Qt.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",ot??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(Z){return W.rect(t,Z)},h}async function kr(e,t,r,i=0,a=0,n=[],s=""){const o=e.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);t!==Ia(t)&&(t=(t=Ia(t)).replaceAll("<","<").replaceAll(">",">"));const c=o.node().appendChild(await xe(o,t,{width:oe(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let l=c.getBBox();if(St(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const d=dt(c);l=h.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}return l}async function Fu(e,t,r,i,a=r.class.padding??12){const n=i?0:3,s=e.insert("g").attr("class",Q(t)).attr("id",t.domId||t.id);let o=null,c=null,l=null,h=null,d=0,u=0,g=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await mi(o,{text:`\xAB${b}\xBB`},0),d=o.node().getBBox().height}c=s.insert("g").attr("class","label-group text"),await mi(c,t,0,["font-weight: bolder"]);const f=c.node().getBBox();u=f.height,l=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members)m+=await mi(l,b,m,[b.parseClassifier()])+n;g=l.node().getBBox().height,g<=0&&(g=a/2),h=s.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods)x+=await mi(h,b,x,[b.parseClassifier()])+n;let y=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-f.width/2}, ${d})`),y=s.node().getBBox(),l.attr("transform",`translate(0, ${d+u+2*a})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+(g?g+4*a:2*a)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function mi(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),n=It();let s="useHtmlLabels"in t?t.useHtmlLabels:St(n.htmlLabels)??!0,o="";o="text"in t?t.text:t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),qe(o)&&(s=!0);const c=await xe(a,ei(_e(o)),{width:oe(o,n)+50,classes:"markdown-node-label",useHtmlLabels:s},n);let l,h=1;if(s){const d=c.children[0],u=dt(c);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const g=d.getElementsByTagName("img");if(g){const f=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(m=>new Promise(x=>{function y(){var b;if(m.style.display="flex",m.style.flexDirection="column",f){const w=((b=n.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,M=5,v=parseInt(w,10)*M+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";x(m)}p(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}l=d.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}else{i.includes("font-weight: bolder")&&dt(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const d=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(d.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),l=c.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}async function Eu(e,t){var D,R;const r=ut(),i=r.class.padding??12,a=i,n=t.useHtmlLabels??St(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:c}=await Fu(e,t,r,n,a),{labelStyles:l,nodeStyles:h}=U(t);t.labelStyle=l,t.cssStyles=s.styles||"";const d=((D=s.styles)==null?void 0:D.join(";"))||h||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const u=s.members.length===0&&s.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),g=j(o),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=c.width;let x=c.height;s.members.length===0&&s.methods.length===0?x+=a:s.members.length>0&&s.methods.length===0&&(x+=2*a);const y=-m/2,b=-x/2,w=g.rectangle(y-i,b-i-(u?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,x+2*i+(u?2*i:s.members.length===0&&s.methods.length===0?-i:0),f),M=o.insert(()=>w,":first-child");M.attr("class","basic label-container");const v=M.node().getBBox();o.selectAll(".text").each((z,A,B)=>{var K;const L=dt(B[A]),F=L.attr("transform");let _=0;if(F){const it=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(F);it&&(_=parseFloat(it[2]))}let E=_+b+i-(u?i:s.members.length===0&&s.methods.length===0?-i/2:0);n||(E-=4);let O=y;(L.attr("class").includes("label-group")||L.attr("class").includes("annotation-group"))&&(O=-((K=L.node())==null?void 0:K.getBBox().width)/2||0,o.selectAll("text").each(function(it,st,rt){window.getComputedStyle(rt[st]).textAnchor==="middle"&&(O=0)})),L.attr("transform",`translate(${O}, ${E})`)});const k=o.select(".annotation-group").node().getBBox().height-(u?i/2:0)||0,S=o.select(".label-group").node().getBBox().height-(u?i/2:0)||0,I=o.select(".members-group").node().getBBox().height-(u?i/2:0)||0;if(s.members.length>0||s.methods.length>0||u){const z=g.line(v.x,k+S+b+i,v.x+v.width,k+S+b+i,f);o.insert(()=>z).attr("class","divider").attr("style",d)}if(u||s.members.length>0||s.methods.length>0){const z=g.line(v.x,k+S+I+b+2*a+i,v.x+v.width,k+S+I+b+i+2*a,f);o.insert(()=>z).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",d),M.select(":nth-child(2)").attr("style",d),o.selectAll(".divider").select("path").attr("style",d),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",d),!n){const z=RegExp(/color\s*:\s*([^;]*)/),A=z.exec(d);if(A){const B=A[0].replace("color","fill");o.selectAll("tspan").attr("style",B)}else if(l){const B=z.exec(l);if(B){const L=B[0].replace("color","fill");o.selectAll("tspan").attr("style",L)}}}return V(t,M),t.intersect=function(z){return W.rect(t,z)},o}async function $u(e,t){var M,v;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const a=t,n=t,s="verifyMethod"in t,o=Q(t),c=e.insert("g").attr("class",o).attr("id",t.domId??t.id);let l;l=s?await pe(c,`<<${a.type}>>`,0,t.labelStyle):await pe(c,"<<Element>>",0,t.labelStyle);let h=l;const d=await pe(c,a.name,h,t.labelStyle+"; font-weight: bold;");h+=d+20,s?(h+=await pe(c,a.requirementId?`id: ${a.requirementId}`:"",h,t.labelStyle),h+=await pe(c,a.text?`Text: ${a.text}`:"",h,t.labelStyle),h+=await pe(c,a.risk?`Risk: ${a.risk}`:"",h,t.labelStyle),await pe(c,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",h,t.labelStyle)):(h+=await pe(c,n.type?`Type: ${n.type}`:"",h,t.labelStyle),await pe(c,n.docRef?`Doc Ref: ${n.docRef}`:"",h,t.labelStyle));const u=(((M=c.node())==null?void 0:M.getBBox().width)??200)+20,g=(((v=c.node())==null?void 0:v.getBBox().height)??200)+20,f=-u/2,m=-g/2,x=j(c),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=x.rectangle(f,m,u,g,y),w=c.insert(()=>b,":first-child");if(w.attr("class","basic label-container").attr("style",i),c.selectAll(".label").each((k,S,I)=>{const D=dt(I[S]),R=D.attr("transform");let z=0,A=0;if(R){const F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);F&&(z=parseFloat(F[1]),A=parseFloat(F[2]))}const B=A-g/2;let L=f+10;S!==0&&S!==1||(L=z),D.attr("transform",`translate(${L}, ${B+20})`)}),h>l+d+20){const k=x.line(f,m+l+d+20,f+u,m+l+d+20,y);c.insert(()=>k).attr("style",i)}return V(t,w),t.intersect=function(k){return W.rect(t,k)},c}async function pe(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=ut(),s=n.htmlLabels??!0,o=await xe(a,ei(_e(t)),{width:oe(t,n)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},n);let c;if(s){const l=o.children[0],h=dt(o);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=o.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);c=o.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(Tu,"tiltedCylinder"),p(Bu,"trapezoid"),p(vu,"trapezoidalPentagon"),p(Lu,"triangle"),p(Mu,"waveEdgedRectangle"),p(_u,"waveRectangle"),p(Au,"windowPane"),p(wo,"erBox"),p(kr,"addText"),p(Fu,"textHelper"),p(mi,"addText"),p(Eu,"classBox"),p($u,"requirementBox"),p(pe,"addText");var Um=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Ou(e,t,{config:r}){var R,z;const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i||"";const n=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:o,label:c}=await et(e,t,Q(t)),l=t.padding||10;let h,d="";"ticket"in t&&t.ticket&&((R=r==null?void 0:r.kanban)!=null&&R.ticketBaseUrl)&&(d=(z=r==null?void 0:r.kanban)==null?void 0:z.ticketBaseUrl.replace("#TICKET#",t.ticket),h=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,f;({label:g,bbox:f}=h?await fa(h,"ticket"in t&&t.ticket||"",u):await fa(s,"ticket"in t&&t.ticket||"",u));const{label:m,bbox:x}=await fa(s,"assigned"in t&&t.assigned||"",u);t.width=n;const y=(t==null?void 0:t.width)||0,b=Math.max(f.height,x.height)/2,w=Math.max(o.height+20,(t==null?void 0:t.height)||0)+b,M=-y/2,v=-w/2;let k;c.attr("transform","translate("+(l-y/2)+", "+(-b-o.height/2)+")"),g.attr("transform","translate("+(l-y/2)+", "+(-b+o.height/2)+")"),m.attr("transform","translate("+(l+y/2-x.width-20)+", "+(-b+o.height/2)+")");const{rx:S,ry:I}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const A=j(s),B=Y(t,{}),L=S||I?A.path(ue(M,v,y,w,S||0),B):A.rectangle(M,v,y,w,B);k=s.insert(()=>L,":first-child"),k.attr("class","basic label-container").attr("style",D||null)}else{k=s.insert("rect",":first-child"),k.attr("class","basic label-container __APA__").attr("style",a).attr("rx",S??5).attr("ry",I??5).attr("x",M).attr("y",v).attr("width",y).attr("height",w);const A="priority"in t&&t.priority;if(A){const B=s.append("line"),L=M+2,F=v+Math.floor((S??0)/2),_=v+w-Math.floor((S??0)/2);B.attr("x1",L).attr("y1",F).attr("x2",L).attr("y2",_).attr("stroke-width","4").attr("stroke",Um(A))}}return V(t,k),t.height=w,t.intersect=function(A){return W.rect(t,A)},s}p(Ou,"kanbanItem");var Vm=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:fu},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:uu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:mu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ku},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Pd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ed},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:hu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ud},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ru},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:eu},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Bu},{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:Kd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Nd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Su},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ad},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:pu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:bu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:xu},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Hd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Vd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Dd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Id},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Rd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:iu},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Mu},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Yd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Tu},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:au},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:zd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:qd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Lu},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Au},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Wd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:vu},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:jd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:gu},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:su},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ou},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:_d},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Od},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:wu},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Cu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:_u},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:cu},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:nu}],Gm=p(()=>{const e={state:yu,choice:Fd,note:lu,rectWithTitle:du,labelRect:tu,iconSquare:Qd,iconCircle:Xd,icon:Gd,iconRounded:Zd,imageSquare:Jd,anchor:Md,kanbanItem:Ou,classBox:Eu,erBox:wo,requirementBox:$u},t=[...Object.entries(e),...Vm.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Du=Gm();Bs=function(e){return e in Du},p(Bs,"isValidShape");var ma=new Map;za=async function(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const n=t.shape?Du[t.shape]:void 0;if(!n)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),a=await n(i,t,r)}else a=await n(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),ma.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i},p(za,"insertNode");let Iu,Ru,So,yi,_t,Cr;Fg=p((e,t)=>{ma.set(t.id,e)},"setNodeElem"),Mg=p(()=>{ma.clear()},"clear"),Lg=p(e=>{const t=ma.get(e.id);$.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode"),Iu=p((e,t,r,i,a,n)=>{t.arrowTypeStart&&So(e,"start",t.arrowTypeStart,r,i,a,n),t.arrowTypeEnd&&So(e,"end",t.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),Ru={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},So=p((e,t,r,i,a,n,s)=>{var l;const o=Ru[r];if(!o)return void $.warn(`Unknown arrow type: ${r}`);const c=`${a}_${n}-${o.type}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const h=`${c}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(h)){const d=document.getElementById(c);if(d){const u=d.cloneNode(!0);u.id=h,u.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),o.fill&&g.setAttribute("fill",s)}),(l=d.parentNode)==null||l.appendChild(u)}}e.attr(`marker-${t}`,`url(${i}#${h})`)}else e.attr(`marker-${t}`,`url(${i}#${c})`)},"addEdgeMarker"),yi=new Map,_t=new Map,_g=p(()=>{yi.clear(),_t.clear()},"clear"),Cr=p(e=>e?e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),gs=p(async(e,t)=>{let r=St(ut().flowchart.htmlLabels);const i=await xe(e,t.label,{style:Cr(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});$.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label");n.node().appendChild(i);let s,o=i.getBBox();if(r){const c=i.children[0],l=dt(i);o=c.getBoundingClientRect(),l.attr("width",o.width),l.attr("height",o.height)}if(n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),yi.set(t.id,a),t.width=o.width,t.height=o.height,t.startLabelLeft){const c=await Re(t.startLabelLeft,Cr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),_t.get(t.id)||_t.set(t.id,{}),_t.get(t.id).startLeft=l,xi(s,t.startLabelLeft)}if(t.startLabelRight){const c=await Re(t.startLabelRight,Cr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=l.node().appendChild(c),h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),_t.get(t.id)||_t.set(t.id,{}),_t.get(t.id).startRight=l,xi(s,t.startLabelRight)}if(t.endLabelLeft){const c=await Re(t.endLabelLeft,Cr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(c),_t.get(t.id)||_t.set(t.id,{}),_t.get(t.id).endLeft=l,xi(s,t.endLabelLeft)}if(t.endLabelRight){const c=await Re(t.endLabelRight,Cr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(c),_t.get(t.id)||_t.set(t.id,{}),_t.get(t.id).endRight=l,xi(s,t.endLabelRight)}return i},"insertEdgeLabel");function xi(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}p(xi,"setTerminalWidth");let zu,Pu,To;ps=p((e,t)=>{$.debug("Moving label abc88 ",e.id,e.label,yi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:a}=Bi(i);if(e.label){const n=yi.get(e.id);let s=e.x,o=e.y;if(r){const c=ee.calcLabelPosition(r);$.debug("Moving label "+e.label+" from (",s,",",o,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,o=c.y)}n.attr("transform",`translate(${s}, ${o+a/2})`)}if(e.startLabelLeft){const n=_t.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const c=ee.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const n=_t.get(e.id).startRight;let s=e.x,o=e.y;if(r){const c=ee.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const n=_t.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const c=ee.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const n=_t.get(e.id).endRight;let s=e.x,o=e.y;if(r){const c=ee.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),zu=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),n=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return a>=s||n>=o},"outsideNode"),Pu=p((e,t,r)=>{$.debug(`intersection calc abc89:
|
193
|
+
outsidePoint: ${JSON.stringify(t)}
|
194
|
+
insidePoint : ${JSON.stringify(r)}
|
195
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,n=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-n:s+n;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*s>Math.abs(i-t.x)*c){let d=r.y<t.y?t.y-c-a:a-c-t.y;o=h*d/l;const u={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+l-d:r.y-l+d};return o===0&&(u.x=t.x,u.y=t.y),h===0&&(u.x=t.x),l===0&&(u.y=t.y),$.debug(`abc89 top/bottom calc, Q ${l}, q ${d}, R ${h}, r ${o}`,u),u}{o=r.x<t.x?t.x-s-i:i-s-t.x;let d=l*o/h,u=r.x<t.x?r.x+h-o:r.x-h+o,g=r.y<t.y?r.y+d:r.y-d;return $.debug(`sides calc abc89, Q ${l}, q ${d}, R ${h}, r ${o}`,{_x:u,_y:g}),o===0&&(u=t.x,g=t.y),h===0&&(u=t.x),l===0&&(g=t.y),{x:u,y:g}}},"intersection"),To=p((e,t)=>{$.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(n=>{if($.info("abc88 checking point",n,t),zu(t,n)||a)$.warn("abc88 outside",n,i),i=n,a||r.push(n);else{const s=Pu(t,i,n);$.debug("abc88 inside",n,i,s),$.debug("abc88 intersection",s,t);let o=!1;r.forEach(c=>{o=o||c.x===s.x&&c.y===s.y}),r.some(c=>c.x===s.x&&c.y===s.y)?$.warn("abc88 no intersect",s,r):r.push(s),a=!0}}),$.debug("returning points",r),r},"cutPathAtIntersect");function qu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],n=e[i],s=e[i+1];(a.x===n.x&&n.y===s.y&&Math.abs(n.x-s.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===s.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-s.y)>5)&&(t.push(n),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(qu,"extractCornerPoints");let Bo,Nu,Wu,ju,Hu,Yu,Uu,Vu,Gu,Xu,Zu,Qu,Ju,Ku,tp,ep,rp,ip,ap,np,wr,vo;Bo=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,n=r/Math.sqrt(i*i+a*a);return{x:t.x-n*i,y:t.y-n*a}},"findAdjacentPoint"),Nu=p(function(e){const{cornerPointPositions:t}=qu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],n=e[i+1],s=e[i],o=Bo(a,s,5),c=Bo(n,s,5),l=c.x-o.x,h=c.y-o.y;r.push(o);const d=2*Math.sqrt(2);let u={x:s.x,y:s.y};if(Math.abs(n.x-a.x)>10&&Math.abs(n.y-a.y)>=10){$.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));const g=5;u=s.x===o.x?{x:l<0?o.x-g+d:o.x+g-d,y:h<0?o.y-d:o.y+d}:{x:l<0?o.x-d:o.x+d,y:h<0?o.y-g+d:o.y+g-d}}else $.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(u,c)}else r.push(e[i]);return r},"fixCorners"),us=p(function(e,t,r,i,a,n,s){var D;const{handDrawnSeed:o}=ut();let c=t.points,l=!1;const h=a;var d=n;const u=[];for(const R in t.cssCompiledStyles)Na(R)||u.push(t.cssCompiledStyles[R]);d.intersect&&h.intersect&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),$.debug("Last point APA12",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),t.toCluster&&($.info("to cluster abc88",r.get(t.toCluster)),c=To(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&($.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=To(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let g=c.filter(R=>!Number.isNaN(R.y));g=Nu(g);let f=Jo;switch(f=Qo,t.curve){case"linear":f=Qo;break;case"basis":default:f=Jo;break;case"cardinal":f=Tg;break;case"bumpX":f=je;break;case"bumpY":f=As;break;case"catmullRom":f=Sg;break;case"monotoneX":f=wg;break;case"monotoneY":f=Cg;break;case"natural":f=kg;break;case"step":f=bg;break;case"stepAfter":f=xg;break;case"stepBefore":f=yg}const{x:m,y:x}=hs(t),y=Ny().x(m).y(x).curve(f);let b,w;switch(t.thickness){case"normal":default:b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible"}switch(t.pattern){case"solid":default:b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed"}let M=y(g);const v=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let k=v.find(R=>R==null?void 0:R.startsWith("stroke:"));if(t.look==="handDrawn"){const R=j(e);Object.assign([],g);const z=R.path(M,{roughness:.3,seed:o});b+=" transition",w=dt(z).select("path").attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((B,L)=>B+";"+L,""):"");let A=w.attr("d");w.attr("d",A),e.node().appendChild(w.node())}else{const R=u.join(";"),z=v?v.reduce((L,F)=>L+F+";",""):"";let A="";t.animate&&(A=" edge-animation-fast"),t.animation&&(A=" edge-animation-"+t.animation);const B=R?R+";"+z+";":z;w=e.append("path").attr("d",M).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(A??"")).attr("style",B),k=(D=B.match(/stroke:([^;]+)/))==null?void 0:D[1]}let S="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(S=Da(!0)),$.info("arrowTypeStart",t.arrowTypeStart),$.info("arrowTypeEnd",t.arrowTypeEnd),Iu(w,t,S,s,i,k);let I={};return l&&(I.updatedPath=c),I.originalPath=t.points,I},"insertEdge"),Wu=p((e,t,r,i)=>{t.forEach(a=>{ap[a](e,r,i)})},"insertMarkers"),ju=p((e,t,r)=>{$.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Hu=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Yu=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Uu=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Vu=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Gu=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Xu=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Zu=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Qu=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Ju=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Ku=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),tp=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),ep=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),rp=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
196
|
+
L20,10
|
197
|
+
M20,10
|
198
|
+
L0,20`)},"requirement_arrow"),ip=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ap={extension:ju,composition:Hu,aggregation:Yu,dependency:Uu,lollipop:Vu,point:Gu,circle:Xu,cross:Zu,barb:Qu,only_one:Ju,zero_or_one:Ku,one_or_more:tp,zero_or_more:ep,requirement_arrow:rp,requirement_contains:ip},ds=Wu,np={common:Ne,getConfig:It,insertCluster:Ko,insertEdge:us,insertEdgeLabel:gs,insertMarkers:ds,insertNode:za,interpolateToCurve:Nn,labelHelper:et,log:$,positionEdgeLabel:ps},wr={},vo=p(e=>{for(const t of e)wr[t.name]=t},"registerLayoutLoaders"),p(()=>{vo([{name:"dagre",loader:p(async()=>await mt(()=>import("./dagre-JOIXM2OF-DM7s7GTa.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")();let Lo,Mo,_o,Ao,ya;Dg=p(async(e,t)=>{if(!(e.layoutAlgorithm in wr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=wr[e.layoutAlgorithm];return(await r.loader()).render(e,t,np,{algorithm:r.algorithm})},"render"),Og=p((e="",{fallback:t="dagre"}={})=>{if(e in wr)return e;if(t in wr)return $.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"),Oa={name:"mermaid",version:"11.9.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.0.0",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},is=p(e=>{var i;const{securityLevel:t}=ut();let r=dt("body");if(t==="sandbox"){const a=dt(`#i${e}`),n=((i=a.node())==null?void 0:i.contentDocument)??document;r=dt(n.body)}return r.select(`#${e}`)},"selectSvgElement"),Lo="comm",Mo="rule",_o="decl",Ao=Math.abs,ya=String.fromCharCode;function op(e){return e.trim()}function xa(e,t,r){return e.replace(t,r)}function Xm(e,t,r){return e.indexOf(t,r)}function Sr(e,t){return 0|e.charCodeAt(t)}function Tr(e,t,r){return e.slice(t,r)}function ge(e){return e.length}function ba(e,t){return t.push(e),e}var ka=1,Br=1,sp=0,Kt=0,Tt=0,vr="";function Fo(e,t,r,i,a,n,s,o){return{value:e,root:t,parent:r,type:i,props:a,children:n,line:ka,column:Br,length:s,return:"",siblings:o}}function Zm(){return Tt=Kt>0?Sr(vr,--Kt):0,Br--,Tt===10&&(Br=1,ka--),Tt}function ne(){return Tt=Kt<sp?Sr(vr,Kt++):0,Br++,Tt===10&&(Br=1,ka++),Tt}function ze(){return Sr(vr,Kt)}function Ca(){return Kt}function wa(e,t){return Tr(vr,e,t)}function bi(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 Eo(e){return op(wa(Kt-1,$o(e===91?e+2:e===40?e+1:e)))}function Qm(e){for(;(Tt=ze())&&Tt<33;)ne();return bi(e)>2||bi(Tt)>3?"":" "}function Jm(e,t){for(;--t&&ne()&&!(Tt<48||Tt>102||Tt>57&&Tt<65||Tt>70&&Tt<97););return wa(e,Ca()+(t<6&&ze()==32&&ne()==32))}function $o(e){for(;ne();)switch(Tt){case e:return Kt;case 34:case 39:e!==34&&e!==39&&$o(Tt);break;case 40:e===41&&$o(e);break;case 92:ne()}return Kt}function Km(e,t){for(;ne()&&e+Tt!==57&&(e+Tt!==84||ze()!==47););return"/*"+wa(t,Kt-1)+"*"+ya(e===47?e:ne())}function t0(e){for(;!bi(ze());)ne();return wa(e,Kt)}function e0(e){return function(t){return vr="",t}(Sa("",null,null,null,[""],e=function(t){return ka=Br=1,sp=ge(vr=t),Kt=0,[]}(e),0,[0],e))}function Sa(e,t,r,i,a,n,s,o,c){for(var l=0,h=0,d=s,u=0,g=0,f=0,m=1,x=1,y=1,b=0,w="",M=a,v=n,k=i,S=w;x;)switch(f=b,b=ne()){case 40:if(f!=108&&Sr(S,d-1)==58){Xm(S+=xa(Eo(b),"&","&\f"),"&\f",Ao(l?o[l-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:S+=Eo(b);break;case 9:case 10:case 13:case 32:S+=Qm(f);break;case 92:S+=Jm(Ca()-1,7);continue;case 47:switch(ze()){case 42:case 47:ba(r0(Km(ne(),Ca()),t,r,c),c),bi(f||1)!=5&&bi(ze()||1)!=5||!ge(S)||Tr(S,-1,void 0)===" "||(S+=" ");break;default:S+="/"}break;case 123*m:o[l++]=ge(S)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+h:y==-1&&(S=xa(S,/\f/g,"")),g>0&&(ge(S)-d||m===0&&f===47)&&ba(g>32?hp(S+";",i,r,d-1,c):hp(xa(S," ","")+";",i,r,d-2,c),c);break;case 59:S+=";";default:if(ba(k=lp(S,t,r,l,h,a,o,w,M=[],v=[],d,n),n),b===123)if(h===0)Sa(S,t,k,k,M,n,d,o,v);else{switch(u){case 99:if(Sr(S,3)===110)break;case 108:if(Sr(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Sa(e,k,k,i&&ba(lp(e,k,k,0,0,a,o,w,a,M=[],d,v),v),a,v,d,o,i?M:v):Sa(S,k,k,k,[""],v,0,o,v)}}l=h=g=0,m=y=1,w=S="",d=s;break;case 58:d=1+ge(S),g=f;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Zm()==125)continue}switch(S+=ya(b),b*m){case 38:y=h>0?1:(S+="\f",-1);break;case 44:o[l++]=(ge(S)-1)*y,y=1;break;case 64:ze()===45&&(S+=Eo(ne())),u=ze(),h=d=ge(w=S+=t0(Ca())),b++;break;case 45:f===45&&ge(S)==2&&(m=0)}}return n}function lp(e,t,r,i,a,n,s,o,c,l,h,d){for(var u=a-1,g=a===0?n:[""],f=function(v){return v.length}(g),m=0,x=0,y=0;m<i;++m)for(var b=0,w=Tr(e,u+1,u=Ao(x=s[m])),M=e;b<f;++b)(M=op(x>0?g[b]+" "+w:xa(w,/&\f/g,g[b])))&&(c[y++]=M);return Fo(e,t,r,a===0?Mo:o,c,l,h,d)}function r0(e,t,r,i){return Fo(e,t,r,Lo,ya(Tt),Tr(e,2,-2),0,i)}function hp(e,t,r,i,a){return Fo(e,t,r,_o,Tr(e,0,i),Tr(e,i+1,-1),i,a)}function Oo(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function i0(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case _o:return e.return=e.return||e.value;case Lo:return"";case"@keyframes":return e.return=e.value+"{"+Oo(e.children,i)+"}";case Mo:if(!ge(e.value=e.props.join(",")))return""}return ge(r=Oo(e.children,i))?e.return=e.value+"{"+r+"}":""}var a0={id:"c4",detector:p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./c4Diagram-6F6E4RAY-CFUpKWFc.js");return{diagram:t}},__vite__mapDeps([14,15,11,12,2,3,13]),import.meta.url);return{id:"c4",diagram:e}},"loader")},cp="flowchart",n0=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)!=="elk"&&/^\s*graph/.test(e)},"detector"),o0={id:cp,detector:n0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-KYDEHFYC-CnlYqbNS.js");return{diagram:t}},__vite__mapDeps([16,17,18,11,12,19,20,2,3,13]),import.meta.url);return{id:cp,diagram:e}},"loader")},dp="flowchart-v2",s0=p((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-d3"&&(((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")||/^\s*flowchart/.test(e))},"detector"),l0={id:dp,detector:s0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-KYDEHFYC-CnlYqbNS.js");return{diagram:t}},__vite__mapDeps([16,17,18,11,12,19,20,2,3,13]),import.meta.url);return{id:dp,diagram:e}},"loader")},h0={id:"er",detector:p(e=>/^\s*erDiagram/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./erDiagram-3M52JZNH-DwouQakE.js");return{diagram:t}},__vite__mapDeps([21,18,11,12,19,20,2,3,13]),import.meta.url);return{id:"er",diagram:e}},"loader")},up="gitGraph",c0={id:up,detector:p(e=>/^\s*gitGraph/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-GW3U2K7C-BYzUNWbJ.js");return{diagram:t}},__vite__mapDeps([22,23,24,25,2,3,5,4,7,8,10,26,11,12,13]),import.meta.url);return{id:up,diagram:e}},"loader")},pp="gantt",d0={id:pp,detector:p(e=>/^\s*gantt/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./ganttDiagram-EK5VF46D-D_rFrhg7.js");return{diagram:t}},__vite__mapDeps([27,2,3,11,12,28,29,30,13]),import.meta.url);return{id:pp,diagram:e}},"loader")},gp="info",u0={id:gp,detector:p(e=>/^\s*info/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./infoDiagram-LHK5PUON-DFdEld5N.js");return{diagram:t}},__vite__mapDeps([31,25,2,3,5,4,7,8,10,26,11,12,13]),import.meta.url);return{id:gp,diagram:e}},"loader")},p0={id:"pie",detector:p(e=>/^\s*pie/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./pieDiagram-NIOCPIFQ-BdmIGGSk.js");return{diagram:t}},__vite__mapDeps([32,23,25,2,3,5,4,7,8,10,26,11,12,33,13,34,30]),import.meta.url);return{id:"pie",diagram:e}},"loader")},fp="quadrantChart",g0={id:fp,detector:p(e=>/^\s*quadrantChart/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-2OG54O6I-DB_65PVP.js");return{diagram:t}},__vite__mapDeps([35,11,12,29,2,3,30,13]),import.meta.url);return{id:fp,diagram:e}},"loader")},mp="xychart",f0={id:mp,detector:p(e=>/^\s*xychart-beta/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./xychartDiagram-H2YORKM3-CSXZBio0.js");return{diagram:t}},__vite__mapDeps([36,11,12,30,34,37,29,2,3,13]),import.meta.url);return{id:mp,diagram:e}},"loader")},yp="requirement",m0={id:yp,detector:p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./requirementDiagram-QOLK2EJ7-a7c4o6ST.js");return{diagram:t}},__vite__mapDeps([38,18,11,12,19,2,3,13]),import.meta.url);return{id:yp,diagram:e}},"loader")},xp="sequence",y0={id:xp,detector:p(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-SKLFT4DO-DLSriKsU.js");return{diagram:t}},__vite__mapDeps([39,15,24,11,12,2,3,13]),import.meta.url);return{id:xp,diagram:e}},"loader")},bp="class",x0=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*classDiagram/.test(e)},"detector"),b0={id:bp,detector:x0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-M3E45YP4-B5WAgUkA.js");return{diagram:t}},__vite__mapDeps([40,41,17,18,11,12,19,2,3,13]),import.meta.url);return{id:bp,diagram:e}},"loader")},kp="classDiagram",k0=p((e,t)=>{var r;return!(!/^\s*classDiagram/.test(e)||((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")||/^\s*classDiagram-v2/.test(e)},"detector"),C0={id:kp,detector:k0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-YAWTLIQI-B5WAgUkA.js");return{diagram:t}},__vite__mapDeps([42,41,17,18,11,12,19,2,3,13]),import.meta.url);return{id:kp,diagram:e}},"loader")},Cp="state",w0=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*stateDiagram/.test(e)},"detector"),S0={id:Cp,detector:w0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-MI5ZYTHO-Ckq7mDsU.js");return{diagram:t}},__vite__mapDeps([43,44,18,11,12,19,1,2,3,4,5,6,7,8,9,13]),import.meta.url);return{id:Cp,diagram:e}},"loader")},wp="stateDiagram",T0=p((e,t)=>{var r;return!!/^\s*stateDiagram-v2/.test(e)||!(!/^\s*stateDiagram/.test(e)||((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")},"detector"),B0={id:wp,detector:T0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-5AN5P6BG-CvH_Saam.js");return{diagram:t}},__vite__mapDeps([45,44,18,11,12,19,2,3,13]),import.meta.url);return{id:wp,diagram:e}},"loader")},Sp="journey",v0={id:Sp,detector:p(e=>/^\s*journey/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./journeyDiagram-EWQZEKCU-FyIkYgSs.js");return{diagram:t}},__vite__mapDeps([46,15,17,11,12,33,13,2,3]),import.meta.url);return{id:Sp,diagram:e}},"loader")},L0=p((e,t,r)=>{$.debug(`rendering svg for syntax error
|
199
|
+
`);const i=is(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),ja(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"),Tp={draw:L0},M0=Tp,_0={db:{},renderer:Tp,parser:{parse:p(()=>{},"parse")}},Bp="flowchart-elk",A0=p((e,t={})=>{var r;return!!(/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk")&&(t.layout="elk",!0)},"detector"),F0={id:Bp,detector:A0,loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./flowDiagram-KYDEHFYC-CnlYqbNS.js");return{diagram:t}},__vite__mapDeps([16,17,18,11,12,19,20,2,3,13]),import.meta.url);return{id:Bp,diagram:e}},"loader")},vp="timeline",E0={id:vp,detector:p(e=>/^\s*timeline/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./timeline-definition-MYPXXCX6-hkbCGyMO.js");return{diagram:t}},__vite__mapDeps([47,11,12,33,13,2,3]),import.meta.url);return{id:vp,diagram:e}},"loader")},Lp="mindmap",$0={id:Lp,detector:p(e=>/^\s*mindmap/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./mindmap-definition-6CBA2TL7-CnmjmyNj.js");return{diagram:t}},__vite__mapDeps([48,49,2,3,11,12,13]),import.meta.url);return{id:Lp,diagram:e}},"loader")},Mp="kanban",O0={id:Mp,detector:p(e=>/^\s*kanban/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./kanban-definition-ZSS6B67P-yo2c0q-3.js");return{diagram:t}},__vite__mapDeps([50,17,2,3,11,12,13]),import.meta.url);return{id:Mp,diagram:e}},"loader")},_p="sankey",D0={id:_p,detector:p(e=>/^\s*sankey-beta/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-4UZDY2LN-CmGjZUZw.js");return{diagram:t}},__vite__mapDeps([51,11,12,34,30,52,2,3,13]),import.meta.url);return{id:_p,diagram:e}},"loader")},Ap="packet",I0={id:Ap,detector:p(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-5UYTHUR4-BwQkSIWB.js");return{diagram:t}},__vite__mapDeps([53,23,25,2,3,5,4,7,8,10,26,11,12,13]),import.meta.url);return{id:Ap,diagram:e}},"loader")},Fp="radar",R0={id:Fp,detector:p(e=>/^\s*radar-beta/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-ZTM2IBQH-BVWZsPmq.js");return{diagram:t}},__vite__mapDeps([54,23,25,2,3,5,4,7,8,10,26,11,12,13]),import.meta.url);return{id:Fp,diagram:e}},"loader")},Ep="block",z0={id:Ep,detector:p(e=>/^\s*block-beta/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./blockDiagram-6J76NXCF-CrLniOkM.js");return{diagram:t}},__vite__mapDeps([55,17,10,4,2,3,5,11,12,1,20,13]),import.meta.url);return{id:Ep,diagram:e}},"loader")},$p="architecture",P0={id:$p,detector:p(e=>/^\s*architecture/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./architectureDiagram-SUXI7LT5-BO2rBGtW.js");return{diagram:t}},__vite__mapDeps([56,23,24,25,2,3,5,4,7,8,10,26,49,11,12,13]),import.meta.url);return{id:$p,diagram:e}},"loader")},Op="treemap",q0={id:Op,detector:p(e=>/^\s*treemap/.test(e),"detector"),loader:p(async()=>{const{diagram:e}=await mt(async()=>{const{diagram:t}=await import("./diagram-VMROVX33-BhjzR-bS.js");return{diagram:t}},__vite__mapDeps([57,19,23,25,2,3,5,4,7,8,10,26,11,12,34,30,58,13]),import.meta.url);return{id:Op,diagram:e}},"loader")},Dp=!1,Ta=p(()=>{Dp||(Dp=!0,ii("error",_0,e=>e.toLowerCase().trim()==="error"),ii("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Fi(F0,$0,P0),Fi(a0,O0,C0,b0,h0,d0,u0,p0,m0,y0,l0,o0,E0,c0,B0,S0,v0,g0,D0,I0,f0,z0,R0,q0))},"addDiagrams"),N0=p(async()=>{$.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Ee).map(async([t,{detector:r,loader:i}])=>{if(i)try{Pi(t)}catch{try{const{diagram:a,id:n}=await i();ii(n,a,r)}catch(a){throw $.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Ee[t],a}}}))).filter(t=>t.status==="rejected");if(e.length>0){$.error(`Failed to load ${e.length} external diagrams`);for(const t of e)$.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function Ip(e,t){e.attr("role","graphics-document document"),t!==""&&e.attr("aria-roledescription",t)}function Rp(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Ip,"setA11yDiagramInfo"),p(Rp,"addSVGa11yTitleDescription");var Do=(ir=class{constructor(t,r,i,a,n){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=n}static async fromText(t,r={}){var l,h;const i=It(),a=Ai(t,i);t=Sc(t)+`
|
200
|
+
`;try{Pi(a)}catch{const d=Zs(a);if(!d)throw new on(`Diagram ${a} not found.`);const{id:u,diagram:g}=await d();ii(u,g)}const{db:n,parser:s,renderer:o,init:c}=Pi(a);return s.parser&&(s.parser.yy=n),(l=n.clear)==null||l.call(n),c==null||c(i),r.title&&((h=n.setDiagramTitle)==null||h.call(n,r.title)),await s.parse(t),new ir(a,t,n,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ir,"Diagram"),ir),zp=[],W0=p(()=>{zp.forEach(e=>{e()}),zp=[]},"attachFunctions"),j0=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Pp(e){const t=e.match(nn);if(!t)return{text:e,metadata:{}};let r=Ts(t[1],{schema:as})??{};r=typeof r!="object"||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Pp,"extractFrontMatter");var H0=p(e=>e.replace(/\r\n?/g,`
|
201
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Y0=p(e=>{const{text:t,metadata:r}=Pp(e),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:t}},"processFrontmatter"),U0=p(e=>{const t=ee.detectInit(e)??{},r=ee.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:dc(e),directive:t}},"processDirectives");function Io(e){const t=H0(e),r=Y0(t),i=U0(r.text),a=Si(r.config,i.directive);return{code:e=j0(i.text),title:r.title,config:a}}function qp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Io,"preprocessDiagram"),p(qp,"toBase64");var V0=["foreignobject"],G0=["dominant-baseline"];function Ro(e){const t=Io(e);return Kr(),cl(t.config??{}),t}async function Np(e,t){Ta();try{const{code:r,config:i}=Ro(e);return{diagramType:(await Yp(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Ro,"processAndSetConfigs"),p(Np,"parse");var Wp=p((e,t,r=[])=>`
|
202
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),X0=p((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
203
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
204
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
205
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const a=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(n=>{Wa(n.styles)||a.forEach(s=>{r+=Wp(n.id,s,n.styles)}),Wa(n.textStyles)||(r+=Wp(n.id,"tspan",((n==null?void 0:n.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),Z0=p((e,t,r,i)=>{const a=X0(e,r);return Oo(e0(`${i}{${Ml(t,a,e.themeVariables)}}`),i0)},"createUserStyles"),Q0=p((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=_e(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),J0=p((e="",t)=>{var r,i;return`<iframe style="width:100%;height:${(i=(r=t==null?void 0:t.viewBox)==null?void 0:r.baseVal)!=null&&i.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${qp(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
206
|
+
The "iframe" tag is not supported by your browser.
|
207
|
+
</iframe>`},"putIntoIFrame"),jp=p((e,t,r,i,a)=>{const n=e.append("div");n.attr("id",r),i&&n.attr("style",i);const s=n.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&s.attr("xmlns:xlink",a),s.append("g"),e},"appendDivSvgG");function zo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(zo,"sandboxedIframe");var K0=p((e,t,r,i)=>{var a,n,s;(a=e.getElementById(t))==null||a.remove(),(n=e.getElementById(r))==null||n.remove(),(s=e.getElementById(i))==null||s.remove()},"removeExistingElements"),ty=p(async function(e,t,r){var A,B,L,F,_,E;Ta();const i=Ro(t);t=i.code;const a=It();$.debug(a),t.length>((a==null?void 0:a.maxTextSize)??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const n="#"+e,s="i"+e,o="#"+s,c="d"+e,l="#"+c,h=p(()=>{const O=dt(u?o:l).node();O&&"remove"in O&&O.remove()},"removeTempElements");let d=dt("body");const u=a.securityLevel==="sandbox",g=a.securityLevel==="loose",f=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),u){const O=zo(dt(r),s);d=dt(O.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt(r);jp(d,e,c,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(K0(document,e,c,s),u){const O=zo(dt("body"),s);d=dt(O.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt("body");jp(d,e,c)}let m,x;try{m=await Do.fromText(t,{title:i.title})}catch(O){if(a.suppressErrorRendering)throw h(),O;m=await Do.fromText("error"),x=O}const y=d.select(l).node(),b=m.type,w=y.firstChild,M=w.firstChild,v=(B=(A=m.renderer).getClasses)==null?void 0:B.call(A,t,m),k=Z0(a,b,v,n),S=document.createElement("style");S.innerHTML=k,w.insertBefore(S,M);try{await m.renderer.draw(t,e,Oa.version,m)}catch(O){throw a.suppressErrorRendering?h():M0.draw(t,e,Oa.version),O}const I=d.select(`${l} svg`),D=(F=(L=m.db).getAccTitle)==null?void 0:F.call(L),R=(E=(_=m.db).getAccDescription)==null?void 0:E.call(_);Up(b,I,D,R),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let z=d.select(l).node().innerHTML;if($.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),z=Q0(z,u,St(a.arrowMarkerAbsolute)),u){const O=d.select(l+" svg").node();z=J0(z,O)}else g||(z=Ue.sanitize(z,{ADD_TAGS:V0,ADD_ATTR:G0,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(W0(),x)throw x;return h(),{diagramType:b,svg:z,bindFunctions:m.db.bindFunctions}},"render");function Hp(e={}){var i;const t=Mt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ll(t),t!=null&&t.theme&&t.theme in he?t.themeVariables=he[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=he.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?sl(t):cn();_i(r.logLevel),Ta()}p(Hp,"initialize");var Yp=p((e,t={})=>{const{code:r}=Io(e);return Do.fromText(r,t)},"getDiagramFromText");function Up(e,t,r,i){Ip(t,e),Rp(t,r,i,t.attr("id"))}p(Up,"addA11yInfo");var rr=Object.freeze({render:ty,parse:Np,getDiagramFromText:Yp,initialize:Hp,getConfig:It,setConfig:dn,getSiteConfig:cn,updateSiteConfig:hl,reset:p(()=>{Kr()},"reset"),globalReset:p(()=>{Kr(Ve)},"globalReset"),defaultConfig:Ve});_i(It().logLevel),Kr(It());var ey=p((e,t,r)=>{$.warn(e),Un(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"),Vp=p(async function(e={querySelector:".mermaid"}){try{await ry(e)}catch(t){if(Un(t)&&$.error(t.str),Zt.parseError&&Zt.parseError(t),!e.suppressErrors)throw $.error("Use the suppressErrors option to suppress these errors"),t}},"run"),ry=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=rr.getConfig();let a;if($.debug((e?"":"No ")+"Callback function found"),r)a=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(t)}$.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&($.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),rr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const n=new ee.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const c of Array.from(a)){if($.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${n.next()}`;s=c.innerHTML,s=Hc(ee.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ee.detectInit(s);h&&$.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:u}=await Qp(l,s,c);c.innerHTML=d,e&&await e(l),u&&u(c)}catch(d){ey(d,o,Zt.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Gp=p(function(e){rr.initialize(e)},"initialize"),iy=p(async function(e,t,r){$.warn("mermaid.init is deprecated. Please use run instead."),e&&Gp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Vp(i)},"init"),ay=p(async(e,{lazyLoad:t=!0}={})=>{Ta(),Fi(...e),t===!1&&await N0()},"registerExternalDiagrams"),Xp=p(function(){if(Zt.startOnLoad){const{startOnLoad:e}=rr.getConfig();e&&Zt.run().catch(t=>$.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Xp,!1);var ny=p(function(e){Zt.parseError=e},"setParseErrorHandler"),Ba=[],Po=!1,Zp=p(async()=>{if(!Po){for(Po=!0;Ba.length>0;){const e=Ba.shift();if(e)try{await e()}catch(t){$.error("Error executing queue",t)}}Po=!1}},"executeQueue"),oy=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((n,s)=>{rr.parse(e,t).then(o=>{n(o),r(o)},o=>{var c;$.error("Error parsing",o),(c=Zt.parseError)==null||c.call(Zt,o),s(o),i(o)})}),"performCall");Ba.push(a),Zp().catch(i)}),"parse"),Qp=p((e,t,r)=>new Promise((i,a)=>{const n=p(()=>new Promise((s,o)=>{rr.render(e,t,r).then(c=>{s(c),i(c)},c=>{var l;$.error("Error parsing",c),(l=Zt.parseError)==null||l.call(Zt,c),o(c),a(c)})}),"performCall");Ba.push(n),Zp().catch(a)}),"render"),Zt={startOnLoad:!0,mermaidAPI:rr,parse:oy,render:Qp,init:iy,run:Vp,registerExternalDiagrams:ay,registerLayoutLoaders:vo,initialize:Gp,parseError:void 0,contentLoaded:Xp,setParseErrorHandler:ny,detectType:Ai,registerIconPacks:fs,getRegisteredDiagramsMetadata:p(()=>Object.keys(Ee).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},Jp=Zt;const sy={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function ly(){return function(){const e="abcdefghijklmnopqrstuvwxyz";return Array.from({length:6},()=>e[Math.floor(26*Math.random())]).join("")}()}Eg=Object.freeze(Object.defineProperty({__proto__:null,default:e=>{const t=vy.c(9),{diagram:r}=e,[i]=Ly.useState(ly),a=My().theme==="dark";let n,s;Jp.initialize({...sy,theme:a?"dark":"forest",darkMode:a}),t[0]!==r||t[1]!==i?(n=async()=>(await Jp.render(i,r,void 0).catch(l=>{var h;throw(h=document.getElementById(i))==null||h.remove(),Ay.warn("Failed to render mermaid diagram",l),l})).svg,t[0]=r,t[1]=i,t[2]=n):n=t[2],t[3]!==a||t[4]!==r||t[5]!==i?(s=[r,i,a],t[3]=a,t[4]=r,t[5]=i,t[6]=s):s=t[6];const{data:o}=_y(n,s);if(!o)return null;let c;return t[7]!==o?(c=Fy.jsx("div",{dangerouslySetInnerHTML:{__html:o}}),t[7]=o,t[8]=c):c=t[8],c}},Symbol.toStringTag,{value:"Module"}))});export{Ko as $,nr as A,ts as B,te as C,es as D,Si as E,It as F,$a as G,rs as H,is as I,as as J,Oa as K,ns as L,qe as M,Bg as N,Nr as O,Da as P,Ti as Q,Ia as R,os as S,ss as T,tt as U,or as V,N as W,X,Ra as Y,vg as Z,p as _,Wy as __tla,ls as a,za as a0,Lg as a1,hs as a2,St as a3,xe as a4,Bi as a5,Pa as a6,_e as a7,qa as a8,U as a9,Na as aa,cs as ab,Wa as ac,ds as ad,Mg as ae,_g as af,Ag as ag,V as ah,Fg as ai,us as aj,ps as ak,gs as al,sr as am,fs as an,ms as ao,ys as ap,Eg as aq,xs as b,ut as c,ja as d,Mt as e,oe as f,bs as g,Ae as h,ks as i,Ne as j,Ha as k,$ as l,lr as m,$g as n,Og as o,Cs as p,ws as q,Dg as r,Ss as s,Ts as t,ee as u,Bs as v,vs as w,Ig as x,Ls as y,Rg as z};
|