@juki-team/base-ui 1.4.121 → 1.4.126
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/esm/ArrowForwardIcon-BGNGoaPb.js +1 -0
- package/dist/esm/BarChart-BRhncYPh.js +1 -0
- package/dist/esm/{CartesianChart-tXHM9yHp.js → CartesianChart-CHBFhWU-.js} +1 -1
- package/dist/esm/ChangePasswordModal-BQLB54Cr.js +1 -0
- package/dist/esm/CodeEditor-CYG_k0Lp.js +1 -0
- package/dist/esm/CodeViewer-B7gQlNa4.js +1 -0
- package/dist/esm/Collapse-qB-EKyco.js +1 -0
- package/dist/esm/{DataGrid-CD44fkam.js → DataGrid-cnHfaSnO.js} +1 -1
- package/dist/esm/DataViewer-CtixdklI.js +1 -0
- package/dist/esm/DrawerView-BX-EuTEz.js +1 -0
- package/dist/esm/ExcalidrawButton-mBvm3E_8.js +1 -0
- package/dist/esm/GraphvizViewer-BSUIZVzn.js +1 -0
- package/dist/esm/ImageLoaderCropper-CAxLOrvB.js +1 -0
- package/dist/esm/InputCellPhoneNumber-sEhV7X7S.js +1 -0
- package/dist/esm/{InputColor-D_uAIBKY.js → InputColor-DzcLo0RL.js} +3 -3
- package/dist/esm/LineChart-9CP_N6Dp.js +1 -0
- package/dist/esm/MdMath-C2cj4Ncj.js +1 -0
- package/dist/esm/{MdMathEditor-BUf36EaT.js → MdMathEditor-Bh-kGfC0.js} +1 -1
- package/dist/esm/{Popover-myjbsRtv.js → Popover-DI0clp6-.js} +1 -1
- package/dist/esm/ReplyIcon-B25ABlw2.js +1 -0
- package/dist/esm/SettingsIcon-ive9Ghpw.js +1 -0
- package/dist/esm/SlideDeck-CbQNd9o8.js +1 -0
- package/dist/esm/{ProblemStatus-C5CR0Z8d.js → SubmissionDateField-D3AvKusK.js} +1 -1
- package/dist/esm/TableOfContents-h0mxAylD.js +1 -0
- package/dist/esm/TextHeadCell-xNcsNvcB.js +1 -0
- package/dist/esm/{Tooltip-CHc2LM3e.js → Tooltip-B0QLaU02.js} +2 -2
- package/dist/esm/{UserCodeEditor-BwNoHEIy.js → UserCodeEditor-1Q_AyVss.js} +3 -3
- package/dist/esm/VirtualizedRowsFixed-FKX6Oha-.js +1 -0
- package/dist/esm/WorksheetAsSlides-DeGxqAVa.js +1 -0
- package/dist/esm/WorksheetBodies-C6g1jLca.js +1 -0
- package/dist/esm/WorksheetContents-BJVQN9Da.js +1 -0
- package/dist/esm/WorksheetEditor-OLyrUrSa.js +1 -0
- package/dist/esm/WorksheetNode-Cq5WqUjf.js +1 -0
- package/dist/esm/WorksheetViewer-KN7MZ6tv.js +1 -0
- package/dist/esm/architecture-YZFGNWBL-C3AvEsb9.js +1 -0
- package/dist/esm/architectureDiagram-Q4EWVU46-JfdzkzTF.js +1 -0
- package/dist/esm/blockDiagram-DXYQGD6D-CCNaXRDY.js +1 -0
- package/dist/esm/c4Diagram-AHTNJAMY-DYguHdC-.js +1 -0
- package/dist/esm/channel-BwWtuiHW.js +1 -0
- package/dist/esm/{chunk-4BX2VUAB-COJYrArq.js → chunk-4BX2VUAB-B3YOaF9V.js} +1 -1
- package/dist/esm/{chunk-4TB4RGXK-BgOhjp4u.js → chunk-4TB4RGXK-DoSJMkEM.js} +1 -1
- package/dist/esm/{chunk-55IACEB6-BlGeNxvg.js → chunk-55IACEB6-B252J5rd.js} +1 -1
- package/dist/esm/{chunk-EDXVE4YY-CrsJ2Hnl.js → chunk-EDXVE4YY-BFbj9sbF.js} +1 -1
- package/dist/esm/{chunk-FMBD7UC4-PcmGZaXU.js → chunk-FMBD7UC4-yfeFLPr5.js} +1 -1
- package/dist/esm/{chunk-OYMX7WX6-Dd_OySsr.js → chunk-OYMX7WX6-Ck43KFw_.js} +1 -1
- package/dist/esm/{chunk-QZHKN3VN-D5wczz_U.js → chunk-QZHKN3VN-Bu8lDQIJ.js} +1 -1
- package/dist/esm/{chunk-YZCP3GAM-J0il8D93.js → chunk-YZCP3GAM-BleOO0o9.js} +1 -1
- package/dist/esm/classDiagram-6PBFFD2Q-BXMqxslq.js +1 -0
- package/dist/esm/classDiagram-v2-HSJHXN6E-BXMqxslq.js +1 -0
- package/dist/esm/clone-BOCOsCRj.js +1 -0
- package/dist/esm/cose-bilkent-S5V4N54A-B9_if8Zu.js +1 -0
- package/dist/esm/dagre-KV5264BT-DV80i6H7.js +1 -0
- package/dist/esm/diagram-5BDNPKRD-CvSq5VhZ.js +1 -0
- package/dist/esm/diagram-G4DWMVQ6-2LXWeAq0.js +1 -0
- package/dist/esm/diagram-MMDJMWI5-C9TdZJKm.js +1 -0
- package/dist/esm/diagram-TYMM5635-BnRtbot8.js +1 -0
- package/dist/esm/erDiagram-SMLLAGMA-DcBeM5L8.js +1 -0
- package/dist/esm/flowDiagram-DWJPFMVM-DB-IVMWG.js +1 -0
- package/dist/esm/ganttDiagram-T4ZO3ILL-CHeCKKxg.js +1 -0
- package/dist/esm/gitGraph-7Q5UKJZL-NBOYkfJG.js +1 -0
- package/dist/esm/gitGraphDiagram-UUTBAWPF-Bu-s5uIZ.js +1 -0
- package/dist/esm/{graph-Bh_6Hxf_.js → graph-Da_w8zjC.js} +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/{index-Bx0ktss6.js → index-BIV0VXr-.js} +1 -1
- package/dist/esm/index-CDfJgeHe.js +2 -0
- package/dist/esm/{index-BWbfbDmw.js → index-CH9DJEEq.js} +1 -1
- package/dist/esm/index-DSRdBu-J.js +1 -0
- package/dist/esm/index-tqdOtCFo.js +1 -0
- package/dist/esm/info-OMHHGYJF-CzmEvbS6.js +1 -0
- package/dist/esm/infoDiagram-42DDH7IO-CPcCPi5m.js +1 -0
- package/dist/esm/ishikawaDiagram-UXIWVN3A-CueHOskG.js +1 -0
- package/dist/esm/journeyDiagram-VCZTEJTY-CIFSUUZI.js +1 -0
- package/dist/esm/kanban-definition-6JOO6SKY-CIs3hbs0.js +1 -0
- package/dist/esm/{layout-BsYGzjO0.js → layout-DDbWXrIm.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/{mermaid-parser.core-DxB6tfwM.js → mermaid-parser.core-DanmL-Td.js} +1 -1
- package/dist/esm/{mermaid.core-DmkzFmrK.js → mermaid.core-BHSaFUkv.js} +1 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-SgHbFXe-.js +1 -0
- package/dist/esm/packet-4T2RLAQJ-CPh-Emqi.js +1 -0
- package/dist/esm/pie-ZZUOXDRM-BG9lV5xj.js +1 -0
- package/dist/esm/pieDiagram-DEJITSTG-BXJ3wszp.js +1 -0
- package/dist/esm/quadrantDiagram-34T5L4WZ-DQY0pNz6.js +1 -0
- package/dist/esm/radar-PYXPWWZC-CTTR6mD4.js +1 -0
- package/dist/esm/requirementDiagram-MS252O5E-BEx2GMJz.js +1 -0
- package/dist/esm/sankeyDiagram-XADWPNL6-Xs8yE439.js +1 -0
- package/dist/esm/sequenceDiagram-FGHM5R23-BRN5pTP-.js +1 -0
- package/dist/esm/server.js +1 -1
- package/dist/esm/settings.js +1 -1
- package/dist/esm/stateDiagram-FHFEXIEX-BgMmQXPF.js +1 -0
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-DcAYS7fn.js +1 -0
- package/dist/esm/timeline-definition-GMOUNBTQ-B8yc3YE0.js +1 -0
- package/dist/esm/treeView-SZITEDCU-BQoV8XJs.js +1 -0
- package/dist/esm/treemap-W4RFUUIX-BuNBpvu9.js +1 -0
- package/dist/esm/{types-NAGOQCyQ.js → types-Vls6Vkq9.js} +1 -1
- package/dist/esm/vennDiagram-DHZGUBPP-CWksExk6.js +1 -0
- package/dist/esm/wardley-RL74JXVD-B1RYxIGW.js +1 -0
- package/dist/esm/wardleyDiagram-NUSXRM2D-B0EUAKR5.js +1 -0
- package/dist/esm/{websocket-Nx7WdiK7.js → websocket-DCvEZ5Ma.js} +1 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-KvOi074l.js +1 -0
- package/dist/module-types/src/components/templates/columns/contest-columns/index.d.ts +2 -2
- package/dist/module-types/src/components/templates/index.d.ts +0 -2
- package/dist/module-types/src/components/templates/{columns → server/columns}/contest-columns/getContestContestantsHeader.d.ts +1 -1
- package/dist/module-types/src/components/templates/{columns → server/columns}/contest-columns/getContestDateHeader.d.ts +1 -1
- package/dist/module-types/src/components/templates/server/index.d.ts +4 -0
- package/dist/module-types/src/components/templates/{problem → server/problem}/TagsField.d.ts +1 -1
- package/dist/module-types/src/components/templates/{submission → server/submission}/SubmissionDateField.d.ts +1 -1
- package/package.json +1 -1
- package/src/styles/components/atoms/_data-viewer.scss +3 -3
- package/dist/esm/ArrowForwardIcon-CVIKnzmu.js +0 -1
- package/dist/esm/BarChart-C4j466sV.js +0 -1
- package/dist/esm/ChangePasswordModal-DAn7XeyD.js +0 -1
- package/dist/esm/CodeEditor-CFWIRByc.js +0 -1
- package/dist/esm/CodeViewer-C6XCe0GT.js +0 -1
- package/dist/esm/Collapse-DpriDerh.js +0 -1
- package/dist/esm/DataViewer-B1l0B0-d.js +0 -1
- package/dist/esm/DrawerView-hvnlPQq6.js +0 -1
- package/dist/esm/ExcalidrawButton-COXAKOpn.js +0 -1
- package/dist/esm/GraphvizViewer-BK4ypl3L.js +0 -1
- package/dist/esm/ImageLoaderCropper-DEt5ge51.js +0 -1
- package/dist/esm/InputCellPhoneNumber-CbFB6H2i.js +0 -1
- package/dist/esm/LineChart-B3nrTHaA.js +0 -1
- package/dist/esm/MdMath-Mf8WxhKy.js +0 -1
- package/dist/esm/ReplyIcon-DJFT1Tjl.js +0 -1
- package/dist/esm/SettingsIcon-CaFHSleq.js +0 -1
- package/dist/esm/SlideDeck-DvVHz3uy.js +0 -1
- package/dist/esm/TableOfContents-I1zUQZlM.js +0 -1
- package/dist/esm/TextHeadCell-CDT516Nd.js +0 -1
- package/dist/esm/VirtualizedRowsFixed-SmGRufd0.js +0 -1
- package/dist/esm/WorksheetAsSlides-BQVnbTDc.js +0 -1
- package/dist/esm/WorksheetBodies-kphWX0g5.js +0 -1
- package/dist/esm/WorksheetContents-CI8UrxIy.js +0 -1
- package/dist/esm/WorksheetEditor-CHC4ormG.js +0 -1
- package/dist/esm/WorksheetNode-C9ioDzE-.js +0 -1
- package/dist/esm/WorksheetViewer-Drg2e9_6.js +0 -1
- package/dist/esm/architecture-YZFGNWBL-DHLZLvJj.js +0 -1
- package/dist/esm/architectureDiagram-Q4EWVU46-DO8F0qz7.js +0 -1
- package/dist/esm/blockDiagram-DXYQGD6D-DNKe0cgR.js +0 -1
- package/dist/esm/c4Diagram-AHTNJAMY-DN5fuFmb.js +0 -1
- package/dist/esm/channel-4mHTJV-N.js +0 -1
- package/dist/esm/classDiagram-6PBFFD2Q-BudcHsyy.js +0 -1
- package/dist/esm/classDiagram-v2-HSJHXN6E-BudcHsyy.js +0 -1
- package/dist/esm/clone-Bdky4iBO.js +0 -1
- package/dist/esm/cose-bilkent-S5V4N54A-ZsIi3T0h.js +0 -1
- package/dist/esm/dagre-KV5264BT-Ps6KiA13.js +0 -1
- package/dist/esm/diagram-5BDNPKRD-CmcDSDfS.js +0 -1
- package/dist/esm/diagram-G4DWMVQ6-MRapKKyA.js +0 -1
- package/dist/esm/diagram-MMDJMWI5--Lf_QB5P.js +0 -1
- package/dist/esm/diagram-TYMM5635-CfbzkptG.js +0 -1
- package/dist/esm/erDiagram-SMLLAGMA-DmAtzyw1.js +0 -1
- package/dist/esm/flowDiagram-DWJPFMVM-Cd5g_eEq.js +0 -1
- package/dist/esm/ganttDiagram-T4ZO3ILL-O3kXJMuu.js +0 -1
- package/dist/esm/gitGraph-7Q5UKJZL-w9fSBFuS.js +0 -1
- package/dist/esm/gitGraphDiagram-UUTBAWPF-XLFtNk0y.js +0 -1
- package/dist/esm/index-DdRpaNiN.js +0 -1
- package/dist/esm/index-USryHMlL.js +0 -1
- package/dist/esm/index-tDMZSRa9.js +0 -2
- package/dist/esm/info-OMHHGYJF-6icJTSRL.js +0 -1
- package/dist/esm/infoDiagram-42DDH7IO-DiPK6iLZ.js +0 -1
- package/dist/esm/ishikawaDiagram-UXIWVN3A-DNCSSMvk.js +0 -1
- package/dist/esm/journeyDiagram-VCZTEJTY-BxyeAOhI.js +0 -1
- package/dist/esm/kanban-definition-6JOO6SKY-BR8Xd4RY.js +0 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-BUmIu9eO.js +0 -1
- package/dist/esm/packet-4T2RLAQJ-jB8585_W.js +0 -1
- package/dist/esm/pie-ZZUOXDRM-BKLoVTcY.js +0 -1
- package/dist/esm/pieDiagram-DEJITSTG-CJQonP9T.js +0 -1
- package/dist/esm/quadrantDiagram-34T5L4WZ-o3IEMDUC.js +0 -1
- package/dist/esm/radar-PYXPWWZC-BBal7TH8.js +0 -1
- package/dist/esm/requirementDiagram-MS252O5E-CSBSz0_J.js +0 -1
- package/dist/esm/sankeyDiagram-XADWPNL6-Dd0d-7E4.js +0 -1
- package/dist/esm/sequenceDiagram-FGHM5R23-DEPMVZxI.js +0 -1
- package/dist/esm/stateDiagram-FHFEXIEX-B_eljgWF.js +0 -1
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-D9FCD1lO.js +0 -1
- package/dist/esm/timeline-definition-GMOUNBTQ-Cg4NUF_H.js +0 -1
- package/dist/esm/treeView-SZITEDCU-S-ba_Q_y.js +0 -1
- package/dist/esm/treemap-W4RFUUIX-CnmNi6qL.js +0 -1
- package/dist/esm/vennDiagram-DHZGUBPP-B0vBQEXk.js +0 -1
- package/dist/esm/wardley-RL74JXVD-CQrog0ka.js +0 -1
- package/dist/esm/wardleyDiagram-NUSXRM2D-BxnrOeU9.js +0 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-B6KmAHYz.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as t}from"./index-tDMZSRa9.js";import{p as e}from"./purify.es-BkjUCQC6.js";import{D as r,E as i,e as o,y as a,z as s,A as n,B as l,F as h,G as c,H as d,I as u,J as p,K as g,L as f,M as y,N as m,O as C,P as x,Q as k,k as b,l as w}from"./string-LeDn2fkG.js";import{a as T,c as B,s as S,F as v,f as _,n as L,T as F,C as M,O as A,G as $}from"./memoize-CPUrcYQl.js";function E(t,e){this._basis=new r(t),this._beta=e}E.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],a=e[0],s=t[r]-o,n=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*s),this._beta*e[l]+(1-this._beta)*(a+i*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var q=function t(e){function i(t){return 1===e?new r(t):new E(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function I(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function O(t,e){this._context=t,this._k=(1-e)/6}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:I(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:I(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var D=function t(e){function r(t){return new O(t,e)}return r.tension=function(e){return t(+e)},r}(0);function z(t,e){this._context=t,this._k=(1-e)/6}z.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:I(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var P=function t(e){function r(t){return new z(t,e)}return r.tension=function(e){return t(+e)},r}(0);function W(t,e){this._context=t,this._k=(1-e)/6}W.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:I(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var R=function t(e){function r(t){return new W(t,e)}return r.tension=function(e){return t(+e)},r}(0);function N(t,e,r){var i=t._x1,a=t._y1,s=t._x2,n=t._y2;if(t._l01_a>o){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,a=(a*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>o){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/d,n=(n*c+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(i,a,s,n,t._x2,t._y2)}function j(t,e){this._context=t,this._alpha=e}j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:N(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var H=function t(e){function r(t){return e?new j(t,e):new O(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Y(t,e){this._context=t,this._alpha=e}Y.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:N(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U=function t(e){function r(t){return e?new Y(t,e):new z(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function V(t,e){this._context=t,this._alpha=e}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:N(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var X,G=function t(e){function r(t){return e?new V(t,e):new W(t,0)}return r.alpha=function(e){return t(+e)},r}(.5),Z=180/Math.PI,Q={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function J(t,e,r,i,o,a){var s,n,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),t*i<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*Z,skewX:Math.atan(l)*Z,scaleX:s,scaleY:n}}function K(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(s,n){var l=[],h=[];return s=t(s),n=t(n),function(t,i,o,s,n,l){if(t!==o||i!==s){var h=n.push("translate(",null,e,null,r);l.push({i:h-4,x:a(t,o)},{i:h-2,x:a(i,s)})}else(o||s)&&n.push("translate("+o+e+s+r)}(s.translateX,s.translateY,n.translateX,n.translateY,l,h),function(t,e,r,s){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),s.push({i:r.push(o(r)+"rotate(",null,i)-2,x:a(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(s.rotate,n.rotate,l,h),function(t,e,r,s){t!==e?s.push({i:r.push(o(r)+"skewX(",null,i)-2,x:a(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(s.skewX,n.skewX,l,h),function(t,e,r,i,s,n){if(t!==r||e!==i){var l=s.push(o(s)+"scale(",null,",",null,")");n.push({i:l-4,x:a(t,r)},{i:l-2,x:a(e,i)})}else 1===r&&1===i||s.push(o(s)+"scale("+r+","+i+")")}(s.scaleX,s.scaleY,n.scaleX,n.scaleY,l,h),s=n=null,function(t){for(var e,r=-1,i=h.length;++r<i;)l[(e=h[r]).i]=e.x(t);return l.join("")}}}var tt=K(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Q:J(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),et=K(function(t){return null==t?Q:(X||(X=document.createElementNS("http://www.w3.org/2000/svg","g")),X.setAttribute("transform",t),(t=X.transform.baseVal.consolidate())?J((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Q)},", ",")",")"),rt=Object.prototype.hasOwnProperty;function it(t){if(null==t)return!0;if(T(t)&&(B(t)||"string"==typeof t||"function"==typeof t.splice||S(t)||v(t)||_(t)))return!t.length;var e=L(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(F(t))return!M(t).length;for(var r in t)if(rt.call(t,r))return!1;return!0}var ot,at={exports:{}};var st=(ot||(ot=1,at.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",a="minute",s="hour",n="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},C={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),a=r-o<0,s=e.clone().add(i+(a?-1:1),h);return+(-(i+(r-o)/(a?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:n,D:u,h:s,m:a,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",k={};k[x]=y;var b="$isDayjsObject",w=function(t){return t instanceof v||!(!t||!t[b])},T=function t(e,r,i){var o;if(!e)return x;if("string"==typeof e){var a=e.toLowerCase();k[a]&&(o=a),r&&(k[a]=r,o=a);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var n=e.name;k[n]=e,o=n}return!i&&o&&(x=o),o||!i&&x},B=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new v(r)},S=C;S.l=T,S.i=w,S.w=function(t,e){return B(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var v=function(){function y(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[b]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=B(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return B(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<B(t)},m.$g=function(t,e,r){return S.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!S.u(e)||e,c=S.p(t),p=function(t,e){var o=S.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(n)},g=function(t,e){return S.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,C="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var x=this.$locale().weekStart||0,k=(f<x?f+7:f)-x;return p(i?m-k:m+(6-k),y);case n:case u:return g(C+"Hours",0);case s:return g(C+"Minutes",1);case a:return g(C+"Seconds",2);case o:return g(C+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=S.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[n]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[s]=c+"Hours",r[a]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===n?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[S.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=S.p(c),f=function(t){var e=B(p);return S.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===n)return f(1);if(g===l)return f(7);var y=(u={},u[a]=e,u[s]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return S.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),a=this.$H,s=this.$m,n=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,a){return t&&(t[r]||t(e,i))||o[r].slice(0,a)},u=function(t){return S.s(a%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return n+1;case"MM":return S.s(n+1,2,"0");case"MMM":return d(r.monthsShort,n,h,3);case"MMMM":return d(h,n);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return S.s(a,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(a,s,!0);case"A":return g(a,s,!1);case"m":return String(s);case"mm":return S.s(s,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=S.p(u),m=B(i),C=(m.utcOffset()-this.utcOffset())*e,x=this-m,k=function(){return S.m(f,m)};switch(y){case d:g=k()/12;break;case h:g=k();break;case c:g=k()/3;break;case l:g=(x-C)/6048e5;break;case n:g=(x-C)/864e5;break;case s:g=x/r;break;case a:g=x/e;break;case o:g=x/t;break;default:g=x}return p?g:S.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return k[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=T(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return S.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=v.prototype;return B.prototype=_,[["$ms",i],["$s",o],["$m",a],["$H",s],["$W",n],["$M",h],["$y",d],["$D",u]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),B.extend=function(t,e){return t.$i||(t(e,v,B),t.$i=!0),B},B.locale=T,B.isDayjs=w,B.unix=function(t){return B(1e3*t)},B.en=k[x],B.Ls=k,B.p={},B}()),at.exports),nt=t(st),lt=Object.defineProperty,ht=(t,e)=>lt(t,"name",{value:e,configurable:!0}),ct=(t,e)=>{for(var r in e)lt(t,r,{get:e[r],enumerable:!0})},dt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ut={trace:ht((...t)=>{},"trace"),debug:ht((...t)=>{},"debug"),info:ht((...t)=>{},"info"),warn:ht((...t)=>{},"warn"),error:ht((...t)=>{},"error"),fatal:ht((...t)=>{},"fatal")},pt=ht(function(t="fatal"){let e=dt.fatal;"string"==typeof t?t.toLowerCase()in dt&&(e=dt[t]):"number"==typeof t&&(e=t),ut.trace=()=>{},ut.debug=()=>{},ut.info=()=>{},ut.warn=()=>{},ut.error=()=>{},ut.fatal=()=>{},e<=dt.fatal&&(ut.fatal=console.error?console.error.bind(console,gt("FATAL"),"color: orange"):console.log.bind(console,"[35m",gt("FATAL"))),e<=dt.error&&(ut.error=console.error?console.error.bind(console,gt("ERROR"),"color: orange"):console.log.bind(console,"[31m",gt("ERROR"))),e<=dt.warn&&(ut.warn=console.warn?console.warn.bind(console,gt("WARN"),"color: orange"):console.log.bind(console,"[33m",gt("WARN"))),e<=dt.info&&(ut.info=console.info?console.info.bind(console,gt("INFO"),"color: lightblue"):console.log.bind(console,"[34m",gt("INFO"))),e<=dt.debug&&(ut.debug=console.debug?console.debug.bind(console,gt("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",gt("DEBUG"))),e<=dt.trace&&(ut.trace=console.debug?console.debug.bind(console,gt("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",gt("TRACE")))},"setLogLevel"),gt=ht(t=>`%c${nt().format("ss.SSS")} : ${t} : `,"format");const ft={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return 255*ft.hue2rgb(a,o,t+1/3);case"g":return 255*ft.hue2rgb(a,o,t);case"b":return 255*ft.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if("l"===i)return 100*s;if(o===a)return 0;const n=o-a;if("s"===i)return 100*(s>.5?n/(2-o-a):n/(o+a));switch(o){case t:return 60*((e-r)/n+(e<r?6:0));case e:return 60*((r-t)/n+2);case r:return 60*((t-e)/n+4);default:return-1}}},yt={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},mt={channel:ft,lang:yt,unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Ct={};for(let t=0;t<=255;t++)Ct[t]=mt.unit.dec2hex(t);const xt=0,kt=1,bt=2;class wt{constructor(){this.type=xt}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=xt}is(t){return this.type===t}}const Tt=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new wt}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=xt,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=mt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=mt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=mt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=mt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=mt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=mt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(bt)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(bt)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(bt)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(kt)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(kt)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(kt)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(kt),this.changed=!0,this.data.r=t}set g(t){this.type.set(kt),this.changed=!0,this.data.g=t}set b(t){this.type.set(kt),this.changed=!0,this.data.b=t}set h(t){this.type.set(bt),this.changed=!0,this.data.h=t}set s(t){this.type.set(bt),this.changed=!0,this.data.s=t}set l(t){this.type.set(bt),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),Bt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(Bt.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,a=o%4==0,s=o>4,n=s?1:17,l=s?8:4,h=a?0:-1,c=s?255:15;return Tt.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${Ct[Math.round(e)]}${Ct[Math.round(r)]}${Ct[Math.round(i)]}${Ct[Math.round(255*o)]}`:`#${Ct[Math.round(e)]}${Ct[Math.round(r)]}${Ct[Math.round(i)]}`}},St={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(St.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return mt.channel.clamp.h(.9*parseFloat(t));case"rad":return mt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return mt.channel.clamp.h(360*parseFloat(t))}}return mt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(St.re);if(!r)return;const[,i,o,a,s,n]=r;return Tt.set({h:St._hue2deg(i),s:mt.channel.clamp.s(parseFloat(o)),l:mt.channel.clamp.l(parseFloat(a)),a:s?mt.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${mt.lang.round(e)}, ${mt.lang.round(r)}%, ${mt.lang.round(i)}%, ${o})`:`hsl(${mt.lang.round(e)}, ${mt.lang.round(r)}%, ${mt.lang.round(i)}%)`}},vt={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=vt.colors[t];if(e)return Bt.parse(e)},stringify:t=>{const e=Bt.stringify(t);for(const t in vt.colors)if(vt.colors[t]===e)return t}},_t={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(_t.re);if(!r)return;const[,i,o,a,s,n,l,h,c]=r;return Tt.set({r:mt.channel.clamp.r(o?2.55*parseFloat(i):parseFloat(i)),g:mt.channel.clamp.g(s?2.55*parseFloat(a):parseFloat(a)),b:mt.channel.clamp.b(l?2.55*parseFloat(n):parseFloat(n)),a:h?mt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${mt.lang.round(e)}, ${mt.lang.round(r)}, ${mt.lang.round(i)}, ${mt.lang.round(o)})`:`rgb(${mt.lang.round(e)}, ${mt.lang.round(r)}, ${mt.lang.round(i)})`}},Lt={format:{keyword:vt,hex:Bt,rgb:_t,rgba:_t,hsl:St,hsla:St},parse:t=>{if("string"!=typeof t)return t;const e=Bt.parse(t)||_t.parse(t)||St.parse(t)||vt.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(bt)||void 0===t.data.r?St.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?_t.stringify(t):Bt.stringify(t)},Ft=(t,e)=>{const r=Lt.parse(t);for(const t in e)r[t]=mt.channel.clamp[t](e[t]);return Lt.stringify(r)},Mt=(t,e,r=0,i=1)=>{if("number"!=typeof t)return Ft(t,{a:e});const o=Tt.set({r:mt.channel.clamp.r(t),g:mt.channel.clamp.g(e),b:mt.channel.clamp.b(r),a:mt.channel.clamp.a(i)});return Lt.stringify(o)},At=t=>(t=>{const{r:e,g:r,b:i}=Lt.parse(t),o=.2126*mt.channel.toLinear(e)+.7152*mt.channel.toLinear(r)+.0722*mt.channel.toLinear(i);return mt.lang.round(o)})(t)>=.5,$t=t=>!At(t),Et=(t,e,r)=>{const i=Lt.parse(t),o=i[e],a=mt.channel.clamp[e](o+r);return o!==a&&(i[e]=a),Lt.stringify(i)},qt=(t,e)=>Et(t,"l",e),It=(t,e)=>Et(t,"l",-e),Ot=(t,e)=>{const r=Lt.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return Ft(t,i)},Dt=(t,e=100)=>{const r=Lt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:o,b:a,a:s}=Lt.parse(t),{r:n,g:l,b:h,a:c}=Lt.parse(e),d=r/100,u=2*d-1,p=s-c,g=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return Mt(i*g+n*f,o*g+l*f,a*g+h*f,s*d+c*(1-d))})(r,t,e)};var zt,Pt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Wt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Rt=/\s*%%.*\n/gm,Nt=class extends Error{static{ht(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},jt={},Ht=ht(function(t,e){t=t.replace(Pt,"").replace(Wt,"").replace(Rt,"\n");for(const[r,{detector:i}]of Object.entries(jt)){if(i(t,e))return r}throw new Nt(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Yt=ht((...t)=>{for(const{id:e,detector:r,loader:i}of t)Ut(e,r,i)},"registerLazyLoadedDiagrams"),Ut=ht((t,e,r)=>{jt[t]&&ut.warn(`Detector with key ${t} already exists. Overwriting.`),jt[t]={detector:e,loader:r},ut.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Vt=ht(t=>jt[t].loader,"getDiagramLoader"),Xt=ht((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>Xt(t,e,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||void 0!==t[o]&&"object"!=typeof t[o]?(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o]):(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=Xt(t[o],e[o],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),Gt=Xt,Zt="#ffffff",Qt="#f2f2f2",Jt=ht((t,e)=>Ot(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),Kt=class{static{ht(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(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||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||It(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||It(this.mainBkg,10)):(this.rowOdd=this.rowOdd||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||qt(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||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??Ot(this.primaryColor,{l:-30}),this.venn2=this.venn2??Ot(this.secondaryColor,{l:-30}),this.venn3=this.venn3??Ot(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??Ot(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??Ot(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??Ot(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??Ot(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??Ot(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},te=ht(t=>{const e=new Kt;return e.calculate(t),e},"getThemeVariables"),ee=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=It("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=It(this.sectionBkgColor,10),this.taskBorderColor=Mt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Mt(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||qt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||It(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=qt(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=qt(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=qt(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=Dt(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(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||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??qt(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=qt(this.secondaryColor,20),this.git1=qt(this.pie2||this.secondaryColor,20),this.git2=qt(this.pie3||this.tertiaryColor,20),this.git3=qt(this.pie4||Ot(this.primaryColor,{h:-30}),20),this.git4=qt(this.pie5||Ot(this.primaryColor,{h:-60}),20),this.git5=qt(this.pie6||Ot(this.primaryColor,{h:-90}),10),this.git6=qt(this.pie7||Ot(this.primaryColor,{h:60}),10),this.git7=qt(this.pie8||Ot(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Dt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Dt(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||qt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},re=ht(t=>{const e=new ee;return e.calculate(t),e},"getThemeVariables"),ie=class{static{ht(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ot(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Mt(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||It(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||It(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ot(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||Dt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Dt(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||qt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||qt(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=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Ot(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??Ot(this.primaryColor,{l:-30}),this.venn2=this.venn2??Ot(this.secondaryColor,{l:-30}),this.venn3=this.venn3??Ot(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??Ot(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??Ot(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??Ot(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??Ot(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??Ot(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||It(Dt(this.git0),25),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Dt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},oe=ht(t=>{const e=new ie;return e.calculate(t),e},"getThemeVariables"),ae=class{static{ht(this,"Theme")}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=qt("#cde498",10),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.primaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=It(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||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||It(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||It(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ot(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});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||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||qt(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=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(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||Ot(this.primaryColor,{l:-30}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ot(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??Ot(this.primaryColor,{l:-30}),this.venn2=this.venn2??Ot(this.secondaryColor,{l:-30}),this.venn3=this.venn3??Ot(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??Ot(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??Ot(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??Ot(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??Ot(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??Ot(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Dt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},se=ht(t=>{const e=new ae;return e.calculate(t),e},"getThemeVariables"),ne=class{static{ht(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=qt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=qt(this.contrast,55),this.border2=this.contrast,this.actorBorder=qt(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{l:-(8+5*t)});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=qt(this.contrast,30),this.sectionBkgColor2=qt(this.contrast,30),this.taskBorderColor=It(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=qt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=It(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=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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=It(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Ot(this.primaryColor,{h:-30}),this.git4=this.pie5||Ot(this.primaryColor,{h:-60}),this.git5=this.pie6||Ot(this.primaryColor,{h:-90}),this.git6=this.pie7||Ot(this.primaryColor,{h:60}),this.git7=this.pie8||Ot(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},le=ht(t=>{const e=new ne;return e.calculate(t),e},"getThemeVariables"),he=class{static{ht(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=Ot(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||Ot(t,{h:30}),this.cScale4=this.cScale4||Ot(t,{h:60}),this.cScale5=this.cScale5||Ot(t,{h:90}),this.cScale6=this.cScale6||Ot(t,{h:120}),this.cScale7=this.cScale7||Ot(t,{h:150}),this.cScale8=this.cScale8||Ot(t,{h:210,l:150}),this.cScale9=this.cScale9||Ot(t,{h:270}),this.cScale10=this.cScale10||Ot(t,{h:300}),this.cScale11=this.cScale11||Ot(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||Ot(t,{h:64}),this.fillType3=this.fillType3||Ot(e,{h:64}),this.fillType4=this.fillType4||Ot(t,{h:-64}),this.fillType5=this.fillType5||Ot(e,{h:-64}),this.fillType6=this.fillType6||Ot(t,{h:128}),this.fillType7=this.fillType7||Ot(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||Ot(t,{l:-10}),this.pie5=this.pie5||Ot(e,{l:-10}),this.pie6=this.pie6||Ot(r,{l:-10}),this.pie7=this.pie7||Ot(t,{h:60,l:-10}),this.pie8=this.pie8||Ot(t,{h:-60,l:-10}),this.pie9=this.pie9||Ot(t,{h:120,l:0}),this.pie10=this.pie10||Ot(t,{h:60,l:-20}),this.pie11=this.pie11||Ot(t,{h:-60,l:-20}),this.pie12=this.pie12||Ot(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||Ot(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||Ot(t,{h:-30}),this.git4=this.git4||Ot(t,{h:-60}),this.git5=this.git5||Ot(t,{h:-90}),this.git6=this.git6||Ot(t,{h:60}),this.git7=this.git7||Ot(t,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ce=ht(t=>{const e=new he;return e.calculate(t),e},"getThemeVariables"),de=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor=Dt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(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||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ue=ht(t=>{const e=new de;return e.calculate(t),e},"getThemeVariables"),pe=class{static{ht(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Jt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=Ot(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||Ot(t,{h:64}),this.fillType3=this.fillType3||Ot(e,{h:64}),this.fillType4=this.fillType4||Ot(t,{h:-64}),this.fillType5=this.fillType5||Ot(e,{h:-64}),this.fillType6=this.fillType6||Ot(t,{h:128}),this.fillType7=this.fillType7||Ot(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||Ot(t,{l:-10}),this.pie5=this.pie5||Ot(e,{l:-10}),this.pie6=this.pie6||Ot(r,{l:-10}),this.pie7=this.pie7||Ot(t,{h:60,l:-10}),this.pie8=this.pie8||Ot(t,{h:-60,l:-10}),this.pie9=this.pie9||Ot(t,{h:120,l:0}),this.pie10=this.pie10||Ot(t,{h:60,l:-20}),this.pie11=this.pie11||Ot(t,{h:-60,l:-20}),this.pie12=this.pie12||Ot(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||Ot(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||Ot(t,{h:-30}),this.git4=this.git4||Ot(t,{h:-60}),this.git5=this.git5||Ot(t,{h:-90}),this.git6=this.git6||Ot(t,{h:60}),this.git7=this.git7||Ot(t,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ge=ht(t=>{const e=new pe;return e.calculate(t),e},"getThemeVariables"),fe=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor=Dt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(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||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ye=ht(t=>{const e=new fe;return e.calculate(t),e},"getThemeVariables"),me=class{static{ht(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=Ot(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||Ot(t,{h:64}),this.fillType3=this.fillType3||Ot(e,{h:64}),this.fillType4=this.fillType4||Ot(t,{h:-64}),this.fillType5=this.fillType5||Ot(e,{h:-64}),this.fillType6=this.fillType6||Ot(t,{h:128}),this.fillType7=this.fillType7||Ot(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||Ot(t,{l:-10}),this.pie5=this.pie5||Ot(e,{l:-10}),this.pie6=this.pie6||Ot(r,{l:-10}),this.pie7=this.pie7||Ot(t,{h:60,l:-10}),this.pie8=this.pie8||Ot(t,{h:-60,l:-10}),this.pie9=this.pie9||Ot(t,{h:120,l:0}),this.pie10=this.pie10||Ot(t,{h:60,l:-20}),this.pie11=this.pie11||Ot(t,{h:-60,l:-20}),this.pie12=this.pie12||Ot(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||Ot(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||Ot(t,{h:-30}),this.git4=this.git4||Ot(t,{h:-60}),this.git5=this.git5||Ot(t,{h:-90}),this.git6=this.git6||Ot(t,{h:60}),this.git7=this.git7||Ot(t,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Ce=ht(t=>{const e=new me;return e.calculate(t),e},"getThemeVariables"),xe=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor=Dt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=It(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ke={base:{getThemeVariables:te},dark:{getThemeVariables:re},default:{getThemeVariables:oe},forest:{getThemeVariables:se},neutral:{getThemeVariables:le},neo:{getThemeVariables:ce},"neo-dark":{getThemeVariables:ue},redux:{getThemeVariables:ge},"redux-dark":{getThemeVariables:ye},"redux-color":{getThemeVariables:Ce},"redux-dark-color":{getThemeVariables:ht(t=>{const e=new xe;return e.calculate(t),e},"getThemeVariables")}},be={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},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,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},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,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},we={...be,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ke.default.getThemeVariables(),sequence:{...be.sequence,messageFont:ht(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:ht(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:ht(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...be.gantt,tickInterval:void 0,useWidth:void 0},c4:{...be.c4,useWidth:void 0,personFont:ht(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...be.flowchart,inheritDir:!1},external_personFont:ht(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:ht(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:ht(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:ht(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:ht(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:ht(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:ht(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:ht(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:ht(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:ht(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:ht(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:ht(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:ht(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:ht(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:ht(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:ht(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:ht(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:ht(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:ht(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:ht(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:ht(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...be.pie,useWidth:984},xyChart:{...be.xyChart,useWidth:void 0},requirement:{...be.requirement,useWidth:void 0},packet:{...be.packet},treeView:{...be.treeView,useWidth:void 0},radar:{...be.radar},ishikawa:{...be.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...be.venn}},Te=ht((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Te(t[i],"")]:[...r,e+i],[]),"keyify"),Be=new Set(Te(we,"")),Se=we,ve=ht(t=>{if(ut.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>ve(t));else{for(const e of Object.keys(t)){if(ut.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Be.has(e)||null==t[e]){ut.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){ut.debug("sanitizing object",e),ve(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(ut.debug("sanitizing css option",e),t[e]=_e(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}ut.debug("After sanitization",t)}},"sanitizeDirective"),_e=ht(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Le=Object.freeze(Se),Fe=ht(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),Me=Gt({},Le),Ae=[],$e=Gt({},Le),Ee=ht((t,e)=>{let r=Gt({},t),i={};for(const t of e)We(t),i=Gt(i,t);if(r=Gt(r,i),i.theme&&i.theme in ke){const t=Gt({},zt),e=Gt(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in ke&&(r.themeVariables=ke[r.theme].getThemeVariables(e))}return Ue($e=r),$e},"updateCurrentConfig"),qe=ht(t=>(Me=Gt({},Le),Me=Gt(Me,t),t.theme&&ke[t.theme]&&(Me.themeVariables=ke[t.theme].getThemeVariables(t.themeVariables)),Ee(Me,Ae),Me),"setSiteConfig"),Ie=ht(t=>{zt=Gt({},t)},"saveConfigFromInitialize"),Oe=ht(t=>(Me=Gt(Me,t),Ee(Me,Ae),Me),"updateSiteConfig"),De=ht(()=>Gt({},Me),"getSiteConfig"),ze=ht(t=>(Ue(t),Gt($e,t),Pe()),"setConfig"),Pe=ht(()=>Gt({},$e),"getConfig"),We=ht(t=>{t&&(["secure",...Me.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(ut.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&We(t[e])}))},"sanitize"),Re=ht(t=>{ve(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Ae.push(t),Ee(Me,Ae)},"addDirective"),Ne=ht((t=Me)=>{Ee(t,Ae=[])},"reset"),je={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},He={},Ye=ht(t=>{He[t]||(ut.warn(je[t]),He[t]=!0)},"issueWarning"),Ue=ht(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Ye("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ve=ht(()=>{let t={};zt&&(t=Gt(t,zt));for(const e of Ae)t=Gt(t,e);return t},"getUserDefinedConfig"),Xe=ht(t=>(null!=t.flowchart?.htmlLabels&&Ye("FLOWCHART_HTML_LABELS_DEPRECATED"),Fe(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ge=/<br\s*\/?>/gi,Ze=ht(t=>{if(!t)return[""];return sr(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Qe=(()=>{let t=!1;return()=>{t||(Je(),t=!0)}})();function Je(){const t="data-temp-href-target";e.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),e.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}ht(Je,"setupDompurifyHooks");var Ke=ht(t=>{Qe();return e.sanitize(t)},"removeScript"),tr=ht((t,e)=>{if(Xe(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Ke(t):"loose"!==r&&(t=(t=(t=sr(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=ar(t))}return t},"sanitizeMore"),er=ht((t,r)=>t?t=r.dompurifyConfig?e.sanitize(tr(t,r),r.dompurifyConfig).toString():e.sanitize(tr(t,r),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),rr=ht((t,e)=>"string"==typeof t?er(t,e):t.flat().map(t=>er(t,e)),"sanitizeTextOrArray"),ir=ht(t=>Ge.test(t),"hasBreaks"),or=ht(t=>t.split(Ge),"splitBreaks"),ar=ht(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),sr=ht(t=>t.replace(Ge,"#br#"),"breakToPlaceholder"),nr=ht(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),lr=ht(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),hr=ht(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),cr=ht(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const o=e[t-1],a=e[t+1];ur(o,a)&&(i=o+","+a,t++,r.pop())}r.push(pr(i))}return r.join("")},"parseGenericTypes"),dr=ht((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),ur=ht((t,e)=>{const r=dr(t,"~"),i=dr(e,"~");return 1===r&&1===i},"shouldCombineSets"),pr=ht(t=>{const e=dr(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),gr=ht(()=>void 0!==window.MathMLElement,"isMathMLSupported"),fr=/\$\$(.*)\$\$/g,yr=ht(t=>(t.match(fr)?.length??0)>0,"hasKatex"),mr=ht(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await xr(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Cr=ht(async(t,e)=>{if(!yr(t))return t;if(!(gr()||e.legacyMathML||e.forceLegacyMathML))return t.replace(fr,"MathML is unsupported in this environment.");{const{default:r}=await import("./types-NAGOQCyQ.js").then(function(t){return t.F}),i=e.forceLegacyMathML||!gr()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Ge).map(t=>yr(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(fr,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),xr=ht(async(t,e)=>er(await Cr(t,e),e),"renderKatexSanitized"),kr={getRows:Ze,sanitizeText:er,sanitizeTextOrArray:rr,hasBreaks:ir,splitBreaks:or,lineBreakRegex:Ge,removeScript:Ke,getUrl:nr,evaluate:Fe,getMax:lr,getMin:hr},br=ht(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),wr=ht(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Tr=ht(function(t,e,r,i){const o=wr(e,r,i);br(t,o)},"configureSvgSize"),Br=ht(function(t,e,r,i){const o=e.node().getBBox(),a=o.width,s=o.height;ut.info(`SVG bounds: ${a}x${s}`,o);let n=0,l=0;ut.info(`Graph bounds: ${n}x${l}`,t),n=a+2*r,l=s+2*r,ut.info(`Calculated bounds: ${n}x${l}`),Tr(e,l,n,i);const h=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),Sr={},vr=ht((t,e,r,i)=>{let o="";return t in Sr&&Sr[t]?o=Sr[t]({...r,svgId:i}):ut.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${o}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),_r=ht((t,e)=>{void 0!==e&&(Sr[t]=e)},"addStylesForDiagram"),Lr=vr,Fr={};ct(Fr,{clear:()=>qr,getAccDescription:()=>zr,getAccTitle:()=>Or,getDiagramTitle:()=>Wr,setAccDescription:()=>Dr,setAccTitle:()=>Ir,setDiagramTitle:()=>Pr});var Mr="",Ar="",$r="",Er=ht(t=>er(t,Pe()),"sanitizeText"),qr=ht(()=>{Mr="",$r="",Ar=""},"clear"),Ir=ht(t=>{Mr=Er(t).replace(/^\s+/g,"")},"setAccTitle"),Or=ht(()=>Mr,"getAccTitle"),Dr=ht(t=>{$r=Er(t).replace(/\n\s+/g,"\n")},"setAccDescription"),zr=ht(()=>$r,"getAccDescription"),Pr=ht(t=>{Ar=Er(t)},"setDiagramTitle"),Wr=ht(()=>Ar,"getDiagramTitle"),Rr=ut,Nr=pt,jr=Pe,Hr=ze,Yr=Le,Ur=ht(t=>er(t,jr()),"sanitizeText"),Vr=Br,Xr=ht(()=>Fr,"getCommonDb"),Gr={},Zr=ht((t,e,r)=>{Gr[t]&&Rr.warn(`Diagram with id ${t} already registered. Overwriting.`),Gr[t]=e,r&&Ut(t,r),_r(t,e.styles),e.injectUtils?.(Rr,Nr,jr,Ur,Vr,Xr(),()=>{})},"registerDiagram"),Qr=ht(t=>{if(t in Gr)return Gr[t];throw new Jr(t)},"getDiagram"),Jr=class extends Error{static{ht(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}},Kr={value:()=>{}};function ti(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new ei(i)}function ei(t){this._=t}function ri(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function ii(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=Kr,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}ei.prototype=ti.prototype={constructor:ei,on:function(t,e){var r,i,o=this._,a=(i=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),s=-1,n=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<n;)if(r=(t=a[s]).type)o[r]=ii(o[r],t.name,e);else if(null==e)for(r in o)o[r]=ii(o[r],t.name,null);return this}for(;++s<n;)if((r=(t=a[s]).type)&&(r=ri(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new ei(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),a=0;a<r;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};var oi="http://www.w3.org/1999/xhtml",ai={svg:"http://www.w3.org/2000/svg",xhtml:oi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function si(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),ai.hasOwnProperty(e)?{space:ai[e],local:t}:t}function ni(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===oi&&e.documentElement.namespaceURI===oi?e.createElement(t):e.createElementNS(r,t)}}function li(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hi(t){var e=si(t);return(e.local?li:ni)(e)}function ci(){}function di(t){return null==t?ci:function(){return this.querySelector(t)}}function ui(){return[]}function pi(t){return null==t?ui:function(){return this.querySelectorAll(t)}}function gi(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function fi(t){return function(){return this.matches(t)}}function yi(t){return function(e){return e.matches(t)}}var mi=Array.prototype.find;function Ci(){return this.firstElementChild}var xi=Array.prototype.filter;function ki(){return Array.from(this.children)}function bi(t){return new Array(t.length)}function wi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ti(t,e,r,i,o,a){for(var s,n=0,l=e.length,h=a.length;n<h;++n)(s=e[n])?(s.__data__=a[n],i[n]=s):r[n]=new wi(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function Bi(t,e,r,i,o,a,s){var n,l,h,c=new Map,d=e.length,u=a.length,p=new Array(d);for(n=0;n<d;++n)(l=e[n])&&(p[n]=h=s.call(l,l.__data__,n,e)+"",c.has(h)?o[n]=l:c.set(h,l));for(n=0;n<u;++n)h=s.call(t,a[n],n,a)+"",(l=c.get(h))?(i[n]=l,l.__data__=a[n],c.delete(h)):r[n]=new wi(t,a[n]);for(n=0;n<d;++n)(l=e[n])&&c.get(p[n])===l&&(o[n]=l)}function Si(t){return t.__data__}function vi(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function _i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Li(t){return function(){this.removeAttribute(t)}}function Fi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mi(t,e){return function(){this.setAttribute(t,e)}}function Ai(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function $i(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function Ei(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function qi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ii(t){return function(){this.style.removeProperty(t)}}function Oi(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Di(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function zi(t,e){return t.style.getPropertyValue(e)||qi(t).getComputedStyle(t,null).getPropertyValue(e)}function Pi(t){return function(){delete this[t]}}function Wi(t,e){return function(){this[t]=e}}function Ri(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function Ni(t){return t.trim().split(/^|\s+/)}function ji(t){return t.classList||new Hi(t)}function Hi(t){this._node=t,this._names=Ni(t.getAttribute("class")||"")}function Yi(t,e){for(var r=ji(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function Ui(t,e){for(var r=ji(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function Vi(t){return function(){Yi(this,t)}}function Xi(t){return function(){Ui(this,t)}}function Gi(t,e){return function(){(e.apply(this,arguments)?Yi:Ui)(this,t)}}function Zi(){this.textContent=""}function Qi(t){return function(){this.textContent=t}}function Ji(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ki(){this.innerHTML=""}function to(t){return function(){this.innerHTML=t}}function eo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ro(){this.nextSibling&&this.parentNode.appendChild(this)}function io(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oo(){return null}function ao(){var t=this.parentNode;t&&t.removeChild(this)}function so(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function no(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lo(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,a=e.length;i<a;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function ho(t,e,r){return function(){var i,o=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var s=0,n=o.length;s<n;++s)if((i=o[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),void(i.value=e);this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},o?o.push(i):this.__on=[i]}}function co(t,e,r){var i=qi(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function uo(t,e){return function(){return co(this,t,e)}}function po(t,e){return function(){return co(this,t,e.apply(this,arguments))}}wi.prototype={constructor:wi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Hi.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var go=[null];function fo(t,e){this._groups=t,this._parents=e}function yo(){return new fo([[document.documentElement]],go)}function mo(t){return"string"==typeof t?new fo([[document.querySelector(t)]],[document.documentElement]):new fo([[t]],go)}fo.prototype=yo.prototype={constructor:fo,select:function(t){"function"!=typeof t&&(t=di(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s,n=e[o],l=n.length,h=i[o]=new Array(l),c=0;c<l;++c)(a=n[c])&&(s=t.call(a,a.__data__,c,n))&&("__data__"in a&&(s.__data__=a.__data__),h[c]=s);return new fo(i,this._parents)},selectAll:function(t){t="function"==typeof t?gi(t):pi(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var s,n=e[a],l=n.length,h=0;h<l;++h)(s=n[h])&&(i.push(t.call(s,s.__data__,h,n)),o.push(s));return new fo(i,o)},selectChild:function(t){return this.select(null==t?Ci:function(t){return function(){return mi.call(this.children,t)}}("function"==typeof t?t:yi(t)))},selectChildren:function(t){return this.selectAll(null==t?ki:function(t){return function(){return xi.call(this.children,t)}}("function"==typeof t?t:yi(t)))},filter:function(t){"function"!=typeof t&&(t=fi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new fo(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Si);var r=e?Bi:Ti,i=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=o.length,s=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],d=o[h],u=d.length,p=vi(t.call(c,c&&c.__data__,h,i)),g=p.length,f=n[h]=new Array(g),y=s[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,C,x=0,k=0;x<g;++x)if(m=f[x]){for(x>=k&&(k=x+1);!(C=y[k])&&++k<g;);m._next=C||null}}return(s=new fo(s,i))._enter=n,s._exit=l,s},enter:function(){return new fo(this._enter||this._groups.map(bi),this._parents)},exit:function(){return new fo(this._exit||this._groups.map(bi),this._parents)},join:function(t,e,r){var i=this.enter(),o=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,s=Math.min(o,a),n=new Array(o),l=0;l<s;++l)for(var h,c=r[l],d=i[l],u=c.length,p=n[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)n[l]=r[l];return new fo(n,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],a=o.length-1,s=o[a];--a>=0;)(i=o[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=_i);for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s,n=r[a],l=n.length,h=o[a]=new Array(l),c=0;c<l;++c)(s=n[c])&&(h[c]=s);h.sort(e)}return new fo(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,a=e[r],s=0,n=a.length;s<n;++s)(o=a[s])&&t.call(o,o.__data__,s,a);return this},attr:function(t,e){var r=si(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?Fi:Li:"function"==typeof e?r.local?Ei:$i:r.local?Ai:Mi)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?Ii:"function"==typeof e?Di:Oi)(t,e,null==r?"":r)):zi(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Pi:"function"==typeof e?Ri:Wi)(t,e)):this.node()[t]},classed:function(t,e){var r=Ni(t+"");if(arguments.length<2){for(var i=ji(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?Gi:e?Vi:Xi)(r,e))},text:function(t){return arguments.length?this.each(null==t?Zi:("function"==typeof t?Ji:Qi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ki:("function"==typeof t?eo:to)(t)):this.node().innerHTML},raise:function(){return this.each(ro)},lower:function(){return this.each(io)},append:function(t){var e="function"==typeof t?t:hi(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:hi(t),i=null==e?oo:"function"==typeof e?e:di(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(ao)},clone:function(t){return this.select(t?no:so)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,o,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),s=a.length;if(!(arguments.length<2)){for(n=e?ho:lo,i=0;i<s;++i)this.each(n(a[i],e,r));return this}var n=this.node().__on;if(n)for(var l,h=0,c=n.length;h<c;++h)for(i=0,l=n[h];i<s;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?po:uo)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],a=0,s=o.length;a<s;++a)(i=o[a])&&(yield i)}};var Co,xo,ko=0,bo=0,wo=0,To=0,Bo=0,So=0,vo="object"==typeof performance&&performance.now?performance:Date,_o="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Lo(){return Bo||(_o(Fo),Bo=vo.now()+So)}function Fo(){Bo=0}function Mo(){this._call=this._time=this._next=null}function Ao(t,e,r){var i=new Mo;return i.restart(t,e,r),i}function $o(){Bo=(To=vo.now())+So,ko=bo=0;try{!function(){Lo(),++ko;for(var t,e=Co;e;)(t=Bo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ko}()}finally{ko=0,function(){var t,e,r=Co,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Co=e);xo=t,qo(i)}(),Bo=0}}function Eo(){var t=vo.now(),e=t-To;e>1e3&&(So-=e,To=t)}function qo(t){ko||(bo&&(bo=clearTimeout(bo)),t-Bo>24?(t<1/0&&(bo=setTimeout($o,t-vo.now()-So)),wo&&(wo=clearInterval(wo))):(wo||(To=vo.now(),wo=setInterval(Eo,1e3)),ko=1,_o($o)))}function Io(t,e,r){var i=new Mo;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Mo.prototype=Ao.prototype={constructor:Mo,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Lo():+r)+(null==e?0:+e),this._next||xo===this||(xo?xo._next=this:Co=this,xo=this),this._call=t,this._time=r,qo()},stop:function(){this._call&&(this._call=null,this._time=1/0,qo())}};var Oo=ti("start","end","cancel","interrupt"),Do=[];function zo(t,e,r,i,o,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function a(t){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(a){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Io(s);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(Io(function(){3===r.state&&(r.state=4,r.timer.restart(n,r.delay,r.time),n(a))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function n(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),a=-1,s=i.length;++a<s;)i[a].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=Ao(a,0,r.time)}(t,r,{name:e,index:i,group:o,on:Oo,tween:Do,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Po(t,e){var r=Ro(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function Wo(t,e){var r=Ro(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Ro(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function No(t,e){var r,i;return function(){var o=Wo(this,t),a=o.tween;if(a!==r)for(var s=0,n=(i=r=a).length;s<n;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}o.tween=i}}function jo(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var a=Wo(this,t),s=a.tween;if(s!==i){o=(i=s).slice();for(var n={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=n;break}l===h&&o.push(n)}a.tween=o}}function Ho(t,e,r){var i=t._id;return t.each(function(){var t=Wo(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Ro(t,i).value[e]}}function Yo(t,e){var r;return("number"==typeof e?a:e instanceof s?n:(r=s(e))?(e=r,n):l)(t,e)}function Uo(t){return function(){this.removeAttribute(t)}}function Vo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xo(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttribute(t);return s===a?null:s===i?o:o=e(i=s,r)}}function Go(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?o:o=e(i=s,r)}}function Zo(t,e,r){var i,o,a;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttribute(t))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l));this.removeAttribute(t)}}function Qo(t,e,r){var i,o,a;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function Jo(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function Ko(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ta(t,e){return function(){Po(this,t).delay=+e.apply(this,arguments)}}function ea(t,e){return e=+e,function(){Po(this,t).delay=e}}function ra(t,e){return function(){Wo(this,t).duration=+e.apply(this,arguments)}}function ia(t,e){return e=+e,function(){Wo(this,t).duration=e}}var oa=yo.prototype.constructor;function aa(t){return function(){this.style.removeProperty(t)}}var sa=0;function na(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function la(){return++sa}var ha=yo.prototype;na.prototype={constructor:na,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=di(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var n,l,h=i[s],c=h.length,d=a[s]=new Array(c),u=0;u<c;++u)(n=h[u])&&(l=t.call(n,n.__data__,u,h))&&("__data__"in n&&(l.__data__=n.__data__),d[u]=l,zo(d[u],e,r,u,d,Ro(n,r)));return new na(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=pi(t));for(var i=this._groups,o=i.length,a=[],s=[],n=0;n<o;++n)for(var l,h=i[n],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=Ro(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&zo(u,e,r,f,p,g);a.push(p),s.push(l)}return new na(a,s,e,r)},selectChild:ha.selectChild,selectChildren:ha.selectChildren,filter:function(t){"function"!=typeof t&&(t=fi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new na(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),s=new Array(i),n=0;n<a;++n)for(var l,h=e[n],c=r[n],d=h.length,u=s[n]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;n<i;++n)s[n]=e[n];return new na(s,this._parents,this._name,this._id)},selection:function(){return new oa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=la(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)if(s=n[h]){var c=Ro(s,e);zo(s,t,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new na(i,this._parents,t,r)},call:ha.call,nodes:ha.nodes,node:ha.node,size:ha.size,empty:ha.empty,each:ha.each,on:function(t,e){var r=this._id;return arguments.length<2?Ro(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?Po:Wo;return function(){var s=a(this,t),n=s.on;n!==i&&(o=(i=n).copy()).on(e,r),s.on=o}}(r,t,e))},attr:function(t,e){var r=si(t),i="transform"===r?et:Yo;return this.attrTween(t,"function"==typeof e?(r.local?Qo:Zo)(r,i,Ho(this,"attr."+t,e)):null==e?(r.local?Vo:Uo)(r):(r.local?Go:Xo)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=si(t);return this.tween(r,(i.local?Jo:Ko)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?tt:Yo;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var a=zi(this,t),s=(this.style.removeProperty(t),zi(this,t));return a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,i)).on("end.style."+t,aa(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,a;return function(){var s=zi(this,t),n=r(this),l=n+"";return null==n&&(this.style.removeProperty(t),l=n=zi(this,t)),s===l?null:s===i&&l===o?a:(o=l,a=e(i=s,n))}}(t,i,Ho(this,"style."+t,e))).each(function(t,e){var r,i,o,a,s="style."+e,n="end."+s;return function(){var l=Wo(this,t),h=l.on,c=null==l.value[s]?a||(a=aa(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(n,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,a=r+"";return function(){var s=zi(this,t);return s===a?null:s===i?o:o=e(i=s,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function a(){var a=e.apply(this,arguments);return a!==o&&(i=(o=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ho(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=Ro(this.node(),r).tween,a=0,s=o.length;a<s;++a)if((i=o[a]).name===t)return i.value;return null}return this.each((null==e?No:jo)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ta:ea)(e,t)):Ro(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ra:ia)(e,t)):Ro(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Wo(this,t).ease=e}}(e,t)):Ro(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;Wo(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var n={value:s},l={value:function(){0===--o&&a()}};r.each(function(){var r=Wo(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(n),e._.interrupt.push(n),e._.end.push(l)),r.on=e}),0===o&&a()})},[Symbol.iterator]:ha[Symbol.iterator]};var ca={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function da(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function ua(t,e,r){this.k=t,this.x=e,this.y=r}yo.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,o,a=t.__transition,s=!0;if(a){for(o in e=null==e?null:e+"",a)(r=a[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[o]):s=!1;s&&delete t.__transition}}(this,t)})},yo.prototype.transition=function(t){var e,r;t instanceof na?(e=t._id,t=t._name):(e=la(),(r=ca).time=Lo(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)(s=n[h])&&zo(s,t,e,h,n,r||da(s,e));return new na(i,this._parents,t,e)},ua.prototype={constructor:ua,scale:function(t){return 1===t?this:new ua(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ua(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ua.prototype;var pa=ht(t=>{const{securityLevel:e}=jr();let r=mo("body");if("sandbox"===e){const e=mo(`#i${t}`);r=mo((e.node()?.contentDocument??document).body)}return r.select(`#${t}`)},"selectSvgElement");function ga(t){return null==t}function fa(t){return"object"==typeof t&&null!==t}function ya(t){return Array.isArray(t)?t:ga(t)?[]:[t]}function ma(t,e){var r,i,o,a;if(e)for(r=0,i=(a=Object.keys(e)).length;r<i;r+=1)t[o=a[r]]=e[o];return t}function Ca(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function xa(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}ht(ga,"isNothing"),ht(fa,"isObject"),ht(ya,"toArray"),ht(ma,"extend"),ht(Ca,"repeat"),ht(xa,"isNegativeZero");var ka={isNothing:ga,isObject:fa,toArray:ya,repeat:Ca,isNegativeZero:xa,extend:ma};function ba(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function wa(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ba(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}ht(ba,"formatError"),ht(wa,"YAMLException$1"),wa.prototype=Object.create(Error.prototype),wa.prototype.constructor=wa,wa.prototype.toString=ht(function(t){return this.name+": "+ba(this,t)},"toString");var Ta=wa;function Ba(t,e,r,i,o){var a="",s="",n=Math.floor(o/2)-1;return i-e>n&&(e=i-n+(a=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function Sa(t,e){return ka.repeat(" ",e-t.length)+t}function va(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,o=[0],a=[],s=-1;r=i.exec(t.buffer);)a.push(r.index),o.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var n,l,h="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+c+3);for(n=1;n<=e.linesBefore&&!(s-n<0);n++)l=Ba(t.buffer,o[s-n],a[s-n],t.position-(o[s]-o[s-n]),d),h=ka.repeat(" ",e.indent)+Sa((t.line-n+1).toString(),c)+" | "+l.str+"\n"+h;for(l=Ba(t.buffer,o[s],a[s],t.position,d),h+=ka.repeat(" ",e.indent)+Sa((t.line+1).toString(),c)+" | "+l.str+"\n",h+=ka.repeat("-",e.indent+c+3+l.pos)+"^\n",n=1;n<=e.linesAfter&&!(s+n>=a.length);n++)l=Ba(t.buffer,o[s+n],a[s+n],t.position-(o[s]-o[s+n]),d),h+=ka.repeat(" ",e.indent)+Sa((t.line+n+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}ht(Ba,"getLine"),ht(Sa,"padStart"),ht(va,"makeSnippet");var _a=va,La=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Fa=["scalar","sequence","mapping"];function Ma(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function Aa(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===La.indexOf(e))throw new Ta('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Ma(e.styleAliases||null),-1===Fa.indexOf(this.kind))throw new Ta('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}ht(Ma,"compileStyleAliases"),ht(Aa,"Type$1");var $a=Aa;function Ea(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function qa(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(ht(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function Ia(t){return this.extend(t)}ht(Ea,"compileList"),ht(qa,"compileMap"),ht(Ia,"Schema$1"),Ia.prototype.extend=ht(function(t){var e=[],r=[];if(t instanceof $a)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Ta("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof $a))throw new Ta("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Ta("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Ta("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof $a))throw new Ta("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ia.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Ea(i,"implicit"),i.compiledExplicit=Ea(i,"explicit"),i.compiledTypeMap=qa(i.compiledImplicit,i.compiledExplicit),i},"extend");var Oa=new Ia({explicit:[new $a("tag:yaml.org,2002:str",{kind:"scalar",construct:ht(function(t){return null!==t?t:""},"construct")}),new $a("tag:yaml.org,2002:seq",{kind:"sequence",construct:ht(function(t){return null!==t?t:[]},"construct")}),new $a("tag:yaml.org,2002:map",{kind:"mapping",construct:ht(function(t){return null!==t?t:{}},"construct")})]});function Da(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function za(){return null}function Pa(t){return null===t}ht(Da,"resolveYamlNull"),ht(za,"constructYamlNull"),ht(Pa,"isNull");var Wa=new $a("tag:yaml.org,2002:null",{kind:"scalar",resolve:Da,construct:za,predicate:Pa,represent:{canonical:ht(function(){return"~"},"canonical"),lowercase:ht(function(){return"null"},"lowercase"),uppercase:ht(function(){return"NULL"},"uppercase"),camelcase:ht(function(){return"Null"},"camelcase"),empty:ht(function(){return""},"empty")},defaultStyle:"lowercase"});function Ra(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function Na(t){return"true"===t||"True"===t||"TRUE"===t}function ja(t){return"[object Boolean]"===Object.prototype.toString.call(t)}ht(Ra,"resolveYamlBoolean"),ht(Na,"constructYamlBoolean"),ht(ja,"isBoolean");var Ha=new $a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ra,construct:Na,predicate:ja,represent:{lowercase:ht(function(t){return t?"true":"false"},"lowercase"),uppercase:ht(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:ht(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ya(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ua(t){return 48<=t&&t<=55}function Va(t){return 48<=t&&t<=57}function Xa(t){if(null===t)return!1;var e,r=t.length,i=0,o=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;o=!0}return o&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Ya(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Ua(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!Va(t.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===e)}function Ga(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Za(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!ka.isNegativeZero(t)}ht(Ya,"isHexCode"),ht(Ua,"isOctCode"),ht(Va,"isDecCode"),ht(Xa,"resolveYamlInteger"),ht(Ga,"constructYamlInteger"),ht(Za,"isInteger");var Qa=new $a("tag:yaml.org,2002:int",{kind:"scalar",resolve:Xa,construct:Ga,predicate:Za,represent:{binary:ht(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:ht(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:ht(function(t){return t.toString(10)},"decimal"),hexadecimal:ht(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ja=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ka(t){return null!==t&&!(!Ja.test(t)||"_"===t[t.length-1])}function ts(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}ht(Ka,"resolveYamlFloat"),ht(ts,"constructYamlFloat");var es=/^[-+]?[0-9]+e/;function rs(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ka.isNegativeZero(t))return"-0.0";return r=t.toString(10),es.test(r)?r.replace("e",".e"):r}function is(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ka.isNegativeZero(t))}ht(rs,"representYamlFloat"),ht(is,"isFloat");var os=new $a("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ka,construct:ts,predicate:is,represent:rs,defaultStyle:"lowercase"}),as=Oa.extend({implicit:[Wa,Ha,Qa,os]}),ss=as,ns=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ls=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 hs(t){return null!==t&&(null!==ns.exec(t)||null!==ls.exec(t))}function cs(t){var e,r,i,o,a,s,n,l,h=0,c=null;if(null===(e=ns.exec(t))&&(e=ls.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],s=+e[5],n=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,o,a,s,n,h)),c&&l.setTime(l.getTime()-c),l}function ds(t){return t.toISOString()}ht(hs,"resolveYamlTimestamp"),ht(cs,"constructYamlTimestamp"),ht(ds,"representYamlTimestamp");var us=new $a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hs,construct:cs,instanceOf:Date,represent:ds});function ps(t){return"<<"===t||null===t}ht(ps,"resolveYamlMerge");var gs=new $a("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ps}),fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ys(t){if(null===t)return!1;var e,r,i=0,o=t.length,a=fs;for(r=0;r<o;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function ms(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=fs,s=0,n=[];for(e=0;e<o;e++)e%4==0&&e&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|a.indexOf(i.charAt(e));return 0===(r=o%4*6)?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):18===r?(n.push(s>>10&255),n.push(s>>2&255)):12===r&&n.push(s>>4&255),new Uint8Array(n)}function Cs(t){var e,r,i="",o=0,a=t.length,s=fs;for(e=0;e<a;e++)e%3==0&&e&&(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]),o=(o<<8)+t[e];return 0===(r=a%3)?(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]):2===r?(i+=s[o>>10&63],i+=s[o>>4&63],i+=s[o<<2&63],i+=s[64]):1===r&&(i+=s[o>>2&63],i+=s[o<<4&63],i+=s[64],i+=s[64]),i}function xs(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}ht(ys,"resolveYamlBinary"),ht(ms,"constructYamlBinary"),ht(Cs,"representYamlBinary"),ht(xs,"isBinary");var ks=new $a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ys,construct:ms,predicate:xs,represent:Cs}),bs=Object.prototype.hasOwnProperty,ws=Object.prototype.toString;function Ts(t){if(null===t)return!0;var e,r,i,o,a,s=[],n=t;for(e=0,r=n.length;e<r;e+=1){if(i=n[e],a=!1,"[object Object]"!==ws.call(i))return!1;for(o in i)if(bs.call(i,o)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==s.indexOf(o))return!1;s.push(o)}return!0}function Bs(t){return null!==t?t:[]}ht(Ts,"resolveYamlOmap"),ht(Bs,"constructYamlOmap");var Ss=new $a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ts,construct:Bs}),vs=Object.prototype.toString;function _s(t){if(null===t)return!0;var e,r,i,o,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(i=s[e],"[object Object]"!==vs.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;a[e]=[o[0],i[o[0]]]}return!0}function Ls(t){if(null===t)return[];var e,r,i,o,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)i=s[e],o=Object.keys(i),a[e]=[o[0],i[o[0]]];return a}ht(_s,"resolveYamlPairs"),ht(Ls,"constructYamlPairs");var Fs=new $a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:_s,construct:Ls}),Ms=Object.prototype.hasOwnProperty;function As(t){if(null===t)return!0;var e,r=t;for(e in r)if(Ms.call(r,e)&&null!==r[e])return!1;return!0}function $s(t){return null!==t?t:{}}ht(As,"resolveYamlSet"),ht($s,"constructYamlSet");var Es=new $a("tag:yaml.org,2002:set",{kind:"mapping",resolve:As,construct:$s}),qs=ss.extend({implicit:[us,gs],explicit:[ks,Ss,Fs,Es]}),Is=Object.prototype.hasOwnProperty,Os=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ds=/[\x85\u2028\u2029]/,zs=/[,\[\]\{\}]/,Ps=/^(?:!|!!|![a-z\-]+!)$/i,Ws=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Rs(t){return Object.prototype.toString.call(t)}function Ns(t){return 10===t||13===t}function js(t){return 9===t||32===t}function Hs(t){return 9===t||32===t||10===t||13===t}function Ys(t){return 44===t||91===t||93===t||123===t||125===t}function Us(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Vs(t){return 120===t?2:117===t?4:85===t?8:0}function Xs(t){return 48<=t&&t<=57?t-48:-1}function Gs(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Zs(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Qs(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}ht(Rs,"_class"),ht(Ns,"is_EOL"),ht(js,"is_WHITE_SPACE"),ht(Hs,"is_WS_OR_EOL"),ht(Ys,"is_FLOW_INDICATOR"),ht(Us,"fromHexCode"),ht(Vs,"escapedHexLen"),ht(Xs,"fromDecimalCode"),ht(Gs,"simpleEscapeSequence"),ht(Zs,"charFromCodepoint"),ht(Qs,"setProperty");var Js,Ks=new Array(256),tn=new Array(256);for(Js=0;Js<256;Js++)Ks[Js]=Gs(Js)?1:0,tn[Js]=Gs(Js);function en(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qs,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function rn(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=_a(r),new Ta(e,r)}function on(t,e){throw rn(t,e)}function an(t,e){t.onWarning&&t.onWarning.call(null,rn(t,e))}ht(en,"State$1"),ht(rn,"generateError"),ht(on,"throwError"),ht(an,"throwWarning");var sn={YAML:ht(function(t,e,r){var i,o,a;null!==t.version&&on(t,"duplication of %YAML directive"),1!==r.length&&on(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&on(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),1!==o&&on(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&an(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:ht(function(t,e,r){var i,o;2!==r.length&&on(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Ps.test(i)||on(t,"ill-formed tag handle (first argument) of the TAG directive"),Is.call(t.tagMap,i)&&on(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ws.test(o)||on(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){on(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function nn(t,e,r,i){var o,a,s,n;if(e<r){if(n=t.input.slice(e,r),i)for(o=0,a=n.length;o<a;o+=1)9===(s=n.charCodeAt(o))||32<=s&&s<=1114111||on(t,"expected valid JSON character");else Os.test(n)&&on(t,"the stream contains non-printable characters");t.result+=n}}function ln(t,e,r,i){var o,a,s,n;for(ka.isObject(r)||on(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(o=Object.keys(r)).length;s<n;s+=1)a=o[s],Is.call(e,a)||(Qs(e,a,r[a]),i[a]=!0)}function hn(t,e,r,i,o,a,s,n,l){var h,c;if(Array.isArray(o))for(h=0,c=(o=Array.prototype.slice.call(o)).length;h<c;h+=1)Array.isArray(o[h])&&on(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Rs(o[h])&&(o[h]="[object Object]");if("object"==typeof o&&"[object Object]"===Rs(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)ln(t,e,a[h],r);else ln(t,e,a,r);else t.json||Is.call(r,o)||!Is.call(e,o)||(t.line=s||t.line,t.lineStart=n||t.lineStart,t.position=l||t.position,on(t,"duplicated mapping key")),Qs(e,o,a),delete r[o];return e}function cn(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):on(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function dn(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);0!==o;){for(;js(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!Ns(o))break;for(cn(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&an(t,"deficient indentation"),i}function un(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Hs(e)))}function pn(t,e){1===e?t.result+=" ":e>1&&(t.result+=ka.repeat("\n",e-1))}function gn(t,e,r){var i,o,a,s,n,l,h,c,d=t.kind,u=t.result;if(Hs(c=t.input.charCodeAt(t.position))||Ys(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Hs(i=t.input.charCodeAt(t.position+1))||r&&Ys(i)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;0!==c;){if(58===c){if(Hs(i=t.input.charCodeAt(t.position+1))||r&&Ys(i))break}else if(35===c){if(Hs(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&un(t)||r&&Ys(c))break;if(Ns(c)){if(n=t.line,l=t.lineStart,h=t.lineIndent,dn(t,!1,-1),t.lineIndent>=e){s=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=n,t.lineStart=l,t.lineIndent=h;break}}s&&(nn(t,o,a,!1),pn(t,t.line-n),o=a=t.position,s=!1),js(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return nn(t,o,a,!1),!!t.result||(t.kind=d,t.result=u,!1)}function fn(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(nn(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else Ns(r)?(nn(t,i,o,!0),pn(t,dn(t,!1,e)),i=o=t.position):t.position===t.lineStart&&un(t)?on(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);on(t,"unexpected end of the stream within a single quoted scalar")}function yn(t,e){var r,i,o,a,s,n;if(34!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));){if(34===n)return nn(t,r,t.position,!0),t.position++,!0;if(92===n){if(nn(t,r,t.position,!0),Ns(n=t.input.charCodeAt(++t.position)))dn(t,!1,e);else if(n<256&&Ks[n])t.result+=tn[n],t.position++;else if((s=Vs(n))>0){for(o=s,a=0;o>0;o--)(s=Us(n=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:on(t,"expected hexadecimal character");t.result+=Zs(a),t.position++}else on(t,"unknown escape sequence");r=i=t.position}else Ns(n)?(nn(t,r,i,!0),pn(t,dn(t,!1,e)),r=i=t.position):t.position===t.lineStart&&un(t)?on(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}on(t,"unexpected end of the stream within a double quoted scalar")}function mn(t,e){var r,i,o,a,s,n,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,h=!1,a=[];else{if(123!==p)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(dn(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;g?44===p&&on(t,"expected the node content, but found ','"):on(t,"missed comma between flow collection entries"),u=null,n=l=!1,63===p&&Hs(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,dn(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,Bn(t,e,1,!1,!0),d=t.tag,c=t.result,dn(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(n=!0,p=t.input.charCodeAt(++t.position),dn(t,!0,e),Bn(t,e,1,!1,!0),u=t.result),h?hn(t,a,m,d,c,u,r,i,o):n?a.push(hn(t,null,m,d,c,u,r,i,o)):a.push(c),dn(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}on(t,"unexpected end of the stream within a flow collection")}function Cn(t,e){var r,i,o,a,s=1,n=!1,l=!1,h=e,c=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:on(t,"repeat of a chomping mode identifier");else{if(!((o=Xs(a))>=0))break;0===o?on(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?on(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if(js(a)){do{a=t.input.charCodeAt(++t.position)}while(js(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ns(a)&&0!==a)}for(;0!==a;){for(cn(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),Ns(a))c++;else{if(t.lineIndent<h){3===s?t.result+=ka.repeat("\n",n?1+c:c):1===s&&n&&(t.result+="\n");break}for(i?js(a)?(d=!0,t.result+=ka.repeat("\n",n?1+c:c)):d?(d=!1,t.result+=ka.repeat("\n",c+1)):0===c?n&&(t.result+=" "):t.result+=ka.repeat("\n",c):t.result+=ka.repeat("\n",n?1+c:c),n=!0,l=!0,c=0,r=t.position;!Ns(a)&&0!==a;)a=t.input.charCodeAt(++t.position);nn(t,r,t.position,!1)}}return!0}function xn(t,e){var r,i,o=t.tag,a=t.anchor,s=[],n=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,on(t,"tab characters must not be used in indentation")),45===i)&&Hs(t.input.charCodeAt(t.position+1));)if(n=!0,t.position++,dn(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Bn(t,e,3,!1,!0),s.push(t.result),dn(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)on(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!n&&(t.tag=o,t.anchor=a,t.kind="sequence",t.result=s,!0)}function kn(t,e,r){var i,o,a,s,n,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,C=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,on(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==h&&58!==h||!Hs(i)){if(s=t.line,n=t.lineStart,l=t.position,!Bn(t,r,2,!1,!0))break;if(t.line===a){for(h=t.input.charCodeAt(t.position);js(h);)h=t.input.charCodeAt(++t.position);if(58===h)Hs(h=t.input.charCodeAt(++t.position))||on(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(hn(t,u,p,g,f,null,s,n,l),g=f=y=null),C=!0,m=!1,o=!1,g=t.tag,f=t.result;else{if(!C)return t.tag=c,t.anchor=d,!0;on(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return t.tag=c,t.anchor=d,!0;on(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(hn(t,u,p,g,f,null,s,n,l),g=f=y=null),C=!0,m=!0,o=!0):m?(m=!1,o=!0):on(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===a||t.lineIndent>e)&&(m&&(s=t.line,n=t.lineStart,l=t.position),Bn(t,e,4,!0,o)&&(m?f=t.result:y=t.result),m||(hn(t,u,p,g,f,y,s,n,l),g=f=y=null),dn(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)on(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&hn(t,u,p,g,f,null,s,n,l),C&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),C}function bn(t){var e,r,i,o,a=!1,s=!1;if(33!==(o=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&on(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(a=!0,o=t.input.charCodeAt(++t.position)):33===o?(s=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&62!==o);t.position<t.length?(i=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):on(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!Hs(o);)33===o&&(s?on(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Ps.test(r)||on(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),zs.test(i)&&on(t,"tag suffix cannot contain flow indicator characters")}i&&!Ws.test(i)&&on(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){on(t,"tag name is malformed: "+i)}return a?t.tag=i:Is.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:on(t,'undeclared tag handle "'+r+'"'),!0}function wn(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&on(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Hs(r)&&!Ys(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&on(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Tn(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Hs(i)&&!Ys(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&on(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Is.call(t.anchorMap,r)||on(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],dn(t,!0,-1),!0}function Bn(t,e,r,i,o){var a,s,n,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=n=4===r||3===r,i&&dn(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;bn(t)||wn(t);)dn(t,!0,-1)?(f=!0,n=a,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):n=!1;if(n&&(n=f||o),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?n&&(xn(t,p)||kn(t,p,u))||mn(t,u)?y=!0:(s&&Cn(t,u)||fn(t,u)||yn(t,u)?y=!0:Tn(t)?(y=!0,null===t.tag&&null===t.anchor||on(t,"alias node should not have any properties")):gn(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=n&&xn(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&on(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Is.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||on(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&on(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):on(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function Sn(t){var e,r,i,o,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(dn(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(s=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Hs(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&on(t,"directive name must not be less than one character in length");0!==o;){for(;js(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!Ns(o));break}if(Ns(o))break;for(e=t.position;0!==o&&!Hs(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&cn(t),Is.call(sn,r)?sn[r](t,r,i):an(t,'unknown document directive "'+r+'"')}dn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,dn(t,!0,-1)):s&&on(t,"directives end mark is expected"),Bn(t,t.lineIndent-1,4,!1,!0),dn(t,!0,-1),t.checkLineBreaks&&Ds.test(t.input.slice(a,t.position))&&an(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&un(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,dn(t,!0,-1)):t.position<t.length-1&&on(t,"end of the stream or a document separator is expected")}function vn(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new en(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,on(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Sn(r);return r.documents}function _n(t,e){var r=vn(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new Ta("expected a single document in the stream, but found more")}}ht(nn,"captureSegment"),ht(ln,"mergeMappings"),ht(hn,"storeMappingPair"),ht(cn,"readLineBreak"),ht(dn,"skipSeparationSpace"),ht(un,"testDocumentSeparator"),ht(pn,"writeFoldedLines"),ht(gn,"readPlainScalar"),ht(fn,"readSingleQuotedScalar"),ht(yn,"readDoubleQuotedScalar"),ht(mn,"readFlowCollection"),ht(Cn,"readBlockScalar"),ht(xn,"readBlockSequence"),ht(kn,"readBlockMapping"),ht(bn,"readTagProperty"),ht(wn,"readAnchorProperty"),ht(Tn,"readAlias"),ht(Bn,"composeNode"),ht(Sn,"readDocument"),ht(vn,"loadDocuments"),ht(function(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=vn(t,r);if("function"!=typeof e)return i;for(var o=0,a=i.length;o<a;o+=1)e(i[o])},"loadAll$1"),ht(_n,"load$1");var Ln={load:_n},Fn=Object.prototype.toString,Mn=Object.prototype.hasOwnProperty,An=65279,$n={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"},En=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],qn=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function In(t,e){var r,i,o,a,s,n,l;if(null===e)return{};for(r={},o=0,a=(i=Object.keys(e)).length;o<a;o+=1)s=i[o],n=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&Mn.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[s]=n;return r}function On(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new Ta("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+ka.repeat("0",i-e.length)+e}ht(In,"compileStyleMap"),ht(On,"encodeHex");function Dn(t){this.schema=t.schema||qs,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ka.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=In(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function zn(t,e){for(var r,i=ka.repeat(" ",e),o=0,a=-1,s="",n=t.length;o<n;)-1===(a=t.indexOf("\n",o))?(r=t.slice(o),o=n):(r=t.slice(o,a+1),o=a+1),r.length&&"\n"!==r&&(s+=i),s+=r;return s}function Pn(t,e){return"\n"+ka.repeat(" ",t.indent*e)}function Wn(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Rn(t){return 32===t||9===t}function Nn(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==An||65536<=t&&t<=1114111}function jn(t){return Nn(t)&&t!==An&&13!==t&&10!==t}function Hn(t,e,r){var i=jn(t),o=i&&!Rn(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||jn(e)&&!Rn(e)&&35===t||58===e&&o}function Yn(t){return Nn(t)&&t!==An&&!Rn(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Un(t){return!Rn(t)&&58!==t}function Vn(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Xn(t){return/^\n* /.test(t)}ht(Dn,"State"),ht(zn,"indentString"),ht(Pn,"generateNextLine"),ht(Wn,"testImplicitResolving"),ht(Rn,"isWhitespace"),ht(Nn,"isPrintable"),ht(jn,"isNsCharOrWhitespace"),ht(Hn,"isPlainSafe"),ht(Yn,"isPlainSafeFirst"),ht(Un,"isPlainSafeLast"),ht(Vn,"codePointAt"),ht(Xn,"needIndentIndicator");function Gn(t,e,r,i,o,a,s,n){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Yn(Vn(t,0))&&Un(Vn(t,t.length-1));if(e||s)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!Nn(h=Vn(t,l)))return 5;f=f&&Hn(h,c,n),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=Vn(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!Nn(h))return 5;f=f&&Hn(h,c,n),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&Xn(t)?5:s?2===a?5:2:u?4:3:!f||s||o(t)?2===a?5:2:1}function Zn(t,e,r,i,o){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==En.indexOf(e)||qn.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),n=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Wn(t,e)}switch(ht(l,"testAmbiguity"),Gn(e,n,t.indent,s,l,t.quotingType,t.forceQuotes&&!i,o)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Qn(e,t.indent)+Jn(zn(e,a));case 4:return">"+Qn(e,t.indent)+Jn(zn(Kn(e,s),a));case 5:return'"'+el(e)+'"';default:throw new Ta("impossible error: invalid scalar style")}}()}function Qn(t,e){var r=Xn(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function Jn(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Kn(t,e){for(var r,i,o,a=/(\n+)([^\n]*)/g,s=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,tl(t.slice(0,r),e)),n="\n"===t[0]||" "===t[0];o=a.exec(t);){var l=o[1],h=o[2];i=" "===h[0],s+=l+(n||i||""===h?"":"\n")+tl(h,e),n=i}return s}function tl(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,a=0,s=0,n=0,l="";r=o.exec(t);)(n=r.index)-a>e&&(i=s>a?s:n,l+="\n"+t.slice(a,i),a=i+1),s=n;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function el(t){for(var e,r="",i=0,o=0;o<t.length;i>=65536?o+=2:o++)i=Vn(t,o),!(e=$n[i])&&Nn(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||On(i);return r}function rl(t,e,r){var i,o,a,s="",n=t.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],t.replacer&&(a=t.replacer.call(r,String(i),a)),(nl(t,e,a,!1,!1)||void 0===a&&nl(t,e,null,!1,!1))&&(""!==s&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=n,t.dump="["+s+"]"}function il(t,e,r,i){var o,a,s,n="",l=t.tag;for(o=0,a=r.length;o<a;o+=1)s=r[o],t.replacer&&(s=t.replacer.call(r,String(o),s)),(nl(t,e+1,s,!0,!0,!1,!0)||void 0===s&&nl(t,e+1,null,!0,!0,!1,!0))&&(i&&""===n||(n+=Pn(t,e)),t.dump&&10===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=l,t.dump=n||"[]"}function ol(t,e,r){var i,o,a,s,n,l="",h=t.tag,c=Object.keys(r);for(i=0,o=c.length;i<o;i+=1)n="",""!==l&&(n+=", "),t.condenseFlow&&(n+='"'),s=r[a=c[i]],t.replacer&&(s=t.replacer.call(r,a,s)),nl(t,e,a,!1,!1)&&(t.dump.length>1024&&(n+="? "),n+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),nl(t,e,s,!1,!1)&&(l+=n+=t.dump));t.tag=h,t.dump="{"+l+"}"}function al(t,e,r,i){var o,a,s,n,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new Ta("sortKeys must be a boolean or a function");for(o=0,a=u.length;o<a;o+=1)h="",i&&""===c||(h+=Pn(t,e)),n=r[s=u[o]],t.replacer&&(n=t.replacer.call(r,s,n)),nl(t,e+1,s,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Pn(t,e)),nl(t,e+1,n,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function sl(t,e,r){var i,o,a,s,n,l;for(a=0,s=(o=r?t.explicitTypes:t.implicitTypes).length;a<s;a+=1)if(((n=o[a]).instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof e&&e instanceof n.instanceOf)&&(!n.predicate||n.predicate(e))){if(r?n.multi&&n.representName?t.tag=n.representName(e):t.tag=n.tag:t.tag="?",n.represent){if(l=t.styleMap[n.tag]||n.defaultStyle,"[object Function]"===Fn.call(n.represent))i=n.represent(e,l);else{if(!Mn.call(n.represent,l))throw new Ta("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');i=n.represent[l](e,l)}t.dump=i}return!0}return!1}function nl(t,e,r,i,o,a,s){t.tag=null,t.dump=r,sl(t,r,!1)||sl(t,r,!0);var n,l=Fn.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(al(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(ol(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?il(t,e-1,t.dump,o):il(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(rl(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Ta("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Zn(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(n=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),n="!"===t.tag[0]?"!"+n:"tag:yaml.org,2002:"===n.slice(0,18)?"!!"+n.slice(18):"!<"+n+">",t.dump=n+" "+t.dump)}return!0}function ll(t,e){var r,i,o=[],a=[];for(hl(t,o,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(o[a[r]]);e.usedDuplicates=new Array(i)}function hl(t,e,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=e.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,a=t.length;o<a;o+=1)hl(t[o],e,r);else for(o=0,a=(i=Object.keys(t)).length;o<a;o+=1)hl(t[i[o]],e,r)}ht(Gn,"chooseScalarStyle"),ht(Zn,"writeScalar"),ht(Qn,"blockHeader"),ht(Jn,"dropEndingNewline"),ht(Kn,"foldString"),ht(tl,"foldLine"),ht(el,"escapeString"),ht(rl,"writeFlowSequence"),ht(il,"writeBlockSequence"),ht(ol,"writeFlowMapping"),ht(al,"writeBlockMapping"),ht(sl,"detectType"),ht(nl,"writeNode"),ht(ll,"getDuplicateReferences"),ht(hl,"inspectNode"),ht(function(t,e){var r=new Dn(e=e||{});r.noRefs||ll(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),nl(r,0,i,!0,!0)?r.dump+"\n":""},"dump$1"),ht(function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}},"renamed");var cl=as,dl=Ln.load,ul=ht((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),pl={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},gl={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function fl(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Cl(t),e=Cl(e);const[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,n=a-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}ht(fl,"calculateDeltaAndAngle");var yl,ml,Cl=ht(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),xl=ht(t=>({x:ht(function(e,r,i){let o=0;const a=Cl(i[0]).x<Cl(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(pl,t.arrowTypeStart)){const{angle:e,deltaX:r}=fl(i[0],i[1]);o=pl[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pl,t.arrowTypeEnd)){const{angle:e,deltaX:r}=fl(i[i.length-1],i[i.length-2]);o=pl[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const s=Math.abs(Cl(e).x-Cl(i[i.length-1]).x),n=Math.abs(Cl(e).y-Cl(i[i.length-1]).y),l=Math.abs(Cl(e).x-Cl(i[0]).x),h=Math.abs(Cl(e).y-Cl(i[0]).y),c=pl[t.arrowTypeStart],d=pl[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="right"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===a?-1:1,o+=t}return Cl(e).x+o},"x"),y:ht(function(e,r,i){let o=0;const a=Cl(i[0]).y<Cl(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(pl,t.arrowTypeStart)){const{angle:e,deltaY:r}=fl(i[0],i[1]);o=pl[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pl,t.arrowTypeEnd)){const{angle:e,deltaY:r}=fl(i[i.length-1],i[i.length-2]);o=pl[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const s=Math.abs(Cl(e).y-Cl(i[i.length-1]).y),n=Math.abs(Cl(e).x-Cl(i[i.length-1]).x),l=Math.abs(Cl(e).y-Cl(i[0]).y),h=Math.abs(Cl(e).x-Cl(i[0]).x),c=pl[t.arrowTypeStart],d=pl[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="up"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===a?-1:1,o+=t}return Cl(e).y+o},"y")}),"getLineFunctionsWithOffset"),kl={},bl={};var wl=function(){if(ml)return kl;ml=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.sanitizeUrl=function(i){if(!i)return t.BLANK_URL;var o,a=r(i.trim());do{o=(a=r(a=e(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim())).match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex)}while(o&&o.length>0);var s=a;if(!s)return t.BLANK_URL;if(function(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}(s))return s;var n=s.trimStart(),l=n.match(t.urlSchemeRegex);if(!l)return s;var h=l[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(h))return t.BLANK_URL;var c=n.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return t.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var t=(yl||(yl=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.BLANK_URL=bl.relativeFirstCharacters=bl.whitespaceEscapeCharsRegex=bl.urlSchemeRegex=bl.ctrlCharactersRegex=bl.htmlCtrlEntityRegex=bl.htmlEntitiesRegex=bl.invalidProtocolRegex=void 0,bl.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,bl.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,bl.htmlCtrlEntityRegex=/&(newline|tab);/gi,bl.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,bl.urlSchemeRegex=/^.+(:|:)/gim,bl.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,bl.relativeFirstCharacters=[".","/"],bl.BLANK_URL="about:blank"),bl);function e(e){return e.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function r(t){try{return decodeURIComponent(t)}catch(e){return t}}return kl}(),Tl="",Bl={curveBasis:b,curveBasisClosed:k,curveBasisOpen:x,curveBumpX:C,curveBumpY:m,curveBundle:q,curveCardinalClosed:P,curveCardinalOpen:R,curveCardinal:D,curveCatmullRomClosed:U,curveCatmullRomOpen:G,curveCatmullRom:H,curveLinear:y,curveLinearClosed:f,curveMonotoneX:g,curveMonotoneY:p,curveNatural:u,curveStep:d,curveStepAfter:c,curveStepBefore:h},Sl=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vl=ht(function(t,e){const r=_l(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map(t=>t.args);ve(t),i=Gt(i,[...t])}else i=r.args;if(!i)return;let o=Ht(t,e);const a="config";return void 0!==i[a]&&("flowchart-v2"===o&&(o="flowchart"),i[o]=i[a],delete i[a]),i},"detectInit"),_l=ht(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${Sl.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(r,"").replace(/'/gm,'"'),ut.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(i=Wt.exec(t));)if(i.index===Wt.lastIndex&&Wt.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return ut.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),Ll=ht(function(t){return t.replace(Wt,"")},"removeDirectives"),Fl=ht(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function Ml(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Bl[r]??e}function Al(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?wl.sanitizeUrl(r):r}ht(Ml,"interpolateToCurve"),ht(Al,"formatUrl");var $l=ht((t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let e=0;e<i;e++)if(a=a[r[e]],!a)return void ut.error(`Function name: ${t} not found in window`);a[o](...e)},"runFunc");function El(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function ql(t){let e,r=0;t.forEach(t=>{r+=El(t,e),e=t});return Dl(t,r/2)}function Il(t){return 1===t.length?t[0]:ql(t)}ht(El,"distance"),ht(ql,"traverseEdge"),ht(Il,"calcLabelPosition");var Ol=ht((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Dl=ht((t,e)=>{let r,i=e;for(const e of t){if(r){const t=El(e,r);if(0===t)return r;if(t<i)i-=t;else{const o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:Ol((1-o)*r.x+o*e.x,5),y:Ol((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zl=ht((t,e,r)=>{ut.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=Dl(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+i.x)/2,s.y=-Math.cos(a)*o+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function Pl(t,e,r){const i=structuredClone(r);ut.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const o=Dl(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-o.y,i[0].x-o.x),n={x:0,y:0};return"start_left"===e?(n.x=Math.sin(s+Math.PI)*a+(i[0].x+o.x)/2,n.y=-Math.cos(s+Math.PI)*a+(i[0].y+o.y)/2):"end_right"===e?(n.x=Math.sin(s-Math.PI)*a+(i[0].x+o.x)/2-5,n.y=-Math.cos(s-Math.PI)*a+(i[0].y+o.y)/2-5):"end_left"===e?(n.x=Math.sin(s)*a+(i[0].x+o.x)/2-5,n.y=-Math.cos(s)*a+(i[0].y+o.y)/2-5):(n.x=Math.sin(s)*a+(i[0].x+o.x)/2,n.y=-Math.cos(s)*a+(i[0].y+o.y)/2),n}function Wl(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}ht(Pl,"calcTerminalLabelPosition"),ht(Wl,"getStylesFromArray");var Rl=0,Nl=ht(()=>(Rl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rl),"generateId");function jl(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}ht(jl,"makeRandomHex");var Hl=ht(t=>jl(t.length),"random"),Yl=ht(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"),Ul=ht(function(t,e){const r=e.text.replace(kr.lineBreakRegex," "),[,i]=ih(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o},"drawSimpleText"),Vl=$((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),kr.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),o=[];let a="";return i.forEach((t,s)=>{const n=Zl(`${t} `,r),l=Zl(a,r);if(n>e){const{hyphenatedStrings:i,remainingWord:s}=Xl(t,e,"-",r);o.push(a,...i),a=s}else l+n>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");s+1===i.length&&o.push(a)}),o.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Xl=$((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let s="";return o.forEach((t,n)=>{const l=`${s}${t}`;if(Zl(l,i)>=e){const t=n+1,e=o.length===t,i=`${l}${r}`;a.push(e?l:i),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Gl(t,e){return Jl(t,e).height}function Zl(t,e){return Jl(t,e).width}ht(Gl,"calculateTextHeight"),ht(Zl,"calculateTextWidth");var Ql,Jl=$((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=ih(r),s=["sans-serif",i],n=t.split(kr.lineBreakRegex),l=[],h=mo("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const t of s){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of n){const s=Yl();s.text=i||"";const n=Ul(c,s).style("font-size",a).style("font-weight",o).style("font-family",t),l=(n._groups||n)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}l.push(r)}c.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Kl=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{ht(this,"InitIDGenerator")}},th=ht(function(t){return Ql=Ql||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ql.innerHTML=t,unescape(Ql.textContent)},"entityDecode");function eh(t){return"str"in t}ht(eh,"isDetailedError");var rh=ht((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),ih=ht(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function oh(t,e){return A({},t,e)}ht(oh,"cleanAndMerge");var ah={assignWithDepth:Gt,wrapLabel:Vl,calculateTextHeight:Gl,calculateTextWidth:Zl,calculateTextDimensions:Jl,cleanAndMerge:oh,detectInit:vl,detectDirective:_l,isSubstringInArray:Fl,interpolateToCurve:Ml,calcLabelPosition:Il,calcCardinalityPosition:zl,calcTerminalLabelPosition:Pl,formatUrl:Al,getStylesFromArray:Wl,generateId:Nl,random:Hl,runFunc:$l,entityDecode:th,insertTitle:rh,isLabelCoordinateInPath:ch,parseFontSize:ih,InitIDGenerator:Kl},sh=ht(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),nh=ht(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),lh=ht((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function hh(t){return t??null}function ch(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}ht(hh,"handleUndefinedAttr"),ht(ch,"isLabelCoordinateInPath");var dh=ht(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function uh(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const i=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",i){const e=jr().fontSize?jr().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=Se.fontSize]=ih(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}ht(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}ht(uh,"configureLabelImages");var ph=ht(t=>{const{handDrawnSeed:e}=jr();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),gh=ht(t=>{const e=fh([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),fh=ht(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),yh=ht(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),mh=ht(t=>{const{stylesArray:e}=gh(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{const e=t[0];yh(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),Ch=ht((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=jr(),{nodeBorder:o,mainBkg:a}=r,{stylesMap:s}=gh(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||o,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:xh(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),xh=ht(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");const kh=Object.freeze({left:0,top:0,width:16,height:16}),bh=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wh=Object.freeze({...kh,...bh}),Th=Object.freeze({...wh,body:"",hidden:!1}),Bh=Object.freeze({width:null,height:null}),Sh=Object.freeze({...Bh,...bh}),vh=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function _h(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in Th)i in bh?i in t&&!(i in r)&&(r[i]=bh[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Lh(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let a={};function s(t){a=_h(i[t]||o[t],a)}return s(e),r.forEach(s),_h(t,a)}function Fh(t,e){if(t.icons[e])return Lh(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(o[e]=[r].concat(a))}return o[e]}),o}(t,[e])[e];return r?Lh(t,e,r):null}const Mh=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ah=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $h(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(Mh);if(null===i||!i.length)return t;const o=[];let a=i.shift(),s=Ah.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(a=i.shift(),void 0===a)return o.join("");s=!s}}const Eh=/\sid="(\S+)"/g,qh=new Map;function Ih(t){const e=[];let r;for(;r=Eh.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=qh.get(t)||0;return qh.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}function Oh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Dh={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function zh(t){Dh=t}var Ph={exec:()=>null};function Wh(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(Nh.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var Rh=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Nh={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},jh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Hh=/(?:[*+-]|\d{1,9}[.)])/,Yh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Uh=Wh(Yh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vh=Wh(Yh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Zh=Wh(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Gh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qh=Wh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hh).getRegex(),Jh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tc=Wh("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Kh).replace("tag",Jh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ec=Wh(Xh).replace("hr",jh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jh).getRegex(),rc={blockquote:Wh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ec).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Zh,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:jh,html:tc,lheading:Uh,list:Qh,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ec,table:Ph,text:/^[^\n]+/},ic=Wh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jh).getRegex(),oc={...rc,lheading:Vh,table:ic,paragraph:Wh(Xh).replace("hr",jh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ic).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jh).getRegex()},ac={...rc,html:Wh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Kh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ph,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wh(Xh).replace("hr",jh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Uh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},sc=/^( {2,}|\\)\n(?!\s*$)/,nc=/[\p{P}\p{S}]/u,lc=/[\s\p{P}\p{S}]/u,hc=/[^\s\p{P}\p{S}]/u,cc=Wh(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lc).getRegex(),dc=/(?!~)[\p{P}\p{S}]/u,uc=Wh(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Rh?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,gc=Wh(pc,"u").replace(/punct/g,nc).getRegex(),fc=Wh(pc,"u").replace(/punct/g,dc).getRegex(),yc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mc=Wh(yc,"gu").replace(/notPunctSpace/g,hc).replace(/punctSpace/g,lc).replace(/punct/g,nc).getRegex(),Cc=Wh(yc,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,dc).getRegex(),xc=Wh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hc).replace(/punctSpace/g,lc).replace(/punct/g,nc).getRegex(),kc=Wh(/\\(punct)/,"gu").replace(/punct/g,nc).getRegex(),bc=Wh(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wc=Wh(Kh).replace("(?:--\x3e|$)","--\x3e").getRegex(),Tc=Wh("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Sc=Wh(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vc=Wh(/^!?\[(label)\]\[(ref)\]/).replace("label",Bc).replace("ref",Gh).getRegex(),_c=Wh(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gh).getRegex(),Lc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Fc={_backpedal:Ph,anyPunctuation:kc,autolink:bc,blockSkip:uc,br:sc,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Ph,emStrongLDelim:gc,emStrongRDelimAst:mc,emStrongRDelimUnd:xc,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Sc,nolink:_c,punctuation:cc,reflink:vc,reflinkSearch:Wh("reflink|nolink(?!\\()","g").replace("reflink",vc).replace("nolink",_c).getRegex(),tag:Tc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Ph},Mc={...Fc,link:Wh(/^!?\[(label)\]\((.*?)\)/).replace("label",Bc).getRegex(),reflink:Wh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bc).getRegex()},Ac={...Fc,emStrongRDelimAst:Cc,emStrongLDelim:fc,url:Wh(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Lc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Wh(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Lc).getRegex()},$c={...Ac,br:Wh(sc).replace("{2,}","*").getRegex(),text:Wh(Ac.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ec={normal:rc,gfm:oc,pedantic:ac},qc={normal:Fc,gfm:Ac,breaks:$c,pedantic:Mc},Ic={"&":"&","<":"<",">":">",'"':""","'":"'"},Oc=t=>Ic[t];function Dc(t,e){if(e){if(Nh.escapeTest.test(t))return t.replace(Nh.escapeReplace,Oc)}else if(Nh.escapeTestNoEncode.test(t))return t.replace(Nh.escapeReplaceNoEncode,Oc);return t}function zc(t){try{t=encodeURI(t).replace(Nh.percentDecode,"%")}catch{return null}return t}function Pc(t,e){let r=t.replace(Nh.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}),i=r.split(Nh.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(Nh.slashPipe,"|");return i}function Wc(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){if(t.charAt(i-o-1)!==e)break;o++}return t.slice(0,i-o)}function Rc(t,e,r,i,o){let a=e.href,s=e.title||null,n=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:s,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}var Nc=class{options;rules;lexer;constructor(t){this.options=t||Dh}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Wc(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=Wc(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Wc(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=Wc(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,a=!1,s=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))s.push(t[e]),a=!0;else{if(a)break;s.push(t[e])}t=t.slice(e);let n=s.join("\n"),l=n.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${n}`:n,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),s=this.blockquote(a);o[o.length-1]=s,r=r.substring(0,r.length-e.raw.length)+s.raw,i=i.substring(0,i.length-e.text.length)+s.text;break}if("list"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),s=this.list(a);o[o.length-1]=s,r=r.substring(0,r.length-c.raw.length)+s.raw,i=i.substring(0,i.length-e.raw.length)+s.raw,t=a.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,i="",n="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,n=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,n=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),s=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||a.test(h)||s.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())n+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||a.test(l)||r.test(l))break;n+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(n),p&&(u="[ ] "!==p[0],n=n.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:n,tokens:[]}),o.raw+=i}let n=o.items.at(-1);if(!n)return;n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Pc(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of o)a.rows.push(Pc(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=Wc(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),Rc(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return Rc(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,a=[...i[0]].length-1,s=a,n=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){s+=o;continue}if((i[5]||i[6])&&a%3&&!((a+o)%3)){n+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+n);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+o);if(Math.min(a,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},jc=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Dh,this.options.tokenizer=this.options.tokenizer||new Nc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:Nh,block:Ec.normal,inline:qc.normal};this.options.pedantic?(e.block=Ec.pedantic,e.inline=qc.pedantic):this.options.gfm&&(e.block=Ec.gfm,this.options.breaks?e.inline=qc.breaks:e.inline=qc.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ec,inline:qc}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(Nh.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(Nh.tabCharGlobal," ").replace(Nh.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;t;){let r;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,s)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Hc=class{options;parser;constructor(t){this.options=t||Dh}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(Nh.notSpaceStart)?.[0],o=t.replace(Nh.endingNewline,"")+"\n";return i?'<pre><code class="language-'+Dc(i)+'">'+(r?o:Dc(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:Dc(o,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+Dc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Dc(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=zc(t);if(null===o)return i;let a='<a href="'+(t=o)+'"';return e&&(a+=' title="'+Dc(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=zc(t);if(null===o)return Dc(r);let a=`<img src="${t=o}" alt="${r}"`;return e&&(a+=` title="${Dc(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Dc(t.text)}},Yc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Uc=class t{options;renderer;textRenderer;constructor(t){this.options=t||Dh,this.options.renderer=this.options.renderer||new Hc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Yc}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=o;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let o=a,s=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],s+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let a=o;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},Vc=class{options;block;constructor(t){this.options=t||Dh}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?jc.lex:jc.lexInline}provideParser(){return this.block?Uc.parse:Uc.parseInline}},Xc=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Uc;Renderer=Hc;TextRenderer=Yc;Lexer=jc;Tokenizer=Nc;Hooks=Vc;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Hc(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Nc(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Vc;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],a=e[i];Vc.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Vc.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return a.call(e,r)})();let i=o.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return jc.lex(t,e??this.defaults)}parser(t,e){return Uc.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?jc.lex:jc.lexInline)(r,o),a=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(a,o.walkTokens));let s=await(o.hooks?await o.hooks.provideParser():t?Uc.parse:Uc.parseInline)(a,o);return o.hooks?await o.hooks.postprocess(s):s})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?jc.lex:jc.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?Uc.parse:Uc.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+Dc(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Gc(t,e){return Xc.parse(t,e)}function Zc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,o)+"}","g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach(function(t,e){var r=s.match(/(?:^|\n)( *)$/),o=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+o+t}).join("\n")),s+=a+i[e+1]}),s}Gc.options=Gc.setOptions=function(t){return Xc.setOptions(t),Gc.defaults=Xc.defaults,zh(Gc.defaults),Gc},Gc.getDefaults=Oh,Gc.defaults=Dh,Gc.use=function(...t){return Xc.use(...t),Gc.defaults=Xc.defaults,zh(Gc.defaults),Gc},Gc.walkTokens=function(t,e){return Xc.walkTokens(t,e)},Gc.parseInline=Xc.parseInline,Gc.Parser=Uc,Gc.parser=Uc.parse,Gc.Renderer=Hc,Gc.TextRenderer=Yc,Gc.Lexer=jc,Gc.lexer=jc.lex,Gc.Tokenizer=Nc,Gc.Hooks=Vc,Gc.parse=Gc,Gc.options,Gc.setOptions,Gc.use,Gc.walkTokens,Gc.parseInline,Uc.parse,jc.lex;var Qc={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},Jc=new Map,Kc=new Map,td=ht(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(ut.debug("Registering icon pack:",e.name),"loader"in e)Kc.set(e.name,e.loader);else{if(!("icons"in e))throw ut.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Jc.set(e.name,e.icons)}}},"registerIconPacks"),ed=ht(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),e=o.pop(),r={provider:o.length>0?o[0]:i,prefix:e,name:t};return vh(r)?r:null}const a=o[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return vh(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:a};return vh(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=Jc.get(i);if(!o){const t=Kc.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},Jc.set(i,o)}catch(t){throw ut.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Fh(o,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),rd=ht(async t=>{try{return await ed(t),!0}catch{return!1}},"isIconAvailable"),id=ht(async(t,e,r)=>{let i;try{i=await ed(t,e?.fallbackPrefix)}catch(t){ut.error(t),i=Qc}const o=function(t,e){const r={...wh,...t},i={...Sh,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let s,n=t.rotate;switch(r?i?n+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4,n){case 1:s=o.height/2+o.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:s=o.width/2+o.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}n%2==1&&(o.left!==o.top&&(s=o.left,o.left=o.top,o.top=s),o.width!==o.height&&(s=o.width,o.width=o.height,o.height=s)),e.length&&(a=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===o||-1===a)break;const s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(t);return o=i.defs,a=e+i.content+r,o?"<defs>"+o+"</defs>"+a:a;var o,a}(a,'<g transform="'+e.join(" ")+'">',"</g>"))});const s=i.width,n=i.height,l=o.width,h=o.height;let c,d;null===s?(d=null===n?"1em":"auto"===n?h:n,c=$h(d,l/h)):(c="auto"===s?l:s,d=null===n?$h(c,h/l):"auto"===n?h:n);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[o.left,o.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:a}}(i,e),a=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(Ih(o.body),{...o.attributes,...r});return er(a,Pe())},"getIconSVG");function od(t,{markdownAutoWrap:e}){return Zc(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"))}function ad(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function sd(t,e={}){const r=od(t,e),i=Gc.lexer(r),o=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[a].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return ht(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function nd(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function ld(t,{markdownAutoWrap:e}={}){const r=Gc.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(ut.warn(`Unsupported markdown: ${t.type}`),t.raw)}return ht(i,"output"),r.map(i).join("")}function hd(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function cd(t,e){return dd(t,[],hd(e.content),e.type)}function dd(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?dd(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function ud(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return pd(t,e)}function pd(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return pd(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,o]=cd(e,a);r.push([i]),o.content&&t.unshift(o)}return pd(t,e,r)}function gd(t,e){e&&t.attr("style",e)}ht(od,"preprocessMarkdown"),ht(ad,"nonMarkdownToLines"),ht(sd,"markdownToLines"),ht(nd,"nonMarkdownToHTML"),ht(ld,"markdownToHTML"),ht(hd,"splitTextToChars"),ht(cd,"splitWordToFitWidth"),ht(dd,"splitWordToFitWidthRecursion"),ht(ud,"splitLineToFitWidth"),ht(pd,"splitLineToFitWidthRecursion"),ht(gd,"applyStyle");async function fd(t,e,r,i,o=!1,a=Pe()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const n=s.append("xhtml:div"),l=yr(e.label)?await xr(e.label.replace(kr.lineBreakRegex,"\n"),a):er(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),gd(c,e.labelStyle),c.attr("class",`${h} ${i}`),gd(n,e.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),s.node()}function yd(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function md(t,e,r){const i=t.append("text"),o=yd(i,1,e);bd(o,r);const a=o.node().getComputedTextLength();return i.remove(),a}function Cd(t,e,r){const i=t.append("text"),o=yd(i,1,e);bd(o,[{content:r,type:"normal"}]);const a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function xd(t,e,r,i=!1,o=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),n=a.append("text").attr("y","-10.1");o&&n.attr("text-anchor","middle");let l=0;for(const e of r){const r=ht(e=>md(a,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:ud(e,r);for(const t of i){bd(yd(n,l,1.1,o),t),l++}}if(i){const t=n.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return n.node()}function kd(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function bd(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(kd(e.content)):i.text(" "+kd(e.content))})}async function wd(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,o)=>(r.push((async()=>{const r=`${i}:${o}`;return await rd(r)?await id(r,void 0,{class:"label-icon"}):`<i class='${er(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}ht(fd,"addHtmlSpan"),ht(yd,"createTspan"),ht(md,"computeWidthOfText"),ht(Cd,"computeDimensionOfText"),ht(xd,"createFormattedText"),ht(kd,"decodeHTMLEntities"),ht(bd,"updateTextContentAndStyles"),ht(wd,"replaceIconSubstring");var Td=ht(async(t,e="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:a=!0,markdown:s=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(ut.debug("XYZ createText",e,r,i,o,a,n,"addSvgBackground: ",h),a){const i=s?ld(e,c):nd(e),a=await wd(nh(i),c),d=e.replace(/\\\\/g,"\\"),u={isNode:n,label:yr(e)?d:a,labelStyle:r.replace("fill:","color:")};return await fd(t,u,l,o,h,c)}{const o=nh(e.replace(/<br\s*\/?>/g,"<br/>")),a=xd(l,t,s?sd(o.replace("<br>","<br/>"),c):ad(o),!!e&&h,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mo(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");mo(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mo(a).select("text").attr("style",e)}return i?mo(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):mo(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText");function Bd(t,e,r){if(t&&t.length){const[i,o]=e,a=Math.PI/180*r,s=Math.cos(a),n=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*s-(r-o)*n+i,e[1]=(t-i)*n+(r-o)*s+o}}}function Sd(t,e){return t[0]===e[0]&&t[1]===e[1]}function vd(t,e,r,i=1){const o=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,n=[0,0];if(o)for(const t of s)Bd(t,n,o);const l=function(t,e,r){const i=[];for(const e of t){const t=[...e];Sd(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const o=[];e=Math.max(e,.1);const a=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);a.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return o;let s=[],n=a[0].ymin,l=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>n);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:n,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=n)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||l%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;o.push([[Math.round(r.x),n],[Math.round(i.x),n]])}n+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),l++}return o}(s,a,i);if(o){for(const t of s)Bd(t,n,-o);!function(t,e,r){const i=[];t.forEach(t=>i.push(...t)),Bd(i,e,r)}(l,n,-o)}return l}function _d(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),vd(t,o,i,a||1)}class Ld{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=_d(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function Fd(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Md extends Ld{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=_d(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(o),n=.5*r*Math.sin(o);for(const[t,e]of i)Fd([t,e])&&a.push([[t[0]-s,t[1]+n],[...e]],[[t[0]+s,t[1]-n],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Ad extends Ld{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class $d{constructor(t){this.helper=t}fillPolygons(t,e){const r=_d(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const a=i/4;for(const s of t){const t=Fd(s),n=t/i,l=Math.ceil(n)-1,h=t-l*i,c=(s[0][0]+s[1][0])/2-i/4,d=Math.min(s[0][1],s[1][1]);for(let t=0;t<l;t++){const s=d+h+t*i,n=c-a+2*Math.random()*a,l=s-a+2*Math.random()*a,u=this.helper.ellipse(n,l,o,o,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class Ed{constructor(t){this.helper=t}fillPolygons(t,e){const r=_d(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const a=Fd(t),s=Math.floor(a/(r+i)),n=(a+i-s*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<s;t++){const a=t*(r+i),s=a+r,h=[l[0]+a*Math.cos(c)+n*Math.cos(c),l[1]+a*Math.sin(c)+n*Math.sin(c)],d=[l[0]+s*Math.cos(c)+n*Math.cos(c),l[1]+s*Math.sin(c)+n*Math.sin(c)];o.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],e))}}),o}}class qd{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=_d(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=Fd(t),a=Math.round(o/(2*e));let s=t[0],n=t[1];s[0]>n[0]&&(s=t[1],n=t[0]);const l=Math.atan((n[1]-s[1])/(n[0]-s[0]));for(let t=0;t<a;t++){const o=2*t*e,a=2*(t+1)*e,n=Math.sqrt(2*Math.pow(e,2)),h=[s[0]+o*Math.cos(l),s[1]+o*Math.sin(l)],c=[s[0]+a*Math.cos(l),s[1]+a*Math.sin(l)],d=[h[0]+n*Math.cos(l+Math.PI/4),h[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const Id={};class Od{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Dd={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 zd(t,e){return t.type===e}function Pd(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,a=r[o];for(;!zd(a,2);){let s=0;const n=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return Pd("M0,0"+t);o++,s=Dd[a.text],i=a.text}else zd(a,1)?s=Dd[i]:(o++,s=Dd[a.text],i=a.text);if(!(o+s<r.length))throw new Error("Path data ended short");for(let t=o;t<o+s;t++){const e=r[t];if(!zd(e,1))throw new Error("Param not a number: "+i+","+e.text);n[n.length]=+e.text}if("number"!=typeof Dd[i])throw new Error("Bad segment: "+i);{const t={key:i,data:n};e.push(t),o+=s,a=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function Wd(t){let e=0,r=0,i=0,o=0;const a=[];for(const{key:s,data:n}of t)switch(s){case"M":a.push({key:"M",data:[...n]}),[e,r]=n,[i,o]=n;break;case"m":e+=n[0],r+=n[1],a.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":a.push({key:"L",data:[...n]}),[e,r]=n;break;case"l":e+=n[0],r+=n[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],r=n[5];break;case"c":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],r=n[3];break;case"q":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],r=n[6];break;case"a":e+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,r]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],r=n[3];break;case"s":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],r=n[1];break;case"t":e+=n[0],r+=n[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function Rd(t){const e=[];let r="",i=0,o=0,a=0,s=0,n=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],n=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-n),a=o+(o-l)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),n=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,a]=c;let s=0,h=0;"Q"===r||"T"===r?(s=i+(i-n),h=o+(o-l)):(s=i,h=o);const d=i+2*(s-i)/3,u=o+2*(h-o)/3,p=t+2*(s-t)/3,g=a+2*(h-a)/3;e.push({key:"C",data:[d,u,p,g,t,a]}),n=s,l=h,i=t,o=a;break}case"Q":{const[t,r,a,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,p,a,s]}),n=t,l=r,i=a,o=s;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],s=c[3],n=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(jd(i,o,l,h,t,r,a,s,n).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=s}r=h}return e}function Nd(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function jd(t,e,r,i,o,a,s,n,l,h){const c=(d=s,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=Nd(t,e,-c),[r,i]=Nd(r,i,-c);const s=(t-r)/2,h=(e-i)/2;let d=s*s/(o*o)+h*h/(a*a);d>1&&(d=Math.sqrt(d),o*=d,a*=d);const u=o*o,m=a*a,C=u*m-u*h*h-m*s*s,x=u*h*h+m*s*s,k=(n===l?-1:1)*Math.sqrt(Math.abs(C/x));f=k*o*h/a+(t+r)/2,y=k*-a*s/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,n=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=jd(r=f+o*Math.cos(g),i=y+a*Math.sin(g),e,n,o,a,s,0,l,[g,t,f,y])}m=g-p;const C=Math.cos(p),x=Math.sin(p),k=Math.cos(g),b=Math.sin(g),w=Math.tan(m/4),T=4/3*o*w,B=4/3*a*w,S=[t,e],v=[t+T*x,e-B*C],_=[r+T*b,i-B*k],L=[r,i];if(v[0]=2*S[0]-v[0],v[1]=2*S[1]-v[1],h)return[v,_,L].concat(u);{u=[v,_,L].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=Nd(u[e][0],u[e][1],c),i=Nd(u[e+1][0],u[e+1][1],c),o=Nd(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const Hd={randOffset:function(t,e){return iu(t,e)},randOffsetWithRange:function(t,e,r){return ru(t,e,r)},ellipse:function(t,e,r,i,o){return Gd(t,e,o,Xd(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return ou(t,e,r,i,o,!0)}};function Yd(t,e,r,i,o){return{type:"path",ops:ou(t,e,r,i,o)}}function Ud(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...ou(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...ou(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?Yd(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Vd(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=su(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:su(r[0],1.5*(1+.22*e.roughness),tu(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=su(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:su(a,1.5*(1+.22*e.roughness),tu(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Xd(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/o;let s=Math.abs(t/2),n=Math.abs(e/2);const l=1-r.curveFitting;return s+=iu(s*l,r),n+=iu(n*l,r),{increment:a,rx:s,ry:n}}function Gd(t,e,r,i){const[o,a]=lu(i.increment,t,e,i.rx,i.ry,1,i.increment*ru(.1,ru(.4,1,r),r),r);let s=nu(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=lu(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=nu(o,null,r);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Zd(t,e,r,i,o,a,s,n,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=iu(.01*d,l),u+=iu(.01*u,l);let p=o,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=hu(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=hu(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return s&&(n?m.push(...ou(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...ou(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Qd(t,e){const r=Rd(Wd(Pd(t))),i=[];let o=[0,0],a=[0,0];for(const{key:t,data:s}of r)switch(t){case"M":a=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...ou(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,o,n,l,h]=s;i.push(...cu(t,r,o,n,l,h,a,e)),a=[l,h];break}case"Z":i.push(...ou(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function Jd(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+iu(t,e),i[0][1]+iu(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+iu(t,e),i[a][1]+iu(t,e)]})}}return{type:"fillPath",ops:r}}function Kd(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!Id[r])switch(r){case"zigzag":Id[r]||(Id[r]=new Md(e));break;case"cross-hatch":Id[r]||(Id[r]=new Ad(e));break;case"dots":Id[r]||(Id[r]=new $d(e));break;case"dashed":Id[r]||(Id[r]=new Ed(e));break;case"zigzag-line":Id[r]||(Id[r]=new qd(e));break;default:r="hachure",Id[r]||(Id[r]=new Ld(e))}return Id[r]}(e,Hd).fillPolygons(t,e)}function tu(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function eu(t){return t.randomizer||(t.randomizer=new Od(t.seed||0)),t.randomizer.next()}function ru(t,e,r,i=1){return r.roughness*i*(eu(r)*(e-t)+t)}function iu(t,e,r=1){return ru(-t,t,e,r)}function ou(t,e,r,i,o,a=!1){const s=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=au(t,e,r,i,o,!0,!1);if(s)return n;const l=au(t,e,r,i,o,!0,!0);return n.concat(l)}function au(t,e,r,i,o,a,s){const n=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,u=.2+.2*eu(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=iu(p,o,h),g=iu(g,o,h);const f=[],y=()=>iu(d,o,h),m=()=>iu(c,o,h),C=o.preserveVertices;return s?f.push({op:"move",data:[t+(C?0:y()),e+(C?0:y())]}):f.push({op:"move",data:[t+(C?0:iu(c,o,h)),e+(C?0:iu(c,o,h))]}),s?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(C?0:y()),i+(C?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(C?0:m()),i+(C?0:m())]}),f}function su(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+iu(e,r),t[0][1]+iu(e,r)]),i.push([t[0][0]+iu(e,r),t[0][1]+iu(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+iu(e,r),t[o][1]+iu(e,r)]),o===t.length-1&&i.push([t[o][0]+iu(e,r),t[o][1]+iu(e,r)]);return nu(i,null,r)}function nu(t,e,r){const i=t.length,o=[];if(i>3){const e=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(a*t[r+1][0]-a*t[r-1][0])/6,i[1]+(a*t[r+1][1]-a*t[r-1][1])/6],e[2]=[t[r+1][0]+(a*t[r][0]-a*t[r+2][0])/6,t[r+1][1]+(a*t[r][1]-a*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...au(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return o}function lu(t,e,r,i,o,a,s,n){const l=[],h=[];if(0===n.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=iu(.5,n)-Math.PI/2;h.push([iu(a,n)+e+.9*i*Math.cos(c-t),iu(a,n)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let s=c;s<d;s+=t){const t=[iu(a,n)+e+i*Math.cos(s),iu(a,n)+r+o*Math.sin(s)];l.push(t),h.push(t)}h.push([iu(a,n)+e+i*Math.cos(c+2*Math.PI+.5*s),iu(a,n)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([iu(a,n)+e+.98*i*Math.cos(c+s),iu(a,n)+r+.98*o*Math.sin(c+s)]),h.push([iu(a,n)+e+.9*i*Math.cos(c+.5*s),iu(a,n)+r+.9*o*Math.sin(c+.5*s)])}return[h,l]}function hu(t,e,r,i,o,a,s,n,l){const h=a+iu(.1,l),c=[];c.push([iu(n,l)+e+.9*i*Math.cos(h-t),iu(n,l)+r+.9*o*Math.sin(h-t)]);for(let a=h;a<=s;a+=t)c.push([iu(n,l)+e+i*Math.cos(a),iu(n,l)+r+o*Math.sin(a)]);return c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),nu(c,0,l)}function cu(t,e,r,i,o,a,s,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(u?0:iu(h[0],n)),s[1]+(u?0:iu(h[0],n))]}),c=u?[o,a]:[o+iu(h[p],n),a+iu(h[p],n)],l.push({op:"bcurveTo",data:[t+iu(h[p],n),e+iu(h[p],n),r+iu(h[p],n),i+iu(h[p],n),c[0],c[1]]});return l}function du(t){return[...t]}function uu(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(du(t[0]),du(t[1]),du(t[2]),du(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],a=1-e;i.push(du(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],o[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function pu(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function gu(t,e,r){const i=pu(e,r);if(0===i)return pu(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),pu(t,fu(e,r,o))}function fu(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function yu(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],a=t[e+3];let s=3*i[0]-2*r[0]-a[0];s*=s;let n=3*i[1]-2*r[1]-a[1];n*=n;let l=3*o[0]-2*a[0]-r[0];l*=l;let h=3*o[1]-2*a[1]-r[1];return h*=h,s<l&&(s=l),n<h&&(n=h),s+n}(t,e)<r){const r=t[e+0];o.length?(a=o[o.length-1],s=r,Math.sqrt(pu(a,s))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,a=t[e+0],s=t[e+1],n=t[e+2],l=t[e+3],h=fu(a,s,i),c=fu(s,n,i),d=fu(n,l,i),u=fu(h,c,i),p=fu(c,d,i),g=fu(u,p,i);yu([a,h,u,g],0,r,o),yu([g,p,d,l],0,r,o)}var a,s;return o}function mu(t,e){return Cu(t,0,t.length,e)}function Cu(t,e,r,i,o){const a=o||[],s=t[e],n=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=gu(t[i],s,n);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Cu(t,e,h+1,i,a),Cu(t,h,r,i,a)):(a.length||a.push(s),a.push(n)),a}function xu(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)yu(t,3*r,e,i);return r&&r>0?Cu(i,0,i.length,r):i}const ku="none";class bu{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const a=this._o(o);return this._d("line",[Yd(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){const a=this._o(o),s=[],n=function(t,e,r,i,o){return function(t,e){return Ud(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,a);if(a.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?s.push(Jd([o],a)):s.push(Kd([o],a))}return a.stroke!==ku&&s.push(n),this._d("rectangle",s,a)}ellipse(t,e,r,i,o){const a=this._o(o),s=[],n=Xd(r,i,a),l=Gd(t,e,a,n);if(a.fill)if("solid"===a.fillStyle){const r=Gd(t,e,a,n).opset;r.type="fillPath",s.push(r)}else s.push(Kd([l.estimatedPoints],a));return a.stroke!==ku&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Ud(t,!1,r)],r)}arc(t,e,r,i,o,a,s=!1,n){const l=this._o(n),h=[],c=Zd(t,e,r,i,o,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const n=Zd(t,e,r,i,o,a,!0,!1,s);n.type="fillPath",h.push(n)}else h.push(function(t,e,r,i,o,a,s){const n=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=iu(.01*h,s),c+=iu(.01*c,s);let d=o,u=a;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/s.curveStepCount,g=[];for(let t=d;t<=u;t+=p)g.push([n+h*Math.cos(t),l+c*Math.sin(t)]);return g.push([n+h*Math.cos(u),l+c*Math.sin(u)]),g.push([n,l]),Kd([g],s)}(t,e,r,i,o,a,l));return l.stroke!==ku&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=Vd(t,r);if(r.fill&&r.fill!==ku)if("solid"===r.fillStyle){const e=Vd(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...xu(uu([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...xu(uu(i),10,(1+r.roughness)/2))}e.length&&i.push(Kd([e],r))}return r.stroke!==ku&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=Ud(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(Jd([t],r)):i.push(Kd([t],r))),r.stroke!==ku&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==ku,a=r.stroke!==ku,s=!!(r.simplification&&r.simplification<1),n=function(t,e,r){const i=Rd(Wd(Pd(t))),o=[];let a=[],s=[0,0],n=[];const l=()=>{n.length>=4&&a.push(...xu(n,1)),n=[]},h=()=>{l(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),s=[e[0],e[1]],a.push(s);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!n.length){const t=a.length?a[a.length-1]:s;n.push([t[0],t[1]])}n.push([e[0],e[1]]),n.push([e[2],e[3]]),n.push([e[4],e[5]]);break;case"Z":l(),a.push([s[0],s[1]])}if(h(),!r)return o;const c=[];for(const t of o){const e=mu(t,r);e.length&&c.push(e)}return c}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=Qd(t,r);if(o)if("solid"===r.fillStyle)if(1===n.length){const e=Qd(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Jd(n,r));else i.push(Kd(n,r));return a&&(s?n.forEach(t=>{i.push(Ud(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:ku};break;case"fillPath":e={d:this.opsToPath(t),stroke:ku,strokeWidth:0,fill:r.fill||ku};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||ku,strokeWidth:r,fill:ku}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class wu{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new bu(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const Tu="http://www.w3.org/2000/svg";class Bu{constructor(t,e){this.svg=t,this.gen=new bu(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Tu,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=i.createElementNS(Tu,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(Tu,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(Tu,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var Su={canvas:(t,e)=>new wu(t,e),svg:(t,e)=>new Bu(t,e),generator:t=>new bu(t),newSeed:()=>bu.newSeed()},vu=ht(async(t,e,r)=>{let i;const o=e.useHtmlLabels||Fe(jr()?.htmlLabels);i=r||"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",hh(e.labelStyle));let n;n=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const l=!!e.icon||!!e.img,h="markdown"===e.labelType,c=await Td(s,er(nh(n),jr()),{useHtmlLabels:o,width:e.width||jr().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:l,markdown:h},jr());let d=c.getBBox();const u=(e?.padding??0)/2;if(o){const t=c.children[0],e=mo(c);await uh(t,n),d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return o?s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):s.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:u,label:s}},"labelHelper"),_u=ht(async(t,e,r)=>{const i=r.useHtmlLabels??Xe(jr()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Td(o,er(nh(e),jr()),{useHtmlLabels:i,width:r.width||jr()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const n=r.padding/2;if(Xe(jr())){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}return i?o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):o.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:n,label:o}},"insertLabel"),Lu=ht((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Fu=ht((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function Mu(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function Au(t,e,r,i,o,a){const s=[],n=r-t,l=i-e,h=n/a,c=2*Math.PI/h,d=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*n,i=d+o*Math.sin(c*(r-t));s.push({x:r,y:i})}return s}function $u(t,e,r,i,o,a){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}function Eu(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=ht((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}ht(Mu,"createPathFromPoints"),ht(Au,"generateFullSineWavePoints"),ht($u,"generateCirclePoints"),ht(Eu,"mergePaths");var qu=ht((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,n=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(n)*l>Math.abs(s)*h?(n<0&&(h=-h),r=0===n?0:h*s/n,i=h):(s<0&&(l=-l),r=l,i=0===s?0:l*n/s),{x:o+r,y:a+i}},"intersectRect"),Iu=qu,Ou=ht(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const s=jr(),n=Xe(s);return await Td(t,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},s)},"createLabel"),Du=Ou,zu=ht((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),Pu=ht(async(t,e)=>{ut.info("Creating subgraph rect for ",e.id,e);const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=mh(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=Xe(r),p=d.insert("g").attr("class","cluster-label ");let g;g="markdown"===e.labelType?await Td(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width}):await Du(p,e.label,e.labelStyle||"",!1,!0);let f=g.getBBox();if(Xe(r)){const t=g.children[0],e=mo(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,C=e.x-y/2,x=e.y-m/2;let k;if(ut.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=Su.svg(d),r=Ch(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:o}),i=t.path(zu(C,x,y,m,0),r);k=d.insert(()=>(ut.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",x).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:b}=dh(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+b})`),n){const t=p.select("span");t&&t.attr("style",n)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return Iu(e,t)},{cluster:d,labelBBox:f}},"rect"),Wu=ht((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Iu(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Ru=ht(async(t,e)=>{const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:n,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=await Du(d,e.label,e.labelStyle,void 0,!0);let g=p.getBBox();if(Xe(r)){const t=p.children[0],e=mo(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,y=f/2,m=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+f,x=e.height+f-g.height-6,k=e.x-m/2,b=e.y-C/2;e.width=m;const w=e.y-e.height/2-y+g.height+2;let T;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=Su.svg(h),i=e.rx||e.ry?r.path(zu(k,b,m,C,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):r.rectangle(k,b,m,C,{seed:o});T=h.insert(()=>i,":first-child");const c=r.rectangle(k,w,m,x,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:l,seed:o});T=h.insert(()=>i,":first-child"),u=h.insert(()=>c)}else{T=c.insert("rect",":first-child");const t="outer";T.attr("class",t).attr("x",k).attr("y",b).attr("width",m).attr("height",C).attr("data-look",e.look),u.attr("class","inner").attr("x",k).attr("y",w).attr("width",m).attr("height",x)}d.attr("transform",`translate(${e.x-g.width/2}, ${b+1-(Xe(r)?0:3)})`);const B=T.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return Iu(e,t)},{cluster:h,labelBBox:g}},"roundedWithTitle"),Nu=ht(async(t,e)=>{ut.info("Creating subgraph rect for ",e.id,e);const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=mh(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=Xe(r),p=d.insert("g").attr("class","cluster-label "),g=await Td(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width});let f=g.getBBox();if(Xe(r)){const t=g.children[0],e=mo(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,C=e.x-y/2,x=e.y-m/2;let k;if(ut.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=Su.svg(d),r=Ch(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:o}),i=t.path(zu(C,x,y,m,e.rx),r);k=d.insert(()=>(ut.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",x).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:b}=dh(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+b})`),n){const t=p.select("span");t&&t.attr("style",n)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return Iu(e,t)},{cluster:d,labelBBox:f}},"kanbanSection"),ju=ht((t,e)=>{const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:a}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),n=s.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=Su.svg(s).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});p=s.insert(()=>t,":first-child")}else{p=n.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return Iu(e,t)},{cluster:s,labelBBox:{}}},"divider"),Hu={rect:Pu,squareRect:Pu,roundedWithTitle:Ru,noteGroup:Wu,divider:ju,kanbanSection:Nu},Yu=new Map,Uu=ht(async(t,e)=>{const r=e.shape||"rect",i=await Hu[r](t,e);return Yu.set(e.id,i),i},"insertCluster"),Vu=ht(()=>{Yu=new Map},"clear");function Xu(t,e){return t.intersect(e)}ht(Xu,"intersectNode");var Gu=Xu;function Zu(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,n=a-i.y,l=Math.sqrt(e*e*n*n+r*r*s*s),h=Math.abs(e*r*s/l);i.x<o&&(h=-h);var c=Math.abs(e*r*n/l);return i.y<a&&(c=-c),{x:o+h,y:a+c}}ht(Zu,"intersectEllipse");var Qu=Zu;function Ju(t,e,r){return Qu(t,e,e,r)}ht(Ju,"intersectCircle");var Ku=Ju;function tp(t,e,r,i){{const o=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,n=o*r.x+a*r.y+s,l=o*i.x+a*i.y+s,h=1e-6;if(0!==n&&0!==l&&ep(n,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&ep(p,g))return;const f=o*d-c*a;if(0===f)return;const y=Math.abs(f/2);let m=a*u-d*s;const C=m<0?(m-y)/f:(m+y)/f;m=c*s-o*u;return{x:C,y:m<0?(m-y)/f:(m+y)/f}}}function ep(t,e){return t*e>0}ht(tp,"intersectLine"),ht(ep,"sameSign");var rp=tp;function ip(t,e,r){let i=t.x,o=t.y,a=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),n=Math.min(n,t.y)}):(s=Math.min(s,e.x),n=Math.min(n,e.y));let l=i-t.width/2-s,h=o-t.height/2-n;for(let i=0;i<e.length;i++){let o=e[i],s=e[i<e.length-1?i+1:0],n=rp(t,r,{x:l+o.x,y:h+o.y},{x:l+s.x,y:h+s.y});n&&a.push(n)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,n=e.y-r.y,l=Math.sqrt(s*s+n*n);return a<l?-1:a===l?0:1}),a[0]):t}ht(ip,"intersectPolygon");var op={node:Gu,circle:Ku,ellipse:Qu,polygon:ip,rect:Iu};function ap(t,e){const{labelStyles:r}=mh(e);e.labelStyle=r;const i=Fu(e);let o=i;i||(o="anchor");const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),{cssStyles:s}=e,n=Su.svg(a),l=Ch(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=n.circle(0,0,2,l),c=a.insert(()=>h,":first-child");return c.attr("class","anchor").attr("style",hh(s)),Lu(e,c),e.intersect=function(t){return ut.info("Circle intersect",e,1,t),op.circle(e,1,t)},a}function sp(t,e,r,i,o,a,s){const n=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/a,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=n+p*a*Math.sin(h)*(s?-1:1),f=l-p*o*Math.cos(h)*(s?-1:1),y=Math.atan2((e-f)/a,(t-g)/o);let m=Math.atan2((i-f)/a,(r-g)/o)-y;s&&m<0&&(m+=2*Math.PI),!s&&m>0&&(m-=2*Math.PI);const C=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=g+o*Math.cos(e),i=f+a*Math.sin(e);C.push({x:r,y:i})}return C}function np(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function lp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,n=ht(t=>t+s,"calcTotalHeight"),l=ht(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await vu(t,e,Fu(e)),d=n(e?.height?e?.height:c.height),[u,p]=l(d),g=np(d,u,p),f=(e?.width?e?.width:c.width)+2*a+g-g,y=d,{cssStyles:m}=e,C=[{x:f/2,y:-y/2},{x:-f/2,y:-y/2},...sp(-f/2,-y/2,-f/2,y/2,u,p,!1),{x:f/2,y:y/2},...sp(f/2,y/2,f/2,-y/2,u,p,!0)],x=Su.svg(h),k=Ch(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const b=Mu(C),w=x.path(b,k),T=h.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${u/2}, 0)`),Lu(e,T),e.intersect=function(t){return op.polygon(e,C,t)},h}function hp(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}ht(ap,"anchor"),ht(sp,"generateArcPoints"),ht(np,"calculateArcSagitta"),ht(lp,"bowTieRect"),ht(hp,"insertPolygonShape");async function cp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?28:o,s="neo"===e.look?24:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width??l.width)+("neo"===e.look?2*a:a+12),c=(e?.height??l.height)+("neo"===e.look?2*s:s),d=-c,u=[{x:12,y:d},{x:h,y:d},{x:h,y:0},{x:0,y:0},{x:0,y:d+12},{x:12,y:d}];let p;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(u),o=t.path(i,r);p=n.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&p.attr("style",g)}else p=hp(n,h,c,u);return i&&p.attr("style",i),Lu(e,p),e.intersect=function(t){return op.polygon(e,u,t)},n}function dp(t,e){const{nodeStyles:r}=mh(e);e.label="";const i=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=Su.svg(i),l=Ch(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=Mu(s),c=n.path(h,l),d=i.insert(()=>c,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return op.polygon(e,s,t)},i}async function up(t,e,r){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:n}=await vu(t,e,Fu(e)),l=r?.padding??n,h="neo"===e.look?s.width/2+32:s.width/2+l;let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=Su.svg(a),r=Ch(e,{}),i=t.circle(0,0,2*h,r);c=a.insert(()=>i,":first-child"),c.attr("class","basic label-container").attr("style",hh(d))}else c=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return Lu(e,c),e.calcIntersect=function(t,e){const r=t.width/2;return op.circle(t,r,e)},e.intersect=function(t){return ut.info("Circle intersect",e,h,t),op.circle(e,h,t)},a}function pp(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function gp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r,e.label="";const o=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,n=Su.svg(o),l=Ch(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,2*a,l),c=pp(a),d=n.path(c,l),u=o.insert(()=>h,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),s&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Lu(e,u),e.intersect=function(t){ut.info("crossedCircle intersect",e,{radius:a,point:t});return op.circle(e,a,t)},o}function fp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function yp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+n,c=a.height+l,d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...fp(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...fp(h/2+2*d,-d,d,20,-180,-270),...fp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...fp(h/2,c/2,d,20,0,90)],g=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...fp(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...fp(h/2+.1*h,-d,d,20,-180,-270),...fp(h/2+.1*h,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...fp(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Su.svg(o),y=Ch(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Mu(p).replace("Z",""),C=f.path(m,y),x=Mu(g),k=f.path(x,{...y}),b=o.insert("g",":first-child");return b.insert(()=>k,":first-child").attr("stroke-opacity",0),b.insert(()=>C,":first-child"),b.attr("class","text"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Lu(e,b),e.intersect=function(t){return op.polygon(e,g,t)},o}function mp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:a,y:h})}return s}async function Cp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*n:n),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...mp(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...mp(h/2+2*d,-d,d,20,-180,-270),...mp(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...mp(h/2,c/2,d,20,0,90)],g=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...mp(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...mp(h/2+2*d,-d,d,20,-180,-270),...mp(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...mp(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Su.svg(o),y=Ch(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Mu(p).replace("Z",""),C=f.path(m,y),x=Mu(g),k=f.path(x,{...y}),b=o.insert("g",":first-child");return b.insert(()=>k,":first-child").attr("stroke-opacity",0),b.insert(()=>C,":first-child"),b.attr("class","text"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Lu(e,b),e.intersect=function(t){return op.polygon(e,g,t)},o}function xp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function kp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*n:n),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...xp(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...xp(h/2+2*d,-d,d,20,-180,-270),...xp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...xp(h/2,c/2,d,20,0,90)],g=[...xp(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...xp(-h/2-d/2,-d,d,20,0,90),...xp(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...xp(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...xp(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...xp(h/2+2*d,-d,d,20,-180,-270),...xp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...xp(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...xp(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...xp(-h/2-d/2,-d,d,20,0,90),...xp(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...xp(-h/2+d+d/2,c/2,d,30,-180,-270)],y=Su.svg(o),m=Ch(e,{fill:"none"});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=Mu(p).replace("Z",""),x=y.path(C,m),k=Mu(g).replace("Z",""),b=y.path(k,m),w=Mu(f),T=y.path(w,{...m}),B=o.insert("g",":first-child");return B.insert(()=>T,":first-child").attr("stroke-opacity",0),B.insert(()=>x,":first-child"),B.insert(()=>b,":first-child"),B.attr("class","text"),u&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Lu(e,B),e.intersect=function(t){return op.polygon(e,f,t)},o}async function bp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=Math.max(20,1.25*(l.width+2*a),e?.width??0),c=Math.max(5,l.height+2*s,e?.height??0),d=c/2,{cssStyles:u}=e,p=Su.svg(n),g=Ch(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=h-d,y=c/4,m=[{x:f,y:0},{x:y,y:0},{x:0,y:c/2},{x:y,y:c},{x:f,y:c},...$u(-f,-c/2,d,50,270,90)],C=Mu(m),x=p.path(C,g),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-h/2}, ${-c/2})`),Lu(e,k),e.intersect=function(t){return op.polygon(e,m,t)},n}ht(cp,"card"),ht(dp,"choice"),ht(up,"circle"),ht(pp,"createLine"),ht(gp,"crossedCircle"),ht(fp,"generateCirclePoints"),ht(yp,"curlyBraceLeft"),ht(mp,"generateCirclePoints"),ht(Cp,"curlyBraceRight"),ht(xp,"generateCirclePoints"),ht(kp,"curlyBraces"),ht(bp,"curvedTrapezoid");var wp=ht((t,e,r,i,o,a)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),Tp=ht((t,e,r,i,o,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),Bp=ht((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Sp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?24:o,s="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-a-3*r,e.height<8&&(e.height=8)}const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e.width?e.width:l.width)+s,d=c/2,u=d/(2.5+c/50),p=(e.height?e.height:l.height)+a+u;let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Tp(0,0,c,p,d,u),i=Bp(0,u,c,p,d,u),o=Ch(e,{}),a=t.path(r,o),s=t.path(i,Ch(e,{fill:"none"}));g=n.insert(()=>s,":first-child"),g=n.insert(()=>a,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const t=wp(0,0,c,p,d,u);g=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",hh(f)).attr("style",i)}return g.attr("label-offset-y",u),g.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),Lu(e,g),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+(e.padding??0)/1.5-(l.y-(l.top??0))})`),e.intersect=function(t){const r=op.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},n}async function vp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=n.width+o,c=n.height+a,d=.2*c,u=-h/2,p=-c/2-d/2,{cssStyles:g}=e,f=Su.svg(s),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p+d},{x:-u,y:p+d},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+d}],C=f.polygon(m.map(t=>[t.x,t.y]),y),x=s.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),l.attr("transform",`translate(${u+(e.padding??0)/2-(n.x-(n.left??0))}, ${p+d+(e.padding??0)/2-(n.y-(n.top??0))})`),Lu(e,x),e.intersect=function(t){return op.rect(e,t)},s}async function _p(t,e){const{labelStyles:r,nodeStyles:i}=mh(e),o="neo"===e.look?12:5;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width/2:l.width/2)+(s??0),c=h-o;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{roughness:.2,strokeWidth:2.5}),i=Ch(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*h,r),a=t.circle(0,0,2*c,i);d=n.insert("g",":first-child"),d.attr("class",hh(e.cssClasses)).attr("style",hh(u)),d.node()?.appendChild(o),d.node()?.appendChild(a)}else{d=n.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Lu(e,d),e.intersect=function(t){return ut.info("DoubleCircle intersect",e,h,t),op.circle(e,h,t)},n}function Lp(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=mh(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,n=Su.svg(a),{nodeBorder:l}=r,h=Ch(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=n.circle(0,0,14,h),d=a.insert(()=>c,":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),Lu(e,d),e.intersect=function(t){ut.info("filledCircle intersect",e,{radius:7,point:t});return op.circle(e,7,t)},a}ht(Sp,"cylinder"),ht(vp,"dividedRectangle"),ht(_p,"doublecircle"),ht(Lp,"filledCircle");async function Fp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:n.width)+(a??0),c=e?.height?e?.height:h+n.height,d=[{x:0,y:-c},{x:c,y:-c},{x:c/2,y:0}],{cssStyles:u}=e,p=Su.svg(s),g=Ch(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=Mu(d),y=p.path(f,g),m=s.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=h,e.height=c,Lu(e,m),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return ut.info("Triangle intersect",e,d,t),op.polygon(e,d,t)},s}function Mp(t,e,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:a}=mh(e);e.label="";const s=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:n}=e;let l=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));const c=-1*l/2,d=-1*h/2,u=Su.svg(s),p=Ch(e,{stroke:o.lineColor,fill:o.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=s.insert(()=>g,":first-child");n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),Lu(e,f);const y=i?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return op.rect(e,t)},s}async function Ap(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*o,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:n}=await vu(t,e,Fu(e)),l=(e?.width?e?.width:Math.max(15,n.width))+2*o,h=(e?.height?e?.height:Math.max(10,n.height))+2*a,c=h/2,{cssStyles:d}=e,u=Su.svg(s),p=Ch(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-h/2},{x:l/2-c,y:-h/2},...$u(-l/2+c,0,c,50,90,270),{x:l/2-c,y:h/2},{x:-l/2,y:h/2}],f=Mu(g),y=u.path(f,p),m=s.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),Lu(e,m),e.intersect=function(t){ut.info("Pill intersect",e,{radius:c,point:t});return op.polygon(e,g,t)},s}ht(Fp,"flippedTriangle"),ht(Mp,"forkJoin"),ht(Ap,"halfRoundedRectangle");var $p=ht((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Ep(t,e){const{labelStyles:r,nodeStyles:i}=mh(e),o="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,n="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/o;e.width=(e?.width??0)-2*t-n,e.height=(e.height??0)-s}const{shapeSvg:l,bbox:h}=await vu(t,e,Fu(e)),c=(e?.height?e?.height:h.height)+s,d=c/o,u=(e?.width?e?.width:h.width)+2*d+n,p=[{x:d,y:0},{x:u-d,y:0},{x:u,y:-c/2},{x:u-d,y:-c},{x:d,y:-c},{x:0,y:-c/2}];let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=Su.svg(l),r=Ch(e,{}),i=$p(0,0,u,c,d),o=t.path(i,r);g=l.insert(()=>o,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),f&&g.attr("style",f)}else g=hp(l,u,c,p);return i&&g.attr("style",i),e.width=u,e.height=c,Lu(e,g),e.intersect=function(t){return op.polygon(e,p,t)},l}async function qp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.label="",e.labelStyle=r;const{shapeSvg:o}=await vu(t,e,Fu(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:n}=e,l=Su.svg(o),h=Ch(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],d=Mu(c),u=l.path(d,h),p=o.insert(()=>u,":first-child");return p.attr("class","basic label-container outer-path"),n&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Lu(e,p),e.intersect=function(t){ut.info("Pill intersect",e,{points:c});return op.polygon(e,c,t)},o}async function Ip(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await vu(t,e,"icon-shape default"),u="t"===e.pos,p=n,g=n,{nodeBorder:f}=r,{stylesMap:y}=gh(e),m=-g/2,C=-p/2,x=e.label?8:0,k=Su.svg(h),b=Ch(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=k.rectangle(m,C,g,p,b),T=Math.max(g,c.width),B=p+c.height+x,S=k.rectangle(-T/2,-B/2,T,B,{...b,fill:"transparent",stroke:"none"}),v=h.insert(()=>w,":first-child"),_=h.insert(()=>S);if(e.icon){const t=h.append("g");t.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${u?c.height/2+x/2-o/2-s:-c.height/2-x/2-o/2-s})`),t.attr("style",`color: ${y.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-B/2:B/2-c.height})`),v.attr("transform",`translate(0,${u?c.height/2+x/2:-c.height/2-x/2})`),Lu(e,_),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=u?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+x},{x:r+g/2,y:i-o/2+c.height+x},{x:r+g/2,y:i+o/2},{x:r-g/2,y:i+o/2},{x:r-g/2,y:i-o/2+c.height+x},{x:r-c.width/2,y:i-o/2+c.height+x}]:[{x:r-g/2,y:i-o/2},{x:r+g/2,y:i-o/2},{x:r+g/2,y:i-o/2+p},{x:r+c.width/2,y:i-o/2+p},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+p},{x:r-g/2,y:i-o/2+p}];return op.polygon(e,a,t)},h}async function Op(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await vu(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:y}=gh(e),m=Su.svg(h),C=Ch(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const x=y.get("fill");C.stroke=x??f;const k=h.append("g");e.icon&&k.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const b=k.node().getBBox(),w=b.width,T=b.height,B=b.x,S=b.y,v=Math.max(w,T)*Math.SQRT2+40,_=m.circle(0,0,v,C),L=Math.max(v,c.width),F=v+c.height+u,M=m.rectangle(-L/2,-F/2,L,F,{...C,fill:"transparent",stroke:"none"}),A=h.insert(()=>_,":first-child"),$=h.insert(()=>M);return k.attr("transform",`translate(${-w/2-B},${p?c.height/2+u/2-T/2-S:-c.height/2-u/2-T/2-S})`),k.attr("style",`color: ${y.get("stroke")??g};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-F/2:F/2-c.height})`),A.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),Lu(e,$),e.intersect=function(t){ut.info("iconSquare intersect",e,t);return op.rect(e,t)},h}async function Dp(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await vu(t,e,"icon-shape default"),p="t"===e.pos,g=n+2*d,f=n+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=gh(e),x=-f/2,k=-g/2,b=e.label?8:0,w=Su.svg(h),T=Ch(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=C.get("fill");T.stroke=B??m;const S=w.path(zu(x,k,f,g,5),T),v=Math.max(f,c.width),_=g+c.height+b,L=w.rectangle(-v/2,-_/2,v,_,{...T,fill:"transparent",stroke:"none"}),F=h.insert(()=>S,":first-child").attr("class","icon-shape2"),M=h.insert(()=>L);if(e.icon){const t=h.append("g");t.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${p?c.height/2+b/2-o/2-s:-c.height/2-b/2-o/2-s})`),t.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+b/2:-c.height/2-b/2})`),Lu(e,M),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return op.polygon(e,a,t)},h}async function zp(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await vu(t,e,"icon-shape default"),p="t"===e.pos,g=n+2*d,f=n+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=gh(e),x=-f/2,k=-g/2,b=e.label?8:0,w=Su.svg(h),T=Ch(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=C.get("fill");T.stroke=B??m;const S=w.path(zu(x,k,f,g,.1),T),v=Math.max(f,c.width),_=g+c.height+b,L=w.rectangle(-v/2,-_/2,v,_,{...T,fill:"transparent",stroke:"none"}),F=h.insert(()=>S,":first-child"),M=h.insert(()=>L);if(e.icon){const t=h.append("g");t.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${p?c.height/2+b/2-o/2-s:-c.height/2-b/2-o/2-s})`),t.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+b/2:-c.height/2-b/2})`),Lu(e,M),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return op.polygon(e,a,t)},h}async function Pp(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;const{labelStyles:s}=mh(e);e.labelStyle=s;const n=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const l=Math.max(e.label?n??0:0,e?.assetWidth??o),h="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(h,n??0);const{shapeSvg:d,bbox:u,label:p}=await vu(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,y=-c/2,m=e.label?8:0,C=Su.svg(d),x=Ch(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=C.rectangle(f,y,h,c,x),b=Math.max(h,u.width),w=c+u.height+m,T=C.rectangle(-b/2,-w/2,b,w,{...x,fill:"none",stroke:"none"}),B=d.insert(()=>k,":first-child"),S=d.insert(()=>T);if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-m/2:c/2-u.height/2+m/2})`),B.attr("transform",`translate(0,${g?u.height/2+m/2:-u.height/2-m/2})`),Lu(e,S),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=g?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+m},{x:r+h/2,y:i-o/2+u.height+m},{x:r+h/2,y:i+o/2},{x:r-h/2,y:i+o/2},{x:r-h/2,y:i-o/2+u.height+m},{x:r-u.width/2,y:i-o/2+u.height+m}]:[{x:r-h/2,y:i-o/2},{x:r+h/2,y:i-o/2},{x:r+h/2,y:i-o/2+c},{x:r+u.width/2,y:i-o/2+c},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+c},{x:r-h/2,y:i-o/2+c}];return op.polygon(e,a,t)},d}async function Wp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=Math.max(l.width+2*(s??0),e?.width??0),c=Math.max(l.height+2*(a??0),e?.height??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=hp(n,h,c,d);return i&&u.attr("style",i),e.width=h,e.height=c,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}async function Rp(t,e,r){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;const{shapeSvg:a,bbox:s}=await vu(t,e,Fu(e)),n=Math.max(s.width+2*r.labelPaddingX,e?.width||0),l=Math.max(s.height+2*r.labelPaddingY,e?.height||0),h=-n/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if(r?.rx&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=Su.svg(a),r=Ch(e,{}),i=u||p?t.path(zu(h,c,n,l,u||0),r):t.rectangle(h,c,n,l,r);d=a.insert(()=>i,":first-child"),d.attr("class","basic label-container").attr("style",hh(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",hh(u)).attr("ry",hh(p)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return Lu(e,d),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return op.rect(e,t)},a}async function Np(t,e){const{shapeSvg:r,bbox:i,label:o}=await vu(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Lu(e,a),e.intersect=function(t){return op.rect(e,t)},r}async function jp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-3*h/6,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=hp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}async function Hp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=hp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}function Yp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),l=[{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}],h=Su.svg(o),c=Ch(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=Mu(l),u=h.path(d,c),p=o.insert(()=>u,":first-child");return p.attr("class","outer-path"),a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-n})`),Lu(e,p),e.intersect=function(t){ut.info("lightningBolt intersect",e,t);return op.polygon(e,l,t)},o}ht(Ep,"hexagon"),ht(qp,"hourglass"),ht(Ip,"icon"),ht(Op,"iconCircle"),ht(Dp,"iconRounded"),ht(zp,"iconSquare"),ht(Pp,"imageSquare"),ht(Wp,"inv_trapezoid"),ht(Rp,"drawRect"),ht(Np,"labelRect"),ht(jp,"lean_left"),ht(Hp,"lean_right"),ht(Yp,"lightningBolt");var Up=ht((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Vp=ht((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Xp=ht((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Gp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-a,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-s-3*r,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e?.width?e?.width:l.width)+2*a,d=c/2,u=d/(2.5+c/50),p=(e?.height?e?.height:l.height)+u+2*s,g=.1*p;let f;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Vp(0,0,c,p,d,u,g),i=Xp(0,u,c,p,d,u),o=Ch(e,{}),a=t.path(r,o),s=t.path(i,o);n.insert(()=>s,":first-child").attr("class","line"),f=n.insert(()=>a,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const t=Up(0,0,c,p,d,u,g);f=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",hh(y)).attr("style",i)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),Lu(e,f),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+u-(l.y-(l.top??0))})`),e.intersect=function(t){const r=op.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},n}async function Zp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e?.width?e?.width:l.width)+2*(a??0),d=(e?.height?e?.height:l.height)+2*(s??0),u="neo"===e.look?d/4:d/8,p=d+u,{cssStyles:g}=e,f=Su.svg(n),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-c/2-c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:p/2},...Au(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2},{x:-c/2,y:-p/2},{x:-c/2,y:p/2*1.1},{x:-c/2,y:-p/2}],C=f.polygon(m.map(t=>[t.x,t.y]),y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(e.padding??0)-u/2-(l.y-(l.top??0))})`),Lu(e,x),e.intersect=function(t){return op.polygon(e,m,t)},n}async function Qp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,n="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*n,10),e.height=Math.max((e?.height??0)-2*s-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await vu(t,e,Fu(e)),d=(e?.width?e?.width:h.width)+2*a+2*n-2*n,u=(e?.height?e?.height:h.height)+2*s+2*n-2*n,p=-d/2,g=-u/2,{cssStyles:f}=e,y=Su.svg(l),m=Ch(e,{}),C=[{x:p-n,y:g+n},{x:p-n,y:g+u+n},{x:p+d-n,y:g+u+n},{x:p+d-n,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g+u-n},{x:p+d+n,y:g+u-n},{x:p+d+n,y:g-n},{x:p+n,y:g-n},{x:p+n,y:g},{x:p,y:g},{x:p,y:g+n}],x=[{x:p,y:g+n},{x:p+d-n,y:g+n},{x:p+d-n,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g},{x:p,y:g}];"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=Mu(C);let b=y.path(k,m);const w=Mu(x);let T=y.path(w,m);"handDrawn"!==e.look&&(b=Eu(b),T=Eu(T));const B=l.insert("g",":first-child");return B.insert(()=>b),B.insert(()=>T),B.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),c.attr("transform",`translate(${-h.width/2-n-(h.x-(h.left??0))}, ${-h.height/2+n-(h.y-(h.top??0))})`),Lu(e,B),e.intersect=function(t){return op.polygon(e,C,t)},l}async function Jp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n=e.padding??0,l="neo"===e.look?16:n,h="neo"===e.look?12:n;let c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*l,e.height=(e?.height??0)-3*h);const d=Math.max(a.width,e?.width??0)+2*l,u=Math.max(a.height,e?.height??0)+3*h,p="neo"===e.look?u/4:u/8,g=u+(c?p/2:-p/2),f=-d/2,y=-g/2,m=10,{cssStyles:C}=e,x=Au(f-m,y+g+m,f+d-m,y+g+m,p,.8),k=x?.[x.length-1],b=[{x:f-m,y:y+m},{x:f-m,y:y+g+m},...x,{x:f+d-m,y:k.y-m},{x:f+d,y:k.y-m},{x:f+d,y:k.y-20},{x:f+d+m,y:k.y-20},{x:f+d+m,y:y-m},{x:f+m,y:y-m},{x:f+m,y:y},{x:f,y:y},{x:f,y:y+m}],w=[{x:f,y:y+m},{x:f+d-m,y:y+m},{x:f+d-m,y:k.y-m},{x:f+d,y:k.y-m},{x:f+d,y:y},{x:f,y:y}],T=Su.svg(o),B=Ch(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const S=Mu(b),v=T.path(S,B),_=Mu(w),L=T.path(_,B),F=o.insert(()=>v,":first-child");return F.insert(()=>L),F.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-a.width/2-m-(a.x-(a.left??0))}, ${-a.height/2+m-p/2-(a.y-(a.top??0))})`),Lu(e,F),e.intersect=function(t){return op.polygon(e,b,t)},o}async function Kp(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;e.useHtmlLabels||Xe(Pe())||(e.centerLabel=!0);const{shapeSvg:a,bbox:s,label:n}=await vu(t,e,Fu(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),h=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-l/2,d=-h/2,{cssStyles:u}=e,p=Su.svg(a),g=Ch(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(c,d,l,h,g),y=a.insert(()=>f,":first-child");return y.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),n.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),Lu(e,y),e.intersect=function(t){return op.rect(e,t)},a}ht(Gp,"linedCylinder"),ht(Zp,"linedWaveEdgedRect"),ht(Qp,"multiRect"),ht(Jp,"multiWaveEdgedRectangle"),ht(Kp,"note");var tg=ht((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function eg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await vu(t,e,Fu(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=Su.svg(o),r=Ch(e,{}),i=tg(0,0,s),a=t.path(i,r);l=o.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),h&&l.attr("style",h)}else l=hp(o,s,s,n),l.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&l.attr("style",i),Lu(e,l),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=op.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},o}async function rg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?21:o??0,s="neo"===e.look?12:o??0,{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=-((e?.width??l.width)+("neo"===e.look?2*a:a))/2,d=-((e?.height??l.height)+("neo"===e.look?2*s:s))/2,u=d/2,p=[{x:c+u,y:d},{x:c,y:0},{x:c+u,y:-d},{x:-c,y:-d},{x:-c,y:d}],{cssStyles:g}=e,f=Su.svg(n),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Mu(p),C=f.path(m,y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-u/2},0)`),h.attr("transform",`translate(${-u/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),Lu(e,x),e.intersect=function(t){return op.polygon(e,p,t)},n}async function ig(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);let o;e.labelStyle=r,o=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),s=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=e.description,h=e.label,c=await Du(n,h,e.labelStyle,!0,!0);let d={width:0,height:0};if(Xe(jr())){const t=c.children[0],e=mo(c);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}ut.info("Text 2",l);const u=l||[],p=c.getBBox(),g=await Du(n,Array.isArray(u)?u.join("<br/>"):u,e.labelStyle,!0,!0),f=g.children[0],y=mo(g);d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const m=(e.padding||0)/2;mo(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+m+5)+")"),mo(c).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-m+3)+")");const C=d.width+(e.padding||0),x=d.height+(e.padding||0),k=-d.width/2-m,b=-d.height/2-m;let w,T;if("handDrawn"===e.look){const t=Su.svg(a),r=Ch(e,{}),i=t.path(zu(k,b,C,x,e.rx||0),r),o=t.line(-d.width/2-m,-d.height/2-m+p.height+m,d.width/2+m,-d.height/2-m+p.height+m,r);T=a.insert(()=>(ut.debug("Rough node insert CXC",i),o),":first-child"),w=a.insert(()=>(ut.debug("Rough node insert CXC",i),i),":first-child")}else w=s.insert("rect",":first-child"),T=s.insert("line"),w.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-m).attr("y",-d.height/2-m).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),T.attr("class","divider").attr("x1",-d.width/2-m).attr("x2",d.width/2+m).attr("y1",-d.height/2-m+p.height+m).attr("y2",-d.height/2-m+p.height+m);return Lu(e,w),e.intersect=function(t){return op.rect(e,t)},a}async function og(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return Rp(t,e,{rx:i,ry:i,labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}ht(eg,"question"),ht(rg,"rect_left_inv_arrow"),ht(ig,"rectWithTitle"),ht(og,"roundedRect");async function ag(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0,{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e?.width??n.width)+2*o+("neo"===e.look?8:16),c=(e?.height??n.height)+2*a,d=h-8,u=c,p=8-h/2,g=-c/2,{cssStyles:f}=e,y=Su.svg(s),m=Ch(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:g},{x:p+d,y:g},{x:p+d,y:g+u},{x:p-8,y:g+u},{x:p-8,y:g},{x:p,y:g},{x:p,y:g+u}],x=y.polygon(C.map(t=>[t.x,t.y]),m),k=s.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path").attr("style",hh(f)),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),f&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${4-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Lu(e,k),e.intersect=function(t){return op.rect(e,t)},s}async function sg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e?.width?e?.width:l.width)+2*a,d=1.5*((e?.height?e?.height:l.height)+2*s)/1.5,u=-c/2,p=-d/2,{cssStyles:g}=e,f=Su.svg(n),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p},{x:u,y:p+d},{x:u+c,y:p+d},{x:u+c,y:p-d/2}],C=Mu(m),x=f.path(C,y),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-c/2+(e.padding??0)-(l.x-(l.left??0))}, ${-d/4+(e.padding??0)-(l.y-(l.top??0))})`),Lu(e,k),e.intersect=function(t){return op.polygon(e,m,t)},n}async function ng(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return Rp(t,e,{rx:0,ry:0,labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function lg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?20:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=l.height+("neo"===e.look?2*s:s),c=l.width+h/4+("neo"===e.look?2*a:a),d=h/2,{cssStyles:u}=e,p=Su.svg(n),g=Ch(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...$u(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...$u(c/2-d,0,d,50,270,450)],y=Mu(f),m=p.path(y,g),C=n.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),Lu(e,C),e.intersect=function(t){return op.polygon(e,f,t)},n}async function hg(t,e){return Rp(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5})}function cg(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:s,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const c=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),d=Su.svg(c),u=Ch(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const p=d.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),g=n??l,f=5*(e.width??0)/14,y=d.circle(0,0,f,{...u,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>p,":first-child");if(m.insert(()=>y),"handDrawn"!==e.look&&m.attr("class","outer-path"),a&&m.selectAll("path").attr("style",a),o&&m.selectAll("path").attr("style",o),e.width<25&&h&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";m.attr("style",`filter:url(#${r})`)}return Lu(e,m),e.intersect=function(t){return op.circle(e,(e.width??0)/2,t)},c}function dg(t,e,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=Su.svg(a).circle(0,0,e.width,ph(i));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return Lu(e,s),e.intersect=function(t){return op.circle(e,(e.width??7)/2,t)},a}ht(ag,"shadedProcess"),ht(sg,"slopedRect"),ht(ng,"squareRect"),ht(lg,"stadium"),ht(hg,"state"),ht(cg,"stateEnd"),ht(dg,"stateStart");async function ug(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e?.padding??8,a="neo"===e.look?28:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width??l.width)+16+a,c=(e?.height??l.height)+s,d=h-16,u=c,p=-h/2,g=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=t.rectangle(p,g,d+16,u,r),o=t.line(p+8,g,p+8,g+u,r),a=t.line(p+8+d,g,p+8+d,g+u,r);n.insert(()=>o,":first-child"),n.insert(()=>a,":first-child");const s=n.insert(()=>i,":first-child"),{cssStyles:l}=e;s.attr("class","basic label-container").attr("style",hh(l)),Lu(e,s)}else{const t=hp(n,d,u,f);i&&t.attr("style",i),Lu(e,t)}return e.intersect=function(t){return op.polygon(e,f,t)},n}ht(ug,"subroutine");async function pg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height?e?.height:l.height)+2*s,c=.2*h,d=.2*h,u=(e?.width?e?.width:l.width)+2*a+c-c,p=h,g=-u/2,f=-p/2,{cssStyles:y}=e,m=Su.svg(n),C=Ch(e,{}),x=[{x:g-c/2,y:f},{x:g+u+c/2,y:f},{x:g+u+c/2,y:f+p},{x:g-c/2,y:f+p}],k=[{x:g+u-c/2,y:f+p},{x:g+u+c/2,y:f+p},{x:g+u+c/2,y:f+p-d}];"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=Mu(x),w=m.path(b,C),T=Mu(k),B=m.path(T,{...C,fillStyle:"solid"}),S=n.insert(()=>B,":first-child");return S.insert(()=>w,":first-child"),S.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),Lu(e,S),e.intersect=function(t){return op.polygon(e,x,t)},n}async function gg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),h=l/8,c=.2*n,d=.2*l,u=l+h,{cssStyles:p}=e,g=Su.svg(o),f=Ch(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:u/2},...Au(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,h,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],m=-n/2+n/2*.1,C=-u/2-.4*d,x=[{x:m+n-c,y:1.3*(C+l)},{x:m+n,y:C+l-d},{x:m+n,y:.9*(C+l)},...Au(m+n,1.25*(C+l),m+n-c,1.3*(C+l),.02*-l,.5)],k=Mu(y),b=g.path(k,f),w=Mu(x),T=g.path(w,{...f,fillStyle:"solid"}),B=o.insert(()=>T,":first-child");return B.insert(()=>b,":first-child"),B.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Lu(e,B),e.intersect=function(t){return op.polygon(e,y,t)},o}async function fg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await vu(t,e,Fu(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),l=-s/2,h=-n/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",s).attr("height",n),Lu(e,c),e.intersect=function(t){return op.rect(e,t)},o}ht(pg,"taggedRect"),ht(gg,"taggedWaveEdgedRectangle"),ht(fg,"text");var yg=ht((t,e,r,i,o,a)=>`M${t},${e}\n a${o},${a} 0,0,1 0,${-i}\n l${r},0\n a${o},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),mg=ht((t,e,r,i,o,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Cg=ht((t,e,r,i,o,a)=>[`M${t+r/2},${-i/2}`,`a${o},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function xg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?12:o/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-a,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-a-3*r,e.width<10&&(e.width=10)}const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e.height?e.height:n.height)+a,c=h/2,d=c/(2.5+h/50),u=(e.width?e.width:n.width)+d+a,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=Su.svg(s),r=mg(0,0,u,h,d,c),i=Cg(0,0,u,h,d,c),o=t.path(r,Ch(e,{})),a=t.path(i,Ch(e,{fill:"none"}));g=s.insert(()=>a,":first-child"),g=s.insert(()=>o,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=yg(0,0,u,h,d,c);g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",hh(p)).attr("style",i),g.attr("class","basic label-container outer-path"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),l.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Lu(e,g),e.intersect=function(t){const r=op.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let o=d*d*(1-i*i/(c*c));0!=o&&(o=Math.sqrt(Math.abs(o))),o=d-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},s}async function kg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=(e.look,o),s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=hp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}async function bg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+2*s,{cssStyles:d}=e,u=Su.svg(n),p=Ch(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-h/2*.8,y:-c/2},{x:h/2*.8,y:-c/2},{x:h/2,y:-c/2*.6},{x:h/2,y:c/2},{x:-h/2,y:c/2},{x:-h/2,y:-c/2*.6}],f=Mu(g),y=u.path(f,p),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),Lu(e,m),e.intersect=function(t){return op.polygon(e,g,t)},n}ht(xg,"tiltedCylinder"),ht(kg,"trapezoid"),ht(bg,"trapezoidalPentagon");async function wg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=Fe(jr().flowchart?.htmlLabels),c=(e?.width?e?.width:n.width)+a,d=e?.height?e?.height:c+n.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-d}],{cssStyles:p}=e,g=Su.svg(s),f=Ch(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=Mu(u),m=g.path(y,f),C=s.insert(()=>m,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",p),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),e.width=c,e.height=d,Lu(e,C),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(e.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return ut.info("Triangle intersect",e,u,t),op.polygon(e,u,t)},s}async function Tg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;let n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:l,bbox:h,label:c}=await vu(t,e,Fu(e)),d=(e?.width?e?.width:h.width)+2*(a??0),u=(e?.height?e?.height:h.height)+2*(s??0),p="neo"===e.look?u/4:u/8,g=u+(n?p:-p),{cssStyles:f}=e,y=14-d,m=y>0?y/2:0,C=Su.svg(l),x=Ch(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=[{x:-d/2-m,y:g/2},...Au(-d/2-m,g/2,d/2+m,g/2,p,.8),{x:d/2+m,y:-g/2},{x:-d/2-m,y:-g/2}],b=Mu(k),w=C.path(b,x),T=l.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))},${-u/2+(e.padding??0)-p-(h.y-(h.top??0))})`),Lu(e,T),e.intersect=function(t){return op.polygon(e,k,t)},l}async function Bg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?20:o;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+s,d=c/8,u=c+2*d,{cssStyles:p}=e,g=Su.svg(n),f=Ch(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...Au(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...Au(h/2,-u/2,-h/2,-u/2,d,-1)],m=Mu(y),C=g.path(m,f),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),Lu(e,x),e.intersect=function(t){return op.polygon(e,y,t)},n}ht(wg,"triangle"),ht(Tg,"waveEdgedRectangle"),ht(Bg,"waveRectangle");var Sg=10;async function vg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-Sg,10),e.height=Math.max((e?.height??0)-2*a-Sg,10));const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:n.width)+2*o+Sg,c=(e?.height?e?.height:n.height)+2*a+Sg,d=h-Sg,u=c-Sg,p=-d/2,g=-u/2,{cssStyles:f}=e,y=Su.svg(s),m=Ch(e,{}),C=[{x:p-Sg,y:g-Sg},{x:p-Sg,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g-Sg}],x=`M${p-Sg},${g-Sg} L${p+d},${g-Sg} L${p+d},${g+u} L${p-Sg},${g+u} L${p-Sg},${g-Sg}\n M${p-Sg},${g} L${p+d},${g}\n M${p},${g-Sg} L${p},${g+u}`;"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=y.path(x,m),b=s.insert(()=>k,":first-child");return b.attr("transform","translate(5, 5)"),b.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${-n.width/2+5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),Lu(e,b),e.intersect=function(t){return op.polygon(e,C,t)},s}ht(vg,"windowPane");var _g=new Set(["redux-color","redux-dark-color"]),Lg=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fg(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:o}=Pe(),{rowEven:a,rowOdd:s,nodeBorder:n,borderColorArray:l}=o;if("handDrawn"===e.look){const{themeVariables:r}=Pe(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await Fg(t,o)}const h=Pe();e.useHtmlLabels=h.htmlLabels;let c=h.er?.diagramPadding??10,d=h.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:p,nodeStyles:g}=mh(e);if(0===r.attributes.length&&e.label){const o={rx:0,ry:0,labelPaddingX:c,labelPaddingY:1.5*c};Zl(e.label,h)+2*o.labelPaddingX<h.er.minEntityWidth&&(e.width=h.er.minEntityWidth);const a=await Rp(t,e,o);if(null!=i&&_g.has(i)){const t=r.colorIndex??0;a.attr("data-color-id","color-"+t%l.length)}if(!Fe(h.htmlLabels)){const t=a.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return a}h.htmlLabels||(c*=1.25,d*=1.25);let f=Fu(e);f||(f="node default");const y=t.insert("g").attr("class",f).attr("id",e.domId||e.id),m=await Mg(y,e.label??"",h,0,0,["name"],p);m.height+=d;let C=0;const x=[],k=[];let b=0,w=0,T=0,B=0,S=!0,v=!0;for(const t of r.attributes){const e=await Mg(y,t.type,h,0,C,["attribute-type"],p);b=Math.max(b,e.width+c);const r=await Mg(y,t.name,h,0,C,["attribute-name"],p);w=Math.max(w,r.width+c);const i=await Mg(y,t.keys.join(),h,0,C,["attribute-keys"],p);T=Math.max(T,i.width+c);const o=await Mg(y,t.comment,h,0,C,["attribute-comment"],p);B=Math.max(B,o.width+c);const a=Math.max(e.height,r.height,i.height,o.height)+d;k.push({yOffset:C,rowHeight:a}),C+=a}let _=4;T<=c&&(S=!1,T=0,_--),B<=c&&(v=!1,B=0,_--);const L=y.node().getBBox();if(m.width+2*c-(b+w+T+B)>0){const t=m.width+2*c-(b+w+T+B);b+=t/_,w+=t/_,T>0&&(T+=t/_),B>0&&(B+=t/_)}const F=b+w+T+B,M=Su.svg(y),A=Ch(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let $=0;k.length>0&&($=k.reduce((t,e)=>t+(e?.rowHeight??0),0));const E=Math.max(L.width+2*c,e?.width||0,F),q=Math.max(($??0)+m.height,e?.height||0),I=-E/2,O=-q/2;if(y.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=mo(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=b:i.attr("class").includes("attribute-keys")?a+=b+w:i.attr("class").includes("attribute-comment")&&(a+=b+w+T))}i.attr("transform",`translate(${I+c/2+a}, ${s+O+m.height+d/2})`)}),y.select(".name").attr("transform","translate("+-m.width/2+", "+(O+d/2)+")"),null!=i&&_g.has(i)){const t=r.colorIndex??0;y.attr("data-color-id","color-"+t%l.length)}const D=M.rectangle(I,O,E,q,A),z=y.insert(()=>D,":first-child").attr("class","outer-path").attr("style",u.join(""));x.push(0);for(const[t,e]of k.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=M.rectangle(I,m.height+O+e?.yOffset,E,e?.rowHeight,{...A,fill:r?a:s,stroke:n});y.insert(()=>i,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const P=1e-4;let W=Ag(I,m.height+O,E+I,m.height+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A);if(y.insert(()=>R).attr("class","divider"),W=Ag(b+I,m.height+O,b+I,q+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider"),S){const t=b+w+I;W=Ag(t,m.height+O,t,q+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}if(v){const t=b+w+T+I;W=Ag(t,m.height+O,t,q+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}for(const t of x){const e=m.height+O+t;W=Ag(I,e,E+I,e,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}if(Lu(e,z),g&&"handDrawn"!==e.look)if(null!=i&&Lg.has(i))y.selectAll("path").attr("style",g);else{const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return op.rect(e,t)},y}async function Mg(t,e,r,i=0,o=0,a=[],s=""){const n=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",s);e!==cr(e)&&(e=(e=cr(e)).replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Td(n,e,{width:Zl(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=l.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Fe(r.htmlLabels)){const t=l.children[0];t.style.textAlign="start";const e=mo(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return h}function Ag(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function $g(t,e,r,i,o=r.class.padding??12){const a=i?0:3,s=t.insert("g").attr("class",Fu(e)).attr("id",e.domId||e.id);let n=null,l=null,h=null,c=null,d=0,u=0,p=0;if(n=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await Eg(n,{text:`«${t}»`},0);d=n.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Eg(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=s.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await Eg(h,t,f,[t.parseClassifier()])+a}p=h.node().getBBox().height,p<=0&&(p=o/2),c=s.insert("g").attr("class","methods-group text");let y=0;for(const t of e.methods){y+=await Eg(c,t,y,[t.parseClassifier()])+a}let m=s.node().getBBox();if(null!==n){const t=n.node().getBBox();n.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}async function Eg(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=Pe();let s="useHtmlLabels"in e?e.useHtmlLabels:Fe(a.htmlLabels)??!0,n="";n="text"in e?e.text:e.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),yr(n)&&(s=!0);const l=await Td(o,Ur(nh(n)),{width:Zl(n,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let h,c=1;if(s){const t=l.children[0],e=mo(l);c=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(c+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===n.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}ht(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{i.includes("font-weight: bolder")&&mo(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const t=l.children[0];if(""===l.textContent||l.textContent.includes(">")){t.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===n[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=l.getBBox()}return o.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}async function qg(t,e){const r=jr(),{themeVariables:i}=r,{useGradient:o}=i,a=r.class.padding??12,s=a,n=e.useHtmlLabels??Fe(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await $g(t,e,r,n,s),{labelStyles:d,nodeStyles:u}=mh(e);e.labelStyle=d,e.cssStyles=l.styles||"";const p=l.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=p.replaceAll("!important","").split(";"));const g=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,f=Su.svg(h),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Math.max(e.width??0,c.width);let C=Math.max(e.height??0,c.height);const x=(e.height??0)>c.height;0===l.members.length&&0===l.methods.length?C+=s:l.members.length>0&&0===l.methods.length&&(C+=2*s);const k=-m/2,b=-C/2;let w=g?2*a:0===l.members.length&&0===l.methods.length?-a:0;x&&(w=2*a);const T=f.rectangle(k-a,b-a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0),m+2*a,C+2*a+w,y),B=h.insert(()=>T,":first-child");B.attr("class","basic label-container outer-path");const S=B.node().getBBox(),v=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,_=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,L=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,F=(v+_+b+a-(b-a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0)))/2;if(h.selectAll(".text").each((t,e,i)=>{const o=mo(i[e]),c=o.attr("transform");let d=0;if(c){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);t&&(d=parseFloat(t[2]))}let u=d+b+a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max(L,s/2);u=x?Math.max(F,v+_+t+b+2*s+a)+2*s:v+_+t+b+4*s+a}0===l.members.length&&0===l.methods.length&&r.class?.hideEmptyMembersBox&&(u=l.annotations.length>0?d-s:d),n||(u-=4);let p=k;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(p=-o.node()?.getBBox().width/2||0,h.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),o.attr("transform",`translate(${p}, ${u})`)}),l.members.length>0||l.methods.length>0||g){const t=v+_+b+a,r=f.line(S.x,t,S.x+S.width,t+.001,y);h.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",p)}if(g||l.members.length>0||l.methods.length>0){const t=v+_+L+b+2*s+a,r=f.line(S.x,x?Math.max(F,t):t,S.x+S.width,(x?Math.max(F,t):t)+.001,y);h.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",p)}if("handDrawn"!==l.look&&h.selectAll("path").attr("style",p),B.select(":nth-child(2)").attr("style",p),h.selectAll(".divider").select("path").attr("style",p),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",p),!n){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(p);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}else if(d){const e=t.exec(d);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}}}return Lu(e,B),e.intersect=function(t){return op.rect(e,t)},h}async function Ig(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e,a=e,s="verifyMethod"in e,n=Fu(e),{themeVariables:l}=jr(),{borderColorArray:h,requirementEdgeLabelBackground:c}=l,d=t.insert("g").attr("class",n).attr("id",e.domId??e.id);let u;u=s?await Og(d,`<<${o.type}>>`,0,e.labelStyle):await Og(d,"<<Element>>",0,e.labelStyle);let p=u;const g=await Og(d,o.name,p,e.labelStyle+"; font-weight: bold;");if(p+=g+20,s){p+=await Og(d,""+(o.requirementId?`ID: ${o.requirementId}`:""),p,e.labelStyle);p+=await Og(d,""+(o.text?`Text: ${o.text}`:""),p,e.labelStyle);p+=await Og(d,""+(o.risk?`Risk: ${o.risk}`:""),p,e.labelStyle),await Og(d,""+(o.verifyMethod?`Verification: ${o.verifyMethod}`:""),p,e.labelStyle)}else{p+=await Og(d,""+(a.type?`Type: ${a.type}`:""),p,e.labelStyle),await Og(d,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),p,e.labelStyle)}const f=(d.node()?.getBBox().width??200)+20,y=(d.node()?.getBBox().height??200)+20,m=-f/2,C=-y/2,x=Su.svg(d),k=Ch(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const b=x.rectangle(m,C,f,y,k),w=d.insert(()=>b,":first-child");if(w.attr("class","basic label-container outer-path").attr("style",i),h?.length){const t=e.colorIndex??0;d.attr("data-color-id","color-"+t%h.length)}if(d.selectAll(".label").each((t,e,r)=>{const i=mo(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const n=s-y/2;let l=m+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${n+20})`)}),p>u+g+20){const t=C+u+g+20;let r;if("neo"===e.look){const e=.001,i=[[m,t],[m+f,t],[m+f,t+e],[m,t+e]];r=x.polygon(i,k)}else r=x.line(m,t,m+f,t,k);d.insert(()=>r).attr("class","divider")}return Lu(e,w),e.intersect=function(t){return op.rect(e,t)},i&&"handDrawn"!==e.look&&(c||h?.length)&&d.selectAll("path").attr("style",i),d}async function Og(t,e,r,i=""){if(""===e)return 0;const o=t.insert("g").attr("class","label").attr("style",i),a=jr(),s=a.htmlLabels??!0,n=await Td(o,Ur(nh(e)),{width:Zl(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const t=n.children[0],e=mo(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}else{const t=n.children[0];for(const e of t.children)i&&e.setAttribute("style",i);l=n.getBBox(),l.height+=6}return o.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}ht(Fg,"erBox"),ht(Mg,"addText"),ht(Ag,"lineToPolygon"),ht($g,"textHelper"),ht(Eg,"addText"),ht(qg,"classBox"),ht(Ig,"requirementBox"),ht(Og,"addText");var Dg=ht(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function zg(t,e,{config:r}){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=e.padding||10;let c,d="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),c=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,g;({label:p,bbox:g}=c?await _u(c,"ticket"in e&&e.ticket||"",u):await _u(s,"ticket"in e&&e.ticket||"",u));const{label:f,bbox:y}=await _u(s,"assigned"in e&&e.assigned||"",u);e.width=a;const m=e?.width||0,C=Math.max(g.height,y.height)/2,x=Math.max(n.height+20,e?.height||0)+C,k=-m/2,b=-x/2;let w;l.attr("transform","translate("+(h-m/2)+", "+(-C-n.height/2)+")"),p.attr("transform","translate("+(h-m/2)+", "+(-C+n.height/2)+")"),f.attr("transform","translate("+(h+m/2-y.width-20)+", "+(-C+n.height/2)+")");const{rx:T,ry:B}=e,{cssStyles:S}=e;if("handDrawn"===e.look){const t=Su.svg(s),r=Ch(e,{}),i=T||B?t.path(zu(k,b,m,x,T||0),r):t.rectangle(k,b,m,x,r);w=s.insert(()=>i,":first-child"),w.attr("class","basic label-container").attr("style",S||null)}else{w=s.insert("rect",":first-child"),w.attr("class","basic label-container __APA__").attr("style",o).attr("rx",T??5).attr("ry",B??5).attr("x",k).attr("y",b).attr("width",m).attr("height",x);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=k+2,i=b+Math.floor((T??0)/2),o=b+x-Math.floor((T??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",Dg(t))}}return Lu(e,w),e.height=x,e.intersect=function(t){return op.rect(e,t)},s}async function Pg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await vu(t,e,Fu(e)),l=a.width+10*s,h=a.height+8*s,c=.15*l,{cssStyles:d}=e,u=a.width+20,p=a.height+20,g=Math.max(l,u),f=Math.max(h,p);let y;n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);const m=`M0 0 \n a${c},${c} 1 0,0 ${.25*g},${-1*f*.1}\n a${c},${c} 1 0,0 ${.25*g},0\n a${c},${c} 1 0,0 ${.25*g},0\n a${c},${c} 1 0,0 ${.25*g},${.1*f}\n\n a${c},${c} 1 0,0 ${.15*g},${.33*f}\n a${.8*c},${.8*c} 1 0,0 0,${.34*f}\n a${c},${c} 1 0,0 ${-1*g*.15},${.33*f}\n\n a${c},${c} 1 0,0 ${-1*g*.25},${.15*f}\n a${c},${c} 1 0,0 ${-1*g*.25},0\n a${c},${c} 1 0,0 ${-1*g*.25},0\n a${c},${c} 1 0,0 ${-1*g*.25},${-1*f*.15}\n\n a${c},${c} 1 0,0 ${-1*g*.1},${-1*f*.33}\n a${.8*c},${.8*c} 1 0,0 0,${-1*f*.34}\n a${c},${c} 1 0,0 ${.1*g},${-1*f*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=Su.svg(o),r=Ch(e,{}),i=t.path(m,r);y=o.insert(()=>i,":first-child"),y.attr("class","basic label-container").attr("style",hh(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return y.attr("transform",`translate(${-g/2}, ${-f/2})`),Lu(e,y),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return ut.info("Bang intersect",e,t),op.rect(e,t)},o}async function Wg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await vu(t,e,Fu(e)),l=a.width+2*s,h=a.height+2*s,c=.15*l,d=.25*l,u=.35*l,p=.2*l,{cssStyles:g}=e;let f;const y=`M0 0 \n a${c},${c} 0 0,1 ${.25*l},${-1*l*.1}\n a${u},${u} 1 0,1 ${.4*l},${-1*l*.1}\n a${d},${d} 1 0,1 ${.35*l},${.2*l}\n\n a${c},${c} 1 0,1 ${.15*l},${.35*h}\n a${p},${p} 1 0,1 ${-1*l*.15},${.65*h}\n\n a${d},${c} 1 0,1 ${-1*l*.25},${.15*l}\n a${u},${u} 1 0,1 ${-1*l*.5},0\n a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}\n\n a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}\n a${p},${p} 1 0,1 ${.1*l},${-1*h*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=Su.svg(o),r=Ch(e,{}),i=t.path(y,r);f=o.insert(()=>i,":first-child"),f.attr("class","basic label-container").attr("style",hh(g))}else f=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),Lu(e,f),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return ut.info("Cloud intersect",e,t),op.rect(e,t)},o}async function Rg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await vu(t,e,Fu(e)),l=a.width+8*s,h=a.height+2*s,c="neo"===e.look?`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-5}\n H${-l/2}\n Z\n `:`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${-(l-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",c);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),Lu(e,d),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return op.rect(e,t)},o}async function Ng(t,e){return up(t,e,{padding:e.padding??0})}ht(zg,"kanbanItem"),ht(Pg,"bang"),ht(Wg,"cloud"),ht(Rg,"defaultMindmapNode"),ht(Ng,"mindmapCircle");var jg=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ng},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:og},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:lg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ug},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Sp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:up},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Pg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Wg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:eg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ep},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Hp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:jp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:kg},{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:Wp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_p},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:fg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:cp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ag},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:dg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:cg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Mp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:qp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:yp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Cp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:kp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Yp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Tg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ap},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:xg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Gp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:bp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:vp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:wg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:vg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Lp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:bg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:sg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Jp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Qp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:lp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:gp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:gg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:pg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Bg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:rg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Zp}],Hg=ht(()=>{const t={state:hg,choice:dp,note:Kp,rectWithTitle:ig,labelRect:Np,iconSquare:zp,iconCircle:Op,icon:Ip,iconRounded:Dp,imageSquare:Pp,anchor:ap,kanbanItem:zg,mindmapCircle:Ng,defaultMindmapNode:Rg,classBox:qg,erBox:Fg,requirementBox:Ig},e=[...Object.entries(t),...jg.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Yg(t){return t in Hg}ht(Yg,"isValidShape");var Ug=new Map;async function Vg(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Hg[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),o=await a(i,e,r)}else o=await a(t,e,r),i=o;return i.attr("data-look",hh(e.look)),e.tooltip&&o.attr("title",e.tooltip),Ug.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}ht(Vg,"insertNode");var Xg=ht((t,e)=>{Ug.set(e.id,t)},"setNodeElem"),Gg=ht(()=>{Ug.clear()},"clear"),Zg=ht(t=>{const e=Ug.get(t.id);ut.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode"),Qg=ht((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&tf(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&tf(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"addEdgeMarkers"),Jg={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Kg=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],tf=ht((t,e,r,i,o,a,s=!1,n)=>{const l=Jg[r],h=l&&Kg.includes(l.type);if(!l)return void ut.warn(`Unknown arrow type: ${r}`);const c=`${o}_${a}-${l.type}${"start"===e?"Start":"End"}${s&&h?"-margin":""}`;if(n&&""!==n.trim()){const r=`${c}_${n.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(c);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",n),l.fill&&t.setAttribute("fill",n)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${c})`)},"addEdgeMarker"),ef=ht(t=>"string"==typeof t?t:jr()?.flowchart?.curve,"resolveEdgeCurveType"),rf=new Map,of=new Map,af=ht(()=>{rf.clear(),of.clear()},"clear"),sf=ht(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),nf=ht(async(t,e)=>{const r=jr();let i=Xe(r);const{labelStyles:o}=mh(e);e.labelStyle=o;const a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",e.id),n="markdown"===e.labelType,l=await Td(t,e.label,{style:sf(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:void 0},r);s.node().appendChild(l),ut.info("abc82",e,e.labelType);let h,c=l.getBBox(),d=c;if(i){const t=l.children[0],e=mo(l);c=t.getBoundingClientRect(),d=c,e.attr("width",c.width),e.attr("height",c.height)}else{const t=mo(l).select("text").node();t&&"function"==typeof t.getBBox&&(d=t.getBBox())}if(s.attr("transform",ul(d,i)),rf.set(e.id,a),e.width=c.width,e.height=c.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.startLabelLeft,sf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),of.get(e.id)||of.set(e.id,{}),of.get(e.id).startLeft=r,lf(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.startLabelRight,sf(e.labelStyle)||"",!1,!1);h=a,o.node().appendChild(a);let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),of.get(e.id)||of.set(e.id,{}),of.get(e.id).startRight=r,lf(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.endLabelLeft,sf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),r.node().appendChild(a),of.get(e.id)||of.set(e.id,{}),of.get(e.id).endLeft=r,lf(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.endLabelRight,sf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),r.node().appendChild(a),of.get(e.id)||of.set(e.id,{}),of.get(e.id).endRight=r,lf(h,e.endLabelRight)}return l},"insertEdgeLabel");function lf(t,e){Xe(jr())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}ht(lf,"setTerminalWidth");var hf=ht((t,e)=>{ut.debug("Moving label abc88 ",t.id,t.label,rf.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=jr(),{subGraphTitleTotalMargin:o}=dh(i);if(t.label){const i=rf.get(t.id);let a=t.x,s=t.y;if(r){const i=ah.calcLabelPosition(r);ut.debug("Moving label "+t.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,s=i.y)}i.attr("transform",`translate(${a}, ${s+o/2})`)}if(t.startLabelLeft){const e=of.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=of.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=of.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=of.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),cf=ht((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,n=t.height/2;return o>=s||a>=n},"outsideNode"),df=ht((t,e,r)=>{ut.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2;let n=r.x<e.x?s-a:s+a;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;n=c*t/h;const i={x:r.x<e.x?r.x+n:r.x-c+n,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===n&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),ut.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${n}`,i),i}{n=r.x<e.x?e.x-s-i:i-s-e.x;let t=h*n/c,o=r.x<e.x?r.x+c-n:r.x-c+n,a=r.y<e.y?r.y+t:r.y-t;return ut.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${n}`,{_x:o,_y:a}),0===n&&(o=e.x,a=e.y),0===c&&(o=e.x),0===h&&(a=e.y),{x:o,y:a}}},"intersection"),uf=ht((t,e)=>{ut.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(ut.info("abc88 checking point",t,e),cf(e,t)||o)ut.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=df(e,i,t);ut.debug("abc88 inside",t,i,a),ut.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?ut.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),ut.debug("returning points",r),r},"cutPathAtIntersect");function pf(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],a=t[i],s=t[i+1];(o.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5||o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}ht(pf,"extractCornerPoints");var gf=ht(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),ff=ht(function(t){const{cornerPointPositions:e}=pf(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],a=t[i],s=gf(e,a,5),n=gf(o,a,5),l=n.x-s.x,h=n.y-s.y;r.push(s);const c=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){ut.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;d=a.x===s.x?{x:l<0?s.x-t+c:s.x+t-c,y:h<0?s.y-c:s.y+c}:{x:l<0?s.x-c:s.x+c,y:h<0?s.y-t+c:s.y+t-c}}else ut.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(d,n)}else r.push(t[i]);return r},"fixCorners"),yf=ht((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4);return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),mf=ht(function(t,e,r,i,o,a,s,n=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=jr();let f=e.points,x=!1;const k=o;var T=a;const B=[];for(const t in e.cssCompiledStyles)yh(t)||B.push(e.cssCompiledStyles[t]);ut.debug("UIO intersect check",e.points,T.x,k.x),T.intersect&&k.intersect&&!n&&(f=f.slice(1,e.points.length-1),f.unshift(k.intersect(f[0])),ut.debug("Last point UIO",e.start,"--\x3e",e.end,f[f.length-1],T,T.intersect(f[f.length-1])),f.push(T.intersect(f[f.length-1])));const S=btoa(JSON.stringify(f));e.toCluster&&(ut.info("to cluster abc88",r.get(e.toCluster)),f=uf(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(ut.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(f,null,2)),f=uf(f.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let v=f.filter(t=>!Number.isNaN(t.y));const _=ef(e.curve);"rounded"!==_&&(v=ff(v));let L=y;switch(_){case"linear":case"rounded":L=y;break;case"basis":default:L=b;break;case"cardinal":L=D;break;case"bumpX":L=C;break;case"bumpY":L=m;break;case"catmullRom":L=H;break;case"monotoneX":L=g;break;case"monotoneY":L=p;break;case"natural":L=u;break;case"step":L=d;break;case"stepAfter":L=c;break;case"stepBefore":L=h}const{x:F,y:M}=xl(e),A=w().x(F).y(M).curve(L);let $,E;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let q="rounded"===_?Cf(kf(v,e),5):A(v);const I=Array.isArray(e.style)?e.style:[e.style];let O=I.find(t=>t?.startsWith("stroke:")),z="";e.animate&&(z="edge-animation-fast"),e.animation&&(z="edge-animation-"+e.animation);let P=!1;if("handDrawn"===e.look){const r=Su.svg(t);Object.assign([],v);$+=" transition",E=mo(r.path(q,{roughness:.3,seed:l})).select("path").attr("id",`${s}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",I?I.reduce((t,e)=>t+";"+e,""):"");let i=E.attr("d");E.attr("d",i),t.node().appendChild(E.node())}else{const r=B.join(";"),i=I?I.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(I?I.reduce((t,e)=>t+";"+e,""):"");E=t.append("path").attr("d",q).attr("id",`${s}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",o),O=o.match(/stroke:([^;]+)/)?.[1],P=!0===e.animate||!!e.animation||r.includes("animation");const a=E.node(),n="function"==typeof a.getTotalLength?a.getTotalLength():0,l=gl[e.arrowTypeStart]||0,h=gl[e.arrowTypeEnd]||0;if("neo"===e.look&&!P){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?yf(n,l,h):`0 ${l} ${n-l-h} ${h}`}; stroke-dashoffset: 0;`;E.attr("style",t+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",e.id),E.attr("data-points",S),E.attr("data-look",hh(e.look)),e.showPoints&&v.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let W="";(jr().flowchart.arrowMarkerAbsolute||jr().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ut.info("arrowTypeStart",e.arrowTypeStart),ut.info("arrowTypeEnd",e.arrowTypeEnd);Qg(E,e,W,s,i,!P&&"neo"===e?.look,O);const R=f[Math.floor(f.length/2)];ah.isLabelCoordinateInPath(R,E.attr("d"))||(x=!0);let N={};return x&&(N.updatedPath=f),N.originalPath=e.points,N},"insertEdge");function Cf(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let a=0;a<i;a++){const s=t[a],n=t[a-1],l=t[a+1];if(0===a)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const t=s.x-n.x,i=s.y-n.y,a=l.x-s.x,h=l.y-s.y,c=Math.hypot(t,i),d=Math.hypot(a,h);if(c<o||d<o){r+=`L${s.x},${s.y}`;continue}const u=t/c,p=i/c,g=a/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),C=Math.acos(m);if(C<o||Math.abs(Math.PI-C)<o){r+=`L${s.x},${s.y}`;continue}const x=Math.min(e/Math.sin(C/2),c/2,d/2),k=s.x-u*x,b=s.y-p*x,w=s.x+g*x,T=s.y+f*x;r+=`L${k},${b}`,r+=`Q${s.x},${s.y} ${w},${T}`}}return r}function xf(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function kf(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&pl[e.arrowTypeStart]){const i=pl[e.arrowTypeStart],o=t[0],a=t[1],{angle:s}=xf(o,a),n=i*Math.cos(s),l=i*Math.sin(s);r[0].x=o.x+n,r[0].y=o.y+l}const i=t.length;if(i>=2&&pl[e.arrowTypeEnd]){const o=pl[e.arrowTypeEnd],a=t[i-1],s=t[i-2],{angle:n}=xf(s,a),l=o*Math.cos(n),h=o*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}ht(Cf,"generateRoundedPath"),ht(xf,"calculateDeltaAndAngle"),ht(kf,"applyMarkerOffsetsToPoints");var bf=ht((t,e,r,i)=>{e.forEach(e=>{Hf[e](t,r,i)})},"insertMarkers"),wf=ht((t,e,r)=>{ut.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Tf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Bf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Sf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),vf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),_f=ht((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Lf=ht((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Ff=ht((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Mf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Af=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{transitionColor:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),$f=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Ef=ht((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),qf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),If=ht((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Of=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Df=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),zf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Pf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Wf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),Rf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Nf=ht((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");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"),jf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Hf={extension:wf,composition:Tf,aggregation:Bf,dependency:Sf,lollipop:vf,point:_f,circle:Lf,cross:Ff,barb:Mf,barbNeo:Af,only_one:$f,zero_or_one:Ef,one_or_more:qf,zero_or_more:If,only_one_neo:Of,zero_or_one_neo:Df,one_or_more_neo:zf,zero_or_more_neo:Pf,requirement_arrow:Wf,requirement_contains:Nf,requirement_arrow_neo:Rf,requirement_contains_neo:jf},Yf=bf,Uf={common:kr,getConfig:Pe,insertCluster:Uu,insertEdge:mf,insertEdgeLabel:nf,insertMarkers:Yf,insertNode:Vg,interpolateToCurve:Ml,labelHelper:vu,log:ut,positionEdgeLabel:hf},Vf={},Xf=ht(t=>{for(const e of t)Vf[e.name]=e},"registerLayoutLoaders");ht(()=>{Xf([{name:"dagre",loader:ht(async()=>await import("./dagre-KV5264BT-Ps6KiA13.js"),"loader")},{name:"cose-bilkent",loader:ht(async()=>await import("./cose-bilkent-S5V4N54A-ZsIi3T0h.js"),"loader")}])},"registerDefaultLayoutLoaders")();var Gf=ht(async(t,e)=>{if(!(t.layoutAlgorithm in Vf))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const r=Vf[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:a}=t.config,{useGradient:s,gradientStart:n,gradientStop:l}=a,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),s){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(t,e,Uf,{algorithm:r.algorithm})},"render"),Zf=ht((t="",{fallback:e="dagre"}={})=>{if(t in Vf)return t;if(e in Vf)return ut.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),Qf="comm",Jf="rule",Kf="decl",ty=Math.abs,ey=String.fromCharCode;function ry(t){return t.trim()}function iy(t,e,r){return t.replace(e,r)}function oy(t,e){return 0|t.charCodeAt(e)}function ay(t,e,r){return t.slice(e,r)}function sy(t){return t.length}function ny(t,e){return e.push(t),t}var ly=1,hy=1,cy=0,dy=0,uy=0,py="";function gy(t,e,r,i,o,a,s,n){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:ly,column:hy,length:s,return:"",siblings:n}}function fy(){return uy=dy>0?oy(py,--dy):0,hy--,10===uy&&(hy=1,ly--),uy}function yy(){return uy=dy<cy?oy(py,dy++):0,hy++,10===uy&&(hy=1,ly++),uy}function my(){return oy(py,dy)}function Cy(){return dy}function xy(t,e){return ay(py,t,e)}function ky(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function by(t){return ry(xy(dy-1,By(91===t?t+2:40===t?t+1:t)))}function wy(t){for(;(uy=my())&&uy<33;)yy();return ky(t)>2||ky(uy)>3?"":" "}function Ty(t,e){for(;--e&&yy()&&!(uy<48||uy>102||uy>57&&uy<65||uy>70&&uy<97););return xy(t,Cy()+(e<6&&32==my()&&32==yy()))}function By(t){for(;yy();)switch(uy){case t:return dy;case 34:case 39:34!==t&&39!==t&&By(uy);break;case 40:41===t&&By(t);break;case 92:yy()}return dy}function Sy(t,e){for(;yy()&&t+uy!==57&&(t+uy!==84||47!==my()););return"/*"+xy(e,dy-1)+"*"+ey(47===t?t:yy())}function vy(t){for(;!ky(my());)yy();return xy(t,dy)}function _y(t){return function(t){return py="",t}(Ly("",null,null,null,[""],t=function(t){return ly=hy=1,cy=sy(py=t),dy=0,[]}(t),0,[0],t))}function Ly(t,e,r,i,o,a,s,n,l){for(var h=0,c=0,d=s,u=0,p=0,g=0,f=1,y=1,m=1,C=0,x=0,k="",b=o,w=a,T=i,B=k;y;)switch(g=x,x=yy()){case 40:108!=g&&58==oy(B,d-1)?(C++,B+="("):B+=by(x);break;case 41:C--,B+=")";break;case 34:case 39:case 91:B+=by(x);break;case 9:case 10:case 13:case 32:if(C>0){B+=ey(x);break}B+=wy(g);break;case 92:B+=Ty(Cy()-1,7);continue;case 47:switch(my()){case 42:case 47:ny(My(Sy(yy(),Cy()),e,r,l),l),5!=ky(g||1)&&5!=ky(my()||1)||!sy(B)||" "===ay(B,-1,void 0)||(B+=" ");break;default:B+="/"}break;case 123*f:n[h++]=sy(B)*m;case 125*f:case 59:case 0:if(C>0&&x){B+=ey(x);break}switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(B=iy(B,/\f/g,"")),p>0&&(sy(B)-d||0===f)&&ny(p>32?Ay(B+";",i,r,d-1,l):Ay(iy(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(ny(T=Fy(B,e,r,h,c,o,n,k,b=[],w=[],d,a),a),123===x)if(0===c)Ly(B,e,T,T,b,a,d,n,w);else{switch(u){case 99:if(110===oy(B,3))break;case 108:if(97===oy(B,2))break;default:c=0;case 100:case 109:case 115:}c?Ly(t,T,T,i&&ny(Fy(t,T,T,0,0,o,n,k,o,b=[],d,w),w),o,w,d,n,i?b:w):Ly(B,T,T,T,[""],w,0,n,w)}}h=c=p=0,f=m=1,k=B="",d=s;break;case 58:d=1+sy(B),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==fy())continue;switch(B+=ey(x),x*f){case 38:m=c>0?1:(B+="\f",-1);break;case 44:if(C>0)break;n[h++]=(sy(B)-1)*m,m=1;break;case 64:45===my()&&(B+=by(yy())),u=my(),c=d=sy(k=B+=vy(Cy())),x++;break;case 45:45===g&&2==sy(B)&&(f=0)}}return a}function Fy(t,e,r,i,o,a,s,n,l,h,c,d){for(var u=o-1,p=0===o?a:[""],g=function(t){return t.length}(p),f=0,y=0,m=0;f<i;++f)for(var C=0,x=ay(t,u+1,u=ty(y=s[f])),k=t;C<g;++C)(k=ry(y>0?p[C]+" "+x:iy(x,/&\f/g,p[C])))&&(l[m++]=k);return gy(t,e,r,0===o?Jf:n,l,h,c,d)}function My(t,e,r,i){return gy(t,e,r,Qf,ey(uy),ay(t,2,-2),0,i)}function Ay(t,e,r,i,o){return gy(t,e,r,Kf,ay(t,0,i),ay(t,i+1,-1),i,o)}function $y(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Ey(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case Kf:return t.return=t.return||t.value;case Qf:return"";case"@keyframes":return t.return=t.value+"{"+$y(t.children,i)+"}";case Jf:if(!sy(t.value=t.props.join(",")))return""}return sy(r=$y(t.children,i))?t.return=t.value+"{"+r+"}":""}var qy={id:"c4",detector:ht(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-DN5fuFmb.js");return{id:"c4",diagram:t}},"loader")},Iy="flowchart",Oy=ht((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),Dy={id:Iy,detector:Oy,loader:ht(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-Cd5g_eEq.js");return{id:Iy,diagram:t}},"loader")},zy="flowchart-v2",Py=ht((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),Wy={id:zy,detector:Py,loader:ht(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-Cd5g_eEq.js");return{id:zy,diagram:t}},"loader")},Ry={id:"er",detector:ht(t=>/^\s*erDiagram/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-DmAtzyw1.js");return{id:"er",diagram:t}},"loader")},Ny="gitGraph",jy={id:Ny,detector:ht(t=>/^\s*gitGraph/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-XLFtNk0y.js");return{id:Ny,diagram:t}},"loader")},Hy="gantt",Yy={id:Hy,detector:ht(t=>/^\s*gantt/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-O3kXJMuu.js");return{id:Hy,diagram:t}},"loader")},Uy="info",Vy={id:Uy,detector:ht(t=>/^\s*info/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-DiPK6iLZ.js");return{id:Uy,diagram:t}},"loader")},Xy={id:"pie",detector:ht(t=>/^\s*pie/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-CJQonP9T.js");return{id:"pie",diagram:t}},"loader")},Gy="quadrantChart",Zy={id:Gy,detector:ht(t=>/^\s*quadrantChart/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-o3IEMDUC.js");return{id:Gy,diagram:t}},"loader")},Qy="xychart",Jy={id:Qy,detector:ht(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-B6KmAHYz.js");return{id:Qy,diagram:t}},"loader")},Ky="requirement",tm={id:Ky,detector:ht(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-CSBSz0_J.js");return{id:Ky,diagram:t}},"loader")},em="sequence",rm={id:em,detector:ht(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-DEPMVZxI.js");return{id:em,diagram:t}},"loader")},im="class",om=ht((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),am={id:im,detector:om,loader:ht(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-BudcHsyy.js");return{id:im,diagram:t}},"loader")},sm="classDiagram",nm=ht((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),lm={id:sm,detector:nm,loader:ht(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-BudcHsyy.js");return{id:sm,diagram:t}},"loader")},hm="state",cm=ht((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),dm={id:hm,detector:cm,loader:ht(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-B_eljgWF.js");return{id:hm,diagram:t}},"loader")},um="stateDiagram",pm=ht((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),gm={id:um,detector:pm,loader:ht(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-D9FCD1lO.js");return{id:um,diagram:t}},"loader")},fm="journey",ym={id:fm,detector:ht(t=>/^\s*journey/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-BxyeAOhI.js");return{id:fm,diagram:t}},"loader")},mm=ht((t,e,r)=>{ut.debug("rendering svg for syntax error\n");const i=pa(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Tr(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:mm},xm=Cm,km={db:{},renderer:Cm,parser:{parse:ht(()=>{},"parse")}},bm="flowchart-elk",wm=ht((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),Tm={id:bm,detector:wm,loader:ht(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-Cd5g_eEq.js");return{id:bm,diagram:t}},"loader")},Bm="timeline",Sm={id:Bm,detector:ht(t=>/^\s*timeline/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-Cg4NUF_H.js");return{id:Bm,diagram:t}},"loader")},vm="mindmap",_m={id:vm,detector:ht(t=>/^\s*mindmap/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-BUmIu9eO.js");return{id:vm,diagram:t}},"loader")},Lm="kanban",Fm={id:Lm,detector:ht(t=>/^\s*kanban/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-BR8Xd4RY.js");return{id:Lm,diagram:t}},"loader")},Mm="sankey",Am={id:Mm,detector:ht(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-Dd0d-7E4.js");return{id:Mm,diagram:t}},"loader")},$m="packet",Em={id:$m,detector:ht(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-CfbzkptG.js");return{id:$m,diagram:t}},"loader")},qm="radar",Im={id:qm,detector:ht(t=>/^\s*radar-beta/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5--Lf_QB5P.js");return{id:qm,diagram:t}},"loader")},Om="block",Dm={id:Om,detector:ht(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-DNKe0cgR.js");return{id:Om,diagram:t}},"loader")},zm="treeView",Pm={id:zm,detector:ht(t=>/^\s*treeView-beta/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-CmcDSDfS.js");return{id:zm,diagram:t}},"loader")},Wm="architecture",Rm={id:Wm,detector:ht(t=>/^\s*architecture/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-DO8F0qz7.js");return{id:Wm,diagram:t}},"loader")},Nm="ishikawa",jm={id:Nm,detector:ht(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-DNCSSMvk.js");return{id:Nm,diagram:t}},"loader")},Hm="venn",Ym={id:Hm,detector:ht(t=>/^\s*venn-beta/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-B0vBQEXk.js");return{id:Hm,diagram:t}},"loader")},Um="treemap",Vm={id:Um,detector:ht(t=>/^\s*treemap/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-MRapKKyA.js");return{id:Um,diagram:t}},"loader")},Xm="wardley-beta",Gm=ht(t=>/^\s*wardley-beta/i.test(t),"detector"),Zm={id:Xm,detector:Gm,loader:ht(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-BxnrOeU9.js");return{id:Xm,diagram:t}},"loader")},Qm=!1,Jm=ht(()=>{Qm||(Qm=!0,Zr("error",km,t=>"error"===t.toLowerCase().trim()),Zr("---",{db:{clear:ht(()=>{},"clear")},styles:{},renderer:{draw:ht(()=>{},"draw")},parser:{parse:ht(()=>{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:ht(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Yt(Tm,_m,Rm),Yt(qy,Fm,lm,am,Ry,Yy,Vy,Xy,tm,rm,Wy,Dy,Sm,jy,gm,dm,ym,Zy,Am,Em,Jy,Dm,Pm,Im,jm,Vm,Ym,Zm))},"addDiagrams"),Km=ht(async()=>{ut.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(jt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Qr(t)}catch{try{const{diagram:t,id:i}=await r();Zr(i,t,e)}catch(e){throw ut.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete jt[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){ut.error(`Failed to load ${t.length} external diagrams`);for(const e of t)ut.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function tC(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function eC(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}ht(tC,"setA11yDiagramInfo"),ht(eC,"addSVGa11yTitleDescription");var rC=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{ht(this,"Diagram")}static async fromText(e,r={}){const i=Pe(),o=Ht(e,i);e=sh(e)+"\n";try{Qr(o)}catch{const t=Vt(o);if(!t)throw new Nt(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();Zr(e,r)}const{db:a,parser:s,renderer:n,init:l}=Qr(o);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(o,e,a,s,n)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},iC=[],oC=ht(()=>{iC.forEach(t=>{t()}),iC=[]},"attachFunctions"),aC=ht(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function sC(t){const e=t.match(Pt);if(!e)return{text:t,metadata:{}};let r=dl(e[1],{schema:cl})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}ht(sC,"extractFrontMatter");var nC=ht(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),lC=ht(t=>{const{text:e,metadata:r}=sC(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),hC=ht(t=>{const e=ah.detectInit(t)??{},r=ah.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:Ll(t),directive:e}},"processDirectives");function cC(t){const e=nC(t),r=lC(e),i=hC(r.text),o=oh(r.config,i.directive);return{code:t=aC(i.text),title:r.title,config:o}}function dC(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}ht(cC,"preprocessDiagram"),ht(dC,"toBase64");var uC=["foreignobject"],pC=["dominant-baseline"];function gC(t){const e=cC(t);return Ne(),Re(e.config??{}),e}async function fC(t,e){Jm();try{const{code:e,config:r}=gC(t);return{diagramType:(await vC(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}ht(gC,"processAndSetConfigs"),ht(fC,"parse");var yC=ht((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),mC=ht((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=Xe(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{it(t.styles)||i.forEach(e=>{r+=yC(t.id,e,t.styles)}),it(t.textStyles)||(r+=yC(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),CC=ht((t,e,r,i)=>{const o=mC(t,r);return $y(_y(`${i}{${Lr(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i)}}`),Ey)},"createUserStyles"),xC=ht((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=nh(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),kC=ht((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${dC(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),bC=ht((t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function wC(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}ht(wC,"sandboxedIframe");var TC=ht((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),BC=ht(async function(t,r,i){Jm();const o=gC(r);r=o.code;const a=Pe();ut.debug(a),r.length>(a?.maxTextSize??5e4)&&(r="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const s="#"+t,n="i"+t,l="#"+n,h="d"+t,c="#"+h,d=ht(()=>{const t=mo(p?l:c).node();t&&"remove"in t&&t.remove()},"removeTempElements");let u=mo("body");const p="sandbox"===a.securityLevel,g="loose"===a.securityLevel,f=a.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),p){const t=wC(mo(i),n);u=mo(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=mo(i);bC(u,t,h,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(TC(document,t,h,n),p){const t=wC(mo("body"),n);u=mo(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=mo("body");bC(u,t,h)}let y,m;try{y=await rC.fromText(r,{title:o.title})}catch(t){if(a.suppressErrorRendering)throw d(),t;y=await rC.fromText("error"),m=t}const C=u.select(c).node(),x=y.type,k=C.firstChild,b=k.firstChild,w=y.renderer.getClasses?.(r,y),T=CC(a,x,w,s),B=document.createElement("style");B.innerHTML=T,k.insertBefore(B,b);try{await y.renderer.draw(r,t,"11.14.0",y)}catch(e){throw a.suppressErrorRendering?d():xm.draw(r,t,"11.14.0"),e}const S=u.select(`${c} svg`),v=y.db.getAccTitle?.(),_=y.db.getAccDescription?.();_C(x,S,v,_),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select(c).node().innerHTML;if(ut.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),L=xC(L,p,Fe(a.arrowMarkerAbsolute)),p){const t=u.select(c+" svg").node();L=kC(L,t)}else g||(L=e.sanitize(L,{ADD_TAGS:uC,ADD_ATTR:pC,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oC(),m)throw m;return d(),{diagramType:x,svg:L,bindFunctions:y.db.bindFunctions}},"render");function SC(t={}){const e=Gt({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Ie(e),e?.theme&&e.theme in ke?e.themeVariables=ke[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=ke.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?qe(e):De();pt(r.logLevel),Jm()}ht(SC,"initialize");var vC=ht((t,e={})=>{const{code:r}=cC(t);return rC.fromText(r,e)},"getDiagramFromText");function _C(t,e,r,i){tC(e,t),eC(e,r,i,e.attr("id"))}ht(_C,"addA11yInfo");var LC=Object.freeze({render:BC,parse:fC,getDiagramFromText:vC,initialize:SC,getConfig:Pe,setConfig:ze,getSiteConfig:De,updateSiteConfig:Oe,reset:ht(()=>{Ne()},"reset"),globalReset:ht(()=>{Ne(Le)},"globalReset"),defaultConfig:Le});pt(Pe().logLevel),Ne(Pe());var FC=ht((t,e,r)=>{ut.warn(t),eh(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),MC=ht(async function(t={querySelector:".mermaid"}){try{await AC(t)}catch(e){if(eh(e)&&ut.error(e.str),NC.parseError&&NC.parseError(e),!t.suppressErrors)throw ut.error("Use the suppressErrors option to suppress these errors"),e}},"run"),AC=ht(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=LC.getConfig();let o;if(ut.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}ut.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(ut.debug("Start On Load: "+i?.startOnLoad),LC.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ah.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];for(const e of Array.from(o)){if(ut.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${a.next()}`;s=e.innerHTML,s=Zc(ah.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=ah.detectInit(s);i&&ut.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:o}=await RC(r,s,e);e.innerHTML=i,t&&await t(r),o&&o(e)}catch(t){FC(t,n,NC.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),$C=ht(function(t){LC.initialize(t)},"initialize"),EC=ht(async function(t,e,r){ut.warn("mermaid.init is deprecated. Please use run instead."),t&&$C(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await MC(i)},"init"),qC=ht(async(t,{lazyLoad:e=!0}={})=>{Jm(),Yt(...t),!1===e&&await Km()},"registerExternalDiagrams"),IC=ht(function(){if(NC.startOnLoad){const{startOnLoad:t}=LC.getConfig();t&&NC.run().catch(t=>ut.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",IC,!1);var OC=ht(function(t){NC.parseError=t},"setParseErrorHandler"),DC=[],zC=!1,PC=ht(async()=>{if(!zC){for(zC=!0;DC.length>0;){const t=DC.shift();if(t)try{await t()}catch(t){ut.error("Error executing queue",t)}}zC=!1}},"executeQueue"),WC=ht(async(t,e)=>new Promise((r,i)=>{const o=ht(()=>new Promise((o,a)=>{LC.parse(t,e).then(t=>{o(t),r(t)},t=>{ut.error("Error parsing",t),NC.parseError?.(t),a(t),i(t)})}),"performCall");DC.push(o),PC().catch(i)}),"parse"),RC=ht((t,e,r)=>new Promise((i,o)=>{const a=ht(()=>new Promise((a,s)=>{LC.render(t,e,r).then(t=>{a(t),i(t)},t=>{ut.error("Error parsing",t),NC.parseError?.(t),s(t),o(t)})}),"performCall");DC.push(a),PC().catch(o)}),"render"),NC={startOnLoad:!0,mermaidAPI:LC,parse:WC,render:RC,init:EC,run:MC,registerExternalDiagrams:qC,registerLayoutLoaders:Xf,initialize:$C,parseError:void 0,contentLoaded:IC,setParseErrorHandler:OC,detectType:Ht,registerIconPacks:td,getRegisteredDiagramsMetadata:ht(()=>Object.keys(jt).map(t=>({id:t})),"getRegisteredDiagramsMetadata")},jC=NC,HC=Object.freeze({__proto__:null,default:jC});export{Fr as $,Yr as A,Mt as B,Lt as C,ct as D,Pe as E,Vr as F,oh as G,Se as H,Hl as I,cl as J,pa as K,oe as L,Cd as M,yr as N,mr as O,ih as P,nr as Q,xr as R,cr as S,Nl as T,mt as U,$t as V,qt as W,It as X,Br as Y,Tl as Z,ht as _,Or as a,Uu as a0,Vg as a1,Zg as a2,xl as a3,Xe as a4,Td as a5,ul as a6,dh as a7,Wl as a8,nh as a9,uh as aa,Su as ab,Yf as ac,Gg as ad,af as ae,Vu as af,Lu as ag,Xg as ah,mf as ai,hf as aj,nf as ak,Et as al,Ve as am,id as an,td as ao,Qc as ap,nt as aq,it as ar,mh as as,yh as at,jC as au,HC as av,Ir as b,jr as c,mo as d,Tr as e,Gt as f,zr as g,Zl as h,er as i,wl as j,kr as k,ut as l,Gl as m,Ge as n,Hr as o,Zf as p,Pr as q,Gf as r,Dr as s,Wr as t,ah as u,dl as v,Vl as w,Yg as x,lh as y,qr as z};
|
|
1
|
+
import{J as t}from"./index-CDfJgeHe.js";import{p as e}from"./purify.es-BkjUCQC6.js";import{D as r,E as i,e as o,y as a,z as s,A as n,B as l,F as h,G as c,H as d,I as u,J as p,K as g,L as f,M as y,N as m,O as C,P as x,Q as k,k as b,l as w}from"./string-LeDn2fkG.js";import{a as T,c as B,s as S,F as v,f as _,n as L,T as F,C as M,O as A,G as $}from"./memoize-CPUrcYQl.js";function E(t,e){this._basis=new r(t),this._beta=e}E.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],a=e[0],s=t[r]-o,n=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*s),this._beta*e[l]+(1-this._beta)*(a+i*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var q=function t(e){function i(t){return 1===e?new r(t):new E(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function I(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function O(t,e){this._context=t,this._k=(1-e)/6}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:I(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:I(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var D=function t(e){function r(t){return new O(t,e)}return r.tension=function(e){return t(+e)},r}(0);function z(t,e){this._context=t,this._k=(1-e)/6}z.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:I(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var P=function t(e){function r(t){return new z(t,e)}return r.tension=function(e){return t(+e)},r}(0);function W(t,e){this._context=t,this._k=(1-e)/6}W.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:I(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var R=function t(e){function r(t){return new W(t,e)}return r.tension=function(e){return t(+e)},r}(0);function N(t,e,r){var i=t._x1,a=t._y1,s=t._x2,n=t._y2;if(t._l01_a>o){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,a=(a*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>o){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/d,n=(n*c+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(i,a,s,n,t._x2,t._y2)}function j(t,e){this._context=t,this._alpha=e}j.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:N(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var H=function t(e){function r(t){return e?new j(t,e):new O(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Y(t,e){this._context=t,this._alpha=e}Y.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:N(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U=function t(e){function r(t){return e?new Y(t,e):new z(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function V(t,e){this._context=t,this._alpha=e}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:N(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var X,G=function t(e){function r(t){return e?new V(t,e):new W(t,0)}return r.alpha=function(e){return t(+e)},r}(.5),Z=180/Math.PI,Q={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function J(t,e,r,i,o,a){var s,n,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),t*i<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*Z,skewX:Math.atan(l)*Z,scaleX:s,scaleY:n}}function K(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(s,n){var l=[],h=[];return s=t(s),n=t(n),function(t,i,o,s,n,l){if(t!==o||i!==s){var h=n.push("translate(",null,e,null,r);l.push({i:h-4,x:a(t,o)},{i:h-2,x:a(i,s)})}else(o||s)&&n.push("translate("+o+e+s+r)}(s.translateX,s.translateY,n.translateX,n.translateY,l,h),function(t,e,r,s){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),s.push({i:r.push(o(r)+"rotate(",null,i)-2,x:a(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(s.rotate,n.rotate,l,h),function(t,e,r,s){t!==e?s.push({i:r.push(o(r)+"skewX(",null,i)-2,x:a(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(s.skewX,n.skewX,l,h),function(t,e,r,i,s,n){if(t!==r||e!==i){var l=s.push(o(s)+"scale(",null,",",null,")");n.push({i:l-4,x:a(t,r)},{i:l-2,x:a(e,i)})}else 1===r&&1===i||s.push(o(s)+"scale("+r+","+i+")")}(s.scaleX,s.scaleY,n.scaleX,n.scaleY,l,h),s=n=null,function(t){for(var e,r=-1,i=h.length;++r<i;)l[(e=h[r]).i]=e.x(t);return l.join("")}}}var tt=K(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Q:J(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),et=K(function(t){return null==t?Q:(X||(X=document.createElementNS("http://www.w3.org/2000/svg","g")),X.setAttribute("transform",t),(t=X.transform.baseVal.consolidate())?J((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Q)},", ",")",")"),rt=Object.prototype.hasOwnProperty;function it(t){if(null==t)return!0;if(T(t)&&(B(t)||"string"==typeof t||"function"==typeof t.splice||S(t)||v(t)||_(t)))return!t.length;var e=L(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(F(t))return!M(t).length;for(var r in t)if(rt.call(t,r))return!1;return!0}var ot,at={exports:{}};var st=(ot||(ot=1,at.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",a="minute",s="hour",n="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},C={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),a=r-o<0,s=e.clone().add(i+(a?-1:1),h);return+(-(i+(r-o)/(a?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:n,D:u,h:s,m:a,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",k={};k[x]=y;var b="$isDayjsObject",w=function(t){return t instanceof v||!(!t||!t[b])},T=function t(e,r,i){var o;if(!e)return x;if("string"==typeof e){var a=e.toLowerCase();k[a]&&(o=a),r&&(k[a]=r,o=a);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var n=e.name;k[n]=e,o=n}return!i&&o&&(x=o),o||!i&&x},B=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new v(r)},S=C;S.l=T,S.i=w,S.w=function(t,e){return B(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var v=function(){function y(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[b]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=B(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return B(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<B(t)},m.$g=function(t,e,r){return S.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!S.u(e)||e,c=S.p(t),p=function(t,e){var o=S.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(n)},g=function(t,e){return S.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,C="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var x=this.$locale().weekStart||0,k=(f<x?f+7:f)-x;return p(i?m-k:m+(6-k),y);case n:case u:return g(C+"Hours",0);case s:return g(C+"Minutes",1);case a:return g(C+"Seconds",2);case o:return g(C+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=S.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[n]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[s]=c+"Hours",r[a]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===n?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[S.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=S.p(c),f=function(t){var e=B(p);return S.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===n)return f(1);if(g===l)return f(7);var y=(u={},u[a]=e,u[s]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return S.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),a=this.$H,s=this.$m,n=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,a){return t&&(t[r]||t(e,i))||o[r].slice(0,a)},u=function(t){return S.s(a%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return n+1;case"MM":return S.s(n+1,2,"0");case"MMM":return d(r.monthsShort,n,h,3);case"MMMM":return d(h,n);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return S.s(a,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(a,s,!0);case"A":return g(a,s,!1);case"m":return String(s);case"mm":return S.s(s,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=S.p(u),m=B(i),C=(m.utcOffset()-this.utcOffset())*e,x=this-m,k=function(){return S.m(f,m)};switch(y){case d:g=k()/12;break;case h:g=k();break;case c:g=k()/3;break;case l:g=(x-C)/6048e5;break;case n:g=(x-C)/864e5;break;case s:g=x/r;break;case a:g=x/e;break;case o:g=x/t;break;default:g=x}return p?g:S.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return k[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=T(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return S.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=v.prototype;return B.prototype=_,[["$ms",i],["$s",o],["$m",a],["$H",s],["$W",n],["$M",h],["$y",d],["$D",u]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),B.extend=function(t,e){return t.$i||(t(e,v,B),t.$i=!0),B},B.locale=T,B.isDayjs=w,B.unix=function(t){return B(1e3*t)},B.en=k[x],B.Ls=k,B.p={},B}()),at.exports),nt=t(st),lt=Object.defineProperty,ht=(t,e)=>lt(t,"name",{value:e,configurable:!0}),ct=(t,e)=>{for(var r in e)lt(t,r,{get:e[r],enumerable:!0})},dt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ut={trace:ht((...t)=>{},"trace"),debug:ht((...t)=>{},"debug"),info:ht((...t)=>{},"info"),warn:ht((...t)=>{},"warn"),error:ht((...t)=>{},"error"),fatal:ht((...t)=>{},"fatal")},pt=ht(function(t="fatal"){let e=dt.fatal;"string"==typeof t?t.toLowerCase()in dt&&(e=dt[t]):"number"==typeof t&&(e=t),ut.trace=()=>{},ut.debug=()=>{},ut.info=()=>{},ut.warn=()=>{},ut.error=()=>{},ut.fatal=()=>{},e<=dt.fatal&&(ut.fatal=console.error?console.error.bind(console,gt("FATAL"),"color: orange"):console.log.bind(console,"[35m",gt("FATAL"))),e<=dt.error&&(ut.error=console.error?console.error.bind(console,gt("ERROR"),"color: orange"):console.log.bind(console,"[31m",gt("ERROR"))),e<=dt.warn&&(ut.warn=console.warn?console.warn.bind(console,gt("WARN"),"color: orange"):console.log.bind(console,"[33m",gt("WARN"))),e<=dt.info&&(ut.info=console.info?console.info.bind(console,gt("INFO"),"color: lightblue"):console.log.bind(console,"[34m",gt("INFO"))),e<=dt.debug&&(ut.debug=console.debug?console.debug.bind(console,gt("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",gt("DEBUG"))),e<=dt.trace&&(ut.trace=console.debug?console.debug.bind(console,gt("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",gt("TRACE")))},"setLogLevel"),gt=ht(t=>`%c${nt().format("ss.SSS")} : ${t} : `,"format");const ft={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return 255*ft.hue2rgb(a,o,t+1/3);case"g":return 255*ft.hue2rgb(a,o,t);case"b":return 255*ft.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if("l"===i)return 100*s;if(o===a)return 0;const n=o-a;if("s"===i)return 100*(s>.5?n/(2-o-a):n/(o+a));switch(o){case t:return 60*((e-r)/n+(e<r?6:0));case e:return 60*((r-t)/n+2);case r:return 60*((t-e)/n+4);default:return-1}}},yt={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},mt={channel:ft,lang:yt,unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Ct={};for(let t=0;t<=255;t++)Ct[t]=mt.unit.dec2hex(t);const xt=0,kt=1,bt=2;class wt{constructor(){this.type=xt}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=xt}is(t){return this.type===t}}const Tt=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new wt}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=xt,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=mt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=mt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=mt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=mt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=mt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=mt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(bt)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(bt)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(bt)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(kt)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(kt)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(kt)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(kt),this.changed=!0,this.data.r=t}set g(t){this.type.set(kt),this.changed=!0,this.data.g=t}set b(t){this.type.set(kt),this.changed=!0,this.data.b=t}set h(t){this.type.set(bt),this.changed=!0,this.data.h=t}set s(t){this.type.set(bt),this.changed=!0,this.data.s=t}set l(t){this.type.set(bt),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),Bt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(Bt.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,a=o%4==0,s=o>4,n=s?1:17,l=s?8:4,h=a?0:-1,c=s?255:15;return Tt.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${Ct[Math.round(e)]}${Ct[Math.round(r)]}${Ct[Math.round(i)]}${Ct[Math.round(255*o)]}`:`#${Ct[Math.round(e)]}${Ct[Math.round(r)]}${Ct[Math.round(i)]}`}},St={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(St.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return mt.channel.clamp.h(.9*parseFloat(t));case"rad":return mt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return mt.channel.clamp.h(360*parseFloat(t))}}return mt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(St.re);if(!r)return;const[,i,o,a,s,n]=r;return Tt.set({h:St._hue2deg(i),s:mt.channel.clamp.s(parseFloat(o)),l:mt.channel.clamp.l(parseFloat(a)),a:s?mt.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${mt.lang.round(e)}, ${mt.lang.round(r)}%, ${mt.lang.round(i)}%, ${o})`:`hsl(${mt.lang.round(e)}, ${mt.lang.round(r)}%, ${mt.lang.round(i)}%)`}},vt={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=vt.colors[t];if(e)return Bt.parse(e)},stringify:t=>{const e=Bt.stringify(t);for(const t in vt.colors)if(vt.colors[t]===e)return t}},_t={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(_t.re);if(!r)return;const[,i,o,a,s,n,l,h,c]=r;return Tt.set({r:mt.channel.clamp.r(o?2.55*parseFloat(i):parseFloat(i)),g:mt.channel.clamp.g(s?2.55*parseFloat(a):parseFloat(a)),b:mt.channel.clamp.b(l?2.55*parseFloat(n):parseFloat(n)),a:h?mt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${mt.lang.round(e)}, ${mt.lang.round(r)}, ${mt.lang.round(i)}, ${mt.lang.round(o)})`:`rgb(${mt.lang.round(e)}, ${mt.lang.round(r)}, ${mt.lang.round(i)})`}},Lt={format:{keyword:vt,hex:Bt,rgb:_t,rgba:_t,hsl:St,hsla:St},parse:t=>{if("string"!=typeof t)return t;const e=Bt.parse(t)||_t.parse(t)||St.parse(t)||vt.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(bt)||void 0===t.data.r?St.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?_t.stringify(t):Bt.stringify(t)},Ft=(t,e)=>{const r=Lt.parse(t);for(const t in e)r[t]=mt.channel.clamp[t](e[t]);return Lt.stringify(r)},Mt=(t,e,r=0,i=1)=>{if("number"!=typeof t)return Ft(t,{a:e});const o=Tt.set({r:mt.channel.clamp.r(t),g:mt.channel.clamp.g(e),b:mt.channel.clamp.b(r),a:mt.channel.clamp.a(i)});return Lt.stringify(o)},At=t=>(t=>{const{r:e,g:r,b:i}=Lt.parse(t),o=.2126*mt.channel.toLinear(e)+.7152*mt.channel.toLinear(r)+.0722*mt.channel.toLinear(i);return mt.lang.round(o)})(t)>=.5,$t=t=>!At(t),Et=(t,e,r)=>{const i=Lt.parse(t),o=i[e],a=mt.channel.clamp[e](o+r);return o!==a&&(i[e]=a),Lt.stringify(i)},qt=(t,e)=>Et(t,"l",e),It=(t,e)=>Et(t,"l",-e),Ot=(t,e)=>{const r=Lt.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return Ft(t,i)},Dt=(t,e=100)=>{const r=Lt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:o,b:a,a:s}=Lt.parse(t),{r:n,g:l,b:h,a:c}=Lt.parse(e),d=r/100,u=2*d-1,p=s-c,g=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return Mt(i*g+n*f,o*g+l*f,a*g+h*f,s*d+c*(1-d))})(r,t,e)};var zt,Pt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Wt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Rt=/\s*%%.*\n/gm,Nt=class extends Error{static{ht(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},jt={},Ht=ht(function(t,e){t=t.replace(Pt,"").replace(Wt,"").replace(Rt,"\n");for(const[r,{detector:i}]of Object.entries(jt)){if(i(t,e))return r}throw new Nt(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Yt=ht((...t)=>{for(const{id:e,detector:r,loader:i}of t)Ut(e,r,i)},"registerLazyLoadedDiagrams"),Ut=ht((t,e,r)=>{jt[t]&&ut.warn(`Detector with key ${t} already exists. Overwriting.`),jt[t]={detector:e,loader:r},ut.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Vt=ht(t=>jt[t].loader,"getDiagramLoader"),Xt=ht((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>Xt(t,e,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||void 0!==t[o]&&"object"!=typeof t[o]?(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o]):(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=Xt(t[o],e[o],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),Gt=Xt,Zt="#ffffff",Qt="#f2f2f2",Jt=ht((t,e)=>Ot(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),Kt=class{static{ht(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(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||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||It(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||It(this.mainBkg,10)):(this.rowOdd=this.rowOdd||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||qt(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||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??Ot(this.primaryColor,{l:-30}),this.venn2=this.venn2??Ot(this.secondaryColor,{l:-30}),this.venn3=this.venn3??Ot(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??Ot(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??Ot(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??Ot(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??Ot(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??Ot(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},te=ht(t=>{const e=new Kt;return e.calculate(t),e},"getThemeVariables"),ee=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=It("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=It(this.sectionBkgColor,10),this.taskBorderColor=Mt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Mt(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||qt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||It(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=qt(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=qt(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=qt(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=Dt(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(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||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??qt(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=qt(this.secondaryColor,20),this.git1=qt(this.pie2||this.secondaryColor,20),this.git2=qt(this.pie3||this.tertiaryColor,20),this.git3=qt(this.pie4||Ot(this.primaryColor,{h:-30}),20),this.git4=qt(this.pie5||Ot(this.primaryColor,{h:-60}),20),this.git5=qt(this.pie6||Ot(this.primaryColor,{h:-90}),10),this.git6=qt(this.pie7||Ot(this.primaryColor,{h:60}),10),this.git7=qt(this.pie8||Ot(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Dt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Dt(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||qt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},re=ht(t=>{const e=new ee;return e.calculate(t),e},"getThemeVariables"),ie=class{static{ht(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ot(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Mt(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||It(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||It(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ot(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||Dt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Dt(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||qt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||qt(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=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Ot(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??Ot(this.primaryColor,{l:-30}),this.venn2=this.venn2??Ot(this.secondaryColor,{l:-30}),this.venn3=this.venn3??Ot(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??Ot(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??Ot(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??Ot(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??Ot(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??Ot(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||It(Dt(this.git0),25),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Dt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},oe=ht(t=>{const e=new ie;return e.calculate(t),e},"getThemeVariables"),ae=class{static{ht(this,"Theme")}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=qt("#cde498",10),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.primaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=It(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||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||It(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||It(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ot(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});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||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||qt(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=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(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||Ot(this.primaryColor,{l:-30}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ot(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??Ot(this.primaryColor,{l:-30}),this.venn2=this.venn2??Ot(this.secondaryColor,{l:-30}),this.venn3=this.venn3??Ot(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??Ot(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??Ot(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??Ot(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??Ot(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??Ot(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Dt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},se=ht(t=>{const e=new ae;return e.calculate(t),e},"getThemeVariables"),ne=class{static{ht(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=qt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.lineColor=Dt(this.background),this.textColor=Dt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=qt(this.contrast,55),this.border2=this.contrast,this.actorBorder=qt(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{l:-(8+5*t)});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=qt(this.contrast,30),this.sectionBkgColor2=qt(this.contrast,30),this.taskBorderColor=It(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=qt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=It(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=Ot(this.primaryColor,{h:64}),this.fillType3=Ot(this.secondaryColor,{h:64}),this.fillType4=Ot(this.primaryColor,{h:-64}),this.fillType5=Ot(this.secondaryColor,{h:-64}),this.fillType6=Ot(this.primaryColor,{h:128}),this.fillType7=Ot(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.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=It(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Ot(this.primaryColor,{h:-30}),this.git4=this.pie5||Ot(this.primaryColor,{h:-60}),this.git5=this.pie6||Ot(this.primaryColor,{h:-90}),this.git6=this.pie7||Ot(this.primaryColor,{h:60}),this.git7=this.pie8||Ot(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},le=ht(t=>{const e=new ne;return e.calculate(t),e},"getThemeVariables"),he=class{static{ht(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=Ot(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||Ot(t,{h:30}),this.cScale4=this.cScale4||Ot(t,{h:60}),this.cScale5=this.cScale5||Ot(t,{h:90}),this.cScale6=this.cScale6||Ot(t,{h:120}),this.cScale7=this.cScale7||Ot(t,{h:150}),this.cScale8=this.cScale8||Ot(t,{h:210,l:150}),this.cScale9=this.cScale9||Ot(t,{h:270}),this.cScale10=this.cScale10||Ot(t,{h:300}),this.cScale11=this.cScale11||Ot(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||Ot(t,{h:64}),this.fillType3=this.fillType3||Ot(e,{h:64}),this.fillType4=this.fillType4||Ot(t,{h:-64}),this.fillType5=this.fillType5||Ot(e,{h:-64}),this.fillType6=this.fillType6||Ot(t,{h:128}),this.fillType7=this.fillType7||Ot(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||Ot(t,{l:-10}),this.pie5=this.pie5||Ot(e,{l:-10}),this.pie6=this.pie6||Ot(r,{l:-10}),this.pie7=this.pie7||Ot(t,{h:60,l:-10}),this.pie8=this.pie8||Ot(t,{h:-60,l:-10}),this.pie9=this.pie9||Ot(t,{h:120,l:0}),this.pie10=this.pie10||Ot(t,{h:60,l:-20}),this.pie11=this.pie11||Ot(t,{h:-60,l:-20}),this.pie12=this.pie12||Ot(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||Ot(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||Ot(t,{h:-30}),this.git4=this.git4||Ot(t,{h:-60}),this.git5=this.git5||Ot(t,{h:-90}),this.git6=this.git6||Ot(t,{h:60}),this.git7=this.git7||Ot(t,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ce=ht(t=>{const e=new he;return e.calculate(t),e},"getThemeVariables"),de=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor=Dt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(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||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(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||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ue=ht(t=>{const e=new de;return e.calculate(t),e},"getThemeVariables"),pe=class{static{ht(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Jt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=Ot(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||Ot(t,{h:64}),this.fillType3=this.fillType3||Ot(e,{h:64}),this.fillType4=this.fillType4||Ot(t,{h:-64}),this.fillType5=this.fillType5||Ot(e,{h:-64}),this.fillType6=this.fillType6||Ot(t,{h:128}),this.fillType7=this.fillType7||Ot(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||Ot(t,{l:-10}),this.pie5=this.pie5||Ot(e,{l:-10}),this.pie6=this.pie6||Ot(r,{l:-10}),this.pie7=this.pie7||Ot(t,{h:60,l:-10}),this.pie8=this.pie8||Ot(t,{h:-60,l:-10}),this.pie9=this.pie9||Ot(t,{h:120,l:0}),this.pie10=this.pie10||Ot(t,{h:60,l:-20}),this.pie11=this.pie11||Ot(t,{h:-60,l:-20}),this.pie12=this.pie12||Ot(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||Ot(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||Ot(t,{h:-30}),this.git4=this.git4||Ot(t,{h:-60}),this.git5=this.git5||Ot(t,{h:-90}),this.git6=this.git6||Ot(t,{h:60}),this.git7=this.git7||Ot(t,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ge=ht(t=>{const e=new pe;return e.calculate(t),e},"getThemeVariables"),fe=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor=Dt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(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||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ot(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ot(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ot(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ot(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ot(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ot(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ot(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ot(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ot(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ye=ht(t=>{const e=new fe;return e.calculate(t),e},"getThemeVariables"),me=class{static{ht(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Jt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(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?It(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||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=Ot(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ot(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||Ot(t,{h:64}),this.fillType3=this.fillType3||Ot(e,{h:64}),this.fillType4=this.fillType4||Ot(t,{h:-64}),this.fillType5=this.fillType5||Ot(e,{h:-64}),this.fillType6=this.fillType6||Ot(t,{h:128}),this.fillType7=this.fillType7||Ot(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||Ot(t,{l:-10}),this.pie5=this.pie5||Ot(e,{l:-10}),this.pie6=this.pie6||Ot(r,{l:-10}),this.pie7=this.pie7||Ot(t,{h:60,l:-10}),this.pie8=this.pie8||Ot(t,{h:-60,l:-10}),this.pie9=this.pie9||Ot(t,{h:120,l:0}),this.pie10=this.pie10||Ot(t,{h:60,l:-20}),this.pie11=this.pie11||Ot(t,{h:-60,l:-20}),this.pie12=this.pie12||Ot(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||Ot(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||Ot(t,{h:-30}),this.git4=this.git4||Ot(t,{h:-60}),this.git5=this.git5||Ot(t,{h:-90}),this.git6=this.git6||Ot(t,{h:60}),this.git7=this.git7||Ot(t,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Ce=ht(t=>{const e=new me;return e.calculate(t),e},"getThemeVariables"),xe=class{static{ht(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=Ot(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.background),this.secondaryBorderColor=Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Dt(this.primaryColor),this.secondaryTextColor=Dt(this.secondaryColor),this.tertiaryTextColor=Dt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Dt("#323D47"),10),this.border1="#ccc",this.border2=Mt(255,255,255,.25),this.arrowheadColor=Dt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||Ot(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ot(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Dt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Dt(this.tertiaryColor),this.lineColor=this.lineColor||Dt(this.background),this.arrowheadColor=this.arrowheadColor||Dt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Dt(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Dt(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||qt(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=It(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ot(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ot(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ot(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ot(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ot(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ot(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ot(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||Ot(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ot(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ot(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ot(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ot(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ot(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ot(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ot(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ot(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ot(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ot(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ot(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ot(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ot(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ot(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||$t(this.quadrant1Fill)?qt(this.quadrant1Fill):It(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?It(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||Ot(this.primaryColor,{h:-30}),this.git4=this.git4||Ot(this.primaryColor,{h:-60}),this.git5=this.git5||Ot(this.primaryColor,{h:-90}),this.git6=this.git6||Ot(this.primaryColor,{h:60}),this.git7=this.git7||Ot(this.primaryColor,{h:120}),this.darkMode?(this.git0=qt(this.git0,25),this.git1=qt(this.git1,25),this.git2=qt(this.git2,25),this.git3=qt(this.git3,25),this.git4=qt(this.git4,25),this.git5=qt(this.git5,25),this.git6=qt(this.git6,25),this.git7=qt(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||Dt(this.git0),this.gitInv1=this.gitInv1||Dt(this.git1),this.gitInv2=this.gitInv2||Dt(this.git2),this.gitInv3=this.gitInv3||Dt(this.git3),this.gitInv4=this.gitInv4||Dt(this.git4),this.gitInv5=this.gitInv5||Dt(this.git5),this.gitInv6=this.gitInv6||Dt(this.git6),this.gitInv7=this.gitInv7||Dt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Zt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Qt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},ke={base:{getThemeVariables:te},dark:{getThemeVariables:re},default:{getThemeVariables:oe},forest:{getThemeVariables:se},neutral:{getThemeVariables:le},neo:{getThemeVariables:ce},"neo-dark":{getThemeVariables:ue},redux:{getThemeVariables:ge},"redux-dark":{getThemeVariables:ye},"redux-color":{getThemeVariables:Ce},"redux-dark-color":{getThemeVariables:ht(t=>{const e=new xe;return e.calculate(t),e},"getThemeVariables")}},be={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},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,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},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,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},we={...be,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ke.default.getThemeVariables(),sequence:{...be.sequence,messageFont:ht(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:ht(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:ht(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...be.gantt,tickInterval:void 0,useWidth:void 0},c4:{...be.c4,useWidth:void 0,personFont:ht(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...be.flowchart,inheritDir:!1},external_personFont:ht(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:ht(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:ht(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:ht(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:ht(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:ht(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:ht(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:ht(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:ht(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:ht(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:ht(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:ht(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:ht(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:ht(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:ht(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:ht(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:ht(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:ht(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:ht(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:ht(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:ht(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...be.pie,useWidth:984},xyChart:{...be.xyChart,useWidth:void 0},requirement:{...be.requirement,useWidth:void 0},packet:{...be.packet},treeView:{...be.treeView,useWidth:void 0},radar:{...be.radar},ishikawa:{...be.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...be.venn}},Te=ht((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Te(t[i],"")]:[...r,e+i],[]),"keyify"),Be=new Set(Te(we,"")),Se=we,ve=ht(t=>{if(ut.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>ve(t));else{for(const e of Object.keys(t)){if(ut.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Be.has(e)||null==t[e]){ut.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){ut.debug("sanitizing object",e),ve(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(ut.debug("sanitizing css option",e),t[e]=_e(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}ut.debug("After sanitization",t)}},"sanitizeDirective"),_e=ht(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),Le=Object.freeze(Se),Fe=ht(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),Me=Gt({},Le),Ae=[],$e=Gt({},Le),Ee=ht((t,e)=>{let r=Gt({},t),i={};for(const t of e)We(t),i=Gt(i,t);if(r=Gt(r,i),i.theme&&i.theme in ke){const t=Gt({},zt),e=Gt(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in ke&&(r.themeVariables=ke[r.theme].getThemeVariables(e))}return Ue($e=r),$e},"updateCurrentConfig"),qe=ht(t=>(Me=Gt({},Le),Me=Gt(Me,t),t.theme&&ke[t.theme]&&(Me.themeVariables=ke[t.theme].getThemeVariables(t.themeVariables)),Ee(Me,Ae),Me),"setSiteConfig"),Ie=ht(t=>{zt=Gt({},t)},"saveConfigFromInitialize"),Oe=ht(t=>(Me=Gt(Me,t),Ee(Me,Ae),Me),"updateSiteConfig"),De=ht(()=>Gt({},Me),"getSiteConfig"),ze=ht(t=>(Ue(t),Gt($e,t),Pe()),"setConfig"),Pe=ht(()=>Gt({},$e),"getConfig"),We=ht(t=>{t&&(["secure",...Me.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(ut.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&We(t[e])}))},"sanitize"),Re=ht(t=>{ve(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Ae.push(t),Ee(Me,Ae)},"addDirective"),Ne=ht((t=Me)=>{Ee(t,Ae=[])},"reset"),je={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},He={},Ye=ht(t=>{He[t]||(ut.warn(je[t]),He[t]=!0)},"issueWarning"),Ue=ht(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Ye("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ve=ht(()=>{let t={};zt&&(t=Gt(t,zt));for(const e of Ae)t=Gt(t,e);return t},"getUserDefinedConfig"),Xe=ht(t=>(null!=t.flowchart?.htmlLabels&&Ye("FLOWCHART_HTML_LABELS_DEPRECATED"),Fe(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Ge=/<br\s*\/?>/gi,Ze=ht(t=>{if(!t)return[""];return sr(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Qe=(()=>{let t=!1;return()=>{t||(Je(),t=!0)}})();function Je(){const t="data-temp-href-target";e.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),e.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}ht(Je,"setupDompurifyHooks");var Ke=ht(t=>{Qe();return e.sanitize(t)},"removeScript"),tr=ht((t,e)=>{if(Xe(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Ke(t):"loose"!==r&&(t=(t=(t=sr(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=ar(t))}return t},"sanitizeMore"),er=ht((t,r)=>t?t=r.dompurifyConfig?e.sanitize(tr(t,r),r.dompurifyConfig).toString():e.sanitize(tr(t,r),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),rr=ht((t,e)=>"string"==typeof t?er(t,e):t.flat().map(t=>er(t,e)),"sanitizeTextOrArray"),ir=ht(t=>Ge.test(t),"hasBreaks"),or=ht(t=>t.split(Ge),"splitBreaks"),ar=ht(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),sr=ht(t=>t.replace(Ge,"#br#"),"breakToPlaceholder"),nr=ht(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),lr=ht(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),hr=ht(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),cr=ht(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const o=e[t-1],a=e[t+1];ur(o,a)&&(i=o+","+a,t++,r.pop())}r.push(pr(i))}return r.join("")},"parseGenericTypes"),dr=ht((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),ur=ht((t,e)=>{const r=dr(t,"~"),i=dr(e,"~");return 1===r&&1===i},"shouldCombineSets"),pr=ht(t=>{const e=dr(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),gr=ht(()=>void 0!==window.MathMLElement,"isMathMLSupported"),fr=/\$\$(.*)\$\$/g,yr=ht(t=>(t.match(fr)?.length??0)>0,"hasKatex"),mr=ht(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await xr(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Cr=ht(async(t,e)=>{if(!yr(t))return t;if(!(gr()||e.legacyMathML||e.forceLegacyMathML))return t.replace(fr,"MathML is unsupported in this environment.");{const{default:r}=await import("./types-Vls6Vkq9.js").then(function(t){return t.F}),i=e.forceLegacyMathML||!gr()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Ge).map(t=>yr(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(fr,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),xr=ht(async(t,e)=>er(await Cr(t,e),e),"renderKatexSanitized"),kr={getRows:Ze,sanitizeText:er,sanitizeTextOrArray:rr,hasBreaks:ir,splitBreaks:or,lineBreakRegex:Ge,removeScript:Ke,getUrl:nr,evaluate:Fe,getMax:lr,getMin:hr},br=ht(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),wr=ht(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Tr=ht(function(t,e,r,i){const o=wr(e,r,i);br(t,o)},"configureSvgSize"),Br=ht(function(t,e,r,i){const o=e.node().getBBox(),a=o.width,s=o.height;ut.info(`SVG bounds: ${a}x${s}`,o);let n=0,l=0;ut.info(`Graph bounds: ${n}x${l}`,t),n=a+2*r,l=s+2*r,ut.info(`Calculated bounds: ${n}x${l}`),Tr(e,l,n,i);const h=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),Sr={},vr=ht((t,e,r,i)=>{let o="";return t in Sr&&Sr[t]?o=Sr[t]({...r,svgId:i}):ut.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${o}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),_r=ht((t,e)=>{void 0!==e&&(Sr[t]=e)},"addStylesForDiagram"),Lr=vr,Fr={};ct(Fr,{clear:()=>qr,getAccDescription:()=>zr,getAccTitle:()=>Or,getDiagramTitle:()=>Wr,setAccDescription:()=>Dr,setAccTitle:()=>Ir,setDiagramTitle:()=>Pr});var Mr="",Ar="",$r="",Er=ht(t=>er(t,Pe()),"sanitizeText"),qr=ht(()=>{Mr="",$r="",Ar=""},"clear"),Ir=ht(t=>{Mr=Er(t).replace(/^\s+/g,"")},"setAccTitle"),Or=ht(()=>Mr,"getAccTitle"),Dr=ht(t=>{$r=Er(t).replace(/\n\s+/g,"\n")},"setAccDescription"),zr=ht(()=>$r,"getAccDescription"),Pr=ht(t=>{Ar=Er(t)},"setDiagramTitle"),Wr=ht(()=>Ar,"getDiagramTitle"),Rr=ut,Nr=pt,jr=Pe,Hr=ze,Yr=Le,Ur=ht(t=>er(t,jr()),"sanitizeText"),Vr=Br,Xr=ht(()=>Fr,"getCommonDb"),Gr={},Zr=ht((t,e,r)=>{Gr[t]&&Rr.warn(`Diagram with id ${t} already registered. Overwriting.`),Gr[t]=e,r&&Ut(t,r),_r(t,e.styles),e.injectUtils?.(Rr,Nr,jr,Ur,Vr,Xr(),()=>{})},"registerDiagram"),Qr=ht(t=>{if(t in Gr)return Gr[t];throw new Jr(t)},"getDiagram"),Jr=class extends Error{static{ht(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}},Kr={value:()=>{}};function ti(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new ei(i)}function ei(t){this._=t}function ri(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function ii(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=Kr,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}ei.prototype=ti.prototype={constructor:ei,on:function(t,e){var r,i,o=this._,a=(i=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),s=-1,n=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<n;)if(r=(t=a[s]).type)o[r]=ii(o[r],t.name,e);else if(null==e)for(r in o)o[r]=ii(o[r],t.name,null);return this}for(;++s<n;)if((r=(t=a[s]).type)&&(r=ri(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new ei(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),a=0;a<r;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};var oi="http://www.w3.org/1999/xhtml",ai={svg:"http://www.w3.org/2000/svg",xhtml:oi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function si(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),ai.hasOwnProperty(e)?{space:ai[e],local:t}:t}function ni(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===oi&&e.documentElement.namespaceURI===oi?e.createElement(t):e.createElementNS(r,t)}}function li(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hi(t){var e=si(t);return(e.local?li:ni)(e)}function ci(){}function di(t){return null==t?ci:function(){return this.querySelector(t)}}function ui(){return[]}function pi(t){return null==t?ui:function(){return this.querySelectorAll(t)}}function gi(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function fi(t){return function(){return this.matches(t)}}function yi(t){return function(e){return e.matches(t)}}var mi=Array.prototype.find;function Ci(){return this.firstElementChild}var xi=Array.prototype.filter;function ki(){return Array.from(this.children)}function bi(t){return new Array(t.length)}function wi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ti(t,e,r,i,o,a){for(var s,n=0,l=e.length,h=a.length;n<h;++n)(s=e[n])?(s.__data__=a[n],i[n]=s):r[n]=new wi(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function Bi(t,e,r,i,o,a,s){var n,l,h,c=new Map,d=e.length,u=a.length,p=new Array(d);for(n=0;n<d;++n)(l=e[n])&&(p[n]=h=s.call(l,l.__data__,n,e)+"",c.has(h)?o[n]=l:c.set(h,l));for(n=0;n<u;++n)h=s.call(t,a[n],n,a)+"",(l=c.get(h))?(i[n]=l,l.__data__=a[n],c.delete(h)):r[n]=new wi(t,a[n]);for(n=0;n<d;++n)(l=e[n])&&c.get(p[n])===l&&(o[n]=l)}function Si(t){return t.__data__}function vi(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function _i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Li(t){return function(){this.removeAttribute(t)}}function Fi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mi(t,e){return function(){this.setAttribute(t,e)}}function Ai(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function $i(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function Ei(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function qi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ii(t){return function(){this.style.removeProperty(t)}}function Oi(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Di(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function zi(t,e){return t.style.getPropertyValue(e)||qi(t).getComputedStyle(t,null).getPropertyValue(e)}function Pi(t){return function(){delete this[t]}}function Wi(t,e){return function(){this[t]=e}}function Ri(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function Ni(t){return t.trim().split(/^|\s+/)}function ji(t){return t.classList||new Hi(t)}function Hi(t){this._node=t,this._names=Ni(t.getAttribute("class")||"")}function Yi(t,e){for(var r=ji(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function Ui(t,e){for(var r=ji(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function Vi(t){return function(){Yi(this,t)}}function Xi(t){return function(){Ui(this,t)}}function Gi(t,e){return function(){(e.apply(this,arguments)?Yi:Ui)(this,t)}}function Zi(){this.textContent=""}function Qi(t){return function(){this.textContent=t}}function Ji(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ki(){this.innerHTML=""}function to(t){return function(){this.innerHTML=t}}function eo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ro(){this.nextSibling&&this.parentNode.appendChild(this)}function io(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oo(){return null}function ao(){var t=this.parentNode;t&&t.removeChild(this)}function so(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function no(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lo(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,a=e.length;i<a;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function ho(t,e,r){return function(){var i,o=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var s=0,n=o.length;s<n;++s)if((i=o[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),void(i.value=e);this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},o?o.push(i):this.__on=[i]}}function co(t,e,r){var i=qi(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function uo(t,e){return function(){return co(this,t,e)}}function po(t,e){return function(){return co(this,t,e.apply(this,arguments))}}wi.prototype={constructor:wi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Hi.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var go=[null];function fo(t,e){this._groups=t,this._parents=e}function yo(){return new fo([[document.documentElement]],go)}function mo(t){return"string"==typeof t?new fo([[document.querySelector(t)]],[document.documentElement]):new fo([[t]],go)}fo.prototype=yo.prototype={constructor:fo,select:function(t){"function"!=typeof t&&(t=di(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s,n=e[o],l=n.length,h=i[o]=new Array(l),c=0;c<l;++c)(a=n[c])&&(s=t.call(a,a.__data__,c,n))&&("__data__"in a&&(s.__data__=a.__data__),h[c]=s);return new fo(i,this._parents)},selectAll:function(t){t="function"==typeof t?gi(t):pi(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var s,n=e[a],l=n.length,h=0;h<l;++h)(s=n[h])&&(i.push(t.call(s,s.__data__,h,n)),o.push(s));return new fo(i,o)},selectChild:function(t){return this.select(null==t?Ci:function(t){return function(){return mi.call(this.children,t)}}("function"==typeof t?t:yi(t)))},selectChildren:function(t){return this.selectAll(null==t?ki:function(t){return function(){return xi.call(this.children,t)}}("function"==typeof t?t:yi(t)))},filter:function(t){"function"!=typeof t&&(t=fi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new fo(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Si);var r=e?Bi:Ti,i=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=o.length,s=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],d=o[h],u=d.length,p=vi(t.call(c,c&&c.__data__,h,i)),g=p.length,f=n[h]=new Array(g),y=s[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,C,x=0,k=0;x<g;++x)if(m=f[x]){for(x>=k&&(k=x+1);!(C=y[k])&&++k<g;);m._next=C||null}}return(s=new fo(s,i))._enter=n,s._exit=l,s},enter:function(){return new fo(this._enter||this._groups.map(bi),this._parents)},exit:function(){return new fo(this._exit||this._groups.map(bi),this._parents)},join:function(t,e,r){var i=this.enter(),o=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,s=Math.min(o,a),n=new Array(o),l=0;l<s;++l)for(var h,c=r[l],d=i[l],u=c.length,p=n[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)n[l]=r[l];return new fo(n,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],a=o.length-1,s=o[a];--a>=0;)(i=o[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=_i);for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s,n=r[a],l=n.length,h=o[a]=new Array(l),c=0;c<l;++c)(s=n[c])&&(h[c]=s);h.sort(e)}return new fo(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,a=e[r],s=0,n=a.length;s<n;++s)(o=a[s])&&t.call(o,o.__data__,s,a);return this},attr:function(t,e){var r=si(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?Fi:Li:"function"==typeof e?r.local?Ei:$i:r.local?Ai:Mi)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?Ii:"function"==typeof e?Di:Oi)(t,e,null==r?"":r)):zi(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Pi:"function"==typeof e?Ri:Wi)(t,e)):this.node()[t]},classed:function(t,e){var r=Ni(t+"");if(arguments.length<2){for(var i=ji(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?Gi:e?Vi:Xi)(r,e))},text:function(t){return arguments.length?this.each(null==t?Zi:("function"==typeof t?Ji:Qi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ki:("function"==typeof t?eo:to)(t)):this.node().innerHTML},raise:function(){return this.each(ro)},lower:function(){return this.each(io)},append:function(t){var e="function"==typeof t?t:hi(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:hi(t),i=null==e?oo:"function"==typeof e?e:di(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(ao)},clone:function(t){return this.select(t?no:so)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,o,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),s=a.length;if(!(arguments.length<2)){for(n=e?ho:lo,i=0;i<s;++i)this.each(n(a[i],e,r));return this}var n=this.node().__on;if(n)for(var l,h=0,c=n.length;h<c;++h)for(i=0,l=n[h];i<s;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?po:uo)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],a=0,s=o.length;a<s;++a)(i=o[a])&&(yield i)}};var Co,xo,ko=0,bo=0,wo=0,To=0,Bo=0,So=0,vo="object"==typeof performance&&performance.now?performance:Date,_o="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Lo(){return Bo||(_o(Fo),Bo=vo.now()+So)}function Fo(){Bo=0}function Mo(){this._call=this._time=this._next=null}function Ao(t,e,r){var i=new Mo;return i.restart(t,e,r),i}function $o(){Bo=(To=vo.now())+So,ko=bo=0;try{!function(){Lo(),++ko;for(var t,e=Co;e;)(t=Bo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ko}()}finally{ko=0,function(){var t,e,r=Co,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Co=e);xo=t,qo(i)}(),Bo=0}}function Eo(){var t=vo.now(),e=t-To;e>1e3&&(So-=e,To=t)}function qo(t){ko||(bo&&(bo=clearTimeout(bo)),t-Bo>24?(t<1/0&&(bo=setTimeout($o,t-vo.now()-So)),wo&&(wo=clearInterval(wo))):(wo||(To=vo.now(),wo=setInterval(Eo,1e3)),ko=1,_o($o)))}function Io(t,e,r){var i=new Mo;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Mo.prototype=Ao.prototype={constructor:Mo,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Lo():+r)+(null==e?0:+e),this._next||xo===this||(xo?xo._next=this:Co=this,xo=this),this._call=t,this._time=r,qo()},stop:function(){this._call&&(this._call=null,this._time=1/0,qo())}};var Oo=ti("start","end","cancel","interrupt"),Do=[];function zo(t,e,r,i,o,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function a(t){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(a){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Io(s);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(Io(function(){3===r.state&&(r.state=4,r.timer.restart(n,r.delay,r.time),n(a))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function n(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),a=-1,s=i.length;++a<s;)i[a].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=Ao(a,0,r.time)}(t,r,{name:e,index:i,group:o,on:Oo,tween:Do,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Po(t,e){var r=Ro(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function Wo(t,e){var r=Ro(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Ro(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function No(t,e){var r,i;return function(){var o=Wo(this,t),a=o.tween;if(a!==r)for(var s=0,n=(i=r=a).length;s<n;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}o.tween=i}}function jo(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var a=Wo(this,t),s=a.tween;if(s!==i){o=(i=s).slice();for(var n={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=n;break}l===h&&o.push(n)}a.tween=o}}function Ho(t,e,r){var i=t._id;return t.each(function(){var t=Wo(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Ro(t,i).value[e]}}function Yo(t,e){var r;return("number"==typeof e?a:e instanceof s?n:(r=s(e))?(e=r,n):l)(t,e)}function Uo(t){return function(){this.removeAttribute(t)}}function Vo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xo(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttribute(t);return s===a?null:s===i?o:o=e(i=s,r)}}function Go(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?o:o=e(i=s,r)}}function Zo(t,e,r){var i,o,a;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttribute(t))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l));this.removeAttribute(t)}}function Qo(t,e,r){var i,o,a;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function Jo(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function Ko(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function ta(t,e){return function(){Po(this,t).delay=+e.apply(this,arguments)}}function ea(t,e){return e=+e,function(){Po(this,t).delay=e}}function ra(t,e){return function(){Wo(this,t).duration=+e.apply(this,arguments)}}function ia(t,e){return e=+e,function(){Wo(this,t).duration=e}}var oa=yo.prototype.constructor;function aa(t){return function(){this.style.removeProperty(t)}}var sa=0;function na(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function la(){return++sa}var ha=yo.prototype;na.prototype={constructor:na,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=di(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var n,l,h=i[s],c=h.length,d=a[s]=new Array(c),u=0;u<c;++u)(n=h[u])&&(l=t.call(n,n.__data__,u,h))&&("__data__"in n&&(l.__data__=n.__data__),d[u]=l,zo(d[u],e,r,u,d,Ro(n,r)));return new na(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=pi(t));for(var i=this._groups,o=i.length,a=[],s=[],n=0;n<o;++n)for(var l,h=i[n],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=Ro(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&zo(u,e,r,f,p,g);a.push(p),s.push(l)}return new na(a,s,e,r)},selectChild:ha.selectChild,selectChildren:ha.selectChildren,filter:function(t){"function"!=typeof t&&(t=fi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new na(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),s=new Array(i),n=0;n<a;++n)for(var l,h=e[n],c=r[n],d=h.length,u=s[n]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;n<i;++n)s[n]=e[n];return new na(s,this._parents,this._name,this._id)},selection:function(){return new oa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=la(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)if(s=n[h]){var c=Ro(s,e);zo(s,t,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new na(i,this._parents,t,r)},call:ha.call,nodes:ha.nodes,node:ha.node,size:ha.size,empty:ha.empty,each:ha.each,on:function(t,e){var r=this._id;return arguments.length<2?Ro(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?Po:Wo;return function(){var s=a(this,t),n=s.on;n!==i&&(o=(i=n).copy()).on(e,r),s.on=o}}(r,t,e))},attr:function(t,e){var r=si(t),i="transform"===r?et:Yo;return this.attrTween(t,"function"==typeof e?(r.local?Qo:Zo)(r,i,Ho(this,"attr."+t,e)):null==e?(r.local?Vo:Uo)(r):(r.local?Go:Xo)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=si(t);return this.tween(r,(i.local?Jo:Ko)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?tt:Yo;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var a=zi(this,t),s=(this.style.removeProperty(t),zi(this,t));return a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,i)).on("end.style."+t,aa(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,a;return function(){var s=zi(this,t),n=r(this),l=n+"";return null==n&&(this.style.removeProperty(t),l=n=zi(this,t)),s===l?null:s===i&&l===o?a:(o=l,a=e(i=s,n))}}(t,i,Ho(this,"style."+t,e))).each(function(t,e){var r,i,o,a,s="style."+e,n="end."+s;return function(){var l=Wo(this,t),h=l.on,c=null==l.value[s]?a||(a=aa(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(n,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,a=r+"";return function(){var s=zi(this,t);return s===a?null:s===i?o:o=e(i=s,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function a(){var a=e.apply(this,arguments);return a!==o&&(i=(o=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ho(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=Ro(this.node(),r).tween,a=0,s=o.length;a<s;++a)if((i=o[a]).name===t)return i.value;return null}return this.each((null==e?No:jo)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ta:ea)(e,t)):Ro(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ra:ia)(e,t)):Ro(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Wo(this,t).ease=e}}(e,t)):Ro(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;Wo(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var n={value:s},l={value:function(){0===--o&&a()}};r.each(function(){var r=Wo(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(n),e._.interrupt.push(n),e._.end.push(l)),r.on=e}),0===o&&a()})},[Symbol.iterator]:ha[Symbol.iterator]};var ca={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function da(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function ua(t,e,r){this.k=t,this.x=e,this.y=r}yo.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,o,a=t.__transition,s=!0;if(a){for(o in e=null==e?null:e+"",a)(r=a[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[o]):s=!1;s&&delete t.__transition}}(this,t)})},yo.prototype.transition=function(t){var e,r;t instanceof na?(e=t._id,t=t._name):(e=la(),(r=ca).time=Lo(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)(s=n[h])&&zo(s,t,e,h,n,r||da(s,e));return new na(i,this._parents,t,e)},ua.prototype={constructor:ua,scale:function(t){return 1===t?this:new ua(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ua(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ua.prototype;var pa=ht(t=>{const{securityLevel:e}=jr();let r=mo("body");if("sandbox"===e){const e=mo(`#i${t}`);r=mo((e.node()?.contentDocument??document).body)}return r.select(`#${t}`)},"selectSvgElement");function ga(t){return null==t}function fa(t){return"object"==typeof t&&null!==t}function ya(t){return Array.isArray(t)?t:ga(t)?[]:[t]}function ma(t,e){var r,i,o,a;if(e)for(r=0,i=(a=Object.keys(e)).length;r<i;r+=1)t[o=a[r]]=e[o];return t}function Ca(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function xa(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}ht(ga,"isNothing"),ht(fa,"isObject"),ht(ya,"toArray"),ht(ma,"extend"),ht(Ca,"repeat"),ht(xa,"isNegativeZero");var ka={isNothing:ga,isObject:fa,toArray:ya,repeat:Ca,isNegativeZero:xa,extend:ma};function ba(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function wa(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ba(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}ht(ba,"formatError"),ht(wa,"YAMLException$1"),wa.prototype=Object.create(Error.prototype),wa.prototype.constructor=wa,wa.prototype.toString=ht(function(t){return this.name+": "+ba(this,t)},"toString");var Ta=wa;function Ba(t,e,r,i,o){var a="",s="",n=Math.floor(o/2)-1;return i-e>n&&(e=i-n+(a=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function Sa(t,e){return ka.repeat(" ",e-t.length)+t}function va(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,o=[0],a=[],s=-1;r=i.exec(t.buffer);)a.push(r.index),o.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var n,l,h="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+c+3);for(n=1;n<=e.linesBefore&&!(s-n<0);n++)l=Ba(t.buffer,o[s-n],a[s-n],t.position-(o[s]-o[s-n]),d),h=ka.repeat(" ",e.indent)+Sa((t.line-n+1).toString(),c)+" | "+l.str+"\n"+h;for(l=Ba(t.buffer,o[s],a[s],t.position,d),h+=ka.repeat(" ",e.indent)+Sa((t.line+1).toString(),c)+" | "+l.str+"\n",h+=ka.repeat("-",e.indent+c+3+l.pos)+"^\n",n=1;n<=e.linesAfter&&!(s+n>=a.length);n++)l=Ba(t.buffer,o[s+n],a[s+n],t.position-(o[s]-o[s+n]),d),h+=ka.repeat(" ",e.indent)+Sa((t.line+n+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}ht(Ba,"getLine"),ht(Sa,"padStart"),ht(va,"makeSnippet");var _a=va,La=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Fa=["scalar","sequence","mapping"];function Ma(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function Aa(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===La.indexOf(e))throw new Ta('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Ma(e.styleAliases||null),-1===Fa.indexOf(this.kind))throw new Ta('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}ht(Ma,"compileStyleAliases"),ht(Aa,"Type$1");var $a=Aa;function Ea(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function qa(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(ht(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function Ia(t){return this.extend(t)}ht(Ea,"compileList"),ht(qa,"compileMap"),ht(Ia,"Schema$1"),Ia.prototype.extend=ht(function(t){var e=[],r=[];if(t instanceof $a)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Ta("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof $a))throw new Ta("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Ta("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Ta("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof $a))throw new Ta("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ia.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Ea(i,"implicit"),i.compiledExplicit=Ea(i,"explicit"),i.compiledTypeMap=qa(i.compiledImplicit,i.compiledExplicit),i},"extend");var Oa=new Ia({explicit:[new $a("tag:yaml.org,2002:str",{kind:"scalar",construct:ht(function(t){return null!==t?t:""},"construct")}),new $a("tag:yaml.org,2002:seq",{kind:"sequence",construct:ht(function(t){return null!==t?t:[]},"construct")}),new $a("tag:yaml.org,2002:map",{kind:"mapping",construct:ht(function(t){return null!==t?t:{}},"construct")})]});function Da(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function za(){return null}function Pa(t){return null===t}ht(Da,"resolveYamlNull"),ht(za,"constructYamlNull"),ht(Pa,"isNull");var Wa=new $a("tag:yaml.org,2002:null",{kind:"scalar",resolve:Da,construct:za,predicate:Pa,represent:{canonical:ht(function(){return"~"},"canonical"),lowercase:ht(function(){return"null"},"lowercase"),uppercase:ht(function(){return"NULL"},"uppercase"),camelcase:ht(function(){return"Null"},"camelcase"),empty:ht(function(){return""},"empty")},defaultStyle:"lowercase"});function Ra(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function Na(t){return"true"===t||"True"===t||"TRUE"===t}function ja(t){return"[object Boolean]"===Object.prototype.toString.call(t)}ht(Ra,"resolveYamlBoolean"),ht(Na,"constructYamlBoolean"),ht(ja,"isBoolean");var Ha=new $a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ra,construct:Na,predicate:ja,represent:{lowercase:ht(function(t){return t?"true":"false"},"lowercase"),uppercase:ht(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:ht(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ya(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ua(t){return 48<=t&&t<=55}function Va(t){return 48<=t&&t<=57}function Xa(t){if(null===t)return!1;var e,r=t.length,i=0,o=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;o=!0}return o&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Ya(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Ua(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!Va(t.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===e)}function Ga(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Za(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!ka.isNegativeZero(t)}ht(Ya,"isHexCode"),ht(Ua,"isOctCode"),ht(Va,"isDecCode"),ht(Xa,"resolveYamlInteger"),ht(Ga,"constructYamlInteger"),ht(Za,"isInteger");var Qa=new $a("tag:yaml.org,2002:int",{kind:"scalar",resolve:Xa,construct:Ga,predicate:Za,represent:{binary:ht(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:ht(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:ht(function(t){return t.toString(10)},"decimal"),hexadecimal:ht(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ja=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ka(t){return null!==t&&!(!Ja.test(t)||"_"===t[t.length-1])}function ts(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}ht(Ka,"resolveYamlFloat"),ht(ts,"constructYamlFloat");var es=/^[-+]?[0-9]+e/;function rs(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ka.isNegativeZero(t))return"-0.0";return r=t.toString(10),es.test(r)?r.replace("e",".e"):r}function is(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ka.isNegativeZero(t))}ht(rs,"representYamlFloat"),ht(is,"isFloat");var os=new $a("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ka,construct:ts,predicate:is,represent:rs,defaultStyle:"lowercase"}),as=Oa.extend({implicit:[Wa,Ha,Qa,os]}),ss=as,ns=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ls=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 hs(t){return null!==t&&(null!==ns.exec(t)||null!==ls.exec(t))}function cs(t){var e,r,i,o,a,s,n,l,h=0,c=null;if(null===(e=ns.exec(t))&&(e=ls.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],s=+e[5],n=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,o,a,s,n,h)),c&&l.setTime(l.getTime()-c),l}function ds(t){return t.toISOString()}ht(hs,"resolveYamlTimestamp"),ht(cs,"constructYamlTimestamp"),ht(ds,"representYamlTimestamp");var us=new $a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hs,construct:cs,instanceOf:Date,represent:ds});function ps(t){return"<<"===t||null===t}ht(ps,"resolveYamlMerge");var gs=new $a("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ps}),fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ys(t){if(null===t)return!1;var e,r,i=0,o=t.length,a=fs;for(r=0;r<o;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function ms(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=fs,s=0,n=[];for(e=0;e<o;e++)e%4==0&&e&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|a.indexOf(i.charAt(e));return 0===(r=o%4*6)?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):18===r?(n.push(s>>10&255),n.push(s>>2&255)):12===r&&n.push(s>>4&255),new Uint8Array(n)}function Cs(t){var e,r,i="",o=0,a=t.length,s=fs;for(e=0;e<a;e++)e%3==0&&e&&(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]),o=(o<<8)+t[e];return 0===(r=a%3)?(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]):2===r?(i+=s[o>>10&63],i+=s[o>>4&63],i+=s[o<<2&63],i+=s[64]):1===r&&(i+=s[o>>2&63],i+=s[o<<4&63],i+=s[64],i+=s[64]),i}function xs(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}ht(ys,"resolveYamlBinary"),ht(ms,"constructYamlBinary"),ht(Cs,"representYamlBinary"),ht(xs,"isBinary");var ks=new $a("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ys,construct:ms,predicate:xs,represent:Cs}),bs=Object.prototype.hasOwnProperty,ws=Object.prototype.toString;function Ts(t){if(null===t)return!0;var e,r,i,o,a,s=[],n=t;for(e=0,r=n.length;e<r;e+=1){if(i=n[e],a=!1,"[object Object]"!==ws.call(i))return!1;for(o in i)if(bs.call(i,o)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==s.indexOf(o))return!1;s.push(o)}return!0}function Bs(t){return null!==t?t:[]}ht(Ts,"resolveYamlOmap"),ht(Bs,"constructYamlOmap");var Ss=new $a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ts,construct:Bs}),vs=Object.prototype.toString;function _s(t){if(null===t)return!0;var e,r,i,o,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(i=s[e],"[object Object]"!==vs.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;a[e]=[o[0],i[o[0]]]}return!0}function Ls(t){if(null===t)return[];var e,r,i,o,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)i=s[e],o=Object.keys(i),a[e]=[o[0],i[o[0]]];return a}ht(_s,"resolveYamlPairs"),ht(Ls,"constructYamlPairs");var Fs=new $a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:_s,construct:Ls}),Ms=Object.prototype.hasOwnProperty;function As(t){if(null===t)return!0;var e,r=t;for(e in r)if(Ms.call(r,e)&&null!==r[e])return!1;return!0}function $s(t){return null!==t?t:{}}ht(As,"resolveYamlSet"),ht($s,"constructYamlSet");var Es=new $a("tag:yaml.org,2002:set",{kind:"mapping",resolve:As,construct:$s}),qs=ss.extend({implicit:[us,gs],explicit:[ks,Ss,Fs,Es]}),Is=Object.prototype.hasOwnProperty,Os=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ds=/[\x85\u2028\u2029]/,zs=/[,\[\]\{\}]/,Ps=/^(?:!|!!|![a-z\-]+!)$/i,Ws=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Rs(t){return Object.prototype.toString.call(t)}function Ns(t){return 10===t||13===t}function js(t){return 9===t||32===t}function Hs(t){return 9===t||32===t||10===t||13===t}function Ys(t){return 44===t||91===t||93===t||123===t||125===t}function Us(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Vs(t){return 120===t?2:117===t?4:85===t?8:0}function Xs(t){return 48<=t&&t<=57?t-48:-1}function Gs(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Zs(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Qs(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}ht(Rs,"_class"),ht(Ns,"is_EOL"),ht(js,"is_WHITE_SPACE"),ht(Hs,"is_WS_OR_EOL"),ht(Ys,"is_FLOW_INDICATOR"),ht(Us,"fromHexCode"),ht(Vs,"escapedHexLen"),ht(Xs,"fromDecimalCode"),ht(Gs,"simpleEscapeSequence"),ht(Zs,"charFromCodepoint"),ht(Qs,"setProperty");var Js,Ks=new Array(256),tn=new Array(256);for(Js=0;Js<256;Js++)Ks[Js]=Gs(Js)?1:0,tn[Js]=Gs(Js);function en(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qs,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function rn(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=_a(r),new Ta(e,r)}function on(t,e){throw rn(t,e)}function an(t,e){t.onWarning&&t.onWarning.call(null,rn(t,e))}ht(en,"State$1"),ht(rn,"generateError"),ht(on,"throwError"),ht(an,"throwWarning");var sn={YAML:ht(function(t,e,r){var i,o,a;null!==t.version&&on(t,"duplication of %YAML directive"),1!==r.length&&on(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&on(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),1!==o&&on(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&an(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:ht(function(t,e,r){var i,o;2!==r.length&&on(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Ps.test(i)||on(t,"ill-formed tag handle (first argument) of the TAG directive"),Is.call(t.tagMap,i)&&on(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ws.test(o)||on(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){on(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function nn(t,e,r,i){var o,a,s,n;if(e<r){if(n=t.input.slice(e,r),i)for(o=0,a=n.length;o<a;o+=1)9===(s=n.charCodeAt(o))||32<=s&&s<=1114111||on(t,"expected valid JSON character");else Os.test(n)&&on(t,"the stream contains non-printable characters");t.result+=n}}function ln(t,e,r,i){var o,a,s,n;for(ka.isObject(r)||on(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(o=Object.keys(r)).length;s<n;s+=1)a=o[s],Is.call(e,a)||(Qs(e,a,r[a]),i[a]=!0)}function hn(t,e,r,i,o,a,s,n,l){var h,c;if(Array.isArray(o))for(h=0,c=(o=Array.prototype.slice.call(o)).length;h<c;h+=1)Array.isArray(o[h])&&on(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Rs(o[h])&&(o[h]="[object Object]");if("object"==typeof o&&"[object Object]"===Rs(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)ln(t,e,a[h],r);else ln(t,e,a,r);else t.json||Is.call(r,o)||!Is.call(e,o)||(t.line=s||t.line,t.lineStart=n||t.lineStart,t.position=l||t.position,on(t,"duplicated mapping key")),Qs(e,o,a),delete r[o];return e}function cn(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):on(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function dn(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);0!==o;){for(;js(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!Ns(o))break;for(cn(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&an(t,"deficient indentation"),i}function un(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Hs(e)))}function pn(t,e){1===e?t.result+=" ":e>1&&(t.result+=ka.repeat("\n",e-1))}function gn(t,e,r){var i,o,a,s,n,l,h,c,d=t.kind,u=t.result;if(Hs(c=t.input.charCodeAt(t.position))||Ys(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Hs(i=t.input.charCodeAt(t.position+1))||r&&Ys(i)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;0!==c;){if(58===c){if(Hs(i=t.input.charCodeAt(t.position+1))||r&&Ys(i))break}else if(35===c){if(Hs(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&un(t)||r&&Ys(c))break;if(Ns(c)){if(n=t.line,l=t.lineStart,h=t.lineIndent,dn(t,!1,-1),t.lineIndent>=e){s=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=n,t.lineStart=l,t.lineIndent=h;break}}s&&(nn(t,o,a,!1),pn(t,t.line-n),o=a=t.position,s=!1),js(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return nn(t,o,a,!1),!!t.result||(t.kind=d,t.result=u,!1)}function fn(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(nn(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else Ns(r)?(nn(t,i,o,!0),pn(t,dn(t,!1,e)),i=o=t.position):t.position===t.lineStart&&un(t)?on(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);on(t,"unexpected end of the stream within a single quoted scalar")}function yn(t,e){var r,i,o,a,s,n;if(34!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));){if(34===n)return nn(t,r,t.position,!0),t.position++,!0;if(92===n){if(nn(t,r,t.position,!0),Ns(n=t.input.charCodeAt(++t.position)))dn(t,!1,e);else if(n<256&&Ks[n])t.result+=tn[n],t.position++;else if((s=Vs(n))>0){for(o=s,a=0;o>0;o--)(s=Us(n=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:on(t,"expected hexadecimal character");t.result+=Zs(a),t.position++}else on(t,"unknown escape sequence");r=i=t.position}else Ns(n)?(nn(t,r,i,!0),pn(t,dn(t,!1,e)),r=i=t.position):t.position===t.lineStart&&un(t)?on(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}on(t,"unexpected end of the stream within a double quoted scalar")}function mn(t,e){var r,i,o,a,s,n,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,h=!1,a=[];else{if(123!==p)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(dn(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;g?44===p&&on(t,"expected the node content, but found ','"):on(t,"missed comma between flow collection entries"),u=null,n=l=!1,63===p&&Hs(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,dn(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,Bn(t,e,1,!1,!0),d=t.tag,c=t.result,dn(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(n=!0,p=t.input.charCodeAt(++t.position),dn(t,!0,e),Bn(t,e,1,!1,!0),u=t.result),h?hn(t,a,m,d,c,u,r,i,o):n?a.push(hn(t,null,m,d,c,u,r,i,o)):a.push(c),dn(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}on(t,"unexpected end of the stream within a flow collection")}function Cn(t,e){var r,i,o,a,s=1,n=!1,l=!1,h=e,c=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:on(t,"repeat of a chomping mode identifier");else{if(!((o=Xs(a))>=0))break;0===o?on(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?on(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if(js(a)){do{a=t.input.charCodeAt(++t.position)}while(js(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Ns(a)&&0!==a)}for(;0!==a;){for(cn(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),Ns(a))c++;else{if(t.lineIndent<h){3===s?t.result+=ka.repeat("\n",n?1+c:c):1===s&&n&&(t.result+="\n");break}for(i?js(a)?(d=!0,t.result+=ka.repeat("\n",n?1+c:c)):d?(d=!1,t.result+=ka.repeat("\n",c+1)):0===c?n&&(t.result+=" "):t.result+=ka.repeat("\n",c):t.result+=ka.repeat("\n",n?1+c:c),n=!0,l=!0,c=0,r=t.position;!Ns(a)&&0!==a;)a=t.input.charCodeAt(++t.position);nn(t,r,t.position,!1)}}return!0}function xn(t,e){var r,i,o=t.tag,a=t.anchor,s=[],n=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,on(t,"tab characters must not be used in indentation")),45===i)&&Hs(t.input.charCodeAt(t.position+1));)if(n=!0,t.position++,dn(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Bn(t,e,3,!1,!0),s.push(t.result),dn(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)on(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!n&&(t.tag=o,t.anchor=a,t.kind="sequence",t.result=s,!0)}function kn(t,e,r){var i,o,a,s,n,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,C=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,on(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==h&&58!==h||!Hs(i)){if(s=t.line,n=t.lineStart,l=t.position,!Bn(t,r,2,!1,!0))break;if(t.line===a){for(h=t.input.charCodeAt(t.position);js(h);)h=t.input.charCodeAt(++t.position);if(58===h)Hs(h=t.input.charCodeAt(++t.position))||on(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(hn(t,u,p,g,f,null,s,n,l),g=f=y=null),C=!0,m=!1,o=!1,g=t.tag,f=t.result;else{if(!C)return t.tag=c,t.anchor=d,!0;on(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return t.tag=c,t.anchor=d,!0;on(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(hn(t,u,p,g,f,null,s,n,l),g=f=y=null),C=!0,m=!0,o=!0):m?(m=!1,o=!0):on(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===a||t.lineIndent>e)&&(m&&(s=t.line,n=t.lineStart,l=t.position),Bn(t,e,4,!0,o)&&(m?f=t.result:y=t.result),m||(hn(t,u,p,g,f,y,s,n,l),g=f=y=null),dn(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)on(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&hn(t,u,p,g,f,null,s,n,l),C&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),C}function bn(t){var e,r,i,o,a=!1,s=!1;if(33!==(o=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&on(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(a=!0,o=t.input.charCodeAt(++t.position)):33===o?(s=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&62!==o);t.position<t.length?(i=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):on(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!Hs(o);)33===o&&(s?on(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Ps.test(r)||on(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),zs.test(i)&&on(t,"tag suffix cannot contain flow indicator characters")}i&&!Ws.test(i)&&on(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){on(t,"tag name is malformed: "+i)}return a?t.tag=i:Is.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:on(t,'undeclared tag handle "'+r+'"'),!0}function wn(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&on(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Hs(r)&&!Ys(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&on(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Tn(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Hs(i)&&!Ys(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&on(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Is.call(t.anchorMap,r)||on(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],dn(t,!0,-1),!0}function Bn(t,e,r,i,o){var a,s,n,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=n=4===r||3===r,i&&dn(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;bn(t)||wn(t);)dn(t,!0,-1)?(f=!0,n=a,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):n=!1;if(n&&(n=f||o),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?n&&(xn(t,p)||kn(t,p,u))||mn(t,u)?y=!0:(s&&Cn(t,u)||fn(t,u)||yn(t,u)?y=!0:Tn(t)?(y=!0,null===t.tag&&null===t.anchor||on(t,"alias node should not have any properties")):gn(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=n&&xn(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&on(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Is.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||on(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&on(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):on(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function Sn(t){var e,r,i,o,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(dn(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(s=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Hs(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&on(t,"directive name must not be less than one character in length");0!==o;){for(;js(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!Ns(o));break}if(Ns(o))break;for(e=t.position;0!==o&&!Hs(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&cn(t),Is.call(sn,r)?sn[r](t,r,i):an(t,'unknown document directive "'+r+'"')}dn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,dn(t,!0,-1)):s&&on(t,"directives end mark is expected"),Bn(t,t.lineIndent-1,4,!1,!0),dn(t,!0,-1),t.checkLineBreaks&&Ds.test(t.input.slice(a,t.position))&&an(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&un(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,dn(t,!0,-1)):t.position<t.length-1&&on(t,"end of the stream or a document separator is expected")}function vn(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new en(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,on(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Sn(r);return r.documents}function _n(t,e){var r=vn(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new Ta("expected a single document in the stream, but found more")}}ht(nn,"captureSegment"),ht(ln,"mergeMappings"),ht(hn,"storeMappingPair"),ht(cn,"readLineBreak"),ht(dn,"skipSeparationSpace"),ht(un,"testDocumentSeparator"),ht(pn,"writeFoldedLines"),ht(gn,"readPlainScalar"),ht(fn,"readSingleQuotedScalar"),ht(yn,"readDoubleQuotedScalar"),ht(mn,"readFlowCollection"),ht(Cn,"readBlockScalar"),ht(xn,"readBlockSequence"),ht(kn,"readBlockMapping"),ht(bn,"readTagProperty"),ht(wn,"readAnchorProperty"),ht(Tn,"readAlias"),ht(Bn,"composeNode"),ht(Sn,"readDocument"),ht(vn,"loadDocuments"),ht(function(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=vn(t,r);if("function"!=typeof e)return i;for(var o=0,a=i.length;o<a;o+=1)e(i[o])},"loadAll$1"),ht(_n,"load$1");var Ln={load:_n},Fn=Object.prototype.toString,Mn=Object.prototype.hasOwnProperty,An=65279,$n={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"},En=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],qn=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function In(t,e){var r,i,o,a,s,n,l;if(null===e)return{};for(r={},o=0,a=(i=Object.keys(e)).length;o<a;o+=1)s=i[o],n=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&Mn.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[s]=n;return r}function On(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new Ta("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+ka.repeat("0",i-e.length)+e}ht(In,"compileStyleMap"),ht(On,"encodeHex");function Dn(t){this.schema=t.schema||qs,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ka.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=In(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function zn(t,e){for(var r,i=ka.repeat(" ",e),o=0,a=-1,s="",n=t.length;o<n;)-1===(a=t.indexOf("\n",o))?(r=t.slice(o),o=n):(r=t.slice(o,a+1),o=a+1),r.length&&"\n"!==r&&(s+=i),s+=r;return s}function Pn(t,e){return"\n"+ka.repeat(" ",t.indent*e)}function Wn(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Rn(t){return 32===t||9===t}function Nn(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==An||65536<=t&&t<=1114111}function jn(t){return Nn(t)&&t!==An&&13!==t&&10!==t}function Hn(t,e,r){var i=jn(t),o=i&&!Rn(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||jn(e)&&!Rn(e)&&35===t||58===e&&o}function Yn(t){return Nn(t)&&t!==An&&!Rn(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Un(t){return!Rn(t)&&58!==t}function Vn(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Xn(t){return/^\n* /.test(t)}ht(Dn,"State"),ht(zn,"indentString"),ht(Pn,"generateNextLine"),ht(Wn,"testImplicitResolving"),ht(Rn,"isWhitespace"),ht(Nn,"isPrintable"),ht(jn,"isNsCharOrWhitespace"),ht(Hn,"isPlainSafe"),ht(Yn,"isPlainSafeFirst"),ht(Un,"isPlainSafeLast"),ht(Vn,"codePointAt"),ht(Xn,"needIndentIndicator");function Gn(t,e,r,i,o,a,s,n){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Yn(Vn(t,0))&&Un(Vn(t,t.length-1));if(e||s)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!Nn(h=Vn(t,l)))return 5;f=f&&Hn(h,c,n),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=Vn(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!Nn(h))return 5;f=f&&Hn(h,c,n),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&Xn(t)?5:s?2===a?5:2:u?4:3:!f||s||o(t)?2===a?5:2:1}function Zn(t,e,r,i,o){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==En.indexOf(e)||qn.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),n=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return Wn(t,e)}switch(ht(l,"testAmbiguity"),Gn(e,n,t.indent,s,l,t.quotingType,t.forceQuotes&&!i,o)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Qn(e,t.indent)+Jn(zn(e,a));case 4:return">"+Qn(e,t.indent)+Jn(zn(Kn(e,s),a));case 5:return'"'+el(e)+'"';default:throw new Ta("impossible error: invalid scalar style")}}()}function Qn(t,e){var r=Xn(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function Jn(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Kn(t,e){for(var r,i,o,a=/(\n+)([^\n]*)/g,s=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,tl(t.slice(0,r),e)),n="\n"===t[0]||" "===t[0];o=a.exec(t);){var l=o[1],h=o[2];i=" "===h[0],s+=l+(n||i||""===h?"":"\n")+tl(h,e),n=i}return s}function tl(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,a=0,s=0,n=0,l="";r=o.exec(t);)(n=r.index)-a>e&&(i=s>a?s:n,l+="\n"+t.slice(a,i),a=i+1),s=n;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function el(t){for(var e,r="",i=0,o=0;o<t.length;i>=65536?o+=2:o++)i=Vn(t,o),!(e=$n[i])&&Nn(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||On(i);return r}function rl(t,e,r){var i,o,a,s="",n=t.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],t.replacer&&(a=t.replacer.call(r,String(i),a)),(nl(t,e,a,!1,!1)||void 0===a&&nl(t,e,null,!1,!1))&&(""!==s&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=n,t.dump="["+s+"]"}function il(t,e,r,i){var o,a,s,n="",l=t.tag;for(o=0,a=r.length;o<a;o+=1)s=r[o],t.replacer&&(s=t.replacer.call(r,String(o),s)),(nl(t,e+1,s,!0,!0,!1,!0)||void 0===s&&nl(t,e+1,null,!0,!0,!1,!0))&&(i&&""===n||(n+=Pn(t,e)),t.dump&&10===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=l,t.dump=n||"[]"}function ol(t,e,r){var i,o,a,s,n,l="",h=t.tag,c=Object.keys(r);for(i=0,o=c.length;i<o;i+=1)n="",""!==l&&(n+=", "),t.condenseFlow&&(n+='"'),s=r[a=c[i]],t.replacer&&(s=t.replacer.call(r,a,s)),nl(t,e,a,!1,!1)&&(t.dump.length>1024&&(n+="? "),n+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),nl(t,e,s,!1,!1)&&(l+=n+=t.dump));t.tag=h,t.dump="{"+l+"}"}function al(t,e,r,i){var o,a,s,n,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new Ta("sortKeys must be a boolean or a function");for(o=0,a=u.length;o<a;o+=1)h="",i&&""===c||(h+=Pn(t,e)),n=r[s=u[o]],t.replacer&&(n=t.replacer.call(r,s,n)),nl(t,e+1,s,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Pn(t,e)),nl(t,e+1,n,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function sl(t,e,r){var i,o,a,s,n,l;for(a=0,s=(o=r?t.explicitTypes:t.implicitTypes).length;a<s;a+=1)if(((n=o[a]).instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof e&&e instanceof n.instanceOf)&&(!n.predicate||n.predicate(e))){if(r?n.multi&&n.representName?t.tag=n.representName(e):t.tag=n.tag:t.tag="?",n.represent){if(l=t.styleMap[n.tag]||n.defaultStyle,"[object Function]"===Fn.call(n.represent))i=n.represent(e,l);else{if(!Mn.call(n.represent,l))throw new Ta("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');i=n.represent[l](e,l)}t.dump=i}return!0}return!1}function nl(t,e,r,i,o,a,s){t.tag=null,t.dump=r,sl(t,r,!1)||sl(t,r,!0);var n,l=Fn.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(al(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(ol(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?il(t,e-1,t.dump,o):il(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(rl(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Ta("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Zn(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(n=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),n="!"===t.tag[0]?"!"+n:"tag:yaml.org,2002:"===n.slice(0,18)?"!!"+n.slice(18):"!<"+n+">",t.dump=n+" "+t.dump)}return!0}function ll(t,e){var r,i,o=[],a=[];for(hl(t,o,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(o[a[r]]);e.usedDuplicates=new Array(i)}function hl(t,e,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=e.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,a=t.length;o<a;o+=1)hl(t[o],e,r);else for(o=0,a=(i=Object.keys(t)).length;o<a;o+=1)hl(t[i[o]],e,r)}ht(Gn,"chooseScalarStyle"),ht(Zn,"writeScalar"),ht(Qn,"blockHeader"),ht(Jn,"dropEndingNewline"),ht(Kn,"foldString"),ht(tl,"foldLine"),ht(el,"escapeString"),ht(rl,"writeFlowSequence"),ht(il,"writeBlockSequence"),ht(ol,"writeFlowMapping"),ht(al,"writeBlockMapping"),ht(sl,"detectType"),ht(nl,"writeNode"),ht(ll,"getDuplicateReferences"),ht(hl,"inspectNode"),ht(function(t,e){var r=new Dn(e=e||{});r.noRefs||ll(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),nl(r,0,i,!0,!0)?r.dump+"\n":""},"dump$1"),ht(function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}},"renamed");var cl=as,dl=Ln.load,ul=ht((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),pl={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},gl={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function fl(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Cl(t),e=Cl(e);const[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,n=a-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}ht(fl,"calculateDeltaAndAngle");var yl,ml,Cl=ht(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),xl=ht(t=>({x:ht(function(e,r,i){let o=0;const a=Cl(i[0]).x<Cl(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(pl,t.arrowTypeStart)){const{angle:e,deltaX:r}=fl(i[0],i[1]);o=pl[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pl,t.arrowTypeEnd)){const{angle:e,deltaX:r}=fl(i[i.length-1],i[i.length-2]);o=pl[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const s=Math.abs(Cl(e).x-Cl(i[i.length-1]).x),n=Math.abs(Cl(e).y-Cl(i[i.length-1]).y),l=Math.abs(Cl(e).x-Cl(i[0]).x),h=Math.abs(Cl(e).y-Cl(i[0]).y),c=pl[t.arrowTypeStart],d=pl[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="right"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===a?-1:1,o+=t}return Cl(e).x+o},"x"),y:ht(function(e,r,i){let o=0;const a=Cl(i[0]).y<Cl(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(pl,t.arrowTypeStart)){const{angle:e,deltaY:r}=fl(i[0],i[1]);o=pl[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pl,t.arrowTypeEnd)){const{angle:e,deltaY:r}=fl(i[i.length-1],i[i.length-2]);o=pl[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const s=Math.abs(Cl(e).y-Cl(i[i.length-1]).y),n=Math.abs(Cl(e).x-Cl(i[i.length-1]).x),l=Math.abs(Cl(e).y-Cl(i[0]).y),h=Math.abs(Cl(e).x-Cl(i[0]).x),c=pl[t.arrowTypeStart],d=pl[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="up"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===a?-1:1,o+=t}return Cl(e).y+o},"y")}),"getLineFunctionsWithOffset"),kl={},bl={};var wl=function(){if(ml)return kl;ml=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.sanitizeUrl=function(i){if(!i)return t.BLANK_URL;var o,a=r(i.trim());do{o=(a=r(a=e(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim())).match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex)}while(o&&o.length>0);var s=a;if(!s)return t.BLANK_URL;if(function(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}(s))return s;var n=s.trimStart(),l=n.match(t.urlSchemeRegex);if(!l)return s;var h=l[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(h))return t.BLANK_URL;var c=n.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return t.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var t=(yl||(yl=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.BLANK_URL=bl.relativeFirstCharacters=bl.whitespaceEscapeCharsRegex=bl.urlSchemeRegex=bl.ctrlCharactersRegex=bl.htmlCtrlEntityRegex=bl.htmlEntitiesRegex=bl.invalidProtocolRegex=void 0,bl.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,bl.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,bl.htmlCtrlEntityRegex=/&(newline|tab);/gi,bl.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,bl.urlSchemeRegex=/^.+(:|:)/gim,bl.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,bl.relativeFirstCharacters=[".","/"],bl.BLANK_URL="about:blank"),bl);function e(e){return e.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function r(t){try{return decodeURIComponent(t)}catch(e){return t}}return kl}(),Tl="",Bl={curveBasis:b,curveBasisClosed:k,curveBasisOpen:x,curveBumpX:C,curveBumpY:m,curveBundle:q,curveCardinalClosed:P,curveCardinalOpen:R,curveCardinal:D,curveCatmullRomClosed:U,curveCatmullRomOpen:G,curveCatmullRom:H,curveLinear:y,curveLinearClosed:f,curveMonotoneX:g,curveMonotoneY:p,curveNatural:u,curveStep:d,curveStepAfter:c,curveStepBefore:h},Sl=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vl=ht(function(t,e){const r=_l(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map(t=>t.args);ve(t),i=Gt(i,[...t])}else i=r.args;if(!i)return;let o=Ht(t,e);const a="config";return void 0!==i[a]&&("flowchart-v2"===o&&(o="flowchart"),i[o]=i[a],delete i[a]),i},"detectInit"),_l=ht(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${Sl.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(r,"").replace(/'/gm,'"'),ut.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(i=Wt.exec(t));)if(i.index===Wt.lastIndex&&Wt.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return ut.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),Ll=ht(function(t){return t.replace(Wt,"")},"removeDirectives"),Fl=ht(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function Ml(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Bl[r]??e}function Al(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?wl.sanitizeUrl(r):r}ht(Ml,"interpolateToCurve"),ht(Al,"formatUrl");var $l=ht((t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let e=0;e<i;e++)if(a=a[r[e]],!a)return void ut.error(`Function name: ${t} not found in window`);a[o](...e)},"runFunc");function El(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function ql(t){let e,r=0;t.forEach(t=>{r+=El(t,e),e=t});return Dl(t,r/2)}function Il(t){return 1===t.length?t[0]:ql(t)}ht(El,"distance"),ht(ql,"traverseEdge"),ht(Il,"calcLabelPosition");var Ol=ht((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Dl=ht((t,e)=>{let r,i=e;for(const e of t){if(r){const t=El(e,r);if(0===t)return r;if(t<i)i-=t;else{const o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:Ol((1-o)*r.x+o*e.x,5),y:Ol((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),zl=ht((t,e,r)=>{ut.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=Dl(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+i.x)/2,s.y=-Math.cos(a)*o+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function Pl(t,e,r){const i=structuredClone(r);ut.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const o=Dl(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-o.y,i[0].x-o.x),n={x:0,y:0};return"start_left"===e?(n.x=Math.sin(s+Math.PI)*a+(i[0].x+o.x)/2,n.y=-Math.cos(s+Math.PI)*a+(i[0].y+o.y)/2):"end_right"===e?(n.x=Math.sin(s-Math.PI)*a+(i[0].x+o.x)/2-5,n.y=-Math.cos(s-Math.PI)*a+(i[0].y+o.y)/2-5):"end_left"===e?(n.x=Math.sin(s)*a+(i[0].x+o.x)/2-5,n.y=-Math.cos(s)*a+(i[0].y+o.y)/2-5):(n.x=Math.sin(s)*a+(i[0].x+o.x)/2,n.y=-Math.cos(s)*a+(i[0].y+o.y)/2),n}function Wl(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}ht(Pl,"calcTerminalLabelPosition"),ht(Wl,"getStylesFromArray");var Rl=0,Nl=ht(()=>(Rl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rl),"generateId");function jl(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}ht(jl,"makeRandomHex");var Hl=ht(t=>jl(t.length),"random"),Yl=ht(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"),Ul=ht(function(t,e){const r=e.text.replace(kr.lineBreakRegex," "),[,i]=ih(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o},"drawSimpleText"),Vl=$((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),kr.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),o=[];let a="";return i.forEach((t,s)=>{const n=Zl(`${t} `,r),l=Zl(a,r);if(n>e){const{hyphenatedStrings:i,remainingWord:s}=Xl(t,e,"-",r);o.push(a,...i),a=s}else l+n>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");s+1===i.length&&o.push(a)}),o.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Xl=$((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let s="";return o.forEach((t,n)=>{const l=`${s}${t}`;if(Zl(l,i)>=e){const t=n+1,e=o.length===t,i=`${l}${r}`;a.push(e?l:i),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Gl(t,e){return Jl(t,e).height}function Zl(t,e){return Jl(t,e).width}ht(Gl,"calculateTextHeight"),ht(Zl,"calculateTextWidth");var Ql,Jl=$((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=ih(r),s=["sans-serif",i],n=t.split(kr.lineBreakRegex),l=[],h=mo("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const t of s){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of n){const s=Yl();s.text=i||"";const n=Ul(c,s).style("font-size",a).style("font-weight",o).style("font-family",t),l=(n._groups||n)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}l.push(r)}c.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Kl=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{ht(this,"InitIDGenerator")}},th=ht(function(t){return Ql=Ql||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ql.innerHTML=t,unescape(Ql.textContent)},"entityDecode");function eh(t){return"str"in t}ht(eh,"isDetailedError");var rh=ht((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),ih=ht(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function oh(t,e){return A({},t,e)}ht(oh,"cleanAndMerge");var ah={assignWithDepth:Gt,wrapLabel:Vl,calculateTextHeight:Gl,calculateTextWidth:Zl,calculateTextDimensions:Jl,cleanAndMerge:oh,detectInit:vl,detectDirective:_l,isSubstringInArray:Fl,interpolateToCurve:Ml,calcLabelPosition:Il,calcCardinalityPosition:zl,calcTerminalLabelPosition:Pl,formatUrl:Al,getStylesFromArray:Wl,generateId:Nl,random:Hl,runFunc:$l,entityDecode:th,insertTitle:rh,isLabelCoordinateInPath:ch,parseFontSize:ih,InitIDGenerator:Kl},sh=ht(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),nh=ht(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),lh=ht((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function hh(t){return t??null}function ch(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}ht(hh,"handleUndefinedAttr"),ht(ch,"isLabelCoordinateInPath");var dh=ht(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function uh(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const i=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",i){const e=jr().fontSize?jr().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=Se.fontSize]=ih(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}ht(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}ht(uh,"configureLabelImages");var ph=ht(t=>{const{handDrawnSeed:e}=jr();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),gh=ht(t=>{const e=fh([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),fh=ht(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),yh=ht(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),mh=ht(t=>{const{stylesArray:e}=gh(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{const e=t[0];yh(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),Ch=ht((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=jr(),{nodeBorder:o,mainBkg:a}=r,{stylesMap:s}=gh(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||o,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:xh(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),xh=ht(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");const kh=Object.freeze({left:0,top:0,width:16,height:16}),bh=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wh=Object.freeze({...kh,...bh}),Th=Object.freeze({...wh,body:"",hidden:!1}),Bh=Object.freeze({width:null,height:null}),Sh=Object.freeze({...Bh,...bh}),vh=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function _h(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in Th)i in bh?i in t&&!(i in r)&&(r[i]=bh[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Lh(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let a={};function s(t){a=_h(i[t]||o[t],a)}return s(e),r.forEach(s),_h(t,a)}function Fh(t,e){if(t.icons[e])return Lh(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(o[e]=[r].concat(a))}return o[e]}),o}(t,[e])[e];return r?Lh(t,e,r):null}const Mh=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ah=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $h(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(Mh);if(null===i||!i.length)return t;const o=[];let a=i.shift(),s=Ah.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(a=i.shift(),void 0===a)return o.join("");s=!s}}const Eh=/\sid="(\S+)"/g,qh=new Map;function Ih(t){const e=[];let r;for(;r=Eh.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=qh.get(t)||0;return qh.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}function Oh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Dh={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function zh(t){Dh=t}var Ph={exec:()=>null};function Wh(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(Nh.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var Rh=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Nh={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},jh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Hh=/(?:[*+-]|\d{1,9}[.)])/,Yh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Uh=Wh(Yh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Vh=Wh(Yh).replace(/bull/g,Hh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Zh=Wh(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Gh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qh=Wh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hh).getRegex(),Jh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tc=Wh("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Kh).replace("tag",Jh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ec=Wh(Xh).replace("hr",jh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jh).getRegex(),rc={blockquote:Wh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ec).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Zh,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:jh,html:tc,lheading:Uh,list:Qh,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ec,table:Ph,text:/^[^\n]+/},ic=Wh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jh).getRegex(),oc={...rc,lheading:Vh,table:ic,paragraph:Wh(Xh).replace("hr",jh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ic).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jh).getRegex()},ac={...rc,html:Wh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Kh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ph,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wh(Xh).replace("hr",jh).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Uh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},sc=/^( {2,}|\\)\n(?!\s*$)/,nc=/[\p{P}\p{S}]/u,lc=/[\s\p{P}\p{S}]/u,hc=/[^\s\p{P}\p{S}]/u,cc=Wh(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lc).getRegex(),dc=/(?!~)[\p{P}\p{S}]/u,uc=Wh(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Rh?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,gc=Wh(pc,"u").replace(/punct/g,nc).getRegex(),fc=Wh(pc,"u").replace(/punct/g,dc).getRegex(),yc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mc=Wh(yc,"gu").replace(/notPunctSpace/g,hc).replace(/punctSpace/g,lc).replace(/punct/g,nc).getRegex(),Cc=Wh(yc,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,dc).getRegex(),xc=Wh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hc).replace(/punctSpace/g,lc).replace(/punct/g,nc).getRegex(),kc=Wh(/\\(punct)/,"gu").replace(/punct/g,nc).getRegex(),bc=Wh(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wc=Wh(Kh).replace("(?:--\x3e|$)","--\x3e").getRegex(),Tc=Wh("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Sc=Wh(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vc=Wh(/^!?\[(label)\]\[(ref)\]/).replace("label",Bc).replace("ref",Gh).getRegex(),_c=Wh(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gh).getRegex(),Lc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Fc={_backpedal:Ph,anyPunctuation:kc,autolink:bc,blockSkip:uc,br:sc,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Ph,emStrongLDelim:gc,emStrongRDelimAst:mc,emStrongRDelimUnd:xc,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Sc,nolink:_c,punctuation:cc,reflink:vc,reflinkSearch:Wh("reflink|nolink(?!\\()","g").replace("reflink",vc).replace("nolink",_c).getRegex(),tag:Tc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Ph},Mc={...Fc,link:Wh(/^!?\[(label)\]\((.*?)\)/).replace("label",Bc).getRegex(),reflink:Wh(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bc).getRegex()},Ac={...Fc,emStrongRDelimAst:Cc,emStrongLDelim:fc,url:Wh(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Lc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Wh(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Lc).getRegex()},$c={...Ac,br:Wh(sc).replace("{2,}","*").getRegex(),text:Wh(Ac.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ec={normal:rc,gfm:oc,pedantic:ac},qc={normal:Fc,gfm:Ac,breaks:$c,pedantic:Mc},Ic={"&":"&","<":"<",">":">",'"':""","'":"'"},Oc=t=>Ic[t];function Dc(t,e){if(e){if(Nh.escapeTest.test(t))return t.replace(Nh.escapeReplace,Oc)}else if(Nh.escapeTestNoEncode.test(t))return t.replace(Nh.escapeReplaceNoEncode,Oc);return t}function zc(t){try{t=encodeURI(t).replace(Nh.percentDecode,"%")}catch{return null}return t}function Pc(t,e){let r=t.replace(Nh.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}),i=r.split(Nh.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(Nh.slashPipe,"|");return i}function Wc(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){if(t.charAt(i-o-1)!==e)break;o++}return t.slice(0,i-o)}function Rc(t,e,r,i,o){let a=e.href,s=e.title||null,n=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:s,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}var Nc=class{options;rules;lexer;constructor(t){this.options=t||Dh}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Wc(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=Wc(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Wc(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=Wc(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,a=!1,s=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))s.push(t[e]),a=!0;else{if(a)break;s.push(t[e])}t=t.slice(e);let n=s.join("\n"),l=n.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${n}`:n,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),s=this.blockquote(a);o[o.length-1]=s,r=r.substring(0,r.length-e.raw.length)+s.raw,i=i.substring(0,i.length-e.text.length)+s.text;break}if("list"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),s=this.list(a);o[o.length-1]=s,r=r.substring(0,r.length-c.raw.length)+s.raw,i=i.substring(0,i.length-e.raw.length)+s.raw,t=a.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,i="",n="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,n=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,n=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),s=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||a.test(h)||s.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())n+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||a.test(l)||r.test(l))break;n+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(n),p&&(u="[ ] "!==p[0],n=n.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:n,tokens:[]}),o.raw+=i}let n=o.items.at(-1);if(!n)return;n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Pc(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of o)a.rows.push(Pc(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=Wc(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),Rc(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return Rc(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,a=[...i[0]].length-1,s=a,n=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){s+=o;continue}if((i[5]||i[6])&&a%3&&!((a+o)%3)){n+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+n);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+o);if(Math.min(a,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},jc=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Dh,this.options.tokenizer=this.options.tokenizer||new Nc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:Nh,block:Ec.normal,inline:qc.normal};this.options.pedantic?(e.block=Ec.pedantic,e.inline=qc.pedantic):this.options.gfm&&(e.block=Ec.gfm,this.options.breaks?e.inline=qc.breaks:e.inline=qc.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ec,inline:qc}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(Nh.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(Nh.tabCharGlobal," ").replace(Nh.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;t;){let r;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,s)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Hc=class{options;parser;constructor(t){this.options=t||Dh}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(Nh.notSpaceStart)?.[0],o=t.replace(Nh.endingNewline,"")+"\n";return i?'<pre><code class="language-'+Dc(i)+'">'+(r?o:Dc(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:Dc(o,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+Dc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Dc(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=zc(t);if(null===o)return i;let a='<a href="'+(t=o)+'"';return e&&(a+=' title="'+Dc(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=zc(t);if(null===o)return Dc(r);let a=`<img src="${t=o}" alt="${r}"`;return e&&(a+=` title="${Dc(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Dc(t.text)}},Yc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Uc=class t{options;renderer;textRenderer;constructor(t){this.options=t||Dh,this.options.renderer=this.options.renderer||new Hc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Yc}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=o;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let o=a,s=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],s+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let a=o;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},Vc=class{options;block;constructor(t){this.options=t||Dh}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?jc.lex:jc.lexInline}provideParser(){return this.block?Uc.parse:Uc.parseInline}},Xc=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Uc;Renderer=Hc;TextRenderer=Yc;Lexer=jc;Tokenizer=Nc;Hooks=Vc;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Hc(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Nc(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Vc;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],a=e[i];Vc.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Vc.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return a.call(e,r)})();let i=o.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return jc.lex(t,e??this.defaults)}parser(t,e){return Uc.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?jc.lex:jc.lexInline)(r,o),a=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(a,o.walkTokens));let s=await(o.hooks?await o.hooks.provideParser():t?Uc.parse:Uc.parseInline)(a,o);return o.hooks?await o.hooks.postprocess(s):s})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?jc.lex:jc.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?Uc.parse:Uc.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+Dc(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Gc(t,e){return Xc.parse(t,e)}function Zc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,o)+"}","g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach(function(t,e){var r=s.match(/(?:^|\n)( *)$/),o=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+o+t}).join("\n")),s+=a+i[e+1]}),s}Gc.options=Gc.setOptions=function(t){return Xc.setOptions(t),Gc.defaults=Xc.defaults,zh(Gc.defaults),Gc},Gc.getDefaults=Oh,Gc.defaults=Dh,Gc.use=function(...t){return Xc.use(...t),Gc.defaults=Xc.defaults,zh(Gc.defaults),Gc},Gc.walkTokens=function(t,e){return Xc.walkTokens(t,e)},Gc.parseInline=Xc.parseInline,Gc.Parser=Uc,Gc.parser=Uc.parse,Gc.Renderer=Hc,Gc.TextRenderer=Yc,Gc.Lexer=jc,Gc.lexer=jc.lex,Gc.Tokenizer=Nc,Gc.Hooks=Vc,Gc.parse=Gc,Gc.options,Gc.setOptions,Gc.use,Gc.walkTokens,Gc.parseInline,Uc.parse,jc.lex;var Qc={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},Jc=new Map,Kc=new Map,td=ht(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(ut.debug("Registering icon pack:",e.name),"loader"in e)Kc.set(e.name,e.loader);else{if(!("icons"in e))throw ut.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Jc.set(e.name,e.icons)}}},"registerIconPacks"),ed=ht(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),e=o.pop(),r={provider:o.length>0?o[0]:i,prefix:e,name:t};return vh(r)?r:null}const a=o[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return vh(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:a};return vh(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=Jc.get(i);if(!o){const t=Kc.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},Jc.set(i,o)}catch(t){throw ut.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Fh(o,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),rd=ht(async t=>{try{return await ed(t),!0}catch{return!1}},"isIconAvailable"),id=ht(async(t,e,r)=>{let i;try{i=await ed(t,e?.fallbackPrefix)}catch(t){ut.error(t),i=Qc}const o=function(t,e){const r={...wh,...t},i={...Sh,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let s,n=t.rotate;switch(r?i?n+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4,n){case 1:s=o.height/2+o.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:s=o.width/2+o.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}n%2==1&&(o.left!==o.top&&(s=o.left,o.left=o.top,o.top=s),o.width!==o.height&&(s=o.width,o.width=o.height,o.height=s)),e.length&&(a=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===o||-1===a)break;const s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(t);return o=i.defs,a=e+i.content+r,o?"<defs>"+o+"</defs>"+a:a;var o,a}(a,'<g transform="'+e.join(" ")+'">',"</g>"))});const s=i.width,n=i.height,l=o.width,h=o.height;let c,d;null===s?(d=null===n?"1em":"auto"===n?h:n,c=$h(d,l/h)):(c="auto"===s?l:s,d=null===n?$h(c,h/l):"auto"===n?h:n);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[o.left,o.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:a}}(i,e),a=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(Ih(o.body),{...o.attributes,...r});return er(a,Pe())},"getIconSVG");function od(t,{markdownAutoWrap:e}){return Zc(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"))}function ad(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function sd(t,e={}){const r=od(t,e),i=Gc.lexer(r),o=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[a].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return ht(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function nd(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function ld(t,{markdownAutoWrap:e}={}){const r=Gc.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(ut.warn(`Unsupported markdown: ${t.type}`),t.raw)}return ht(i,"output"),r.map(i).join("")}function hd(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function cd(t,e){return dd(t,[],hd(e.content),e.type)}function dd(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?dd(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function ud(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return pd(t,e)}function pd(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return pd(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,o]=cd(e,a);r.push([i]),o.content&&t.unshift(o)}return pd(t,e,r)}function gd(t,e){e&&t.attr("style",e)}ht(od,"preprocessMarkdown"),ht(ad,"nonMarkdownToLines"),ht(sd,"markdownToLines"),ht(nd,"nonMarkdownToHTML"),ht(ld,"markdownToHTML"),ht(hd,"splitTextToChars"),ht(cd,"splitWordToFitWidth"),ht(dd,"splitWordToFitWidthRecursion"),ht(ud,"splitLineToFitWidth"),ht(pd,"splitLineToFitWidthRecursion"),ht(gd,"applyStyle");async function fd(t,e,r,i,o=!1,a=Pe()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const n=s.append("xhtml:div"),l=yr(e.label)?await xr(e.label.replace(kr.lineBreakRegex,"\n"),a):er(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),gd(c,e.labelStyle),c.attr("class",`${h} ${i}`),gd(n,e.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),s.node()}function yd(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function md(t,e,r){const i=t.append("text"),o=yd(i,1,e);bd(o,r);const a=o.node().getComputedTextLength();return i.remove(),a}function Cd(t,e,r){const i=t.append("text"),o=yd(i,1,e);bd(o,[{content:r,type:"normal"}]);const a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function xd(t,e,r,i=!1,o=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),n=a.append("text").attr("y","-10.1");o&&n.attr("text-anchor","middle");let l=0;for(const e of r){const r=ht(e=>md(a,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:ud(e,r);for(const t of i){bd(yd(n,l,1.1,o),t),l++}}if(i){const t=n.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return n.node()}function kd(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function bd(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(kd(e.content)):i.text(" "+kd(e.content))})}async function wd(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,o)=>(r.push((async()=>{const r=`${i}:${o}`;return await rd(r)?await id(r,void 0,{class:"label-icon"}):`<i class='${er(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}ht(fd,"addHtmlSpan"),ht(yd,"createTspan"),ht(md,"computeWidthOfText"),ht(Cd,"computeDimensionOfText"),ht(xd,"createFormattedText"),ht(kd,"decodeHTMLEntities"),ht(bd,"updateTextContentAndStyles"),ht(wd,"replaceIconSubstring");var Td=ht(async(t,e="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:a=!0,markdown:s=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(ut.debug("XYZ createText",e,r,i,o,a,n,"addSvgBackground: ",h),a){const i=s?ld(e,c):nd(e),a=await wd(nh(i),c),d=e.replace(/\\\\/g,"\\"),u={isNode:n,label:yr(e)?d:a,labelStyle:r.replace("fill:","color:")};return await fd(t,u,l,o,h,c)}{const o=nh(e.replace(/<br\s*\/?>/g,"<br/>")),a=xd(l,t,s?sd(o.replace("<br>","<br/>"),c):ad(o),!!e&&h,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mo(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");mo(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");mo(a).select("text").attr("style",e)}return i?mo(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):mo(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText");function Bd(t,e,r){if(t&&t.length){const[i,o]=e,a=Math.PI/180*r,s=Math.cos(a),n=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*s-(r-o)*n+i,e[1]=(t-i)*n+(r-o)*s+o}}}function Sd(t,e){return t[0]===e[0]&&t[1]===e[1]}function vd(t,e,r,i=1){const o=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,n=[0,0];if(o)for(const t of s)Bd(t,n,o);const l=function(t,e,r){const i=[];for(const e of t){const t=[...e];Sd(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const o=[];e=Math.max(e,.1);const a=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);a.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return o;let s=[],n=a[0].ymin,l=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>n);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:n,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=n)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||l%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;o.push([[Math.round(r.x),n],[Math.round(i.x),n]])}n+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),l++}return o}(s,a,i);if(o){for(const t of s)Bd(t,n,-o);!function(t,e,r){const i=[];t.forEach(t=>i.push(...t)),Bd(i,e,r)}(l,n,-o)}return l}function _d(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),vd(t,o,i,a||1)}class Ld{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=_d(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function Fd(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Md extends Ld{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=_d(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(o),n=.5*r*Math.sin(o);for(const[t,e]of i)Fd([t,e])&&a.push([[t[0]-s,t[1]+n],[...e]],[[t[0]+s,t[1]-n],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class Ad extends Ld{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class $d{constructor(t){this.helper=t}fillPolygons(t,e){const r=_d(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const a=i/4;for(const s of t){const t=Fd(s),n=t/i,l=Math.ceil(n)-1,h=t-l*i,c=(s[0][0]+s[1][0])/2-i/4,d=Math.min(s[0][1],s[1][1]);for(let t=0;t<l;t++){const s=d+h+t*i,n=c-a+2*Math.random()*a,l=s-a+2*Math.random()*a,u=this.helper.ellipse(n,l,o,o,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class Ed{constructor(t){this.helper=t}fillPolygons(t,e){const r=_d(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const a=Fd(t),s=Math.floor(a/(r+i)),n=(a+i-s*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<s;t++){const a=t*(r+i),s=a+r,h=[l[0]+a*Math.cos(c)+n*Math.cos(c),l[1]+a*Math.sin(c)+n*Math.sin(c)],d=[l[0]+s*Math.cos(c)+n*Math.cos(c),l[1]+s*Math.sin(c)+n*Math.sin(c)];o.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],e))}}),o}}class qd{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=_d(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=Fd(t),a=Math.round(o/(2*e));let s=t[0],n=t[1];s[0]>n[0]&&(s=t[1],n=t[0]);const l=Math.atan((n[1]-s[1])/(n[0]-s[0]));for(let t=0;t<a;t++){const o=2*t*e,a=2*(t+1)*e,n=Math.sqrt(2*Math.pow(e,2)),h=[s[0]+o*Math.cos(l),s[1]+o*Math.sin(l)],c=[s[0]+a*Math.cos(l),s[1]+a*Math.sin(l)],d=[h[0]+n*Math.cos(l+Math.PI/4),h[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const Id={};class Od{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Dd={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 zd(t,e){return t.type===e}function Pd(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,a=r[o];for(;!zd(a,2);){let s=0;const n=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return Pd("M0,0"+t);o++,s=Dd[a.text],i=a.text}else zd(a,1)?s=Dd[i]:(o++,s=Dd[a.text],i=a.text);if(!(o+s<r.length))throw new Error("Path data ended short");for(let t=o;t<o+s;t++){const e=r[t];if(!zd(e,1))throw new Error("Param not a number: "+i+","+e.text);n[n.length]=+e.text}if("number"!=typeof Dd[i])throw new Error("Bad segment: "+i);{const t={key:i,data:n};e.push(t),o+=s,a=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function Wd(t){let e=0,r=0,i=0,o=0;const a=[];for(const{key:s,data:n}of t)switch(s){case"M":a.push({key:"M",data:[...n]}),[e,r]=n,[i,o]=n;break;case"m":e+=n[0],r+=n[1],a.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":a.push({key:"L",data:[...n]}),[e,r]=n;break;case"l":e+=n[0],r+=n[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],r=n[5];break;case"c":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],r=n[3];break;case"q":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],r=n[6];break;case"a":e+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,r]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],r=n[3];break;case"s":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],r=n[1];break;case"t":e+=n[0],r+=n[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function Rd(t){const e=[];let r="",i=0,o=0,a=0,s=0,n=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],n=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-n),a=o+(o-l)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),n=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,a]=c;let s=0,h=0;"Q"===r||"T"===r?(s=i+(i-n),h=o+(o-l)):(s=i,h=o);const d=i+2*(s-i)/3,u=o+2*(h-o)/3,p=t+2*(s-t)/3,g=a+2*(h-a)/3;e.push({key:"C",data:[d,u,p,g,t,a]}),n=s,l=h,i=t,o=a;break}case"Q":{const[t,r,a,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,p,a,s]}),n=t,l=r,i=a,o=s;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],s=c[3],n=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(jd(i,o,l,h,t,r,a,s,n).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=s}r=h}return e}function Nd(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function jd(t,e,r,i,o,a,s,n,l,h){const c=(d=s,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=Nd(t,e,-c),[r,i]=Nd(r,i,-c);const s=(t-r)/2,h=(e-i)/2;let d=s*s/(o*o)+h*h/(a*a);d>1&&(d=Math.sqrt(d),o*=d,a*=d);const u=o*o,m=a*a,C=u*m-u*h*h-m*s*s,x=u*h*h+m*s*s,k=(n===l?-1:1)*Math.sqrt(Math.abs(C/x));f=k*o*h/a+(t+r)/2,y=k*-a*s/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,n=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=jd(r=f+o*Math.cos(g),i=y+a*Math.sin(g),e,n,o,a,s,0,l,[g,t,f,y])}m=g-p;const C=Math.cos(p),x=Math.sin(p),k=Math.cos(g),b=Math.sin(g),w=Math.tan(m/4),T=4/3*o*w,B=4/3*a*w,S=[t,e],v=[t+T*x,e-B*C],_=[r+T*b,i-B*k],L=[r,i];if(v[0]=2*S[0]-v[0],v[1]=2*S[1]-v[1],h)return[v,_,L].concat(u);{u=[v,_,L].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=Nd(u[e][0],u[e][1],c),i=Nd(u[e+1][0],u[e+1][1],c),o=Nd(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const Hd={randOffset:function(t,e){return iu(t,e)},randOffsetWithRange:function(t,e,r){return ru(t,e,r)},ellipse:function(t,e,r,i,o){return Gd(t,e,o,Xd(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return ou(t,e,r,i,o,!0)}};function Yd(t,e,r,i,o){return{type:"path",ops:ou(t,e,r,i,o)}}function Ud(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...ou(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...ou(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?Yd(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Vd(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=su(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:su(r[0],1.5*(1+.22*e.roughness),tu(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=su(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:su(a,1.5*(1+.22*e.roughness),tu(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Xd(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/o;let s=Math.abs(t/2),n=Math.abs(e/2);const l=1-r.curveFitting;return s+=iu(s*l,r),n+=iu(n*l,r),{increment:a,rx:s,ry:n}}function Gd(t,e,r,i){const[o,a]=lu(i.increment,t,e,i.rx,i.ry,1,i.increment*ru(.1,ru(.4,1,r),r),r);let s=nu(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=lu(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=nu(o,null,r);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Zd(t,e,r,i,o,a,s,n,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=iu(.01*d,l),u+=iu(.01*u,l);let p=o,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=hu(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=hu(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return s&&(n?m.push(...ou(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...ou(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Qd(t,e){const r=Rd(Wd(Pd(t))),i=[];let o=[0,0],a=[0,0];for(const{key:t,data:s}of r)switch(t){case"M":a=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...ou(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,o,n,l,h]=s;i.push(...cu(t,r,o,n,l,h,a,e)),a=[l,h];break}case"Z":i.push(...ou(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function Jd(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+iu(t,e),i[0][1]+iu(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+iu(t,e),i[a][1]+iu(t,e)]})}}return{type:"fillPath",ops:r}}function Kd(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!Id[r])switch(r){case"zigzag":Id[r]||(Id[r]=new Md(e));break;case"cross-hatch":Id[r]||(Id[r]=new Ad(e));break;case"dots":Id[r]||(Id[r]=new $d(e));break;case"dashed":Id[r]||(Id[r]=new Ed(e));break;case"zigzag-line":Id[r]||(Id[r]=new qd(e));break;default:r="hachure",Id[r]||(Id[r]=new Ld(e))}return Id[r]}(e,Hd).fillPolygons(t,e)}function tu(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function eu(t){return t.randomizer||(t.randomizer=new Od(t.seed||0)),t.randomizer.next()}function ru(t,e,r,i=1){return r.roughness*i*(eu(r)*(e-t)+t)}function iu(t,e,r=1){return ru(-t,t,e,r)}function ou(t,e,r,i,o,a=!1){const s=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=au(t,e,r,i,o,!0,!1);if(s)return n;const l=au(t,e,r,i,o,!0,!0);return n.concat(l)}function au(t,e,r,i,o,a,s){const n=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,u=.2+.2*eu(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=iu(p,o,h),g=iu(g,o,h);const f=[],y=()=>iu(d,o,h),m=()=>iu(c,o,h),C=o.preserveVertices;return s?f.push({op:"move",data:[t+(C?0:y()),e+(C?0:y())]}):f.push({op:"move",data:[t+(C?0:iu(c,o,h)),e+(C?0:iu(c,o,h))]}),s?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(C?0:y()),i+(C?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(C?0:m()),i+(C?0:m())]}),f}function su(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+iu(e,r),t[0][1]+iu(e,r)]),i.push([t[0][0]+iu(e,r),t[0][1]+iu(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+iu(e,r),t[o][1]+iu(e,r)]),o===t.length-1&&i.push([t[o][0]+iu(e,r),t[o][1]+iu(e,r)]);return nu(i,null,r)}function nu(t,e,r){const i=t.length,o=[];if(i>3){const e=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(a*t[r+1][0]-a*t[r-1][0])/6,i[1]+(a*t[r+1][1]-a*t[r-1][1])/6],e[2]=[t[r+1][0]+(a*t[r][0]-a*t[r+2][0])/6,t[r+1][1]+(a*t[r][1]-a*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...au(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return o}function lu(t,e,r,i,o,a,s,n){const l=[],h=[];if(0===n.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=iu(.5,n)-Math.PI/2;h.push([iu(a,n)+e+.9*i*Math.cos(c-t),iu(a,n)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let s=c;s<d;s+=t){const t=[iu(a,n)+e+i*Math.cos(s),iu(a,n)+r+o*Math.sin(s)];l.push(t),h.push(t)}h.push([iu(a,n)+e+i*Math.cos(c+2*Math.PI+.5*s),iu(a,n)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([iu(a,n)+e+.98*i*Math.cos(c+s),iu(a,n)+r+.98*o*Math.sin(c+s)]),h.push([iu(a,n)+e+.9*i*Math.cos(c+.5*s),iu(a,n)+r+.9*o*Math.sin(c+.5*s)])}return[h,l]}function hu(t,e,r,i,o,a,s,n,l){const h=a+iu(.1,l),c=[];c.push([iu(n,l)+e+.9*i*Math.cos(h-t),iu(n,l)+r+.9*o*Math.sin(h-t)]);for(let a=h;a<=s;a+=t)c.push([iu(n,l)+e+i*Math.cos(a),iu(n,l)+r+o*Math.sin(a)]);return c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),nu(c,0,l)}function cu(t,e,r,i,o,a,s,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(u?0:iu(h[0],n)),s[1]+(u?0:iu(h[0],n))]}),c=u?[o,a]:[o+iu(h[p],n),a+iu(h[p],n)],l.push({op:"bcurveTo",data:[t+iu(h[p],n),e+iu(h[p],n),r+iu(h[p],n),i+iu(h[p],n),c[0],c[1]]});return l}function du(t){return[...t]}function uu(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(du(t[0]),du(t[1]),du(t[2]),du(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],a=1-e;i.push(du(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],o[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function pu(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function gu(t,e,r){const i=pu(e,r);if(0===i)return pu(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),pu(t,fu(e,r,o))}function fu(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function yu(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],a=t[e+3];let s=3*i[0]-2*r[0]-a[0];s*=s;let n=3*i[1]-2*r[1]-a[1];n*=n;let l=3*o[0]-2*a[0]-r[0];l*=l;let h=3*o[1]-2*a[1]-r[1];return h*=h,s<l&&(s=l),n<h&&(n=h),s+n}(t,e)<r){const r=t[e+0];o.length?(a=o[o.length-1],s=r,Math.sqrt(pu(a,s))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,a=t[e+0],s=t[e+1],n=t[e+2],l=t[e+3],h=fu(a,s,i),c=fu(s,n,i),d=fu(n,l,i),u=fu(h,c,i),p=fu(c,d,i),g=fu(u,p,i);yu([a,h,u,g],0,r,o),yu([g,p,d,l],0,r,o)}var a,s;return o}function mu(t,e){return Cu(t,0,t.length,e)}function Cu(t,e,r,i,o){const a=o||[],s=t[e],n=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=gu(t[i],s,n);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Cu(t,e,h+1,i,a),Cu(t,h,r,i,a)):(a.length||a.push(s),a.push(n)),a}function xu(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)yu(t,3*r,e,i);return r&&r>0?Cu(i,0,i.length,r):i}const ku="none";class bu{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const a=this._o(o);return this._d("line",[Yd(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){const a=this._o(o),s=[],n=function(t,e,r,i,o){return function(t,e){return Ud(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,a);if(a.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?s.push(Jd([o],a)):s.push(Kd([o],a))}return a.stroke!==ku&&s.push(n),this._d("rectangle",s,a)}ellipse(t,e,r,i,o){const a=this._o(o),s=[],n=Xd(r,i,a),l=Gd(t,e,a,n);if(a.fill)if("solid"===a.fillStyle){const r=Gd(t,e,a,n).opset;r.type="fillPath",s.push(r)}else s.push(Kd([l.estimatedPoints],a));return a.stroke!==ku&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Ud(t,!1,r)],r)}arc(t,e,r,i,o,a,s=!1,n){const l=this._o(n),h=[],c=Zd(t,e,r,i,o,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const n=Zd(t,e,r,i,o,a,!0,!1,s);n.type="fillPath",h.push(n)}else h.push(function(t,e,r,i,o,a,s){const n=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=iu(.01*h,s),c+=iu(.01*c,s);let d=o,u=a;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/s.curveStepCount,g=[];for(let t=d;t<=u;t+=p)g.push([n+h*Math.cos(t),l+c*Math.sin(t)]);return g.push([n+h*Math.cos(u),l+c*Math.sin(u)]),g.push([n,l]),Kd([g],s)}(t,e,r,i,o,a,l));return l.stroke!==ku&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=Vd(t,r);if(r.fill&&r.fill!==ku)if("solid"===r.fillStyle){const e=Vd(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...xu(uu([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...xu(uu(i),10,(1+r.roughness)/2))}e.length&&i.push(Kd([e],r))}return r.stroke!==ku&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=Ud(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(Jd([t],r)):i.push(Kd([t],r))),r.stroke!==ku&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==ku,a=r.stroke!==ku,s=!!(r.simplification&&r.simplification<1),n=function(t,e,r){const i=Rd(Wd(Pd(t))),o=[];let a=[],s=[0,0],n=[];const l=()=>{n.length>=4&&a.push(...xu(n,1)),n=[]},h=()=>{l(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),s=[e[0],e[1]],a.push(s);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!n.length){const t=a.length?a[a.length-1]:s;n.push([t[0],t[1]])}n.push([e[0],e[1]]),n.push([e[2],e[3]]),n.push([e[4],e[5]]);break;case"Z":l(),a.push([s[0],s[1]])}if(h(),!r)return o;const c=[];for(const t of o){const e=mu(t,r);e.length&&c.push(e)}return c}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=Qd(t,r);if(o)if("solid"===r.fillStyle)if(1===n.length){const e=Qd(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Jd(n,r));else i.push(Kd(n,r));return a&&(s?n.forEach(t=>{i.push(Ud(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:ku};break;case"fillPath":e={d:this.opsToPath(t),stroke:ku,strokeWidth:0,fill:r.fill||ku};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||ku,strokeWidth:r,fill:ku}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class wu{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new bu(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const Tu="http://www.w3.org/2000/svg";class Bu{constructor(t,e){this.svg=t,this.gen=new bu(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Tu,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=i.createElementNS(Tu,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(Tu,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(Tu,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var Su={canvas:(t,e)=>new wu(t,e),svg:(t,e)=>new Bu(t,e),generator:t=>new bu(t),newSeed:()=>bu.newSeed()},vu=ht(async(t,e,r)=>{let i;const o=e.useHtmlLabels||Fe(jr()?.htmlLabels);i=r||"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",hh(e.labelStyle));let n;n=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const l=!!e.icon||!!e.img,h="markdown"===e.labelType,c=await Td(s,er(nh(n),jr()),{useHtmlLabels:o,width:e.width||jr().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:l,markdown:h},jr());let d=c.getBBox();const u=(e?.padding??0)/2;if(o){const t=c.children[0],e=mo(c);await uh(t,n),d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return o?s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):s.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:u,label:s}},"labelHelper"),_u=ht(async(t,e,r)=>{const i=r.useHtmlLabels??Xe(jr()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Td(o,er(nh(e),jr()),{useHtmlLabels:i,width:r.width||jr()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const n=r.padding/2;if(Xe(jr())){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}return i?o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):o.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:n,label:o}},"insertLabel"),Lu=ht((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Fu=ht((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function Mu(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function Au(t,e,r,i,o,a){const s=[],n=r-t,l=i-e,h=n/a,c=2*Math.PI/h,d=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*n,i=d+o*Math.sin(c*(r-t));s.push({x:r,y:i})}return s}function $u(t,e,r,i,o,a){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}function Eu(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=ht((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}ht(Mu,"createPathFromPoints"),ht(Au,"generateFullSineWavePoints"),ht($u,"generateCirclePoints"),ht(Eu,"mergePaths");var qu=ht((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,n=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(n)*l>Math.abs(s)*h?(n<0&&(h=-h),r=0===n?0:h*s/n,i=h):(s<0&&(l=-l),r=l,i=0===s?0:l*n/s),{x:o+r,y:a+i}},"intersectRect"),Iu=qu,Ou=ht(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const s=jr(),n=Xe(s);return await Td(t,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},s)},"createLabel"),Du=Ou,zu=ht((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),Pu=ht(async(t,e)=>{ut.info("Creating subgraph rect for ",e.id,e);const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=mh(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=Xe(r),p=d.insert("g").attr("class","cluster-label ");let g;g="markdown"===e.labelType?await Td(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width}):await Du(p,e.label,e.labelStyle||"",!1,!0);let f=g.getBBox();if(Xe(r)){const t=g.children[0],e=mo(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,C=e.x-y/2,x=e.y-m/2;let k;if(ut.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=Su.svg(d),r=Ch(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:o}),i=t.path(zu(C,x,y,m,0),r);k=d.insert(()=>(ut.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",x).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:b}=dh(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+b})`),n){const t=p.select("span");t&&t.attr("style",n)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return Iu(e,t)},{cluster:d,labelBBox:f}},"rect"),Wu=ht((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return Iu(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Ru=ht(async(t,e)=>{const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:n,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=await Du(d,e.label,e.labelStyle,void 0,!0);let g=p.getBBox();if(Xe(r)){const t=p.children[0],e=mo(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,y=f/2,m=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+f,x=e.height+f-g.height-6,k=e.x-m/2,b=e.y-C/2;e.width=m;const w=e.y-e.height/2-y+g.height+2;let T;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=Su.svg(h),i=e.rx||e.ry?r.path(zu(k,b,m,C,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):r.rectangle(k,b,m,C,{seed:o});T=h.insert(()=>i,":first-child");const c=r.rectangle(k,w,m,x,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:l,seed:o});T=h.insert(()=>i,":first-child"),u=h.insert(()=>c)}else{T=c.insert("rect",":first-child");const t="outer";T.attr("class",t).attr("x",k).attr("y",b).attr("width",m).attr("height",C).attr("data-look",e.look),u.attr("class","inner").attr("x",k).attr("y",w).attr("width",m).attr("height",x)}d.attr("transform",`translate(${e.x-g.width/2}, ${b+1-(Xe(r)?0:3)})`);const B=T.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return Iu(e,t)},{cluster:h,labelBBox:g}},"roundedWithTitle"),Nu=ht(async(t,e)=>{ut.info("Creating subgraph rect for ",e.id,e);const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=mh(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=Xe(r),p=d.insert("g").attr("class","cluster-label "),g=await Td(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width});let f=g.getBBox();if(Xe(r)){const t=g.children[0],e=mo(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,C=e.x-y/2,x=e.y-m/2;let k;if(ut.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=Su.svg(d),r=Ch(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:o}),i=t.path(zu(C,x,y,m,e.rx),r);k=d.insert(()=>(ut.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",x).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:b}=dh(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+b})`),n){const t=p.select("span");t&&t.attr("style",n)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return Iu(e,t)},{cluster:d,labelBBox:f}},"kanbanSection"),ju=ht((t,e)=>{const r=jr(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:a}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),n=s.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=Su.svg(s).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});p=s.insert(()=>t,":first-child")}else{p=n.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return Iu(e,t)},{cluster:s,labelBBox:{}}},"divider"),Hu={rect:Pu,squareRect:Pu,roundedWithTitle:Ru,noteGroup:Wu,divider:ju,kanbanSection:Nu},Yu=new Map,Uu=ht(async(t,e)=>{const r=e.shape||"rect",i=await Hu[r](t,e);return Yu.set(e.id,i),i},"insertCluster"),Vu=ht(()=>{Yu=new Map},"clear");function Xu(t,e){return t.intersect(e)}ht(Xu,"intersectNode");var Gu=Xu;function Zu(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,n=a-i.y,l=Math.sqrt(e*e*n*n+r*r*s*s),h=Math.abs(e*r*s/l);i.x<o&&(h=-h);var c=Math.abs(e*r*n/l);return i.y<a&&(c=-c),{x:o+h,y:a+c}}ht(Zu,"intersectEllipse");var Qu=Zu;function Ju(t,e,r){return Qu(t,e,e,r)}ht(Ju,"intersectCircle");var Ku=Ju;function tp(t,e,r,i){{const o=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,n=o*r.x+a*r.y+s,l=o*i.x+a*i.y+s,h=1e-6;if(0!==n&&0!==l&&ep(n,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&ep(p,g))return;const f=o*d-c*a;if(0===f)return;const y=Math.abs(f/2);let m=a*u-d*s;const C=m<0?(m-y)/f:(m+y)/f;m=c*s-o*u;return{x:C,y:m<0?(m-y)/f:(m+y)/f}}}function ep(t,e){return t*e>0}ht(tp,"intersectLine"),ht(ep,"sameSign");var rp=tp;function ip(t,e,r){let i=t.x,o=t.y,a=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),n=Math.min(n,t.y)}):(s=Math.min(s,e.x),n=Math.min(n,e.y));let l=i-t.width/2-s,h=o-t.height/2-n;for(let i=0;i<e.length;i++){let o=e[i],s=e[i<e.length-1?i+1:0],n=rp(t,r,{x:l+o.x,y:h+o.y},{x:l+s.x,y:h+s.y});n&&a.push(n)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,n=e.y-r.y,l=Math.sqrt(s*s+n*n);return a<l?-1:a===l?0:1}),a[0]):t}ht(ip,"intersectPolygon");var op={node:Gu,circle:Ku,ellipse:Qu,polygon:ip,rect:Iu};function ap(t,e){const{labelStyles:r}=mh(e);e.labelStyle=r;const i=Fu(e);let o=i;i||(o="anchor");const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),{cssStyles:s}=e,n=Su.svg(a),l=Ch(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=n.circle(0,0,2,l),c=a.insert(()=>h,":first-child");return c.attr("class","anchor").attr("style",hh(s)),Lu(e,c),e.intersect=function(t){return ut.info("Circle intersect",e,1,t),op.circle(e,1,t)},a}function sp(t,e,r,i,o,a,s){const n=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/a,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=n+p*a*Math.sin(h)*(s?-1:1),f=l-p*o*Math.cos(h)*(s?-1:1),y=Math.atan2((e-f)/a,(t-g)/o);let m=Math.atan2((i-f)/a,(r-g)/o)-y;s&&m<0&&(m+=2*Math.PI),!s&&m>0&&(m-=2*Math.PI);const C=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=g+o*Math.cos(e),i=f+a*Math.sin(e);C.push({x:r,y:i})}return C}function np(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function lp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,n=ht(t=>t+s,"calcTotalHeight"),l=ht(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await vu(t,e,Fu(e)),d=n(e?.height?e?.height:c.height),[u,p]=l(d),g=np(d,u,p),f=(e?.width?e?.width:c.width)+2*a+g-g,y=d,{cssStyles:m}=e,C=[{x:f/2,y:-y/2},{x:-f/2,y:-y/2},...sp(-f/2,-y/2,-f/2,y/2,u,p,!1),{x:f/2,y:y/2},...sp(f/2,y/2,f/2,-y/2,u,p,!0)],x=Su.svg(h),k=Ch(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const b=Mu(C),w=x.path(b,k),T=h.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${u/2}, 0)`),Lu(e,T),e.intersect=function(t){return op.polygon(e,C,t)},h}function hp(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}ht(ap,"anchor"),ht(sp,"generateArcPoints"),ht(np,"calculateArcSagitta"),ht(lp,"bowTieRect"),ht(hp,"insertPolygonShape");async function cp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?28:o,s="neo"===e.look?24:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width??l.width)+("neo"===e.look?2*a:a+12),c=(e?.height??l.height)+("neo"===e.look?2*s:s),d=-c,u=[{x:12,y:d},{x:h,y:d},{x:h,y:0},{x:0,y:0},{x:0,y:d+12},{x:12,y:d}];let p;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(u),o=t.path(i,r);p=n.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&p.attr("style",g)}else p=hp(n,h,c,u);return i&&p.attr("style",i),Lu(e,p),e.intersect=function(t){return op.polygon(e,u,t)},n}function dp(t,e){const{nodeStyles:r}=mh(e);e.label="";const i=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=Su.svg(i),l=Ch(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=Mu(s),c=n.path(h,l),d=i.insert(()=>c,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return op.polygon(e,s,t)},i}async function up(t,e,r){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:n}=await vu(t,e,Fu(e)),l=r?.padding??n,h="neo"===e.look?s.width/2+32:s.width/2+l;let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=Su.svg(a),r=Ch(e,{}),i=t.circle(0,0,2*h,r);c=a.insert(()=>i,":first-child"),c.attr("class","basic label-container").attr("style",hh(d))}else c=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return Lu(e,c),e.calcIntersect=function(t,e){const r=t.width/2;return op.circle(t,r,e)},e.intersect=function(t){return ut.info("Circle intersect",e,h,t),op.circle(e,h,t)},a}function pp(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function gp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r,e.label="";const o=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,n=Su.svg(o),l=Ch(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,2*a,l),c=pp(a),d=n.path(c,l),u=o.insert(()=>h,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),s&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Lu(e,u),e.intersect=function(t){ut.info("crossedCircle intersect",e,{radius:a,point:t});return op.circle(e,a,t)},o}function fp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function yp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+n,c=a.height+l,d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...fp(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...fp(h/2+2*d,-d,d,20,-180,-270),...fp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...fp(h/2,c/2,d,20,0,90)],g=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...fp(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...fp(h/2+.1*h,-d,d,20,-180,-270),...fp(h/2+.1*h,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...fp(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Su.svg(o),y=Ch(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Mu(p).replace("Z",""),C=f.path(m,y),x=Mu(g),k=f.path(x,{...y}),b=o.insert("g",":first-child");return b.insert(()=>k,":first-child").attr("stroke-opacity",0),b.insert(()=>C,":first-child"),b.attr("class","text"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Lu(e,b),e.intersect=function(t){return op.polygon(e,g,t)},o}function mp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:a,y:h})}return s}async function Cp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*n:n),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...mp(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...mp(h/2+2*d,-d,d,20,-180,-270),...mp(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...mp(h/2,c/2,d,20,0,90)],g=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...mp(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...mp(h/2+2*d,-d,d,20,-180,-270),...mp(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...mp(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Su.svg(o),y=Ch(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Mu(p).replace("Z",""),C=f.path(m,y),x=Mu(g),k=f.path(x,{...y}),b=o.insert("g",":first-child");return b.insert(()=>k,":first-child").attr("stroke-opacity",0),b.insert(()=>C,":first-child"),b.attr("class","text"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Lu(e,b),e.intersect=function(t){return op.polygon(e,g,t)},o}function xp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function kp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*n:n),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...xp(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...xp(h/2+2*d,-d,d,20,-180,-270),...xp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...xp(h/2,c/2,d,20,0,90)],g=[...xp(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...xp(-h/2-d/2,-d,d,20,0,90),...xp(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...xp(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...xp(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...xp(h/2+2*d,-d,d,20,-180,-270),...xp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...xp(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...xp(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...xp(-h/2-d/2,-d,d,20,0,90),...xp(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...xp(-h/2+d+d/2,c/2,d,30,-180,-270)],y=Su.svg(o),m=Ch(e,{fill:"none"});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=Mu(p).replace("Z",""),x=y.path(C,m),k=Mu(g).replace("Z",""),b=y.path(k,m),w=Mu(f),T=y.path(w,{...m}),B=o.insert("g",":first-child");return B.insert(()=>T,":first-child").attr("stroke-opacity",0),B.insert(()=>x,":first-child"),B.insert(()=>b,":first-child"),B.attr("class","text"),u&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Lu(e,B),e.intersect=function(t){return op.polygon(e,f,t)},o}async function bp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=Math.max(20,1.25*(l.width+2*a),e?.width??0),c=Math.max(5,l.height+2*s,e?.height??0),d=c/2,{cssStyles:u}=e,p=Su.svg(n),g=Ch(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=h-d,y=c/4,m=[{x:f,y:0},{x:y,y:0},{x:0,y:c/2},{x:y,y:c},{x:f,y:c},...$u(-f,-c/2,d,50,270,90)],C=Mu(m),x=p.path(C,g),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-h/2}, ${-c/2})`),Lu(e,k),e.intersect=function(t){return op.polygon(e,m,t)},n}ht(cp,"card"),ht(dp,"choice"),ht(up,"circle"),ht(pp,"createLine"),ht(gp,"crossedCircle"),ht(fp,"generateCirclePoints"),ht(yp,"curlyBraceLeft"),ht(mp,"generateCirclePoints"),ht(Cp,"curlyBraceRight"),ht(xp,"generateCirclePoints"),ht(kp,"curlyBraces"),ht(bp,"curvedTrapezoid");var wp=ht((t,e,r,i,o,a)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),Tp=ht((t,e,r,i,o,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),Bp=ht((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Sp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?24:o,s="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-a-3*r,e.height<8&&(e.height=8)}const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e.width?e.width:l.width)+s,d=c/2,u=d/(2.5+c/50),p=(e.height?e.height:l.height)+a+u;let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Tp(0,0,c,p,d,u),i=Bp(0,u,c,p,d,u),o=Ch(e,{}),a=t.path(r,o),s=t.path(i,Ch(e,{fill:"none"}));g=n.insert(()=>s,":first-child"),g=n.insert(()=>a,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const t=wp(0,0,c,p,d,u);g=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",hh(f)).attr("style",i)}return g.attr("label-offset-y",u),g.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),Lu(e,g),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+(e.padding??0)/1.5-(l.y-(l.top??0))})`),e.intersect=function(t){const r=op.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},n}async function vp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=n.width+o,c=n.height+a,d=.2*c,u=-h/2,p=-c/2-d/2,{cssStyles:g}=e,f=Su.svg(s),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p+d},{x:-u,y:p+d},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+d}],C=f.polygon(m.map(t=>[t.x,t.y]),y),x=s.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),l.attr("transform",`translate(${u+(e.padding??0)/2-(n.x-(n.left??0))}, ${p+d+(e.padding??0)/2-(n.y-(n.top??0))})`),Lu(e,x),e.intersect=function(t){return op.rect(e,t)},s}async function _p(t,e){const{labelStyles:r,nodeStyles:i}=mh(e),o="neo"===e.look?12:5;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width/2:l.width/2)+(s??0),c=h-o;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{roughness:.2,strokeWidth:2.5}),i=Ch(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*h,r),a=t.circle(0,0,2*c,i);d=n.insert("g",":first-child"),d.attr("class",hh(e.cssClasses)).attr("style",hh(u)),d.node()?.appendChild(o),d.node()?.appendChild(a)}else{d=n.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Lu(e,d),e.intersect=function(t){return ut.info("DoubleCircle intersect",e,h,t),op.circle(e,h,t)},n}function Lp(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=mh(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,n=Su.svg(a),{nodeBorder:l}=r,h=Ch(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=n.circle(0,0,14,h),d=a.insert(()=>c,":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),Lu(e,d),e.intersect=function(t){ut.info("filledCircle intersect",e,{radius:7,point:t});return op.circle(e,7,t)},a}ht(Sp,"cylinder"),ht(vp,"dividedRectangle"),ht(_p,"doublecircle"),ht(Lp,"filledCircle");async function Fp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:n.width)+(a??0),c=e?.height?e?.height:h+n.height,d=[{x:0,y:-c},{x:c,y:-c},{x:c/2,y:0}],{cssStyles:u}=e,p=Su.svg(s),g=Ch(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=Mu(d),y=p.path(f,g),m=s.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=h,e.height=c,Lu(e,m),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return ut.info("Triangle intersect",e,d,t),op.polygon(e,d,t)},s}function Mp(t,e,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:a}=mh(e);e.label="";const s=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:n}=e;let l=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));const c=-1*l/2,d=-1*h/2,u=Su.svg(s),p=Ch(e,{stroke:o.lineColor,fill:o.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=s.insert(()=>g,":first-child");n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),Lu(e,f);const y=i?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return op.rect(e,t)},s}async function Ap(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*o,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:n}=await vu(t,e,Fu(e)),l=(e?.width?e?.width:Math.max(15,n.width))+2*o,h=(e?.height?e?.height:Math.max(10,n.height))+2*a,c=h/2,{cssStyles:d}=e,u=Su.svg(s),p=Ch(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-h/2},{x:l/2-c,y:-h/2},...$u(-l/2+c,0,c,50,90,270),{x:l/2-c,y:h/2},{x:-l/2,y:h/2}],f=Mu(g),y=u.path(f,p),m=s.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),Lu(e,m),e.intersect=function(t){ut.info("Pill intersect",e,{radius:c,point:t});return op.polygon(e,g,t)},s}ht(Fp,"flippedTriangle"),ht(Mp,"forkJoin"),ht(Ap,"halfRoundedRectangle");var $p=ht((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Ep(t,e){const{labelStyles:r,nodeStyles:i}=mh(e),o="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,n="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/o;e.width=(e?.width??0)-2*t-n,e.height=(e.height??0)-s}const{shapeSvg:l,bbox:h}=await vu(t,e,Fu(e)),c=(e?.height?e?.height:h.height)+s,d=c/o,u=(e?.width?e?.width:h.width)+2*d+n,p=[{x:d,y:0},{x:u-d,y:0},{x:u,y:-c/2},{x:u-d,y:-c},{x:d,y:-c},{x:0,y:-c/2}];let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=Su.svg(l),r=Ch(e,{}),i=$p(0,0,u,c,d),o=t.path(i,r);g=l.insert(()=>o,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),f&&g.attr("style",f)}else g=hp(l,u,c,p);return i&&g.attr("style",i),e.width=u,e.height=c,Lu(e,g),e.intersect=function(t){return op.polygon(e,p,t)},l}async function qp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.label="",e.labelStyle=r;const{shapeSvg:o}=await vu(t,e,Fu(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:n}=e,l=Su.svg(o),h=Ch(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],d=Mu(c),u=l.path(d,h),p=o.insert(()=>u,":first-child");return p.attr("class","basic label-container outer-path"),n&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Lu(e,p),e.intersect=function(t){ut.info("Pill intersect",e,{points:c});return op.polygon(e,c,t)},o}async function Ip(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await vu(t,e,"icon-shape default"),u="t"===e.pos,p=n,g=n,{nodeBorder:f}=r,{stylesMap:y}=gh(e),m=-g/2,C=-p/2,x=e.label?8:0,k=Su.svg(h),b=Ch(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=k.rectangle(m,C,g,p,b),T=Math.max(g,c.width),B=p+c.height+x,S=k.rectangle(-T/2,-B/2,T,B,{...b,fill:"transparent",stroke:"none"}),v=h.insert(()=>w,":first-child"),_=h.insert(()=>S);if(e.icon){const t=h.append("g");t.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${u?c.height/2+x/2-o/2-s:-c.height/2-x/2-o/2-s})`),t.attr("style",`color: ${y.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-B/2:B/2-c.height})`),v.attr("transform",`translate(0,${u?c.height/2+x/2:-c.height/2-x/2})`),Lu(e,_),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=u?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+x},{x:r+g/2,y:i-o/2+c.height+x},{x:r+g/2,y:i+o/2},{x:r-g/2,y:i+o/2},{x:r-g/2,y:i-o/2+c.height+x},{x:r-c.width/2,y:i-o/2+c.height+x}]:[{x:r-g/2,y:i-o/2},{x:r+g/2,y:i-o/2},{x:r+g/2,y:i-o/2+p},{x:r+c.width/2,y:i-o/2+p},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+p},{x:r-g/2,y:i-o/2+p}];return op.polygon(e,a,t)},h}async function Op(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await vu(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:y}=gh(e),m=Su.svg(h),C=Ch(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const x=y.get("fill");C.stroke=x??f;const k=h.append("g");e.icon&&k.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const b=k.node().getBBox(),w=b.width,T=b.height,B=b.x,S=b.y,v=Math.max(w,T)*Math.SQRT2+40,_=m.circle(0,0,v,C),L=Math.max(v,c.width),F=v+c.height+u,M=m.rectangle(-L/2,-F/2,L,F,{...C,fill:"transparent",stroke:"none"}),A=h.insert(()=>_,":first-child"),$=h.insert(()=>M);return k.attr("transform",`translate(${-w/2-B},${p?c.height/2+u/2-T/2-S:-c.height/2-u/2-T/2-S})`),k.attr("style",`color: ${y.get("stroke")??g};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-F/2:F/2-c.height})`),A.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),Lu(e,$),e.intersect=function(t){ut.info("iconSquare intersect",e,t);return op.rect(e,t)},h}async function Dp(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await vu(t,e,"icon-shape default"),p="t"===e.pos,g=n+2*d,f=n+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=gh(e),x=-f/2,k=-g/2,b=e.label?8:0,w=Su.svg(h),T=Ch(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=C.get("fill");T.stroke=B??m;const S=w.path(zu(x,k,f,g,5),T),v=Math.max(f,c.width),_=g+c.height+b,L=w.rectangle(-v/2,-_/2,v,_,{...T,fill:"transparent",stroke:"none"}),F=h.insert(()=>S,":first-child").attr("class","icon-shape2"),M=h.insert(()=>L);if(e.icon){const t=h.append("g");t.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${p?c.height/2+b/2-o/2-s:-c.height/2-b/2-o/2-s})`),t.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+b/2:-c.height/2-b/2})`),Lu(e,M),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return op.polygon(e,a,t)},h}async function zp(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=mh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await vu(t,e,"icon-shape default"),p="t"===e.pos,g=n+2*d,f=n+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=gh(e),x=-f/2,k=-g/2,b=e.label?8:0,w=Su.svg(h),T=Ch(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=C.get("fill");T.stroke=B??m;const S=w.path(zu(x,k,f,g,.1),T),v=Math.max(f,c.width),_=g+c.height+b,L=w.rectangle(-v/2,-_/2,v,_,{...T,fill:"transparent",stroke:"none"}),F=h.insert(()=>S,":first-child"),M=h.insert(()=>L);if(e.icon){const t=h.append("g");t.html(`<g>${await id(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${p?c.height/2+b/2-o/2-s:-c.height/2-b/2-o/2-s})`),t.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+b/2:-c.height/2-b/2})`),Lu(e,M),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return op.polygon(e,a,t)},h}async function Pp(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;const{labelStyles:s}=mh(e);e.labelStyle=s;const n=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const l=Math.max(e.label?n??0:0,e?.assetWidth??o),h="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(h,n??0);const{shapeSvg:d,bbox:u,label:p}=await vu(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,y=-c/2,m=e.label?8:0,C=Su.svg(d),x=Ch(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=C.rectangle(f,y,h,c,x),b=Math.max(h,u.width),w=c+u.height+m,T=C.rectangle(-b/2,-w/2,b,w,{...x,fill:"none",stroke:"none"}),B=d.insert(()=>k,":first-child"),S=d.insert(()=>T);if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-m/2:c/2-u.height/2+m/2})`),B.attr("transform",`translate(0,${g?u.height/2+m/2:-u.height/2-m/2})`),Lu(e,S),e.intersect=function(t){if(ut.info("iconSquare intersect",e,t),!e.label)return op.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=g?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+m},{x:r+h/2,y:i-o/2+u.height+m},{x:r+h/2,y:i+o/2},{x:r-h/2,y:i+o/2},{x:r-h/2,y:i-o/2+u.height+m},{x:r-u.width/2,y:i-o/2+u.height+m}]:[{x:r-h/2,y:i-o/2},{x:r+h/2,y:i-o/2},{x:r+h/2,y:i-o/2+c},{x:r+u.width/2,y:i-o/2+c},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+c},{x:r-h/2,y:i-o/2+c}];return op.polygon(e,a,t)},d}async function Wp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=Math.max(l.width+2*(s??0),e?.width??0),c=Math.max(l.height+2*(a??0),e?.height??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=hp(n,h,c,d);return i&&u.attr("style",i),e.width=h,e.height=c,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}async function Rp(t,e,r){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;const{shapeSvg:a,bbox:s}=await vu(t,e,Fu(e)),n=Math.max(s.width+2*r.labelPaddingX,e?.width||0),l=Math.max(s.height+2*r.labelPaddingY,e?.height||0),h=-n/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if(r?.rx&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=Su.svg(a),r=Ch(e,{}),i=u||p?t.path(zu(h,c,n,l,u||0),r):t.rectangle(h,c,n,l,r);d=a.insert(()=>i,":first-child"),d.attr("class","basic label-container").attr("style",hh(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",hh(u)).attr("ry",hh(p)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return Lu(e,d),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return op.rect(e,t)},a}async function Np(t,e){const{shapeSvg:r,bbox:i,label:o}=await vu(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Lu(e,a),e.intersect=function(t){return op.rect(e,t)},r}async function jp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-3*h/6,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=hp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}async function Hp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=hp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}function Yp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",Fu(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),l=[{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}],h=Su.svg(o),c=Ch(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=Mu(l),u=h.path(d,c),p=o.insert(()=>u,":first-child");return p.attr("class","outer-path"),a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-n})`),Lu(e,p),e.intersect=function(t){ut.info("lightningBolt intersect",e,t);return op.polygon(e,l,t)},o}ht(Ep,"hexagon"),ht(qp,"hourglass"),ht(Ip,"icon"),ht(Op,"iconCircle"),ht(Dp,"iconRounded"),ht(zp,"iconSquare"),ht(Pp,"imageSquare"),ht(Wp,"inv_trapezoid"),ht(Rp,"drawRect"),ht(Np,"labelRect"),ht(jp,"lean_left"),ht(Hp,"lean_right"),ht(Yp,"lightningBolt");var Up=ht((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Vp=ht((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Xp=ht((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Gp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-a,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-s-3*r,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e?.width?e?.width:l.width)+2*a,d=c/2,u=d/(2.5+c/50),p=(e?.height?e?.height:l.height)+u+2*s,g=.1*p;let f;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Vp(0,0,c,p,d,u,g),i=Xp(0,u,c,p,d,u),o=Ch(e,{}),a=t.path(r,o),s=t.path(i,o);n.insert(()=>s,":first-child").attr("class","line"),f=n.insert(()=>a,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const t=Up(0,0,c,p,d,u,g);f=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",hh(y)).attr("style",i)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),Lu(e,f),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+u-(l.y-(l.top??0))})`),e.intersect=function(t){const r=op.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},n}async function Zp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e?.width?e?.width:l.width)+2*(a??0),d=(e?.height?e?.height:l.height)+2*(s??0),u="neo"===e.look?d/4:d/8,p=d+u,{cssStyles:g}=e,f=Su.svg(n),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-c/2-c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:p/2},...Au(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2},{x:-c/2,y:-p/2},{x:-c/2,y:p/2*1.1},{x:-c/2,y:-p/2}],C=f.polygon(m.map(t=>[t.x,t.y]),y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(e.padding??0)-u/2-(l.y-(l.top??0))})`),Lu(e,x),e.intersect=function(t){return op.polygon(e,m,t)},n}async function Qp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,n="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*n,10),e.height=Math.max((e?.height??0)-2*s-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await vu(t,e,Fu(e)),d=(e?.width?e?.width:h.width)+2*a+2*n-2*n,u=(e?.height?e?.height:h.height)+2*s+2*n-2*n,p=-d/2,g=-u/2,{cssStyles:f}=e,y=Su.svg(l),m=Ch(e,{}),C=[{x:p-n,y:g+n},{x:p-n,y:g+u+n},{x:p+d-n,y:g+u+n},{x:p+d-n,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g+u-n},{x:p+d+n,y:g+u-n},{x:p+d+n,y:g-n},{x:p+n,y:g-n},{x:p+n,y:g},{x:p,y:g},{x:p,y:g+n}],x=[{x:p,y:g+n},{x:p+d-n,y:g+n},{x:p+d-n,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g},{x:p,y:g}];"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=Mu(C);let b=y.path(k,m);const w=Mu(x);let T=y.path(w,m);"handDrawn"!==e.look&&(b=Eu(b),T=Eu(T));const B=l.insert("g",":first-child");return B.insert(()=>b),B.insert(()=>T),B.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),c.attr("transform",`translate(${-h.width/2-n-(h.x-(h.left??0))}, ${-h.height/2+n-(h.y-(h.top??0))})`),Lu(e,B),e.intersect=function(t){return op.polygon(e,C,t)},l}async function Jp(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n=e.padding??0,l="neo"===e.look?16:n,h="neo"===e.look?12:n;let c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*l,e.height=(e?.height??0)-3*h);const d=Math.max(a.width,e?.width??0)+2*l,u=Math.max(a.height,e?.height??0)+3*h,p="neo"===e.look?u/4:u/8,g=u+(c?p/2:-p/2),f=-d/2,y=-g/2,m=10,{cssStyles:C}=e,x=Au(f-m,y+g+m,f+d-m,y+g+m,p,.8),k=x?.[x.length-1],b=[{x:f-m,y:y+m},{x:f-m,y:y+g+m},...x,{x:f+d-m,y:k.y-m},{x:f+d,y:k.y-m},{x:f+d,y:k.y-20},{x:f+d+m,y:k.y-20},{x:f+d+m,y:y-m},{x:f+m,y:y-m},{x:f+m,y:y},{x:f,y:y},{x:f,y:y+m}],w=[{x:f,y:y+m},{x:f+d-m,y:y+m},{x:f+d-m,y:k.y-m},{x:f+d,y:k.y-m},{x:f+d,y:y},{x:f,y:y}],T=Su.svg(o),B=Ch(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const S=Mu(b),v=T.path(S,B),_=Mu(w),L=T.path(_,B),F=o.insert(()=>v,":first-child");return F.insert(()=>L),F.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-a.width/2-m-(a.x-(a.left??0))}, ${-a.height/2+m-p/2-(a.y-(a.top??0))})`),Lu(e,F),e.intersect=function(t){return op.polygon(e,b,t)},o}async function Kp(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;e.useHtmlLabels||Xe(Pe())||(e.centerLabel=!0);const{shapeSvg:a,bbox:s,label:n}=await vu(t,e,Fu(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),h=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-l/2,d=-h/2,{cssStyles:u}=e,p=Su.svg(a),g=Ch(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(c,d,l,h,g),y=a.insert(()=>f,":first-child");return y.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),n.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),Lu(e,y),e.intersect=function(t){return op.rect(e,t)},a}ht(Gp,"linedCylinder"),ht(Zp,"linedWaveEdgedRect"),ht(Qp,"multiRect"),ht(Jp,"multiWaveEdgedRectangle"),ht(Kp,"note");var tg=ht((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function eg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await vu(t,e,Fu(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=Su.svg(o),r=Ch(e,{}),i=tg(0,0,s),a=t.path(i,r);l=o.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),h&&l.attr("style",h)}else l=hp(o,s,s,n),l.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&l.attr("style",i),Lu(e,l),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=op.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},o}async function rg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?21:o??0,s="neo"===e.look?12:o??0,{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=-((e?.width??l.width)+("neo"===e.look?2*a:a))/2,d=-((e?.height??l.height)+("neo"===e.look?2*s:s))/2,u=d/2,p=[{x:c+u,y:d},{x:c,y:0},{x:c+u,y:-d},{x:-c,y:-d},{x:-c,y:d}],{cssStyles:g}=e,f=Su.svg(n),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Mu(p),C=f.path(m,y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-u/2},0)`),h.attr("transform",`translate(${-u/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),Lu(e,x),e.intersect=function(t){return op.polygon(e,p,t)},n}async function ig(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);let o;e.labelStyle=r,o=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),s=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=e.description,h=e.label,c=await Du(n,h,e.labelStyle,!0,!0);let d={width:0,height:0};if(Xe(jr())){const t=c.children[0],e=mo(c);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}ut.info("Text 2",l);const u=l||[],p=c.getBBox(),g=await Du(n,Array.isArray(u)?u.join("<br/>"):u,e.labelStyle,!0,!0),f=g.children[0],y=mo(g);d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const m=(e.padding||0)/2;mo(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+m+5)+")"),mo(c).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-m+3)+")");const C=d.width+(e.padding||0),x=d.height+(e.padding||0),k=-d.width/2-m,b=-d.height/2-m;let w,T;if("handDrawn"===e.look){const t=Su.svg(a),r=Ch(e,{}),i=t.path(zu(k,b,C,x,e.rx||0),r),o=t.line(-d.width/2-m,-d.height/2-m+p.height+m,d.width/2+m,-d.height/2-m+p.height+m,r);T=a.insert(()=>(ut.debug("Rough node insert CXC",i),o),":first-child"),w=a.insert(()=>(ut.debug("Rough node insert CXC",i),i),":first-child")}else w=s.insert("rect",":first-child"),T=s.insert("line"),w.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-m).attr("y",-d.height/2-m).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),T.attr("class","divider").attr("x1",-d.width/2-m).attr("x2",d.width/2+m).attr("y1",-d.height/2-m+p.height+m).attr("y2",-d.height/2-m+p.height+m);return Lu(e,w),e.intersect=function(t){return op.rect(e,t)},a}async function og(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return Rp(t,e,{rx:i,ry:i,labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}ht(eg,"question"),ht(rg,"rect_left_inv_arrow"),ht(ig,"rectWithTitle"),ht(og,"roundedRect");async function ag(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0,{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e?.width??n.width)+2*o+("neo"===e.look?8:16),c=(e?.height??n.height)+2*a,d=h-8,u=c,p=8-h/2,g=-c/2,{cssStyles:f}=e,y=Su.svg(s),m=Ch(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:g},{x:p+d,y:g},{x:p+d,y:g+u},{x:p-8,y:g+u},{x:p-8,y:g},{x:p,y:g},{x:p,y:g+u}],x=y.polygon(C.map(t=>[t.x,t.y]),m),k=s.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path").attr("style",hh(f)),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),f&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${4-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Lu(e,k),e.intersect=function(t){return op.rect(e,t)},s}async function sg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:n,bbox:l,label:h}=await vu(t,e,Fu(e)),c=(e?.width?e?.width:l.width)+2*a,d=1.5*((e?.height?e?.height:l.height)+2*s)/1.5,u=-c/2,p=-d/2,{cssStyles:g}=e,f=Su.svg(n),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p},{x:u,y:p+d},{x:u+c,y:p+d},{x:u+c,y:p-d/2}],C=Mu(m),x=f.path(C,y),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-c/2+(e.padding??0)-(l.x-(l.left??0))}, ${-d/4+(e.padding??0)-(l.y-(l.top??0))})`),Lu(e,k),e.intersect=function(t){return op.polygon(e,m,t)},n}async function ng(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return Rp(t,e,{rx:0,ry:0,labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function lg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?20:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=l.height+("neo"===e.look?2*s:s),c=l.width+h/4+("neo"===e.look?2*a:a),d=h/2,{cssStyles:u}=e,p=Su.svg(n),g=Ch(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...$u(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...$u(c/2-d,0,d,50,270,450)],y=Mu(f),m=p.path(y,g),C=n.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),Lu(e,C),e.intersect=function(t){return op.polygon(e,f,t)},n}async function hg(t,e){return Rp(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5})}function cg(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:s,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const c=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),d=Su.svg(c),u=Ch(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const p=d.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),g=n??l,f=5*(e.width??0)/14,y=d.circle(0,0,f,{...u,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>p,":first-child");if(m.insert(()=>y),"handDrawn"!==e.look&&m.attr("class","outer-path"),a&&m.selectAll("path").attr("style",a),o&&m.selectAll("path").attr("style",o),e.width<25&&h&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";m.attr("style",`filter:url(#${r})`)}return Lu(e,m),e.intersect=function(t){return op.circle(e,(e.width??0)/2,t)},c}function dg(t,e,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=Su.svg(a).circle(0,0,e.width,ph(i));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return Lu(e,s),e.intersect=function(t){return op.circle(e,(e.width??7)/2,t)},a}ht(ag,"shadedProcess"),ht(sg,"slopedRect"),ht(ng,"squareRect"),ht(lg,"stadium"),ht(hg,"state"),ht(cg,"stateEnd"),ht(dg,"stateStart");async function ug(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e?.padding??8,a="neo"===e.look?28:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width??l.width)+16+a,c=(e?.height??l.height)+s,d=h-16,u=c,p=-h/2,g=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=t.rectangle(p,g,d+16,u,r),o=t.line(p+8,g,p+8,g+u,r),a=t.line(p+8+d,g,p+8+d,g+u,r);n.insert(()=>o,":first-child"),n.insert(()=>a,":first-child");const s=n.insert(()=>i,":first-child"),{cssStyles:l}=e;s.attr("class","basic label-container").attr("style",hh(l)),Lu(e,s)}else{const t=hp(n,d,u,f);i&&t.attr("style",i),Lu(e,t)}return e.intersect=function(t){return op.polygon(e,f,t)},n}ht(ug,"subroutine");async function pg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height?e?.height:l.height)+2*s,c=.2*h,d=.2*h,u=(e?.width?e?.width:l.width)+2*a+c-c,p=h,g=-u/2,f=-p/2,{cssStyles:y}=e,m=Su.svg(n),C=Ch(e,{}),x=[{x:g-c/2,y:f},{x:g+u+c/2,y:f},{x:g+u+c/2,y:f+p},{x:g-c/2,y:f+p}],k=[{x:g+u-c/2,y:f+p},{x:g+u+c/2,y:f+p},{x:g+u+c/2,y:f+p-d}];"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=Mu(x),w=m.path(b,C),T=Mu(k),B=m.path(T,{...C,fillStyle:"solid"}),S=n.insert(()=>B,":first-child");return S.insert(()=>w,":first-child"),S.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),Lu(e,S),e.intersect=function(t){return op.polygon(e,x,t)},n}async function gg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await vu(t,e,Fu(e)),n=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),h=l/8,c=.2*n,d=.2*l,u=l+h,{cssStyles:p}=e,g=Su.svg(o),f=Ch(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:u/2},...Au(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,h,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],m=-n/2+n/2*.1,C=-u/2-.4*d,x=[{x:m+n-c,y:1.3*(C+l)},{x:m+n,y:C+l-d},{x:m+n,y:.9*(C+l)},...Au(m+n,1.25*(C+l),m+n-c,1.3*(C+l),.02*-l,.5)],k=Mu(y),b=g.path(k,f),w=Mu(x),T=g.path(w,{...f,fillStyle:"solid"}),B=o.insert(()=>T,":first-child");return B.insert(()=>b,":first-child"),B.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Lu(e,B),e.intersect=function(t){return op.polygon(e,y,t)},o}async function fg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await vu(t,e,Fu(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),l=-s/2,h=-n/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",s).attr("height",n),Lu(e,c),e.intersect=function(t){return op.rect(e,t)},o}ht(pg,"taggedRect"),ht(gg,"taggedWaveEdgedRectangle"),ht(fg,"text");var yg=ht((t,e,r,i,o,a)=>`M${t},${e}\n a${o},${a} 0,0,1 0,${-i}\n l${r},0\n a${o},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),mg=ht((t,e,r,i,o,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Cg=ht((t,e,r,i,o,a)=>[`M${t+r/2},${-i/2}`,`a${o},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function xg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?12:o/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-a,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-a-3*r,e.width<10&&(e.width=10)}const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e.height?e.height:n.height)+a,c=h/2,d=c/(2.5+h/50),u=(e.width?e.width:n.width)+d+a,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=Su.svg(s),r=mg(0,0,u,h,d,c),i=Cg(0,0,u,h,d,c),o=t.path(r,Ch(e,{})),a=t.path(i,Ch(e,{fill:"none"}));g=s.insert(()=>a,":first-child"),g=s.insert(()=>o,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=yg(0,0,u,h,d,c);g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",hh(p)).attr("style",i),g.attr("class","basic label-container outer-path"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),l.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Lu(e,g),e.intersect=function(t){const r=op.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let o=d*d*(1-i*i/(c*c));0!=o&&(o=Math.sqrt(Math.abs(o))),o=d-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},s}async function kg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a=(e.look,o),s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=Su.svg(n),r=Ch(e,{}),i=Mu(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=hp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Lu(e,u),e.intersect=function(t){return op.polygon(e,d,t)},n}async function bg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+2*s,{cssStyles:d}=e,u=Su.svg(n),p=Ch(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-h/2*.8,y:-c/2},{x:h/2*.8,y:-c/2},{x:h/2,y:-c/2*.6},{x:h/2,y:c/2},{x:-h/2,y:c/2},{x:-h/2,y:-c/2*.6}],f=Mu(g),y=u.path(f,p),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),Lu(e,m),e.intersect=function(t){return op.polygon(e,g,t)},n}ht(xg,"tiltedCylinder"),ht(kg,"trapezoid"),ht(bg,"trapezoidalPentagon");async function wg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=Fe(jr().flowchart?.htmlLabels),c=(e?.width?e?.width:n.width)+a,d=e?.height?e?.height:c+n.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-d}],{cssStyles:p}=e,g=Su.svg(s),f=Ch(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=Mu(u),m=g.path(y,f),C=s.insert(()=>m,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",p),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),e.width=c,e.height=d,Lu(e,C),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(e.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return ut.info("Triangle intersect",e,u,t),op.polygon(e,u,t)},s}async function Tg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;let n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:l,bbox:h,label:c}=await vu(t,e,Fu(e)),d=(e?.width?e?.width:h.width)+2*(a??0),u=(e?.height?e?.height:h.height)+2*(s??0),p="neo"===e.look?u/4:u/8,g=u+(n?p:-p),{cssStyles:f}=e,y=14-d,m=y>0?y/2:0,C=Su.svg(l),x=Ch(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=[{x:-d/2-m,y:g/2},...Au(-d/2-m,g/2,d/2+m,g/2,p,.8),{x:d/2+m,y:-g/2},{x:-d/2-m,y:-g/2}],b=Mu(k),w=C.path(b,x),T=l.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))},${-u/2+(e.padding??0)-p-(h.y-(h.top??0))})`),Lu(e,T),e.intersect=function(t){return op.polygon(e,k,t)},l}async function Bg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?20:o;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:n,bbox:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+s,d=c/8,u=c+2*d,{cssStyles:p}=e,g=Su.svg(n),f=Ch(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...Au(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...Au(h/2,-u/2,-h/2,-u/2,d,-1)],m=Mu(y),C=g.path(m,f),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),Lu(e,x),e.intersect=function(t){return op.polygon(e,y,t)},n}ht(wg,"triangle"),ht(Tg,"waveEdgedRectangle"),ht(Bg,"waveRectangle");var Sg=10;async function vg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-Sg,10),e.height=Math.max((e?.height??0)-2*a-Sg,10));const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=(e?.width?e?.width:n.width)+2*o+Sg,c=(e?.height?e?.height:n.height)+2*a+Sg,d=h-Sg,u=c-Sg,p=-d/2,g=-u/2,{cssStyles:f}=e,y=Su.svg(s),m=Ch(e,{}),C=[{x:p-Sg,y:g-Sg},{x:p-Sg,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g-Sg}],x=`M${p-Sg},${g-Sg} L${p+d},${g-Sg} L${p+d},${g+u} L${p-Sg},${g+u} L${p-Sg},${g-Sg}\n M${p-Sg},${g} L${p+d},${g}\n M${p},${g-Sg} L${p},${g+u}`;"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=y.path(x,m),b=s.insert(()=>k,":first-child");return b.attr("transform","translate(5, 5)"),b.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${-n.width/2+5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),Lu(e,b),e.intersect=function(t){return op.polygon(e,C,t)},s}ht(vg,"windowPane");var _g=new Set(["redux-color","redux-dark-color"]),Lg=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fg(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:o}=Pe(),{rowEven:a,rowOdd:s,nodeBorder:n,borderColorArray:l}=o;if("handDrawn"===e.look){const{themeVariables:r}=Pe(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await Fg(t,o)}const h=Pe();e.useHtmlLabels=h.htmlLabels;let c=h.er?.diagramPadding??10,d=h.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:p,nodeStyles:g}=mh(e);if(0===r.attributes.length&&e.label){const o={rx:0,ry:0,labelPaddingX:c,labelPaddingY:1.5*c};Zl(e.label,h)+2*o.labelPaddingX<h.er.minEntityWidth&&(e.width=h.er.minEntityWidth);const a=await Rp(t,e,o);if(null!=i&&_g.has(i)){const t=r.colorIndex??0;a.attr("data-color-id","color-"+t%l.length)}if(!Fe(h.htmlLabels)){const t=a.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return a}h.htmlLabels||(c*=1.25,d*=1.25);let f=Fu(e);f||(f="node default");const y=t.insert("g").attr("class",f).attr("id",e.domId||e.id),m=await Mg(y,e.label??"",h,0,0,["name"],p);m.height+=d;let C=0;const x=[],k=[];let b=0,w=0,T=0,B=0,S=!0,v=!0;for(const t of r.attributes){const e=await Mg(y,t.type,h,0,C,["attribute-type"],p);b=Math.max(b,e.width+c);const r=await Mg(y,t.name,h,0,C,["attribute-name"],p);w=Math.max(w,r.width+c);const i=await Mg(y,t.keys.join(),h,0,C,["attribute-keys"],p);T=Math.max(T,i.width+c);const o=await Mg(y,t.comment,h,0,C,["attribute-comment"],p);B=Math.max(B,o.width+c);const a=Math.max(e.height,r.height,i.height,o.height)+d;k.push({yOffset:C,rowHeight:a}),C+=a}let _=4;T<=c&&(S=!1,T=0,_--),B<=c&&(v=!1,B=0,_--);const L=y.node().getBBox();if(m.width+2*c-(b+w+T+B)>0){const t=m.width+2*c-(b+w+T+B);b+=t/_,w+=t/_,T>0&&(T+=t/_),B>0&&(B+=t/_)}const F=b+w+T+B,M=Su.svg(y),A=Ch(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let $=0;k.length>0&&($=k.reduce((t,e)=>t+(e?.rowHeight??0),0));const E=Math.max(L.width+2*c,e?.width||0,F),q=Math.max(($??0)+m.height,e?.height||0),I=-E/2,O=-q/2;if(y.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=mo(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=b:i.attr("class").includes("attribute-keys")?a+=b+w:i.attr("class").includes("attribute-comment")&&(a+=b+w+T))}i.attr("transform",`translate(${I+c/2+a}, ${s+O+m.height+d/2})`)}),y.select(".name").attr("transform","translate("+-m.width/2+", "+(O+d/2)+")"),null!=i&&_g.has(i)){const t=r.colorIndex??0;y.attr("data-color-id","color-"+t%l.length)}const D=M.rectangle(I,O,E,q,A),z=y.insert(()=>D,":first-child").attr("class","outer-path").attr("style",u.join(""));x.push(0);for(const[t,e]of k.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=M.rectangle(I,m.height+O+e?.yOffset,E,e?.rowHeight,{...A,fill:r?a:s,stroke:n});y.insert(()=>i,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const P=1e-4;let W=Ag(I,m.height+O,E+I,m.height+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A);if(y.insert(()=>R).attr("class","divider"),W=Ag(b+I,m.height+O,b+I,q+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider"),S){const t=b+w+I;W=Ag(t,m.height+O,t,q+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}if(v){const t=b+w+T+I;W=Ag(t,m.height+O,t,q+O,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}for(const t of x){const e=m.height+O+t;W=Ag(I,e,E+I,e,P),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}if(Lu(e,z),g&&"handDrawn"!==e.look)if(null!=i&&Lg.has(i))y.selectAll("path").attr("style",g);else{const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return op.rect(e,t)},y}async function Mg(t,e,r,i=0,o=0,a=[],s=""){const n=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",s);e!==cr(e)&&(e=(e=cr(e)).replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Td(n,e,{width:Zl(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=l.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Fe(r.htmlLabels)){const t=l.children[0];t.style.textAlign="start";const e=mo(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return h}function Ag(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function $g(t,e,r,i,o=r.class.padding??12){const a=i?0:3,s=t.insert("g").attr("class",Fu(e)).attr("id",e.domId||e.id);let n=null,l=null,h=null,c=null,d=0,u=0,p=0;if(n=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await Eg(n,{text:`«${t}»`},0);d=n.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Eg(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=s.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await Eg(h,t,f,[t.parseClassifier()])+a}p=h.node().getBBox().height,p<=0&&(p=o/2),c=s.insert("g").attr("class","methods-group text");let y=0;for(const t of e.methods){y+=await Eg(c,t,y,[t.parseClassifier()])+a}let m=s.node().getBBox();if(null!==n){const t=n.node().getBBox();n.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}async function Eg(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=Pe();let s="useHtmlLabels"in e?e.useHtmlLabels:Fe(a.htmlLabels)??!0,n="";n="text"in e?e.text:e.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),yr(n)&&(s=!0);const l=await Td(o,Ur(nh(n)),{width:Zl(n,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let h,c=1;if(s){const t=l.children[0],e=mo(l);c=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(c+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===n.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}ht(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{i.includes("font-weight: bolder")&&mo(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const t=l.children[0];if(""===l.textContent||l.textContent.includes(">")){t.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===n[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=l.getBBox()}return o.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}async function qg(t,e){const r=jr(),{themeVariables:i}=r,{useGradient:o}=i,a=r.class.padding??12,s=a,n=e.useHtmlLabels??Fe(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await $g(t,e,r,n,s),{labelStyles:d,nodeStyles:u}=mh(e);e.labelStyle=d,e.cssStyles=l.styles||"";const p=l.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=p.replaceAll("!important","").split(";"));const g=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,f=Su.svg(h),y=Ch(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Math.max(e.width??0,c.width);let C=Math.max(e.height??0,c.height);const x=(e.height??0)>c.height;0===l.members.length&&0===l.methods.length?C+=s:l.members.length>0&&0===l.methods.length&&(C+=2*s);const k=-m/2,b=-C/2;let w=g?2*a:0===l.members.length&&0===l.methods.length?-a:0;x&&(w=2*a);const T=f.rectangle(k-a,b-a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0),m+2*a,C+2*a+w,y),B=h.insert(()=>T,":first-child");B.attr("class","basic label-container outer-path");const S=B.node().getBBox(),v=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,_=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,L=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,F=(v+_+b+a-(b-a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0)))/2;if(h.selectAll(".text").each((t,e,i)=>{const o=mo(i[e]),c=o.attr("transform");let d=0;if(c){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);t&&(d=parseFloat(t[2]))}let u=d+b+a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max(L,s/2);u=x?Math.max(F,v+_+t+b+2*s+a)+2*s:v+_+t+b+4*s+a}0===l.members.length&&0===l.methods.length&&r.class?.hideEmptyMembersBox&&(u=l.annotations.length>0?d-s:d),n||(u-=4);let p=k;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(p=-o.node()?.getBBox().width/2||0,h.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),o.attr("transform",`translate(${p}, ${u})`)}),l.members.length>0||l.methods.length>0||g){const t=v+_+b+a,r=f.line(S.x,t,S.x+S.width,t+.001,y);h.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",p)}if(g||l.members.length>0||l.methods.length>0){const t=v+_+L+b+2*s+a,r=f.line(S.x,x?Math.max(F,t):t,S.x+S.width,(x?Math.max(F,t):t)+.001,y);h.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",p)}if("handDrawn"!==l.look&&h.selectAll("path").attr("style",p),B.select(":nth-child(2)").attr("style",p),h.selectAll(".divider").select("path").attr("style",p),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",p),!n){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(p);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}else if(d){const e=t.exec(d);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}}}return Lu(e,B),e.intersect=function(t){return op.rect(e,t)},h}async function Ig(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const o=e,a=e,s="verifyMethod"in e,n=Fu(e),{themeVariables:l}=jr(),{borderColorArray:h,requirementEdgeLabelBackground:c}=l,d=t.insert("g").attr("class",n).attr("id",e.domId??e.id);let u;u=s?await Og(d,`<<${o.type}>>`,0,e.labelStyle):await Og(d,"<<Element>>",0,e.labelStyle);let p=u;const g=await Og(d,o.name,p,e.labelStyle+"; font-weight: bold;");if(p+=g+20,s){p+=await Og(d,""+(o.requirementId?`ID: ${o.requirementId}`:""),p,e.labelStyle);p+=await Og(d,""+(o.text?`Text: ${o.text}`:""),p,e.labelStyle);p+=await Og(d,""+(o.risk?`Risk: ${o.risk}`:""),p,e.labelStyle),await Og(d,""+(o.verifyMethod?`Verification: ${o.verifyMethod}`:""),p,e.labelStyle)}else{p+=await Og(d,""+(a.type?`Type: ${a.type}`:""),p,e.labelStyle),await Og(d,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),p,e.labelStyle)}const f=(d.node()?.getBBox().width??200)+20,y=(d.node()?.getBBox().height??200)+20,m=-f/2,C=-y/2,x=Su.svg(d),k=Ch(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const b=x.rectangle(m,C,f,y,k),w=d.insert(()=>b,":first-child");if(w.attr("class","basic label-container outer-path").attr("style",i),h?.length){const t=e.colorIndex??0;d.attr("data-color-id","color-"+t%h.length)}if(d.selectAll(".label").each((t,e,r)=>{const i=mo(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const n=s-y/2;let l=m+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${n+20})`)}),p>u+g+20){const t=C+u+g+20;let r;if("neo"===e.look){const e=.001,i=[[m,t],[m+f,t],[m+f,t+e],[m,t+e]];r=x.polygon(i,k)}else r=x.line(m,t,m+f,t,k);d.insert(()=>r).attr("class","divider")}return Lu(e,w),e.intersect=function(t){return op.rect(e,t)},i&&"handDrawn"!==e.look&&(c||h?.length)&&d.selectAll("path").attr("style",i),d}async function Og(t,e,r,i=""){if(""===e)return 0;const o=t.insert("g").attr("class","label").attr("style",i),a=jr(),s=a.htmlLabels??!0,n=await Td(o,Ur(nh(e)),{width:Zl(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const t=n.children[0],e=mo(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}else{const t=n.children[0];for(const e of t.children)i&&e.setAttribute("style",i);l=n.getBBox(),l.height+=6}return o.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}ht(Fg,"erBox"),ht(Mg,"addText"),ht(Ag,"lineToPolygon"),ht($g,"textHelper"),ht(Eg,"addText"),ht(qg,"classBox"),ht(Ig,"requirementBox"),ht(Og,"addText");var Dg=ht(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function zg(t,e,{config:r}){const{labelStyles:i,nodeStyles:o}=mh(e);e.labelStyle=i||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:n,label:l}=await vu(t,e,Fu(e)),h=e.padding||10;let c,d="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),c=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,g;({label:p,bbox:g}=c?await _u(c,"ticket"in e&&e.ticket||"",u):await _u(s,"ticket"in e&&e.ticket||"",u));const{label:f,bbox:y}=await _u(s,"assigned"in e&&e.assigned||"",u);e.width=a;const m=e?.width||0,C=Math.max(g.height,y.height)/2,x=Math.max(n.height+20,e?.height||0)+C,k=-m/2,b=-x/2;let w;l.attr("transform","translate("+(h-m/2)+", "+(-C-n.height/2)+")"),p.attr("transform","translate("+(h-m/2)+", "+(-C+n.height/2)+")"),f.attr("transform","translate("+(h+m/2-y.width-20)+", "+(-C+n.height/2)+")");const{rx:T,ry:B}=e,{cssStyles:S}=e;if("handDrawn"===e.look){const t=Su.svg(s),r=Ch(e,{}),i=T||B?t.path(zu(k,b,m,x,T||0),r):t.rectangle(k,b,m,x,r);w=s.insert(()=>i,":first-child"),w.attr("class","basic label-container").attr("style",S||null)}else{w=s.insert("rect",":first-child"),w.attr("class","basic label-container __APA__").attr("style",o).attr("rx",T??5).attr("ry",B??5).attr("x",k).attr("y",b).attr("width",m).attr("height",x);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=k+2,i=b+Math.floor((T??0)/2),o=b+x-Math.floor((T??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",Dg(t))}}return Lu(e,w),e.height=x,e.intersect=function(t){return op.rect(e,t)},s}async function Pg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await vu(t,e,Fu(e)),l=a.width+10*s,h=a.height+8*s,c=.15*l,{cssStyles:d}=e,u=a.width+20,p=a.height+20,g=Math.max(l,u),f=Math.max(h,p);let y;n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);const m=`M0 0 \n a${c},${c} 1 0,0 ${.25*g},${-1*f*.1}\n a${c},${c} 1 0,0 ${.25*g},0\n a${c},${c} 1 0,0 ${.25*g},0\n a${c},${c} 1 0,0 ${.25*g},${.1*f}\n\n a${c},${c} 1 0,0 ${.15*g},${.33*f}\n a${.8*c},${.8*c} 1 0,0 0,${.34*f}\n a${c},${c} 1 0,0 ${-1*g*.15},${.33*f}\n\n a${c},${c} 1 0,0 ${-1*g*.25},${.15*f}\n a${c},${c} 1 0,0 ${-1*g*.25},0\n a${c},${c} 1 0,0 ${-1*g*.25},0\n a${c},${c} 1 0,0 ${-1*g*.25},${-1*f*.15}\n\n a${c},${c} 1 0,0 ${-1*g*.1},${-1*f*.33}\n a${.8*c},${.8*c} 1 0,0 0,${-1*f*.34}\n a${c},${c} 1 0,0 ${.1*g},${-1*f*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=Su.svg(o),r=Ch(e,{}),i=t.path(m,r);y=o.insert(()=>i,":first-child"),y.attr("class","basic label-container").attr("style",hh(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return y.attr("transform",`translate(${-g/2}, ${-f/2})`),Lu(e,y),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return ut.info("Bang intersect",e,t),op.rect(e,t)},o}async function Wg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await vu(t,e,Fu(e)),l=a.width+2*s,h=a.height+2*s,c=.15*l,d=.25*l,u=.35*l,p=.2*l,{cssStyles:g}=e;let f;const y=`M0 0 \n a${c},${c} 0 0,1 ${.25*l},${-1*l*.1}\n a${u},${u} 1 0,1 ${.4*l},${-1*l*.1}\n a${d},${d} 1 0,1 ${.35*l},${.2*l}\n\n a${c},${c} 1 0,1 ${.15*l},${.35*h}\n a${p},${p} 1 0,1 ${-1*l*.15},${.65*h}\n\n a${d},${c} 1 0,1 ${-1*l*.25},${.15*l}\n a${u},${u} 1 0,1 ${-1*l*.5},0\n a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}\n\n a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}\n a${p},${p} 1 0,1 ${.1*l},${-1*h*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=Su.svg(o),r=Ch(e,{}),i=t.path(y,r);f=o.insert(()=>i,":first-child"),f.attr("class","basic label-container").attr("style",hh(g))}else f=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),Lu(e,f),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return ut.info("Cloud intersect",e,t),op.rect(e,t)},o}async function Rg(t,e){const{labelStyles:r,nodeStyles:i}=mh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await vu(t,e,Fu(e)),l=a.width+8*s,h=a.height+2*s,c="neo"===e.look?`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-5}\n H${-l/2}\n Z\n `:`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${-(l-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",c);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),Lu(e,d),e.calcIntersect=function(t,e){return op.rect(t,e)},e.intersect=function(t){return op.rect(e,t)},o}async function Ng(t,e){return up(t,e,{padding:e.padding??0})}ht(zg,"kanbanItem"),ht(Pg,"bang"),ht(Wg,"cloud"),ht(Rg,"defaultMindmapNode"),ht(Ng,"mindmapCircle");var jg=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ng},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:og},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:lg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ug},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Sp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:up},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Pg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Wg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:eg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ep},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Hp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:jp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:kg},{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:Wp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_p},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:fg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:cp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ag},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:dg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:cg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Mp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:qp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:yp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Cp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:kp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Yp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Tg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ap},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:xg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Gp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:bp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:vp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:wg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:vg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Lp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:bg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:sg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Jp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Qp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:lp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:gp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:gg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:pg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Bg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:rg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Zp}],Hg=ht(()=>{const t={state:hg,choice:dp,note:Kp,rectWithTitle:ig,labelRect:Np,iconSquare:zp,iconCircle:Op,icon:Ip,iconRounded:Dp,imageSquare:Pp,anchor:ap,kanbanItem:zg,mindmapCircle:Ng,defaultMindmapNode:Rg,classBox:qg,erBox:Fg,requirementBox:Ig},e=[...Object.entries(t),...jg.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Yg(t){return t in Hg}ht(Yg,"isValidShape");var Ug=new Map;async function Vg(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Hg[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),o=await a(i,e,r)}else o=await a(t,e,r),i=o;return i.attr("data-look",hh(e.look)),e.tooltip&&o.attr("title",e.tooltip),Ug.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}ht(Vg,"insertNode");var Xg=ht((t,e)=>{Ug.set(e.id,t)},"setNodeElem"),Gg=ht(()=>{Ug.clear()},"clear"),Zg=ht(t=>{const e=Ug.get(t.id);ut.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode"),Qg=ht((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&tf(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&tf(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"addEdgeMarkers"),Jg={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Kg=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],tf=ht((t,e,r,i,o,a,s=!1,n)=>{const l=Jg[r],h=l&&Kg.includes(l.type);if(!l)return void ut.warn(`Unknown arrow type: ${r}`);const c=`${o}_${a}-${l.type}${"start"===e?"Start":"End"}${s&&h?"-margin":""}`;if(n&&""!==n.trim()){const r=`${c}_${n.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(c);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",n),l.fill&&t.setAttribute("fill",n)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${c})`)},"addEdgeMarker"),ef=ht(t=>"string"==typeof t?t:jr()?.flowchart?.curve,"resolveEdgeCurveType"),rf=new Map,of=new Map,af=ht(()=>{rf.clear(),of.clear()},"clear"),sf=ht(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),nf=ht(async(t,e)=>{const r=jr();let i=Xe(r);const{labelStyles:o}=mh(e);e.labelStyle=o;const a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",e.id),n="markdown"===e.labelType,l=await Td(t,e.label,{style:sf(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:void 0},r);s.node().appendChild(l),ut.info("abc82",e,e.labelType);let h,c=l.getBBox(),d=c;if(i){const t=l.children[0],e=mo(l);c=t.getBoundingClientRect(),d=c,e.attr("width",c.width),e.attr("height",c.height)}else{const t=mo(l).select("text").node();t&&"function"==typeof t.getBBox&&(d=t.getBBox())}if(s.attr("transform",ul(d,i)),rf.set(e.id,a),e.width=c.width,e.height=c.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.startLabelLeft,sf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),of.get(e.id)||of.set(e.id,{}),of.get(e.id).startLeft=r,lf(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.startLabelRight,sf(e.labelStyle)||"",!1,!1);h=a,o.node().appendChild(a);let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),of.get(e.id)||of.set(e.id,{}),of.get(e.id).startRight=r,lf(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.endLabelLeft,sf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),r.node().appendChild(a),of.get(e.id)||of.set(e.id,{}),of.get(e.id).endLeft=r,lf(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Du(o,e.endLabelRight,sf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=mo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",ul(s,i)),r.node().appendChild(a),of.get(e.id)||of.set(e.id,{}),of.get(e.id).endRight=r,lf(h,e.endLabelRight)}return l},"insertEdgeLabel");function lf(t,e){Xe(jr())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}ht(lf,"setTerminalWidth");var hf=ht((t,e)=>{ut.debug("Moving label abc88 ",t.id,t.label,rf.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=jr(),{subGraphTitleTotalMargin:o}=dh(i);if(t.label){const i=rf.get(t.id);let a=t.x,s=t.y;if(r){const i=ah.calcLabelPosition(r);ut.debug("Moving label "+t.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,s=i.y)}i.attr("transform",`translate(${a}, ${s+o/2})`)}if(t.startLabelLeft){const e=of.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=of.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=of.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=of.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=ah.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),cf=ht((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,n=t.height/2;return o>=s||a>=n},"outsideNode"),df=ht((t,e,r)=>{ut.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2;let n=r.x<e.x?s-a:s+a;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;n=c*t/h;const i={x:r.x<e.x?r.x+n:r.x-c+n,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===n&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),ut.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${n}`,i),i}{n=r.x<e.x?e.x-s-i:i-s-e.x;let t=h*n/c,o=r.x<e.x?r.x+c-n:r.x-c+n,a=r.y<e.y?r.y+t:r.y-t;return ut.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${n}`,{_x:o,_y:a}),0===n&&(o=e.x,a=e.y),0===c&&(o=e.x),0===h&&(a=e.y),{x:o,y:a}}},"intersection"),uf=ht((t,e)=>{ut.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(ut.info("abc88 checking point",t,e),cf(e,t)||o)ut.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=df(e,i,t);ut.debug("abc88 inside",t,i,a),ut.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?ut.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),ut.debug("returning points",r),r},"cutPathAtIntersect");function pf(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],a=t[i],s=t[i+1];(o.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5||o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}ht(pf,"extractCornerPoints");var gf=ht(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),ff=ht(function(t){const{cornerPointPositions:e}=pf(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],a=t[i],s=gf(e,a,5),n=gf(o,a,5),l=n.x-s.x,h=n.y-s.y;r.push(s);const c=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){ut.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;d=a.x===s.x?{x:l<0?s.x-t+c:s.x+t-c,y:h<0?s.y-c:s.y+c}:{x:l<0?s.x-c:s.x+c,y:h<0?s.y-t+c:s.y+t-c}}else ut.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(d,n)}else r.push(t[i]);return r},"fixCorners"),yf=ht((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4);return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),mf=ht(function(t,e,r,i,o,a,s,n=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=jr();let f=e.points,x=!1;const k=o;var T=a;const B=[];for(const t in e.cssCompiledStyles)yh(t)||B.push(e.cssCompiledStyles[t]);ut.debug("UIO intersect check",e.points,T.x,k.x),T.intersect&&k.intersect&&!n&&(f=f.slice(1,e.points.length-1),f.unshift(k.intersect(f[0])),ut.debug("Last point UIO",e.start,"--\x3e",e.end,f[f.length-1],T,T.intersect(f[f.length-1])),f.push(T.intersect(f[f.length-1])));const S=btoa(JSON.stringify(f));e.toCluster&&(ut.info("to cluster abc88",r.get(e.toCluster)),f=uf(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(ut.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(f,null,2)),f=uf(f.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let v=f.filter(t=>!Number.isNaN(t.y));const _=ef(e.curve);"rounded"!==_&&(v=ff(v));let L=y;switch(_){case"linear":case"rounded":L=y;break;case"basis":default:L=b;break;case"cardinal":L=D;break;case"bumpX":L=C;break;case"bumpY":L=m;break;case"catmullRom":L=H;break;case"monotoneX":L=g;break;case"monotoneY":L=p;break;case"natural":L=u;break;case"step":L=d;break;case"stepAfter":L=c;break;case"stepBefore":L=h}const{x:F,y:M}=xl(e),A=w().x(F).y(M).curve(L);let $,E;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let q="rounded"===_?Cf(kf(v,e),5):A(v);const I=Array.isArray(e.style)?e.style:[e.style];let O=I.find(t=>t?.startsWith("stroke:")),z="";e.animate&&(z="edge-animation-fast"),e.animation&&(z="edge-animation-"+e.animation);let P=!1;if("handDrawn"===e.look){const r=Su.svg(t);Object.assign([],v);$+=" transition",E=mo(r.path(q,{roughness:.3,seed:l})).select("path").attr("id",`${s}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",I?I.reduce((t,e)=>t+";"+e,""):"");let i=E.attr("d");E.attr("d",i),t.node().appendChild(E.node())}else{const r=B.join(";"),i=I?I.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(I?I.reduce((t,e)=>t+";"+e,""):"");E=t.append("path").attr("d",q).attr("id",`${s}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",o),O=o.match(/stroke:([^;]+)/)?.[1],P=!0===e.animate||!!e.animation||r.includes("animation");const a=E.node(),n="function"==typeof a.getTotalLength?a.getTotalLength():0,l=gl[e.arrowTypeStart]||0,h=gl[e.arrowTypeEnd]||0;if("neo"===e.look&&!P){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?yf(n,l,h):`0 ${l} ${n-l-h} ${h}`}; stroke-dashoffset: 0;`;E.attr("style",t+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",e.id),E.attr("data-points",S),E.attr("data-look",hh(e.look)),e.showPoints&&v.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let W="";(jr().flowchart.arrowMarkerAbsolute||jr().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ut.info("arrowTypeStart",e.arrowTypeStart),ut.info("arrowTypeEnd",e.arrowTypeEnd);Qg(E,e,W,s,i,!P&&"neo"===e?.look,O);const R=f[Math.floor(f.length/2)];ah.isLabelCoordinateInPath(R,E.attr("d"))||(x=!0);let N={};return x&&(N.updatedPath=f),N.originalPath=e.points,N},"insertEdge");function Cf(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let a=0;a<i;a++){const s=t[a],n=t[a-1],l=t[a+1];if(0===a)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const t=s.x-n.x,i=s.y-n.y,a=l.x-s.x,h=l.y-s.y,c=Math.hypot(t,i),d=Math.hypot(a,h);if(c<o||d<o){r+=`L${s.x},${s.y}`;continue}const u=t/c,p=i/c,g=a/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),C=Math.acos(m);if(C<o||Math.abs(Math.PI-C)<o){r+=`L${s.x},${s.y}`;continue}const x=Math.min(e/Math.sin(C/2),c/2,d/2),k=s.x-u*x,b=s.y-p*x,w=s.x+g*x,T=s.y+f*x;r+=`L${k},${b}`,r+=`Q${s.x},${s.y} ${w},${T}`}}return r}function xf(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function kf(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&pl[e.arrowTypeStart]){const i=pl[e.arrowTypeStart],o=t[0],a=t[1],{angle:s}=xf(o,a),n=i*Math.cos(s),l=i*Math.sin(s);r[0].x=o.x+n,r[0].y=o.y+l}const i=t.length;if(i>=2&&pl[e.arrowTypeEnd]){const o=pl[e.arrowTypeEnd],a=t[i-1],s=t[i-2],{angle:n}=xf(s,a),l=o*Math.cos(n),h=o*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}ht(Cf,"generateRoundedPath"),ht(xf,"calculateDeltaAndAngle"),ht(kf,"applyMarkerOffsetsToPoints");var bf=ht((t,e,r,i)=>{e.forEach(e=>{Hf[e](t,r,i)})},"insertMarkers"),wf=ht((t,e,r)=>{ut.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Tf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Bf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Sf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),vf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),_f=ht((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Lf=ht((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Ff=ht((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Mf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Af=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{transitionColor:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),$f=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Ef=ht((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),qf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),If=ht((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Of=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Df=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),zf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Pf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Wf=ht((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),Rf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Nf=ht((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");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"),jf=ht((t,e,r)=>{const i=Pe(),{themeVariables:o}=i,{strokeWidth:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Hf={extension:wf,composition:Tf,aggregation:Bf,dependency:Sf,lollipop:vf,point:_f,circle:Lf,cross:Ff,barb:Mf,barbNeo:Af,only_one:$f,zero_or_one:Ef,one_or_more:qf,zero_or_more:If,only_one_neo:Of,zero_or_one_neo:Df,one_or_more_neo:zf,zero_or_more_neo:Pf,requirement_arrow:Wf,requirement_contains:Nf,requirement_arrow_neo:Rf,requirement_contains_neo:jf},Yf=bf,Uf={common:kr,getConfig:Pe,insertCluster:Uu,insertEdge:mf,insertEdgeLabel:nf,insertMarkers:Yf,insertNode:Vg,interpolateToCurve:Ml,labelHelper:vu,log:ut,positionEdgeLabel:hf},Vf={},Xf=ht(t=>{for(const e of t)Vf[e.name]=e},"registerLayoutLoaders");ht(()=>{Xf([{name:"dagre",loader:ht(async()=>await import("./dagre-KV5264BT-DV80i6H7.js"),"loader")},{name:"cose-bilkent",loader:ht(async()=>await import("./cose-bilkent-S5V4N54A-B9_if8Zu.js"),"loader")}])},"registerDefaultLayoutLoaders")();var Gf=ht(async(t,e)=>{if(!(t.layoutAlgorithm in Vf))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const r=Vf[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:a}=t.config,{useGradient:s,gradientStart:n,gradientStop:l}=a,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),s){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(t,e,Uf,{algorithm:r.algorithm})},"render"),Zf=ht((t="",{fallback:e="dagre"}={})=>{if(t in Vf)return t;if(e in Vf)return ut.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),Qf="comm",Jf="rule",Kf="decl",ty=Math.abs,ey=String.fromCharCode;function ry(t){return t.trim()}function iy(t,e,r){return t.replace(e,r)}function oy(t,e){return 0|t.charCodeAt(e)}function ay(t,e,r){return t.slice(e,r)}function sy(t){return t.length}function ny(t,e){return e.push(t),t}var ly=1,hy=1,cy=0,dy=0,uy=0,py="";function gy(t,e,r,i,o,a,s,n){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:ly,column:hy,length:s,return:"",siblings:n}}function fy(){return uy=dy>0?oy(py,--dy):0,hy--,10===uy&&(hy=1,ly--),uy}function yy(){return uy=dy<cy?oy(py,dy++):0,hy++,10===uy&&(hy=1,ly++),uy}function my(){return oy(py,dy)}function Cy(){return dy}function xy(t,e){return ay(py,t,e)}function ky(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function by(t){return ry(xy(dy-1,By(91===t?t+2:40===t?t+1:t)))}function wy(t){for(;(uy=my())&&uy<33;)yy();return ky(t)>2||ky(uy)>3?"":" "}function Ty(t,e){for(;--e&&yy()&&!(uy<48||uy>102||uy>57&&uy<65||uy>70&&uy<97););return xy(t,Cy()+(e<6&&32==my()&&32==yy()))}function By(t){for(;yy();)switch(uy){case t:return dy;case 34:case 39:34!==t&&39!==t&&By(uy);break;case 40:41===t&&By(t);break;case 92:yy()}return dy}function Sy(t,e){for(;yy()&&t+uy!==57&&(t+uy!==84||47!==my()););return"/*"+xy(e,dy-1)+"*"+ey(47===t?t:yy())}function vy(t){for(;!ky(my());)yy();return xy(t,dy)}function _y(t){return function(t){return py="",t}(Ly("",null,null,null,[""],t=function(t){return ly=hy=1,cy=sy(py=t),dy=0,[]}(t),0,[0],t))}function Ly(t,e,r,i,o,a,s,n,l){for(var h=0,c=0,d=s,u=0,p=0,g=0,f=1,y=1,m=1,C=0,x=0,k="",b=o,w=a,T=i,B=k;y;)switch(g=x,x=yy()){case 40:108!=g&&58==oy(B,d-1)?(C++,B+="("):B+=by(x);break;case 41:C--,B+=")";break;case 34:case 39:case 91:B+=by(x);break;case 9:case 10:case 13:case 32:if(C>0){B+=ey(x);break}B+=wy(g);break;case 92:B+=Ty(Cy()-1,7);continue;case 47:switch(my()){case 42:case 47:ny(My(Sy(yy(),Cy()),e,r,l),l),5!=ky(g||1)&&5!=ky(my()||1)||!sy(B)||" "===ay(B,-1,void 0)||(B+=" ");break;default:B+="/"}break;case 123*f:n[h++]=sy(B)*m;case 125*f:case 59:case 0:if(C>0&&x){B+=ey(x);break}switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(B=iy(B,/\f/g,"")),p>0&&(sy(B)-d||0===f)&&ny(p>32?Ay(B+";",i,r,d-1,l):Ay(iy(B," ","")+";",i,r,d-2,l),l);break;case 59:B+=";";default:if(ny(T=Fy(B,e,r,h,c,o,n,k,b=[],w=[],d,a),a),123===x)if(0===c)Ly(B,e,T,T,b,a,d,n,w);else{switch(u){case 99:if(110===oy(B,3))break;case 108:if(97===oy(B,2))break;default:c=0;case 100:case 109:case 115:}c?Ly(t,T,T,i&&ny(Fy(t,T,T,0,0,o,n,k,o,b=[],d,w),w),o,w,d,n,i?b:w):Ly(B,T,T,T,[""],w,0,n,w)}}h=c=p=0,f=m=1,k=B="",d=s;break;case 58:d=1+sy(B),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==fy())continue;switch(B+=ey(x),x*f){case 38:m=c>0?1:(B+="\f",-1);break;case 44:if(C>0)break;n[h++]=(sy(B)-1)*m,m=1;break;case 64:45===my()&&(B+=by(yy())),u=my(),c=d=sy(k=B+=vy(Cy())),x++;break;case 45:45===g&&2==sy(B)&&(f=0)}}return a}function Fy(t,e,r,i,o,a,s,n,l,h,c,d){for(var u=o-1,p=0===o?a:[""],g=function(t){return t.length}(p),f=0,y=0,m=0;f<i;++f)for(var C=0,x=ay(t,u+1,u=ty(y=s[f])),k=t;C<g;++C)(k=ry(y>0?p[C]+" "+x:iy(x,/&\f/g,p[C])))&&(l[m++]=k);return gy(t,e,r,0===o?Jf:n,l,h,c,d)}function My(t,e,r,i){return gy(t,e,r,Qf,ey(uy),ay(t,2,-2),0,i)}function Ay(t,e,r,i,o){return gy(t,e,r,Kf,ay(t,0,i),ay(t,i+1,-1),i,o)}function $y(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function Ey(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case"@namespace":case Kf:return t.return=t.return||t.value;case Qf:return"";case"@keyframes":return t.return=t.value+"{"+$y(t.children,i)+"}";case Jf:if(!sy(t.value=t.props.join(",")))return""}return sy(r=$y(t.children,i))?t.return=t.value+"{"+r+"}":""}var qy={id:"c4",detector:ht(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-DYguHdC-.js");return{id:"c4",diagram:t}},"loader")},Iy="flowchart",Oy=ht((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),Dy={id:Iy,detector:Oy,loader:ht(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-DB-IVMWG.js");return{id:Iy,diagram:t}},"loader")},zy="flowchart-v2",Py=ht((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),Wy={id:zy,detector:Py,loader:ht(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-DB-IVMWG.js");return{id:zy,diagram:t}},"loader")},Ry={id:"er",detector:ht(t=>/^\s*erDiagram/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-DcBeM5L8.js");return{id:"er",diagram:t}},"loader")},Ny="gitGraph",jy={id:Ny,detector:ht(t=>/^\s*gitGraph/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-Bu-s5uIZ.js");return{id:Ny,diagram:t}},"loader")},Hy="gantt",Yy={id:Hy,detector:ht(t=>/^\s*gantt/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-CHeCKKxg.js");return{id:Hy,diagram:t}},"loader")},Uy="info",Vy={id:Uy,detector:ht(t=>/^\s*info/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-CPcCPi5m.js");return{id:Uy,diagram:t}},"loader")},Xy={id:"pie",detector:ht(t=>/^\s*pie/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-BXJ3wszp.js");return{id:"pie",diagram:t}},"loader")},Gy="quadrantChart",Zy={id:Gy,detector:ht(t=>/^\s*quadrantChart/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-DQY0pNz6.js");return{id:Gy,diagram:t}},"loader")},Qy="xychart",Jy={id:Qy,detector:ht(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-KvOi074l.js");return{id:Qy,diagram:t}},"loader")},Ky="requirement",tm={id:Ky,detector:ht(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-BEx2GMJz.js");return{id:Ky,diagram:t}},"loader")},em="sequence",rm={id:em,detector:ht(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-BRN5pTP-.js");return{id:em,diagram:t}},"loader")},im="class",om=ht((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),am={id:im,detector:om,loader:ht(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-BXMqxslq.js");return{id:im,diagram:t}},"loader")},sm="classDiagram",nm=ht((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),lm={id:sm,detector:nm,loader:ht(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-BXMqxslq.js");return{id:sm,diagram:t}},"loader")},hm="state",cm=ht((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),dm={id:hm,detector:cm,loader:ht(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX-BgMmQXPF.js");return{id:hm,diagram:t}},"loader")},um="stateDiagram",pm=ht((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),gm={id:um,detector:pm,loader:ht(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-DcAYS7fn.js");return{id:um,diagram:t}},"loader")},fm="journey",ym={id:fm,detector:ht(t=>/^\s*journey/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-CIFSUUZI.js");return{id:fm,diagram:t}},"loader")},mm=ht((t,e,r)=>{ut.debug("rendering svg for syntax error\n");const i=pa(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Tr(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:mm},xm=Cm,km={db:{},renderer:Cm,parser:{parse:ht(()=>{},"parse")}},bm="flowchart-elk",wm=ht((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),Tm={id:bm,detector:wm,loader:ht(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-DB-IVMWG.js");return{id:bm,diagram:t}},"loader")},Bm="timeline",Sm={id:Bm,detector:ht(t=>/^\s*timeline/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-B8yc3YE0.js");return{id:Bm,diagram:t}},"loader")},vm="mindmap",_m={id:vm,detector:ht(t=>/^\s*mindmap/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-SgHbFXe-.js");return{id:vm,diagram:t}},"loader")},Lm="kanban",Fm={id:Lm,detector:ht(t=>/^\s*kanban/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-CIs3hbs0.js");return{id:Lm,diagram:t}},"loader")},Mm="sankey",Am={id:Mm,detector:ht(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-Xs8yE439.js");return{id:Mm,diagram:t}},"loader")},$m="packet",Em={id:$m,detector:ht(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-BnRtbot8.js");return{id:$m,diagram:t}},"loader")},qm="radar",Im={id:qm,detector:ht(t=>/^\s*radar-beta/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-C9TdZJKm.js");return{id:qm,diagram:t}},"loader")},Om="block",Dm={id:Om,detector:ht(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D-CCNaXRDY.js");return{id:Om,diagram:t}},"loader")},zm="treeView",Pm={id:zm,detector:ht(t=>/^\s*treeView-beta/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-CvSq5VhZ.js");return{id:zm,diagram:t}},"loader")},Wm="architecture",Rm={id:Wm,detector:ht(t=>/^\s*architecture/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-JfdzkzTF.js");return{id:Wm,diagram:t}},"loader")},Nm="ishikawa",jm={id:Nm,detector:ht(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-CueHOskG.js");return{id:Nm,diagram:t}},"loader")},Hm="venn",Ym={id:Hm,detector:ht(t=>/^\s*venn-beta/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-CWksExk6.js");return{id:Hm,diagram:t}},"loader")},Um="treemap",Vm={id:Um,detector:ht(t=>/^\s*treemap/.test(t),"detector"),loader:ht(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-2LXWeAq0.js");return{id:Um,diagram:t}},"loader")},Xm="wardley-beta",Gm=ht(t=>/^\s*wardley-beta/i.test(t),"detector"),Zm={id:Xm,detector:Gm,loader:ht(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-B0EUAKR5.js");return{id:Xm,diagram:t}},"loader")},Qm=!1,Jm=ht(()=>{Qm||(Qm=!0,Zr("error",km,t=>"error"===t.toLowerCase().trim()),Zr("---",{db:{clear:ht(()=>{},"clear")},styles:{},renderer:{draw:ht(()=>{},"draw")},parser:{parse:ht(()=>{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:ht(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Yt(Tm,_m,Rm),Yt(qy,Fm,lm,am,Ry,Yy,Vy,Xy,tm,rm,Wy,Dy,Sm,jy,gm,dm,ym,Zy,Am,Em,Jy,Dm,Pm,Im,jm,Vm,Ym,Zm))},"addDiagrams"),Km=ht(async()=>{ut.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(jt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Qr(t)}catch{try{const{diagram:t,id:i}=await r();Zr(i,t,e)}catch(e){throw ut.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete jt[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){ut.error(`Failed to load ${t.length} external diagrams`);for(const e of t)ut.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function tC(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function eC(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}ht(tC,"setA11yDiagramInfo"),ht(eC,"addSVGa11yTitleDescription");var rC=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{ht(this,"Diagram")}static async fromText(e,r={}){const i=Pe(),o=Ht(e,i);e=sh(e)+"\n";try{Qr(o)}catch{const t=Vt(o);if(!t)throw new Nt(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();Zr(e,r)}const{db:a,parser:s,renderer:n,init:l}=Qr(o);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(o,e,a,s,n)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},iC=[],oC=ht(()=>{iC.forEach(t=>{t()}),iC=[]},"attachFunctions"),aC=ht(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function sC(t){const e=t.match(Pt);if(!e)return{text:t,metadata:{}};let r=dl(e[1],{schema:cl})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}ht(sC,"extractFrontMatter");var nC=ht(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),lC=ht(t=>{const{text:e,metadata:r}=sC(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),hC=ht(t=>{const e=ah.detectInit(t)??{},r=ah.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:Ll(t),directive:e}},"processDirectives");function cC(t){const e=nC(t),r=lC(e),i=hC(r.text),o=oh(r.config,i.directive);return{code:t=aC(i.text),title:r.title,config:o}}function dC(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}ht(cC,"preprocessDiagram"),ht(dC,"toBase64");var uC=["foreignobject"],pC=["dominant-baseline"];function gC(t){const e=cC(t);return Ne(),Re(e.config??{}),e}async function fC(t,e){Jm();try{const{code:e,config:r}=gC(t);return{diagramType:(await vC(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}ht(gC,"processAndSetConfigs"),ht(fC,"parse");var yC=ht((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),mC=ht((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=Xe(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{it(t.styles)||i.forEach(e=>{r+=yC(t.id,e,t.styles)}),it(t.textStyles)||(r+=yC(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),CC=ht((t,e,r,i)=>{const o=mC(t,r);return $y(_y(`${i}{${Lr(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i)}}`),Ey)},"createUserStyles"),xC=ht((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=nh(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),kC=ht((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${dC(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),bC=ht((t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function wC(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}ht(wC,"sandboxedIframe");var TC=ht((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),BC=ht(async function(t,r,i){Jm();const o=gC(r);r=o.code;const a=Pe();ut.debug(a),r.length>(a?.maxTextSize??5e4)&&(r="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const s="#"+t,n="i"+t,l="#"+n,h="d"+t,c="#"+h,d=ht(()=>{const t=mo(p?l:c).node();t&&"remove"in t&&t.remove()},"removeTempElements");let u=mo("body");const p="sandbox"===a.securityLevel,g="loose"===a.securityLevel,f=a.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),p){const t=wC(mo(i),n);u=mo(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=mo(i);bC(u,t,h,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(TC(document,t,h,n),p){const t=wC(mo("body"),n);u=mo(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=mo("body");bC(u,t,h)}let y,m;try{y=await rC.fromText(r,{title:o.title})}catch(t){if(a.suppressErrorRendering)throw d(),t;y=await rC.fromText("error"),m=t}const C=u.select(c).node(),x=y.type,k=C.firstChild,b=k.firstChild,w=y.renderer.getClasses?.(r,y),T=CC(a,x,w,s),B=document.createElement("style");B.innerHTML=T,k.insertBefore(B,b);try{await y.renderer.draw(r,t,"11.14.0",y)}catch(e){throw a.suppressErrorRendering?d():xm.draw(r,t,"11.14.0"),e}const S=u.select(`${c} svg`),v=y.db.getAccTitle?.(),_=y.db.getAccDescription?.();_C(x,S,v,_),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select(c).node().innerHTML;if(ut.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),L=xC(L,p,Fe(a.arrowMarkerAbsolute)),p){const t=u.select(c+" svg").node();L=kC(L,t)}else g||(L=e.sanitize(L,{ADD_TAGS:uC,ADD_ATTR:pC,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oC(),m)throw m;return d(),{diagramType:x,svg:L,bindFunctions:y.db.bindFunctions}},"render");function SC(t={}){const e=Gt({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Ie(e),e?.theme&&e.theme in ke?e.themeVariables=ke[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=ke.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?qe(e):De();pt(r.logLevel),Jm()}ht(SC,"initialize");var vC=ht((t,e={})=>{const{code:r}=cC(t);return rC.fromText(r,e)},"getDiagramFromText");function _C(t,e,r,i){tC(e,t),eC(e,r,i,e.attr("id"))}ht(_C,"addA11yInfo");var LC=Object.freeze({render:BC,parse:fC,getDiagramFromText:vC,initialize:SC,getConfig:Pe,setConfig:ze,getSiteConfig:De,updateSiteConfig:Oe,reset:ht(()=>{Ne()},"reset"),globalReset:ht(()=>{Ne(Le)},"globalReset"),defaultConfig:Le});pt(Pe().logLevel),Ne(Pe());var FC=ht((t,e,r)=>{ut.warn(t),eh(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),MC=ht(async function(t={querySelector:".mermaid"}){try{await AC(t)}catch(e){if(eh(e)&&ut.error(e.str),NC.parseError&&NC.parseError(e),!t.suppressErrors)throw ut.error("Use the suppressErrors option to suppress these errors"),e}},"run"),AC=ht(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=LC.getConfig();let o;if(ut.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}ut.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(ut.debug("Start On Load: "+i?.startOnLoad),LC.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new ah.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];for(const e of Array.from(o)){if(ut.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${a.next()}`;s=e.innerHTML,s=Zc(ah.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=ah.detectInit(s);i&&ut.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:o}=await RC(r,s,e);e.innerHTML=i,t&&await t(r),o&&o(e)}catch(t){FC(t,n,NC.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),$C=ht(function(t){LC.initialize(t)},"initialize"),EC=ht(async function(t,e,r){ut.warn("mermaid.init is deprecated. Please use run instead."),t&&$C(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await MC(i)},"init"),qC=ht(async(t,{lazyLoad:e=!0}={})=>{Jm(),Yt(...t),!1===e&&await Km()},"registerExternalDiagrams"),IC=ht(function(){if(NC.startOnLoad){const{startOnLoad:t}=LC.getConfig();t&&NC.run().catch(t=>ut.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",IC,!1);var OC=ht(function(t){NC.parseError=t},"setParseErrorHandler"),DC=[],zC=!1,PC=ht(async()=>{if(!zC){for(zC=!0;DC.length>0;){const t=DC.shift();if(t)try{await t()}catch(t){ut.error("Error executing queue",t)}}zC=!1}},"executeQueue"),WC=ht(async(t,e)=>new Promise((r,i)=>{const o=ht(()=>new Promise((o,a)=>{LC.parse(t,e).then(t=>{o(t),r(t)},t=>{ut.error("Error parsing",t),NC.parseError?.(t),a(t),i(t)})}),"performCall");DC.push(o),PC().catch(i)}),"parse"),RC=ht((t,e,r)=>new Promise((i,o)=>{const a=ht(()=>new Promise((a,s)=>{LC.render(t,e,r).then(t=>{a(t),i(t)},t=>{ut.error("Error parsing",t),NC.parseError?.(t),s(t),o(t)})}),"performCall");DC.push(a),PC().catch(o)}),"render"),NC={startOnLoad:!0,mermaidAPI:LC,parse:WC,render:RC,init:EC,run:MC,registerExternalDiagrams:qC,registerLayoutLoaders:Xf,initialize:$C,parseError:void 0,contentLoaded:IC,setParseErrorHandler:OC,detectType:Ht,registerIconPacks:td,getRegisteredDiagramsMetadata:ht(()=>Object.keys(jt).map(t=>({id:t})),"getRegisteredDiagramsMetadata")},jC=NC,HC=Object.freeze({__proto__:null,default:jC});export{Fr as $,Yr as A,Mt as B,Lt as C,ct as D,Pe as E,Vr as F,oh as G,Se as H,Hl as I,cl as J,pa as K,oe as L,Cd as M,yr as N,mr as O,ih as P,nr as Q,xr as R,cr as S,Nl as T,mt as U,$t as V,qt as W,It as X,Br as Y,Tl as Z,ht as _,Or as a,Uu as a0,Vg as a1,Zg as a2,xl as a3,Xe as a4,Td as a5,ul as a6,dh as a7,Wl as a8,nh as a9,uh as aa,Su as ab,Yf as ac,Gg as ad,af as ae,Vu as af,Lu as ag,Xg as ah,mf as ai,hf as aj,nf as ak,Et as al,Ve as am,id as an,td as ao,Qc as ap,nt as aq,it as ar,mh as as,yh as at,jC as au,HC as av,Ir as b,jr as c,mo as d,Tr as e,Gt as f,zr as g,Zl as h,er as i,wl as j,kr as k,ut as l,Gl as m,Ge as n,Hr as o,Zf as p,Pr as q,Gf as r,Dr as s,Wr as t,ah as u,dl as v,Vl as w,Yg as x,lh as y,qr as z};
|