@marimo-team/frontend 0.14.11-dev7 → 0.14.11-dev70
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-C0P31a5y.js → ConnectedDataExplorerComponent-C8KNJwme.js} +3 -3
- package/dist/assets/{ImageComparisonComponent-DXDeGx2f.js → ImageComparisonComponent-X63AQX3Z.js} +1 -1
- package/dist/assets/{VegaLite-CUqFyetE.js → VegaLite-Cwgramz7.js} +8 -8
- package/dist/assets/_baseEach-BwRvFCcX.js +1 -0
- package/dist/assets/_baseMap-BPkh-Xdm.js +1 -0
- package/dist/assets/_baseUniq-3M3qvtAU.js +1 -0
- package/dist/assets/{_createAggregator-SoA2y5HH.js → _createAggregator-BR0sgQ-H.js} +1 -1
- package/dist/assets/{any-language-editor-Bw2cdBsS.js → any-language-editor-B_3TElfE.js} +1 -1
- package/dist/assets/arc-ZB5pDULS.js +1 -0
- package/dist/assets/architectureDiagram-NQ2NVSRB-C-Q6h5E0.js +36 -0
- package/dist/assets/blockDiagram-PHRCVELO-DF26LRMN.js +122 -0
- package/dist/assets/{c4Diagram-VJAJSXHY-BHtN7uMz.js → c4Diagram-6F6E4RAY-DxKKy3dR.js} +2 -2
- package/dist/assets/channel-C76YDAut.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-BO5DiwLV.js → chunk-353BL4L5-BMNvAnXk.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-CbYGlbyQ.js → chunk-67H74DCK-BowtWazm.js} +1 -1
- package/dist/assets/chunk-6OLS64BW-r7_enOd_.js +220 -0
- package/dist/assets/{chunk-XZIHB7SX-COKmet6t.js → chunk-AACKK3MU-ObI-Jeuz.js} +1 -1
- package/dist/assets/chunk-BFAMUDN2-DZMNJ0lb.js +1 -0
- package/dist/assets/chunk-E2GYISFI-BftMzG6t.js +15 -0
- package/dist/assets/{chunk-A2AXSNBT-B07L-F60.js → chunk-QEP2MXWD-DYoXB8V9.js} +4 -3
- package/dist/assets/chunk-SKB7J2MH-CPXkWq12.js +1 -0
- package/dist/assets/{circle-play-DSXPiHO0.js → circle-play-CEu-KF9A.js} +2 -2
- package/dist/assets/classDiagram-BGRH5UQR-B77_BoI9.js +1 -0
- package/dist/assets/classDiagram-v2-O24JOBDK-B77_BoI9.js +1 -0
- package/dist/assets/clone-DghVKhMc.js +1 -0
- package/dist/assets/compile-DHU5S3pl.js +10 -0
- package/dist/assets/dagre-FFZHY6LT-BAWZisFt.js +4 -0
- package/dist/assets/data-grid-overlay-editor-DST7wmtm.js +1 -0
- package/dist/assets/diagram-3EMPZRKU-BfiQqaJS.js +24 -0
- package/dist/assets/diagram-5UYTHUR4-BPM94rdL.js +24 -0
- package/dist/assets/diagram-ZTM2IBQH-BZivztwZ.js +43 -0
- package/dist/assets/edit-page-BtOmb7sx.js +148 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-l-V_9Yws.js → erDiagram-R3QVA2FD-D5PS4EvQ.js} +1 -1
- package/dist/assets/flowDiagram-PKI6S5ZS-CU-Va1aE.js +162 -0
- package/dist/assets/ganttDiagram-EK5VF46D-kiop1EZF.js +267 -0
- package/dist/assets/gitGraphDiagram-GW3U2K7C-pn54JXWe.js +65 -0
- package/dist/assets/glide-data-editor-BDVFlbsw.js +132 -0
- package/dist/assets/glide-data-editor-DcmjcDkq.css +1 -0
- package/dist/assets/{graph-DpLAfWzk.js → graph-DMvggPR6.js} +1 -1
- package/dist/assets/home-page-COgvAP7J.js +9 -0
- package/dist/assets/index-BEQfoZiP.js +1 -0
- package/dist/assets/{index-N67HDT2u.js → index-BVdeH6k_.js} +1 -1
- package/dist/assets/index-BYwm8dNP.js +507 -0
- package/dist/assets/{index-DbunLlvf.js → index-Bb5pgMhk.js} +1 -1
- package/dist/assets/index-BeYYZckp.js +1 -0
- package/dist/assets/{index-DZWCSqpf.js → index-BfjvvzIj.js} +1 -1
- package/dist/assets/{index-C9EbJL5c.js → index-Bt1t99Zw.js} +1 -1
- package/dist/assets/{index-DP4HiwTU.js → index-CKJHZ3r1.js} +1 -1
- package/dist/assets/{index-CmVTfWOx.js → index-CP6F7acK.js} +1 -1
- package/dist/assets/index-Cmv4qk-G.js +1 -0
- package/dist/assets/index-CsdFJkJw.css +1 -0
- package/dist/assets/index-D1DYyjFi.js +1 -0
- package/dist/assets/index-D5319C1F.js +1 -0
- package/dist/assets/{index-Cs9jrmWP.js → index-DAeT4AvJ.js} +1 -1
- package/dist/assets/{index-DQwFB8dN.js → index-DHSLEKeh.js} +2 -2
- package/dist/assets/index-DLz8vg9X.js +1 -0
- package/dist/assets/{index-CxQo8Qlm.js → index-DPhERrz5.js} +1 -1
- package/dist/assets/{index-DAMc4rP9.js → index-DvjfakkM.js} +1 -1
- package/dist/assets/{index-Cig6xGYH.js → index-IyocdUUZ.js} +1 -1
- package/dist/assets/{index-Bz3Lb65G.js → index-OQKfsQfq.js} +1 -1
- package/dist/assets/{index-Czo055fo.js → index-S8y4ArOY.js} +1 -1
- package/dist/assets/infoDiagram-RLU2ROGC-EF8K4onx.js +2 -0
- package/dist/assets/journeyDiagram-EWQZEKCU-r_tJeooO.js +139 -0
- package/dist/assets/{kanban-definition-NDS4AKOZ-Cw4Vh4wD.js → kanban-definition-ILFWEQ3N-Dh1DY3to.js} +9 -8
- package/dist/assets/{layout-DodQLUx6.js → layout-32UR0ign.js} +1 -1
- package/dist/assets/linear-CAauVgN5.js +1 -0
- package/dist/assets/links-ZFL8n2Fm.js +17 -0
- package/dist/assets/loro_wasm_bg-bPYKkGLG.wasm +0 -0
- package/dist/assets/mermaid-COv7IYsE.js +152 -0
- package/dist/assets/min-dY51xMAa.js +1 -0
- package/dist/assets/{mindmap-definition-ALO5MXBD-C0KGo_i_.js → mindmap-definition-CZNETY7S-DBqhb2Xi.js} +4 -4
- package/dist/assets/number-overlay-editor-BFzZfMzz.js +9 -0
- package/dist/assets/{pieDiagram-IB7DONF6-DCnELF9y.js → pieDiagram-NIOCPIFQ-0MqmV6Yq.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-D0cP5ixt.js → quadrantDiagram-2OG54O6I-fGCClEd2.js} +1 -1
- package/dist/assets/{react-plotly-BmDAcz3M.js → react-plotly-CS4p4Iuj.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-BTksN04O.js → requirementDiagram-SO3GGRV7-XUEKHJ00.js} +3 -3
- package/dist/assets/run-page-D_I2RT57.js +1 -0
- package/dist/assets/{sankeyDiagram-QLVOVGJD-DECOJIMC.js → sankeyDiagram-4UZDY2LN-DEr-GME0.js} +4 -4
- package/dist/assets/save-worker-B8gk1S9x.js +1 -0
- package/dist/assets/sequenceDiagram-ZIKVLSP4-DTVzsjuC.js +122 -0
- package/dist/assets/slides-component-yP61stiA.js +1 -0
- package/dist/assets/sortBy-BbmYplKF.js +1 -0
- package/dist/assets/stateDiagram-XX37X6EN-CR4xcA7J.js +1 -0
- package/dist/assets/stateDiagram-v2-GD6S3NHB-D9oq-Lg_.js +1 -0
- package/dist/assets/storage-B25B7wsH.js +25 -0
- package/dist/assets/{terminal-MtCDBvKs.js → terminal-BA0vFnfv.js} +1 -1
- package/dist/assets/{time-BoP93jle.js → time-DwTb9sAM.js} +1 -1
- package/dist/assets/timeline-definition-RI47OAVP-D7t9EQY4.js +61 -0
- package/dist/assets/tracing-B19mVCbz.js +2 -0
- package/dist/assets/trash-DBxjDZ4V.js +6 -0
- package/dist/assets/treemap-FKARHQ26-CRawZJDL.js +126 -0
- package/dist/assets/vega-component-BZiFJ9e0.js +1 -0
- package/dist/assets/worker-BYA2ASe8.js +1 -0
- package/dist/assets/worker-Ch6cKXnI.js +1 -0
- package/dist/assets/xychartDiagram-H2YORKM3-CT55rg7V.js +7 -0
- package/dist/index.html +4 -2
- package/package.json +45 -44
- package/dist/assets/_baseEach-BHb51vC7.js +0 -1
- package/dist/assets/_baseMap--rH4lBFQ.js +0 -1
- package/dist/assets/_baseUniq-CABXtSlj.js +0 -1
- package/dist/assets/arc-CfyY4LWz.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-rGoAHYH8.js +0 -36
- package/dist/assets/blockDiagram-JOT3LUYC-ZBJWq8Z_.js +0 -121
- package/dist/assets/channel-C96bdTqW.js +0 -1
- package/dist/assets/chunk-AEK57VVT-DN2-tsCz.js +0 -220
- package/dist/assets/chunk-RZ5BOZE2-DVex9AD8.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-CehC5H1T.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-CehC5H1T.js +0 -1
- package/dist/assets/clone-H0gxlZXI.js +0 -1
- package/dist/assets/compile-DEz1Y6_F.js +0 -10
- package/dist/assets/dagre-OKDRZEBW-CymbL2JX.js +0 -4
- package/dist/assets/data-editor-CTGVBJdC.js +0 -142
- package/dist/assets/diagram-SSKATNLV-DY5vs_Bj.js +0 -43
- package/dist/assets/diagram-VNBRO52H-ZuQiOKh8.js +0 -24
- package/dist/assets/edit-page-DcQ6ZhfW.js +0 -144
- package/dist/assets/flowDiagram-4HSFHLVR-BsHIJJTe.js +0 -161
- package/dist/assets/ganttDiagram-APWFNJXF-2gy5YbWU.js +0 -257
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-B_ELHLbw.js +0 -65
- package/dist/assets/home-page-6auHzaGk.js +0 -9
- package/dist/assets/index-8IZtaDUn.css +0 -1
- package/dist/assets/index-B-mClP__.js +0 -1
- package/dist/assets/index-BuqjbKw0.js +0 -1
- package/dist/assets/index-C9EPiaCd.js +0 -1
- package/dist/assets/index-DDVWq6NK.js +0 -501
- package/dist/assets/index-FYYNNs_X.js +0 -1
- package/dist/assets/index-kmp97oxc.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BwbaSo89.js +0 -2
- package/dist/assets/journeyDiagram-U35MCT3I-NKSvtlZA.js +0 -138
- package/dist/assets/linear-B_OPGLLI.js +0 -1
- package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
- package/dist/assets/mermaid-CVRC4Ruz.js +0 -152
- package/dist/assets/min-VmgWsmJ_.js +0 -1
- package/dist/assets/radar-MK3ICKWK-D8LhkSau.js +0 -126
- package/dist/assets/run-page-17VQxU3e.js +0 -1
- package/dist/assets/save-worker-DZnx0AG9.js +0 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-C5eDWwoH.js +0 -122
- package/dist/assets/shutdown-button-QvkERkPd.js +0 -17
- package/dist/assets/slides-component-DchvPU9C.js +0 -1
- package/dist/assets/sortBy-7ke7bFD2.js +0 -1
- package/dist/assets/stateDiagram-DGXRK772-D6Kwy963.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-Bk10XR94.js +0 -1
- package/dist/assets/storage-BeNhlsrY.js +0 -27
- package/dist/assets/timeline-definition-BDJGKUSR-T1la59d1.js +0 -61
- package/dist/assets/tracing-CCltm96L.js +0 -2
- package/dist/assets/vega-component-j1BDb2QJ.js +0 -1
- package/dist/assets/worker-BbdB3qWL.js +0 -1
- package/dist/assets/worker-CnoOKJWk.js +0 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-CoJqer7_.js +0 -7
- /package/dist/assets/{shutdown-button-C1rhMrxo.css → links-C1rhMrxo.css} +0 -0
- /package/dist/assets/{transform-DetRMEbJ.js → transform-CDNfLgV5.js} +0 -0
@@ -0,0 +1,152 @@
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-FFZHY6LT-BAWZisFt.js","./graph-DMvggPR6.js","./index-BYwm8dNP.js","./index-CsdFJkJw.css","./_baseUniq-3M3qvtAU.js","./_baseEach-BwRvFCcX.js","./layout-32UR0ign.js","./min-dY51xMAa.js","./_baseMap-BPkh-Xdm.js","./sortBy-BbmYplKF.js","./clone-DghVKhMc.js","./transform-CDNfLgV5.js","./timer-Bqd5yn_a.js","./step-BwsUM5iJ.js","./c4Diagram-6F6E4RAY-DxKKy3dR.js","./chunk-67H74DCK-BowtWazm.js","./flowDiagram-PKI6S5ZS-CU-Va1aE.js","./chunk-E2GYISFI-BftMzG6t.js","./chunk-BFAMUDN2-DZMNJ0lb.js","./chunk-SKB7J2MH-CPXkWq12.js","./channel-C76YDAut.js","./erDiagram-R3QVA2FD-D5PS4EvQ.js","./gitGraphDiagram-GW3U2K7C-pn54JXWe.js","./chunk-353BL4L5-BMNvAnXk.js","./chunk-AACKK3MU-ObI-Jeuz.js","./treemap-FKARHQ26-CRawZJDL.js","./_createAggregator-BR0sgQ-H.js","./ganttDiagram-EK5VF46D-kiop1EZF.js","./time-DwTb9sAM.js","./linear-CAauVgN5.js","./init-DLRA0X12.js","./infoDiagram-RLU2ROGC-EF8K4onx.js","./pieDiagram-NIOCPIFQ-0MqmV6Yq.js","./arc-ZB5pDULS.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-2OG54O6I-fGCClEd2.js","./xychartDiagram-H2YORKM3-CT55rg7V.js","./range-CtcPcB_L.js","./requirementDiagram-SO3GGRV7-XUEKHJ00.js","./sequenceDiagram-ZIKVLSP4-DTVzsjuC.js","./classDiagram-BGRH5UQR-B77_BoI9.js","./chunk-QEP2MXWD-DYoXB8V9.js","./classDiagram-v2-O24JOBDK-B77_BoI9.js","./stateDiagram-XX37X6EN-CR4xcA7J.js","./chunk-6OLS64BW-r7_enOd_.js","./stateDiagram-v2-GD6S3NHB-D9oq-Lg_.js","./journeyDiagram-EWQZEKCU-r_tJeooO.js","./timeline-definition-RI47OAVP-D7t9EQY4.js","./mindmap-definition-CZNETY7S-DBqhb2Xi.js","./cytoscape.esm-UYyVlru8.js","./kanban-definition-ILFWEQ3N-Dh1DY3to.js","./sankeyDiagram-4UZDY2LN-DEr-GME0.js","./colors-bszWmPJw.js","./diagram-5UYTHUR4-BPM94rdL.js","./diagram-ZTM2IBQH-BZivztwZ.js","./blockDiagram-PHRCVELO-DF26LRMN.js","./architectureDiagram-NQ2NVSRB-C-Q6h5E0.js","./diagram-3EMPZRKU-BfiQqaJS.js","./index-BEQfoZiP.js"])))=>i.map(i=>d[i]);
|
2
|
+
import{x as ey,S as ry,c_ as iy,df as ay,dg as oy,cX as ny,dh as sy,di as ly,z as hy,_ as gt,dj as xn,de as cy,dk as Sp,a as dy,W as uy,V as py,aI as gy,L as fy,j as my,__tla as yy}from"./index-BYwm8dNP.js";import{s as dt}from"./transform-CDNfLgV5.js";import{o as Tp,q as Bp,r as vp,u as Lp,v as Mp,x as _p,y as xy,z as bn,A as Fp,B as by,C as Cy,D as Ap,E as ky,F as wy,G as Sy,H as Ty,I as By,k as Cn,l as vy}from"./step-BwsUM5iJ.js";let kn,Ve,wn,Zt,Sn,si,$t,ca,Tn,Bn,vn,da,Ln,Ae,Ep,_r,ua,li,pa,Mn,_n,tt,Ge,N,X,ga,$p,u,Fn,fa,Op,An,Ct,ue,hi,ma,ke,ya,U,xa,En,ba,$n,Dp,Ip,Pp,V,zp,On,Dn,In,Xe,Pn,zn,Rn,Rp,qn,ut,Ca,Bt,re,Nn,we,Wn,Ee,ka,$,Ze,qp,Np,jn,Hn,Wp,Yn,Un,Kt,Vn,Gn,jp,Xn,Hp,Ly=Promise.all([(()=>{try{return yy}catch{}})()]).then(async()=>{var fr,mr,yr,xr,br,Cr,kr,wr,Ye;var Yp=Object.prototype.hasOwnProperty;ba=function(e){if(e==null)return!0;if(ey(e)&&(ry(e)||typeof e=="string"||typeof e.splice=="function"||iy(e)||ay(e)||oy(e)))return!e.length;var t=ny(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(sy(e))return!ly(e).length;for(var r in e)if(Yp.call(e,r))return!1;return!0};class Zn{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 Kn(e){return new Zn(e,!0)}function Qn(e){return new Zn(e,!1)}var Jn,ts={exports:{}},Up=(Jn||(Jn=1,ts.exports=function(){var e=1e3,t=6e4,r=36e5,i="millisecond",a="second",o="minute",s="hour",n="day",c="week",l="month",h="quarter",d="year",p="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(F){var B=["th","st","nd","rd"],L=F%100;return"["+F+(B[(L-20)%10]||B[L]||B[0])+"]"}},y=function(F,B,L){var A=String(F);return!A||A.length>=B?F:""+Array(B+1-A.length).join(L)+F},b={s:y,z:function(F){var B=-F.utcOffset(),L=Math.abs(B),A=Math.floor(L/60),_=L%60;return(B<=0?"+":"-")+y(A,2,"0")+":"+y(_,2,"0")},m:function F(B,L){if(B.date()<L.date())return-F(L,B);var A=12*(L.year()-B.year())+(L.month()-B.month()),_=B.clone().add(A,l),E=L-_<0,O=B.clone().add(A+(E?-1:1),l);return+(-(A+(L-_)/(E?_-O:O-_))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:l,y:d,w:c,d:n,D:p,h:s,m:o,s:a,ms:i,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},w="en",M={};M[w]=x;var v="$isDayjsObject",C=function(F){return F instanceof P||!(!F||!F[v])},S=function F(B,L,A){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 F(O[0])}else{var J=B.name;M[J]=B,_=J}return!A&&_&&(w=_),_||!A&&w},I=function(F,B){if(C(F))return F.clone();var L=typeof B=="object"?B:{};return L.date=F,L.args=arguments,new P(L)},D=b;D.l=S,D.i=C,D.w=function(F,B){return I(F,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var P=function(){function F(L){this.$L=S(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[v]=!0}var B=F.prototype;return B.parse=function(L){this.$d=function(A){var _=A.date,E=A.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 J=O[2]-1||0,it=(O[7]||"0").substring(0,3);return E?new Date(Date.UTC(O[1],J,O[3]||1,O[4]||0,O[5]||0,O[6]||0,it)):new Date(O[1],J,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,A){var _=I(L);return this.startOf(A)<=_&&_<=this.endOf(A)},B.isAfter=function(L,A){return I(L)<this.startOf(A)},B.isBefore=function(L,A){return this.endOf(A)<I(L)},B.$g=function(L,A,_){return D.u(L)?this[A]:this.set(_,L)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(L,A){var _=this,E=!!D.u(A)||A,O=D.p(L),J=function(nt,lt){var yt=D.w(_.$u?Date.UTC(_.$y,lt,nt):new Date(_.$y,lt,nt),_);return E?yt:yt.endOf(n)},it=function(nt,lt){return D.w(_.toDate()[nt].apply(_.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(lt)),_)},st=this.$W,rt=this.$M,bt=this.$D,ft="set"+(this.$u?"UTC":"");switch(O){case d:return E?J(1,0):J(31,11);case l:return E?J(1,rt):J(0,rt+1);case c:var Vt=this.$locale().weekStart||0,Z=(st<Vt?st+7:st)-Vt;return J(E?bt-Z:bt+(6-Z),rt);case n:case p:return it(ft+"Hours",0);case s:return it(ft+"Minutes",1);case o:return it(ft+"Seconds",2);case a:return it(ft+"Milliseconds",3);default:return this.clone()}},B.endOf=function(L){return this.startOf(L,!1)},B.$set=function(L,A){var _,E=D.p(L),O="set"+(this.$u?"UTC":""),J=(_={},_[n]=O+"Date",_[p]=O+"Date",_[l]=O+"Month",_[d]=O+"FullYear",_[s]=O+"Hours",_[o]=O+"Minutes",_[a]=O+"Seconds",_[i]=O+"Milliseconds",_)[E],it=E===n?this.$D+(A-this.$W):A;if(E===l||E===d){var st=this.clone().set(p,1);st.$d[J](it),st.init(),this.$d=st.set(p,Math.min(this.$D,st.daysInMonth())).$d}else J&&this.$d[J](it);return this.init(),this},B.set=function(L,A){return this.clone().$set(L,A)},B.get=function(L){return this[D.p(L)]()},B.add=function(L,A){var _,E=this;L=Number(L);var O=D.p(A),J=function(rt){var bt=I(E);return D.w(bt.date(bt.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===n)return J(1);if(O===c)return J(7);var it=(_={},_[o]=t,_[s]=r,_[a]=e,_)[O]||1,st=this.$d.getTime()+L*it;return D.w(st,this)},B.subtract=function(L,A){return this.add(-1*L,A)},B.format=function(L){var A=this,_=this.$locale();if(!this.isValid())return _.invalidDate||g;var E=L||"YYYY-MM-DDTHH:mm:ssZ",O=D.z(this),J=this.$H,it=this.$m,st=this.$M,rt=_.weekdays,bt=_.months,ft=_.meridiem,Vt=function(lt,yt,qt,At){return lt&&(lt[yt]||lt(A,E))||qt[yt].slice(0,At)},Z=function(lt){return D.s(J%12||12,lt,"0")},nt=ft||function(lt,yt,qt){var At=lt<12?"AM":"PM";return qt?At.toLowerCase():At};return E.replace(m,function(lt,yt){return yt||function(qt){switch(qt){case"YY":return String(A.$y).slice(-2);case"YYYY":return D.s(A.$y,4,"0");case"M":return st+1;case"MM":return D.s(st+1,2,"0");case"MMM":return Vt(_.monthsShort,st,bt,3);case"MMMM":return Vt(bt,st);case"D":return A.$D;case"DD":return D.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return Vt(_.weekdaysMin,A.$W,rt,2);case"ddd":return Vt(_.weekdaysShort,A.$W,rt,3);case"dddd":return rt[A.$W];case"H":return String(J);case"HH":return D.s(J,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return nt(J,it,!0);case"A":return nt(J,it,!1);case"m":return String(it);case"mm":return D.s(it,2,"0");case"s":return String(A.$s);case"ss":return D.s(A.$s,2,"0");case"SSS":return D.s(A.$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,A,_){var E,O=this,J=D.p(A),it=I(L),st=(it.utcOffset()-this.utcOffset())*t,rt=this-it,bt=function(){return D.m(O,it)};switch(J){case d:E=bt()/12;break;case l:E=bt();break;case h:E=bt()/3;break;case c:E=(rt-st)/6048e5;break;case n:E=(rt-st)/864e5;break;case s:E=rt/r;break;case o: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,A){if(!L)return this.$L;var _=this.clone(),E=S(L,A,!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()},F}(),z=P.prototype;return I.prototype=z,[["$ms",i],["$s",a],["$m",o],["$H",s],["$W",n],["$M",l],["$y",d],["$D",p]].forEach(function(F){z[F[1]]=function(B){return this.$g(B,F[0],F[1])}}),I.extend=function(F,B){return F.$i||(F(B,P,I),F.$i=!0),I},I.locale=S,I.isDayjs=C,I.unix=function(F){return I(1e3*F)},I.en=M[w],I.Ls=M,I.p={},I}()),ts.exports);let Fr,pe;Rn=hy(Up),Fr={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,o=2*r-a;switch(i){case"r":return 255*Fr.hue2rgb(o,a,e+1/3);case"g":return 255*Fr.hue2rgb(o,a,e);case"b":return 255*Fr.hue2rgb(o,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),o=Math.min(e,t,r),s=(a+o)/2;if(i==="l")return 100*s;if(a===o)return 0;const n=a-o;if(i==="s")return 100*(s>.5?n/(2-a-o):n/(a+o));switch(a){case e:return 60*((t-r)/n+(t<r?6:0));case t:return 60*((r-e)/n+2);case r:return 60*((e-t)/n+4);default:return-1}}},tt={channel:Fr,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}`}}},pe={};for(let e=0;e<=255;e++)pe[e]=tt.unit.dec2hex(e);const wa=0,Ke=1,$e=2;class Vp{constructor(){this.type=wa}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=wa}is(t){return this.type===t}}let Ar,Oe,Se,Qe,Je,Sa,es,Ta,T,R,Ba,va,rs,is,as;Ar=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new Vp}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=wa,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($e)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is($e)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is($e)||t===void 0?(this._ensureHSL(),tt.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Ke)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Ke)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Ke)||t===void 0?(this._ensureRGB(),tt.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Ke),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ke),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ke),this.changed=!0,this.data.b=e}set h(e){this.type.set($e),this.changed=!0,this.data.h=e}set s(e){this.type.set($e),this.changed=!0,this.data.s=e}set l(e){this.type.set($e),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"),Oe={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Oe.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,o=a%4==0,s=a>4,n=s?1:17,c=s?8:4,l=o?0:-1,h=s?255:15;return Ar.set({r:(i>>c*(l+3)&h)*n,g:(i>>c*(l+2)&h)*n,b:(i>>c*(l+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${pe[Math.round(t)]}${pe[Math.round(r)]}${pe[Math.round(i)]}${pe[Math.round(255*a)]}`:`#${pe[Math.round(t)]}${pe[Math.round(r)]}${pe[Math.round(i)]}`}},Se={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(Se.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(Se.re);if(!r)return;const[,i,a,o,s,n]=r;return Ar.set({h:Se._hue2deg(i),s:tt.channel.clamp.s(parseFloat(a)),l:tt.channel.clamp.l(parseFloat(o)),a:s?tt.channel.clamp.a(n?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)}%)`}},Qe={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=Qe.colors[e];if(t)return Oe.parse(t)},stringify:e=>{const t=Oe.stringify(e);for(const r in Qe.colors)if(Qe.colors[r]===t)return r}},Je={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(Je.re);if(!r)return;const[,i,a,o,s,n,c,l,h]=r;return Ar.set({r:tt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:tt.channel.clamp.g(s?2.55*parseFloat(o):parseFloat(o)),b:tt.channel.clamp.b(c?2.55*parseFloat(n):parseFloat(n)),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)})`}},Zt={format:{keyword:Qe,hex:Oe,rgb:Je,rgba:Je,hsl:Se,hsla:Se},parse:e=>{if(typeof e!="string")return e;const t=Oe.parse(e)||Je.parse(e)||Se.parse(e)||Qe.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is($e)||e.data.r===void 0?Se.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Je.stringify(e):Oe.stringify(e)},Sa=(e,t)=>{const r=Zt.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return Zt.stringify(r)},Ve=(e,t,r=0,i=1)=>{if(typeof e!="number")return Sa(e,{a:t});const a=Ar.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 Zt.stringify(a)},es=e=>(t=>{const{r,g:i,b:a}=Zt.parse(t),o=.2126*tt.channel.toLinear(r)+.7152*tt.channel.toLinear(i)+.0722*tt.channel.toLinear(a);return tt.lang.round(o)})(e)>=.5,Ge=e=>!es(e),Ta=(e,t,r)=>{const i=Zt.parse(e),a=i[t],o=tt.channel.clamp[t](a+r);return a!==o&&(i[t]=o),Zt.stringify(i)},N=(e,t)=>Ta(e,"l",t),X=(e,t)=>Ta(e,"l",-t),T=(e,t)=>{const r=Zt.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return Sa(e,i)},R=(e,t=100)=>{const r=Zt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((i,a,o=50)=>{const{r:s,g:n,b:c,a:l}=Zt.parse(i),{r:h,g:d,b:p,a:g}=Zt.parse(a),f=o/100,m=2*f-1,x=l-g,y=((m*x===-1?m:(m+x)/(1+m*x))+1)/2,b=1-y;return Ve(s*y+h*b,n*y+d*b,c*y+p*b,l*f+g*(1-f))})(r,e,t)},{entries:Ba,setPrototypeOf:va,isFrozen:rs,getPrototypeOf:is,getOwnPropertyDescriptor:as}=Object;let{freeze:Ot,seal:Gt,create:os}=Object,{apply:La,construct:Ma}=typeof Reflect<"u"&&Reflect;Ot||(Ot=function(e){return e}),Gt||(Gt=function(e){return e}),La||(La=function(e,t,r){return e.apply(t,r)}),Ma||(Ma=function(e,t){return new e(...t)});const ci=It(Array.prototype.forEach),Gp=It(Array.prototype.lastIndexOf),ns=It(Array.prototype.pop),Er=It(Array.prototype.push),Xp=It(Array.prototype.splice),di=It(String.prototype.toLowerCase),_a=It(String.prototype.toString),ss=It(String.prototype.match),$r=It(String.prototype.replace),Zp=It(String.prototype.indexOf),Kp=It(String.prototype.trim),Qt=It(Object.prototype.hasOwnProperty),Dt=It(RegExp.prototype.test),Or=(ls=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ma(ls,t)});var ls;function It(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 La(e,t,i)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:di;va&&va(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const o=r(a);o!==a&&(rs(t)||(t[i]=o),a=o)}e[a]=!0}return e}function Qp(e){for(let t=0;t<e.length;t++)Qt(e,t)||(e[t]=null);return e}function ge(e){const t=os(null);for(const[r,i]of Ba(e))Qt(e,r)&&(Array.isArray(i)?t[r]=Qp(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ge(i):t[r]=i);return t}function Dr(e,t){for(;e!==null;){const r=as(e,t);if(r){if(r.get)return It(r.get);if(typeof r.value=="function")return It(r.value)}e=is(e)}return function(){return null}}const hs=Ot(["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"]),Fa=Ot(["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"]),Aa=Ot(["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"]),Jp=Ot(["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"]),Ea=Ot(["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"]),tg=Ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cs=Ot(["#text"]),ds=Ot(["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"]),$a=Ot(["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"]),us=Ot(["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"]),ui=Ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eg=Gt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),rg=Gt(/<%[\w\W]*|[\w\W]*%>/gm),ig=Gt(/\$\{[\w\W]*/gm),ag=Gt(/^data-[\-\w.\u00B7-\uFFFF]+$/),og=Gt(/^aria-[\-\w]+$/),ps=Gt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ng=Gt(/^(?:\w+script|data):/i),sg=Gt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gs=Gt(/^html$/i),lg=Gt(/^[a-z][.\w]*(-[.\w]+)+$/i);var fs=Object.freeze({__proto__:null,ARIA_ATTR:og,ATTR_WHITESPACE:sg,CUSTOM_ELEMENT:lg,DATA_ATTR:ag,DOCTYPE_NAME:gs,ERB_EXPR:rg,IS_ALLOWED_URI:ps,IS_SCRIPT_OR_DATA:ng,MUSTACHE_EXPR:eg,TMPLIT_EXPR:ig});const hg=1,cg=3,dg=7,ug=8,pg=9,gg=function(){return typeof window>"u"?null:window};let ms,De,Oa,ie,pi,jt,Da,tr,ys,Ia,Ie,gi,fi,Pa,xs,mi,Ir,Pr,_t,bs,Cs,ks,ws,Ss,Ts,Bs,vs,ae,Jt,za,Ra,Ls,zr,Ms,Pe,Pt,er,Rr,qr,_s,Fs,As,qa,Na,Wa,Es,Nr,$s,ja,Os,Ha,Ds,Is;De=function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gg();const r=k=>e(k);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==pg||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:n,Node:c,Element:l,NodeFilter:h,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:f}=t,m=l.prototype,x=Dr(m,"cloneNode"),y=Dr(m,"remove"),b=Dr(m,"nextSibling"),w=Dr(m,"childNodes"),M=Dr(m,"parentNode");if(typeof n=="function"){const k=i.createElement("template");k.content&&k.content.ownerDocument&&(i=k.content.ownerDocument)}let v,C="";const{implementation:S,createNodeIterator:I,createDocumentFragment:D,getElementsByTagName:P}=i,{importNode:z}=a;let F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported=typeof Ba=="function"&&typeof M=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:L,TMPLIT_EXPR:A,DATA_ATTR:_,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:it}=fs;let{IS_ALLOWED_URI:st}=fs,rt=null;const bt=ot({},[...hs,...Fa,...Aa,...Ea,...cs]);let ft=null;const Vt=ot({},[...ds,...$a,...us,...ui]);let Z=Object.seal(os(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}})),nt=null,lt=null,yt=!0,qt=!0,At=!1,ai=!0,he=!1,ia=!0,Ue=!1,hn=!1,cn=!1,Sr=!1,aa=!1,oa=!1,op=!0,np=!1,dn=!0,oi=!1,Tr={},Br=null;const sp=ot({},["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 lp=null;const hp=ot({},["audio","video","img","source","image","track"]);let un=null;const cp=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),na="http://www.w3.org/1998/Math/MathML",sa="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml";let vr=be,pn=!1,gn=null;const Zm=ot({},[na,sa,be],_a);let la=ot({},["mi","mo","mn","ms","mtext"]),ha=ot({},["annotation-xml"]);const Km=ot({},["title","style","font","a","script"]);let ni=null;const Qm=["application/xhtml+xml","text/html"];let Lt=null,Lr=null;const Jm=i.createElement("form"),dp=function(k){return k instanceof RegExp||k instanceof Function},fn=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Lr||Lr!==k){if(k&&typeof k=="object"||(k={}),k=ge(k),ni=Qm.indexOf(k.PARSER_MEDIA_TYPE)===-1?"text/html":k.PARSER_MEDIA_TYPE,Lt=ni==="application/xhtml+xml"?_a:di,rt=Qt(k,"ALLOWED_TAGS")?ot({},k.ALLOWED_TAGS,Lt):bt,ft=Qt(k,"ALLOWED_ATTR")?ot({},k.ALLOWED_ATTR,Lt):Vt,gn=Qt(k,"ALLOWED_NAMESPACES")?ot({},k.ALLOWED_NAMESPACES,_a):Zm,un=Qt(k,"ADD_URI_SAFE_ATTR")?ot(ge(cp),k.ADD_URI_SAFE_ATTR,Lt):cp,lp=Qt(k,"ADD_DATA_URI_TAGS")?ot(ge(hp),k.ADD_DATA_URI_TAGS,Lt):hp,Br=Qt(k,"FORBID_CONTENTS")?ot({},k.FORBID_CONTENTS,Lt):sp,nt=Qt(k,"FORBID_TAGS")?ot({},k.FORBID_TAGS,Lt):ge({}),lt=Qt(k,"FORBID_ATTR")?ot({},k.FORBID_ATTR,Lt):ge({}),Tr=!!Qt(k,"USE_PROFILES")&&k.USE_PROFILES,yt=k.ALLOW_ARIA_ATTR!==!1,qt=k.ALLOW_DATA_ATTR!==!1,At=k.ALLOW_UNKNOWN_PROTOCOLS||!1,ai=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=k.SAFE_FOR_TEMPLATES||!1,ia=k.SAFE_FOR_XML!==!1,Ue=k.WHOLE_DOCUMENT||!1,Sr=k.RETURN_DOM||!1,aa=k.RETURN_DOM_FRAGMENT||!1,oa=k.RETURN_TRUSTED_TYPE||!1,cn=k.FORCE_BODY||!1,op=k.SANITIZE_DOM!==!1,np=k.SANITIZE_NAMED_PROPS||!1,dn=k.KEEP_CONTENT!==!1,oi=k.IN_PLACE||!1,st=k.ALLOWED_URI_REGEXP||ps,vr=k.NAMESPACE||be,la=k.MATHML_TEXT_INTEGRATION_POINTS||la,ha=k.HTML_INTEGRATION_POINTS||ha,Z=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&dp(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&dp(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),he&&(qt=!1),aa&&(Sr=!0),Tr&&(rt=ot({},cs),ft=[],Tr.html===!0&&(ot(rt,hs),ot(ft,ds)),Tr.svg===!0&&(ot(rt,Fa),ot(ft,$a),ot(ft,ui)),Tr.svgFilters===!0&&(ot(rt,Aa),ot(ft,$a),ot(ft,ui)),Tr.mathMl===!0&&(ot(rt,Ea),ot(ft,us),ot(ft,ui))),k.ADD_TAGS&&(rt===bt&&(rt=ge(rt)),ot(rt,k.ADD_TAGS,Lt)),k.ADD_ATTR&&(ft===Vt&&(ft=ge(ft)),ot(ft,k.ADD_ATTR,Lt)),k.ADD_URI_SAFE_ATTR&&ot(un,k.ADD_URI_SAFE_ATTR,Lt),k.FORBID_CONTENTS&&(Br===sp&&(Br=ge(Br)),ot(Br,k.FORBID_CONTENTS,Lt)),dn&&(rt["#text"]=!0),Ue&&ot(rt,["html","head","body"]),rt.table&&(ot(rt,["tbody"]),delete nt.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,C=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:Tt=>Tt,createScriptURL:Tt=>Tt})}catch{return console.warn("TrustedTypes policy "+at+" could not be created."),null}}(f,o)),v!==null&&typeof C=="string"&&(C=v.createHTML(""));Ot&&Ot(k),Lr=k}},up=ot({},[...Fa,...Aa,...Jp]),pp=ot({},[...Ea,...tg]),ce=function(k){Er(r.removed,{element:k});try{M(k).removeChild(k)}catch{y(k)}},Mr=function(k,H){try{Er(r.removed,{attribute:H.getAttributeNode(k),from:H})}catch{Er(r.removed,{attribute:null,from:H})}if(H.removeAttribute(k),k==="is")if(Sr||aa)try{ce(H)}catch{}else try{H.setAttribute(k,"")}catch{}},gp=function(k){let H=null,q=null;if(cn)k="<remove></remove>"+k;else{const at=ss(k,/^[\r\n\t ]+/);q=at&&at[0]}ni==="application/xhtml+xml"&&vr===be&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const ht=v?v.createHTML(k):k;if(vr===be)try{H=new g().parseFromString(ht,ni)}catch{}if(!H||!H.documentElement){H=S.createDocument(vr,"template",null);try{H.documentElement.innerHTML=pn?C:ht}catch{}}const pt=H.body||H.documentElement;return k&&q&&pt.insertBefore(i.createTextNode(q),pt.childNodes[0]||null),vr===be?P.call(H,Ue?"html":"body")[0]:Ue?H.documentElement:pt},fp=function(k){return I.call(k.ownerDocument||k,k,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},mn=function(k){return k instanceof p&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof d)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},mp=function(k){return typeof c=="function"&&k instanceof c};function Ce(k,H,q){ci(k,ht=>{ht.call(r,H,q,Lr)})}const yp=function(k){let H=null;if(Ce(F.beforeSanitizeElements,k,null),mn(k))return ce(k),!0;const q=Lt(k.nodeName);if(Ce(F.uponSanitizeElement,k,{tagName:q,allowedTags:rt}),ia&&k.hasChildNodes()&&!mp(k.firstElementChild)&&Dt(/<[/\w!]/g,k.innerHTML)&&Dt(/<[/\w!]/g,k.textContent)||k.nodeType===dg||ia&&k.nodeType===ug&&Dt(/<[/\w]/g,k.data))return ce(k),!0;if(!rt[q]||nt[q]){if(!nt[q]&&bp(q)&&(Z.tagNameCheck instanceof RegExp&&Dt(Z.tagNameCheck,q)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(q)))return!1;if(dn&&!Br[q]){const ht=M(k)||k.parentNode,pt=w(k)||k.childNodes;if(pt&&ht)for(let at=pt.length-1;at>=0;--at){const Tt=x(pt[at],!0);Tt.__removalCount=(k.__removalCount||0)+1,ht.insertBefore(Tt,b(k))}}return ce(k),!0}return k instanceof l&&!function(ht){let pt=M(ht);pt&&pt.tagName||(pt={namespaceURI:vr,tagName:"template"});const at=di(ht.tagName),Tt=di(pt.tagName);return!!gn[ht.namespaceURI]&&(ht.namespaceURI===sa?pt.namespaceURI===be?at==="svg":pt.namespaceURI===na?at==="svg"&&(Tt==="annotation-xml"||la[Tt]):!!up[at]:ht.namespaceURI===na?pt.namespaceURI===be?at==="math":pt.namespaceURI===sa?at==="math"&&ha[Tt]:!!pp[at]:ht.namespaceURI===be?!(pt.namespaceURI===sa&&!ha[Tt])&&!(pt.namespaceURI===na&&!la[Tt])&&!pp[at]&&(Km[at]||!up[at]):!(ni!=="application/xhtml+xml"||!gn[ht.namespaceURI]))}(k)?(ce(k),!0):q!=="noscript"&&q!=="noembed"&&q!=="noframes"||!Dt(/<\/no(script|embed|frames)/i,k.innerHTML)?(he&&k.nodeType===cg&&(H=k.textContent,ci([B,L,A],ht=>{H=$r(H,ht," ")}),k.textContent!==H&&(Er(r.removed,{element:k.cloneNode()}),k.textContent=H)),Ce(F.afterSanitizeElements,k,null),!1):(ce(k),!0)},xp=function(k,H,q){if(op&&(H==="id"||H==="name")&&(q in i||q in Jm))return!1;if(!(qt&&!lt[H]&&Dt(_,H))){if(!(yt&&Dt(E,H))){if(!ft[H]||lt[H]){if(!(bp(k)&&(Z.tagNameCheck instanceof RegExp&&Dt(Z.tagNameCheck,k)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(k))&&(Z.attributeNameCheck instanceof RegExp&&Dt(Z.attributeNameCheck,H)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(H))||H==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&Dt(Z.tagNameCheck,q)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(q))))return!1}else if(!un[H]){if(!Dt(st,$r(q,J,""))){if((H!=="src"&&H!=="xlink:href"&&H!=="href"||k==="script"||Zp(q,"data:")!==0||!lp[k])&&!(At&&!Dt(O,$r(q,J,"")))){if(q)return!1}}}}}return!0},bp=function(k){return k!=="annotation-xml"&&ss(k,it)},Cp=function(k){Ce(F.beforeSanitizeAttributes,k,null);const{attributes:H}=k;if(!H||mn(k))return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ft,forceKeepAttr:void 0};let ht=H.length;for(;ht--;){const pt=H[ht],{name:at,namespaceURI:Tt,value:Fe}=pt,de=Lt(at),yn=Fe;let Et=at==="value"?yn:Kp(yn);if(q.attrName=de,q.attrValue=Et,q.keepAttr=!0,q.forceKeepAttr=void 0,Ce(F.uponSanitizeAttribute,k,q),Et=q.attrValue,!np||de!=="id"&&de!=="name"||(Mr(at,k),Et="user-content-"+Et),ia&&Dt(/((--!?|])>)|<\/(style|title)/i,Et)){Mr(at,k);continue}if(q.forceKeepAttr)continue;if(!q.keepAttr){Mr(at,k);continue}if(!ai&&Dt(/\/>/i,Et)){Mr(at,k);continue}he&&ci([B,L,A],wp=>{Et=$r(Et,wp," ")});const kp=Lt(k.nodeName);if(xp(kp,de,Et)){if(v&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Tt)switch(f.getAttributeType(kp,de)){case"TrustedHTML":Et=v.createHTML(Et);break;case"TrustedScriptURL":Et=v.createScriptURL(Et)}if(Et!==yn)try{Tt?k.setAttributeNS(Tt,at,Et):k.setAttribute(at,Et),mn(k)?ce(k):ns(r.removed)}catch{Mr(at,k)}}else Mr(at,k)}Ce(F.afterSanitizeAttributes,k,null)},ty=function k(H){let q=null;const ht=fp(H);for(Ce(F.beforeSanitizeShadowDOM,H,null);q=ht.nextNode();)Ce(F.uponSanitizeShadowNode,q,null),yp(q),Cp(q),q.content instanceof s&&k(q.content);Ce(F.afterSanitizeShadowDOM,H,null)};return r.sanitize=function(k){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,ht=null,pt=null,at=null;if(pn=!k,pn&&(k="<!-->"),typeof k!="string"&&!mp(k)){if(typeof k.toString!="function")throw Or("toString is not a function");if(typeof(k=k.toString())!="string")throw Or("dirty is not a string, aborting")}if(!r.isSupported)return k;if(hn||fn(H),r.removed=[],typeof k=="string"&&(oi=!1),oi){if(k.nodeName){const de=Lt(k.nodeName);if(!rt[de]||nt[de])throw Or("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof c)q=gp("<!---->"),ht=q.ownerDocument.importNode(k,!0),ht.nodeType===hg&&ht.nodeName==="BODY"||ht.nodeName==="HTML"?q=ht:q.appendChild(ht);else{if(!Sr&&!he&&!Ue&&k.indexOf("<")===-1)return v&&oa?v.createHTML(k):k;if(q=gp(k),!q)return Sr?null:oa?C:""}q&&cn&&ce(q.firstChild);const Tt=fp(oi?k:q);for(;pt=Tt.nextNode();)yp(pt),Cp(pt),pt.content instanceof s&&ty(pt.content);if(oi)return k;if(Sr){if(aa)for(at=D.call(q.ownerDocument);q.firstChild;)at.appendChild(q.firstChild);else at=q;return(ft.shadowroot||ft.shadowrootmode)&&(at=z.call(a,at,!0)),at}let Fe=Ue?q.outerHTML:q.innerHTML;return Ue&&rt["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&Dt(gs,q.ownerDocument.doctype.name)&&(Fe="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
|
3
|
+
`+Fe),he&&ci([B,L,A],de=>{Fe=$r(Fe,de," ")}),v&&oa?v.createHTML(Fe):Fe},r.setConfig=function(){fn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),hn=!0},r.clearConfig=function(){Lr=null,hn=!1},r.isValidAttribute=function(k,H,q){Lr||fn({});const ht=Lt(k),pt=Lt(H);return xp(ht,pt,q)},r.addHook=function(k,H){typeof H=="function"&&Er(F[k],H)},r.removeHook=function(k,H){if(H!==void 0){const q=Gp(F[k],H);return q===-1?void 0:Xp(F[k],q,1)[0]}return ns(F[k])},r.removeHooks=function(k){F[k]=[]},r.removeAllHooks=function(){F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),Oa=Object.defineProperty,u=(e,t)=>Oa(e,"name",{value:t,configurable:!0}),wn=(e,t)=>{for(var r in t)Oa(e,r,{get:t[r],enumerable:!0})},ie={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},$={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},pi=u(function(e="fatal"){let t=ie.fatal;typeof e=="string"?e.toLowerCase()in ie&&(t=ie[e]):typeof e=="number"&&(t=e),$.trace=()=>{},$.debug=()=>{},$.info=()=>{},$.warn=()=>{},$.error=()=>{},$.fatal=()=>{},t<=ie.fatal&&($.fatal=console.error?console.error.bind(console,jt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",jt("FATAL"))),t<=ie.error&&($.error=console.error?console.error.bind(console,jt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",jt("ERROR"))),t<=ie.warn&&($.warn=console.warn?console.warn.bind(console,jt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",jt("WARN"))),t<=ie.info&&($.info=console.info?console.info.bind(console,jt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",jt("INFO"))),t<=ie.debug&&($.debug=console.debug?console.debug.bind(console,jt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",jt("DEBUG"))),t<=ie.trace&&($.trace=console.debug?console.debug.bind(console,jt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",jt("TRACE")))},"setLogLevel"),jt=u(e=>`%c${Rn().format("ss.SSS")} : ${e} : `,"format"),Da=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,tr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ys=/\s*%%.*\n/gm,Ia=(fr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},u(fr,"UnknownDiagramError"),fr),Ie={},gi=u(function(e,t){e=e.replace(Da,"").replace(tr,"").replace(ys,`
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(Ie))if(i(e,t))return r;throw new Ia(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),fi=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)Pa(t,r,i)},"registerLazyLoadedDiagrams"),Pa=u((e,t,r)=>{Ie[e]&&$.warn(`Detector with key ${e} already exists. Overwriting.`),Ie[e]={detector:t,loader:r},$.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),xs=u(e=>Ie[e].loader,"getDiagramLoader"),mi=u((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>mi(e,o,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),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(o=>{typeof t[o]!="object"||e[o]!==void 0&&typeof e[o]!="object"?(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o]):(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=mi(e[o],t[o],{depth:r-1,clobber:i}))}),e)},"assignWithDepth"),Bt=mi,Ir="#ffffff",Pr="#f2f2f2",_t=u((e,t)=>T(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),bs=(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,o,s,n,c,l,h,d,p,g,f,m,x,y,b,w,M,v,C;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||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||R(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||R(this.tertiaryColor),this.lineColor=this.lineColor||R(this.background),this.arrowheadColor=this.arrowheadColor||R(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||R(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]||R(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:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.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||Ge(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:((p=this.xyChart)==null?void 0:p.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:((C=this.xyChart)==null?void 0:C.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||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(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||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}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]})}},u(mr,"Theme"),mr),Cs=u(e=>{const t=new bs;return t.calculate(e),t},"getThemeVariables"),ks=(yr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=T(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.background),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(R("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ve(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=Ve(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ve(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,o,s,n,c,l,h,d,p,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||R(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||N(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(4*C-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||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||Ge(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:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.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:((p=this.radar)==null?void 0:p.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||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(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]})}},u(yr,"Theme"),yr),ws=u(e=>{const t=new ks;return t.calculate(e),t},"getThemeVariables"),Ss=(xr=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=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(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=Ve(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,o,s,n,c,l,h,d,p,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,l:-(7+5*C)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||R(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||R(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=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||Ge(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:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.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:((p=this.xyChart)==null?void 0:p.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(R(this.git0),25),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(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||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}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]})}},u(xr,"Theme"),xr),Ln=u(e=>{const t=new Ss;return t.calculate(e),t},"getThemeVariables"),Ts=(br=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=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.primaryColor),this.lineColor=R(this.background),this.textColor=R(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,o,s,n,c,l,h,d,p,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||T(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{h:30,s:-30,l:-(8+5*C)});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||Ge(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:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.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:((p=this.xyChart)==null?void 0:p.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||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(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||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}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]})}},u(br,"Theme"),br),Bs=u(e=>{const t=new Ts;return t.calculate(e),t},"getThemeVariables"),vs=(Cr=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=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(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,o,s,n,c,l,h,d,p,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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||R(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||N(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||T(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||T(this.mainBkg,{l:-(8+5*C)});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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];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||Ge(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:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.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:((p=this.radar)==null?void 0:p.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||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(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||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}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]})}},u(Cr,"Theme"),Cr),ae={base:{getThemeVariables:Cs},dark:{getThemeVariables:ws},default:{getThemeVariables:Ln},forest:{getThemeVariables:Bs},neutral:{getThemeVariables:u(e=>{const t=new vs;return t.calculate(e),t},"getThemeVariables")}},Jt={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},za={...Jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ae.default.getThemeVariables(),sequence:{...Jt.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Jt.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Jt.flowchart,inheritDir:!1},external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Jt.pie,useWidth:984},xyChart:{...Jt.xyChart,useWidth:void 0},requirement:{...Jt.requirement,useWidth:void 0},packet:{...Jt.packet},radar:{...Jt.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Ra=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ra(e[i],"")]:[...r,t+i],[]),"keyify"),Ls=new Set(Ra(za,"")),ca=za,zr=u(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")||!Ls.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]=Ms(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"),Ms=u(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"),Pe=Object.freeze(ca),Pt=Bt({},Pe),er=[],Rr=Bt({},Pe),qr=u((e,t)=>{let r=Bt({},e),i={};for(const a of t)Wa(a),i=Bt(i,a);if(r=Bt(r,i),i.theme&&i.theme in ae){const a=Bt({},ms),o=Bt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in ae&&(r.themeVariables=ae[r.theme].getThemeVariables(o))}return Ha(Rr=r),Rr},"updateCurrentConfig"),_s=u(e=>(Pt=Bt({},Pe),Pt=Bt(Pt,e),e.theme&&ae[e.theme]&&(Pt.themeVariables=ae[e.theme].getThemeVariables(e.themeVariables)),qr(Pt,er),Pt),"setSiteConfig"),Fs=u(e=>{ms=Bt({},e)},"saveConfigFromInitialize"),As=u(e=>(Pt=Bt(Pt,e),qr(Pt,er),Pt),"updateSiteConfig"),qa=u(()=>Bt({},Pt),"getSiteConfig"),Na=u(e=>(Ha(e),Bt(Rr,e),$t()),"setConfig"),$t=u(()=>Bt({},Rr),"getConfig"),Wa=u(e=>{e&&(["secure",...Pt.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"&&Wa(e[t])}))},"sanitize"),Es=u(e=>{var t;zr(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),er.push(e),qr(Pt,er)},"addDirective"),Nr=u((e=Pt)=>{qr(e,er=[])},"reset"),$s={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},ja={},Os=u(e=>{ja[e]||($.warn($s[e]),ja[e]=!0)},"issueWarning"),Ha=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Os("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ze=/<br\s*\/?>/gi,Ds=u(e=>e?Va(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Is=(()=>{let e=!1;return()=>{e||(Ps(),e=!0)}})();function Ps(){const e="data-temp-href-target";De.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),De.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"))})}u(Ps,"setupDompurifyHooks");let Ya,Ua,zs,Rs,qs,Ns,Va,Ws,js,yi,Hs,Ys,Ga,xi,Us,Vs,Wr,Gs,Xs,Zs;Ya=u(e=>(Is(),De.sanitize(e)),"removeScript"),Ua=u((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Ya(e):i!=="loose"&&(e=(e=(e=Va(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=Ns(e))}return e},"sanitizeMore"),we=u((e,t)=>e&&(e=t.dompurifyConfig?De.sanitize(Ua(e,t),t.dompurifyConfig).toString():De.sanitize(Ua(e,t),{FORBID_TAGS:["style"]}).toString()),"sanitizeText"),zs=u((e,t)=>typeof e=="string"?we(e,t):e.flat().map(r=>we(r,t)),"sanitizeTextOrArray"),Rs=u(e=>Ze.test(e),"hasBreaks"),qs=u(e=>e.split(Ze),"splitBreaks"),Ns=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Va=u(e=>e.replace(Ze,"#br#"),"breakToPlaceholder"),ua=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Ct=u(e=>e!==!1&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),Ws=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),js=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),pa=u(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 o=t[i-1],s=t[i+1];Hs(o,s)&&(a=o+","+s,i++,r.pop())}r.push(Ys(a))}return r.join("")},"parseGenericTypes"),yi=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Hs=u((e,t)=>{const r=yi(e,"~"),i=yi(t,"~");return r===1&&i===1},"shouldCombineSets"),Ys=u(e=>{const t=yi(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("~"),o=i.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)i[a]="<",i[o]=">",a=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ga=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),xi=/\$\$(.*)\$\$/g,Ae=u(e=>{var t;return(((t=e.match(xi))==null?void 0:t.length)??0)>0},"hasKatex"),Ep=u(async(e,t)=>{e=await li(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"),li=u(async(e,t)=>{if(!Ae(e))return e;if(!(Ga()||t.legacyMathML||t.forceLegacyMathML))return e.replace(xi,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:a}=await import("./katex-LV4FpwlL.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!Ga()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ze).map(a=>Ae(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(xi,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatex"),Ee={getRows:Ds,sanitizeText:we,sanitizeTextOrArray:zs,hasBreaks:Rs,splitBreaks:qs,lineBreakRegex:Ze,removeScript:Ya,getUrl:ua,evaluate:Ct,getMax:Ws,getMin:js},Us=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Vs=u(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"),Ca=u(function(e,t,r,i){const a=Vs(t,r,i);Us(e,a)},"configureSvgSize"),_n=u(function(e,t,r,i){const a=t.node().getBBox(),o=a.width,s=a.height;$.info(`SVG bounds: ${o}x${s}`,a);let n=0,c=0;$.info(`Graph bounds: ${n}x${c}`,e),n=o+2*r,c=s+2*r,$.info(`Calculated bounds: ${n}x${c}`),Ca(t,c,n,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),Wr={},Gs=u((e,t,r)=>{let i="";return e in Wr&&Wr[e]?i=Wr[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"),Xs=u((e,t)=>{t!==void 0&&(Wr[e]=t)},"addStylesForDiagram"),Zs=Gs,ga={},wn(ga,{clear:()=>Xn,getAccDescription:()=>Nn,getAccTitle:()=>Fn,getDiagramTitle:()=>Hn,setAccDescription:()=>Yn,setAccTitle:()=>qn,setDiagramTitle:()=>jn});let bi,Ci,ki,wi,Xa,Ks,jr,Qs,Hr,Yr,Si,Js;bi="",Ci="",ki="",wi=u(e=>we(e,$t()),"sanitizeText"),Xn=u(()=>{bi="",ki="",Ci=""},"clear"),qn=u(e=>{bi=wi(e).replace(/^\s+/g,"")},"setAccTitle"),Fn=u(()=>bi,"getAccTitle"),Yn=u(e=>{ki=wi(e).replace(/\n\s+/g,`
|
81
|
+
`)},"setAccDescription"),Nn=u(()=>ki,"getAccDescription"),jn=u(e=>{Ci=wi(e)},"setDiagramTitle"),Hn=u(()=>Ci,"getDiagramTitle"),Xa=$,Ks=pi,ut=$t,qp=Na,Hp=Pe,jr=u(e=>we(e,ut()),"sanitizeText"),Sn=_n,Qs=u(()=>ga,"getCommonDb"),Hr={},Yr=u((e,t,r)=>{var i;Hr[e]&&Xa.warn(`Diagram with id ${e} already registered. Overwriting.`),Hr[e]=t,r&&Pa(e,r),Xs(e,t.styles),(i=t.injectUtils)==null||i.call(t,Xa,Ks,ut,jr,Sn,Qs(),()=>{})},"registerDiagram"),Si=u(e=>{if(e in Hr)return Hr[e];throw new Js(e)},"getDiagram"),Js=(kr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},u(kr,"DiagramNotFoundError"),kr);function Za(e){return e==null}function tl(e){return typeof e=="object"&&e!==null}function el(e){return Array.isArray(e)?e:Za(e)?[]:[e]}function rl(e,t){var r,i,a,o;if(t)for(r=0,i=(o=Object.keys(t)).length;r<i;r+=1)e[a=o[r]]=t[a];return e}function il(e,t){var r,i="";for(r=0;r<t;r+=1)i+=e;return i}function al(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}u(Za,"isNothing"),u(tl,"isObject"),u(el,"toArray"),u(rl,"extend"),u(il,"repeat"),u(al,"isNegativeZero");var wt={isNothing:Za,isObject:tl,toArray:el,repeat:il,isNegativeZero:al,extend:rl};function Ka(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 rr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Ka(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}u(Ka,"formatError"),u(rr,"YAMLException$1"),rr.prototype=Object.create(Error.prototype),rr.prototype.constructor=rr,rr.prototype.toString=u(function(e){return this.name+": "+Ka(this,e)},"toString");var Nt=rr;function Ti(e,t,r,i,a){var o="",s="",n=Math.floor(a/2)-1;return i-t>n&&(t=i-n+(o=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+o.length}}function Bi(e,t){return wt.repeat(" ",t-e.length)+e}function ol(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],o=[],s=-1;r=i.exec(e.buffer);)o.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 n,c,l="",h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(n=1;n<=t.linesBefore&&!(s-n<0);n++)c=Ti(e.buffer,a[s-n],o[s-n],e.position-(a[s]-a[s-n]),d),l=wt.repeat(" ",t.indent)+Bi((e.line-n+1).toString(),h)+" | "+c.str+`
|
84
|
+
`+l;for(c=Ti(e.buffer,a[s],o[s],e.position,d),l+=wt.repeat(" ",t.indent)+Bi((e.line+1).toString(),h)+" | "+c.str+`
|
85
|
+
`,l+=wt.repeat("-",t.indent+h+3+c.pos)+`^
|
86
|
+
`,n=1;n<=t.linesAfter&&!(s+n>=o.length);n++)c=Ti(e.buffer,a[s+n],o[s+n],e.position-(a[s]-a[s+n]),d),l+=wt.repeat(" ",t.indent)+Bi((e.line+n+1).toString(),h)+" | "+c.str+`
|
87
|
+
`;return l.replace(/\n$/,"")}u(Ti,"getLine"),u(Bi,"padStart"),u(ol,"makeSnippet");var fg=ol,mg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],yg=["scalar","sequence","mapping"];function nl(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function sl(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(mg.indexOf(r)===-1)throw new Nt('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=nl(t.styleAliases||null),yg.indexOf(this.kind)===-1)throw new Nt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}u(nl,"compileStyleAliases"),u(sl,"Type$1");var Ft=sl;function Qa(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(a=s)}),r[a]=i}),r}function ll(){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(u(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function vi(e){return this.extend(e)}u(Qa,"compileList"),u(ll,"compileMap"),u(vi,"Schema$1"),vi.prototype.extend=u(function(e){var t=[],r=[];if(e instanceof Ft)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 Nt("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 Ft))throw new Nt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Nt("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 Nt("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 Ft))throw new Nt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(vi.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Qa(i,"implicit"),i.compiledExplicit=Qa(i,"explicit"),i.compiledTypeMap=ll(i.compiledImplicit,i.compiledExplicit),i},"extend");var xg=new vi({explicit:[new Ft("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(e){return e!==null?e:""},"construct")}),new Ft("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(e){return e!==null?e:[]},"construct")}),new Ft("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(e){return e!==null?e:{}},"construct")})]});function hl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function cl(){return null}function dl(e){return e===null}u(hl,"resolveYamlNull"),u(cl,"constructYamlNull"),u(dl,"isNull");var bg=new Ft("tag:yaml.org,2002:null",{kind:"scalar",resolve:hl,construct:cl,predicate:dl,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"});function ul(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 pl(e){return e==="true"||e==="True"||e==="TRUE"}function gl(e){return Object.prototype.toString.call(e)==="[object Boolean]"}u(ul,"resolveYamlBoolean"),u(pl,"constructYamlBoolean"),u(gl,"isBoolean");var Cg=new Ft("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ul,construct:pl,predicate:gl,represent:{lowercase:u(function(e){return e?"true":"false"},"lowercase"),uppercase:u(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function fl(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ml(e){return 48<=e&&e<=55}function yl(e){return 48<=e&&e<=57}function xl(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(!fl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}if(t==="o"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!ml(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}}if(t==="_")return!1;for(;i<r;i++)if((t=e[i])!=="_"){if(!yl(e.charCodeAt(i)))return!1;a=!0}return!(!a||t==="_")}function bl(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 Cl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1==0&&!wt.isNegativeZero(e)}u(fl,"isHexCode"),u(ml,"isOctCode"),u(yl,"isDecCode"),u(xl,"resolveYamlInteger"),u(bl,"constructYamlInteger"),u(Cl,"isInteger");var kg=new Ft("tag:yaml.org,2002:int",{kind:"scalar",resolve:xl,construct:bl,predicate:Cl,represent:{binary:u(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:u(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:u(function(e){return e.toString(10)},"decimal"),hexadecimal:u(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"]}}),wg=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&&!(!wg.test(e)||e[e.length-1]==="_")}function wl(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)}u(kl,"resolveYamlFloat"),u(wl,"constructYamlFloat");var Sg=/^[-+]?[0-9]+e/;function Sl(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(wt.isNegativeZero(e))return"-0.0";return r=e.toString(10),Sg.test(r)?r.replace("e",".e"):r}function Tl(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||wt.isNegativeZero(e))}u(Sl,"representYamlFloat"),u(Tl,"isFloat");var Tg=new Ft("tag:yaml.org,2002:float",{kind:"scalar",resolve:kl,construct:wl,predicate:Tl,represent:Sl,defaultStyle:"lowercase"}),Bl=xg.extend({implicit:[bg,Cg,kg,Tg]}),Bg=Bl,vl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ll=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 Ml(e){return e!==null&&(vl.exec(e)!==null||Ll.exec(e)!==null)}function _l(e){var t,r,i,a,o,s,n,c,l=0,h=null;if((t=vl.exec(e))===null&&(t=Ll.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(o=+t[4],s=+t[5],n=+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,o,s,n,l)),h&&c.setTime(c.getTime()-h),c}function Fl(e){return e.toISOString()}u(Ml,"resolveYamlTimestamp"),u(_l,"constructYamlTimestamp"),u(Fl,"representYamlTimestamp");var vg=new Ft("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ml,construct:_l,instanceOf:Date,represent:Fl});function Al(e){return e==="<<"||e===null}u(Al,"resolveYamlMerge");var Lg=new Ft("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Al}),Ja=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
88
|
+
\r`;function El(e){if(e===null)return!1;var t,r,i=0,a=e.length,o=Ja;for(r=0;r<a;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;i+=6}return i%8==0}function $l(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,o=Ja,s=0,n=[];for(t=0;t<a;t++)t%4==0&&t&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|o.indexOf(i.charAt(t));return(r=a%4*6)===0?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):r===18?(n.push(s>>10&255),n.push(s>>2&255)):r===12&&n.push(s>>4&255),new Uint8Array(n)}function Ol(e){var t,r,i="",a=0,o=e.length,s=Ja;for(t=0;t<o;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=o%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 Dl(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}u(El,"resolveYamlBinary"),u($l,"constructYamlBinary"),u(Ol,"representYamlBinary"),u(Dl,"isBinary");var Mg=new Ft("tag:yaml.org,2002:binary",{kind:"scalar",resolve:El,construct:$l,predicate:Dl,represent:Ol}),_g=Object.prototype.hasOwnProperty,Fg=Object.prototype.toString;function Il(e){if(e===null)return!0;var t,r,i,a,o,s=[],n=e;for(t=0,r=n.length;t<r;t+=1){if(i=n[t],o=!1,Fg.call(i)!=="[object Object]")return!1;for(a in i)if(_g.call(i,a)){if(o)return!1;o=!0}if(!o||s.indexOf(a)!==-1)return!1;s.push(a)}return!0}function Pl(e){return e!==null?e:[]}u(Il,"resolveYamlOmap"),u(Pl,"constructYamlOmap");var Ag=new Ft("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Il,construct:Pl}),Eg=Object.prototype.toString;function zl(e){if(e===null)return!0;var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Eg.call(i)!=="[object Object]"||(a=Object.keys(i)).length!==1)return!1;o[t]=[a[0],i[a[0]]]}return!0}function Rl(e){if(e===null)return[];var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],a=Object.keys(i),o[t]=[a[0],i[a[0]]];return o}u(zl,"resolveYamlPairs"),u(Rl,"constructYamlPairs");var $g=new Ft("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zl,construct:Rl}),Og=Object.prototype.hasOwnProperty;function ql(e){if(e===null)return!0;var t,r=e;for(t in r)if(Og.call(r,t)&&r[t]!==null)return!1;return!0}function Nl(e){return e!==null?e:{}}u(ql,"resolveYamlSet"),u(Nl,"constructYamlSet");var Dg=new Ft("tag:yaml.org,2002:set",{kind:"mapping",resolve:ql,construct:Nl}),Wl=Bg.extend({implicit:[vg,Lg],explicit:[Mg,Ag,$g,Dg]}),Te=Object.prototype.hasOwnProperty,Ig=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Pg=/[\x85\u2028\u2029]/,zg=/[,\[\]\{\}]/,jl=/^(?:!|!!|![a-z\-]+!)$/i,Hl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function to(e){return Object.prototype.toString.call(e)}function te(e){return e===10||e===13}function Be(e){return e===9||e===32}function zt(e){return e===9||e===32||e===10||e===13}function ze(e){return e===44||e===91||e===93||e===123||e===125}function Yl(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Ul(e){return e===120?2:e===117?4:e===85?8:0}function Vl(e){return 48<=e&&e<=57?e-48:-1}function eo(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 Gl(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}u(to,"_class"),u(te,"is_EOL"),u(Be,"is_WHITE_SPACE"),u(zt,"is_WS_OR_EOL"),u(ze,"is_FLOW_INDICATOR"),u(Yl,"fromHexCode"),u(Ul,"escapedHexLen"),u(Vl,"fromDecimalCode"),u(eo,"simpleEscapeSequence"),u(Gl,"charFromCodepoint");var Re,Xl=new Array(256),Zl=new Array(256);for(Re=0;Re<256;Re++)Xl[Re]=eo(Re)?1:0,Zl[Re]=eo(Re);function Kl(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Wl,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 ro(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=fg(r),new Nt(t,r)}function G(e,t){throw ro(e,t)}function Ur(e,t){e.onWarning&&e.onWarning.call(null,ro(e,t))}u(Kl,"State$1"),u(ro,"generateError"),u(G,"throwError"),u(Ur,"throwWarning");var Ql={YAML:u(function(e,t,r){var i,a,o;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),o=parseInt(i[2],10),a!==1&&G(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Ur(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(e,t,r){var i,a;r.length!==2&&G(e,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],jl.test(i)||G(e,"ill-formed tag handle (first argument) of the TAG directive"),Te.call(e.tagMap,i)&&G(e,'there is a previously declared suffix for "'+i+'" tag handle'),Hl.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 fe(e,t,r,i){var a,o,s,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,o=n.length;a<o;a+=1)(s=n.charCodeAt(a))===9||32<=s&&s<=1114111||G(e,"expected valid JSON character");else Ig.test(n)&&G(e,"the stream contains non-printable characters");e.result+=n}}function io(e,t,r,i){var a,o,s,n;for(wt.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(a=Object.keys(r)).length;s<n;s+=1)o=a[s],Te.call(t,o)||(t[o]=r[o],i[o]=!0)}function qe(e,t,r,i,a,o,s,n,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"&&to(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&to(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,h=o.length;l<h;l+=1)io(e,t,o[l],r);else io(e,t,o,r);else e.json||Te.call(r,a)||!Te.call(t,a)||(e.line=s||e.line,e.lineStart=n||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:o}):t[a]=o,delete r[a];return t}function Li(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 xt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Be(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(!te(a))break;for(Li(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&&Ur(e,"deficient indentation"),i}function Vr(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&&!zt(t)))}function Mi(e,t){t===1?e.result+=" ":t>1&&(e.result+=wt.repeat(`
|
90
|
+
`,t-1))}function Jl(e,t,r){var i,a,o,s,n,c,l,h,d=e.kind,p=e.result;if(zt(h=e.input.charCodeAt(e.position))||ze(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)&&(zt(i=e.input.charCodeAt(e.position+1))||r&&ze(i)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;h!==0;){if(h===58){if(zt(i=e.input.charCodeAt(e.position+1))||r&&ze(i))break}else if(h===35){if(zt(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Vr(e)||r&&ze(h))break;if(te(h)){if(n=e.line,c=e.lineStart,l=e.lineIndent,xt(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}e.position=o,e.line=n,e.lineStart=c,e.lineIndent=l;break}}s&&(fe(e,a,o,!1),Mi(e,e.line-n),a=o=e.position,s=!1),Be(h)||(o=e.position+1),h=e.input.charCodeAt(++e.position)}return fe(e,a,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}function th(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(fe(e,i,e.position,!0),(r=e.input.charCodeAt(++e.position))!==39)return!0;i=e.position,e.position++,a=e.position}else te(r)?(fe(e,i,a,!0),Mi(e,xt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Vr(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 eh(e,t){var r,i,a,o,s,n;if((n=e.input.charCodeAt(e.position))!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return fe(e,r,e.position,!0),e.position++,!0;if(n===92){if(fe(e,r,e.position,!0),te(n=e.input.charCodeAt(++e.position)))xt(e,!1,t);else if(n<256&&Xl[n])e.result+=Zl[n],e.position++;else if((s=Ul(n))>0){for(a=s,o=0;a>0;a--)(s=Yl(n=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+s:G(e,"expected hexadecimal character");e.result+=Gl(o),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else te(n)?(fe(e,r,i,!0),Mi(e,xt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Vr(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 rh(e,t){var r,i,a,o,s,n,c,l,h,d,p,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,o=[];else{if(g!==123)return!1;s=125,l=!0,o={}}for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(xt(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=o,!0;f?g===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),p=null,n=c=!1,g===63&&zt(e.input.charCodeAt(e.position+1))&&(n=c=!0,e.position++,xt(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,Ne(e,t,1,!1,!0),d=e.tag,h=e.result,xt(e,!0,t),g=e.input.charCodeAt(e.position),!c&&e.line!==r||g!==58||(n=!0,g=e.input.charCodeAt(++e.position),xt(e,!0,t),Ne(e,t,1,!1,!0),p=e.result),l?qe(e,o,y,d,h,p,r,i,a):n?o.push(qe(e,null,y,d,h,p,r,i,a)):o.push(h),xt(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 ih(e,t){var r,i,a,o,s=1,n=!1,c=!1,l=t,h=0,d=!1;if((o=e.input.charCodeAt(e.position))===124)i=!1;else{if(o!==62)return!1;i=!0}for(e.kind="scalar",e.result="";o!==0;)if((o=e.input.charCodeAt(++e.position))===43||o===45)s===1?s=o===43?3:2:G(e,"repeat of a chomping mode identifier");else{if(!((a=Vl(o))>=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(Be(o)){do o=e.input.charCodeAt(++e.position);while(Be(o));if(o===35)do o=e.input.charCodeAt(++e.position);while(!te(o)&&o!==0)}for(;o!==0;){for(Li(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!c||e.lineIndent<l)&&o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>l&&(l=e.lineIndent),te(o))h++;else{if(e.lineIndent<l){s===3?e.result+=wt.repeat(`
|
91
|
+
`,n?1+h:h):s===1&&n&&(e.result+=`
|
92
|
+
`);break}for(i?Be(o)?(d=!0,e.result+=wt.repeat(`
|
93
|
+
`,n?1+h:h)):d?(d=!1,e.result+=wt.repeat(`
|
94
|
+
`,h+1)):h===0?n&&(e.result+=" "):e.result+=wt.repeat(`
|
95
|
+
`,h):e.result+=wt.repeat(`
|
96
|
+
`,n?1+h:h),n=!0,c=!0,h=0,r=e.position;!te(o)&&o!==0;)o=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}}return!0}function ao(e,t){var r,i,a=e.tag,o=e.anchor,s=[],n=!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)&&zt(e.input.charCodeAt(e.position+1));)if(n=!0,e.position++,xt(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,Ne(e,t,3,!1,!0),s.push(e.result),xt(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!!n&&(e.tag=a,e.anchor=o,e.kind="sequence",e.result=s,!0)}function ah(e,t,r){var i,a,o,s,n,c,l,h=e.tag,d=e.anchor,p={},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]=p),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),o=e.line,l!==63&&l!==58||!zt(i)){if(s=e.line,n=e.lineStart,c=e.position,!Ne(e,r,2,!1,!0))break;if(e.line===o){for(l=e.input.charCodeAt(e.position);Be(l);)l=e.input.charCodeAt(++e.position);if(l===58)zt(l=e.input.charCodeAt(++e.position))||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(qe(e,p,g,f,m,null,s,n,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&&(qe(e,p,g,f,m,null,s,n,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===o||e.lineIndent>t)&&(y&&(s=e.line,n=e.lineStart,c=e.position),Ne(e,t,4,!0,a)&&(y?m=e.result:x=e.result),y||(qe(e,p,g,f,m,x,s,n,c),f=m=x=null),xt(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&l!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&qe(e,p,g,f,m,null,s,n,c),b&&(e.tag=h,e.anchor=d,e.kind="mapping",e.result=p),b}function oh(e){var t,r,i,a,o=!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?(o=!0,a=e.input.charCodeAt(++e.position)):a===33?(s=!0,r="!!",a=e.input.charCodeAt(++e.position)):r="!",t=e.position,o){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&&!zt(a);)a===33&&(s?G(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),jl.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),zg.test(i)&&G(e,"tag suffix cannot contain flow indicator characters")}i&&!Hl.test(i)&&G(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{G(e,"tag name is malformed: "+i)}return o?e.tag=i:Te.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 nh(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&&!zt(r)&&!ze(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 sh(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&&!zt(i)&&!ze(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),Te.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],xt(e,!0,-1),!0}function Ne(e,t,r,i,a){var o,s,n,c,l,h,d,p,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,o=s=n=r===4||r===3,i&&xt(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;oh(e)||nh(e);)xt(e,!0,-1)?(m=!0,n=o,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):n=!1;if(n&&(n=m||a),f!==1&&r!==4||(p=r===1||r===2?t:t+1,g=e.position-e.lineStart,f===1?n&&(ao(e,g)||ah(e,g,p))||rh(e,p)?x=!0:(s&&ih(e,p)||th(e,p)||eh(e,p)?x=!0:sh(e)?(x=!0,e.tag===null&&e.anchor===null||G(e,"alias node should not have any properties")):Jl(e,p,r===1)&&(x=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(x=n&&ao(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(Te.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 lh(e){var t,r,i,a,o=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&&(xt(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&&!zt(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(;Be(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!te(a));break}if(te(a))break;for(t=e.position;a!==0&&!zt(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}a!==0&&Li(e),Te.call(Ql,r)?Ql[r](e,r,i):Ur(e,'unknown document directive "'+r+'"')}xt(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,xt(e,!0,-1)):s&&G(e,"directives end mark is expected"),Ne(e,e.lineIndent-1,4,!1,!0),xt(e,!0,-1),e.checkLineBreaks&&Pg.test(e.input.slice(o,e.position))&&Ur(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Vr(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,xt(e,!0,-1)):e.position<e.length-1&&G(e,"end of the stream or a document separator is expected")}function oo(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 Kl(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;)lh(r);return r.documents}function hh(e,t){var r=oo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Nt("expected a single document in the stream, but found more")}}u(fe,"captureSegment"),u(io,"mergeMappings"),u(qe,"storeMappingPair"),u(Li,"readLineBreak"),u(xt,"skipSeparationSpace"),u(Vr,"testDocumentSeparator"),u(Mi,"writeFoldedLines"),u(Jl,"readPlainScalar"),u(th,"readSingleQuotedScalar"),u(eh,"readDoubleQuotedScalar"),u(rh,"readFlowCollection"),u(ih,"readBlockScalar"),u(ao,"readBlockSequence"),u(ah,"readBlockMapping"),u(oh,"readTagProperty"),u(nh,"readAnchorProperty"),u(sh,"readAlias"),u(Ne,"composeNode"),u(lh,"readDocument"),u(oo,"loadDocuments"),u(function(e,t,r){t!==null&&typeof t=="object"&&r===void 0&&(r=t,t=null);var i=oo(e,r);if(typeof t!="function")return i;for(var a=0,o=i.length;a<o;a+=1)t(i[a])},"loadAll$1"),u(hh,"load$1");var Rg={load:hh},ch=Object.prototype.toString,dh=Object.prototype.hasOwnProperty,no=65279,qg={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"},Ng=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Wg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function uh(e,t){var r,i,a,o,s,n,c;if(t===null)return{};for(r={},a=0,o=(i=Object.keys(t)).length;a<o;a+=1)s=i[a],n=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),(c=e.compiledTypeMap.fallback[s])&&dh.call(c.styleAliases,n)&&(n=c.styleAliases[n]),r[s]=n;return r}function ph(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 Nt("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+wt.repeat("0",i-t.length)+t}u(uh,"compileStyleMap"),u(ph,"encodeHex");function gh(e){this.schema=e.schema||Wl,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=wt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=uh(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 so(e,t){for(var r,i=wt.repeat(" ",t),a=0,o=-1,s="",n=e.length;a<n;)(o=e.indexOf(`
|
98
|
+
`,a))===-1?(r=e.slice(a),a=n):(r=e.slice(a,o+1),a=o+1),r.length&&r!==`
|
99
|
+
`&&(s+=i),s+=r;return s}function _i(e,t){return`
|
100
|
+
`+wt.repeat(" ",e.indent*t)}function fh(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 Gr(e){return e===32||e===9}function ir(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==no||65536<=e&&e<=1114111}function lo(e){return ir(e)&&e!==no&&e!==13&&e!==10}function ho(e,t,r){var i=lo(e),a=i&&!Gr(e);return(r?i:i&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!a)||lo(t)&&!Gr(t)&&e===35||t===58&&a}function mh(e){return ir(e)&&e!==no&&!Gr(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 yh(e){return!Gr(e)&&e!==58}function ar(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 co(e){return/^\n* /.test(e)}u(gh,"State"),u(so,"indentString"),u(_i,"generateNextLine"),u(fh,"testImplicitResolving"),u(Gr,"isWhitespace"),u(ir,"isPrintable"),u(lo,"isNsCharOrWhitespace"),u(ho,"isPlainSafe"),u(mh,"isPlainSafeFirst"),u(yh,"isPlainSafeLast"),u(ar,"codePointAt"),u(co,"needIndentIndicator");function xh(e,t,r,i,a,o,s,n){var c,l=0,h=null,d=!1,p=!1,g=i!==-1,f=-1,m=mh(ar(e,0))&&yh(ar(e,e.length-1));if(t||s)for(c=0;c<e.length;l>=65536?c+=2:c++){if(!ir(l=ar(e,c)))return 5;m=m&&ho(l,h,n),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if((l=ar(e,c))===10)d=!0,g&&(p=p||c-f-1>i&&e[f+1]!==" ",f=c);else if(!ir(l))return 5;m=m&&ho(l,h,n),h=l}p=p||g&&c-f-1>i&&e[f+1]!==" "}return d||p?r>9&&co(e)?5:s?o===2?5:2:p?4:3:!m||s||a(e)?o===2?5:2:1}function bh(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===2?'""':"''";if(!e.noCompatMode&&(Ng.indexOf(t)!==-1||Wg.test(t)))return e.quotingType===2?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return fh(e,l)}switch(u(c,"testAmbiguity"),xh(t,n,e.indent,s,c,e.quotingType,e.forceQuotes&&!i,a)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+uo(t,e.indent)+po(so(t,o));case 4:return">"+uo(t,e.indent)+po(so(Ch(t,s),o));case 5:return'"'+kh(t)+'"';default:throw new Nt("impossible error: invalid scalar style")}}()}function uo(e,t){var r=co(e)?String(t):"",i=e[e.length-1]===`
|
101
|
+
`;return r+(i&&(e[e.length-2]===`
|
102
|
+
`||e===`
|
103
|
+
`)?"+":i?"":"-")+`
|
104
|
+
`}function po(e){return e[e.length-1]===`
|
105
|
+
`?e.slice(0,-1):e}function Ch(e,t){for(var r,i,a,o=/(\n+)([^\n]*)/g,s=(r=(r=e.indexOf(`
|
106
|
+
`))!==-1?r:e.length,o.lastIndex=r,go(e.slice(0,r),t)),n=e[0]===`
|
107
|
+
`||e[0]===" ";a=o.exec(e);){var c=a[1],l=a[2];i=l[0]===" ",s+=c+(n||i||l===""?"":`
|
108
|
+
`)+go(l,t),n=i}return s}function go(e,t){if(e===""||e[0]===" ")return e;for(var r,i,a=/ [^ ]/g,o=0,s=0,n=0,c="";r=a.exec(e);)(n=r.index)-o>t&&(i=s>o?s:n,c+=`
|
109
|
+
`+e.slice(o,i),o=i+1),s=n;return c+=`
|
110
|
+
`,e.length-o>t&&s>o?c+=e.slice(o,s)+`
|
111
|
+
`+e.slice(s+1):c+=e.slice(o),c.slice(1)}function kh(e){for(var t,r="",i=0,a=0;a<e.length;i>=65536?a+=2:a++)i=ar(e,a),!(t=qg[i])&&ir(i)?(r+=e[a],i>=65536&&(r+=e[a+1])):r+=t||ph(i);return r}function wh(e,t,r){var i,a,o,s="",n=e.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],e.replacer&&(o=e.replacer.call(r,String(i),o)),(oe(e,t,o,!1,!1)||o===void 0&&oe(e,t,null,!1,!1))&&(s!==""&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=n,e.dump="["+s+"]"}function fo(e,t,r,i){var a,o,s,n="",c=e.tag;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(oe(e,t+1,s,!0,!0,!1,!0)||s===void 0&&oe(e,t+1,null,!0,!0,!1,!0))&&(i&&n===""||(n+=_i(e,t)),e.dump&&e.dump.charCodeAt(0)===10?n+="-":n+="- ",n+=e.dump);e.tag=c,e.dump=n||"[]"}function Sh(e,t,r){var i,a,o,s,n,c="",l=e.tag,h=Object.keys(r);for(i=0,a=h.length;i<a;i+=1)n="",c!==""&&(n+=", "),e.condenseFlow&&(n+='"'),s=r[o=h[i]],e.replacer&&(s=e.replacer.call(r,o,s)),oe(e,t,o,!1,!1)&&(e.dump.length>1024&&(n+="? "),n+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),oe(e,t,s,!1,!1)&&(c+=n+=e.dump));e.tag=l,e.dump="{"+c+"}"}function Th(e,t,r,i){var a,o,s,n,c,l,h="",d=e.tag,p=Object.keys(r);if(e.sortKeys===!0)p.sort();else if(typeof e.sortKeys=="function")p.sort(e.sortKeys);else if(e.sortKeys)throw new Nt("sortKeys must be a boolean or a function");for(a=0,o=p.length;a<o;a+=1)l="",i&&h===""||(l+=_i(e,t)),n=r[s=p[a]],e.replacer&&(n=e.replacer.call(r,s,n)),oe(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+=_i(e,t)),oe(e,t+1,n,!0,c)&&(e.dump&&e.dump.charCodeAt(0)===10?l+=":":l+=": ",h+=l+=e.dump));e.tag=d,e.dump=h||"{}"}function mo(e,t,r){var i,a,o,s,n,c;for(o=0,s=(a=r?e.explicitTypes:e.implicitTypes).length;o<s;o+=1)if(((n=a[o]).instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(c=e.styleMap[n.tag]||n.defaultStyle,ch.call(n.represent)==="[object Function]")i=n.represent(t,c);else{if(!dh.call(n.represent,c))throw new Nt("!<"+n.tag+'> tag resolver accepts not "'+c+'" style');i=n.represent[c](t,c)}e.dump=i}return!0}return!1}function oe(e,t,r,i,a,o,s){e.tag=null,e.dump=r,mo(e,r,!1)||mo(e,r,!0);var n,c=ch.call(e.dump),l=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var h,d,p=c==="[object Object]"||c==="[object Array]";if(p&&(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(p&&d&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(Th(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(Sh(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?fo(e,t-1,e.dump,a):fo(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(wh(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 Nt("unacceptable kind of an object to dump "+c)}e.tag!=="?"&&bh(e,e.dump,t,o,l)}e.tag!==null&&e.tag!=="?"&&(n=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),n=e.tag[0]==="!"?"!"+n:n.slice(0,18)==="tag:yaml.org,2002:"?"!!"+n.slice(18):"!<"+n+">",e.dump=n+" "+e.dump)}return!0}function Bh(e,t){var r,i,a=[],o=[];for(Fi(e,a,o),r=0,i=o.length;r<i;r+=1)t.duplicates.push(a[o[r]]);t.usedDuplicates=new Array(i)}function Fi(e,t,r){var i,a,o;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,o=e.length;a<o;a+=1)Fi(e[a],t,r);else for(a=0,o=(i=Object.keys(e)).length;a<o;a+=1)Fi(e[i[a]],t,r)}u(xh,"chooseScalarStyle"),u(bh,"writeScalar"),u(uo,"blockHeader"),u(po,"dropEndingNewline"),u(Ch,"foldString"),u(go,"foldLine"),u(kh,"escapeString"),u(wh,"writeFlowSequence"),u(fo,"writeBlockSequence"),u(Sh,"writeFlowMapping"),u(Th,"writeBlockMapping"),u(mo,"detectType"),u(oe,"writeNode"),u(Bh,"getDuplicateReferences"),u(Fi,"inspectNode"),u(function(e,t){var r=new gh(t=t||{});r.noRefs||Bh(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),oe(r,0,i,!0,!0)?r.dump+`
|
112
|
+
`:""},"dump$1"),u(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 Ht;vn=Bl,Un=Rg.load,Ht={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Xr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=mt(e),t=mt(t);const[r,i]=[e.x,e.y],[a,o]=[t.x,t.y],s=a-r,n=o-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}u(Xr,"calculateDeltaAndAngle");let vh,Lh,mt,Mh,We,_h,Y,or,St;mt=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),An=u(e=>({x:u(function(t,r,i){let a=0;const o=mt(i[0]).x<mt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ht,e.arrowTypeStart)){const{angle:p,deltaX:g}=Xr(i[0],i[1]);a=Ht[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ht,e.arrowTypeEnd)){const{angle:p,deltaX:g}=Xr(i[i.length-1],i[i.length-2]);a=Ht[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const s=Math.abs(mt(t).x-mt(i[i.length-1]).x),n=Math.abs(mt(t).y-mt(i[i.length-1]).y),c=Math.abs(mt(t).x-mt(i[0]).x),l=Math.abs(mt(t).y-mt(i[0]).y),h=Ht[e.arrowTypeStart],d=Ht[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="right"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+1-c;p*=o==="right"?-1:1,a+=p}return mt(t).x+a},"x"),y:u(function(t,r,i){let a=0;const o=mt(i[0]).y<mt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ht,e.arrowTypeStart)){const{angle:p,deltaY:g}=Xr(i[0],i[1]);a=Ht[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ht,e.arrowTypeEnd)){const{angle:p,deltaY:g}=Xr(i[i.length-1],i[i.length-2]);a=Ht[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const s=Math.abs(mt(t).y-mt(i[i.length-1]).y),n=Math.abs(mt(t).x-mt(i[i.length-1]).x),c=Math.abs(mt(t).y-mt(i[0]).y),l=Math.abs(mt(t).x-mt(i[0]).x),h=Ht[e.arrowTypeStart],d=Ht[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="up"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+1-c;p*=o==="up"?-1:1,a+=p}return mt(t).y+a},"y")}),"getLineFunctionsWithOffset"),hi=u(({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"),Mh=u(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),We=u(e=>{const t=_h([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),_h=u(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"),xa=u(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=u(e=>{const{stylesArray:t}=We(e),r=[],i=[],a=[],o=[];return t.forEach(s=>{const n=s[0];xa(n)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),n.includes("stroke")&&a.push(s.join(":")+" !important"),n==="fill"&&o.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:o}},"styles2String"),Y=u((e,t)=>{var n;const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:s}=We(e);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:((n=s.get("stroke-width"))==null?void 0:n.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),or={},St={};let Fh,Ah,Eh,yo,$h,Oh;Wn=function(){if(Lh)return or;Lh=1,Object.defineProperty(or,"__esModule",{value:!0}),or.sanitizeUrl=void 0;var e=(vh||(vh=1,Object.defineProperty(St,"__esModule",{value:!0}),St.BLANK_URL=St.relativeFirstCharacters=St.whitespaceEscapeCharsRegex=St.urlSchemeRegex=St.ctrlCharactersRegex=St.htmlCtrlEntityRegex=St.htmlEntitiesRegex=St.invalidProtocolRegex=void 0,St.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,St.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,St.htmlCtrlEntityRegex=/&(newline|tab);/gi,St.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,St.urlSchemeRegex=/^.+(:|:)/gim,St.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,St.relativeFirstCharacters=[".","/"],St.BLANK_URL="about:blank"),St);function t(i){return i.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,function(a,o){return String.fromCharCode(o)})}function r(i){try{return decodeURIComponent(i)}catch{return i}}return or.sanitizeUrl=function(i){if(!i)return e.BLANK_URL;var a,o=r(i.trim());do a=(o=r(o=t(o).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||o.match(e.htmlEntitiesRegex)||o.match(e.htmlCtrlEntityRegex)||o.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var s=o;if(!s)return e.BLANK_URL;if(function(p){return e.relativeFirstCharacters.indexOf(p[0])>-1}(s))return s;var n=s.trimStart(),c=n.match(e.urlSchemeRegex);if(!c)return s;var l=c[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(l))return e.BLANK_URL;var h=n.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return h;if(l==="http:"||l==="https:"){if(!function(p){return URL.canParse(p)}(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},or}(),$p="\u200B",Fh={curveBasis:Cn,curveBasisClosed:By,curveBasisOpen:Ty,curveBumpX:Kn,curveBumpY:Qn,curveBundle:Sy,curveCardinalClosed:wy,curveCardinalOpen:ky,curveCardinal:Ap,curveCatmullRomClosed:Cy,curveCatmullRomOpen:by,curveCatmullRom:Fp,curveLinear:bn,curveLinearClosed:xy,curveMonotoneX:_p,curveMonotoneY:Mp,curveNatural:Lp,curveStep:vp,curveStepAfter:Bp,curveStepBefore:Tp},Ah=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Eh=u(function(e,t){const r=yo(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(n=>n.args);zr(s),i=Bt(i,[...s])}else i=r.args;if(!i)return;let a=gi(e,t);const o="config";return i[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),yo=u(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Ah.source})(?=[}][%]{2}).*
|
113
|
+
`,"ig");let o;e=e.trim().replace(a,"").replace(/'/gm,'"'),$.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);const s=[];for(;(o=tr.exec(e))!==null;)if(o.index===tr.lastIndex&&tr.lastIndex++,o&&!t||t&&((r=o[1])==null?void 0:r.match(t))||t&&((i=o[2])==null?void 0:i.match(t))){const n=o[1]?o[1]:o[2],c=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;s.push({type:n,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"),$h=u(function(e){return e.replace(tr,"")},"removeDirectives"),Oh=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function xo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Fh[r]??t}function Dh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Wn.sanitizeUrl(r):r}u(xo,"interpolateToCurve"),u(Dh,"formatUrl");var jg=u((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let o=window;for(let s=0;s<i;s++)if(o=o[r[s]],!o)return void $.error(`Function name: ${e} not found in window`);o[a](...t)},"runFunc");function bo(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function Ih(e){let t,r=0;return e.forEach(i=>{r+=bo(i,t),t=i}),Co(e,r/2)}function Ph(e){return e.length===1?e[0]:Ih(e)}u(bo,"distance"),u(Ih,"traverseEdge"),u(Ph,"calcLabelPosition");var zh=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Co=u((e,t)=>{let r,i=t;for(const a of e){if(r){const o=bo(a,r);if(o===0)return r;if(o<i)i-=o;else{const s=i/o;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:zh((1-s)*r.x+s*a.x,5),y:zh((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Hg=u((e,t,r)=>{$.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=Co(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+i.x)/2,s.y=-Math.cos(o)*a+(t[0].y+i.y)/2,s},"calcCardinalityPosition");function Rh(e,t,r){const i=structuredClone(r);$.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=Co(i,25+e),o=10+.5*e,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),n={x:0,y:0};return t==="start_left"?(n.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(n.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(n.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(n.x=Math.sin(s)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2),n}ya=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}},u(Rh,"calcTerminalLabelPosition"),u(ya,"getStylesFromArray");let ko;ko=0,Mn=u(()=>(ko++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ko),"generateId");function qh(e){let t="";const r="0123456789abcdef";for(let i=0;i<e;i++)t+=r.charAt(Math.floor(16*Math.random()));return t}u(qh,"makeRandomHex");let Nh,Wh,jh;Tn=u(e=>qh(e.length),"random"),Nh=u(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"),Wh=u(function(e,t){const r=t.text.replace(Ee.lineBreakRegex," "),[,i]=_r(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 o=a.append("tspan");return o.attr("x",t.x+2*t.textMargin),o.attr("fill",t.fill),o.text(r),a},"drawSimpleText"),Gn=xn((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ee.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let o="";return i.forEach((s,n)=>{const c=re(`${s} `,r),l=re(o,r);if(c>t){const{hyphenatedStrings:h,remainingWord:d}=jh(s,t,"-",r);a.push(o,...h),o=d}else l+c>=t?(a.push(o),o=s):o=[o,s].filter(Boolean).join(" ");n+1===i.length&&a.push(o)}),a.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),jh=xn((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],o=[];let s="";return a.forEach((n,c)=>{const l=`${s}${n}`;if(re(l,i)>=t){const h=c+1,d=a.length===h,p=`${l}${r}`;o.push(d?l:p),s=""}else s=l}),{hyphenatedStrings:o,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`),ka=function(e,t){return wo(e,t).height},re=function(e,t){return wo(e,t).width},u(ka,"calculateTextHeight"),u(re,"calculateTextWidth");var Ai,wo=xn((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,o]=_r(r),s=["sans-serif",i],n=e.split(Ee.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 p=0;const g={width:0,height:0,lineHeight:0};for(const f of n){const m=Nh();m.text=f||"\u200B";const x=Wh(h,m).style("font-size",o).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)),p=Math.round(y.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}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}`),Yg=(wr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},u(wr,"InitIDGenerator"),wr),Ug=u(function(e){return Ai=Ai||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ai.innerHTML=e,unescape(Ai.textContent)},"entityDecode");function So(e){return"str"in e}u(So,"isDetailedError");let Hh;Hh=u((e,t,r,i)=>{var o;if(!i)return;const a=(o=e.node())==null?void 0:o.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"),_r=u(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 cy({},e,t)},u(si,"cleanAndMerge");let Yh;Kt={assignWithDepth:Bt,wrapLabel:Gn,calculateTextHeight:ka,calculateTextWidth:re,calculateTextDimensions:wo,cleanAndMerge:si,detectInit:Eh,detectDirective:yo,isSubstringInArray:Oh,interpolateToCurve:xo,calcLabelPosition:Ph,calcCardinalityPosition:Hg,calcTerminalLabelPosition:Rh,formatUrl:Dh,getStylesFromArray:ya,generateId:Mn,random:Tn,runFunc:jg,entityDecode:Ug,insertTitle:Hh,parseFontSize:_r,InitIDGenerator:Yg},Yh=u(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"),ke=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),jp=u((e,t,{counter:r=0,prefix:i,suffix:a},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Rt(e){return e??null}u(Rt,"handleUndefinedAttr");const Vg=Object.freeze({left:0,top:0,width:16,height:16}),Ei=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Uh=Object.freeze({...Vg,...Ei}),Gg=Object.freeze({...Uh,body:"",hidden:!1}),Xg=Object.freeze({width:null,height:null}),Zg=Object.freeze({...Xg,...Ei}),To=/^[a-z0-9]+(-[a-z0-9]+)*$/,Bo=(e,t)=>!!e&&!(e.provider!==""&&!e.provider.match(To)||!(t&&e.prefix===""||e.prefix.match(To))||!e.name.match(To));function Vh(e,t){const r=function(i,a){const o={};!i.hFlip!=!a.hFlip&&(o.hFlip=!0),!i.vFlip!=!a.vFlip&&(o.vFlip=!0);const s=((i.rotate||0)+(a.rotate||0))%4;return s&&(o.rotate=s),o}(e,t);for(const i in Gg)i in Ei?i in e&&!(i in r)&&(r[i]=Ei[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Gh(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let o={};function s(n){o=Vh(i[n]||a[n],o)}return s(t),r.forEach(s),Vh(e,o)}function Kg(e,t){if(e.icons[t])return Gh(e,t,[]);const r=function(i,a){const o=i.icons,s=i.aliases||Object.create(null),n=Object.create(null);return(a||Object.keys(o).concat(Object.keys(s))).forEach(function c(l){if(o[l])return n[l]=[];if(!(l in n)){n[l]=null;const h=s[l]&&s[l].parent,d=h&&c(h);d&&(n[l]=[h].concat(d))}return n[l]}),n}(e,[t])[t];return r?Gh(e,t,r):null}const Qg=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Jg=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Xh(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(Qg);if(i===null||!i.length)return e;const a=[];let o=i.shift(),s=Jg.test(o);for(;;){if(s){const n=parseFloat(o);isNaN(n)?a.push(o):a.push(Math.ceil(n*t*r)/r)}else a.push(o);if(o=i.shift(),o===void 0)return a.join("");s=!s}}const tf=/\sid="(\S+)"/g,ef="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let rf=0;function Zh(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?n.concat(l.map(function(h){var d,p;return(p=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(a.length){var o=new RegExp(`
|
114
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(o,`
|
115
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(n,c){var l=s.match(/(?:^|\n)( *)$/),h=l?l[1]:"",d=n;typeof n=="string"&&n.includes(`
|
116
|
+
`)&&(d=String(n).split(`
|
117
|
+
`).map(function(p,g){return g===0?p:""+h+p}).join(`
|
118
|
+
`)),s+=d+i[c+1]}),s}let $i,vo,Lo,Kh;zn={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},$i=new Map,vo=new Map,Pn=u(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)vo.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.');$i.set(t.name,t.icons)}}},"registerIconPacks"),Lo=u(async(e,t)=>{const r=((s,n,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 Bo(m)?m:null}const d=h[0],p=d.split("-");if(p.length>1){const g={provider:l,prefix:p.shift(),name:p.join("-")};return Bo(g)?g:null}if(c&&l===""){const g={provider:l,prefix:"",name:d};return Bo(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=$i.get(i);if(!a){const s=vo.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},$i.set(i,a)}catch(n){throw $.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=Kg(a,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Kh=u(async e=>{try{return await Lo(e),!0}catch{return!1}},"isIconAvailable"),Xe=u(async(e,t,r)=>{let i;try{i=await Lo(e,t==null?void 0:t.fallbackPrefix)}catch(s){$.error(s),i=zn}const a=function(s,n){const c={...Uh,...s},l={...Zg,...n},h={left:c.left,top:c.top,width:c.width,height:c.height};let d=c.body;[c,l].forEach(v=>{const C=[],S=v.hFlip,I=v.vFlip;let D,P=v.rotate;switch(S?I?P+=2:(C.push("translate("+(h.width+h.left).toString()+" "+(0-h.top).toString()+")"),C.push("scale(-1 1)"),h.top=h.left=0):I&&(C.push("translate("+(0-h.left).toString()+" "+(h.height+h.top).toString()+")"),C.push("scale(1 -1)"),h.top=h.left=0),P<0&&(P-=4*Math.floor(P/4)),P%=4,P){case 1:D=h.height/2+h.top,C.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:C.unshift("rotate(180 "+(h.width/2+h.left).toString()+" "+(h.height/2+h.top).toString()+")");break;case 3:D=h.width/2+h.left,C.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}P%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)),C.length&&(d=function(z,F,B){const L=function(E,O="defs"){let J="";const it=E.indexOf("<"+O);for(;it>=0;){const st=E.indexOf(">",it),rt=E.indexOf("</"+O);if(st===-1||rt===-1)break;const bt=E.indexOf(">",rt);if(bt===-1)break;J+=E.slice(st+1,rt).trim(),E=E.slice(0,it).trim()+E.slice(bt+1)}return{defs:J,content:E}}(z);return A=L.defs,_=F+L.content+B,A?"<defs>"+A+"</defs>"+_:_;var A,_}(d,'<g transform="'+C.join(" ")+'">',"</g>"))});const p=l.width,g=l.height,f=h.width,m=h.height;let x,y;p===null?(y=g===null?"1em":g==="auto"?m:g,x=Xh(y,f/m)):(x=p==="auto"?f:p,y=g===null?Xh(x,m/f):g==="auto"?m:g);const b={},w=(v,C)=>{(S=>S==="unset"||S==="undefined"||S==="none")(C)||(b[v]=C.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,n){let c=s.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in n)c+=" "+l+'="'+n[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+c+">"+s+"</svg>"}(function(s,n=ef){const c=[];let l;for(;l=tf.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 p=typeof n=="function"?n(d):n+(rf++).toString(),g=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");s=s.replace(new RegExp('([#;"])('+g+')([")]|\\.[a-z])',"g"),"$1"+p+h+"$3")}),s=s.replace(new RegExp(h,"g"),"")}(a.body),{...a.attributes,...r})},"getIconSVG");function Qh(e,{markdownAutoWrap:t}){const r=Zh(e.replace(/<br\/>/g,`
|
119
|
+
`).replace(/\n{2,}/g,`
|
120
|
+
`));return t===!1?r.replace(/ /g," "):r}function Jh(e,t={}){const r=Qh(e,t),i=Sp.lexer(r),a=[[]];let o=0;function s(n,c="normal"){n.type==="text"?n.text.split(`
|
121
|
+
`).forEach((l,h)=>{h!==0&&(o++,a.push([])),l.split(" ").forEach(d=>{(d=d.replace(/'/g,"'"))&&a[o].push({content:d,type:c})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(l=>{s(l,n.type)}):n.type==="html"&&a[o].push({content:n.text,type:"normal"})}return u(s,"processNode"),i.forEach(n=>{var c;n.type==="paragraph"?(c=n.tokens)==null||c.forEach(l=>{s(l)}):n.type==="html"&&a[o].push({content:n.text,type:"normal"})}),a}function tc(e,{markdownAutoWrap:t}={}){const r=Sp.lexer(e);function i(a){var o,s,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(i).join("")}</strong>`:a.type==="em"?`<em>${(s=a.tokens)==null?void 0:s.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:`Unsupported markdown: ${a.type}`}return u(i,"output"),r.map(i).join("")}function ec(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function rc(e,t){return Mo(e,[],ec(t.content),t.type)}function Mo(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...o]=r,s=[...t,a];return e([{content:s.join(""),type:i}])?Mo(e,s,o,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function ic(e,t){if(e.some(({content:r})=>r.includes(`
|
122
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Oi(e,t)}function Oi(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 o=e.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(o),t(s))return Oi(e,t,r,s);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,c]=rc(t,o);r.push([n]),c.content&&e.unshift(c)}return Oi(e,t,r)}function _o(e,t){t&&e.attr("style",t)}async function ac(e,t,r,i,a=!1){const o=e.append("foreignObject");o.attr("width",10*r+"px"),o.attr("height",10*r+"px");const s=o.append("xhtml:div");let n=t.label;t.label&&Ae(t.label)&&(n=await li(t.label.replace(Ee.lineBreakRegex,`
|
123
|
+
`),ut()));const c=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");l.html(n),_o(l,t.labelStyle),l.attr("class",`${c} ${i}`),_o(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()),o.node()}function Di(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 oc(e,t,r){const i=e.append("text"),a=Di(i,1,t);Ii(a,r);const o=a.node().getComputedTextLength();return i.remove(),o}En=function(e,t,r){var s;const i=e.append("text"),a=Di(i,1,t);Ii(a,[{content:r,type:"normal"}]);const o=(s=a.node())==null?void 0:s.getBoundingClientRect();return o&&i.remove(),o};function nc(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let n=0;for(const c of r){const l=u(d=>oc(a,1.1,d)<=e,"checkWidth"),h=l(c)?[c]:ic(c,l);for(const d of h)Ii(Di(s,n,1.1),d),n++}if(i){const c=s.node().getBBox(),l=2;return o.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 Ii(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)})}ma=async function(e){const t=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,o)=>(t.push((async()=>{const s=`${a}:${o}`;return await Kh(s)?await Xe(s,void 0,{class:"label-icon"}):`<i class='${jr(i).replace(":"," ")}'></i>`})()),i));const r=await Promise.all(t);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??"")},u(Qh,"preprocessMarkdown"),u(Jh,"markdownToLines"),u(tc,"markdownToHTML"),u(ec,"splitTextToChars"),u(rc,"splitWordToFitWidth"),u(Mo,"splitWordToFitWidthRecursion"),u(ic,"splitLineToFitWidth"),u(Oi,"splitLineToFitWidthRecursion"),u(_o,"applyStyle"),u(ac,"addHtmlSpan"),u(Di,"createTspan"),u(oc,"computeWidthOfText"),u(En,"computeDimensionOfText"),u(nc,"createFormattedText"),u(Ii,"updateTextContentAndStyles"),u(ma,"replaceIconSubstring"),ue=u(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:o=!0,isNode:s=!0,width:n=200,addSvgBackground:c=!1}={},l)=>{if($.debug("XYZ createText",t,r,i,a,o,s,"addSvgBackground: ",c),o){const h=tc(t,l),d=await ma(ke(h)),p=t.replace(/\\\\/g,"\\"),g={isNode:s,label:Ae(t)?p:d,labelStyle:r.replace("fill:","color:")};return await ac(e,g,n,a,c)}{const h=nc(n,e,Jh(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 p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).select("text").attr("style",p)}return h}},"createText");function Fo(e,t,r){if(e&&e.length){const[i,a]=t,o=Math.PI/180*r,s=Math.cos(o),n=Math.sin(o);for(const c of e){const[l,h]=c;c[0]=(l-i)*s-(h-a)*n+i,c[1]=(l-i)*n+(h-a)*s+a}}}function af(e,t){return e[0]===t[0]&&e[1]===t[1]}function of(e,t,r,i=1){const a=r,o=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const l of s)Fo(l,n,a);const c=function(l,h,d){const p=[];for(const b of l){const w=[...b];af(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}const g=[];h=Math.max(h,.1);const f=[];for(const b of p)for(let w=0;w<b.length-1;w++){const M=b[w],v=b[w+1];if(M[1]!==v[1]){const C=Math.min(M[1],v[1]);f.push({ymin:C,ymax:Math.max(M[1],v[1]),x:C===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,o,i);if(a){for(const l of s)Fo(l,n,-a);(function(l,h,d){const p=[];l.forEach(g=>p.push(...g)),Fo(p,h,d)})(c,n,-a)}return c}function Zr(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 o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),of(e,a,i,o||1)}class Ao{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Zr(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 Pi(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 nf extends Ao{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Zr(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,s=[],n=.5*i*Math.cos(o),c=.5*i*Math.sin(o);for(const[l,h]of a)Pi([l,h])&&s.push([[l[0]-n,l[1]+c],[...h]],[[l[0]+n,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class sf extends Ao{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,a);return i.ops=i.ops.concat(o.ops),i}}class lf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Zr(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 o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const s=a/4;for(const n of t){const c=Pi(n),l=c/a,h=Math.ceil(l)-1,d=c-h*a,p=(n[0][0]+n[1][0])/2-a/4,g=Math.min(n[0][1],n[1][1]);for(let f=0;f<h;f++){const m=g+d+f*a,x=p-s+2*Math.random()*s,y=m-s+2*Math.random()*s,b=this.helper.ellipse(x,y,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class hf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Zr(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,o=[];return t.forEach(s=>{const n=Pi(s),c=Math.floor(n/(i+a)),l=(n+a-c*(i+a))/2;let h=s[0],d=s[1];h[0]>d[0]&&(h=s[1],d=s[0]);const p=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(p)+l*Math.cos(p),h[1]+f*Math.sin(p)+l*Math.sin(p)],y=[h[0]+m*Math.cos(p)+l*Math.cos(p),h[1]+m*Math.sin(p)+l*Math.sin(p)];o.push(...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],r))}}),o}}class cf{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,o=Zr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(o=>{const s=Pi(o),n=Math.round(s/(2*r));let c=o[0],l=o[1];c[0]>l[0]&&(c=o[1],l=o[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let d=0;d<n;d++){const p=2*d*r,g=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+p*Math.cos(h),c[1]+p*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 Wt={};class df{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const zi={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 Eo(e,t){return e.type===t}function $o(e){const t=[],r=function(s){const n=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.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[];n[n.length]={type:1,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return n[n.length]={type:2,text:""},n}(e);let i="BOD",a=0,o=r[a];for(;!Eo(o,2);){let s=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return $o("M0,0"+e);a++,s=zi[o.text],i=o.text}else Eo(o,1)?s=zi[i]:(a++,s=zi[o.text],i=o.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(!Eo(l,1))throw new Error("Param not a number: "+i+","+l.text);n[n.length]=+l.text}if(typeof zi[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:n};t.push(c),a+=s,o=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function sc(e){let t=0,r=0,i=0,a=0;const o=[];for(const{key:s,data:n}of e)switch(s){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=a}return o}function lc(e){const t=[];let r="",i=0,a=0,o=0,s=0,n=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[o,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=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,p=0;r==="C"||r==="S"?(d=i+(i-n),p=a+(a-c)):(d=i,p=a),t.push({key:"C",data:[d,p,...h]}),n=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[d,p]=h;let g=0,f=0;r==="Q"||r==="T"?(g=i+(i-n),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=p+2*(f-p)/3;t.push({key:"C",data:[m,x,y,b,d,p]}),n=g,c=f,i=d,a=p;break}case"Q":{const[d,p,g,f]=h,m=i+2*(d-i)/3,x=a+2*(p-a)/3,y=g+2*(d-g)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[m,x,y,b,g,f]}),n=d,c=p,i=g,a=f;break}case"A":{const d=Math.abs(h[0]),p=Math.abs(h[1]),g=h[2],f=h[3],m=h[4],x=h[5],y=h[6];d===0||p===0?(t.push({key:"C",data:[i,a,x,y,x,y]}),i=x,a=y):i===x&&a===y||(hc(i,a,x,y,d,p,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=o,a=s}r=l}return t}function Kr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function hc(e,t,r,i,a,o,s,n,c,l){const h=(d=s,Math.PI*d/180);var d;let p=[],g=0,f=0,m=0,x=0;if(l)[g,f,m,x]=l;else{[e,t]=Kr(e,t,-h),[r,i]=Kr(r,i,-h);const B=(e-r)/2,L=(t-i)/2;let A=B*B/(a*a)+L*L/(o*o);A>1&&(A=Math.sqrt(A),a*=A,o*=A);const _=a*a,E=o*o,O=_*E-_*L*L-E*B*B,J=_*L*L+E*B*B,it=(n===c?-1:1)*Math.sqrt(Math.abs(O/J));m=it*a*L/o+(e+r)/2,x=it*-o*B/a+(t+i)/2,g=Math.asin(parseFloat(((t-x)/o).toFixed(9))),f=Math.asin(parseFloat(((i-x)/o).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,A=i;f=c&&f>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,p=hc(r=m+a*Math.cos(f),i=x+o*Math.sin(f),L,A,a,o,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),C=Math.tan(y/4),S=4/3*a*C,I=4/3*o*C,D=[e,t],P=[e+S*w,t-I*b],z=[r+S*v,i-I*M],F=[r,i];if(P[0]=2*D[0]-P[0],P[1]=2*D[1]-P[1],l)return[P,z,F].concat(p);{p=[P,z,F].concat(p);const B=[];for(let L=0;L<p.length;L+=3){const A=Kr(p[L][0],p[L][1],h),_=Kr(p[L+1][0],p[L+1][1],h),E=Kr(p[L+2][0],p[L+2][1],h);B.push([A[0],A[1],_[0],_[1],E[0],E[1]])}return B}}const uf={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,r){return qi(e,t,r)},ellipse:function(e,t,r,i,a){return Oo(e,t,a,uc(r,i,a)).opset},doubleLineOps:function(e,t,r,i,a){return ve(e,t,r,i,a,!0)}};function cc(e,t,r,i,a){return{type:"path",ops:ve(e,t,r,i,a)}}function Ri(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let o=0;o<i-1;o++)a.push(...ve(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&a.push(...ve(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?cc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function dc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ni(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Ni(r[0],1.5*(1+.22*t.roughness),fc(t));for(let o=1;o<r.length;o++){const s=r[o];if(s.length){const n=Ni(s,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Ni(s,1.5*(1+.22*t.roughness),fc(t));for(const l of n)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 uc(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)),o=2*Math.PI/a;let s=Math.abs(e/2),n=Math.abs(t/2);const c=1-r.curveFitting;return s+=Q(s*c,r),n+=Q(n*c,r),{increment:o,rx:s,ry:n}}function Oo(e,t,r,i){const[a,o]=yc(i.increment,e,t,i.rx,i.ry,1,i.increment*qi(.1,qi(.4,1,r),r),r);let s=Wi(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=yc(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=Wi(n,null,r);s=s.concat(c)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function pc(e,t,r,i,a,o,s,n,c){const l=e,h=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=Q(.01*d,c),p+=Q(.01*p,c);let g=a,f=o;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=xc(x,l,h,d,p,g,f,1,c);if(!c.disableMultiStroke){const b=xc(x,l,h,d,p,g,f,1.5,c);y.push(...b)}return s&&(n?y.push(...ve(l,h,l+d*Math.cos(g),h+p*Math.sin(g),c),...ve(l,h,l+d*Math.cos(f),h+p*Math.sin(f),c)):y.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+d*Math.cos(g),h+p*Math.sin(g)]})),{type:"path",ops:y}}function gc(e,t){const r=lc(sc($o(e))),i=[];let a=[0,0],o=[0,0];for(const{key:s,data:n}of r)switch(s){case"M":o=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...ve(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[c,l,h,d,p,g]=n;i.push(...pf(c,l,h,d,p,g,o,t)),o=[p,g];break}case"Z":i.push(...ve(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]]}return{type:"path",ops:i}}function Do(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+Q(a,t),i[0][1]+Q(a,t)]});for(let s=1;s<o;s++)r.push({op:"lineTo",data:[i[s][0]+Q(a,t),i[s][1]+Q(a,t)]})}}return{type:"fillPath",ops:r}}function nr(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!Wt[a])switch(a){case"zigzag":Wt[a]||(Wt[a]=new nf(i));break;case"cross-hatch":Wt[a]||(Wt[a]=new sf(i));break;case"dots":Wt[a]||(Wt[a]=new lf(i));break;case"dashed":Wt[a]||(Wt[a]=new hf(i));break;case"zigzag-line":Wt[a]||(Wt[a]=new cf(i));break;default:a="hachure",Wt[a]||(Wt[a]=new Ao(i))}return Wt[a]}(t,uf).fillPolygons(e,t)}function fc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function mc(e){return e.randomizer||(e.randomizer=new df(e.seed||0)),e.randomizer.next()}function qi(e,t,r,i=1){return r.roughness*i*(mc(r)*(t-e)+e)}function Q(e,t,r=1){return qi(-e,e,t,r)}function ve(e,t,r,i,a,o=!1){const s=o?a.disableMultiStrokeFill:a.disableMultiStroke,n=Io(e,t,r,i,a,!0,!1);if(s)return n;const c=Io(e,t,r,i,a,!0,!0);return n.concat(c)}function Io(e,t,r,i,a,o,s){const n=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(n);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=c/10);const d=h/2,p=.2+.2*mc(a);let g=a.bowing*a.maxRandomnessOffset*(i-t)/200,f=a.bowing*a.maxRandomnessOffset*(e-r)/200;g=Q(g,a,l),f=Q(f,a,l);const m=[],x=()=>Q(d,a,l),y=()=>Q(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:Q(h,a,l)),t+(b?0:Q(h,a,l))]}),s?m.push({op:"bcurveTo",data:[g+e+(r-e)*p+x(),f+t+(i-t)*p+x(),g+e+2*(r-e)*p+x(),f+t+2*(i-t)*p+x(),r+(b?0:x()),i+(b?0:x())]}):m.push({op:"bcurveTo",data:[g+e+(r-e)*p+y(),f+t+(i-t)*p+y(),g+e+2*(r-e)*p+y(),f+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}),m}function Ni(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]),a===e.length-1&&i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]);return Wi(i,null,r)}function Wi(e,t,r){const i=e.length,a=[];if(i>3){const o=[],s=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const c=e[n];o[0]=[c[0],c[1]],o[1]=[c[0]+(s*e[n+1][0]-s*e[n-1][0])/6,c[1]+(s*e[n+1][1]-s*e[n-1][1])/6],o[2]=[e[n+1][0]+(s*e[n][0]-s*e[n+2][0])/6,e[n+1][1]+(s*e[n][1]-s*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[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(...Io(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return a}function yc(e,t,r,i,a,o,s,n){const c=[],l=[];if(n.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=Q(.5,n)-Math.PI/2;l.push([Q(o,n)+t+.9*i*Math.cos(h-e),Q(o,n)+r+.9*a*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let p=h;p<d;p+=e){const g=[Q(o,n)+t+i*Math.cos(p),Q(o,n)+r+a*Math.sin(p)];c.push(g),l.push(g)}l.push([Q(o,n)+t+i*Math.cos(h+2*Math.PI+.5*s),Q(o,n)+r+a*Math.sin(h+2*Math.PI+.5*s)]),l.push([Q(o,n)+t+.98*i*Math.cos(h+s),Q(o,n)+r+.98*a*Math.sin(h+s)]),l.push([Q(o,n)+t+.9*i*Math.cos(h+.5*s),Q(o,n)+r+.9*a*Math.sin(h+.5*s)])}return[l,c]}function xc(e,t,r,i,a,o,s,n,c){const l=o+Q(.1,c),h=[];h.push([Q(n,c)+t+.9*i*Math.cos(l-e),Q(n,c)+r+.9*a*Math.sin(l-e)]);for(let d=l;d<=s;d+=e)h.push([Q(n,c)+t+i*Math.cos(d),Q(n,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)]),Wi(h,0,c)}function pf(e,t,r,i,a,o,s,n){const c=[],l=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,p=n.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]+(p?0:Q(l[0],n)),s[1]+(p?0:Q(l[0],n))]}),h=p?[a,o]:[a+Q(l[g],n),o+Q(l[g],n)],c.push({op:"bcurveTo",data:[e+Q(l[g],n),t+Q(l[g],n),r+Q(l[g],n),i+Q(l[g],n),h[0],h[1]]});return c}function Qr(e){return[...e]}function bc(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(Qr(e[0]),Qr(e[1]),Qr(e[2]),Qr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const o=[],s=1-t;i.push(Qr(a[0]));for(let n=1;n+2<a.length;n++){const c=a[n];o[0]=[c[0],c[1]],o[1]=[c[0]+(s*a[n+1][0]-s*a[n-1][0])/6,c[1]+(s*a[n+1][1]-s*a[n-1][1])/6],o[2]=[a[n+1][0]+(s*a[n][0]-s*a[n+2][0])/6,a[n+1][1]+(s*a[n][1]-s*a[n+2][1])/6],o[3]=[a[n+1][0],a[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function ji(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function gf(e,t,r){const i=ji(t,r);if(i===0)return ji(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)),ji(e,je(t,r,a))}function je(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Po(e,t,r,i){const a=i||[];if(function(n,c){const l=n[c+0],h=n[c+1],d=n[c+2],p=n[c+3];let g=3*h[0]-2*l[0]-p[0];g*=g;let f=3*h[1]-2*l[1]-p[1];f*=f;let m=3*d[0]-2*p[0]-l[0];m*=m;let x=3*d[1]-2*p[1]-l[1];return x*=x,g<m&&(g=m),f<x&&(f=x),g+f}(e,t)<r){const n=e[t+0];a.length?(o=a[a.length-1],s=n,Math.sqrt(ji(o,s))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],d=e[t+3],p=je(c,l,.5),g=je(l,h,.5),f=je(h,d,.5),m=je(p,g,.5),x=je(g,f,.5),y=je(m,x,.5);Po([c,p,m,y],0,r,a),Po([y,x,f,d],0,r,a)}var o,s;return a}function ff(e,t){return Hi(e,0,e.length,t)}function Hi(e,t,r,i,a){const o=a||[],s=e[t],n=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const d=gf(e[h],s,n);d>c&&(c=d,l=h)}return Math.sqrt(c)>i?(Hi(e,t,l+1,i,o),Hi(e,l,r,i,o)):(o.length||o.push(s),o.push(n)),o}function zo(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let o=0;o<a;o++)Po(e,3*o,t,i);return r&&r>0?Hi(i,0,i.length,r):i}const Yt="none";class mf{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,o){const s=this._o(o);return this._d("line",[cc(t,r,i,a,s)],s)}rectangle(t,r,i,a,o){const s=this._o(o),n=[],c=function(l,h,d,p,g){return function(f,m){return Ri(f,!0,m)}([[l,h],[l+d,h],[l+d,h+p],[l,h+p]],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"?n.push(Do([l],s)):n.push(nr([l],s))}return s.stroke!==Yt&&n.push(c),this._d("rectangle",n,s)}ellipse(t,r,i,a,o){const s=this._o(o),n=[],c=uc(i,a,s),l=Oo(t,r,s,c);if(s.fill)if(s.fillStyle==="solid"){const h=Oo(t,r,s,c).opset;h.type="fillPath",n.push(h)}else n.push(nr([l.estimatedPoints],s));return s.stroke!==Yt&&n.push(l.opset),this._d("ellipse",n,s)}circle(t,r,i,a){const o=this.ellipse(t,r,i,i,a);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ri(t,!1,i)],i)}arc(t,r,i,a,o,s,n=!1,c){const l=this._o(c),h=[],d=pc(t,r,i,a,o,s,n,!0,l);if(n&&l.fill)if(l.fillStyle==="solid"){const p=Object.assign({},l);p.disableMultiStroke=!0;const g=pc(t,r,i,a,o,s,!0,!1,p);g.type="fillPath",h.push(g)}else h.push(function(p,g,f,m,x,y,b){const w=p,M=g;let v=Math.abs(f/2),C=Math.abs(m/2);v+=Q(.01*v,b),C+=Q(.01*C,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,P=[];for(let z=S;z<=I;z+=D)P.push([w+v*Math.cos(z),M+C*Math.sin(z)]);return P.push([w+v*Math.cos(I),M+C*Math.sin(I)]),P.push([w,M]),nr([P],b)}(t,r,i,a,o,s,l));return l.stroke!==Yt&&h.push(d),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],o=dc(t,i);if(i.fill&&i.fill!==Yt)if(i.fillStyle==="solid"){const s=dc(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=[],n=t;if(n.length){const c=typeof n[0][0]=="number"?[n]:n;for(const l of c)l.length<3?s.push(...l):l.length===3?s.push(...zo(bc([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):s.push(...zo(bc(l),10,(1+i.roughness)/2))}s.length&&a.push(nr([s],i))}return i.stroke!==Yt&&a.push(o),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],o=Ri(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Do([t],i)):a.push(nr([t],i))),i.stroke!==Yt&&a.push(o),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 o=i.fill&&i.fill!=="transparent"&&i.fill!==Yt,s=i.stroke!==Yt,n=!!(i.simplification&&i.simplification<1),c=function(h,d,p){const g=lc(sc($o(h))),f=[];let m=[],x=[0,0],y=[];const b=()=>{y.length>=4&&m.push(...zo(y,1)),y=[]},w=()=>{b(),m.length&&(f.push(m),m=[])};for(const{key:v,data:C}of g)switch(v){case"M":w(),x=[C[0],C[1]],m.push(x);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!y.length){const S=m.length?m[m.length-1]:x;y.push([S[0],S[1]])}y.push([C[0],C[1]]),y.push([C[2],C[3]]),y.push([C[4],C[5]]);break;case"Z":b(),m.push([x[0],x[1]])}if(w(),!p)return f;const M=[];for(const v of f){const C=ff(v,p);C.length&&M.push(C)}return M}(t,0,n?4-4*(i.simplification||1):(1+i.roughness)/2),l=gc(t,i);if(o)if(i.fillStyle==="solid")if(c.length===1){const h=gc(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(Do(c,i));else a.push(nr(c,i));return s&&(n?c.forEach(h=>{a.push(Ri(h,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const o=typeof r=="number"&&r>=0?a.data.map(s=>+s.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const o of r){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Yt};break;case"fillPath":s={d:this.opsToPath(o),stroke:Yt,strokeWidth:0,fill:i.fill||Yt};break;case"fillSketch":s=this.fillSketch(o,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||Yt,strokeWidth:i,fill:Yt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}const Yi="http://www.w3.org/2000/svg";class yf{constructor(t,r){this.svg=t,this.gen=new mf(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Yi,"g"),s=t.options.fixedDecimalPlaceDigits;for(const n of r){let c=null;switch(n.type){case"path":c=a.createElementNS(Yi,"path"),c.setAttribute("d",this.opsToPath(n,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(Yi,"path"),c.setAttribute("d",this.opsToPath(n,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,n,i)}c&&o.appendChild(c)}return o}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const o=t.createElementNS(Yi,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,o){const s=this.gen.line(t,r,i,a,o);return this.draw(s)}rectangle(t,r,i,a,o){const s=this.gen.rectangle(t,r,i,a,o);return this.draw(s)}ellipse(t,r,i,a,o){const s=this.gen.ellipse(t,r,i,a,o);return this.draw(s)}circle(t,r,i,a){const o=this.gen.circle(t,r,i,a);return this.draw(o)}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,o,s,n=!1,c){const l=this.gen.arc(t,r,i,a,o,s,n,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,Ui,K;j=(e,t)=>new yf(e,t),et=u(async(e,t,r)=>{var d,p;let i;const a=t.useHtmlLabels||Ct((d=ut())==null?void 0:d.htmlLabels);i=r||"node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",Rt(t.labelStyle));let n;n=t.label===void 0?"":typeof t.label=="string"?t.label:t.label[0];const c=await ue(s,we(ke(n),ut()),{useHtmlLabels:a,width:t.width||((p=ut().flowchart)==null?void 0:p.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=n.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,[C=ca.fontSize]=_r(M),S=C*v+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";b(y)}u(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:o,bbox:l,halfPadding:h,label:s}},"labelHelper"),Ui=u(async(e,t,r)=>{var c,l,h,d,p,g;const i=r.useHtmlLabels||Ct((l=(c=ut())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ue(a,we(ke(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=o.getBBox();const n=r.padding/2;if(Ct((g=(p=ut())==null?void 0:p.flowchart)==null?void 0:g.htmlLabels)){const f=o.children[0],m=dt(o);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:n,label:a}},"insertLabel"),V=u((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),K=u((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 Le(e,t,r,i,a,o){const s=[],n=r-e,c=i-t,l=n/o,h=2*Math.PI/l,d=t+c/2;for(let p=0;p<=50;p++){const g=e+p/50*n,f=d+a*Math.sin(h*(g-e));s.push({x:g,y:f})}return s}function Ro(e,t,r,i,a,o){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}u(ct,"createPathFromPoints"),u(Le,"generateFullSineWavePoints"),u(Ro,"generateCirclePoints");var xf=u((e,t)=>{var r,i,a=e.x,o=e.y,s=t.x-a,n=t.y-o,c=e.width/2,l=e.height/2;return Math.abs(n)*c>Math.abs(s)*l?(n<0&&(l=-l),r=n===0?0:l*s/n,i=l):(s<0&&(c=-c),r=c,i=s===0?0:c*n/s),{x:a+r,y:o+i}},"intersectRect"),sr=xf;function Cc(e,t){t&&e.attr("style",t)}async function kc(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&Ae(e.label)&&(i=await li(e.label.replace(Ee.lineBreakRegex,`
|
124
|
+
`),ut()));const a=e.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),Cc(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()}u(Cc,"applyStyle"),u(kc,"addHtmlLabel");let wc,Me,ne,qo,Sc,Tc,Bc,vc,Lc,No;wc=u(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Ct(ut().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),$.info("vertexText"+a);const o={isNode:i,label:ke(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await kc(o)}{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.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 n 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=n.trim(),o.appendChild(c)}return o}},"createLabel"),Me=wc,ne=u((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"),qo=u(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,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),p=Ct(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await ue(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0});let m=f.getBBox();if(Ct(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:o,stroke:s,fillWeight:3,seed:a}),D=S.path(ne(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}=hi(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const S=g.select("span");S&&S.attr("style",n)}const C=M.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return sr(t,S)},{cluster:d,labelBBox:m}},"rect"),Sc=u((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,o=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).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(n){return sr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Tc=u(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:n,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 p=l.append("rect");const g=d.node().appendChild(await Me(t.label,t.labelStyle,void 0,!0));let f=g.getBBox();if(Ct(r.flowchart.htmlLabels)){const D=g.children[0],P=dt(g);f=D.getBoundingClientRect(),P.attr("width",f.width),P.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 C=t.y-t.height/2-x+f.height+2;let S;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),P=j(l),z=t.rx||t.ry?P.path(ne(M,v,y,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:c,seed:a}):P.rectangle(M,v,y,b,{seed:a});S=l.insert(()=>z,":first-child");const F=P.rectangle(M,C,y,w,{fill:D?o:s,fillStyle:D?"hachure":"solid",stroke:c,seed:a});S=l.insert(()=>z,":first-child"),p=l.insert(()=>F)}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),p.attr("class","inner").attr("x",M).attr("y",C).attr("width",y).attr("height",w);d.attr("transform",`translate(${t.x-f.width/2}, ${v+1-(Ct(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 sr(t,D)},{cluster:l,labelBBox:f}},"roundedWithTitle"),Bc=u(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,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),p=Ct(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await ue(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=f.getBBox();if(Ct(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:o,stroke:s,fillWeight:4,seed:a}),D=S.path(ne(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}=hi(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const S=g.select("span");S&&S.attr("style",n)}const C=M.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return sr(t,S)},{cluster:d,labelBBox:m}},"kanbanSection"),vc=u((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:o}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=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,p=t.y-h/2;let g;if(t.width=l,t.look==="handDrawn"){const m=j(s).rectangle(d,p,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});g=s.insert(()=>m,":first-child")}else g=n.insert("rect",":first-child"),g.attr("class","divider").attr("x",d).attr("y",p).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 sr(t,m)},{cluster:s,labelBBox:{}}},"divider"),Lc={rect:qo,squareRect:qo,roundedWithTitle:Tc,noteGroup:Sc,divider:vc,kanbanSection:Bc},No=new Map,kn=u(async(e,t)=>{const r=t.shape||"rect",i=await Lc[r](e,t);return No.set(t.id,i),i},"insertCluster"),Pp=u(()=>{No=new Map},"clear");function Mc(e,t){return e.intersect(t)}u(Mc,"intersectNode");var bf=Mc;function _c(e,t,r,i){var a=e.x,o=e.y,s=a-i.x,n=o-i.y,c=Math.sqrt(t*t*n*n+r*r*s*s),l=Math.abs(t*r*s/c);i.x<a&&(l=-l);var h=Math.abs(t*r*n/c);return i.y<o&&(h=-h),{x:a+l,y:o+h}}u(_c,"intersectEllipse");var Fc=_c;function Ac(e,t,r){return Fc(e,t,t,r)}u(Ac,"intersectCircle");var Cf=Ac;function Ec(e,t,r,i){var a,o,s,n,c,l,h,d,p,g,f,m,x;if(a=t.y-e.y,s=e.x-t.x,c=t.x*e.y-e.x*t.y,p=a*r.x+s*r.y+c,g=a*i.x+s*i.y+c,!(p!==0&&g!==0&&Wo(p,g)||(o=i.y-r.y,n=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*e.x+n*e.y+l,d=o*t.x+n*t.y+l,h!==0&&d!==0&&Wo(h,d)||(f=a*n-o*s)===0)))return m=Math.abs(f/2),{x:(x=s*l-n*c)<0?(x-m)/f:(x+m)/f,y:(x=o*c-a*l)<0?(x-m)/f:(x+m)/f}}function Wo(e,t){return e*t>0}u(Ec,"intersectLine"),u(Wo,"sameSign");var kf=Ec;function $c(e,t,r){let i=e.x,a=e.y,o=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),n=Math.min(n,h.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));let c=i-e.width/2-s,l=a-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],p=t[h<t.length-1?h+1:0],g=kf(e,r,{x:c+d.x,y:l+d.y},{x:c+p.x,y:l+p.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(h,d){let p=h.x-r.x,g=h.y-r.y,f=Math.sqrt(p*p+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}),o[0]):e}u($c,"intersectPolygon");var W={node:bf,circle:Cf,ellipse:Fc,polygon:$c,rect:sr};function Oc(e,t){const{labelStyles:r}=U(t);t.labelStyle=r;const i=K(t);let a=i;i||(a="anchor");const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),{cssStyles:s}=t,n=j(o),c=Y(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=n.circle(0,0,2,c),h=o.insert(()=>l,":first-child");return h.attr("class","anchor").attr("style",Rt(s)),V(t,h),t.intersect=function(d){return $.info("Circle intersect",t,1,d),W.circle(t,1,d)},o}function jo(e,t,r,i,a,o,s){const n=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),h=(r-e)/2/a,d=(i-t)/2/o,p=Math.sqrt(h**2+d**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-p**2),f=n+g*o*Math.sin(l)*(s?-1:1),m=c-g*a*Math.cos(l)*(s?-1:1),x=Math.atan2((t-m)/o,(e-f)/a);let y=Math.atan2((i-m)/o,(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),C=m+o*Math.sin(M);b.push({x:v,y:C})}return b}async function Dc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.width+t.padding+20,n=o.height+t.padding,c=n/2,l=c/(2.5+n/50),{cssStyles:h}=t,d=[{x:s/2,y:-n/2},{x:-s/2,y:-n/2},...jo(-s/2,-n/2,-s/2,n/2,l,c,!1),{x:s/2,y:n/2},...jo(s/2,n/2,s/2,-n/2,l,c,!0)],p=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=ct(d),m=p.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 me(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 Ic(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.height+t.padding,n=o.width+t.padding+12,c=-s,l=[{x:12,y:c},{x:n,y:c},{x:n,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 p=j(a),g=Y(t,{}),f=ct(l),m=p.path(f,g);h=a.insert(()=>m,":first-child").attr("transform",`translate(${-n/2}, ${s/2})`),d&&h.attr("style",d)}else h=me(a,n,s,l);return i&&h.attr("style",i),V(t,h),t.intersect=function(p){return W.polygon(t,l,p)},a}function Pc(e,t){const{nodeStyles:r}=U(t);t.label="";const i=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=j(i),c=Y(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=ct(s),h=n.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(p){return W.polygon(t,s,p)},i}async function zc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s}=await et(e,t,K(t)),n=o.width/2+s;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=Y(t,{}),p=h.circle(0,0,2*n,d);c=a.insert(()=>p,":first-child"),c.attr("class","basic label-container").attr("style",Rt(l))}else c=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",n).attr("cx",0).attr("cy",0);return V(t,c),t.intersect=function(h){return $.info("Circle intersect",t,n,h),W.circle(t,n,h)},a}function Rc(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}
|
125
|
+
M ${i/2*t},${i/2*r} L ${-i/2*t},${-i/2*r}`}function qc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:s}=t,n=j(a),c=Y(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=n.circle(0,0,2*o,c),h=Rc(o),d=n.path(h,c),p=a.insert(()=>l,":first-child");return p.insert(()=>d),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),V(t,p),t.intersect=function(g){return $.info("crossedCircle intersect",t,{radius:o,point:g}),W.circle(t,o,g)},a}function ye(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}async function Nc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...ye(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...ye(n/2+2*l,-l,l,20,-180,-270),...ye(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...ye(n/2,c/2,l,20,0,90)],p=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...ye(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...ye(n/2+.1*n,-l,l,20,-180,-270),...ye(n/2+.1*n,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...ye(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/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(p),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(${-n/2+l-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,w),t.intersect=function(M){return W.polygon(t,p,M)},a}function xe(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:d,y:p})}return s}async function Wc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...xe(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...xe(n/2+2*l,-l,l,20,-180,-270),...xe(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:c/2},...xe(n/2,c/2,l,20,0,90)],p=[{x:-n/2,y:-c/2-l},{x:n/2,y:-c/2-l},...xe(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...xe(n/2+2*l,-l,l,20,-180,-270),...xe(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:c/2},...xe(n/2,c/2,l,20,0,90),{x:n/2,y:c/2+l},{x:-n/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(p),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(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,w),t.intersect=function(M){return W.polygon(t,p,M)},a}function Mt(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}async function jc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...Mt(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...Mt(n/2+2*l,-l,l,20,-180,-270),...Mt(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...Mt(n/2,c/2,l,20,0,90)],p=[...Mt(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},...Mt(-n/2-l/2,-l,l,20,0,90),...Mt(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...Mt(-n/2+l+l/2,c/2,l,30,-180,-270)],g=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...Mt(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...Mt(n/2+2*l,-l,l,20,-180,-270),...Mt(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...Mt(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2-l-l/2,y:c/2+l},...Mt(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},...Mt(-n/2-l/2,-l,l,20,0,90),...Mt(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...Mt(-n/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(p).replace("Z",""),w=f.path(b,m),M=ct(g),v=f.path(M,{...m}),C=a.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>y,":first-child"),C.insert(()=>w,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${l-l/4}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,C),t.intersect=function(S){return W.polygon(t,g,S)},a}async function Hc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(80,1.25*(o.width+2*(t.padding??0)),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=n/2,{cssStyles:l}=t,h=j(a),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=s-c,g=n/4,f=[{x:p,y:0},{x:g,y:0},{x:0,y:n/2},{x:g,y:n},{x:p,y:n},...Ro(-p,-n/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}, ${-n/2})`),V(t,y),t.intersect=function(b){return W.polygon(t,f,b)},a}u(Oc,"anchor"),u(jo,"generateArcPoints"),u(Dc,"bowTieRect"),u(me,"insertPolygonShape"),u(Ic,"card"),u(Pc,"choice"),u(zc,"circle"),u(Rc,"createLine"),u(qc,"crossedCircle"),u(ye,"generateCirclePoints"),u(Nc,"curlyBraceLeft"),u(xe,"generateCirclePoints"),u(Wc,"curlyBraceRight"),u(Mt,"generateCirclePoints"),u(jc,"curlyBraces"),u(Hc,"curvedTrapezoid");var wf=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),Sf=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),Tf=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Yc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+t.padding,t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(o.height+l+t.padding,t.height??0);let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=j(a),f=Sf(0,0,n,h,c,l),m=Tf(0,l,n,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"),p&&d.attr("style",p)}else{const g=wf(0,0,n,h,c,l);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Rt(p)).attr("style",i)}return d.attr("label-offset-y",l),d.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),V(t,d),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(t.padding??0)/1.5-(o.y-(o.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 Uc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+t.padding,c=o.height+t.padding,l=.2*c,h=-n/2,d=-c/2-l/2,{cssStyles:p}=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"),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+l+(t.padding??0)/2-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(b){return W.rect(t,b)},a}async function Vc(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s}=await et(e,t,K(t)),n=o.width/2+s+5,c=o.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*n,f),y=g.circle(0,0,2*c,m);l=a.insert("g",":first-child"),l.attr("class",Rt(t.cssClasses)).attr("style",Rt(h)),(d=l.node())==null||d.appendChild(x),(p=l.node())==null||p.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",n).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,n,g),W.circle(t,n,g)},a}function Gc(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,n=j(o),{nodeBorder:c}=r,l=Y(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=n.circle(0,0,14,l),d=o.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(p){return $.info("filledCircle intersect",t,{radius:7,point:p}),W.circle(t,7,p)},o}async function Xc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=o.width+(t.padding??0),c=n+o.height,l=n+o.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:d}=t,p=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=ct(h),m=p.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=n,t.height=c,V(t,x),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(y){return $.info("Triangle intersect",t,h,y),W.polygon(t,h,y)},a}function Zc(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=U(t);t.label="";const s=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:n}=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,p=j(s),g=Y(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(h,d,c,l,g),m=s.insert(()=>f,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),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 Kc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(80,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(50,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=n/2,{cssStyles:l}=t,h=j(a),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-s/2,y:-n/2},{x:s/2-c,y:-n/2},...Ro(-s/2+c,0,c,50,90,270),{x:s/2-c,y:n/2},{x:-s/2,y:n/2}],g=ct(p),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,p,x)},a}u(Yc,"cylinder"),u(Uc,"dividedRectangle"),u(Vc,"doublecircle"),u(Gc,"filledCircle"),u(Xc,"flippedTriangle"),u(Zc,"forkJoin"),u(Kc,"halfRoundedRectangle");var Bf=u((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 Qc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.height+t.padding,n=s/4,c=o.width+2*n+t.padding,l=[{x:n,y:0},{x:c-n,y:0},{x:c,y:-s/2},{x:c-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j(a),g=Y(t,{}),f=Bf(0,0,c,s,n),m=p.path(f,g);h=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),d&&h.attr("style",d)}else h=me(a,c,s,l);return i&&h.attr("style",i),t.width=c,t.height=s,V(t,h),t.intersect=function(p){return W.polygon(t,l,p)},a}async function Jc(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,K(t)),o=Math.max(30,(t==null?void 0:t.width)??0),s=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,c=j(a),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],d=ct(h),p=c.path(d,l),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-o/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 td(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:d}=await et(e,t,"icon-shape default"),p=t.pos==="t",g=n,f=n,{nodeBorder:m}=r,{stylesMap:x}=We(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 C=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"}),P=l.insert(()=>C,":first-child"),z=l.insert(()=>D);if(t.icon){const F=l.append("g");F.html(`<g>${await Xe(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=F.node().getBBox(),L=B.width,A=B.height,_=B.x,E=B.y;F.attr("transform",`translate(${-L/2-_},${p?h.height/2+w/2-A/2-E:-h.height/2-w/2-A/2-E})`),F.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-I/2:I/2-h.height})`),P.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),V(t,z),t.intersect=function(F){if($.info("iconSquare intersect",t,F),!t.label)return W.rect(t,F);const B=t.x??0,L=t.y??0,A=t.height??0;let _=[];return _=p?[{x:B-h.width/2,y:L-A/2},{x:B+h.width/2,y:L-A/2},{x:B+h.width/2,y:L-A/2+h.height+w},{x:B+f/2,y:L-A/2+h.height+w},{x:B+f/2,y:L+A/2},{x:B-f/2,y:L+A/2},{x:B-f/2,y:L-A/2+h.height+w},{x:B-h.width/2,y:L-A/2+h.height+w}]:[{x:B-f/2,y:L-A/2},{x:B+f/2,y:L-A/2},{x:B+f/2,y:L-A/2+g},{x:B+h.width/2,y:L-A/2+g},{x:B+h.width/2/2,y:L+A/2},{x:B-h.width/2,y:L+A/2},{x:B-h.width/2,y:L-A/2+g},{x:B-f/2,y:L-A/2+g}],W.polygon(t,_,F)},l}async function ed(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:d}=await et(e,t,"icon-shape default"),p=t.label?8:0,g=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:x}=We(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 Xe(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),C=v.width,S=v.height,I=v.x,D=v.y,P=Math.max(C,S)*Math.SQRT2+40,z=y.circle(0,0,P,b),F=Math.max(P,h.width),B=P+h.height+p,L=y.rectangle(-F/2,-B/2,F,B,{...b,fill:"transparent",stroke:"none"}),A=l.insert(()=>z,":first-child"),_=l.insert(()=>L);return M.attr("transform",`translate(${-C/2-I},${g?h.height/2+p/2-S/2-D:-h.height/2-p/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})`),A.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),V(t,_),t.intersect=function(E){return $.info("iconSquare intersect",t,E),W.rect(t,E)},l}async function rd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:p}=await et(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=We(t),w=-m/2,M=-f/2,v=t.label?8:0,C=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=C.path(ne(w,M,m,f,5),S),P=Math.max(m,h.width),z=f+h.height+v,F=C.rectangle(-P/2,-z/2,P,z,{...S,fill:"transparent",stroke:"none"}),B=l.insert(()=>D,":first-child").attr("class","icon-shape2"),L=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Xe(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),E=_.width,O=_.height,J=_.x,it=_.y;A.attr("transform",`translate(${-E/2-J},${g?h.height/2+v/2-O/2-it:-h.height/2-v/2-O/2-it})`),A.attr("style",`color: ${b.get("stroke")??x};`)}return p.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(A){if($.info("iconSquare intersect",t,A),!t.label)return W.rect(t,A);const _=t.x??0,E=t.y??0,O=t.height??0;let J=[];return J=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,J,A)},l}async function id(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=U(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:p}=await et(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=We(t),w=-m/2,M=-f/2,v=t.label?8:0,C=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=C.path(ne(w,M,m,f,.1),S),P=Math.max(m,h.width),z=f+h.height+v,F=C.rectangle(-P/2,-z/2,P,z,{...S,fill:"transparent",stroke:"none"}),B=l.insert(()=>D,":first-child"),L=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Xe(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),E=_.width,O=_.height,J=_.x,it=_.y;A.attr("transform",`translate(${-E/2-J},${g?h.height/2+v/2-O/2-it:-h.height/2-v/2-O/2-it})`),A.attr("style",`color: ${b.get("stroke")??x};`)}return p.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(A){if($.info("iconSquare intersect",t,A),!t.label)return W.rect(t,A);const _=t.x??0,E=t.y??0,O=t.height??0;let J=[];return J=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,J,A)},l}async function ad(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","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/o;const{labelStyles:s}=U(t);t.labelStyle=s;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?n??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)??o;t.width=Math.max(l,n??0);const{shapeSvg:d,bbox:p,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,p.width),C=h+p.height+y,S=b.rectangle(-v/2,-C/2,v,C,{...w,fill:"none",stroke:"none"}),I=d.insert(()=>M,":first-child"),D=d.insert(()=>S);if(t.img){const P=d.append("image");P.attr("href",t.img),P.attr("width",l),P.attr("height",h),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-l/2},${f?C/2-h:-C/2})`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-h/2-p.height/2-y/2:h/2-p.height/2+y/2})`),I.attr("transform",`translate(0,${f?p.height/2+y/2:-p.height/2-y/2})`),V(t,D),t.intersect=function(P){if($.info("iconSquare intersect",t,P),!t.label)return W.rect(t,P);const z=t.x??0,F=t.y??0,B=t.height??0;let L=[];return L=f?[{x:z-p.width/2,y:F-B/2},{x:z+p.width/2,y:F-B/2},{x:z+p.width/2,y:F-B/2+p.height+y},{x:z+l/2,y:F-B/2+p.height+y},{x:z+l/2,y:F+B/2},{x:z-l/2,y:F+B/2},{x:z-l/2,y:F-B/2+p.height+y},{x:z-p.width/2,y:F-B/2+p.height+y}]:[{x:z-l/2,y:F-B/2},{x:z+l/2,y:F-B/2},{x:z+l/2,y:F-B/2+h},{x:z+p.width/2,y:F-B/2+h},{x:z+p.width/2/2,y:F+B/2},{x:z-p.width/2,y:F+B/2},{x:z-p.width/2,y:F-B/2+h},{x:z-l/2,y:F-B/2+h}],W.polygon(t,L,P)},d}async function od(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=Y(t,{}),g=ct(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=me(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}async function Jr(e,t,r){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{shapeSvg:o,bbox:s}=await et(e,t,K(t)),n=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=-n/2,h=-c/2;let d,{rx:p,ry:g}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,g=r.ry),t.look==="handDrawn"){const m=j(o),x=Y(t,{}),y=p||g?m.path(ne(l,h,n,c,p||0),x):m.rectangle(l,h,n,c,x);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",Rt(f))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",Rt(p)).attr("ry",Rt(g)).attr("x",l).attr("y",h).attr("width",n).attr("height",c);return V(t,d),t.intersect=function(m){return W.rect(t,m)},o}async function nd(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),o=r.insert("rect",":first-child");return o.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,o),t.intersect=function(s){return W.rect(t,s)},r}async function sd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=Y(t,{}),g=ct(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=me(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}async function ld(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*n/6,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=Y(t,{}),g=ct(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=me(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}function hd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),c=[{x:s,y:0},{x:0,y:n+3.5},{x:s-14,y:n+3.5},{x:0,y:2*n},{x:s,y:n-3.5},{x:14,y:n-3.5}],l=j(a),h=Y(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=ct(c),p=l.path(d,h),g=a.insert(()=>p,":first-child");return o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-n})`),V(t,g),t.intersect=function(f){return $.info("lightningBolt intersect",t,f),W.polygon(t,c,f)},a}u(Qc,"hexagon"),u(Jc,"hourglass"),u(td,"icon"),u(ed,"iconCircle"),u(rd,"iconRounded"),u(id,"iconSquare"),u(ad,"imageSquare"),u(od,"inv_trapezoid"),u(Jr,"drawRect"),u(nd,"labelRect"),u(sd,"lean_left"),u(ld,"lean_right"),u(hd,"lightningBolt");var vf=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Lf=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Mf=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function cd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+(t.padding??0),t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(o.height+l+(t.padding??0),t.height??0),d=.1*h;let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=j(a),m=Lf(0,0,n,h,c,l,d),x=Mf(0,l,n,h,c,l),y=Y(t,{}),b=f.path(m,y),w=f.path(x,y);a.insert(()=>w,":first-child").attr("class","line"),p=a.insert(()=>b,":first-child"),p.attr("class","basic label-container"),g&&p.attr("style",g)}else{const f=vf(0,0,n,h,c,l,d);p=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Rt(g)).attr("style",i)}return p.attr("label-offset-y",l),p.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),V(t,p),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+l-(o.y-(o.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 dd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:d}=t,p=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...Le(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,l,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=p.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(${-n/2+(t.padding??0)+n/2*.1/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),V(t,x),t.intersect=function(y){return W.polygon(t,f,y)},a}async function ud(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=Y(t,{}),f=[{x:l-5,y:h+5},{x:l-5,y:h+c+5},{x:l+n-5,y:h+c+5},{x:l+n-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h+c-5},{x:l+n+5,y:h+c-5},{x:l+n+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+n-5,y:h+5},{x:l+n-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h},{x:l,y:h}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ct(f),y=p.path(x,g),b=ct(m),w=p.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(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),V(t,M),t.intersect=function(v){return W.polygon(t,f,v)},a}async function pd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,d=-n/2,p=-h/2,{cssStyles:g}=t,f=Le(d-5,p+h+5,d+n-5,p+h+5,l,.8),m=f==null?void 0:f[f.length-1],x=[{x:d-5,y:p+5},{x:d-5,y:p+h+5},...f,{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:m.y-10},{x:d+n+5,y:m.y-10},{x:d+n+5,y:p-5},{x:d+5,y:p-5},{x:d+5,y:p},{x:d,y:p},{x:d,y:p+5}],y=[{x:d,y:p+5},{x:d+n-5,y:p+5},{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:p},{x:d,y:p}],b=j(a),w=Y(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const M=ct(x),v=b.path(M,w),C=ct(y),S=b.path(C,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(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-l/2-(o.y-(o.top??0))})`),V(t,I),t.intersect=function(D){return W.polygon(t,x,D)},a}async function gd(e,t,{config:{themeVariables:r}}){var x;const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i,t.useHtmlLabels||((x=$t().flowchart)==null?void 0:x.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s}=await et(e,t,K(t)),n=Math.max(s.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(s.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(o),g=Y(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(l,h,n,c,g),m=o.insert(()=>f,":first-child");return m.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),V(t,m),t.intersect=function(y){return W.rect(t,y)},o}u(cd,"linedCylinder"),u(dd,"linedWaveEdgedRect"),u(ud,"multiRect"),u(pd,"multiWaveEdgedRectangle"),u(gd,"note");var _f=u((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 fd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.width+t.padding+(o.height+t.padding),n=[{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,{}),p=_f(0,0,s),g=h.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`),l&&c.attr("style",l)}else c=me(a,s,s,n);return i&&c.attr("style",i),V(t,c),t.intersect=function(h){return $.debug(`APA12 Intersect called SPLIT
|
126
|
+
point:`,h,`
|
127
|
+
node:
|
128
|
+
`,t,`
|
129
|
+
res:`,W.polygon(t,n,h)),W.polygon(t,n,h)},a}async function md(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=-Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0)/2,c=-Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0)/2,l=c/2,h=[{x:n+l,y:c},{x:n,y:0},{x:n+l,y:-c},{x:-n,y:-c},{x:-n,y:c}],{cssStyles:d}=t,p=j(a),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=ct(h),m=p.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-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),V(t,x),t.intersect=function(y){return W.polygon(t,h,y)},a}async function yd(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 o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=n.node().appendChild(await Me(l,t.labelStyle,!0,!0));let d={width:0,height:0};if(Ct((D=(I=ut())==null?void 0:I.flowchart)==null?void 0:D.htmlLabels)){const P=h.children[0],z=dt(h);d=P.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}$.info("Text 2",c);const p=c||[],g=h.getBBox(),f=n.node().appendChild(await Me(p.join?p.join("<br/>"):p,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=n.node().getBBox(),n.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 C,S;if(t.look==="handDrawn"){const P=j(o),z=Y(t,{}),F=P.path(ne(M,v,b,w,t.rx||0),z),B=P.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=o.insert(()=>($.debug("Rough node insert CXC",F),B),":first-child"),C=o.insert(()=>($.debug("Rough node insert CXC",F),F),":first-child")}else C=s.insert("rect",":first-child"),S=s.insert("line"),C.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,C),t.intersect=function(P){return W.rect(t,P)},o}async function xd(e,t){return Jr(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 bd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=(t==null?void 0:t.padding)??0,c=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-o.width/2-n,d=-o.height/2-n,{cssStyles:p}=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",Rt(p)),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-c/2+4+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(b){return W.rect(t,b)},a}async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=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+n,y:h+c},{x:l+n,y:h-c/2}],m=ct(f),x=p.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(${-n/2+(t.padding??0)-(o.x-(o.left??0))}, ${-c/4+(t.padding??0)-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(b){return W.polygon(t,f,b)},a}async function kd(e,t){return Jr(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 wd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.height+t.padding,n=o.width+s/4+t.padding;let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=Y(t,{}),p=ne(-n/2,-s/2,n,s,s/2),g=h.path(p,d);c=a.insert(()=>g,":first-child"),c.attr("class","basic label-container").attr("style",Rt(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",-n/2).attr("y",-s/2).attr("width",n).attr("height",s);return V(t,c),t.intersect=function(h){return W.rect(t,h)},a}async function Sd(e,t){return Jr(e,t,{rx:5,ry:5})}function Td(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:s,stateBorder:n,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 p=h.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),g=n??c,f=h.circle(0,0,5,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>p,":first-child");return m.insert(()=>f),o&&m.selectAll("path").attr("style",o),a&&m.selectAll("path").attr("style",a),V(t,m),t.intersect=function(x){return W.circle(t,7,x)},l}function Bd(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const s=j(a).circle(0,0,14,Mh(i));o=a.insert(()=>s),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return V(t,o),t.intersect=function(s){return W.circle(t,7,s)},a}async function vd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=((t==null?void 0:t.padding)||0)/2,n=o.width+t.padding,c=o.height+t.padding,l=-o.width/2-s,h=-o.height/2-s,d=[{x:0,y:0},{x:n,y:0},{x:n,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const p=j(a),g=Y(t,{}),f=p.rectangle(l-8,h,n+16,c,g),m=p.line(l,h,l,h+c,g),x=p.line(l+n,h,l+n,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",Rt(b)),V(t,y)}else{const p=me(a,n,c,d);i&&p.attr("style",i),V(t,p)}return t.intersect=function(p){return W.polygon(t,d,p)},a}async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,l=-n/2,h=.2*n,d=.2*n,{cssStyles:p}=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+n},{x:c-h/2,y:l+n}],x=[{x:c+s-h/2,y:l+n},{x:c+s+h/2,y:l+n},{x:c+s+h/2,y:l+n-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"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),V(t,v),t.intersect=function(C){return W.polygon(t,m,C)},a}async function Md(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=.2*n,d=.2*c,p=c+l,{cssStyles:g}=t,f=j(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:p/2},...Le(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,l,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],y=-n/2+n/2*.1,b=-p/2-.4*d,w=[{x:y+n-h,y:1.4*(b+c)},{x:y+n,y:b+c-d},{x:y+n,y:.9*(b+c)},...Le(y+n,1.3*(b+c),y+n-h,1.5*(b+c),.03*-c,.5)],M=ct(x),v=f.path(M,m),C=ct(w),S=f.path(C,{...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(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),V(t,I),t.intersect=function(D){return W.polygon(t,x,D)},a}async function _d(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(o.height+t.padding,(t==null?void 0:t.height)||0),c=-s/2,l=-n/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",n),V(t,h),t.intersect=function(d){return W.rect(t,d)},a}u(fd,"question"),u(md,"rect_left_inv_arrow"),u(yd,"rectWithTitle"),u(xd,"roundedRect"),u(bd,"shadedProcess"),u(Cd,"slopedRect"),u(kd,"squareRect"),u(wd,"stadium"),u(Sd,"state"),u(Td,"stateEnd"),u(Bd,"stateStart"),u(vd,"subroutine"),u(Ld,"taggedRect"),u(Md,"taggedWaveEdgedRectangle"),u(_d,"text");var Ff=u((e,t,r,i,a,o)=>`M${e},${t}
|
130
|
+
a${a},${o} 0,0,1 0,${-i}
|
131
|
+
l${r},0
|
132
|
+
a${a},${o} 0,0,1 0,${i}
|
133
|
+
M${r},${-i}
|
134
|
+
a${a},${o} 0,0,0 0,${i}
|
135
|
+
l${-r},0`,"createCylinderPathD"),Af=u((e,t,r,i,a,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Ef=u((e,t,r,i,a,o)=>[`M${e+r/2},${-i/2}`,`a${a},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Fd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s,halfPadding:n}=await et(e,t,K(t)),c=t.look==="neo"?2*n:n,l=o.height+c,h=l/2,d=h/(2.5+l/50),p=o.width+d+c,{cssStyles:g}=t;let f;if(t.look==="handDrawn"){const m=j(a),x=Af(0,0,p,l,d,h),y=Ef(0,0,p,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=Ff(0,0,p,l,d,h);f=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Rt(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(${-p/2}, ${l/2} )`),s.attr("transform",`translate(${-o.width/2-d-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.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 Ad(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=o.width+t.padding,n=o.height+t.padding,c=[{x:-3*n/6,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=Y(t,{}),g=ct(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=me(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,V(t,l),t.intersect=function(d){return W.polygon(t,c,d)},a}async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(60,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(20,o.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:-n/2},{x:s/2*.8,y:-n/2},{x:s/2,y:-n/2*.6},{x:s/2,y:n/2},{x:-s/2,y:n/2},{x:-s/2,y:-n/2*.6}],p=ct(d),g=l.path(p,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 $d(e,t){var b;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Ct((b=ut().flowchart)==null?void 0:b.htmlLabels),c=o.width+(t.padding??0),l=c+o.height,h=c+o.height,d=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:p}=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 p&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=c,t.height=l,V(t,y),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${l/2-(o.height+(t.padding??0)/(n?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return $.info("Triangle intersect",t,d,w),W.polygon(t,d,w)},a}async function Od(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:d}=t,p=70-n,g=p>0?p/2:0,f=j(a),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-n/2-g,y:h/2},...Le(-n/2-g,h/2,n/2+g,h/2,l,.8),{x:n/2+g,y:-h/2},{x:-n/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(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l-(o.y-(o.top??0))})`),V(t,w),t.intersect=function(M){return W.polygon(t,x,M)},a}async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await et(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=s/n;let l=s,h=n;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),p=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:p/2},...Le(-l/2,p/2,l/2,p/2,d,1),{x:l/2,y:-p/2},...Le(l/2,-p/2,-l/2,-p/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 Id(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await et(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=Y(t,{}),f=[{x:l-5,y:h-5},{x:l-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-5}],m=`M${l-5},${h-5} L${l+n},${h-5} L${l+n},${h+c} L${l-5},${h+c} L${l-5},${h-5}
|
136
|
+
M${l-5},${h} L${l+n},${h}
|
137
|
+
M${l},${h-5} L${l},${h+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.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(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),V(t,y),t.intersect=function(b){return W.polygon(t,f,b)},a}async function Ho(e,t){var rt,bt,ft,Vt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Z}=$t(),{background:nt}=Z,lt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${nt}`]};await Ho(e,lt)}const i=$t();t.useHtmlLabels=i.htmlLabels;let a=((rt=i.er)==null?void 0:rt.diagramPadding)??10,o=((bt=i.er)==null?void 0:bt.entityPadding)??6;const{cssStyles:s}=t,{labelStyles:n,nodeStyles:c}=U(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a};re(t.label,i)+2*Z.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const nt=await Jr(e,t,Z);if(!Ct(i.htmlLabels)){const lt=nt.select("text"),yt=(ft=lt.node())==null?void 0:ft.getBBox();lt.attr("transform",`translate(${-yt.width/2}, 0)`)}return nt}i.htmlLabels||(a*=1.25,o*=1.25);let l=K(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),d=await lr(h,t.label??"",i,0,0,["name"],n);d.height+=o;let p=0;const g=[],f=[];let m=0,x=0,y=0,b=0,w=!0,M=!0;for(const Z of r.attributes){const nt=await lr(h,Z.type,i,0,p,["attribute-type"],n);m=Math.max(m,nt.width+a);const lt=await lr(h,Z.name,i,0,p,["attribute-name"],n);x=Math.max(x,lt.width+a);const yt=await lr(h,Z.keys.join(),i,0,p,["attribute-keys"],n);y=Math.max(y,yt.width+a);const qt=await lr(h,Z.comment,i,0,p,["attribute-comment"],n);b=Math.max(b,qt.width+a);const At=Math.max(nt.height,lt.height,yt.height,qt.height)+o;f.push({yOffset:p,rowHeight:At}),p+=At}let v=4;y<=a&&(w=!1,y=0,v--),b<=a&&(M=!1,b=0,v--);const C=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 P=0;f.length>0&&(P=f.reduce((Z,nt)=>Z+((nt==null?void 0:nt.rowHeight)??0),0));const z=Math.max(C.width+2*a,(t==null?void 0:t.width)||0,S),F=Math.max((P??0)+d.height,(t==null?void 0:t.height)||0),B=-z/2,L=-F/2;h.selectAll("g:not(:first-child)").each((Z,nt,lt)=>{const yt=dt(lt[nt]),qt=yt.attr("transform");let At=0,ai=0;if(qt){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);he&&(At=parseFloat(he[1]),ai=parseFloat(he[2]),yt.attr("class").includes("attribute-name")?At+=m:yt.attr("class").includes("attribute-keys")?At+=m+x:yt.attr("class").includes("attribute-comment")&&(At+=m+x+y))}yt.attr("transform",`translate(${B+a/2+At}, ${ai+L+d.height+o/2})`)}),h.select(".name").attr("transform","translate("+-d.width/2+", "+(L+o/2)+")");const A=I.rectangle(B,L,z,F,D),_=h.insert(()=>A,":first-child").attr("style",s.join("")),{themeVariables:E}=$t(),{rowEven:O,rowOdd:J,nodeBorder:it}=E;g.push(0);for(const[Z,nt]of f.entries()){const lt=(Z+1)%2==0&&nt.yOffset!==0,yt=I.rectangle(B,d.height+L+(nt==null?void 0:nt.yOffset),z,nt==null?void 0:nt.rowHeight,{...D,fill:lt?O:J,stroke:it});h.insert(()=>yt,"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,F+L,D),h.insert(()=>st).attr("class","divider"),w&&(st=I.line(m+x+B,d.height+L,m+x+B,F+L,D),h.insert(()=>st).attr("class","divider")),M&&(st=I.line(m+x+y+B,d.height+L,m+x+y+B,F+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(";"),nt=(Vt=Z==null?void 0:Z.filter(lt=>lt.includes("stroke")))==null?void 0:Vt.map(lt=>`${lt}`).join("; ");h.selectAll("path").attr("style",nt??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(Z){return W.rect(t,Z)},h}async function lr(e,t,r,i=0,a=0,o=[],s=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);t!==pa(t)&&(t=(t=pa(t)).replaceAll("<","<").replaceAll(">",">"));const c=n.node().appendChild(await ue(n,t,{width:re(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(Ct(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 Pd(e,t,r,i,a=r.class.padding??12){const o=i?0:3,s=e.insert("g").attr("class",K(t)).attr("id",t.domId||t.id);let n=null,c=null,l=null,h=null,d=0,p=0,g=0;if(n=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ti(n,{text:`\xAB${b}\xBB`},0),d=n.node().getBBox().height}c=s.insert("g").attr("class","label-group text"),await ti(c,t,0,["font-weight: bolder"]);const f=c.node().getBBox();p=f.height,l=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members)m+=await ti(l,b,m,[b.parseClassifier()])+o;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 ti(h,b,x,[b.parseClassifier()])+o;let y=s.node().getBBox();if(n!==null){const b=n.node().getBBox();n.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+p+2*a})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+(g?g+4*a:2*a)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function ti(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=$t();let s="useHtmlLabels"in t?t.useHtmlLabels:Ct(o.htmlLabels)??!0,n="";n="text"in t?t.text:t.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),Ae(n)&&(s=!0);const c=await ue(a,jr(ke(n)),{width:re(n,o)+50,classes:"markdown-node-label",useHtmlLabels:s},o);let l,h=1;if(s){const d=c.children[0],p=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=n.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=o.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)}u(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}l=d.getBoundingClientRect(),p.attr("width",l.width),p.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=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[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 zd(e,t){var D,P;const r=ut(),i=r.class.padding??12,a=i,o=t.useHtmlLabels??Ct(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:n,bbox:c}=await Pd(e,t,r,o,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 p=s.members.length===0&&s.methods.length===0&&!((P=r.class)!=null&&P.hideEmptyMembersBox),g=j(n),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-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,x+2*i+(p?2*i:s.members.length===0&&s.methods.length===0?-i:0),f),M=n.insert(()=>w,":first-child");M.attr("class","basic label-container");const v=M.node().getBBox();n.selectAll(".text").each((z,F,B)=>{var J;const L=dt(B[F]),A=L.attr("transform");let _=0;if(A){const it=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);it&&(_=parseFloat(it[2]))}let E=_+b+i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0);o||(E-=4);let O=y;(L.attr("class").includes("label-group")||L.attr("class").includes("annotation-group"))&&(O=-((J=L.node())==null?void 0:J.getBBox().width)/2||0,n.selectAll("text").each(function(it,st,rt){window.getComputedStyle(rt[st]).textAnchor==="middle"&&(O=0)})),L.attr("transform",`translate(${O}, ${E})`)});const C=n.select(".annotation-group").node().getBBox().height-(p?i/2:0)||0,S=n.select(".label-group").node().getBBox().height-(p?i/2:0)||0,I=n.select(".members-group").node().getBBox().height-(p?i/2:0)||0;if(s.members.length>0||s.methods.length>0||p){const z=g.line(v.x,C+S+b+i,v.x+v.width,C+S+b+i,f);n.insert(()=>z).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){const z=g.line(v.x,C+S+I+b+2*a+i,v.x+v.width,C+S+I+b+i+2*a,f);n.insert(()=>z).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&n.selectAll("path").attr("style",d),M.select(":nth-child(2)").attr("style",d),n.selectAll(".divider").select("path").attr("style",d),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",d),!o){const z=RegExp(/color\s*:\s*([^;]*)/),F=z.exec(d);if(F){const B=F[0].replace("color","fill");n.selectAll("tspan").attr("style",B)}else if(l){const B=z.exec(l);if(B){const L=B[0].replace("color","fill");n.selectAll("tspan").attr("style",L)}}}return V(t,M),t.intersect=function(z){return W.rect(t,z)},n}async function Rd(e,t){var M,v;const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const a=t,o=t,s="verifyMethod"in t,n=K(t),c=e.insert("g").attr("class",n).attr("id",t.domId??t.id);let l;l=s?await se(c,`<<${a.type}>>`,0,t.labelStyle):await se(c,"<<Element>>",0,t.labelStyle);let h=l;const d=await se(c,a.name,h,t.labelStyle+"; font-weight: bold;");h+=d+20,s?(h+=await se(c,a.requirementId?`id: ${a.requirementId}`:"",h,t.labelStyle),h+=await se(c,a.text?`Text: ${a.text}`:"",h,t.labelStyle),h+=await se(c,a.risk?`Risk: ${a.risk}`:"",h,t.labelStyle),await se(c,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",h,t.labelStyle)):(h+=await se(c,o.type?`Type: ${o.type}`:"",h,t.labelStyle),await se(c,o.docRef?`Doc Ref: ${o.docRef}`:"",h,t.labelStyle));const p=(((M=c.node())==null?void 0:M.getBBox().width)??200)+20,g=(((v=c.node())==null?void 0:v.getBBox().height)??200)+20,f=-p/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,p,g,y),w=c.insert(()=>b,":first-child");if(w.attr("class","basic label-container").attr("style",i),c.selectAll(".label").each((C,S,I)=>{const D=dt(I[S]),P=D.attr("transform");let z=0,F=0;if(P){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);A&&(z=parseFloat(A[1]),F=parseFloat(A[2]))}const B=F-g/2;let L=f+10;S!==0&&S!==1||(L=z),D.attr("transform",`translate(${L}, ${B+20})`)}),h>l+d+20){const C=x.line(f,m+l+d+20,f+p,m+l+d+20,y);c.insert(()=>C).attr("style",i)}return V(t,w),t.intersect=function(C){return W.rect(t,C)},c}async function se(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=ut(),s=o.htmlLabels??!0,n=await ue(a,jr(ke(t)),{width:re(t,o)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},o);let c;if(s){const l=n.children[0],h=dt(n);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=n.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);c=n.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}u(Fd,"tiltedCylinder"),u(Ad,"trapezoid"),u(Ed,"trapezoidalPentagon"),u($d,"triangle"),u(Od,"waveEdgedRectangle"),u(Dd,"waveRectangle"),u(Id,"windowPane"),u(Ho,"erBox"),u(lr,"addText"),u(Pd,"textHelper"),u(ti,"addText"),u(zd,"classBox"),u(Rd,"requirementBox"),u(se,"addText");var $f=u(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 qd(e,t,{config:r}){var P,z;const{labelStyles:i,nodeStyles:a}=U(t);t.labelStyle=i||"";const o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:n,label:c}=await et(e,t,K(t)),l=t.padding||10;let h,d="";"ticket"in t&&t.ticket&&((P=r==null?void 0:r.kanban)!=null&&P.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 p={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 Ui(h,"ticket"in t&&t.ticket||"",p):await Ui(s,"ticket"in t&&t.ticket||"",p));const{label:m,bbox:x}=await Ui(s,"assigned"in t&&t.assigned||"",p);t.width=o;const y=(t==null?void 0:t.width)||0,b=Math.max(f.height,x.height)/2,w=Math.max(n.height+20,(t==null?void 0:t.height)||0)+b,M=-y/2,v=-w/2;let C;c.attr("transform","translate("+(l-y/2)+", "+(-b-n.height/2)+")"),g.attr("transform","translate("+(l-y/2)+", "+(-b+n.height/2)+")"),m.attr("transform","translate("+(l+y/2-x.width-20)+", "+(-b+n.height/2)+")");const{rx:S,ry:I}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const F=j(s),B=Y(t,{}),L=S||I?F.path(ne(M,v,y,w,S||0),B):F.rectangle(M,v,y,w,B);C=s.insert(()=>L,":first-child"),C.attr("class","basic label-container").attr("style",D||null)}else{C=s.insert("rect",":first-child"),C.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 F="priority"in t&&t.priority;if(F){const B=s.append("line"),L=M+2,A=v+Math.floor((S??0)/2),_=v+w-Math.floor((S??0)/2);B.attr("x1",L).attr("y1",A).attr("x2",L).attr("y2",_).attr("stroke-width","4").attr("stroke",$f(F))}}return V(t,C),t.height=w,t.intersect=function(F){return W.rect(t,F)},s}u(qd,"kanbanItem");var Of=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:kd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:xd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:wd},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:vd},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Yc},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:zc},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:fd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Qc},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ld},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:sd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ad},{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:od},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Vc},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:_d},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ic},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:bd},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Bd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Td},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Zc},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Jc},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Nc},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Wc},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:jc},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:hd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Od},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Kc},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Fd},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:cd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Hc},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Uc},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:$d},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Id},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Gc},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ed},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Xc},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Cd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:pd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ud},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Dc},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:qc},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Md},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ld},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Dd},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:md},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:dd}],Df=u(()=>{const e={state:Sd,choice:Pc,note:gd,rectWithTitle:yd,labelRect:nd,iconSquare:id,iconCircle:ed,icon:td,iconRounded:rd,imageSquare:ad,anchor:Oc,kanbanItem:qd,classBox:zd,erBox:Ho,requirementBox:Rd},t=[...Object.entries(e),...Of.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Nd=Df();Vn=function(e){return e in Nd},u(Vn,"isValidShape");var Vi=new Map;fa=async function(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Nd[t.shape]:void 0;if(!o)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 o(i,t,r)}else a=await o(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Vi.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i},u(fa,"insertNode");let Wd,jd,Yo,ei,vt,hr;zp=u((e,t)=>{Vi.set(t.id,e)},"setNodeElem"),Dp=u(()=>{Vi.clear()},"clear"),Op=u(e=>{const t=Vi.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"),Wd=u((e,t,r,i,a,o)=>{t.arrowTypeStart&&Yo(e,"start",t.arrowTypeStart,r,i,a,o),t.arrowTypeEnd&&Yo(e,"end",t.arrowTypeEnd,r,i,a,o)},"addEdgeMarkers"),jd={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}},Yo=u((e,t,r,i,a,o,s)=>{var l;const n=jd[r];if(!n)return void $.warn(`Unknown arrow type: ${r}`);const c=`${a}_${o}-${n.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 p=d.cloneNode(!0);p.id=h,p.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),n.fill&&g.setAttribute("fill",s)}),(l=d.parentNode)==null||l.appendChild(p)}}e.attr(`marker-${t}`,`url(${i}#${h})`)}else e.attr(`marker-${t}`,`url(${i}#${c})`)},"addEdgeMarker"),ei=new Map,vt=new Map,Ip=u(()=>{ei.clear(),vt.clear()},"clear"),hr=u(e=>e?e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),In=u(async(e,t)=>{let r=Ct(ut().flowchart.htmlLabels);const i=await ue(e,t.label,{style:hr(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});$.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let s,n=i.getBBox();if(r){const c=i.children[0],l=dt(i);n=c.getBoundingClientRect(),l.attr("width",n.width),l.attr("height",n.height)}if(o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),ei.set(t.id,a),t.width=n.width,t.height=n.height,t.startLabelLeft){const c=await Me(t.startLabelLeft,hr(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+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startLeft=l,ri(s,t.startLabelLeft)}if(t.startLabelRight){const c=await Me(t.startLabelRight,hr(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+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startRight=l,ri(s,t.startLabelRight)}if(t.endLabelLeft){const c=await Me(t.endLabelLeft,hr(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),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endLeft=l,ri(s,t.endLabelLeft)}if(t.endLabelRight){const c=await Me(t.endLabelRight,hr(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),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endRight=l,ri(s,t.endLabelRight)}return i},"insertEdgeLabel");function ri(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}u(ri,"setTerminalWidth");let Hd,Yd,Uo;Dn=u((e,t)=>{$.debug("Moving label abc88 ",e.id,e.label,ei.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:a}=hi(i);if(e.label){const o=ei.get(e.id);let s=e.x,n=e.y;if(r){const c=Kt.calcLabelPosition(r);$.debug("Moving label "+e.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}o.attr("transform",`translate(${s}, ${n+a/2})`)}if(e.startLabelLeft){const o=vt.get(e.id).startLeft;let s=e.x,n=e.y;if(r){const c=Kt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const o=vt.get(e.id).startRight;let s=e.x,n=e.y;if(r){const c=Kt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const o=vt.get(e.id).endLeft;let s=e.x,n=e.y;if(r){const c=Kt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const o=vt.get(e.id).endRight;let s=e.x,n=e.y;if(r){const c=Kt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),Hd=u((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),o=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return a>=s||o>=n},"outsideNode"),Yd=u((e,t,r)=>{$.debug(`intersection calc abc89:
|
138
|
+
outsidePoint: ${JSON.stringify(t)}
|
139
|
+
insidePoint : ${JSON.stringify(r)}
|
140
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2;let n=r.x<t.x?s-o:s+o;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;n=h*d/l;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+l-d:r.y-l+d};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),l===0&&(p.y=t.y),$.debug(`abc89 top/bottom calc, Q ${l}, q ${d}, R ${h}, r ${n}`,p),p}{n=r.x<t.x?t.x-s-i:i-s-t.x;let d=l*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,g=r.y<t.y?r.y+d:r.y-d;return $.debug(`sides calc abc89, Q ${l}, q ${d}, R ${h}, r ${n}`,{_x:p,_y:g}),n===0&&(p=t.x,g=t.y),h===0&&(p=t.x),l===0&&(g=t.y),{x:p,y:g}}},"intersection"),Uo=u((e,t)=>{$.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(o=>{if($.info("abc88 checking point",o,t),Hd(t,o)||a)$.warn("abc88 outside",o,i),i=o,a||r.push(o);else{const s=Yd(t,i,o);$.debug("abc88 inside",o,i,s),$.debug("abc88 intersection",s,t);let n=!1;r.forEach(c=>{n=n||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 Ud(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],o=e[i],s=e[i+1];(a.x===o.x&&o.y===s.y&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===s.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(Ud,"extractCornerPoints");let Vo,Vd,Gd,Xd,Zd,Kd,Qd,Jd,tu,eu,ru,iu,au,ou,nu,su,lu,hu,cu,du,cr,Go;Vo=u(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,o=r/Math.sqrt(i*i+a*a);return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Vd=u(function(e){const{cornerPointPositions:t}=Ud(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],o=e[i+1],s=e[i],n=Vo(a,s,5),c=Vo(o,s,5),l=c.x-n.x,h=c.y-n.y;r.push(n);const d=2*Math.sqrt(2);let p={x:s.x,y:s.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){$.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const g=5;p=s.x===n.x?{x:l<0?n.x-g+d:n.x+g-d,y:h<0?n.y-d:n.y+d}:{x:l<0?n.x-d:n.x+d,y:h<0?n.y-g+d:n.y+g-d}}else $.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(p,c)}else r.push(e[i]);return r},"fixCorners"),On=u(function(e,t,r,i,a,o,s){var D;const{handDrawnSeed:n}=ut();let c=t.points,l=!1;const h=a;var d=o;const p=[];for(const P in t.cssCompiledStyles)xa(P)||p.push(t.cssCompiledStyles[P]);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=Uo(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=Uo(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let g=c.filter(P=>!Number.isNaN(P.y));g=Vd(g);let f=Cn;switch(f=bn,t.curve){case"linear":f=bn;break;case"basis":default:f=Cn;break;case"cardinal":f=Ap;break;case"bumpX":f=Kn;break;case"bumpY":f=Qn;break;case"catmullRom":f=Fp;break;case"monotoneX":f=_p;break;case"monotoneY":f=Mp;break;case"natural":f=Lp;break;case"step":f=vp;break;case"stepAfter":f=Bp;break;case"stepBefore":f=Tp}const{x:m,y:x}=An(t),y=vy().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 C=v.find(P=>P==null?void 0:P.startsWith("stroke:"));if(t.look==="handDrawn"){const P=j(e);Object.assign([],g);const z=P.path(M,{roughness:.3,seed:n});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 F=w.attr("d");w.attr("d",F),e.node().appendChild(w.node())}else{const P=p.join(";"),z=v?v.reduce((L,A)=>L+A+";",""):"";let F="";t.animate&&(F=" edge-animation-fast"),t.animation&&(F=" edge-animation-"+t.animation);const B=P?P+";"+z+";":z;w=e.append("path").attr("d",M).attr("id",t.id).attr("class"," "+b+(t.classes?" "+t.classes:"")+(F??"")).attr("style",B),C=(D=B.match(/stroke:([^;]+)/))==null?void 0:D[1]}let S="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(S=ua(!0)),$.info("arrowTypeStart",t.arrowTypeStart),$.info("arrowTypeEnd",t.arrowTypeEnd),Wd(w,t,S,s,i,C);let I={};return l&&(I.updatedPath=c),I.originalPath=t.points,I},"insertEdge"),Gd=u((e,t,r,i)=>{t.forEach(a=>{cu[a](e,r,i)})},"insertMarkers"),Xd=u((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"),Zd=u((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"),Kd=u((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"),Qd=u((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"),Jd=u((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"),tu=u((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"),eu=u((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"),ru=u((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"),iu=u((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"),au=u((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"),ou=u((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"),nu=u((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"),su=u((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"),lu=u((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
|
141
|
+
L20,10
|
142
|
+
M20,10
|
143
|
+
L0,20`)},"requirement_arrow"),hu=u((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"),cu={extension:Xd,composition:Zd,aggregation:Kd,dependency:Qd,lollipop:Jd,point:tu,circle:eu,cross:ru,barb:iu,only_one:au,zero_or_one:ou,one_or_more:nu,zero_or_more:su,requirement_arrow:lu,requirement_contains:hu},$n=Gd,du={common:Ee,getConfig:$t,insertCluster:kn,insertEdge:On,insertEdgeLabel:In,insertMarkers:$n,insertNode:fa,interpolateToCurve:xo,labelHelper:et,log:$,positionEdgeLabel:Dn},cr={},Go=u(e=>{for(const t of e)cr[t.name]=t},"registerLayoutLoaders"),u(()=>{Go([{name:"dagre",loader:u(async()=>await gt(()=>import("./dagre-FFZHY6LT-BAWZisFt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")();let Xo,Zo,Ko,Qo,Gi;Wp=u(async(e,t)=>{if(!(e.layoutAlgorithm in cr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=cr[e.layoutAlgorithm];return(await r.loader()).render(e,t,du,{algorithm:r.algorithm})},"render"),Np=u((e="",{fallback:t="dagre"}={})=>{if(e in cr)return e;if(t in cr)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"),da={name:"mermaid",version:"11.8.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.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"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.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Bn=u(e=>{var i;const{securityLevel:t}=ut();let r=dt("body");if(t==="sandbox"){const a=dt(`#i${e}`),o=((i=a.node())==null?void 0:i.contentDocument)??document;r=dt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),Xo="comm",Zo="rule",Ko="decl",Qo=Math.abs,Gi=String.fromCharCode;function uu(e){return e.trim()}function Xi(e,t,r){return e.replace(t,r)}function If(e,t,r){return e.indexOf(t,r)}function dr(e,t){return 0|e.charCodeAt(t)}function ur(e,t,r){return e.slice(t,r)}function le(e){return e.length}function Zi(e,t){return t.push(e),e}var Ki=1,pr=1,pu=0,Xt=0,kt=0,gr="";function Jo(e,t,r,i,a,o,s,n){return{value:e,root:t,parent:r,type:i,props:a,children:o,line:Ki,column:pr,length:s,return:"",siblings:n}}function Pf(){return kt=Xt>0?dr(gr,--Xt):0,pr--,kt===10&&(pr=1,Ki--),kt}function ee(){return kt=Xt<pu?dr(gr,Xt++):0,pr++,kt===10&&(pr=1,Ki++),kt}function _e(){return dr(gr,Xt)}function Qi(){return Xt}function Ji(e,t){return ur(gr,e,t)}function ii(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 tn(e){return uu(Ji(Xt-1,en(e===91?e+2:e===40?e+1:e)))}function zf(e){for(;(kt=_e())&&kt<33;)ee();return ii(e)>2||ii(kt)>3?"":" "}function Rf(e,t){for(;--t&&ee()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Ji(e,Qi()+(t<6&&_e()==32&&ee()==32))}function en(e){for(;ee();)switch(kt){case e:return Xt;case 34:case 39:e!==34&&e!==39&&en(kt);break;case 40:e===41&&en(e);break;case 92:ee()}return Xt}function qf(e,t){for(;ee()&&e+kt!==57&&(e+kt!==84||_e()!==47););return"/*"+Ji(t,Xt-1)+"*"+Gi(e===47?e:ee())}function Nf(e){for(;!ii(_e());)ee();return Ji(e,Xt)}function Wf(e){return function(t){return gr="",t}(ta("",null,null,null,[""],e=function(t){return Ki=pr=1,pu=le(gr=t),Xt=0,[]}(e),0,[0],e))}function ta(e,t,r,i,a,o,s,n,c){for(var l=0,h=0,d=s,p=0,g=0,f=0,m=1,x=1,y=1,b=0,w="",M=a,v=o,C=i,S=w;x;)switch(f=b,b=ee()){case 40:if(f!=108&&dr(S,d-1)==58){If(S+=Xi(tn(b),"&","&\f"),"&\f",Qo(l?n[l-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:S+=tn(b);break;case 9:case 10:case 13:case 32:S+=zf(f);break;case 92:S+=Rf(Qi()-1,7);continue;case 47:switch(_e()){case 42:case 47:Zi(jf(qf(ee(),Qi()),t,r,c),c),ii(f||1)!=5&&ii(_e()||1)!=5||!le(S)||ur(S,-1,void 0)===" "||(S+=" ");break;default:S+="/"}break;case 123*m:n[l++]=le(S)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+h:y==-1&&(S=Xi(S,/\f/g,"")),g>0&&(le(S)-d||m===0&&f===47)&&Zi(g>32?fu(S+";",i,r,d-1,c):fu(Xi(S," ","")+";",i,r,d-2,c),c);break;case 59:S+=";";default:if(Zi(C=gu(S,t,r,l,h,a,n,w,M=[],v=[],d,o),o),b===123)if(h===0)ta(S,t,C,C,M,o,d,n,v);else{switch(p){case 99:if(dr(S,3)===110)break;case 108:if(dr(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ta(e,C,C,i&&Zi(gu(e,C,C,0,0,a,n,w,a,M=[],d,v),v),a,v,d,n,i?M:v):ta(S,C,C,C,[""],v,0,n,v)}}l=h=g=0,m=y=1,w=S="",d=s;break;case 58:d=1+le(S),g=f;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Pf()==125)continue}switch(S+=Gi(b),b*m){case 38:y=h>0?1:(S+="\f",-1);break;case 44:n[l++]=(le(S)-1)*y,y=1;break;case 64:_e()===45&&(S+=tn(ee())),p=_e(),h=d=le(w=S+=Nf(Qi())),b++;break;case 45:f===45&&le(S)==2&&(m=0)}}return o}function gu(e,t,r,i,a,o,s,n,c,l,h,d){for(var p=a-1,g=a===0?o:[""],f=function(v){return v.length}(g),m=0,x=0,y=0;m<i;++m)for(var b=0,w=ur(e,p+1,p=Qo(x=s[m])),M=e;b<f;++b)(M=uu(x>0?g[b]+" "+w:Xi(w,/&\f/g,g[b])))&&(c[y++]=M);return Jo(e,t,r,a===0?Zo:n,c,l,h,d)}function jf(e,t,r,i){return Jo(e,t,r,Xo,Gi(kt),ur(e,2,-2),0,i)}function fu(e,t,r,i,a){return Jo(e,t,r,Ko,ur(e,0,i),ur(e,i+1,-1),i,a)}function rn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Hf(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Ko:return e.return=e.return||e.value;case Xo:return"";case"@keyframes":return e.return=e.value+"{"+rn(e.children,i)+"}";case Zo:if(!le(e.value=e.props.join(",")))return""}return le(r=rn(e.children,i))?e.return=e.value+"{"+r+"}":""}var Yf={id:"c4",detector:u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-6F6E4RAY-DxKKy3dR.js");return{diagram:t}},__vite__mapDeps([14,15,11,12,2,3,13]),import.meta.url);return{id:"c4",diagram:e}},"loader")},mu="flowchart",Uf=u((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"),Vf={id:mu,detector:Uf,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PKI6S5ZS-CU-Va1aE.js");return{diagram:t}},__vite__mapDeps([16,17,18,11,12,19,20,2,3,13]),import.meta.url);return{id:mu,diagram:e}},"loader")},yu="flowchart-v2",Gf=u((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"),Xf={id:yu,detector:Gf,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PKI6S5ZS-CU-Va1aE.js");return{diagram:t}},__vite__mapDeps([16,17,18,11,12,19,20,2,3,13]),import.meta.url);return{id:yu,diagram:e}},"loader")},Zf={id:"er",detector:u(e=>/^\s*erDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-R3QVA2FD-D5PS4EvQ.js");return{diagram:t}},__vite__mapDeps([21,18,11,12,19,20,2,3,13]),import.meta.url);return{id:"er",diagram:e}},"loader")},xu="gitGraph",Kf={id:xu,detector:u(e=>/^\s*gitGraph/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-GW3U2K7C-pn54JXWe.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:xu,diagram:e}},"loader")},bu="gantt",Qf={id:bu,detector:u(e=>/^\s*gantt/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-EK5VF46D-kiop1EZF.js");return{diagram:t}},__vite__mapDeps([27,2,3,11,12,28,29,30,13]),import.meta.url);return{id:bu,diagram:e}},"loader")},Cu="info",Jf={id:Cu,detector:u(e=>/^\s*info/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-RLU2ROGC-EF8K4onx.js");return{diagram:t}},__vite__mapDeps([31,25,2,3,5,4,7,8,10,26,11,12,13]),import.meta.url);return{id:Cu,diagram:e}},"loader")},tm={id:"pie",detector:u(e=>/^\s*pie/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-NIOCPIFQ-0MqmV6Yq.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")},ku="quadrantChart",em={id:ku,detector:u(e=>/^\s*quadrantChart/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-2OG54O6I-fGCClEd2.js");return{diagram:t}},__vite__mapDeps([35,11,12,29,2,3,30,13]),import.meta.url);return{id:ku,diagram:e}},"loader")},wu="xychart",rm={id:wu,detector:u(e=>/^\s*xychart-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-H2YORKM3-CT55rg7V.js");return{diagram:t}},__vite__mapDeps([36,11,12,30,34,37,29,2,3,13]),import.meta.url);return{id:wu,diagram:e}},"loader")},Su="requirement",im={id:Su,detector:u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-SO3GGRV7-XUEKHJ00.js");return{diagram:t}},__vite__mapDeps([38,18,11,12,19,2,3,13]),import.meta.url);return{id:Su,diagram:e}},"loader")},Tu="sequence",am={id:Tu,detector:u(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-ZIKVLSP4-DTVzsjuC.js");return{diagram:t}},__vite__mapDeps([39,15,24,11,12,2,3,13]),import.meta.url);return{id:Tu,diagram:e}},"loader")},Bu="class",om=u((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*classDiagram/.test(e)},"detector"),nm={id:Bu,detector:om,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-BGRH5UQR-B77_BoI9.js");return{diagram:t}},__vite__mapDeps([40,41,17,18,11,12,19,2,3,13]),import.meta.url);return{id:Bu,diagram:e}},"loader")},vu="classDiagram",sm=u((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"),lm={id:vu,detector:sm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-O24JOBDK-B77_BoI9.js");return{diagram:t}},__vite__mapDeps([42,41,17,18,11,12,19,2,3,13]),import.meta.url);return{id:vu,diagram:e}},"loader")},Lu="state",hm=u((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*stateDiagram/.test(e)},"detector"),cm={id:Lu,detector:hm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-XX37X6EN-CR4xcA7J.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:Lu,diagram:e}},"loader")},Mu="stateDiagram",dm=u((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"),um={id:Mu,detector:dm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-GD6S3NHB-D9oq-Lg_.js");return{diagram:t}},__vite__mapDeps([45,44,18,11,12,19,2,3,13]),import.meta.url);return{id:Mu,diagram:e}},"loader")},_u="journey",pm={id:_u,detector:u(e=>/^\s*journey/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-EWQZEKCU-r_tJeooO.js");return{diagram:t}},__vite__mapDeps([46,15,17,11,12,33,13,2,3]),import.meta.url);return{id:_u,diagram:e}},"loader")},gm=u((e,t,r)=>{$.debug(`rendering svg for syntax error
|
144
|
+
`);const i=Bn(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Ca(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"),Fu={draw:gm},fm=Fu,mm={db:{},renderer:Fu,parser:{parse:u(()=>{},"parse")}},Au="flowchart-elk",ym=u((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"),xm={id:Au,detector:ym,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PKI6S5ZS-CU-Va1aE.js");return{diagram:t}},__vite__mapDeps([16,17,18,11,12,19,20,2,3,13]),import.meta.url);return{id:Au,diagram:e}},"loader")},Eu="timeline",bm={id:Eu,detector:u(e=>/^\s*timeline/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-RI47OAVP-D7t9EQY4.js");return{diagram:t}},__vite__mapDeps([47,11,12,33,13,2,3]),import.meta.url);return{id:Eu,diagram:e}},"loader")},$u="mindmap",Cm={id:$u,detector:u(e=>/^\s*mindmap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-CZNETY7S-DBqhb2Xi.js");return{diagram:t}},__vite__mapDeps([48,49,2,3,11,12,13]),import.meta.url);return{id:$u,diagram:e}},"loader")},Ou="kanban",km={id:Ou,detector:u(e=>/^\s*kanban/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-ILFWEQ3N-Dh1DY3to.js");return{diagram:t}},__vite__mapDeps([50,17,2,3,11,12,13]),import.meta.url);return{id:Ou,diagram:e}},"loader")},Du="sankey",wm={id:Du,detector:u(e=>/^\s*sankey-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-4UZDY2LN-DEr-GME0.js");return{diagram:t}},__vite__mapDeps([51,11,12,34,30,52,2,3,13]),import.meta.url);return{id:Du,diagram:e}},"loader")},Iu="packet",Sm={id:Iu,detector:u(e=>/^\s*packet-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-5UYTHUR4-BPM94rdL.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:Iu,diagram:e}},"loader")},Pu="radar",Tm={id:Pu,detector:u(e=>/^\s*radar-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-ZTM2IBQH-BZivztwZ.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:Pu,diagram:e}},"loader")},zu="block",Bm={id:zu,detector:u(e=>/^\s*block-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-PHRCVELO-DF26LRMN.js");return{diagram:t}},__vite__mapDeps([55,17,10,4,2,3,5,11,12,1,20,13]),import.meta.url);return{id:zu,diagram:e}},"loader")},Ru="architecture",vm={id:Ru,detector:u(e=>/^\s*architecture/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-NQ2NVSRB-C-Q6h5E0.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:Ru,diagram:e}},"loader")},qu="treemap",Lm={id:qu,detector:u(e=>/^\s*treemap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-3EMPZRKU-BfiQqaJS.js");return{diagram:t}},__vite__mapDeps([57,19,23,24,25,2,3,5,4,7,8,10,26,11,12,34,30,58,13]),import.meta.url);return{id:qu,diagram:e}},"loader")},Nu=!1,ea=u(()=>{Nu||(Nu=!0,Yr("error",mm,e=>e.toLowerCase().trim()==="error"),Yr("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{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:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),fi(xm,Cm,vm),fi(Yf,km,lm,nm,Zf,Qf,Jf,tm,im,am,Xf,Vf,bm,Kf,um,cm,pm,em,wm,Sm,rm,Bm,Tm,Lm))},"addDiagrams"),Mm=u(async()=>{$.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Ie).map(async([t,{detector:r,loader:i}])=>{if(i)try{Si(t)}catch{try{const{diagram:a,id:o}=await i();Yr(o,a,r)}catch(a){throw $.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Ie[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 Wu(e,t){e.attr("role","graphics-document document"),t!==""&&e.attr("aria-roledescription",t)}function ju(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)}}}u(Wu,"setA11yDiagramInfo"),u(ju,"addSVGa11yTitleDescription");var an=(Ye=class{constructor(t,r,i,a,o){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=o}static async fromText(t,r={}){var l,h;const i=$t(),a=gi(t,i);t=Yh(t)+`
|
145
|
+
`;try{Si(a)}catch{const d=xs(a);if(!d)throw new Ia(`Diagram ${a} not found.`);const{id:p,diagram:g}=await d();Yr(p,g)}const{db:o,parser:s,renderer:n,init:c}=Si(a);return s.parser&&(s.parser.yy=o),(l=o.clear)==null||l.call(o),c==null||c(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await s.parse(t),new Ye(a,t,o,s,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},u(Ye,"Diagram"),Ye),Hu=[],_m=u(()=>{Hu.forEach(e=>{e()}),Hu=[]},"attachFunctions"),Fm=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Yu(e){const t=e.match(Da);if(!t)return{text:e,metadata:{}};let r=Un(t[1],{schema:vn})??{};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}}u(Yu,"extractFrontMatter");var Am=u(e=>e.replace(/\r\n?/g,`
|
146
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Em=u(e=>{const{text:t,metadata:r}=Yu(e),{displayMode:i,title:a,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:a,config:o,text:t}},"processFrontmatter"),$m=u(e=>{const t=Kt.detectInit(e)??{},r=Kt.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:$h(e),directive:t}},"processDirectives");function on(e){const t=Am(e),r=Em(t),i=$m(r.text),a=si(r.config,i.directive);return{code:e=Fm(i.text),title:r.title,config:a}}function Uu(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(on,"preprocessDiagram"),u(Uu,"toBase64");var Om=["foreignobject"],Dm=["dominant-baseline"];function nn(e){const t=on(e);return Nr(),Es(t.config??{}),t}async function Vu(e,t){ea();try{const{code:r,config:i}=nn(e);return{diagramType:(await Ku(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}u(nn,"processAndSetConfigs"),u(Vu,"parse");var Gu=u((e,t,r=[])=>`
|
147
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Im=u((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
|
148
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
149
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
150
|
+
: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(o=>{ba(o.styles)||a.forEach(s=>{r+=Gu(o.id,s,o.styles)}),ba(o.textStyles)||(r+=Gu(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),Pm=u((e,t,r,i)=>{const a=Im(e,r);return rn(Wf(`${i}{${Zs(t,a,e.themeVariables)}}`),Hf)},"createUserStyles"),zm=u((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ke(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Rm=u((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,${Uu(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
|
151
|
+
The "iframe" tag is not supported by your browser.
|
152
|
+
</iframe>`},"putIntoIFrame"),Xu=u((e,t,r,i,a)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const s=o.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 sn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(sn,"sandboxedIframe");var qm=u((e,t,r,i)=>{var a,o,s;(a=e.getElementById(t))==null||a.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(i))==null||s.remove()},"removeExistingElements"),Nm=u(async function(e,t,r){var F,B,L,A,_,E;ea();const i=nn(t);t=i.code;const a=$t();$.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 o="#"+e,s="i"+e,n="#"+s,c="d"+e,l="#"+c,h=u(()=>{const O=dt(p?n:l).node();O&&"remove"in O&&O.remove()},"removeTempElements");let d=dt("body");const p=a.securityLevel==="sandbox",g=a.securityLevel==="loose",f=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const O=sn(dt(r),s);d=dt(O.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt(r);Xu(d,e,c,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(qm(document,e,c,s),p){const O=sn(dt("body"),s);d=dt(O.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt("body");Xu(d,e,c)}let m,x;try{m=await an.fromText(t,{title:i.title})}catch(O){if(a.suppressErrorRendering)throw h(),O;m=await an.fromText("error"),x=O}const y=d.select(l).node(),b=m.type,w=y.firstChild,M=w.firstChild,v=(B=(F=m.renderer).getClasses)==null?void 0:B.call(F,t,m),C=Pm(a,b,v,o),S=document.createElement("style");S.innerHTML=C,w.insertBefore(S,M);try{await m.renderer.draw(t,e,da.version,m)}catch(O){throw a.suppressErrorRendering?h():fm.draw(t,e,da.version),O}const I=d.select(`${l} svg`),D=(A=(L=m.db).getAccTitle)==null?void 0:A.call(L),P=(E=(_=m.db).getAccDescription)==null?void 0:E.call(_);Qu(b,I,D,P),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=zm(z,p,Ct(a.arrowMarkerAbsolute)),p){const O=d.select(l+" svg").node();z=Rm(z,O)}else g||(z=De.sanitize(z,{ADD_TAGS:Om,ADD_ATTR:Dm,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(_m(),x)throw x;return h(),{diagramType:b,svg:z,bindFunctions:m.db.bindFunctions}},"render");function Zu(e={}){var i;const t=Bt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Fs(t),t!=null&&t.theme&&t.theme in ae?t.themeVariables=ae[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ae.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?_s(t):qa();pi(r.logLevel),ea()}u(Zu,"initialize");var Ku=u((e,t={})=>{const{code:r}=on(e);return an.fromText(r,t)},"getDiagramFromText");function Qu(e,t,r,i){Wu(t,e),ju(t,r,i,t.attr("id"))}u(Qu,"addA11yInfo");var He=Object.freeze({render:Nm,parse:Vu,getDiagramFromText:Ku,initialize:Zu,getConfig:$t,setConfig:Na,getSiteConfig:qa,updateSiteConfig:As,reset:u(()=>{Nr()},"reset"),globalReset:u(()=>{Nr(Pe)},"globalReset"),defaultConfig:Pe});pi($t().logLevel),Nr($t());var Wm=u((e,t,r)=>{$.warn(e),So(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"),Ju=u(async function(e={querySelector:".mermaid"}){try{await jm(e)}catch(t){if(So(t)&&$.error(t.str),Ut.parseError&&Ut.parseError(t),!e.suppressErrors)throw $.error("Use the suppressErrors option to suppress these errors"),t}},"run"),jm=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=He.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)),He.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new Kt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];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-${o.next()}`;s=c.innerHTML,s=Zh(Kt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Kt.detectInit(s);h&&$.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:p}=await ip(l,s,c);c.innerHTML=d,e&&await e(l),p&&p(c)}catch(d){Wm(d,n,Ut.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),tp=u(function(e){He.initialize(e)},"initialize"),Hm=u(async function(e,t,r){$.warn("mermaid.init is deprecated. Please use run instead."),e&&tp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ju(i)},"init"),Ym=u(async(e,{lazyLoad:t=!0}={})=>{ea(),fi(...e),t===!1&&await Mm()},"registerExternalDiagrams"),ep=u(function(){if(Ut.startOnLoad){const{startOnLoad:e}=He.getConfig();e&&Ut.run().catch(t=>$.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ep,!1);var Um=u(function(e){Ut.parseError=e},"setParseErrorHandler"),ra=[],ln=!1,rp=u(async()=>{if(!ln){for(ln=!0;ra.length>0;){const e=ra.shift();if(e)try{await e()}catch(t){$.error("Error executing queue",t)}}ln=!1}},"executeQueue"),Vm=u(async(e,t)=>new Promise((r,i)=>{const a=u(()=>new Promise((o,s)=>{He.parse(e,t).then(n=>{o(n),r(n)},n=>{var c;$.error("Error parsing",n),(c=Ut.parseError)==null||c.call(Ut,n),s(n),i(n)})}),"performCall");ra.push(a),rp().catch(i)}),"parse"),ip=u((e,t,r)=>new Promise((i,a)=>{const o=u(()=>new Promise((s,n)=>{He.render(e,t,r).then(c=>{s(c),i(c)},c=>{var l;$.error("Error parsing",c),(l=Ut.parseError)==null||l.call(Ut,c),n(c),a(c)})}),"performCall");ra.push(o),rp().catch(a)}),"render"),Ut={startOnLoad:!0,mermaidAPI:He,parse:Vm,render:ip,init:Hm,run:Ju,registerExternalDiagrams:Ym,registerLayoutLoaders:Go,initialize:tp,parseError:void 0,contentLoaded:ep,setParseErrorHandler:Um,detectType:gi,registerIconPacks:Pn},ap=Ut;const Gm={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 Xm(){return function(){const e="abcdefghijklmnopqrstuvwxyz";return Array.from({length:6},()=>e[Math.floor(26*Math.random())]).join("")}()}Rp=Object.freeze(Object.defineProperty({__proto__:null,default:e=>{const t=dy.c(9),{diagram:r}=e,[i]=uy.useState(Xm),a=py().theme==="dark";let o,s;ap.initialize({...Gm,theme:a?"dark":"forest",darkMode:a}),t[0]!==r||t[1]!==i?(o=async()=>(await ap.render(i,r,void 0).catch(l=>{var h;throw(h=document.getElementById(i))==null||h.remove(),fy.warn("Failed to render mermaid diagram",l),l})).svg,t[0]=r,t[1]=i,t[2]=o):o=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:n}=gy(o,s);if(!n)return null;let c;return t[7]!==n?(c=my.jsx("div",{dangerouslySetInnerHTML:{__html:n}}),t[7]=n,t[8]=c):c=t[8],c}},Symbol.toStringTag,{value:"Module"}))});export{kn as $,Ve as A,wn as B,Zt as C,Sn as D,si as E,$t as F,ca as G,Tn as H,Bn as I,vn as J,da as K,Ln as L,Ae as M,Ep as N,_r as O,ua as P,li as Q,pa as R,Mn as S,_n as T,tt as U,Ge as V,N as W,X,ga as Y,$p as Z,u as _,Ly as __tla,Fn as a,fa as a0,Op as a1,An as a2,Ct as a3,ue as a4,hi as a5,ma as a6,ke as a7,ya as a8,U as a9,xa as aa,En as ab,ba as ac,$n as ad,Dp as ae,Ip as af,Pp as ag,V as ah,zp as ai,On as aj,Dn as ak,In as al,Xe as am,Pn as an,zn as ao,Rn as ap,Rp as aq,qn as b,ut as c,Ca as d,Bt as e,re as f,Nn as g,we as h,Wn as i,Ee as j,ka as k,$ as l,Ze as m,qp as n,Np as o,jn as p,Hn as q,Wp as r,Yn as s,Un as t,Kt as u,Vn as v,Gn as w,jp as x,Xn as y,Hp as z};
|