@spteck/react-controls-v2 2.2.5 → 2.2.6
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/{_arrayEach-D4zuu96h.cjs → _arrayEach-CAQQp4Pa.cjs} +2 -2
- package/dist/{_arrayEach-CqFZfCII.js → _arrayEach-Cwv-C9Og.js} +2 -2
- package/dist/{arc-aQvhbW8i.js → arc-Bw6DhSi8.js} +2 -2
- package/dist/{arc-DVsLnFmY.cjs → arc-okIdGGQf.cjs} +2 -2
- package/dist/architecture-7HQA4BMR-BehZQXGM.js +6 -0
- package/dist/{architecture-7HQA4BMR-XjppxKRg.cjs → architecture-7HQA4BMR-VRHl0WAG.cjs} +2 -2
- package/dist/{architectureDiagram-VXUJARFQ-DIlvBP7n.cjs → architectureDiagram-VXUJARFQ-BmUckqP4.cjs} +2 -2
- package/dist/{architectureDiagram-VXUJARFQ-D6Nz1iJf.js → architectureDiagram-VXUJARFQ-jeJiEwo0.js} +4 -4
- package/dist/{blockDiagram-VD42YOAC-COTmdEYf.js → blockDiagram-VD42YOAC-CQMLVG9p.js} +5 -5
- package/dist/{blockDiagram-VD42YOAC-eoa5Tjmi.cjs → blockDiagram-VD42YOAC-Cf1w6RSy.cjs} +2 -2
- package/dist/{c4Diagram-YG6GDRKO-DZUAZkaf.js → c4Diagram-YG6GDRKO-DQ1DM-hS.js} +3 -3
- package/dist/{c4Diagram-YG6GDRKO-D_8NNIZj.cjs → c4Diagram-YG6GDRKO-F89ysfvk.cjs} +2 -2
- package/dist/channel-CKuBsdyV.cjs +2 -0
- package/dist/{channel-CStgee6z.js → channel-CSrapMLf.js} +2 -2
- package/dist/{chunk-4BX2VUAB-BMIPlysy.js → chunk-4BX2VUAB-BCOKb8lN.js} +2 -2
- package/dist/{chunk-4BX2VUAB-TOFCWNSm.cjs → chunk-4BX2VUAB-DguP-lnc.cjs} +2 -2
- package/dist/{chunk-55IACEB6-CVM8RfF8.js → chunk-55IACEB6-B96t1BIq.js} +2 -2
- package/dist/{chunk-55IACEB6-Du1XS8Uq.cjs → chunk-55IACEB6-CC07tSHB.cjs} +2 -2
- package/dist/{chunk-B4BG7PRW-DEwHKt7v.cjs → chunk-B4BG7PRW-Csa3ViKx.cjs} +2 -2
- package/dist/{chunk-B4BG7PRW-CrL0RwBf.js → chunk-B4BG7PRW-aK7oMSOd.js} +5 -5
- package/dist/{chunk-DI55MBZ5-Dcfk7rkk.js → chunk-DI55MBZ5-B02Dm5ea.js} +4 -4
- package/dist/{chunk-DI55MBZ5-BWCTxXqE.cjs → chunk-DI55MBZ5-Dq5Sl8zR.cjs} +2 -2
- package/dist/{chunk-FMBD7UC4-DMErx-lW.cjs → chunk-FMBD7UC4-BjhMSXjI.cjs} +2 -2
- package/dist/{chunk-FMBD7UC4-B5kmDdIm.js → chunk-FMBD7UC4-YCBHVAL4.js} +2 -2
- package/dist/{chunk-QN33PNHL-DbaaoJ4j.js → chunk-QN33PNHL-B_p3A_22.js} +2 -2
- package/dist/{chunk-QN33PNHL-CkT5TAcW.cjs → chunk-QN33PNHL-DCv_ieMX.cjs} +2 -2
- package/dist/{chunk-QZHKN3VN-CMS4Eu2L.cjs → chunk-QZHKN3VN-BFRx9G0z.cjs} +2 -2
- package/dist/{chunk-QZHKN3VN-BsktB_nO.js → chunk-QZHKN3VN-DRLEsMJj.js} +2 -2
- package/dist/{chunk-TZMSLE5B-lGq5Y0nP.cjs → chunk-TZMSLE5B-DZUorszs.cjs} +2 -2
- package/dist/{chunk-TZMSLE5B-CbhkmL3S.js → chunk-TZMSLE5B-DmeaE6Eh.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-ChI1HQhB.cjs → classDiagram-2ON5EDUG-BmFRijDQ.cjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CtIswLAU.js → classDiagram-2ON5EDUG-DW2aCkne.js} +3 -3
- package/dist/{classDiagram-v2-WZHVMYZB-ChI1HQhB.cjs → classDiagram-v2-WZHVMYZB-BmFRijDQ.cjs} +2 -2
- package/dist/{classDiagram-v2-WZHVMYZB-CtIswLAU.js → classDiagram-v2-WZHVMYZB-DW2aCkne.js} +3 -3
- package/dist/{cose-bilkent-S5V4N54A-CC01Tkem.cjs → cose-bilkent-S5V4N54A-CDJnP_Yk.cjs} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-DzADNsjH.js → cose-bilkent-S5V4N54A-CnTvq6wx.js} +2 -2
- package/dist/{dagre-6UL2VRFP-CDYaaqiU.cjs → dagre-6UL2VRFP-BTjEhGrQ.cjs} +2 -2
- package/dist/{dagre-6UL2VRFP-ybWMcc5w.js → dagre-6UL2VRFP-D4KyzrI8.js} +2 -2
- package/dist/{diagram-PSM6KHXK-CbgHTYSR.js → diagram-PSM6KHXK-CIMfiYz7.js} +5 -5
- package/dist/{diagram-PSM6KHXK-DqhM0iw7.cjs → diagram-PSM6KHXK-H6bEKZLm.cjs} +2 -2
- package/dist/{diagram-QEK2KX5R-CNed7b76.js → diagram-QEK2KX5R-BzuMWDt6.js} +4 -4
- package/dist/{diagram-QEK2KX5R-UQaqb5nU.cjs → diagram-QEK2KX5R-DsFIAL3v.cjs} +2 -2
- package/dist/{diagram-S2PKOQOG-OdSmYpDj.cjs → diagram-S2PKOQOG-CTLNC-Iz.cjs} +2 -2
- package/dist/{diagram-S2PKOQOG-BYSFHhaj.js → diagram-S2PKOQOG-CYvdKVYZ.js} +4 -4
- package/dist/{erDiagram-Q2GNP2WA-D6Xk9c-u.cjs → erDiagram-Q2GNP2WA-B8Cby2EW.cjs} +2 -2
- package/dist/{erDiagram-Q2GNP2WA-l9zKKI29.js → erDiagram-Q2GNP2WA-BcW11SJy.js} +5 -5
- package/dist/{flowDiagram-NV44I4VS-B-5P4uRf.cjs → flowDiagram-NV44I4VS-D447_R3t.cjs} +2 -2
- package/dist/{flowDiagram-NV44I4VS-qlSwOj8Q.js → flowDiagram-NV44I4VS-DEAvKwa7.js} +6 -6
- package/dist/{ganttDiagram-JELNMOA3-BvXDYjE1.cjs → ganttDiagram-JELNMOA3-BHGSOmkk.cjs} +2 -2
- package/dist/{ganttDiagram-JELNMOA3-i4-qMitb.js → ganttDiagram-JELNMOA3-nAqZzkfj.js} +3 -3
- package/dist/gitGraph-G5XIXVHT-BPiaST9T.js +6 -0
- package/dist/{gitGraph-G5XIXVHT-BdOKVbYt.cjs → gitGraph-G5XIXVHT-D0HIYGjj.cjs} +2 -2
- package/dist/{gitGraphDiagram-V2S2FVAM-BFlWQFzy.js → gitGraphDiagram-V2S2FVAM-Bz64qMJx.js} +5 -5
- package/dist/{gitGraphDiagram-V2S2FVAM-DStoHbQA.cjs → gitGraphDiagram-V2S2FVAM-BzDdhr7h.cjs} +2 -2
- package/dist/{index-H1wV1Hpq.js → index-C-Hyw7_i.js} +39 -32
- package/dist/{index-D7xz2-Uy.cjs → index-D5nkqpSD.cjs} +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/info-VBDWY6EO-BLmqoE1d.js +6 -0
- package/dist/{info-VBDWY6EO-D_RrmivC.cjs → info-VBDWY6EO-D5dR6PPz.cjs} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-BnevWU-I.cjs → infoDiagram-HS3SLOUP-Bs3peWgl.cjs} +2 -2
- package/dist/{infoDiagram-HS3SLOUP-BZK0euSr.js → infoDiagram-HS3SLOUP-DDgg8QyI.js} +3 -3
- package/dist/{journeyDiagram-XKPGCS4Q-itaMgi9U.js → journeyDiagram-XKPGCS4Q-COvGJw7y.js} +5 -5
- package/dist/{journeyDiagram-XKPGCS4Q-BODApzJb.cjs → journeyDiagram-XKPGCS4Q-DQFssTKA.cjs} +2 -2
- package/dist/{kanban-definition-3W4ZIXB7-DX8gChMt.js → kanban-definition-3W4ZIXB7-Bm4Nfy8N.js} +3 -3
- package/dist/{kanban-definition-3W4ZIXB7-BY1oKhQF.cjs → kanban-definition-3W4ZIXB7-CQiLQ-MZ.cjs} +2 -2
- package/dist/{linear-cXEFiojf.cjs → linear-CRUR7yE8.cjs} +2 -2
- package/dist/{linear-Pcf3i3zp.js → linear-QB06oWOn.js} +2 -2
- package/dist/{maplibre-gl-BdoOI0bI.cjs → maplibre-gl-BkWxiGfO.cjs} +2 -2
- package/dist/{maplibre-gl-KdF6druQ.js → maplibre-gl-CouexcMM.js} +2 -2
- package/dist/{mermaid-parser.core-Dr6wdKdo.cjs → mermaid-parser.core-BDJaQNLh.cjs} +2 -2
- package/dist/{mermaid-parser.core-B7B_q9yz.js → mermaid-parser.core-DjEhyqCt.js} +2413 -2473
- package/dist/{mindmap-definition-VGOIOE7T-BWtHcwxS.cjs → mindmap-definition-VGOIOE7T-C7Scfjt5.cjs} +2 -2
- package/dist/{mindmap-definition-VGOIOE7T-DB1ivc4U.js → mindmap-definition-VGOIOE7T-Cq5vQrhh.js} +4 -4
- package/dist/{packet-DYOGHKS2-Bc88puEA.cjs → packet-DYOGHKS2-CR7ugQ48.cjs} +2 -2
- package/dist/packet-DYOGHKS2-DYJFb4dv.js +6 -0
- package/dist/{pie-VRWISCQL-BDZOt1dn.cjs → pie-VRWISCQL-BXJW8jKm.cjs} +2 -2
- package/dist/pie-VRWISCQL-Dx65A3Fo.js +6 -0
- package/dist/{pieDiagram-ADFJNKIX-rHRiRGIK.js → pieDiagram-ADFJNKIX-5iZzSJ8R.js} +5 -5
- package/dist/{pieDiagram-ADFJNKIX-BExkCjtp.cjs → pieDiagram-ADFJNKIX-D9M6lhX5.cjs} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-Dn_KGYm_.cjs → quadrantDiagram-AYHSOK5B-DDWEpiLt.cjs} +2 -2
- package/dist/{quadrantDiagram-AYHSOK5B-CkVTfka1.js → quadrantDiagram-AYHSOK5B-DG8iuyyj.js} +3 -3
- package/dist/radar-ZZBFDIW7-BAmnMK3b.js +6 -0
- package/dist/{radar-ZZBFDIW7-CN4CW1Sn.cjs → radar-ZZBFDIW7-DvMtYd_q.cjs} +2 -2
- package/dist/{requirementDiagram-UZGBJVZJ-DjP_ZBLH.js → requirementDiagram-UZGBJVZJ-CE1BWtzG.js} +4 -4
- package/dist/{requirementDiagram-UZGBJVZJ-Cnr0krQo.cjs → requirementDiagram-UZGBJVZJ-D8SeZ83D.cjs} +2 -2
- package/dist/{sankeyDiagram-TZEHDZUN-hSdLQwtC.cjs → sankeyDiagram-TZEHDZUN-DM5sLVVS.cjs} +2 -2
- package/dist/{sankeyDiagram-TZEHDZUN-anjZuu_D.js → sankeyDiagram-TZEHDZUN-DtBDd9Wm.js} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-DmCBPiOU.cjs → sequenceDiagram-WL72ISMW-BpCabHUR.cjs} +2 -2
- package/dist/{sequenceDiagram-WL72ISMW-CVybpZao.js → sequenceDiagram-WL72ISMW-BuykUiJg.js} +4 -4
- package/dist/{stateDiagram-FKZM4ZOC-CkrSnJVo.js → stateDiagram-FKZM4ZOC-D7OtXC8o.js} +3 -3
- package/dist/{stateDiagram-FKZM4ZOC-Dkv9EsDA.cjs → stateDiagram-FKZM4ZOC-cgi0ko-6.cjs} +2 -2
- package/dist/{stateDiagram-v2-4FDKWEC3-ClwE0oA4.cjs → stateDiagram-v2-4FDKWEC3-BGbtkwft.cjs} +2 -2
- package/dist/{stateDiagram-v2-4FDKWEC3-Cqvjxhmg.js → stateDiagram-v2-4FDKWEC3-ljhXua2L.js} +3 -3
- package/dist/{timeline-definition-IT6M3QCI-BVqV4KxZ.js → timeline-definition-IT6M3QCI-BSCNhkIf.js} +3 -3
- package/dist/{timeline-definition-IT6M3QCI-C-NbrBWK.cjs → timeline-definition-IT6M3QCI-DONwhI2c.cjs} +2 -2
- package/dist/{treemap-GDKQZRPO-DPSTeBWV.cjs → treemap-GDKQZRPO-C_BDlIt0.cjs} +2 -2
- package/dist/treemap-GDKQZRPO-DMDbGTv6.js +6 -0
- package/dist/{xychartDiagram-PRI3JC2R-ByRfiz5K.js → xychartDiagram-PRI3JC2R-CK1p_aA_.js} +3 -3
- package/dist/{xychartDiagram-PRI3JC2R-ClwDpfOS.cjs → xychartDiagram-PRI3JC2R-s6lxWNao.cjs} +2 -2
- package/package.json +1 -1
- package/dist/architecture-7HQA4BMR-B7-h10Im.js +0 -6
- package/dist/channel-B1SMUhi0.cjs +0 -2
- package/dist/gitGraph-G5XIXVHT-o_QJiZO1.js +0 -6
- package/dist/info-VBDWY6EO-C4My0e3p.js +0 -6
- package/dist/packet-DYOGHKS2-C_QHQq0u.js +0 -6
- package/dist/pie-VRWISCQL-DHWh56U-.js +0 -6
- package/dist/radar-ZZBFDIW7-HmbC_3ms.js +0 -6
- package/dist/treemap-GDKQZRPO-CGArjxOL.js +0 -6
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
&::-webkit-scrollbar-thumb:hover {
|
|
23
23
|
background: ${w.tokens.colorBrandBackgroundHover};
|
|
24
24
|
}
|
|
25
|
-
`,bi=q.forwardRef((e,t)=>{const{columns:r,items:n,enableSorting:i=!1,enableResizing:o=!1,selectionMode:a="none",onSelectionChange:s,defaultSelectedItems:l=[],defaultSortState:c,onSortChange:u,columnSizingOptions:h,resizableColumnsOptions:d,noItemsMessage:p,isLoadingData:f,isLoadingDataMessage:g,dataGridBodyClassName:m,dataGridBodyStyles:y,refreshData:x,enableInfiniteScroll:v,onLoadMore:C,infiniteScrollPageSize:k,hasNextPage:S,isLoadingMore:_,autoShowLastPage:T=!0,virtualizedHeight:A=600,virtualizedItemSize:P=44,startIndex:E,onRowClick:M}=e,I=q.useMemo(()=>r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>b.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>b.jsx(w.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[e.column]??"")}),compare:e.order})),[r]),L=q.useCallback(e=>n.findIndex(t=>t===e),[n]),[j,N]=q.useState(new Set(l.map(e=>L(e)))),[D,O]=q.useState(0);q.useEffect(()=>{l.length&&N(new Set(l.map(e=>L(e))))},[l,n,L]),q.useEffect(()=>{x&&N(new Set)},[x]);const[F,R]=q.useState(null),$=q.useMemo(()=>new Map(n.map((e,t)=>[e,t])),[n]);q.useEffect(()=>{"row"===a&&null!=F&&F>=n.length&&R(null)},[n,F,a]),q.useEffect(()=>{x&&"row"===a&&R(null)},[x,a]);const z=q.useRef(null),V=q.useRef(n.length),W=q.useRef(!1),H=q.useRef(!1),U=q.useRef(!1);q.useImperativeHandle(t,()=>({scrollToIndex:(e,t="auto")=>{const r=z.current;r&&"scrollToItem"in r&&r.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{O(e=>e+1),V.current=0,W.current=!1,H.current=!1,U.current=!1,G.current=-1,N(new Set),R(null)},getSelectedRow:()=>null!==F&&F<n.length?{item:n[F],index:F}:null,setSelectedRow:e=>{const t=n.findIndex(t=>t===e);-1!==t&&(R(t),null==s||s([e]))}})),q.useEffect(()=>{if(!W.current&&"number"==typeof E&&z.current){const e=z.current;"scrollToItem"in e&&e.scrollToItem(Math.min(E,Math.max(n.length-1,0)),"start"),W.current=!0}},[E,n.length]),q.useEffect(()=>{const e=V.current,t=n.length,r=t>e;if(V.current=t,!T||!r||0===e)return;const i=z.current;i&&"scrollToItem"in i&&i.scrollToItem(Math.max(t-1,0),"end")},[n.length,T]);const G=q.useRef(-1),X=q.useCallback(({visibleStopIndex:e})=>{if(!v||!C)return;if(_||U.current)return;if(!H.current)return void(H.current=!0);const t=k??20;if(n.length<t)return;const r=Math.max(5,Math.ceil(t/5));e>=n.length-r&&S&&G.current!==n.length&&(G.current=n.length,U.current=!0,C())},[v,C,S,_,n.length,k]);q.useEffect(()=>{U.current&&n.length>G.current&&(U.current=!1)},[n.length]);const J=q.useMemo(()=>({overflowX:"auto",overflowY:"hidden",position:"relative"}),[]);return b.jsxs("div",{style:J,className:xi,children:[f&&b.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",padding:8},children:q.isValidElement(g)?g:b.jsxs(w.Spinner,{size:"extra-tiny",children:[" ",g??"Loading data..."," "]})}),!f&&n.length?b.jsxs(B.DataGrid,{items:n,columns:I,sortable:i,onSortChange:i?(e,t)=>{u&&u(t)}:void 0,selectionMode:"none"===a||"row"===a?void 0:"multiple"===a?"multiselect":"single"===a?"single":void 0,selectedItems:j,onSelectionChange:(e,t)=>{const r=new Set;t.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||r.add(t)}),N(r),s&&s(Array.from(r).map(e=>n[e]))},defaultSortState:c,resizableColumns:o,columnSizingOptions:h,resizableColumnsOptions:d,focusMode:"cell",className:m,style:y,children:[b.jsx(B.DataGridHeader,{children:b.jsx(B.DataGridRow,{children:({renderHeaderCell:e})=>b.jsx(B.DataGridHeaderCell,{children:e()})})}),b.jsx(B.DataGridBody,{itemSize:P,height:A,width:"100%",listProps:{onItemsRendered:X},children:(e,t)=>(()=>{const r=e.item,i=$.get(r)??n.indexOf(r),o="row"===a,l=o&&F===i;return b.jsx(B.DataGridRow,{style:{...t,cursor:o?"pointer":void 0,background:l?w.tokens.colorSubtleBackgroundSelected:void 0},onClick:e=>{R(i),null==s||s([r]),null==M||M(r,i)},"aria-selected":l||void 0,children:({renderCell:e})=>b.jsx(B.DataGridCell,{children:e(r)})})})()})]},D):f||n.length?null:b.jsx("div",{children:p})]})});bi.displayName="DataGridV2";const vi=w.makeStyles({dialog:{overflow:"visible"},dialogBody:{overflow:"visible"}}),Ci=e=>{const{isOpen:t,dialogTitle:r,dialogActions:n,children:i,maxWidth:o,className:a,minHeight:s,minWidth:l,maxHeight:c}=e,u=vi();return t?b.jsx(w.Dialog,{open:t,modalType:"modal",children:b.jsxs(w.DialogSurface,{className:w.mergeClasses(u.dialog,a),style:{maxWidth:o??600,minWidth:l??200,...s?{minHeight:s}:{},...c?{maxHeight:c}:{}},children:[b.jsx(w.DialogTitle,{children:r}),b.jsx(w.DialogBody,{className:u.dialogBody,children:b.jsx(w.DialogContent,{children:i})}),b.jsx(w.DialogActions,{fluid:!0,position:"end",children:n})]})}):b.jsx(b.Fragment,{})},wi=()=>({closeButton:T.css({marginLeft:"auto",position:"absolute",top:"10px",right:"10px",zIndex:99999}),divider:T.css({width:"100%",height:"1px",backgroundColor:w.tokens.colorNeutralStroke1,marginTop:"6px"}),renderHeaderContent:T.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"stretch",width:"100%"}),renderHeaderHeader:T.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"10px",gap:"20px"}),renderHeaderFooter:T.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderBody:T.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderTitleContainer:T.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignContent:"center",alignItems:"center",width:"100%"}),renderHeaderTitle:T.css({display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",paddingTop:0,wordBreak:"break-word"}),renderHeaderDescription:T.css({display:"-webkit-box",WebkitLineClamp:"4",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),dialogTitleAndDescriptionContainer:T.css({display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",paddingLeft:"10px",paddingRight:"20px",width:"100%"})}),ki=()=>v.useMemo(()=>({container:T.css({display:"flex",alignItems:"center",justifyContent:"center",minHeight:"200px",textAlign:"center",backgroundColor:w.tokens.colorNeutralBackground1,border:`1px solid ${w.tokens.colorNeutralStroke2}`,borderRadius:w.tokens.borderRadiusLarge,padding:`${w.tokens.spacingVerticalXXL} ${w.tokens.spacingHorizontalXXL}`,boxShadow:w.tokens.shadow4,maxWidth:"500px",margin:"20px auto"}),icon:T.css({fontSize:"48px",color:w.tokens.colorPaletteRedForeground1,animation:"pulse 2s infinite","@keyframes pulse":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.05)"},"100%":{transform:"scale(1)"}}}),title:T.css({color:w.tokens.colorNeutralForeground1,fontWeight:w.tokens.fontWeightSemibold,textAlign:"center"}),message:T.css({color:w.tokens.colorNeutralForeground2,textAlign:"center",lineHeight:w.tokens.lineHeightBase400})}),[]),Si=w.makeStyles({root:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",...w.shorthands.padding("10px"),gap:"10px"},iconClass:{width:"32px",height:"32px"},errorContainer:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",gap:"10px",...w.shorthands.padding("10px"),backgroundColor:w.tokens.colorStatusDangerBackground1},errorIcon:{height:"100%"}}),_i=e=>{const{messageType:t,children:r,message:n}=e,i=Si(),[o,a]=q.useState(null),s=q.useCallback(()=>b.jsx(b.Fragment,{children:b.jsxs("div",{className:i.errorContainer,children:[b.jsx("div",{className:i.errorIcon,children:b.jsx(M.Icon,{icon:"fluent:error-circle-12-regular",width:"32",height:"32",color:w.tokens.colorStatusDangerForeground1})}),b.jsx(w.Body1,{children:n})]})}),[n,i.errorContainer,i.errorIcon]);return q.useEffect(()=>{switch(t){case Y.SUCCESS:a(b.jsx(P.CheckmarkCircle32Regular,{primaryFill:w.tokens.colorStatusSuccessForeground1}));break;case Y.INFO:a(b.jsx(P.Info32Regular,{primaryFill:w.tokens.colorStatusWarningForeground1}))}},[t]),t===Y.ERROR?b.jsx(s,{}):b.jsx(b.Fragment,{children:b.jsxs("div",{className:i.root,children:[o,b.jsx(w.Body1Strong,{children:n}),r]})})},Ti=({item:e,onSelectedItem:t})=>w.useIsOverflowItemVisible(e.id)?null:b.jsx(w.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:b.jsx("div",{children:e.name})},e.id),Ai=({items:e,onSelectedItem:t,theme:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu(),a=q.useMemo(()=>P.bundleIcon(P.MoreHorizontalFilled,P.MoreHorizontalRegular),[]);return o?b.jsx(w.IdPrefixProvider,{value:"menu-over-",children:b.jsx(w.FluentProvider,{theme:r,children:b.jsxs(w.Menu,{children:[b.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:b.jsx(w.MenuButton,{appearance:"transparent",ref:n,icon:b.jsx(a,{}),"aria-label":`${i} more options`,role:"button"})}),b.jsx(w.MenuPopover,{children:b.jsx(w.MenuList,{children:e.map(e=>b.jsx(Ti,{item:e,onSelectedItem:t},e.id))})})]})})}):null},Pi=({id:e,children:t})=>w.useIsOverflowItemVisible(e)?null:b.jsx(w.MenuItem,{children:t}),Ei=v.memo(({items:e,open:t=!0,defaultOpen:r,drawerType:n="inline",size:i="small",appItem:o,header:a,footer:s,selectedKey:l,defaultSelectedKey:c,selectedCategoryKey:u,onNavigate:h,multiple:d=!0,density:p="medium",defaultOpenCategories:f,openCategories:g,onCategoryToggle:m,className:y,style:x})=>{const C=v.useMemo(()=>{const t=new Map,r=e=>{for(const n of e)t.set(n.key,n),n.children&&r(n.children)};return r(e),t},[e]),k=v.useCallback(e=>t=>{e.href&&t.preventDefault(),null==h||h(e.key,e.href)},[h]),S=v.useCallback((e,t)=>{if(!h)return;const r=C.get(t.value);r&&h(t.value,r.href)},[h,C]),_=v.useCallback((e,t)=>{null==m||m(t.value)},[m]),T=e=>b.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key),A=e=>b.jsxs(w.NavCategory,{value:e.key,children:[b.jsx(w.NavCategoryItem,{icon:e.icon,children:e.name}),b.jsx(w.NavSubItemGroup,{children:e.children.map(e=>e.icon?b.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key):b.jsx(w.NavSubItem,{value:e.key,href:e.href,onClick:k(e),children:e.name},e.key))})]},e.key),P=v.useMemo(()=>({flexShrink:0,...x}),[x]);return b.jsxs(w.NavDrawer,{open:t,defaultOpen:r,type:n,size:i,className:y,style:P,selectedValue:l,defaultSelectedValue:c,selectedCategoryValue:u,multiple:d,density:p,defaultOpenCategories:f,openCategories:g,onNavItemSelect:S,onNavCategoryItemToggle:_,children:[void 0!==a&&b.jsx(w.NavDrawerHeader,{children:a}),b.jsxs(w.NavDrawerBody,{children:[o&&(o.href?b.jsx(w.AppItem,{icon:o.icon,href:o.href,children:o.name}):b.jsx(w.AppItemStatic,{icon:o.icon,children:o.name})),e.map(e=>e.isSectionHeader&&e.children&&e.children.length>0?(e=>b.jsxs(v.Fragment,{children:[b.jsx(w.NavSectionHeader,{children:e.name}),e.children.map(e=>e.children&&e.children.length>0?A(e):T(e))]},e.key))(e):e.children&&e.children.length>0?A(e):T(e))]}),void 0!==s&&b.jsx(w.NavDrawerFooter,{children:s})]})});Ei.displayName="Navigation";const Mi=e=>({videoPlayerContainer:T.css({position:"relative",width:e.width,height:e.height}),reactPlayer:T.css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}),playButton:T.css({position:"absolute",left:"50%",top:"50%",zIndex:1,userSelect:"none"})}),Ii=q.createContext(null);function Bi(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Bi(e[r],t[r]))return!1;return!0}if(Array.isArray(t))return!1;if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){if(!t.hasOwnProperty(i))return!1;if(!Bi(e[i],t[i]))return!1}return!0}return!1}function Li(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function ji(e,t){const r=t.viewState||t,n={};if("longitude"in r&&"latitude"in r&&(r.longitude!==e.center.lng||r.latitude!==e.center.lat)){const t=e.center.constructor;n.center=new t(r.longitude,r.latitude)}return"zoom"in r&&r.zoom!==e.zoom&&(n.zoom=r.zoom),"bearing"in r&&r.bearing!==e.bearing&&(n.bearing=r.bearing),"pitch"in r&&r.pitch!==e.pitch&&(n.pitch=r.pitch),r.padding&&e.padding&&!Bi(r.padding,e.padding)&&(n.padding=r.padding),n}const Ni=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Di(e){if(!e)return null;if("string"==typeof e)return e;if("toJS"in e&&(e=e.toJS()),!e.layers)return e;const t={};for(const n of e.layers)t[n.id]=n;const r=e.layers.map(e=>{let r=null;"interactive"in e&&(r=Object.assign({},e),delete r.interactive);const n=t[e.ref];if(n){r=r||Object.assign({},e),delete r.ref;for(const e of Ni)e in n&&(r[e]=n[e])}return r||e});return{...e,layers:r}}const Oi={version:8,sources:{},layers:[]},Fi={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Ri={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},$i={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},zi=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Vi=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Wi{constructor(e,t,r){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=e=>{const t=this.props[$i[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||Li(this._map.transform);const t=this.props[Ri[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=Li(e),ji(e,this.props)),this._onPointerEvent=e=>{"mousemove"!==e.type&&"mouseout"!==e.type||this._updateHover(e);const t=this.props[Fi[e.type]];t&&(this.props.interactiveLayerIds&&"mouseover"!==e.type&&"mouseout"!==e.type&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),t(e),delete e.features)},this._MapClass=e,this.props=t,this._initialize(r)}get map(){return this._map}setProps(e){const t=this.props;this.props=e;const r=this._updateSettings(e,t),n=this._updateSize(e),i=this._updateViewState(e);this._updateStyle(e,t),this._updateStyleComponents(e),this._updateHandlers(e,t),(r||n||i&&!this._map.isMoving())&&this.redraw()}static reuse(e,t){const r=Wi.savedMaps.pop();if(!r)return null;const n=r.map,i=n.getContainer();for(t.className=i.className;i.childNodes.length>0;)t.appendChild(i.childNodes[0]);n._container=t;const o=n._resizeObserver;o&&(o.disconnect(),o.observe(t)),r.setProps({...e,styleDiffing:!1}),n.resize();const{initialViewState:a}=e;return a&&(a.bounds?n.fitBounds(a.bounds,{...a.fitBoundsOptions,duration:0}):r._updateViewState(a)),n.isStyleLoaded()?n.fire("load"):n.once("style.load",()=>n.fire("load")),n._update(),r}_initialize(e){const{props:t}=this,{mapStyle:r=Oi}=t,n={...t,...t.initialViewState,container:e,style:Di(r)},i=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),t.gl){const e=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=e,t.gl)}const o=new this._MapClass(n);i.padding&&o.setPadding(i.padding),t.cursor&&(o.getCanvas().style.cursor=t.cursor),o.transformCameraUpdate=this._onCameraUpdate,o.on("style.load",()=>{var e;this._styleComponents={light:o.getLight(),sky:o.getSky(),projection:null==(e=o.getProjection)?void 0:e.call(o),terrain:o.getTerrain()},this._updateStyleComponents(this.props)}),o.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const a in Fi)o.on(a,this._onPointerEvent);for(const a in Ri)o.on(a,this._onCameraEvent);for(const a in $i)o.on(a,this._onEvent);this._map=o}recycle(){const e=this.map.getContainer().querySelector("[mapboxgl-children]");null==e||e.remove(),Wi.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const e=this._map;e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_updateSize(e){const{viewState:t}=e;if(t){const e=this._map;if(t.width!==e.transform.width||t.height!==e.transform.height)return e.resize(),!0}return!1}_updateViewState(e){const t=this._map,r=t.transform;if(!t.isMoving()){const n=ji(r,e);if(Object.keys(n).length>0)return this._internalUpdate=!0,t.jumpTo(n),this._internalUpdate=!1,!0}return!1}_updateSettings(e,t){const r=this._map;let n=!1;for(const i of zi)if(i in e&&!Bi(e[i],t[i])){n=!0;const t=r[`set${i[0].toUpperCase()}${i.slice(1)}`];null==t||t.call(r,e[i])}return n}_updateStyle(e,t){if(e.cursor!==t.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==t.mapStyle){const{mapStyle:t=Oi,styleDiffing:r=!0}=e,n={diff:r};"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(Di(t),n)}}_updateStyleComponents({light:e,projection:t,sky:r,terrain:n}){var i,o;const a=this._map,s=this._styleComponents;a.style._loaded&&(e&&!Bi(e,s.light)&&(s.light=e,a.setLight(e)),t&&!Bi(t,s.projection)&&t!==(null==(i=s.projection)?void 0:i.type)&&(s.projection="string"==typeof t?{type:t}:t,null==(o=a.setProjection)||o.call(a,s.projection)),r&&!Bi(r,s.sky)&&(s.sky=r,a.setSky(r)),void 0===n||Bi(n,s.terrain)||n&&!a.getSource(n.source)||(s.terrain=n,a.setTerrain(n)))}_updateHandlers(e,t){const r=this._map;for(const n of Vi){const i=e[n]??!0;Bi(i,t[n]??!0)||(i?r[n].enable(i):r[n].disable())}}_queryRenderedFeatures(e){const t=this._map,{interactiveLayerIds:r=[]}=this.props;try{return t.queryRenderedFeatures(e,{layers:r.filter(t.getLayer.bind(t))})}catch{return[]}}_updateHover(e){var t;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const r=e.type,n=(null==(t=this._hoveredFeatures)?void 0:t.length)>0,i=this._queryRenderedFeatures(e.point),o=i.length>0;!o&&n&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=i,o&&!n&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=r}else this._hoveredFeatures=null}}Wi.savedMaps=[];const Hi=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function qi(e){if(!e)return null;const t=e.map,r={getMap:()=>t};for(const n of function(e){const t=new Set;let r=e;for(;r;){for(const n of Object.getOwnPropertyNames(r))"_"!==n[0]&&"function"==typeof e[n]&&"fire"!==n&&"setEventedParent"!==n&&t.add(n);r=Object.getPrototypeOf(r)}return Array.from(t)}(t))n in r||Hi.includes(n)||(r[n]=t[n].bind(t));return r}const Ui="undefined"!=typeof document?v.useLayoutEffect:v.useEffect;const Gi=q.createContext(null);const Xi=q.forwardRef(function(e,t){const r=v.useContext(Ii),[n,i]=v.useState(null),o=v.useRef(),{current:a}=v.useRef({mapLib:null,map:null});v.useEffect(()=>{const t=e.mapLib;let n,s=!0;return Promise.resolve(t||Promise.resolve().then(()=>require("./maplibre-gl-BdoOI0bI.cjs")).then(e=>e.maplibreGl)).then(t=>{if(!s)return;if(!t)throw new Error("Invalid mapLib");const l="Map"in t?t:t.default;if(!l.Map)throw new Error("Invalid mapLib");!function(e,t){const{RTLTextPlugin:r,maxParallelImageRequests:n,workerCount:i,workerUrl:o}=t;if(r&&e.getRTLTextPluginStatus&&"unavailable"===e.getRTLTextPluginStatus()){const{pluginUrl:t,lazy:n=!0}="string"==typeof r?{pluginUrl:r}:r;e.setRTLTextPlugin(t,e=>{e&&console.error(e)},n)}void 0!==n&&e.setMaxParallelImageRequests(n),void 0!==i&&e.setWorkerCount(i),void 0!==o&&e.setWorkerUrl(o)}(l,e),e.reuseMaps&&(n=Wi.reuse(e,o.current)),n||(n=new Wi(l.Map,e,o.current)),a.map=qi(n),a.mapLib=l,i(n),null==r||r.onMapMount(a.map,e.id)}).catch(t=>{const{onError:r}=e;r?r({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{s=!1,n&&(null==r||r.onMapUnmount(e.id),e.reuseMaps?n.recycle():n.destroy())}},[]),Ui(()=>{n&&n.setProps(e)}),v.useImperativeHandle(t,()=>a.map,[n]);const s=v.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return q.createElement("div",{id:e.id,ref:o,style:s},n&&q.createElement(Gi.Provider,{value:a},q.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))}),Ji=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Yi(e,t){if(!e||!t)return;const r=e.style;for(const n in t){const e=t[n];Number.isFinite(e)&&!Ji.test(n)?r[n]=`${e}px`:r[n]=e}}function Zi(e,t){if(e===t)return null;const r=Ki(e),n=Ki(t),i=[];for(const o of n)r.has(o)||i.push(o);for(const o of r)n.has(o)||i.push(o);return 0===i.length?null:i}function Ki(e){return new Set(e?e.trim().split(/\s+/):[])}const Qi=v.memo(v.forwardRef((e,t)=>{const{map:r,mapLib:n}=v.useContext(Gi),i=v.useRef({props:e}),o=v.useMemo(()=>{let t=!1;q.Children.forEach(e.children,e=>{e&&(t=!0)});const r={...e,element:t?document.createElement("div"):void 0},a=new n.Marker(r);return a.setLngLat([e.longitude,e.latitude]),a.getElement().addEventListener("click",e=>{var t,r;null==(r=(t=i.current.props).onClick)||r.call(t,{type:"click",target:a,originalEvent:e})}),a.on("dragstart",e=>{var t,r;const n=e;n.lngLat=o.getLngLat(),null==(r=(t=i.current.props).onDragStart)||r.call(t,n)}),a.on("drag",e=>{var t,r;const n=e;n.lngLat=o.getLngLat(),null==(r=(t=i.current.props).onDrag)||r.call(t,n)}),a.on("dragend",e=>{var t,r;const n=e;n.lngLat=o.getLngLat(),null==(r=(t=i.current.props).onDragEnd)||r.call(t,n)}),a},[]);v.useEffect(()=>(o.addTo(r.getMap()),()=>{o.remove()}),[]);const{longitude:a,latitude:s,offset:l,style:c,draggable:u=!1,popup:h=null,rotation:d=0,rotationAlignment:p="auto",pitchAlignment:f="auto"}=e;v.useEffect(()=>{Yi(o.getElement(),c)},[c]),v.useImperativeHandle(t,()=>o,[]);const g=i.current.props;o.getLngLat().lng===a&&o.getLngLat().lat===s||o.setLngLat([a,s]),l&&!function(e,t){const r=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,o=Array.isArray(t)?t[1]:t?t.y:0;return r===i&&n===o}(o.getOffset(),l)&&o.setOffset(l),o.isDraggable()!==u&&o.setDraggable(u),o.getRotation()!==d&&o.setRotation(d),o.getRotationAlignment()!==p&&o.setRotationAlignment(p),o.getPitchAlignment()!==f&&o.setPitchAlignment(f),o.getPopup()!==h&&o.setPopup(h);const m=Zi(g.className,e.className);if(m)for(const y of m)o.toggleClassName(y);return i.current.props=e,E.createPortal(e.children,o.getElement())}));function eo(e,t,r,n){const i=v.useContext(Gi),o=v.useMemo(()=>e(i),[]);return v.useEffect(()=>{const e=t,r=null,n="function"==typeof t?t:null,{map:a}=i;return a.hasControl(o)||(a.addControl(o,null==e?void 0:e.position),r&&r(i)),()=>{n&&n(i),a.hasControl(o)&&a.removeControl(o)}},[]),o}v.memo(v.forwardRef((e,t)=>{const{map:r,mapLib:n}=v.useContext(Gi),i=v.useMemo(()=>document.createElement("div"),[]),o=v.useRef({props:e}),a=v.useMemo(()=>{const t={...e},r=new n.Popup(t);return r.setLngLat([e.longitude,e.latitude]),r.once("open",e=>{var t,r;null==(r=(t=o.current.props).onOpen)||r.call(t,e)}),r},[]);if(v.useEffect(()=>{const e=e=>{var t,r;null==(r=(t=o.current.props).onClose)||r.call(t,e)};return a.on("close",e),a.setDOMContent(i).addTo(r.getMap()),()=>{a.off("close",e),a.isOpen()&&a.remove()}},[]),v.useEffect(()=>{Yi(a.getElement(),e.style)},[e.style]),v.useImperativeHandle(t,()=>a,[]),a.isOpen()){const t=o.current.props;a.getLngLat().lng===e.longitude&&a.getLngLat().lat===e.latitude||a.setLngLat([e.longitude,e.latitude]),e.offset&&!Bi(t.offset,e.offset)&&a.setOffset(e.offset),t.anchor===e.anchor&&t.maxWidth===e.maxWidth||(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth));const r=Zi(t.className,e.className);if(r)for(const e of r)a.toggleClassName(e);o.current.props=e}return E.createPortal(e.children,i)})),v.memo(function(e){const t=eo(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return v.useEffect(()=>{Yi(t._controlContainer,e.style)},[e.style]),null}),v.memo(v.forwardRef(function(e,t){const r=v.useRef({props:e}),n=eo(({mapLib:t})=>{const n=new t.GeolocateControl(e),i=n._setupUI;return n._setupUI=()=>{n._container.hasChildNodes()||i()},n.on("geolocate",e=>{var t,n;null==(n=(t=r.current.props).onGeolocate)||n.call(t,e)}),n.on("error",e=>{var t,n;null==(n=(t=r.current.props).onError)||n.call(t,e)}),n.on("outofmaxbounds",e=>{var t,n;null==(n=(t=r.current.props).onOutOfMaxBounds)||n.call(t,e)}),n.on("trackuserlocationstart",e=>{var t,n;null==(n=(t=r.current.props).onTrackUserLocationStart)||n.call(t,e)}),n.on("trackuserlocationend",e=>{var t,n;null==(n=(t=r.current.props).onTrackUserLocationEnd)||n.call(t,e)}),n},{position:e.position});return r.current.props=e,v.useImperativeHandle(t,()=>n,[]),v.useEffect(()=>{Yi(n._container,e.style)},[e.style]),null})),v.memo(function(e){const t=eo(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),r=v.useRef(e),n=r.current;r.current=e;const{style:i}=e;return void 0!==e.maxWidth&&e.maxWidth!==n.maxWidth&&(t.options.maxWidth=e.maxWidth),void 0!==e.unit&&e.unit!==n.unit&&t.setUnit(e.unit),v.useEffect(()=>{Yi(t._container,i)},[i]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null});const to=T.css`
|
|
25
|
+
`,bi=q.forwardRef((e,t)=>{const{columns:r,items:n,enableSorting:i=!1,enableResizing:o=!1,selectionMode:a="none",onSelectionChange:s,defaultSelectedItems:l=[],defaultSortState:c,onSortChange:u,columnSizingOptions:h,resizableColumnsOptions:d,noItemsMessage:p,isLoadingData:f,isLoadingDataMessage:g,dataGridBodyClassName:m,dataGridBodyStyles:y,refreshData:x,enableInfiniteScroll:v,onLoadMore:C,infiniteScrollPageSize:k,hasNextPage:S,isLoadingMore:_,autoShowLastPage:T=!0,virtualizedHeight:A=600,virtualizedItemSize:P=44,startIndex:E,onRowClick:M}=e,I=q.useMemo(()=>r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>b.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>b.jsx(w.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[e.column]??"")}),compare:e.order})),[r]),L=q.useCallback(e=>n.findIndex(t=>t===e),[n]),[j,N]=q.useState(new Set(l.map(e=>L(e)))),[D,O]=q.useState(0);q.useEffect(()=>{l.length&&N(new Set(l.map(e=>L(e))))},[l,n,L]),q.useEffect(()=>{x&&N(new Set)},[x]);const[F,R]=q.useState(null),$=q.useMemo(()=>new Map(n.map((e,t)=>[e,t])),[n]);q.useEffect(()=>{"row"===a&&null!=F&&F>=n.length&&R(null)},[n,F,a]),q.useEffect(()=>{x&&"row"===a&&R(null)},[x,a]);const z=q.useRef(null),V=q.useRef(n.length),W=q.useRef(!1),H=q.useRef(!1),U=q.useRef(!1);q.useImperativeHandle(t,()=>({scrollToIndex:(e,t="auto")=>{const r=z.current;r&&"scrollToItem"in r&&r.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{O(e=>e+1),V.current=0,W.current=!1,H.current=!1,U.current=!1,G.current=-1,N(new Set),R(null)},getSelectedRow:()=>null!==F&&F<n.length?{item:n[F],index:F}:null,setSelectedRow:e=>{const t=n.findIndex(t=>t===e);-1!==t&&(R(t),null==s||s([e]))}})),q.useEffect(()=>{if(!W.current&&"number"==typeof E&&z.current){const e=z.current;"scrollToItem"in e&&e.scrollToItem(Math.min(E,Math.max(n.length-1,0)),"start"),W.current=!0}},[E,n.length]),q.useEffect(()=>{const e=V.current,t=n.length,r=t>e;if(V.current=t,!T||!r||0===e)return;const i=z.current;i&&"scrollToItem"in i&&i.scrollToItem(Math.max(t-1,0),"end")},[n.length,T]);const G=q.useRef(-1),X=q.useCallback(({visibleStopIndex:e})=>{if(!v||!C)return;if(_||U.current)return;if(!H.current)return void(H.current=!0);const t=k??20;if(n.length<t)return;const r=Math.max(5,Math.ceil(t/5));e>=n.length-r&&S&&G.current!==n.length&&(G.current=n.length,U.current=!0,C())},[v,C,S,_,n.length,k]);q.useEffect(()=>{U.current&&n.length>G.current&&(U.current=!1)},[n.length]);const J=q.useMemo(()=>({overflowX:"auto",overflowY:"hidden",position:"relative"}),[]);return b.jsxs("div",{style:J,className:xi,children:[f&&b.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",padding:8},children:q.isValidElement(g)?g:b.jsxs(w.Spinner,{size:"extra-tiny",children:[" ",g??"Loading data..."," "]})}),!f&&n.length?b.jsxs(B.DataGrid,{items:n,columns:I,sortable:i,onSortChange:i?(e,t)=>{u&&u(t)}:void 0,selectionMode:"none"===a||"row"===a?void 0:"multiple"===a?"multiselect":"single"===a?"single":void 0,selectedItems:j,onSelectionChange:(e,t)=>{const r=new Set;t.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||r.add(t)}),N(r),s&&s(Array.from(r).map(e=>n[e]))},defaultSortState:c,resizableColumns:o,columnSizingOptions:h,resizableColumnsOptions:d,focusMode:"cell",className:m,style:y,children:[b.jsx(B.DataGridHeader,{children:b.jsx(B.DataGridRow,{children:({renderHeaderCell:e})=>b.jsx(B.DataGridHeaderCell,{children:e()})})}),b.jsx(B.DataGridBody,{itemSize:P,height:A,width:"100%",listProps:{onItemsRendered:X},children:(e,t)=>(()=>{const r=e.item,i=$.get(r)??n.indexOf(r),o="row"===a,l=o&&F===i;return b.jsx(B.DataGridRow,{style:{...t,cursor:o?"pointer":void 0,background:l?w.tokens.colorSubtleBackgroundSelected:void 0},onClick:e=>{R(i),null==s||s([r]),null==M||M(r,i)},"aria-selected":l||void 0,children:({renderCell:e})=>b.jsx(B.DataGridCell,{children:e(r)})})})()})]},D):f||n.length?null:b.jsx("div",{children:p})]})});bi.displayName="DataGridV2";const vi=w.makeStyles({dialog:{overflow:"visible"},dialogBody:{overflow:"visible"}}),Ci=e=>{const{isOpen:t,dialogTitle:r,dialogActions:n,children:i,maxWidth:o,className:a,minHeight:s,minWidth:l,maxHeight:c}=e,u=vi();return t?b.jsx(w.Dialog,{open:t,modalType:"modal",children:b.jsxs(w.DialogSurface,{className:w.mergeClasses(u.dialog,a),style:{maxWidth:o??600,minWidth:l??200,...s?{minHeight:s}:{},...c?{maxHeight:c}:{}},children:[b.jsx(w.DialogTitle,{children:r}),b.jsx(w.DialogBody,{className:u.dialogBody,children:b.jsx(w.DialogContent,{children:i})}),b.jsx(w.DialogActions,{fluid:!0,position:"end",children:n})]})}):b.jsx(b.Fragment,{})},wi=()=>({closeButton:T.css({marginLeft:"auto",position:"absolute",top:"10px",right:"10px",zIndex:99999}),divider:T.css({width:"100%",height:"1px",backgroundColor:w.tokens.colorNeutralStroke1,marginTop:"6px"}),renderHeaderContent:T.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"stretch",width:"100%"}),renderHeaderHeader:T.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"10px",gap:"20px"}),renderHeaderFooter:T.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderBody:T.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",padding:"20px",gap:"20px"}),renderHeaderTitleContainer:T.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignContent:"center",alignItems:"center",width:"100%"}),renderHeaderTitle:T.css({display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",paddingTop:0,wordBreak:"break-word"}),renderHeaderDescription:T.css({display:"-webkit-box",WebkitLineClamp:"4",WebkitBoxOrient:"vertical",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),dialogTitleAndDescriptionContainer:T.css({display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",paddingLeft:"10px",paddingRight:"20px",width:"100%"})}),ki=()=>v.useMemo(()=>({container:T.css({display:"flex",alignItems:"center",justifyContent:"center",minHeight:"200px",textAlign:"center",backgroundColor:w.tokens.colorNeutralBackground1,border:`1px solid ${w.tokens.colorNeutralStroke2}`,borderRadius:w.tokens.borderRadiusLarge,padding:`${w.tokens.spacingVerticalXXL} ${w.tokens.spacingHorizontalXXL}`,boxShadow:w.tokens.shadow4,maxWidth:"500px",margin:"20px auto"}),icon:T.css({fontSize:"48px",color:w.tokens.colorPaletteRedForeground1,animation:"pulse 2s infinite","@keyframes pulse":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.05)"},"100%":{transform:"scale(1)"}}}),title:T.css({color:w.tokens.colorNeutralForeground1,fontWeight:w.tokens.fontWeightSemibold,textAlign:"center"}),message:T.css({color:w.tokens.colorNeutralForeground2,textAlign:"center",lineHeight:w.tokens.lineHeightBase400})}),[]),Si=w.makeStyles({root:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",...w.shorthands.padding("10px"),gap:"10px"},iconClass:{width:"32px",height:"32px"},errorContainer:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",gap:"10px",...w.shorthands.padding("10px"),backgroundColor:w.tokens.colorStatusDangerBackground1},errorIcon:{height:"100%"}}),_i=e=>{const{messageType:t,children:r,message:n}=e,i=Si(),[o,a]=q.useState(null),s=q.useCallback(()=>b.jsx(b.Fragment,{children:b.jsxs("div",{className:i.errorContainer,children:[b.jsx("div",{className:i.errorIcon,children:b.jsx(M.Icon,{icon:"fluent:error-circle-12-regular",width:"32",height:"32",color:w.tokens.colorStatusDangerForeground1})}),b.jsx(w.Body1,{children:n})]})}),[n,i.errorContainer,i.errorIcon]);return q.useEffect(()=>{switch(t){case Y.SUCCESS:a(b.jsx(P.CheckmarkCircle32Regular,{primaryFill:w.tokens.colorStatusSuccessForeground1}));break;case Y.INFO:a(b.jsx(P.Info32Regular,{primaryFill:w.tokens.colorStatusWarningForeground1}))}},[t]),t===Y.ERROR?b.jsx(s,{}):b.jsx(b.Fragment,{children:b.jsxs("div",{className:i.root,children:[o,b.jsx(w.Body1Strong,{children:n}),r]})})},Ti=({item:e,onSelectedItem:t})=>w.useIsOverflowItemVisible(e.id)?null:b.jsx(w.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:b.jsx("div",{children:e.name})},e.id),Ai=({items:e,onSelectedItem:t,theme:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu(),a=q.useMemo(()=>P.bundleIcon(P.MoreHorizontalFilled,P.MoreHorizontalRegular),[]);return o?b.jsx(w.IdPrefixProvider,{value:"menu-over-",children:b.jsx(w.FluentProvider,{theme:r,children:b.jsxs(w.Menu,{children:[b.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:b.jsx(w.MenuButton,{appearance:"transparent",ref:n,icon:b.jsx(a,{}),"aria-label":`${i} more options`,role:"button"})}),b.jsx(w.MenuPopover,{children:b.jsx(w.MenuList,{children:e.map(e=>b.jsx(Ti,{item:e,onSelectedItem:t},e.id))})})]})})}):null},Pi=({id:e,children:t})=>w.useIsOverflowItemVisible(e)?null:b.jsx(w.MenuItem,{children:t}),Ei=v.memo(({items:e,open:t=!0,defaultOpen:r,drawerType:n="inline",size:i="small",appItem:o,header:a,footer:s,selectedKey:l,defaultSelectedKey:c,selectedCategoryKey:u,onNavigate:h,multiple:d=!0,density:p="medium",defaultOpenCategories:f,openCategories:g,onCategoryToggle:m,className:y,style:x})=>{const C=v.useMemo(()=>{const t=new Map,r=e=>{for(const n of e)t.set(n.key,n),n.children&&r(n.children)};return r(e),t},[e]),k=v.useCallback(e=>t=>{e.href&&t.preventDefault(),null==h||h(e.key,e.href)},[h]),S=v.useCallback((e,t)=>{if(!h)return;const r=C.get(t.value);r&&h(t.value,r.href)},[h,C]),_=v.useCallback((e,t)=>{null==m||m(t.value)},[m]),T=e=>b.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key),A=e=>b.jsxs(w.NavCategory,{value:e.key,children:[b.jsx(w.NavCategoryItem,{icon:e.icon,children:e.name}),b.jsx(w.NavSubItemGroup,{children:e.children.map(e=>e.icon?b.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key):b.jsx(w.NavSubItem,{value:e.key,href:e.href,onClick:k(e),children:e.name},e.key))})]},e.key),P=v.useMemo(()=>({flexShrink:0,...x}),[x]);return b.jsxs(w.NavDrawer,{open:t,defaultOpen:r,type:n,size:i,className:y,style:P,selectedValue:l,defaultSelectedValue:c,selectedCategoryValue:u,multiple:d,density:p,defaultOpenCategories:f,openCategories:g,onNavItemSelect:S,onNavCategoryItemToggle:_,children:[void 0!==a&&b.jsx(w.NavDrawerHeader,{children:a}),b.jsxs(w.NavDrawerBody,{children:[o&&(o.href?b.jsx(w.AppItem,{icon:o.icon,href:o.href,children:o.name}):b.jsx(w.AppItemStatic,{icon:o.icon,children:o.name})),e.map(e=>e.isSectionHeader&&e.children&&e.children.length>0?(e=>b.jsxs(v.Fragment,{children:[b.jsx(w.NavSectionHeader,{children:e.name}),e.children.map(e=>e.children&&e.children.length>0?A(e):T(e))]},e.key))(e):e.children&&e.children.length>0?A(e):T(e))]}),void 0!==s&&b.jsx(w.NavDrawerFooter,{children:s})]})});Ei.displayName="Navigation";const Mi=e=>({videoPlayerContainer:T.css({position:"relative",width:e.width,height:e.height}),reactPlayer:T.css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}),playButton:T.css({position:"absolute",left:"50%",top:"50%",zIndex:1,userSelect:"none"})}),Ii=q.createContext(null);function Bi(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Bi(e[r],t[r]))return!1;return!0}if(Array.isArray(t))return!1;if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){if(!t.hasOwnProperty(i))return!1;if(!Bi(e[i],t[i]))return!1}return!0}return!1}function Li(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function ji(e,t){const r=t.viewState||t,n={};if("longitude"in r&&"latitude"in r&&(r.longitude!==e.center.lng||r.latitude!==e.center.lat)){const t=e.center.constructor;n.center=new t(r.longitude,r.latitude)}return"zoom"in r&&r.zoom!==e.zoom&&(n.zoom=r.zoom),"bearing"in r&&r.bearing!==e.bearing&&(n.bearing=r.bearing),"pitch"in r&&r.pitch!==e.pitch&&(n.pitch=r.pitch),r.padding&&e.padding&&!Bi(r.padding,e.padding)&&(n.padding=r.padding),n}const Ni=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Di(e){if(!e)return null;if("string"==typeof e)return e;if("toJS"in e&&(e=e.toJS()),!e.layers)return e;const t={};for(const n of e.layers)t[n.id]=n;const r=e.layers.map(e=>{let r=null;"interactive"in e&&(r=Object.assign({},e),delete r.interactive);const n=t[e.ref];if(n){r=r||Object.assign({},e),delete r.ref;for(const e of Ni)e in n&&(r[e]=n[e])}return r||e});return{...e,layers:r}}const Oi={version:8,sources:{},layers:[]},Fi={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Ri={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},$i={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},zi=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Vi=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Wi{constructor(e,t,r){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=e=>{const t=this.props[$i[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||Li(this._map.transform);const t=this.props[Ri[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=Li(e),ji(e,this.props)),this._onPointerEvent=e=>{"mousemove"!==e.type&&"mouseout"!==e.type||this._updateHover(e);const t=this.props[Fi[e.type]];t&&(this.props.interactiveLayerIds&&"mouseover"!==e.type&&"mouseout"!==e.type&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),t(e),delete e.features)},this._MapClass=e,this.props=t,this._initialize(r)}get map(){return this._map}setProps(e){const t=this.props;this.props=e;const r=this._updateSettings(e,t),n=this._updateSize(e),i=this._updateViewState(e);this._updateStyle(e,t),this._updateStyleComponents(e),this._updateHandlers(e,t),(r||n||i&&!this._map.isMoving())&&this.redraw()}static reuse(e,t){const r=Wi.savedMaps.pop();if(!r)return null;const n=r.map,i=n.getContainer();for(t.className=i.className;i.childNodes.length>0;)t.appendChild(i.childNodes[0]);n._container=t;const o=n._resizeObserver;o&&(o.disconnect(),o.observe(t)),r.setProps({...e,styleDiffing:!1}),n.resize();const{initialViewState:a}=e;return a&&(a.bounds?n.fitBounds(a.bounds,{...a.fitBoundsOptions,duration:0}):r._updateViewState(a)),n.isStyleLoaded()?n.fire("load"):n.once("style.load",()=>n.fire("load")),n._update(),r}_initialize(e){const{props:t}=this,{mapStyle:r=Oi}=t,n={...t,...t.initialViewState,container:e,style:Di(r)},i=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),t.gl){const e=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=e,t.gl)}const o=new this._MapClass(n);i.padding&&o.setPadding(i.padding),t.cursor&&(o.getCanvas().style.cursor=t.cursor),o.transformCameraUpdate=this._onCameraUpdate,o.on("style.load",()=>{var e;this._styleComponents={light:o.getLight(),sky:o.getSky(),projection:null==(e=o.getProjection)?void 0:e.call(o),terrain:o.getTerrain()},this._updateStyleComponents(this.props)}),o.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const a in Fi)o.on(a,this._onPointerEvent);for(const a in Ri)o.on(a,this._onCameraEvent);for(const a in $i)o.on(a,this._onEvent);this._map=o}recycle(){const e=this.map.getContainer().querySelector("[mapboxgl-children]");null==e||e.remove(),Wi.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const e=this._map;e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_updateSize(e){const{viewState:t}=e;if(t){const e=this._map;if(t.width!==e.transform.width||t.height!==e.transform.height)return e.resize(),!0}return!1}_updateViewState(e){const t=this._map,r=t.transform;if(!t.isMoving()){const n=ji(r,e);if(Object.keys(n).length>0)return this._internalUpdate=!0,t.jumpTo(n),this._internalUpdate=!1,!0}return!1}_updateSettings(e,t){const r=this._map;let n=!1;for(const i of zi)if(i in e&&!Bi(e[i],t[i])){n=!0;const t=r[`set${i[0].toUpperCase()}${i.slice(1)}`];null==t||t.call(r,e[i])}return n}_updateStyle(e,t){if(e.cursor!==t.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==t.mapStyle){const{mapStyle:t=Oi,styleDiffing:r=!0}=e,n={diff:r};"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(Di(t),n)}}_updateStyleComponents({light:e,projection:t,sky:r,terrain:n}){var i,o;const a=this._map,s=this._styleComponents;a.style._loaded&&(e&&!Bi(e,s.light)&&(s.light=e,a.setLight(e)),t&&!Bi(t,s.projection)&&t!==(null==(i=s.projection)?void 0:i.type)&&(s.projection="string"==typeof t?{type:t}:t,null==(o=a.setProjection)||o.call(a,s.projection)),r&&!Bi(r,s.sky)&&(s.sky=r,a.setSky(r)),void 0===n||Bi(n,s.terrain)||n&&!a.getSource(n.source)||(s.terrain=n,a.setTerrain(n)))}_updateHandlers(e,t){const r=this._map;for(const n of Vi){const i=e[n]??!0;Bi(i,t[n]??!0)||(i?r[n].enable(i):r[n].disable())}}_queryRenderedFeatures(e){const t=this._map,{interactiveLayerIds:r=[]}=this.props;try{return t.queryRenderedFeatures(e,{layers:r.filter(t.getLayer.bind(t))})}catch{return[]}}_updateHover(e){var t;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const r=e.type,n=(null==(t=this._hoveredFeatures)?void 0:t.length)>0,i=this._queryRenderedFeatures(e.point),o=i.length>0;!o&&n&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=i,o&&!n&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=r}else this._hoveredFeatures=null}}Wi.savedMaps=[];const Hi=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function qi(e){if(!e)return null;const t=e.map,r={getMap:()=>t};for(const n of function(e){const t=new Set;let r=e;for(;r;){for(const n of Object.getOwnPropertyNames(r))"_"!==n[0]&&"function"==typeof e[n]&&"fire"!==n&&"setEventedParent"!==n&&t.add(n);r=Object.getPrototypeOf(r)}return Array.from(t)}(t))n in r||Hi.includes(n)||(r[n]=t[n].bind(t));return r}const Ui="undefined"!=typeof document?v.useLayoutEffect:v.useEffect;const Gi=q.createContext(null);const Xi=q.forwardRef(function(e,t){const r=v.useContext(Ii),[n,i]=v.useState(null),o=v.useRef(),{current:a}=v.useRef({mapLib:null,map:null});v.useEffect(()=>{const t=e.mapLib;let n,s=!0;return Promise.resolve(t||Promise.resolve().then(()=>require("./maplibre-gl-BkWxiGfO.cjs")).then(e=>e.maplibreGl)).then(t=>{if(!s)return;if(!t)throw new Error("Invalid mapLib");const l="Map"in t?t:t.default;if(!l.Map)throw new Error("Invalid mapLib");!function(e,t){const{RTLTextPlugin:r,maxParallelImageRequests:n,workerCount:i,workerUrl:o}=t;if(r&&e.getRTLTextPluginStatus&&"unavailable"===e.getRTLTextPluginStatus()){const{pluginUrl:t,lazy:n=!0}="string"==typeof r?{pluginUrl:r}:r;e.setRTLTextPlugin(t,e=>{e&&console.error(e)},n)}void 0!==n&&e.setMaxParallelImageRequests(n),void 0!==i&&e.setWorkerCount(i),void 0!==o&&e.setWorkerUrl(o)}(l,e),e.reuseMaps&&(n=Wi.reuse(e,o.current)),n||(n=new Wi(l.Map,e,o.current)),a.map=qi(n),a.mapLib=l,i(n),null==r||r.onMapMount(a.map,e.id)}).catch(t=>{const{onError:r}=e;r?r({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{s=!1,n&&(null==r||r.onMapUnmount(e.id),e.reuseMaps?n.recycle():n.destroy())}},[]),Ui(()=>{n&&n.setProps(e)}),v.useImperativeHandle(t,()=>a.map,[n]);const s=v.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return q.createElement("div",{id:e.id,ref:o,style:s},n&&q.createElement(Gi.Provider,{value:a},q.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))}),Ji=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Yi(e,t){if(!e||!t)return;const r=e.style;for(const n in t){const e=t[n];Number.isFinite(e)&&!Ji.test(n)?r[n]=`${e}px`:r[n]=e}}function Zi(e,t){if(e===t)return null;const r=Ki(e),n=Ki(t),i=[];for(const o of n)r.has(o)||i.push(o);for(const o of r)n.has(o)||i.push(o);return 0===i.length?null:i}function Ki(e){return new Set(e?e.trim().split(/\s+/):[])}const Qi=v.memo(v.forwardRef((e,t)=>{const{map:r,mapLib:n}=v.useContext(Gi),i=v.useRef({props:e}),o=v.useMemo(()=>{let t=!1;q.Children.forEach(e.children,e=>{e&&(t=!0)});const r={...e,element:t?document.createElement("div"):void 0},a=new n.Marker(r);return a.setLngLat([e.longitude,e.latitude]),a.getElement().addEventListener("click",e=>{var t,r;null==(r=(t=i.current.props).onClick)||r.call(t,{type:"click",target:a,originalEvent:e})}),a.on("dragstart",e=>{var t,r;const n=e;n.lngLat=o.getLngLat(),null==(r=(t=i.current.props).onDragStart)||r.call(t,n)}),a.on("drag",e=>{var t,r;const n=e;n.lngLat=o.getLngLat(),null==(r=(t=i.current.props).onDrag)||r.call(t,n)}),a.on("dragend",e=>{var t,r;const n=e;n.lngLat=o.getLngLat(),null==(r=(t=i.current.props).onDragEnd)||r.call(t,n)}),a},[]);v.useEffect(()=>(o.addTo(r.getMap()),()=>{o.remove()}),[]);const{longitude:a,latitude:s,offset:l,style:c,draggable:u=!1,popup:h=null,rotation:d=0,rotationAlignment:p="auto",pitchAlignment:f="auto"}=e;v.useEffect(()=>{Yi(o.getElement(),c)},[c]),v.useImperativeHandle(t,()=>o,[]);const g=i.current.props;o.getLngLat().lng===a&&o.getLngLat().lat===s||o.setLngLat([a,s]),l&&!function(e,t){const r=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,o=Array.isArray(t)?t[1]:t?t.y:0;return r===i&&n===o}(o.getOffset(),l)&&o.setOffset(l),o.isDraggable()!==u&&o.setDraggable(u),o.getRotation()!==d&&o.setRotation(d),o.getRotationAlignment()!==p&&o.setRotationAlignment(p),o.getPitchAlignment()!==f&&o.setPitchAlignment(f),o.getPopup()!==h&&o.setPopup(h);const m=Zi(g.className,e.className);if(m)for(const y of m)o.toggleClassName(y);return i.current.props=e,E.createPortal(e.children,o.getElement())}));function eo(e,t,r,n){const i=v.useContext(Gi),o=v.useMemo(()=>e(i),[]);return v.useEffect(()=>{const e=t,r=null,n="function"==typeof t?t:null,{map:a}=i;return a.hasControl(o)||(a.addControl(o,null==e?void 0:e.position),r&&r(i)),()=>{n&&n(i),a.hasControl(o)&&a.removeControl(o)}},[]),o}v.memo(v.forwardRef((e,t)=>{const{map:r,mapLib:n}=v.useContext(Gi),i=v.useMemo(()=>document.createElement("div"),[]),o=v.useRef({props:e}),a=v.useMemo(()=>{const t={...e},r=new n.Popup(t);return r.setLngLat([e.longitude,e.latitude]),r.once("open",e=>{var t,r;null==(r=(t=o.current.props).onOpen)||r.call(t,e)}),r},[]);if(v.useEffect(()=>{const e=e=>{var t,r;null==(r=(t=o.current.props).onClose)||r.call(t,e)};return a.on("close",e),a.setDOMContent(i).addTo(r.getMap()),()=>{a.off("close",e),a.isOpen()&&a.remove()}},[]),v.useEffect(()=>{Yi(a.getElement(),e.style)},[e.style]),v.useImperativeHandle(t,()=>a,[]),a.isOpen()){const t=o.current.props;a.getLngLat().lng===e.longitude&&a.getLngLat().lat===e.latitude||a.setLngLat([e.longitude,e.latitude]),e.offset&&!Bi(t.offset,e.offset)&&a.setOffset(e.offset),t.anchor===e.anchor&&t.maxWidth===e.maxWidth||(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth));const r=Zi(t.className,e.className);if(r)for(const e of r)a.toggleClassName(e);o.current.props=e}return E.createPortal(e.children,i)})),v.memo(function(e){const t=eo(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return v.useEffect(()=>{Yi(t._controlContainer,e.style)},[e.style]),null}),v.memo(v.forwardRef(function(e,t){const r=v.useRef({props:e}),n=eo(({mapLib:t})=>{const n=new t.GeolocateControl(e),i=n._setupUI;return n._setupUI=()=>{n._container.hasChildNodes()||i()},n.on("geolocate",e=>{var t,n;null==(n=(t=r.current.props).onGeolocate)||n.call(t,e)}),n.on("error",e=>{var t,n;null==(n=(t=r.current.props).onError)||n.call(t,e)}),n.on("outofmaxbounds",e=>{var t,n;null==(n=(t=r.current.props).onOutOfMaxBounds)||n.call(t,e)}),n.on("trackuserlocationstart",e=>{var t,n;null==(n=(t=r.current.props).onTrackUserLocationStart)||n.call(t,e)}),n.on("trackuserlocationend",e=>{var t,n;null==(n=(t=r.current.props).onTrackUserLocationEnd)||n.call(t,e)}),n},{position:e.position});return r.current.props=e,v.useImperativeHandle(t,()=>n,[]),v.useEffect(()=>{Yi(n._container,e.style)},[e.style]),null})),v.memo(function(e){const t=eo(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),r=v.useRef(e),n=r.current;r.current=e;const{style:i}=e;return void 0!==e.maxWidth&&e.maxWidth!==n.maxWidth&&(t.options.maxWidth=e.maxWidth),void 0!==e.unit&&e.unit!==n.unit&&t.setUnit(e.unit),v.useEffect(()=>{Yi(t._container,i)},[i]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null}),v.memo(function(e){const t=eo(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return v.useEffect(()=>{Yi(t._container,e.style)},[e.style]),null});const to=T.css`
|
|
26
26
|
position: absolute;
|
|
27
27
|
top: 16px;
|
|
28
28
|
right: 16px;
|
|
@@ -147,7 +147,7 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
147
147
|
animation-delay: 0.2s;
|
|
148
148
|
`,dot3:T.css`
|
|
149
149
|
animation-delay: 0.4s;
|
|
150
|
-
`}})();return b.jsxs("div",{className:e.root,children:[b.jsx("div",{className:`${e.dot} ${e.dot1}`}),b.jsx("div",{className:`${e.dot} ${e.dot2}`}),b.jsx("div",{className:`${e.dot} ${e.dot3}`})]})},au=(e,t)=>{switch(t.type){case"INIT":return{...e,messages:[t.welcomeMessage],isLoading:!1};case"SET_INPUT":return{...e,inputText:t.inputText};case"ADD_USER_MESSAGE":case"ADD_ASSISTANT_MESSAGE":return{...e,messages:[...e.messages,t.message]};case"UPDATE_LAST_ASSISTANT_MESSAGE":{const r=[...e.messages],n=r.length-1;return n>=0&&"Assistant"===r[n].senderName&&(r[n]=t.message),{...e,messages:r}}case"SET_ERROR":return{...e,error:t.error};case"CLEAR_INPUT":return{...e,inputText:""};case"SET_IS_RUNNING":return{...e,isRunning:!e.isRunning};default:return e}},su=({content:e,className:t})=>{const r={markdown:T.css({fontFamily:w.tokens.fontFamilyBase,fontSize:w.tokens.fontSizeBase300,lineHeight:w.tokens.lineHeightBase300,color:w.tokens.colorNeutralForeground1,"& p":{marginTop:"0",marginBottom:w.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:w.tokens.spacingVerticalL,marginBottom:w.tokens.spacingVerticalM,fontWeight:w.tokens.fontWeightSemibold},"& h1":{fontSize:w.tokens.fontSizeBase500},"& h2":{fontSize:w.tokens.fontSizeBase400},"& h3":{fontSize:w.tokens.fontSizeBase300},"& ul, & ol":{marginTop:"0",marginBottom:w.tokens.spacingVerticalM,paddingLeft:w.tokens.spacingHorizontalXXL},"& li":{marginBottom:w.tokens.spacingVerticalXS},"& code":{fontFamily:w.tokens.fontFamilyMonospace,fontSize:w.tokens.fontSizeBase200,backgroundColor:w.tokens.colorNeutralBackground3,padding:"2px 4px",borderRadius:w.tokens.borderRadiusSmall},"& pre":{backgroundColor:w.tokens.colorNeutralBackground3,padding:w.tokens.spacingVerticalM,borderRadius:w.tokens.borderRadiusMedium,overflowX:"auto",marginBottom:w.tokens.spacingVerticalM},"& pre code":{backgroundColor:"transparent",padding:"0"},"& table":{borderCollapse:"collapse",width:"100%",marginBottom:w.tokens.spacingVerticalM,border:`1px solid ${w.tokens.colorNeutralStroke1}`},"& thead":{backgroundColor:w.tokens.colorNeutralBackground3},"& th":{padding:w.tokens.spacingVerticalS+" "+w.tokens.spacingHorizontalM,textAlign:"left",fontWeight:w.tokens.fontWeightSemibold,borderBottom:`2px solid ${w.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${w.tokens.colorNeutralStroke2}`},"& td":{padding:w.tokens.spacingVerticalS+" "+w.tokens.spacingHorizontalM,borderBottom:`1px solid ${w.tokens.colorNeutralStroke2}`,borderRight:`1px solid ${w.tokens.colorNeutralStroke2}`},"& tr:last-child td":{borderBottom:"none"},"& th:last-child, & td:last-child":{borderRight:"none"},"& blockquote":{borderLeft:`4px solid ${w.tokens.colorBrandStroke1}`,paddingLeft:w.tokens.spacingHorizontalM,marginLeft:"0",marginBottom:w.tokens.spacingVerticalM,color:w.tokens.colorNeutralForeground2},"& a":{color:w.tokens.colorBrandForeground1,textDecoration:"none",":hover":{textDecoration:"underline"}},"& hr":{border:"none",borderTop:`1px solid ${w.tokens.colorNeutralStroke2}`,marginTop:w.tokens.spacingVerticalL,marginBottom:w.tokens.spacingVerticalL}})},[n,i]=q.useState("");return q.useEffect(()=>{const t=new D({html:!1,linkify:!0,typographer:!0,breaks:!0}).render(e);i(t)},[e]),b.jsx("div",{className:`${r.markdown} ${t||""}`,dangerouslySetInnerHTML:{__html:n}})},lu=w.makeStyles({plainText:{fontFamily:w.tokens.fontFamilyBase,fontSize:w.tokens.fontSizeBase300,lineHeight:w.tokens.lineHeightBase300,color:w.tokens.colorNeutralForeground1,whiteSpace:"pre-wrap",wordBreak:"break-word"},htmlContent:{fontFamily:w.tokens.fontFamilyBase,fontSize:w.tokens.fontSizeBase300,lineHeight:w.tokens.lineHeightBase300,color:w.tokens.colorNeutralForeground1,"& p":{marginTop:"0",marginBottom:w.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:w.tokens.spacingVerticalL,marginBottom:w.tokens.spacingVerticalM,fontWeight:w.tokens.fontWeightSemibold},"& table":{borderCollapse:"collapse",width:"100%",marginBottom:w.tokens.spacingVerticalM},"& th, & td":{border:`1px solid ${w.tokens.colorNeutralStroke1}`,padding:w.tokens.spacingHorizontalS,textAlign:"left"},"& th":{backgroundColor:w.tokens.colorNeutralBackground3,fontWeight:w.tokens.fontWeightSemibold}},debugBadge:{display:"inline-block",padding:`${w.tokens.spacingVerticalXS} ${w.tokens.spacingHorizontalS}`,marginBottom:w.tokens.spacingVerticalS,backgroundColor:w.tokens.colorNeutralBackground3,borderRadius:w.tokens.borderRadiusSmall,fontSize:w.tokens.fontSizeBase200,fontFamily:w.tokens.fontFamilyMonospace,color:w.tokens.colorNeutralForeground2},adaptiveCardWrapper:{width:"100%"}}),cu=({content:e,forceType:t,onTypeDetected:r,context:n,theme:i=co.SharePoint,fluentTheme:o,onAdaptiveCardAction:a,className:s,debug:l=!1})=>{const c=lu(),{error:u}=Q(),[h,d]=q.useState(null);if(q.useEffect(()=>{if(q.isValidElement(e))return;if("string"!=typeof e&&"object"!=typeof e)return;const t=st(e);d(t),r&&r(t)},[e,r]),q.isValidElement(e))return b.jsx(b.Fragment,{children:e});const p=t||(null==h?void 0:h.type),f=(null==h?void 0:h.content)||e;return b.jsxs(b.Fragment,{children:[l&&h?b.jsxs("div",{className:c.debugBadge,children:["Type: ",h.type," | Confidence: ",(100*h.confidence).toFixed(0),"%"]}):null,(()=>{switch(p){case ot.MARKDOWN:return b.jsx(su,{content:f,className:s});case ot.HTML:return b.jsx("div",{className:`${c.htmlContent} ${s||""}`,dangerouslySetInnerHTML:{__html:f}});case ot.ADAPTIVE_CARD:return b.jsx("div",{className:`${c.adaptiveCardWrapper} ${s||""}`,children:b.jsx(Uc,{card:"string"==typeof f?JSON.parse(f):f,context:n,theme:o,themeType:i,onInvokeAction:a||(()=>{}),onError:e=>u("Adaptive Card Error:",e instanceof Error?e:void 0)})});case ot.PLAIN_TEXT:default:return b.jsx("div",{className:`${c.plainText} ${s||""}`,children:f})}})()]})},uu=q.forwardRef((e,t)=>{const{messages:r,context:n}=e,i=e=>{if(q.isValidElement(e))return e;if("string"==typeof e){return e.replace(/\{"status"\s*:\s*"executing"\}/gi,"").replace(/\{'status'\s*:\s*'executing'\}/gi,"").trim()}return e},o=T.css({flex:"1 1 0",overflowY:"auto",overflowX:"hidden",padding:"16px",paddingRight:"25px","::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{background:w.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:w.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:w.tokens.colorNeutralStroke2}}),a=T.css({display:"flex",flexDirection:"column",gap:"10px",paddingRight:"30px"});return b.jsx("div",{ref:t,className:o,children:b.jsx(z.Chat,{className:a,children:r.map((e,t)=>"User"===e.senderName?b.jsx(z.ChatMyMessage,{status:e.status,author:e.senderName,children:i(e.message)},t):b.jsx(z.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:b.jsx(M.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:w.tokens.colorBrandBackground}}),author:e.senderName,children:b.jsx(cu,{content:i(e.message),context:n})},t))})})});uu.displayName="ChatList";const hu=(e,t)=>{const{getFormatRelative:r}=rt(e,t);return r(new Date)};var du={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},pu={exports:{}};const fu=Tn(pu.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",h="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,m={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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},y=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},x={s:y,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,c),o=r-i<0,a=t.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:l,d:s,D:d,h:a,m:o,s:i,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",v={};v[b]=m;var C="$isDayjsObject",w=function(e){return e instanceof T||!(!e||!e[C])},k=function e(t,r,n){var i;if(!t)return b;if("string"==typeof t){var o=t.toLowerCase();v[o]&&(i=o),r&&(v[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;v[s]=t,i=s}return!n&&i&&(b=i),i||!n&&b},S=function(e,t){if(w(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new T(r)},_=x;_.l=k,_.i=w,_.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function m(e){this.$L=k(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[C]=!0}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(f);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return _},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(e,t){var r=S(e);return this.startOf(t)<=r&&r<=this.endOf(t)},y.isAfter=function(e,t){return S(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<S(e)},y.$g=function(e,t,r){return _.u(e)?this[t]:this.set(r,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var r=this,n=!!_.u(t)||t,u=_.p(e),p=function(e,t){var i=_.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(s)},f=function(e,t){return _.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},g=this.$W,m=this.$M,y=this.$D,x="set"+(this.$u?"UTC":"");switch(u){case h:return n?p(1,0):p(31,11);case c:return n?p(1,m):p(0,m+1);case l:var b=this.$locale().weekStart||0,v=(g<b?g+7:g)-b;return p(n?y-v:y+(6-v),m);case s:case d:return f(x+"Hours",0);case a:return f(x+"Minutes",1);case o:return f(x+"Seconds",2);case i:return f(x+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var r,l=_.p(e),u="set"+(this.$u?"UTC":""),p=(r={},r[s]=u+"Date",r[d]=u+"Date",r[c]=u+"Month",r[h]=u+"FullYear",r[a]=u+"Hours",r[o]=u+"Minutes",r[i]=u+"Seconds",r[n]=u+"Milliseconds",r)[l],f=l===s?this.$D+(t-this.$W):t;if(l===c||l===h){var g=this.clone().set(d,1);g.$d[p](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[_.p(e)]()},y.add=function(n,u){var d,p=this;n=Number(n);var f=_.p(u),g=function(e){var t=S(p);return _.w(t.date(t.date()+Math.round(e*n)),p)};if(f===c)return this.set(c,this.$M+n);if(f===h)return this.set(h,this.$y+n);if(f===s)return g(1);if(f===l)return g(7);var m=(d={},d[o]=t,d[a]=r,d[i]=e,d)[f]||1,y=this.$d.getTime()+n*m;return _.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=_.z(this),o=this.$H,a=this.$m,s=this.$M,l=r.weekdays,c=r.months,u=r.meridiem,h=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].slice(0,o)},d=function(e){return _.s(o%12||12,e,"0")},f=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(g,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return s+1;case"MM":return _.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,c,3);case"MMMM":return h(c,s);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,l,2);case"ddd":return h(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return _.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(o,a,!0);case"A":return f(o,a,!1);case"m":return String(a);case"mm":return _.s(a,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(n,d,p){var f,g=this,m=_.p(d),y=S(n),x=(y.utcOffset()-this.utcOffset())*t,b=this-y,v=function(){return _.m(g,y)};switch(m){case h:f=v()/12;break;case c:f=v();break;case u:f=v()/3;break;case l:f=(b-x)/6048e5;break;case s:f=(b-x)/864e5;break;case a:f=b/r;break;case o:f=b/t;break;case i:f=b/e;break;default:f=b}return p?f:_.a(f)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return v[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=k(e,t,!0);return n&&(r.$L=n),r},y.clone=function(){return _.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),A=T.prototype;return S.prototype=A,[["$ms",n],["$s",i],["$m",o],["$H",a],["$W",s],["$M",c],["$y",h],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),S.extend=function(e,t){return e.$i||(e(t,T,S),e.$i=!0),S},S.locale=k,S.isDayjs=w,S.unix=function(e){return S(1e3*e)},S.en=v[b],S.Ls=v,S.p={},S}());var gu=Object.defineProperty,mu=(e,t)=>gu(e,"name",{value:t,configurable:!0}),yu=(e,t)=>{for(var r in t)gu(e,r,{get:t[r],enumerable:!0})},xu={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},bu={trace:mu((...e)=>{},"trace"),debug:mu((...e)=>{},"debug"),info:mu((...e)=>{},"info"),warn:mu((...e)=>{},"warn"),error:mu((...e)=>{},"error"),fatal:mu((...e)=>{},"fatal")},vu=mu(function(e="fatal"){let t=xu.fatal;"string"==typeof e?e.toLowerCase()in xu&&(t=xu[e]):"number"==typeof e&&(t=e),bu.trace=()=>{},bu.debug=()=>{},bu.info=()=>{},bu.warn=()=>{},bu.error=()=>{},bu.fatal=()=>{},t<=xu.fatal&&(bu.fatal=console.error?console.error.bind(console,Cu("FATAL"),"color: orange"):console.log.bind(console,"[35m",Cu("FATAL"))),t<=xu.error&&(bu.error=console.error?console.error.bind(console,Cu("ERROR"),"color: orange"):console.log.bind(console,"[31m",Cu("ERROR"))),t<=xu.warn&&(bu.warn=console.warn?console.warn.bind(console,Cu("WARN"),"color: orange"):console.log.bind(console,"[33m",Cu("WARN"))),t<=xu.info&&(bu.info=console.info?console.info.bind(console,Cu("INFO"),"color: lightblue"):console.log.bind(console,"[34m",Cu("INFO"))),t<=xu.debug&&(bu.debug=console.debug?console.debug.bind(console,Cu("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",Cu("DEBUG"))),t<=xu.trace&&(bu.trace=console.debug?console.debug.bind(console,Cu("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",Cu("TRACE")))},"setLogLevel"),Cu=mu(e=>`%c${fu().format("ss.SSS")} : ${e} : `,"format");const wu={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},n)=>{if(!t)return 2.55*r;e/=360,t/=100;const i=(r/=100)<.5?r*(1+t):r+t-r*t,o=2*r-i;switch(n){case"r":return 255*wu.hue2rgb(o,i,e+1/3);case"g":return 255*wu.hue2rgb(o,i,e);case"b":return 255*wu.hue2rgb(o,i,e-1/3)}},rgb2hsl:({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;const i=Math.max(e,t,r),o=Math.min(e,t,r),a=(i+o)/2;if("l"===n)return 100*a;if(i===o)return 0;const s=i-o;if("s"===n)return 100*(a>.5?s/(2-i-o):s/(i+o));switch(i){case e:return 60*((t-r)/s+(t<r?6:0));case t:return 60*((r-e)/s+2);case r:return 60*((e-t)/s+4);default:return-1}}},ku={channel:wu,lang:{clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(1e10*e)/1e10},unit:{dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},Su={};for(let RL=0;RL<=255;RL++)Su[RL]=ku.unit.dec2hex(RL);const _u=0,Tu=1,Au=2;class Pu{constructor(){this.type=_u}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=_u}is(e){return this.type===e}}const Eu=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new Pu}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=_u,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=ku.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=ku.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=ku.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=ku.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=ku.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=ku.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(Au)||void 0===t?(this._ensureHSL(),ku.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(Au)||void 0===t?(this._ensureHSL(),ku.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(Au)||void 0===t?(this._ensureHSL(),ku.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Tu)||void 0===t?(this._ensureRGB(),ku.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Tu)||void 0===t?(this._ensureRGB(),ku.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Tu)||void 0===t?(this._ensureRGB(),ku.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Tu),this.changed=!0,this.data.r=e}set g(e){this.type.set(Tu),this.changed=!0,this.data.g=e}set b(e){this.type.set(Tu),this.changed=!0,this.data.b=e}set h(e){this.type.set(Au),this.changed=!0,this.data.h=e}set s(e){this.type.set(Au),this.changed=!0,this.data.s=e}set l(e){this.type.set(Au),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),Mu={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(35!==e.charCodeAt(0))return;const t=e.match(Mu.re);if(!t)return;const r=t[1],n=parseInt(r,16),i=r.length,o=i%4==0,a=i>4,s=a?1:17,l=a?8:4,c=o?0:-1,u=a?255:15;return Eu.set({r:(n>>l*(c+3)&u)*s,g:(n>>l*(c+2)&u)*s,b:(n>>l*(c+1)&u)*s,a:o?(n&u)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`#${Su[Math.round(t)]}${Su[Math.round(r)]}${Su[Math.round(n)]}${Su[Math.round(255*i)]}`:`#${Su[Math.round(t)]}${Su[Math.round(r)]}${Su[Math.round(n)]}`}},Iu={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Iu.hueRe);if(t){const[,e,r]=t;switch(r){case"grad":return ku.channel.clamp.h(.9*parseFloat(e));case"rad":return ku.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return ku.channel.clamp.h(360*parseFloat(e))}}return ku.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(104!==t&&72!==t)return;const r=e.match(Iu.re);if(!r)return;const[,n,i,o,a,s]=r;return Eu.set({h:Iu._hue2deg(n),s:ku.channel.clamp.s(parseFloat(i)),l:ku.channel.clamp.l(parseFloat(o)),a:a?ku.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${ku.lang.round(t)}, ${ku.lang.round(r)}%, ${ku.lang.round(n)}%, ${i})`:`hsl(${ku.lang.round(t)}, ${ku.lang.round(r)}%, ${ku.lang.round(n)}%)`}},Bu={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Bu.colors[e];if(t)return Mu.parse(t)},stringify:e=>{const t=Mu.stringify(e);for(const r in Bu.colors)if(Bu.colors[r]===t)return r}},Lu={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(114!==t&&82!==t)return;const r=e.match(Lu.re);if(!r)return;const[,n,i,o,a,s,l,c,u]=r;return Eu.set({r:ku.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:ku.channel.clamp.g(a?2.55*parseFloat(o):parseFloat(o)),b:ku.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:c?ku.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${ku.lang.round(t)}, ${ku.lang.round(r)}, ${ku.lang.round(n)}, ${ku.lang.round(i)})`:`rgb(${ku.lang.round(t)}, ${ku.lang.round(r)}, ${ku.lang.round(n)})`}},ju={format:{keyword:Bu,hex:Mu,rgb:Lu,rgba:Lu,hsl:Iu,hsla:Iu},parse:e=>{if("string"!=typeof e)return e;const t=Mu.parse(e)||Lu.parse(e)||Iu.parse(e)||Bu.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Au)||void 0===e.data.r?Iu.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Lu.stringify(e):Mu.stringify(e)},Nu=(e,t)=>{const r=ju.parse(e);for(const n in t)r[n]=ku.channel.clamp[n](t[n]);return ju.stringify(r)},Du=(e,t,r=0,n=1)=>{if("number"!=typeof e)return Nu(e,{a:t});const i=Eu.set({r:ku.channel.clamp.r(e),g:ku.channel.clamp.g(t),b:ku.channel.clamp.b(r),a:ku.channel.clamp.a(n)});return ju.stringify(i)},Ou=e=>(e=>{const{r:t,g:r,b:n}=ju.parse(e),i=.2126*ku.channel.toLinear(t)+.7152*ku.channel.toLinear(r)+.0722*ku.channel.toLinear(n);return ku.lang.round(i)})(e)>=.5,Fu=e=>!Ou(e),Ru=(e,t,r)=>{const n=ju.parse(e),i=n[t],o=ku.channel.clamp[t](i+r);return i!==o&&(n[t]=o),ju.stringify(n)},$u=(e,t)=>Ru(e,"l",t),zu=(e,t)=>Ru(e,"l",-t),Vu=(e,t)=>{const r=ju.parse(e),n={};for(const i in t)t[i]&&(n[i]=r[i]+t[i]);return Nu(e,n)},Wu=(e,t=100)=>{const r=ju.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((e,t,r=50)=>{const{r:n,g:i,b:o,a:a}=ju.parse(e),{r:s,g:l,b:c,a:u}=ju.parse(t),h=r/100,d=2*h-1,p=a-u,f=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,g=1-f;return Du(n*f+s*g,i*f+l*g,o*f+c*g,a*h+u*(1-h))})(r,e,t)},{entries:Hu,setPrototypeOf:qu,isFrozen:Uu,getPrototypeOf:Gu,getOwnPropertyDescriptor:Xu}=Object;let{freeze:Ju,seal:Yu,create:Zu}=Object,{apply:Ku,construct:Qu}="undefined"!=typeof Reflect&&Reflect;Ju||(Ju=function(e){return e}),Yu||(Yu=function(e){return e}),Ku||(Ku=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return e.apply(t,n)}),Qu||(Qu=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});const eh=gh(Array.prototype.forEach),th=gh(Array.prototype.lastIndexOf),rh=gh(Array.prototype.pop),nh=gh(Array.prototype.push),ih=gh(Array.prototype.splice),oh=gh(String.prototype.toLowerCase),ah=gh(String.prototype.toString),sh=gh(String.prototype.match),lh=gh(String.prototype.replace),ch=gh(String.prototype.indexOf),uh=gh(String.prototype.trim),hh=gh(Object.prototype.hasOwnProperty),dh=gh(RegExp.prototype.test),ph=(fh=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Qu(fh,t)});var fh;function gh(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Ku(e,t,n)}}function mh(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:oh;qu&&qu(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(Uu(t)||(t[n]=e),i=e)}e[i]=!0}return e}function yh(e){for(let t=0;t<e.length;t++){hh(e,t)||(e[t]=null)}return e}function xh(e){const t=Zu(null);for(const[r,n]of Hu(e)){hh(e,r)&&(Array.isArray(n)?t[r]=yh(n):n&&"object"==typeof n&&n.constructor===Object?t[r]=xh(n):t[r]=n)}return t}function bh(e,t){for(;null!==e;){const r=Xu(e,t);if(r){if(r.get)return gh(r.get);if("function"==typeof r.value)return gh(r.value)}e=Gu(e)}return function(){return null}}const vh=Ju(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ch=Ju(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wh=Ju(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kh=Ju(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Sh=Ju(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_h=Ju(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Th=Ju(["#text"]),Ah=Ju(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ph=Ju(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Eh=Ju(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mh=Ju(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ih=Yu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Bh=Yu(/<%[\w\W]*|[\w\W]*%>/gm),Lh=Yu(/\$\{[\w\W]*/gm),jh=Yu(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nh=Yu(/^aria-[\-\w]+$/),Dh=Yu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oh=Yu(/^(?:\w+script|data):/i),Fh=Yu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rh=Yu(/^html$/i),$h=Yu(/^[a-z][.\w]*(-[.\w]+)+$/i);var zh=Object.freeze({__proto__:null,ARIA_ATTR:Nh,ATTR_WHITESPACE:Fh,CUSTOM_ELEMENT:$h,DATA_ATTR:jh,DOCTYPE_NAME:Rh,ERB_EXPR:Bh,IS_ALLOWED_URI:Dh,IS_SCRIPT_OR_DATA:Oh,MUSTACHE_EXPR:Ih,TMPLIT_EXPR:Lh});const Vh=1,Wh=3,Hh=7,qh=8,Uh=9;var Gh,Xh=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=t=>e(t);if(r.version="3.3.1",r.removed=[],!t||!t.document||t.document.nodeType!==Uh||!t.Element)return r.isSupported=!1,r;let{document:n}=t;const i=n,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=t,g=c.prototype,m=bh(g,"cloneNode"),y=bh(g,"remove"),x=bh(g,"nextSibling"),b=bh(g,"childNodes"),v=bh(g,"parentNode");if("function"==typeof s){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let C,w="";const{implementation:k,createNodeIterator:S,createDocumentFragment:_,getElementsByTagName:T}=n,{importNode:A}=i;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof Hu&&"function"==typeof v&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:E,ERB_EXPR:M,TMPLIT_EXPR:I,DATA_ATTR:B,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:D}=zh;let{IS_ALLOWED_URI:O}=zh,F=null;const R=mh({},[...vh,...Ch,...wh,...Sh,...Th]);let $=null;const z=mh({},[...Ah,...Ph,...Eh,...Mh]);let V=Object.seal(Zu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,H=null;const q=Object.seal(Zu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let U=!0,G=!0,X=!1,J=!0,Y=!1,Z=!0,K=!1,Q=!1,ee=!1,te=!1,re=!1,ne=!1,ie=!0,oe=!1,ae=!0,se=!1,le={},ce=null;const ue=mh({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let he=null;const de=mh({},["audio","video","img","source","image","track"]);let pe=null;const fe=mh({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let xe=ye,be=!1,ve=null;const Ce=mh({},[ge,me,ye],ah);let we=mh({},["mi","mo","mn","ms","mtext"]),ke=mh({},["annotation-xml"]);const Se=mh({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let Ae=null,Pe=null;const Ee=n.createElement("form"),Me=function(e){return e instanceof RegExp||e instanceof Function},Ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Pe||Pe!==e){if(e&&"object"==typeof e||(e={}),e=xh(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===_e?ah:oh,F=hh(e,"ALLOWED_TAGS")?mh({},e.ALLOWED_TAGS,Ae):R,$=hh(e,"ALLOWED_ATTR")?mh({},e.ALLOWED_ATTR,Ae):z,ve=hh(e,"ALLOWED_NAMESPACES")?mh({},e.ALLOWED_NAMESPACES,ah):Ce,pe=hh(e,"ADD_URI_SAFE_ATTR")?mh(xh(fe),e.ADD_URI_SAFE_ATTR,Ae):fe,he=hh(e,"ADD_DATA_URI_TAGS")?mh(xh(de),e.ADD_DATA_URI_TAGS,Ae):de,ce=hh(e,"FORBID_CONTENTS")?mh({},e.FORBID_CONTENTS,Ae):ue,W=hh(e,"FORBID_TAGS")?mh({},e.FORBID_TAGS,Ae):xh({}),H=hh(e,"FORBID_ATTR")?mh({},e.FORBID_ATTR,Ae):xh({}),le=!!hh(e,"USE_PROFILES")&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,X=e.ALLOW_UNKNOWN_PROTOCOLS||!1,J=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,re=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||Dh,xe=e.NAMESPACE||ye,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,ke=e.HTML_INTEGRATION_POINTS||ke,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(G=!1),re&&(te=!0),le&&(F=mh({},Th),$=[],!0===le.html&&(mh(F,vh),mh($,Ah)),!0===le.svg&&(mh(F,Ch),mh($,Ph),mh($,Mh)),!0===le.svgFilters&&(mh(F,wh),mh($,Ph),mh($,Mh)),!0===le.mathMl&&(mh(F,Sh),mh($,Eh),mh($,Mh))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?q.tagCheck=e.ADD_TAGS:(F===R&&(F=xh(F)),mh(F,e.ADD_TAGS,Ae))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?q.attributeCheck=e.ADD_ATTR:($===z&&($=xh($)),mh($,e.ADD_ATTR,Ae))),e.ADD_URI_SAFE_ATTR&&mh(pe,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(ce===ue&&(ce=xh(ce)),mh(ce,e.FORBID_CONTENTS,Ae)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=xh(ce)),mh(ce,e.ADD_FORBID_CONTENTS,Ae)),ae&&(F["#text"]=!0),K&&mh(F,["html","head","body"]),F.table&&(mh(F,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ph('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ph('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(f,o)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));Ju&&Ju(e),Pe=e}},Be=mh({},[...Ch,...wh,...kh]),Le=mh({},[...Sh,..._h]),je=function(e){nh(r.removed,{element:e});try{v(e).removeChild(e)}catch(t){y(e)}},Ne=function(e,t){try{nh(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){nh(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||re)try{je(t)}catch(n){}else try{t.setAttribute(e,"")}catch(n){}},De=function(e){let t=null,r=null;if(ee)e="<remove></remove>"+e;else{const t=sh(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===_e&&xe===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=C?C.createHTML(e):e;if(xe===ye)try{t=(new p).parseFromString(i,_e)}catch(a){}if(!t||!t.documentElement){t=k.createDocument(xe,"template",null);try{t.documentElement.innerHTML=be?w:i}catch(a){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),xe===ye?T.call(t,K?"html":"body")[0]:K?t.documentElement:o},Oe=function(e){return S.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Fe=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Re=function(e){return"function"==typeof l&&e instanceof l};function $e(e,t,n){eh(e,e=>{e.call(r,t,n,Pe)})}const ze=function(e){let t=null;if($e(P.beforeSanitizeElements,e,null),Fe(e))return je(e),!0;const n=Ae(e.nodeName);if($e(P.uponSanitizeElement,e,{tagName:n,allowedTags:F}),Z&&e.hasChildNodes()&&!Re(e.firstElementChild)&&dh(/<[/\w!]/g,e.innerHTML)&&dh(/<[/\w!]/g,e.textContent))return je(e),!0;if(e.nodeType===Hh)return je(e),!0;if(Z&&e.nodeType===qh&&dh(/<[/\w]/g,e.data))return je(e),!0;if(!(q.tagCheck instanceof Function&&q.tagCheck(n))&&(!F[n]||W[n])){if(!W[n]&&We(n)){if(V.tagNameCheck instanceof RegExp&&dh(V.tagNameCheck,n))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(n))return!1}if(ae&&!ce[n]){const t=v(e)||e.parentNode,r=b(e)||e.childNodes;if(r&&t){for(let n=r.length-1;n>=0;--n){const i=m(r[n],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,x(e))}}}return je(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:xe,tagName:"template"});const r=oh(e.tagName),n=oh(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ye?"svg"===r:t.namespaceURI===ge?"svg"===r&&("annotation-xml"===n||we[n]):Boolean(Be[r]):e.namespaceURI===ge?t.namespaceURI===ye?"math"===r:t.namespaceURI===me?"math"===r&&ke[n]:Boolean(Le[r]):e.namespaceURI===ye?!(t.namespaceURI===me&&!ke[n])&&!(t.namespaceURI===ge&&!we[n])&&!Le[r]&&(Se[r]||!Be[r]):!("application/xhtml+xml"!==_e||!ve[e.namespaceURI]))}(e)?(je(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!dh(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Wh&&(t=e.textContent,eh([E,M,I],e=>{t=lh(t,e," ")}),e.textContent!==t&&(nh(r.removed,{element:e.cloneNode()}),e.textContent=t)),$e(P.afterSanitizeElements,e,null),!1):(je(e),!0)},Ve=function(e,t,r){if(ie&&("id"===t||"name"===t)&&(r in n||r in Ee))return!1;if(G&&!H[t]&&dh(B,t));else if(U&&dh(L,t));else if(q.attributeCheck instanceof Function&&q.attributeCheck(t,e));else if(!$[t]||H[t]){if(!(We(e)&&(V.tagNameCheck instanceof RegExp&&dh(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&dh(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t,e))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&dh(V.tagNameCheck,r)||V.tagNameCheck instanceof Function&&V.tagNameCheck(r))))return!1}else if(pe[t]);else if(dh(O,lh(r,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ch(r,"data:")||!he[e]){if(X&&!dh(j,lh(r,N,"")));else if(r)return!1}else;return!0},We=function(e){return"annotation-xml"!==e&&sh(e,D)},He=function(e){$e(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Fe(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let i=t.length;for(;i--;){const a=t[i],{name:s,namespaceURI:l,value:c}=a,u=Ae(s),h=c;let d="value"===s?h:uh(h);if(n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$e(P.uponSanitizeAttribute,e,n),d=n.attrValue,!oe||"id"!==u&&"name"!==u||(Ne(s,e),d="user-content-"+d),Z&&dh(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Ne(s,e);continue}if("attributename"===u&&sh(d,"href")){Ne(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ne(s,e);continue}if(!J&&dh(/\/>/i,d)){Ne(s,e);continue}Y&&eh([E,M,I],e=>{d=lh(d,e," ")});const p=Ae(e.nodeName);if(Ve(p,u,d)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(l);else switch(f.getAttributeType(p,u)){case"TrustedHTML":d=C.createHTML(d);break;case"TrustedScriptURL":d=C.createScriptURL(d)}if(d!==h)try{l?e.setAttributeNS(l,s,d):e.setAttribute(s,d),Fe(e)?je(e):rh(r.removed)}catch(o){Ne(s,e)}}else Ne(s,e)}$e(P.afterSanitizeAttributes,e,null)},qe=function e(t){let r=null;const n=Oe(t);for($e(P.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)$e(P.uponSanitizeShadowNode,r,null),ze(r),He(r),r.content instanceof a&&e(r.content);$e(P.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw ph("toString is not a function");if("string"!=typeof(e=e.toString()))throw ph("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Q||Ie(t),r.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ae(e.nodeName);if(!F[t]||W[t])throw ph("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=De("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),o.nodeType===Vh&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!te&&!Y&&!K&&-1===e.indexOf("<"))return C&&ne?C.createHTML(e):e;if(n=De(e),!n)return te?null:ne?w:""}n&&ee&&je(n.firstChild);const u=Oe(se?e:n);for(;s=u.nextNode();)ze(s),He(s),s.content instanceof a&&qe(s.content);if(se)return e;if(te){if(re)for(c=_.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return($.shadowroot||$.shadowrootmode)&&(c=A.call(i,c,!0)),c}let h=K?n.outerHTML:n.innerHTML;return K&&F["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&dh(Rh,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Y&&eh([E,M,I],e=>{h=lh(h,e," ")}),C&&ne?C.createHTML(h):h},r.setConfig=function(){Ie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},r.clearConfig=function(){Pe=null,Q=!1},r.isValidAttribute=function(e,t,r){Pe||Ie({});const n=Ae(e),i=Ae(t);return Ve(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&nh(P[e],t)},r.removeHook=function(e,t){if(void 0!==t){const r=th(P[e],t);return-1===r?void 0:ih(P[e],r,1)[0]}return rh(P[e])},r.removeHooks=function(e){P[e]=[]},r.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),Jh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Yh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Zh=/\s*%%.*\n/gm,Kh=(a=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},mu(a,"UnknownDiagramError"),a),Qh={},ed=mu(function(e,t){e=e.replace(Jh,"").replace(Yh,"").replace(Zh,"\n");for(const[r,{detector:n}]of Object.entries(Qh)){if(n(e,t))return r}throw new Kh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),td=mu((...e)=>{for(const{id:t,detector:r,loader:n}of e)rd(t,r,n)},"registerLazyLoadedDiagrams"),rd=mu((e,t,r)=>{Qh[e]&&bu.warn(`Detector with key ${e} already exists. Overwriting.`),Qh[e]={detector:t,loader:r},bu.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),nd=mu(e=>Qh[e].loader,"getDiagramLoader"),id=mu((e,t,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>id(e,t,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||r<=0?null!=e&&"object"==typeof e&&"object"==typeof t?Object.assign(e,t):t:(void 0!==t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).forEach(i=>{"object"!=typeof t[i]||void 0!==e[i]&&"object"!=typeof e[i]?(n||"object"!=typeof e[i]&&"object"!=typeof t[i])&&(e[i]=t[i]):(void 0===e[i]&&(e[i]=Array.isArray(t[i])?[]:{}),e[i]=id(e[i],t[i],{depth:r-1,clobber:n}))}),e)},"assignWithDepth"),od=id,ad="#ffffff",sd="#f2f2f2",ld=mu((e,t)=>Vu(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),cd=(mu(s=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Vu(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Vu(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ld(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ld(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wu(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wu(this.tertiaryColor),this.lineColor=this.lineColor||Wu(this.background),this.arrowheadColor=this.arrowheadColor||Wu(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?zu(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||zu(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wu(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||$u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||zu(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||zu(this.mainBkg,10)):(this.rowOdd=this.rowOdd||$u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$u(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||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330}),this.darkMode)for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=zu(this["cScale"+w],75);else for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=zu(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||Wu(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||$u(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||zu(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;const C=this.darkMode?-4:-1;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||Vu(this.mainBkg,{h:180,s:-15,l:C*(5+3*w)}),this["surfacePeer"+w]=this["surfacePeer"+w]||Vu(this.mainBkg,{h:180,s:-15,l:C*(8+3*w)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Vu(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Vu(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Vu(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Vu(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Vu(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Vu(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||Vu(this.primaryColor,{l:-10}),this.pie5=this.pie5||Vu(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Vu(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Vu(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Vu(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Vu(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Vu(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Vu(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Vu(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:(null==(e=this.radar)?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:(null==(t=this.radar)?void 0:t.axisStrokeWidth)||2,axisLabelFontSize:(null==(r=this.radar)?void 0:r.axisLabelFontSize)||12,curveOpacity:(null==(n=this.radar)?void 0:n.curveOpacity)||.5,curveStrokeWidth:(null==(i=this.radar)?void 0:i.curveStrokeWidth)||2,graticuleColor:(null==(o=this.radar)?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(a=this.radar)?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:(null==(s=this.radar)?void 0:s.graticuleOpacity)||.3,legendBoxSize:(null==(l=this.radar)?void 0:l.legendBoxSize)||12,legendFontSize:(null==(c=this.radar)?void 0:c.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||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(u=this.xyChart)?void 0:u.backgroundColor)||this.background,titleColor:(null==(h=this.xyChart)?void 0:h.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(d=this.xyChart)?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(p=this.xyChart)?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(f=this.xyChart)?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(g=this.xyChart)?void 0:g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(m=this.xyChart)?void 0:m.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(y=this.xyChart)?void 0:y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(x=this.xyChart)?void 0:x.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(b=this.xyChart)?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(v=this.xyChart)?void 0:v.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?zu(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||Vu(this.primaryColor,{h:-30}),this.git4=this.git4||Vu(this.primaryColor,{h:-60}),this.git5=this.git5||Vu(this.primaryColor,{h:-90}),this.git6=this.git6||Vu(this.primaryColor,{h:60}),this.git7=this.git7||Vu(this.primaryColor,{h:120}),this.darkMode?(this.git0=$u(this.git0,25),this.git1=$u(this.git1,25),this.git2=$u(this.git2,25),this.git3=$u(this.git3,25),this.git4=$u(this.git4,25),this.git5=$u(this.git5,25),this.git6=$u(this.git6,25),this.git7=$u(this.git7,25)):(this.git0=zu(this.git0,25),this.git1=zu(this.git1,25),this.git2=zu(this.git2,25),this.git3=zu(this.git3,25),this.git4=zu(this.git4,25),this.git5=zu(this.git5,25),this.git6=zu(this.git6,25),this.git7=zu(this.git7,25)),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),s),ud=mu(e=>{const t=new cd;return t.calculate(e),t},"getThemeVariables"),hd=(mu(l=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$u(this.primaryColor,16),this.tertiaryColor=Vu(this.primaryColor,{h:-160}),this.primaryBorderColor=Wu(this.background),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.tertiaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$u(Wu("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Du(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=zu("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=zu(this.sectionBkgColor,10),this.taskBorderColor=Du(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Du(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||$u(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||zu(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.secondBkg=$u(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=$u(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=$u(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(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||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Wu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||$u(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(4*C-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.xyChart)?void 0:e.backgroundColor)||this.background,titleColor:(null==(t=this.xyChart)?void 0:t.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(n=this.xyChart)?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(i=this.xyChart)?void 0:i.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.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:(null==(h=this.radar)?void 0:h.axisColor)||this.lineColor,axisStrokeWidth:(null==(d=this.radar)?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:(null==(p=this.radar)?void 0:p.axisLabelFontSize)||12,curveOpacity:(null==(f=this.radar)?void 0:f.curveOpacity)||.5,curveStrokeWidth:(null==(g=this.radar)?void 0:g.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(x=this.radar)?void 0:x.graticuleOpacity)||.3,legendBoxSize:(null==(b=this.radar)?void 0:b.legendBoxSize)||12,legendFontSize:(null==(v=this.radar)?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?zu(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=$u(this.secondaryColor,20),this.git1=$u(this.pie2||this.secondaryColor,20),this.git2=$u(this.pie3||this.tertiaryColor,20),this.git3=$u(this.pie4||Vu(this.primaryColor,{h:-30}),20),this.git4=$u(this.pie5||Vu(this.primaryColor,{h:-60}),20),this.git5=$u(this.pie6||Vu(this.primaryColor,{h:-90}),10),this.git6=$u(this.pie7||Vu(this.primaryColor,{h:60}),10),this.git7=$u(this.pie8||Vu(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wu(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||$u(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$u(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),l),dd=mu(e=>{const t=new hd;return t.calculate(e),t},"getThemeVariables"),pd=(mu(c=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Vu(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Vu(this.primaryColor,{h:-160}),this.primaryBorderColor=ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.tertiaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Du(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||zu(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||zu(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=zu(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||zu(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Vu(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{h:30,l:-(7+5*C)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||Wu(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Wu(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||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=$u(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$u(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||$u(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=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Vu(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Vu(this.primaryColor,{l:-10}),this.pie5=this.pie5||Vu(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Vu(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Vu(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Vu(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Vu(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Vu(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Vu(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Vu(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.radar)?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:(null==(t=this.radar)?void 0:t.axisStrokeWidth)||2,axisLabelFontSize:(null==(r=this.radar)?void 0:r.axisLabelFontSize)||12,curveOpacity:(null==(n=this.radar)?void 0:n.curveOpacity)||.5,curveStrokeWidth:(null==(i=this.radar)?void 0:i.curveStrokeWidth)||2,graticuleColor:(null==(o=this.radar)?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(a=this.radar)?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:(null==(s=this.radar)?void 0:s.graticuleOpacity)||.3,legendBoxSize:(null==(l=this.radar)?void 0:l.legendBoxSize)||12,legendFontSize:(null==(c=this.radar)?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:(null==(u=this.xyChart)?void 0:u.backgroundColor)||this.background,titleColor:(null==(h=this.xyChart)?void 0:h.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(d=this.xyChart)?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(p=this.xyChart)?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(f=this.xyChart)?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(g=this.xyChart)?void 0:g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(m=this.xyChart)?void 0:m.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(y=this.xyChart)?void 0:y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(x=this.xyChart)?void 0:x.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(b=this.xyChart)?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(v=this.xyChart)?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vu(this.primaryColor,{h:-30}),this.git4=this.git4||Vu(this.primaryColor,{h:-60}),this.git5=this.git5||Vu(this.primaryColor,{h:-90}),this.git6=this.git6||Vu(this.primaryColor,{h:60}),this.git7=this.git7||Vu(this.primaryColor,{h:120}),this.darkMode?(this.git0=$u(this.git0,25),this.git1=$u(this.git1,25),this.git2=$u(this.git2,25),this.git3=$u(this.git3,25),this.git4=$u(this.git4,25),this.git5=$u(this.git5,25),this.git6=$u(this.git6,25),this.git7=$u(this.git7,25)):(this.git0=zu(this.git0,25),this.git1=zu(this.git1,25),this.git2=zu(this.git2,25),this.git3=zu(this.git3,25),this.git4=zu(this.git4,25),this.git5=zu(this.git5,25),this.git6=zu(this.git6,25),this.git7=zu(this.git7,25)),this.gitInv0=this.gitInv0||zu(Wu(this.git0),25),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if(Object.keys(this).forEach(e=>{"calculated"===this[e]&&(this[e]=void 0)}),"object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),c),fd=mu(e=>{const t=new pd;return t.calculate(e),t},"getThemeVariables"),gd=(mu(u=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=$u("#cde498",10),this.primaryBorderColor=ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.primaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.actorBorder=zu(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||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||zu(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||zu(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=zu(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||zu(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Vu(this["cScale"+C],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$u(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=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(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||Vu(this.primaryColor,{l:-30}),this.pie5=this.pie5||Vu(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Vu(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Vu(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Vu(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Vu(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Vu(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Vu(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Vu(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.radar)?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:(null==(t=this.radar)?void 0:t.axisStrokeWidth)||2,axisLabelFontSize:(null==(r=this.radar)?void 0:r.axisLabelFontSize)||12,curveOpacity:(null==(n=this.radar)?void 0:n.curveOpacity)||.5,curveStrokeWidth:(null==(i=this.radar)?void 0:i.curveStrokeWidth)||2,graticuleColor:(null==(o=this.radar)?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(a=this.radar)?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:(null==(s=this.radar)?void 0:s.graticuleOpacity)||.3,legendBoxSize:(null==(l=this.radar)?void 0:l.legendBoxSize)||12,legendFontSize:(null==(c=this.radar)?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:(null==(u=this.xyChart)?void 0:u.backgroundColor)||this.background,titleColor:(null==(h=this.xyChart)?void 0:h.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(d=this.xyChart)?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(p=this.xyChart)?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(f=this.xyChart)?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(g=this.xyChart)?void 0:g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(m=this.xyChart)?void 0:m.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(y=this.xyChart)?void 0:y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(x=this.xyChart)?void 0:x.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(b=this.xyChart)?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(v=this.xyChart)?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vu(this.primaryColor,{h:-30}),this.git4=this.git4||Vu(this.primaryColor,{h:-60}),this.git5=this.git5||Vu(this.primaryColor,{h:-90}),this.git6=this.git6||Vu(this.primaryColor,{h:60}),this.git7=this.git7||Vu(this.primaryColor,{h:120}),this.darkMode?(this.git0=$u(this.git0,25),this.git1=$u(this.git1,25),this.git2=$u(this.git2,25),this.git3=$u(this.git3,25),this.git4=$u(this.git4,25),this.git5=$u(this.git5,25),this.git6=$u(this.git6,25),this.git7=$u(this.git7,25)):(this.git0=zu(this.git0,25),this.git1=zu(this.git1,25),this.git2=zu(this.git2,25),this.git3=zu(this.git3,25),this.git4=zu(this.git4,25),this.git5=zu(this.git5,25),this.git6=zu(this.git6,25),this.git7=zu(this.git7,25)),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),u),md=mu(e=>{const t=new gd;return t.calculate(e),t},"getThemeVariables"),yd=(mu(h=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=$u(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Vu(this.primaryColor,{h:-160}),this.primaryBorderColor=ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.tertiaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||$u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.secondBkg=$u(this.contrast,55),this.border2=this.contrast,this.actorBorder=$u(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Wu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||$u(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||zu(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=$u(this.contrast,30),this.sectionBkgColor2=$u(this.contrast,30),this.taskBorderColor=zu(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=$u(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=zu(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=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.xyChart)?void 0:e.backgroundColor)||this.background,titleColor:(null==(t=this.xyChart)?void 0:t.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(n=this.xyChart)?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(i=this.xyChart)?void 0:i.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:(null==(h=this.radar)?void 0:h.axisColor)||this.lineColor,axisStrokeWidth:(null==(d=this.radar)?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:(null==(p=this.radar)?void 0:p.axisLabelFontSize)||12,curveOpacity:(null==(f=this.radar)?void 0:f.curveOpacity)||.5,curveStrokeWidth:(null==(g=this.radar)?void 0:g.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(x=this.radar)?void 0:x.graticuleOpacity)||.3,legendBoxSize:(null==(b=this.radar)?void 0:b.legendBoxSize)||12,legendFontSize:(null==(v=this.radar)?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=zu(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Vu(this.primaryColor,{h:-30}),this.git4=this.pie5||Vu(this.primaryColor,{h:-60}),this.git5=this.pie6||Vu(this.primaryColor,{h:-90}),this.git6=this.pie7||Vu(this.primaryColor,{h:60}),this.git7=this.pie8||Vu(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),h),xd={base:{getThemeVariables:ud},dark:{getThemeVariables:dd},default:{getThemeVariables:fd},forest:{getThemeVariables:md},neutral:{getThemeVariables:mu(e=>{const t=new yd;return t.calculate(e),t},"getThemeVariables")}},bd={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},vd={...bd,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:xd.default.getThemeVariables(),sequence:{...bd.sequence,messageFont:mu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mu(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mu(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...bd.gantt,tickInterval:void 0,useWidth:void 0},c4:{...bd.c4,useWidth:void 0,personFont:mu(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...bd.flowchart,inheritDir:!1},external_personFont:mu(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:mu(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:mu(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:mu(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:mu(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:mu(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:mu(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:mu(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:mu(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:mu(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:mu(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:mu(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:mu(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:mu(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:mu(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:mu(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:mu(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:mu(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:mu(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:mu(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:mu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...bd.pie,useWidth:984},xyChart:{...bd.xyChart,useWidth:void 0},requirement:{...bd.requirement,useWidth:void 0},packet:{...bd.packet},radar:{...bd.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Cd=mu((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:"object"==typeof e[n]&&null!==e[n]?[...r,t+n,...Cd(e[n],"")]:[...r,t+n],[]),"keyify"),wd=new Set(Cd(vd,"")),kd=vd,Sd=mu(e=>{if(bu.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>Sd(e));else{for(const t of Object.keys(e)){if(bu.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!wd.has(t)||null==e[t]){bu.debug("sanitize deleting key: ",t),delete e[t];continue}if("object"==typeof e[t]){bu.debug("sanitizing object",t),Sd(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)t.includes(n)&&(bu.debug("sanitizing css option",t),e[t]=_d(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];(null==r?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}bu.debug("After sanitization",e)}},"sanitizeDirective"),_d=mu(e=>{let t=0,r=0;for(const n of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===n?t++:"}"===n&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Td=Object.freeze(kd),Ad=od({},Td),Pd=[],Ed=od({},Td),Md=mu((e,t)=>{let r=od({},e),n={};for(const i of t)Od(i),n=od(n,i);if(r=od(r,n),n.theme&&n.theme in xd){const e=od({},Gh),t=od(e.themeVariables||{},n.themeVariables);r.theme&&r.theme in xd&&(r.themeVariables=xd[r.theme].getThemeVariables(t))}return Wd(Ed=r),Ed},"updateCurrentConfig"),Id=mu(e=>(Ad=od({},Td),Ad=od(Ad,e),e.theme&&xd[e.theme]&&(Ad.themeVariables=xd[e.theme].getThemeVariables(e.themeVariables)),Md(Ad,Pd),Ad),"setSiteConfig"),Bd=mu(e=>{Gh=od({},e)},"saveConfigFromInitialize"),Ld=mu(e=>(Ad=od(Ad,e),Md(Ad,Pd),Ad),"updateSiteConfig"),jd=mu(()=>od({},Ad),"getSiteConfig"),Nd=mu(e=>(Wd(e),od(Ed,e),Dd()),"setConfig"),Dd=mu(()=>od({},Ed),"getConfig"),Od=mu(e=>{e&&(["secure",...Ad.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(bu.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Od(e[t])}))},"sanitize"),Fd=mu(e=>{var t;Sd(e),e.fontFamily&&!(null==(t=e.themeVariables)?void 0:t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Pd.push(e),Md(Ad,Pd)},"addDirective"),Rd=mu((e=Ad)=>{Md(e,Pd=[])},"reset"),$d={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},zd={},Vd=mu(e=>{zd[e]||(bu.warn($d[e]),zd[e]=!0)},"issueWarning"),Wd=mu(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Vd("LAZY_LOAD_DEPRECATED")},"checkConfig"),Hd=mu(()=>{let e={};Gh&&(e=od(e,Gh));for(const t of Pd)e=od(e,t);return e},"getUserDefinedConfig"),qd=/<br\s*\/?>/gi,Ud=mu(e=>{if(!e)return[""];return rp(e).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Gd=(()=>{let e=!1;return()=>{e||(Xd(),e=!0)}})();function Xd(){const e="data-temp-href-target";Xh.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Xh.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target")&&t.setAttribute("rel","noopener"))})}mu(Xd,"setupDompurifyHooks");var Jd=mu(e=>{Gd();return Xh.sanitize(e)},"removeScript"),Yd=mu((e,t)=>{var r;if(!1!==(null==(r=t.flowchart)?void 0:r.htmlLabels)){const r=t.securityLevel;"antiscript"===r||"strict"===r?e=Jd(e):"loose"!==r&&(e=(e=(e=rp(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=tp(e))}return e},"sanitizeMore"),Zd=mu((e,t)=>e?e=t.dompurifyConfig?Xh.sanitize(Yd(e,t),t.dompurifyConfig).toString():Xh.sanitize(Yd(e,t),{FORBID_TAGS:["style"]}).toString():e,"sanitizeText"),Kd=mu((e,t)=>"string"==typeof e?Zd(e,t):e.flat().map(e=>Zd(e,t)),"sanitizeTextOrArray"),Qd=mu(e=>qd.test(e),"hasBreaks"),ep=mu(e=>e.split(qd),"splitBreaks"),tp=mu(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),rp=mu(e=>e.replace(qd,"#br#"),"breakToPlaceholder"),np=mu(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),ip=mu(e=>!1!==e&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),op=mu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.max(...t)},"getMax"),ap=mu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.min(...t)},"getMin"),sp=mu(function(e){const t=e.split(/(,)/),r=[];for(let n=0;n<t.length;n++){let e=t[n];if(","===e&&n>0&&n+1<t.length){const i=t[n-1],o=t[n+1];cp(i,o)&&(e=i+","+o,n++,r.pop())}r.push(up(e))}return r.join("")},"parseGenericTypes"),lp=mu((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),cp=mu((e,t)=>{const r=lp(e,"~"),n=lp(t,"~");return 1===r&&1===n},"shouldCombineSets"),up=mu(e=>{const t=lp(e,"~");let r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const n=[...e];let i=n.indexOf("~"),o=n.lastIndexOf("~");for(;-1!==i&&-1!==o&&i!==o;)n[i]="<",n[o]=">",i=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),hp=mu(()=>void 0!==window.MathMLElement,"isMathMLSupported"),dp=/\$\$(.*)\$\$/g,pp=mu(e=>{var t;return((null==(t=e.match(dp))?void 0:t.length)??0)>0},"hasKatex"),fp=mu(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await mp(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");null==n||n.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),gp=mu(async(e,t)=>{if(!pp(e))return e;if(!(hp()||t.legacyMathML||t.forceLegacyMathML))return e.replace(dp,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DPu4QpBP.cjs")),n=t.forceLegacyMathML||!hp()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(qd).map(e=>pp(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(dp,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),mp=mu(async(e,t)=>Zd(await gp(e,t),t),"renderKatexSanitized"),yp={getRows:Ud,sanitizeText:Zd,sanitizeTextOrArray:Kd,hasBreaks:Qd,splitBreaks:ep,lineBreakRegex:qd,removeScript:Jd,getUrl:np,evaluate:ip,getMax:op,getMin:ap},xp=mu(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),bp=mu(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),vp=mu(function(e,t,r,n){const i=bp(t,r,n);xp(e,i)},"configureSvgSize"),Cp=mu(function(e,t,r,n){const i=t.node().getBBox(),o=i.width,a=i.height;bu.info(`SVG bounds: ${o}x${a}`,i);let s=0,l=0;bu.info(`Graph bounds: ${s}x${l}`,e),s=o+2*r,l=a+2*r,bu.info(`Calculated bounds: ${s}x${l}`),vp(t,l,s,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),wp={},kp=mu((e,t,r)=>{let n="";return e in wp&&wp[e]?n=wp[e](r):bu.warn(`No theme found for ${e}`),` & {\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: 1px;\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 ${n}\n\n ${t}\n`},"getStyles"),Sp=mu((e,t)=>{void 0!==t&&(wp[e]=t)},"addStylesForDiagram"),_p=kp,Tp={};yu(Tp,{clear:()=>Ip,getAccDescription:()=>Np,getAccTitle:()=>Lp,getDiagramTitle:()=>Op,setAccDescription:()=>jp,setAccTitle:()=>Bp,setDiagramTitle:()=>Dp});var Ap="",Pp="",Ep="",Mp=mu(e=>Zd(e,Dd()),"sanitizeText"),Ip=mu(()=>{Ap="",Ep="",Pp=""},"clear"),Bp=mu(e=>{Ap=Mp(e).replace(/^\s+/g,"")},"setAccTitle"),Lp=mu(()=>Ap,"getAccTitle"),jp=mu(e=>{Ep=Mp(e).replace(/\n\s+/g,"\n")},"setAccDescription"),Np=mu(()=>Ep,"getAccDescription"),Dp=mu(e=>{Pp=Mp(e)},"setDiagramTitle"),Op=mu(()=>Pp,"getDiagramTitle"),Fp=bu,Rp=vu,$p=Dd,zp=Nd,Vp=Td,Wp=mu(e=>Zd(e,$p()),"sanitizeText"),Hp=Cp,qp=mu(()=>Tp,"getCommonDb"),Up={},Gp=mu((e,t,r)=>{var n;Up[e]&&Fp.warn(`Diagram with id ${e} already registered. Overwriting.`),Up[e]=t,r&&rd(e,r),Sp(e,t.styles),null==(n=t.injectUtils)||n.call(t,Fp,Rp,$p,Wp,Hp,qp(),()=>{})},"registerDiagram"),Xp=mu(e=>{if(e in Up)return Up[e];throw new Jp(e)},"getDiagram"),Jp=(d=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},mu(d,"DiagramNotFoundError"),d),Yp={value:()=>{}};function Zp(){for(var e,t=0,r=arguments.length,n={};t<r;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new Kp(n)}function Kp(e){this._=e}function Qp(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}function ef(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=Yp,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}Kp.prototype=Zp.prototype={constructor:Kp,on:function(e,t){var r,n,i=this._,o=(n=i,(e+"").trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");if(r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(r=(e=o[a]).type)i[r]=ef(i[r],e.name,t);else if(null==t)for(r in i)i[r]=ef(i[r],e.name,null);return this}for(;++a<s;)if((r=(e=o[a]).type)&&(r=Qp(i[r],e.name)))return r},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Kp(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),o=0;o<r;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,r=(n=this._[e]).length;o<r;++o)n[o].value.apply(t,i)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};var tf="http://www.w3.org/1999/xhtml";const rf={svg:"http://www.w3.org/2000/svg",xhtml:tf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nf(e){var t=e+="",r=t.indexOf(":");return r>=0&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),rf.hasOwnProperty(t)?{space:rf[t],local:e}:e}function of(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===tf&&t.documentElement.namespaceURI===tf?t.createElement(e):t.createElementNS(r,e)}}function af(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function sf(e){var t=nf(e);return(t.local?af:of)(t)}function lf(){}function cf(e){return null==e?lf:function(){return this.querySelector(e)}}function uf(){return[]}function hf(e){return null==e?uf:function(){return this.querySelectorAll(e)}}function df(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function pf(e){return function(){return this.matches(e)}}function ff(e){return function(t){return t.matches(e)}}var gf=Array.prototype.find;function mf(){return this.firstElementChild}var yf=Array.prototype.filter;function xf(){return Array.from(this.children)}function bf(e){return new Array(e.length)}function vf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Cf(e,t,r,n,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],n[s]=a):r[s]=new vf(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function wf(e,t,r,n,i,o,a){var s,l,c,u=new Map,h=t.length,d=o.length,p=new Array(h);for(s=0;s<h;++s)(l=t[s])&&(p[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<d;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(n[s]=l,l.__data__=o[s],u.delete(c)):r[s]=new vf(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(p[s])===l&&(i[s]=l)}function kf(e){return e.__data__}function Sf(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function _f(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Tf(e){return function(){this.removeAttribute(e)}}function Af(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pf(e,t){return function(){this.setAttribute(e,t)}}function Ef(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Mf(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}}function If(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Bf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Lf(e){return function(){this.style.removeProperty(e)}}function jf(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Nf(e,t,r){return function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function Df(e,t){return e.style.getPropertyValue(t)||Bf(e).getComputedStyle(e,null).getPropertyValue(t)}function Of(e){return function(){delete this[e]}}function Ff(e,t){return function(){this[e]=t}}function Rf(e,t){return function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}}function $f(e){return e.trim().split(/^|\s+/)}function zf(e){return e.classList||new Vf(e)}function Vf(e){this._node=e,this._names=$f(e.getAttribute("class")||"")}function Wf(e,t){for(var r=zf(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Hf(e,t){for(var r=zf(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function qf(e){return function(){Wf(this,e)}}function Uf(e){return function(){Hf(this,e)}}function Gf(e,t){return function(){(t.apply(this,arguments)?Wf:Hf)(this,e)}}function Xf(){this.textContent=""}function Jf(e){return function(){this.textContent=e}}function Yf(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Zf(){this.innerHTML=""}function Kf(e){return function(){this.innerHTML=e}}function Qf(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function eg(){this.nextSibling&&this.parentNode.appendChild(this)}function tg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rg(){return null}function ng(){var e=this.parentNode;e&&e.removeChild(this)}function ig(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function og(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ag(e){return function(){var t=this.__on;if(t){for(var r,n=0,i=-1,o=t.length;n<o;++n)r=t[n],e.type&&r.type!==e.type||r.name!==e.name?t[++i]=r:this.removeEventListener(r.type,r.listener,r.options);++i?t.length=i:delete this.__on}}}function sg(e,t,r){return function(){var n,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name)return this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),void(n.value=t);this.addEventListener(e.type,o,r),n={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(n):this.__on=[n]}}function lg(e,t,r){var n=Bf(e),i=n.CustomEvent;"function"==typeof i?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function cg(e,t){return function(){return lg(this,e,t)}}function ug(e,t){return function(){return lg(this,e,t.apply(this,arguments))}}vf.prototype={constructor:vf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Vf.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var hg=[null];function dg(e,t){this._groups=e,this._parents=t}function pg(){return new dg([[document.documentElement]],hg)}function fg(e){return"string"==typeof e?new dg([[document.querySelector(e)]],[document.documentElement]):new dg([[e]],hg)}function gg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function yg(){}dg.prototype=pg.prototype={constructor:dg,select:function(e){"function"!=typeof e&&(e=cf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o,a,s=t[i],l=s.length,c=n[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new dg(n,this._parents)},selectAll:function(e){e="function"==typeof e?df(e):hf(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(n.push(e.call(a,a.__data__,c,s)),i.push(a));return new dg(n,i)},selectChild:function(e){return this.select(null==e?mf:function(e){return function(){return gf.call(this.children,e)}}("function"==typeof e?e:ff(e)))},selectChildren:function(e){return this.selectAll(null==e?xf:function(e){return function(){return yf.call(this.children,e)}}("function"==typeof e?e:ff(e)))},filter:function(e){"function"!=typeof e&&(e=pf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o,a=t[i],s=a.length,l=n[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new dg(n,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,kf);var r,n=t?wf:Cf,i=this._parents,o=this._groups;"function"!=typeof e&&(r=e,e=function(){return r});for(var a=o.length,s=new Array(a),l=new Array(a),c=new Array(a),u=0;u<a;++u){var h=i[u],d=o[u],p=d.length,f=Sf(e.call(h,h&&h.__data__,u,i)),g=f.length,m=l[u]=new Array(g),y=s[u]=new Array(g);n(h,d,m,y,c[u]=new Array(p),f,t);for(var x,b,v=0,C=0;v<g;++v)if(x=m[v]){for(v>=C&&(C=v+1);!(b=y[C])&&++C<g;);x._next=b||null}}return(s=new dg(s,i))._enter=l,s._exit=c,s},enter:function(){return new dg(this._enter||this._groups.map(bf),this._parents)},exit:function(){return new dg(this._exit||this._groups.map(bf),this._parents)},join:function(e,t,r){var n=this.enter(),i=this,o=this.exit();return"function"==typeof e?(n=e(n))&&(n=n.selection()):n=n.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==r?o.remove():r(o),n&&i?n.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=r[l],h=n[l],d=u.length,p=s[l]=new Array(d),f=0;f<d;++f)(c=u[f]||h[f])&&(p[f]=c);for(;l<i;++l)s[l]=r[l];return new dg(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n,i=e[t],o=i.length-1,a=i[o];--o>=0;)(n=i[o])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this},sort:function(e){function t(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}e||(e=_f);for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a,s=r[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new dg(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i,o=t[r],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var r=nf(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==t?r.local?Af:Tf:"function"==typeof t?r.local?If:Mf:r.local?Ef:Pf)(r,t))},style:function(e,t,r){return arguments.length>1?this.each((null==t?Lf:"function"==typeof t?Nf:jf)(e,t,null==r?"":r)):Df(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Of:"function"==typeof t?Rf:Ff)(e,t)):this.node()[e]},classed:function(e,t){var r=$f(e+"");if(arguments.length<2){for(var n=zf(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?Gf:t?qf:Uf)(r,t))},text:function(e){return arguments.length?this.each(null==e?Xf:("function"==typeof e?Yf:Jf)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Zf:("function"==typeof e?Qf:Kf)(e)):this.node().innerHTML},raise:function(){return this.each(eg)},lower:function(){return this.each(tg)},append:function(e){var t="function"==typeof e?e:sf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var r="function"==typeof e?e:sf(e),n=null==t?rg:"function"==typeof t?t:cf(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(ng)},clone:function(e){return this.select(e?og:ig)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,r){var n,i,o=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?sg:ag,n=0;n<a;++n)this.each(s(o[n],t,r));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(n=0,l=s[c];n<a;++n)if((i=o[n]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?ug:cg)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n,i=e[t],o=0,a=i.length;o<a;++o)(n=i[o])&&(yield n)}};var xg=.7,bg=1/xg,vg="\\s*([+-]?\\d+)\\s*",Cg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kg=/^#([0-9a-f]{3,8})$/,Sg=new RegExp(`^rgb\\(${vg},${vg},${vg}\\)$`),_g=new RegExp(`^rgb\\(${wg},${wg},${wg}\\)$`),Tg=new RegExp(`^rgba\\(${vg},${vg},${vg},${Cg}\\)$`),Ag=new RegExp(`^rgba\\(${wg},${wg},${wg},${Cg}\\)$`),Pg=new RegExp(`^hsl\\(${Cg},${wg},${wg}\\)$`),Eg=new RegExp(`^hsla\\(${Cg},${wg},${wg},${Cg}\\)$`),Mg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ig(){return this.rgb().formatHex()}function Bg(){return this.rgb().formatRgb()}function Lg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?jg(t):3===r?new Fg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ng(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ng(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Sg.exec(e))?new Fg(t[1],t[2],t[3],1):(t=_g.exec(e))?new Fg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Tg.exec(e))?Ng(t[1],t[2],t[3],t[4]):(t=Ag.exec(e))?Ng(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Pg.exec(e))?Hg(t[1],t[2]/100,t[3]/100,1):(t=Eg.exec(e))?Hg(t[1],t[2]/100,t[3]/100,t[4]):Mg.hasOwnProperty(e)?jg(Mg[e]):"transparent"===e?new Fg(NaN,NaN,NaN,0):null}function jg(e){return new Fg(e>>16&255,e>>8&255,255&e,1)}function Ng(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fg(e,t,r,n)}function Dg(e){return e instanceof yg||(e=Lg(e)),e?new Fg((e=e.rgb()).r,e.g,e.b,e.opacity):new Fg}function Og(e,t,r,n){return 1===arguments.length?Dg(e):new Fg(e,t,r,null==n?1:n)}function Fg(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Rg(){return`#${Wg(this.r)}${Wg(this.g)}${Wg(this.b)}`}function $g(){const e=zg(this.opacity);return`${1===e?"rgb(":"rgba("}${Vg(this.r)}, ${Vg(this.g)}, ${Vg(this.b)}${1===e?")":`, ${e})`}`}function zg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wg(e){return((e=Vg(e))<16?"0":"")+e.toString(16)}function Hg(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ug(e,t,r,n)}function qg(e){if(e instanceof Ug)return new Ug(e.h,e.s,e.l,e.opacity);if(e instanceof yg||(e=Lg(e)),!e)return new Ug;if(e instanceof Ug)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ug(a,s,l,e.opacity)}function Ug(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Gg(e){return(e=(e||0)%360)<0?e+360:e}function Xg(e){return Math.max(0,Math.min(1,e||0))}function Jg(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}gg(yg,Lg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ig,formatHex:Ig,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return qg(this).formatHsl()},formatRgb:Bg,toString:Bg}),gg(Fg,Og,mg(yg,{brighter(e){return e=null==e?bg:Math.pow(bg,e),new Fg(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?xg:Math.pow(xg,e),new Fg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fg(Vg(this.r),Vg(this.g),Vg(this.b),zg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Rg,formatHex:Rg,formatHex8:function(){return`#${Wg(this.r)}${Wg(this.g)}${Wg(this.b)}${Wg(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:$g,toString:$g})),gg(Ug,function(e,t,r,n){return 1===arguments.length?qg(e):new Ug(e,t,r,null==n?1:n)},mg(yg,{brighter(e){return e=null==e?bg:Math.pow(bg,e),new Ug(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?xg:Math.pow(xg,e),new Ug(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Fg(Jg(e>=240?e-240:e+120,i,n),Jg(e,i,n),Jg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Ug(Gg(this.h),Xg(this.s),Xg(this.l),zg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zg(this.opacity);return`${1===e?"hsl(":"hsla("}${Gg(this.h)}, ${100*Xg(this.s)}%, ${100*Xg(this.l)}%${1===e?")":`, ${e})`}`}}));const Yg=e=>()=>e;function Zg(e,t){return function(r){return e+r*t}}function Kg(e){return 1===(e=+e)?Qg:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):Yg(isNaN(t)?r:t)}}function Qg(e,t){var r=t-e;return r?Zg(e,r):Yg(isNaN(e)?t:e)}const em=function e(t){var r=Kg(t);function n(e,t){var n=r((e=Og(e)).r,(t=Og(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Qg(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function tm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var rm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nm=new RegExp(rm.source,"g");function im(e,t){var r,n,i,o=rm.lastIndex=nm.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=rm.exec(e))&&(n=nm.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:tm(r,n)})),o=nm.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}var om,am=180/Math.PI,sm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lm(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*am,skewX:Math.atan(l)*am,scaleX:a,scaleY:s}}function cm(e,t,r,n){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,n,i,o,a,s){if(e!==i||n!==o){var l=a.push("translate(",null,t,null,r);s.push({i:l-4,x:tm(e,i)},{i:l-2,x:tm(n,o)})}else(i||o)&&a.push("translate("+i+t+o+r)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,r,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:r.push(i(r)+"rotate(",null,n)-2,x:tm(e,t)})):t&&r.push(i(r)+"rotate("+t+n)}(o.rotate,a.rotate,s,l),function(e,t,r,o){e!==t?o.push({i:r.push(i(r)+"skewX(",null,n)-2,x:tm(e,t)}):t&&r.push(i(r)+"skewX("+t+n)}(o.skewX,a.skewX,s,l),function(e,t,r,n,o,a){if(e!==r||t!==n){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:tm(e,r)},{i:s-2,x:tm(t,n)})}else 1===r&&1===n||o.push(i(o)+"scale("+r+","+n+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,r=-1,n=l.length;++r<n;)s[(t=l[r]).i]=t.x(e);return s.join("")}}}var um,hm,dm=cm(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?sm:lm(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),pm=cm(function(e){return null==e?sm:(om||(om=document.createElementNS("http://www.w3.org/2000/svg","g")),om.setAttribute("transform",e),(e=om.transform.baseVal.consolidate())?lm((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):sm)},", ",")",")"),fm=0,gm=0,mm=0,ym=0,xm=0,bm=0,vm="object"==typeof performance&&performance.now?performance:Date,Cm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function wm(){return xm||(Cm(km),xm=vm.now()+bm)}function km(){xm=0}function Sm(){this._call=this._time=this._next=null}function _m(e,t,r){var n=new Sm;return n.restart(e,t,r),n}function Tm(){xm=(ym=vm.now())+bm,fm=gm=0;try{!function(){wm(),++fm;for(var e,t=um;t;)(e=xm-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fm}()}finally{fm=0,function(){var e,t,r=um,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:um=t);hm=e,Pm(n)}(),xm=0}}function Am(){var e=vm.now(),t=e-ym;t>1e3&&(bm-=t,ym=e)}function Pm(e){fm||(gm&&(gm=clearTimeout(gm)),e-xm>24?(e<1/0&&(gm=setTimeout(Tm,e-vm.now()-bm)),mm&&(mm=clearInterval(mm))):(mm||(ym=vm.now(),mm=setInterval(Am,1e3)),fm=1,Cm(Tm)))}function Em(e,t,r){var n=new Sm;return t=null==t?0:+t,n.restart(r=>{n.stop(),e(r+t)},t,r),n}Sm.prototype=_m.prototype={constructor:Sm,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?wm():+r)+(null==t?0:+t),this._next||hm===this||(hm?hm._next=this:um=this,hm=this),this._call=e,this._time=r,Pm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pm())}};var Mm=Zp("start","end","cancel","interrupt"),Im=[];function Bm(e,t,r,n,i,o){var a=e.__transition;if(a){if(r in a)return}else e.__transition={};!function(e,t,r){var n,i=e.__transition;function o(e){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=e&&a(e-r.delay)}function a(o){var c,u,h,d;if(1!==r.state)return l();for(c in i)if((d=i[c]).name===r.name){if(3===d.state)return Em(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Em(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(o))}),r.state=2,r.on.call("start",e,e.__data__,r.index,r.group),2===r.state){for(r.state=3,n=new Array(h=r.tween.length),c=0,u=-1;c<h;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function s(t){for(var i=t<r.duration?r.ease.call(null,t/r.duration):(r.timer.restart(l),r.state=5,1),o=-1,a=n.length;++o<a;)n[o].call(e,i);5===r.state&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){for(var n in r.state=6,r.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=r,r.timer=_m(o,0,r.time)}(e,r,{name:t,index:n,group:i,on:Mm,tween:Im,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Lm(e,t){var r=Nm(e,t);if(r.state>0)throw new Error("too late; already scheduled");return r}function jm(e,t){var r=Nm(e,t);if(r.state>3)throw new Error("too late; already running");return r}function Nm(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Dm(e,t){var r,n;return function(){var i=jm(this,e),o=i.tween;if(o!==r)for(var a=0,s=(n=r=o).length;a<s;++a)if(n[a].name===t){(n=n.slice()).splice(a,1);break}i.tween=n}}function Om(e,t,r){var n,i;if("function"!=typeof r)throw new Error;return function(){var o=jm(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function Fm(e,t,r){var n=e._id;return e.each(function(){var e=jm(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return Nm(e,n).value[t]}}function Rm(e,t){var r;return("number"==typeof t?tm:t instanceof Lg?em:(r=Lg(t))?(t=r,em):im)(e,t)}function $m(e){return function(){this.removeAttribute(e)}}function zm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vm(e,t,r){var n,i,o=r+"";return function(){var a=this.getAttribute(e);return a===o?null:a===n?i:i=t(n=a,r)}}function Wm(e,t,r){var n,i,o=r+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===n?i:i=t(n=a,r)}}function Hm(e,t,r){var n,i,o;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===n&&s===i?o:(i=s,o=t(n=a,l));this.removeAttribute(e)}}function qm(e,t,r){var n,i,o;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===n&&s===i?o:(i=s,o=t(n=a,l));this.removeAttributeNS(e.space,e.local)}}function Um(e,t){var r,n;function i(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&function(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}(e,i)),r}return i._value=t,i}function Gm(e,t){var r,n;function i(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&function(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}(e,i)),r}return i._value=t,i}function Xm(e,t){return function(){Lm(this,e).delay=+t.apply(this,arguments)}}function Jm(e,t){return t=+t,function(){Lm(this,e).delay=t}}function Ym(e,t){return function(){jm(this,e).duration=+t.apply(this,arguments)}}function Zm(e,t){return t=+t,function(){jm(this,e).duration=t}}var Km=pg.prototype.constructor;function Qm(e){return function(){this.style.removeProperty(e)}}var ey=0;function ty(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function ry(){return++ey}var ny=pg.prototype;ty.prototype={constructor:ty,select:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=cf(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=n[a],u=c.length,h=o[a]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=e.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,Bm(h[d],t,r,d,h,Nm(s,r)));return new ty(o,this._parents,t,r)},selectAll:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=hf(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l,c=n[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,p=e.call(l,l.__data__,h,c),f=Nm(l,r),g=0,m=p.length;g<m;++g)(d=p[g])&&Bm(d,t,r,g,p,f);o.push(p),a.push(l)}return new ty(o,a,t,r)},selectChild:ny.selectChild,selectChildren:ny.selectChildren,filter:function(e){"function"!=typeof e&&(e=pf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o,a=t[i],s=a.length,l=n[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new ty(n,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l,c=t[s],u=r[s],h=c.length,d=a[s]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(d[p]=l);for(;s<n;++s)a[s]=t[s];return new ty(a,this._parents,this._name,this._id)},selection:function(){return new Km(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,r=ry(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Nm(a,t);Bm(a,e,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ty(n,this._parents,e,r)},call:ny.call,nodes:ny.nodes,node:ny.node,size:ny.size,empty:ny.empty,each:ny.each,on:function(e,t){var r=this._id;return arguments.length<2?Nm(this.node(),r).on.on(e):this.each(function(e,t,r){var n,i,o=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?Lm:jm;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}(r,e,t))},attr:function(e,t){var r=nf(e),n="transform"===r?pm:Rm;return this.attrTween(e,"function"==typeof t?(r.local?qm:Hm)(r,n,Fm(this,"attr."+e,t)):null==t?(r.local?zm:$m)(r):(r.local?Wm:Vm)(r,n,t))},attrTween:function(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;var n=nf(e);return this.tween(r,(n.local?Um:Gm)(n,t))},style:function(e,t,r){var n="transform"==(e+="")?dm:Rm;return null==t?this.styleTween(e,function(e,t){var r,n,i;return function(){var o=Df(this,e),a=(this.style.removeProperty(e),Df(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}(e,n)).on("end.style."+e,Qm(e)):"function"==typeof t?this.styleTween(e,function(e,t,r){var n,i,o;return function(){var a=Df(this,e),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Df(this,e)),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}(e,n,Fm(this,"style."+e,t))).each(function(e,t){var r,n,i,o,a="style."+t,s="end."+a;return function(){var l=jm(this,e),c=l.on,u=null==l.value[a]?o||(o=Qm(t)):void 0;c===r&&i===u||(n=(r=c).copy()).on(s,i=u),l.on=n}}(this._id,e)):this.styleTween(e,function(e,t,r){var n,i,o=r+"";return function(){var a=Df(this,e);return a===o?null:a===n?i:i=t(n=a,r)}}(e,n,t),r).on("end.style."+e,null)},styleTween:function(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(e,t,r){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&function(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}(e,o,r)),n}return o._value=t,o}(e,t,null==r?"":r))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Fm(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,r;function n(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&function(e){return function(t){this.textContent=e.call(this,t)}}(n)),t}return n._value=e,n}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n,i=Nm(this.node(),r).tween,o=0,a=i.length;o<a;++o)if((n=i[o]).name===e)return n.value;return null}return this.each((null==t?Dm:Om)(r,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Xm:Jm)(t,e)):Nm(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Ym:Zm)(t,e)):Nm(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){jm(this,e).ease=t}}(t,e)):Nm(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var r=t.apply(this,arguments);if("function"!=typeof r)throw new Error;jm(this,e).ease=r}}(this._id,e))},end:function(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0===--i&&o()}};r.each(function(){var r=jm(this,n),i=r.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),r.on=t}),0===i&&o()})},[Symbol.iterator]:ny[Symbol.iterator]};var iy={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function oy(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}pg.prototype.interrupt=function(e){return this.each(function(){!function(e,t){var r,n,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(r=o[i]).name===t?(n=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete o[i]):a=!1;a&&delete e.__transition}}(this,e)})},pg.prototype.transition=function(e){var t,r;e instanceof ty?(t=e._id,e=e._name):(t=ry(),(r=iy).time=wm(),e=null==e?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)(a=s[c])&&Bm(a,e,t,c,s,r||oy(a,t));return new ty(n,this._parents,e,t)};const ay=Math.PI,sy=2*ay,ly=1e-6,cy=sy-ly;function uy(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class hy{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?uy:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return uy;const r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=Math.round(arguments[t]*r)/r+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,o){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(h>ly)if(Math.abs(u*s-l*c)>ly&&i){let d=r-o,p=n-a,f=s*s+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(h),x=i*Math.tan((ay-Math.acos((f+h-g)/(2*m*y)))/2),b=x/y,v=x/m;Math.abs(b-1)>ly&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*d>c*p)},${this._x1=e+v*s},${this._y1=t+v*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,r,n,i,o){if(e=+e,t=+t,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>ly||Math.abs(this._y1-c)>ly)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%sy+sy),h>cy?this._append`A${r},${r},0,1,${u},${e-a},${t-s}A${r},${r},0,1,${u},${this._x1=l},${this._y1=c}`:h>ly&&this._append`A${r},${r},0,${+(h>=ay)},${u},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function dy(e){return function(){return e}}const py=Math.abs,fy=Math.atan2,gy=Math.cos,my=Math.max,yy=Math.min,xy=Math.sin,by=Math.sqrt,vy=1e-12,Cy=Math.PI,wy=Cy/2,ky=2*Cy;function Sy(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{const e=Math.floor(r);if(!(e>=0))throw new RangeError(`invalid digits: ${r}`);t=e}return e},()=>new hy(t)}function _y(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Ty(e){this._context=e}function Ay(e){return new Ty(e)}function Py(e){return e[0]}function Ey(e){return e[1]}function My(e,t){var r=dy(!0),n=null,i=Ay,o=null,a=Sy(s);function s(s){var l,c,u,h=(s=_y(s)).length,d=!1;for(null==n&&(o=i(u=a())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?Py:dy(e),t="function"==typeof t?t:void 0===t?Ey:dy(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:dy(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:dy(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:dy(!!e),s):r},s.curve=function(e){return arguments.length?(i=e,null!=n&&(o=i(n)),s):i},s.context=function(e){return arguments.length?(null==e?n=o=null:o=i(n=e),s):n},s}Ty.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class Iy{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function By(e){return new Iy(e,!0)}function Ly(e){return new Iy(e,!1)}function jy(){}function Ny(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Dy(e){this._context=e}function Oy(e){return new Dy(e)}function Fy(e){this._context=e}function Ry(e){this._context=e}function $y(e,t){this._basis=new Dy(e),this._beta=t}Dy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ny(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ny(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Fy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ny(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ny(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},$y.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,i=e[0],o=t[0],a=e[r]-i,s=t[r]-o,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+n*a),this._beta*t[l]+(1-this._beta)*(o+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const zy=function e(t){function r(e){return 1===t?new Dy(e):new $y(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function Vy(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Wy(e,t){this._context=e,this._k=(1-t)/6}Wy.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:Vy(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Vy(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hy=function e(t){function r(e){return new Wy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function qy(e,t){this._context=e,this._k=(1-t)/6}qy.prototype={areaStart:jy,areaEnd:jy,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Vy(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Uy=function e(t){function r(e){return new qy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function Gy(e,t){this._context=e,this._k=(1-t)/6}Gy.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vy(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Xy=function e(t){function r(e){return new Gy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function Jy(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>vy){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>vy){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,o,a,e._x2,e._y2)}function Yy(e,t){this._context=e,this._alpha=t}Yy.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jy(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Zy=function e(t){function r(e){return t?new Yy(e,t):new Wy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Ky(e,t){this._context=e,this._alpha=t}Ky.prototype={areaStart:jy,areaEnd:jy,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jy(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Qy=function e(t){function r(e){return t?new Ky(e,t):new qy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ex(e,t){this._context=e,this._alpha=t}ex.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jy(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tx=function e(t){function r(e){return t?new ex(e,t):new Gy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function rx(e){this._context=e}function nx(e){return e<0?-1:1}function ix(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(nx(o)+nx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function ox(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ax(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function sx(e){this._context=e}function lx(e){this._context=new cx(e)}function cx(e){this._context=e}function ux(e){return new sx(e)}function hx(e){return new lx(e)}function dx(e){this._context=e}function px(e){var t,r,n=e.length-1,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function fx(e){return new dx(e)}function gx(e,t){this._context=e,this._t=t}function mx(e){return new gx(e,.5)}function yx(e){return new gx(e,0)}function xx(e){return new gx(e,1)}function bx(e,t,r){this.k=e,this.x=t,this.y=r}rx.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},sx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ax(this,this._t0,ox(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ax(this,ox(this,r=ix(this,e,t)),r);break;default:ax(this,this._t0,r=ix(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(lx.prototype=Object.create(sx.prototype)).point=function(e,t){sx.prototype.point.call(this,t,e)},cx.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}},dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=px(e),i=px(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},gx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},bx.prototype={constructor:bx,scale:function(e){return 1===e?this:new bx(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new bx(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},bx.prototype;var vx=mu(e=>{var t;const{securityLevel:r}=$p();let n=fg("body");if("sandbox"===r){const r=fg(`#i${e}`);n=fg(((null==(t=r.node())?void 0:t.contentDocument)??document).body)}return n.select(`#${e}`)},"selectSvgElement");function Cx(e){return null==e}function wx(e){return"object"==typeof e&&null!==e}function kx(e){return Array.isArray(e)?e:Cx(e)?[]:[e]}function Sx(e,t){var r,n,i,o;if(t)for(r=0,n=(o=Object.keys(t)).length;r<n;r+=1)e[i=o[r]]=t[i];return e}function _x(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n}function Tx(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}mu(Cx,"isNothing"),mu(wx,"isObject"),mu(kx,"toArray"),mu(Sx,"extend"),mu(_x,"repeat"),mu(Tx,"isNegativeZero");var Ax={isNothing:Cx,isObject:wx,toArray:kx,repeat:_x,isNegativeZero:Tx,extend:Sx};function Px(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function Ex(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Px(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}mu(Px,"formatError"),mu(Ex,"YAMLException$1"),Ex.prototype=Object.create(Error.prototype),Ex.prototype.constructor=Ex,Ex.prototype.toString=mu(function(e){return this.name+": "+Px(this,e)},"toString");var Mx=Ex;function Ix(e,t,r,n,i){var o="",a="",s=Math.floor(i/2)-1;return n-t>s&&(t=n-s+(o=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:n-t+o.length}}function Bx(e,t){return Ax.repeat(" ",t-e.length)+e}function Lx(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],o=[],a=-1;r=n.exec(e.buffer);)o.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,l,c="",u=Math.min(e.line+t.linesAfter,o.length).toString().length,h=t.maxLength-(t.indent+u+3);for(s=1;s<=t.linesBefore&&!(a-s<0);s++)l=Ix(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),h),c=Ax.repeat(" ",t.indent)+Bx((e.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=Ix(e.buffer,i[a],o[a],e.position,h),c+=Ax.repeat(" ",t.indent)+Bx((e.line+1).toString(),u)+" | "+l.str+"\n",c+=Ax.repeat("-",t.indent+u+3+l.pos)+"^\n",s=1;s<=t.linesAfter&&!(a+s>=o.length);s++)l=Ix(e.buffer,i[a+s],o[a+s],e.position-(i[a]-i[a+s]),h),c+=Ax.repeat(" ",t.indent)+Bx((e.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}mu(Ix,"getLine"),mu(Bx,"padStart"),mu(Lx,"makeSnippet");var jx=Lx,Nx=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Dx=["scalar","sequence","mapping"];function Ox(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}function Fx(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===Nx.indexOf(t))throw new Mx('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ox(t.styleAliases||null),-1===Dx.indexOf(this.kind))throw new Mx('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}mu(Ox,"compileStyleAliases"),mu(Fx,"Type$1");var Rx=Fx;function $x(e,t){var r=[];return e[t].forEach(function(e){var t=r.length;r.forEach(function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)}),r[t]=e}),r}function zx(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(mu(n,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}function Vx(e){return this.extend(e)}mu($x,"compileList"),mu(zx,"compileMap"),mu(Vx,"Schema$1"),Vx.prototype.extend=mu(function(e){var t=[],r=[];if(e instanceof Rx)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new Mx("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof Rx))throw new Mx("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Mx("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new Mx("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(e){if(!(e instanceof Rx))throw new Mx("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Vx.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=$x(n,"implicit"),n.compiledExplicit=$x(n,"explicit"),n.compiledTypeMap=zx(n.compiledImplicit,n.compiledExplicit),n},"extend");var Wx=new Vx({explicit:[new Rx("tag:yaml.org,2002:str",{kind:"scalar",construct:mu(function(e){return null!==e?e:""},"construct")}),new Rx("tag:yaml.org,2002:seq",{kind:"sequence",construct:mu(function(e){return null!==e?e:[]},"construct")}),new Rx("tag:yaml.org,2002:map",{kind:"mapping",construct:mu(function(e){return null!==e?e:{}},"construct")})]});function Hx(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function qx(){return null}function Ux(e){return null===e}mu(Hx,"resolveYamlNull"),mu(qx,"constructYamlNull"),mu(Ux,"isNull");var Gx=new Rx("tag:yaml.org,2002:null",{kind:"scalar",resolve:Hx,construct:qx,predicate:Ux,represent:{canonical:mu(function(){return"~"},"canonical"),lowercase:mu(function(){return"null"},"lowercase"),uppercase:mu(function(){return"NULL"},"uppercase"),camelcase:mu(function(){return"Null"},"camelcase"),empty:mu(function(){return""},"empty")},defaultStyle:"lowercase"});function Xx(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function Jx(e){return"true"===e||"True"===e||"TRUE"===e}function Yx(e){return"[object Boolean]"===Object.prototype.toString.call(e)}mu(Xx,"resolveYamlBoolean"),mu(Jx,"constructYamlBoolean"),mu(Yx,"isBoolean");var Zx=new Rx("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xx,construct:Jx,predicate:Yx,represent:{lowercase:mu(function(e){return e?"true":"false"},"lowercase"),uppercase:mu(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:mu(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Kx(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Qx(e){return 48<=e&&e<=55}function eb(e){return 48<=e&&e<=57}function tb(e){if(null===e)return!1;var t,r=e.length,n=0,i=!1;if(!r)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n<r;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!Kx(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!Qx(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(!eb(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)}function rb(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)}function nb(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!Ax.isNegativeZero(e)}mu(Kx,"isHexCode"),mu(Qx,"isOctCode"),mu(eb,"isDecCode"),mu(tb,"resolveYamlInteger"),mu(rb,"constructYamlInteger"),mu(nb,"isInteger");var ib=new Rx("tag:yaml.org,2002:int",{kind:"scalar",resolve:tb,construct:rb,predicate:nb,represent:{binary:mu(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:mu(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:mu(function(e){return e.toString(10)},"decimal"),hexadecimal:mu(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ob=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ab(e){return null!==e&&!(!ob.test(e)||"_"===e[e.length-1])}function sb(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)}mu(ab,"resolveYamlFloat"),mu(sb,"constructYamlFloat");var lb=/^[-+]?[0-9]+e/;function cb(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ax.isNegativeZero(e))return"-0.0";return r=e.toString(10),lb.test(r)?r.replace("e",".e"):r}function ub(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Ax.isNegativeZero(e))}mu(cb,"representYamlFloat"),mu(ub,"isFloat");var hb=new Rx("tag:yaml.org,2002:float",{kind:"scalar",resolve:ab,construct:sb,predicate:ub,represent:cb,defaultStyle:"lowercase"}),db=Wx.extend({implicit:[Gx,Zx,ib,hb]}),pb=db,fb=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),gb=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 mb(e){return null!==e&&(null!==fb.exec(e)||null!==gb.exec(e))}function yb(e){var t,r,n,i,o,a,s,l,c=0,u=null;if(null===(t=fb.exec(e))&&(t=gb.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),l=new Date(Date.UTC(r,n,i,o,a,s,c)),u&&l.setTime(l.getTime()-u),l}function xb(e){return e.toISOString()}mu(mb,"resolveYamlTimestamp"),mu(yb,"constructYamlTimestamp"),mu(xb,"representYamlTimestamp");var bb=new Rx("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:mb,construct:yb,instanceOf:Date,represent:xb});function vb(e){return"<<"===e||null===e}mu(vb,"resolveYamlMerge");var Cb=new Rx("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vb}),wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function kb(e){if(null===e)return!1;var t,r,n=0,i=e.length,o=wb;for(r=0;r<i;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0}function Sb(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=wb,a=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function _b(e){var t,r,n="",i=0,o=e.length,a=wb;for(t=0;t<o;t++)t%3==0&&t&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+e[t];return 0===(r=o%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function Tb(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}mu(kb,"resolveYamlBinary"),mu(Sb,"constructYamlBinary"),mu(_b,"representYamlBinary"),mu(Tb,"isBinary");var Ab=new Rx("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kb,construct:Sb,predicate:Tb,represent:_b}),Pb=Object.prototype.hasOwnProperty,Eb=Object.prototype.toString;function Mb(e){if(null===e)return!0;var t,r,n,i,o,a=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],o=!1,"[object Object]"!==Eb.call(n))return!1;for(i in n)if(Pb.call(n,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(i))return!1;a.push(i)}return!0}function Ib(e){return null!==e?e:[]}mu(Mb,"resolveYamlOmap"),mu(Ib,"constructYamlOmap");var Bb=new Rx("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Mb,construct:Ib}),Lb=Object.prototype.toString;function jb(e){if(null===e)return!0;var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],"[object Object]"!==Lb.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;o[t]=[i[0],n[i[0]]]}return!0}function Nb(e){if(null===e)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}mu(jb,"resolveYamlPairs"),mu(Nb,"constructYamlPairs");var Db=new Rx("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jb,construct:Nb}),Ob=Object.prototype.hasOwnProperty;function Fb(e){if(null===e)return!0;var t,r=e;for(t in r)if(Ob.call(r,t)&&null!==r[t])return!1;return!0}function Rb(e){return null!==e?e:{}}mu(Fb,"resolveYamlSet"),mu(Rb,"constructYamlSet");var $b=new Rx("tag:yaml.org,2002:set",{kind:"mapping",resolve:Fb,construct:Rb}),zb=pb.extend({implicit:[bb,Cb],explicit:[Ab,Bb,Db,$b]}),Vb=Object.prototype.hasOwnProperty,Wb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Hb=/[\x85\u2028\u2029]/,qb=/[,\[\]\{\}]/,Ub=/^(?:!|!!|![a-z\-]+!)$/i,Gb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Xb(e){return Object.prototype.toString.call(e)}function Jb(e){return 10===e||13===e}function Yb(e){return 9===e||32===e}function Zb(e){return 9===e||32===e||10===e||13===e}function Kb(e){return 44===e||91===e||93===e||123===e||125===e}function Qb(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ev(e){return 120===e?2:117===e?4:85===e?8:0}function tv(e){return 48<=e&&e<=57?e-48:-1}function rv(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function nv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}mu(Xb,"_class"),mu(Jb,"is_EOL"),mu(Yb,"is_WHITE_SPACE"),mu(Zb,"is_WS_OR_EOL"),mu(Kb,"is_FLOW_INDICATOR"),mu(Qb,"fromHexCode"),mu(ev,"escapedHexLen"),mu(tv,"fromDecimalCode"),mu(rv,"simpleEscapeSequence"),mu(nv,"charFromCodepoint");var iv,ov=new Array(256),av=new Array(256);for(iv=0;iv<256;iv++)ov[iv]=rv(iv)?1:0,av[iv]=rv(iv);function sv(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||zb,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function lv(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=jx(r),new Mx(t,r)}function cv(e,t){throw lv(e,t)}function uv(e,t){e.onWarning&&e.onWarning.call(null,lv(e,t))}mu(sv,"State$1"),mu(lv,"generateError"),mu(cv,"throwError"),mu(uv,"throwWarning");var hv={YAML:mu(function(e,t,r){var n,i,o;null!==e.version&&cv(e,"duplication of %YAML directive"),1!==r.length&&cv(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&cv(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&cv(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&uv(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mu(function(e,t,r){var n,i;2!==r.length&&cv(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Ub.test(n)||cv(e,"ill-formed tag handle (first argument) of the TAG directive"),Vb.call(e.tagMap,n)&&cv(e,'there is a previously declared suffix for "'+n+'" tag handle'),Gb.test(i)||cv(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(o){cv(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i},"handleTagDirective")};function dv(e,t,r,n){var i,o,a,s;if(t<r){if(s=e.input.slice(t,r),n)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||cv(e,"expected valid JSON character");else Wb.test(s)&&cv(e,"the stream contains non-printable characters");e.result+=s}}function pv(e,t,r,n){var i,o,a,s;for(Ax.isObject(r)||cv(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(i=Object.keys(r)).length;a<s;a+=1)o=i[a],Vb.call(t,o)||(t[o]=r[o],n[o]=!0)}function fv(e,t,r,n,i,o,a,s,l){var c,u;if(Array.isArray(i))for(c=0,u=(i=Array.prototype.slice.call(i)).length;c<u;c+=1)Array.isArray(i[c])&&cv(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===Xb(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===Xb(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)pv(e,t,o[c],r);else pv(e,t,o,r);else e.json||Vb.call(r,i)||!Vb.call(t,i)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,cv(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}function gv(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):cv(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function mv(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;Yb(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!Jb(i))break;for(gv(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&uv(e,"deficient indentation"),n}function yv(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!Zb(t)))}function xv(e,t){1===t?e.result+=" ":t>1&&(e.result+=Ax.repeat("\n",t-1))}function bv(e,t,r){var n,i,o,a,s,l,c,u,h=e.kind,d=e.result;if(Zb(u=e.input.charCodeAt(e.position))||Kb(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(Zb(n=e.input.charCodeAt(e.position+1))||r&&Kb(n)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(Zb(n=e.input.charCodeAt(e.position+1))||r&&Kb(n))break}else if(35===u){if(Zb(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&yv(e)||r&&Kb(u))break;if(Jb(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,mv(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(dv(e,i,o,!1),xv(e,e.line-s),i=o=e.position,a=!1),Yb(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return dv(e,i,o,!1),!!e.result||(e.kind=h,e.result=d,!1)}function vv(e,t){var r,n,i;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(dv(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else Jb(r)?(dv(e,n,i,!0),xv(e,mv(e,!1,t)),n=i=e.position):e.position===e.lineStart&&yv(e)?cv(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);cv(e,"unexpected end of the stream within a single quoted scalar")}function Cv(e,t){var r,n,i,o,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return dv(e,r,e.position,!0),e.position++,!0;if(92===s){if(dv(e,r,e.position,!0),Jb(s=e.input.charCodeAt(++e.position)))mv(e,!1,t);else if(s<256&&ov[s])e.result+=av[s],e.position++;else if((a=ev(s))>0){for(i=a,o=0;i>0;i--)(a=Qb(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:cv(e,"expected hexadecimal character");e.result+=nv(o),e.position++}else cv(e,"unknown escape sequence");r=n=e.position}else Jb(s)?(dv(e,r,n,!0),xv(e,mv(e,!1,t)),r=n=e.position):e.position===e.lineStart&&yv(e)?cv(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}cv(e,"unexpected end of the stream within a double quoted scalar")}function wv(e,t){var r,n,i,o,a,s,l,c,u,h,d,p,f=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(p=e.input.charCodeAt(e.position)))a=93,c=!1,o=[];else{if(123!==p)return!1;a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),p=e.input.charCodeAt(++e.position);0!==p;){if(mv(e,!0,t),(p=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=o,!0;f?44===p&&cv(e,"expected the node content, but found ','"):cv(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Zb(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,mv(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,Ev(e,t,1,!1,!0),h=e.tag,u=e.result,mv(e,!0,t),p=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),mv(e,!0,t),Ev(e,t,1,!1,!0),d=e.result),c?fv(e,o,y,h,u,d,r,n,i):s?o.push(fv(e,null,y,h,u,d,r,n,i)):o.push(u),mv(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(f=!0,p=e.input.charCodeAt(++e.position)):f=!1}cv(e,"unexpected end of the stream within a flow collection")}function kv(e,t){var r,n,i,o,a=1,s=!1,l=!1,c=t,u=0,h=!1;if(124===(o=e.input.charCodeAt(e.position)))n=!1;else{if(62!==o)return!1;n=!0}for(e.kind="scalar",e.result="";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)1===a?a=43===o?3:2:cv(e,"repeat of a chomping mode identifier");else{if(!((i=tv(o))>=0))break;0===i?cv(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?cv(e,"repeat of an indentation width identifier"):(c=t+i-1,l=!0)}if(Yb(o)){do{o=e.input.charCodeAt(++e.position)}while(Yb(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!Jb(o)&&0!==o)}for(;0!==o;){for(gv(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!l||e.lineIndent<c)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>c&&(c=e.lineIndent),Jb(o))u++;else{if(e.lineIndent<c){3===a?e.result+=Ax.repeat("\n",s?1+u:u):1===a&&s&&(e.result+="\n");break}for(n?Yb(o)?(h=!0,e.result+=Ax.repeat("\n",s?1+u:u)):h?(h=!1,e.result+=Ax.repeat("\n",u+1)):0===u?s&&(e.result+=" "):e.result+=Ax.repeat("\n",u):e.result+=Ax.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=e.position;!Jb(o)&&0!==o;)o=e.input.charCodeAt(++e.position);dv(e,r,e.position,!1)}}return!0}function Sv(e,t){var r,n,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,cv(e,"tab characters must not be used in indentation")),45===n)&&Zb(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,mv(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,Ev(e,t,3,!1,!0),a.push(e.result),mv(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)cv(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=o,e.kind="sequence",e.result=a,!0)}function _v(e,t,r){var n,i,o,a,s,l,c,u=e.tag,h=e.anchor,d={},p=Object.create(null),f=null,g=null,m=null,y=!1,x=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,cv(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!Zb(n)){if(a=e.line,s=e.lineStart,l=e.position,!Ev(e,r,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);Yb(c);)c=e.input.charCodeAt(++e.position);if(58===c)Zb(c=e.input.charCodeAt(++e.position))||cv(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(fv(e,d,p,f,g,null,a,s,l),f=g=m=null),x=!0,y=!1,i=!1,f=e.tag,g=e.result;else{if(!x)return e.tag=u,e.anchor=h,!0;cv(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return e.tag=u,e.anchor=h,!0;cv(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(fv(e,d,p,f,g,null,a,s,l),f=g=m=null),x=!0,y=!0,i=!0):y?(y=!1,i=!0):cv(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,s=e.lineStart,l=e.position),Ev(e,t,4,!0,i)&&(y?g=e.result:m=e.result),y||(fv(e,d,p,f,g,m,a,s,l),f=g=m=null),mv(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)cv(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&fv(e,d,p,f,g,null,a,s,l),x&&(e.tag=u,e.anchor=h,e.kind="mapping",e.result=d),x}function Tv(e){var t,r,n,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&cv(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(a=!0,r="!!",i=e.input.charCodeAt(++e.position)):r="!",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):cv(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Zb(i);)33===i&&(a?cv(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),Ub.test(r)||cv(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),qb.test(n)&&cv(e,"tag suffix cannot contain flow indicator characters")}n&&!Gb.test(n)&&cv(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(s){cv(e,"tag name is malformed: "+n)}return o?e.tag=n:Vb.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:cv(e,'undeclared tag handle "'+r+'"'),!0}function Av(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&cv(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!Zb(r)&&!Kb(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&cv(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Pv(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Zb(n)&&!Kb(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&cv(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Vb.call(e.anchorMap,r)||cv(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],mv(e,!0,-1),!0}function Ev(e,t,r,n,i){var o,a,s,l,c,u,h,d,p,f=1,g=!1,m=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=4===r||3===r,n&&mv(e,!0,-1)&&(g=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),1===f)for(;Tv(e)||Av(e);)mv(e,!0,-1)?(g=!0,s=o,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):s=!1;if(s&&(s=g||i),1!==f&&4!==r||(d=1===r||2===r?t:t+1,p=e.position-e.lineStart,1===f?s&&(Sv(e,p)||_v(e,p,d))||wv(e,d)?m=!0:(a&&kv(e,d)||vv(e,d)||Cv(e,d)?m=!0:Pv(e)?(m=!0,null===e.tag&&null===e.anchor||cv(e,"alias node should not have any properties")):bv(e,d,1===r)&&(m=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(m=s&&Sv(e,p))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&cv(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((h=e.implicitTypes[l]).resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(Vb.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,l=0,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,u[l].tag.length)===u[l].tag){h=u[l];break}h||cv(e,"unknown tag !<"+e.tag+">"),null!==e.result&&h.kind!==e.kind&&cv(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):cv(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function Mv(e){var t,r,n,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(mv(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!Zb(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&cv(e,"directive name must not be less than one character in length");0!==i;){for(;Yb(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!Jb(i));break}if(Jb(i))break;for(t=e.position;0!==i&&!Zb(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&gv(e),Vb.call(hv,r)?hv[r](e,r,n):uv(e,'unknown document directive "'+r+'"')}mv(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,mv(e,!0,-1)):a&&cv(e,"directives end mark is expected"),Ev(e,e.lineIndent-1,4,!1,!0),mv(e,!0,-1),e.checkLineBreaks&&Hb.test(e.input.slice(o,e.position))&&uv(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&yv(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,mv(e,!0,-1)):e.position<e.length-1&&cv(e,"end of the stream or a document separator is expected")}function Iv(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new sv(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,cv(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;)Mv(r);return r.documents}function Bv(e,t){var r=Iv(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Mx("expected a single document in the stream, but found more")}}mu(dv,"captureSegment"),mu(pv,"mergeMappings"),mu(fv,"storeMappingPair"),mu(gv,"readLineBreak"),mu(mv,"skipSeparationSpace"),mu(yv,"testDocumentSeparator"),mu(xv,"writeFoldedLines"),mu(bv,"readPlainScalar"),mu(vv,"readSingleQuotedScalar"),mu(Cv,"readDoubleQuotedScalar"),mu(wv,"readFlowCollection"),mu(kv,"readBlockScalar"),mu(Sv,"readBlockSequence"),mu(_v,"readBlockMapping"),mu(Tv,"readTagProperty"),mu(Av,"readAnchorProperty"),mu(Pv,"readAlias"),mu(Ev,"composeNode"),mu(Mv,"readDocument"),mu(Iv,"loadDocuments"),mu(function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=Iv(e,r);if("function"!=typeof t)return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])},"loadAll$1"),mu(Bv,"load$1");var Lv={load:Bv},jv=Object.prototype.toString,Nv=Object.prototype.hasOwnProperty,Dv=65279,Ov={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"},Fv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $v(e,t){var r,n,i,o,a,s,l;if(null===t)return{};for(r={},i=0,o=(n=Object.keys(t)).length;i<o;i+=1)a=n[i],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&Nv.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}function zv(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else{if(!(e<=4294967295))throw new Mx("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+Ax.repeat("0",n-t.length)+t}mu($v,"compileStyleMap"),mu(zv,"encodeHex");function Vv(e){this.schema=e.schema||zb,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ax.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=$v(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wv(e,t){for(var r,n=Ax.repeat(" ",t),i=0,o=-1,a="",s=e.length;i<s;)-1===(o=e.indexOf("\n",i))?(r=e.slice(i),i=s):(r=e.slice(i,o+1),i=o+1),r.length&&"\n"!==r&&(a+=n),a+=r;return a}function Hv(e,t){return"\n"+Ax.repeat(" ",e.indent*t)}function qv(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function Uv(e){return 32===e||9===e}function Gv(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Dv||65536<=e&&e<=1114111}function Xv(e){return Gv(e)&&e!==Dv&&13!==e&&10!==e}function Jv(e,t,r){var n=Xv(e),i=n&&!Uv(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||Xv(t)&&!Uv(t)&&35===e||58===t&&i}function Yv(e){return Gv(e)&&e!==Dv&&!Uv(e)&&45!==e&&63!==e&&58!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&35!==e&&38!==e&&42!==e&&33!==e&&124!==e&&61!==e&&62!==e&&39!==e&&34!==e&&37!==e&&64!==e&&96!==e}function Zv(e){return!Uv(e)&&58!==e}function Kv(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Qv(e){return/^\n* /.test(e)}mu(Vv,"State"),mu(Wv,"indentString"),mu(Hv,"generateNextLine"),mu(qv,"testImplicitResolving"),mu(Uv,"isWhitespace"),mu(Gv,"isPrintable"),mu(Xv,"isNsCharOrWhitespace"),mu(Jv,"isPlainSafe"),mu(Yv,"isPlainSafeFirst"),mu(Zv,"isPlainSafeLast"),mu(Kv,"codePointAt"),mu(Qv,"needIndentIndicator");function eC(e,t,r,n,i,o,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==n,f=-1,g=Yv(Kv(e,0))&&Zv(Kv(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(!Gv(c=Kv(e,l)))return 5;g=g&&Jv(c,u,s),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(10===(c=Kv(e,l)))h=!0,p&&(d=d||l-f-1>n&&" "!==e[f+1],f=l);else if(!Gv(c))return 5;g=g&&Jv(c,u,s),u=c}d=d||p&&l-f-1>n&&" "!==e[f+1]}return h||d?r>9&&Qv(e)?5:a?2===o?5:2:d?4:3:!g||a||i(e)?2===o?5:2:1}function tC(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Fv.indexOf(t)||Rv.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=n||e.flowLevel>-1&&r>=e.flowLevel;function l(t){return qv(e,t)}switch(mu(l,"testAmbiguity"),eC(t,s,e.indent,a,l,e.quotingType,e.forceQuotes&&!n,i)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+rC(t,e.indent)+nC(Wv(t,o));case 4:return">"+rC(t,e.indent)+nC(Wv(iC(t,a),o));case 5:return'"'+aC(t)+'"';default:throw new Mx("impossible error: invalid scalar style")}}()}function rC(e,t){var r=Qv(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function nC(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function iC(e,t){for(var r,n,i,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=e.indexOf("\n"))?r:e.length,o.lastIndex=r,oC(e.slice(0,r),t)),s="\n"===e[0]||" "===e[0];i=o.exec(e);){var l=i[1],c=i[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+oC(c,t),s=n}return a}function oC(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,o=0,a=0,s=0,l="";r=i.exec(e);)(s=r.index)-o>t&&(n=a>o?a:s,l+="\n"+e.slice(o,n),o=n+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function aC(e){for(var t,r="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=Kv(e,i),!(t=Ov[n])&&Gv(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||zv(n);return r}function sC(e,t,r){var n,i,o,a="",s=e.tag;for(n=0,i=r.length;n<i;n+=1)o=r[n],e.replacer&&(o=e.replacer.call(r,String(n),o)),(dC(e,t,o,!1,!1)||void 0===o&&dC(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}function lC(e,t,r,n){var i,o,a,s="",l=e.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(dC(e,t+1,a,!0,!0,!1,!0)||void 0===a&&dC(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Hv(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function cC(e,t,r){var n,i,o,a,s,l="",c=e.tag,u=Object.keys(r);for(n=0,i=u.length;n<i;n+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),a=r[o=u[n]],e.replacer&&(a=e.replacer.call(r,o,a)),dC(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),dC(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}function uC(e,t,r,n){var i,o,a,s,l,c,u="",h=e.tag,d=Object.keys(r);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new Mx("sortKeys must be a boolean or a function");for(i=0,o=d.length;i<o;i+=1)c="",n&&""===u||(c+=Hv(e,t)),s=r[a=d[i]],e.replacer&&(s=e.replacer.call(r,a,s)),dC(e,t+1,a,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,l&&(c+=Hv(e,t)),dC(e,t+1,s,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=h,e.dump=u||"{}"}function hC(e,t,r){var n,i,o,a,s,l;for(o=0,a=(i=r?e.explicitTypes:e.implicitTypes).length;o<a;o+=1)if(((s=i[o]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===jv.call(s.represent))n=s.represent(t,l);else{if(!Nv.call(s.represent,l))throw new Mx("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');n=s.represent[l](t,l)}e.dump=n}return!0}return!1}function dC(e,t,r,n,i,o,a){e.tag=null,e.dump=r,hC(e,r,!1)||hC(e,r,!0);var s,l=jv.call(e.dump),c=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||h||2!==e.indent&&t>0)&&(i=!1),h&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(d&&h&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)n&&0!==Object.keys(e.dump).length?(uC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(cC(e,t,e.dump),h&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l)n&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?lC(e,t-1,e.dump,i):lC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(sC(e,t,e.dump),h&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(e.skipInvalid)return!1;throw new Mx("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&tC(e,e.dump,t,o,c)}null!==e.tag&&"?"!==e.tag&&(s=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),s="!"===e.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",e.dump=s+" "+e.dump)}return!0}function pC(e,t){var r,n,i=[],o=[];for(fC(e,i,o),r=0,n=o.length;r<n;r+=1)t.duplicates.push(i[o[r]]);t.usedDuplicates=new Array(n)}function fC(e,t,r){var n,i,o;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)fC(e[i],t,r);else for(i=0,o=(n=Object.keys(e)).length;i<o;i+=1)fC(e[n[i]],t,r)}mu(eC,"chooseScalarStyle"),mu(tC,"writeScalar"),mu(rC,"blockHeader"),mu(nC,"dropEndingNewline"),mu(iC,"foldString"),mu(oC,"foldLine"),mu(aC,"escapeString"),mu(sC,"writeFlowSequence"),mu(lC,"writeBlockSequence"),mu(cC,"writeFlowMapping"),mu(uC,"writeBlockMapping"),mu(hC,"detectType"),mu(dC,"writeNode"),mu(pC,"getDuplicateReferences"),mu(fC,"inspectNode"),mu(function(e,t){var r=new Vv(t=t||{});r.noRefs||pC(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),dC(r,0,n,!0,!0)?r.dump+"\n":""},"dump$1"),mu(function(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}},"renamed");var gC=db,mC=Lv.load,yC={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},xC={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function bC(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=vC(e),t=vC(t);const[r,n]=[e.x,e.y],[i,o]=[t.x,t.y],a=i-r,s=o-n;return{angle:Math.atan(s/a),deltaX:a,deltaY:s}}mu(bC,"calculateDeltaAndAngle");var vC=mu(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),CC=mu(e=>({x:mu(function(t,r,n){let i=0;const o=vC(n[0]).x<vC(n[n.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(yC,e.arrowTypeStart)){const{angle:t,deltaX:r}=bC(n[0],n[1]);i=yC[e.arrowTypeStart]*Math.cos(t)*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(yC,e.arrowTypeEnd)){const{angle:t,deltaX:r}=bC(n[n.length-1],n[n.length-2]);i=yC[e.arrowTypeEnd]*Math.cos(t)*(r>=0?1:-1)}const a=Math.abs(vC(t).x-vC(n[n.length-1]).x),s=Math.abs(vC(t).y-vC(n[n.length-1]).y),l=Math.abs(vC(t).x-vC(n[0]).x),c=Math.abs(vC(t).y-vC(n[0]).y),u=yC[e.arrowTypeStart],h=yC[e.arrowTypeEnd];if(a<h&&a>0&&s<h){let e=h+1-a;e*="right"===o?-1:1,i-=e}if(l<u&&l>0&&c<u){let e=u+1-l;e*="right"===o?-1:1,i+=e}return vC(t).x+i},"x"),y:mu(function(t,r,n){let i=0;const o=vC(n[0]).y<vC(n[n.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(yC,e.arrowTypeStart)){const{angle:t,deltaY:r}=bC(n[0],n[1]);i=yC[e.arrowTypeStart]*Math.abs(Math.sin(t))*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(yC,e.arrowTypeEnd)){const{angle:t,deltaY:r}=bC(n[n.length-1],n[n.length-2]);i=yC[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(r>=0?1:-1)}const a=Math.abs(vC(t).y-vC(n[n.length-1]).y),s=Math.abs(vC(t).x-vC(n[n.length-1]).x),l=Math.abs(vC(t).y-vC(n[0]).y),c=Math.abs(vC(t).x-vC(n[0]).x),u=yC[e.arrowTypeStart],h=yC[e.arrowTypeEnd];if(a<h&&a>0&&s<h){let e=h+1-a;e*="up"===o?-1:1,i-=e}if(l<u&&l>0&&c<u){let e=u+1-l;e*="up"===o?-1:1,i+=e}return vC(t).y+i},"y")}),"getLineFunctionsWithOffset"),wC=mu(({flowchart:e})=>{var t,r;const n=(null==(t=null==e?void 0:e.subGraphTitleMargin)?void 0:t.top)??0,i=(null==(r=null==e?void 0:e.subGraphTitleMargin)?void 0:r.bottom)??0;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:n+i}},"getSubGraphTitleMargins"),kC=mu(e=>{const{handDrawnSeed:t}=$p();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),SC=mu(e=>{const t=_C([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),_C=mu(e=>{const t=new Map;return e.forEach(e=>{const[r,n]=e.split(":");t.set(r.trim(),null==n?void 0:n.trim())}),t},"styles2Map"),TC=mu(e=>"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e,"isLabelStyle"),AC=mu(e=>{const{stylesArray:t}=SC(e),r=[],n=[],i=[],o=[];return t.forEach(e=>{const t=e[0];TC(t)?r.push(e.join(":")+" !important"):(n.push(e.join(":")+" !important"),t.includes("stroke")&&i.push(e.join(":")+" !important"),"fill"===t&&o.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:o}},"styles2String"),PC=mu((e,t)=>{var r;const{themeVariables:n,handDrawnSeed:i}=$p(),{nodeBorder:o,mainBkg:a}=n,{stylesMap:s}=SC(e);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:(null==(r=s.get("stroke-width"))?void 0:r.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:EC(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),EC=mu(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(1===t.length){const e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},"getStrokeDashArray"),MC={},IC={};Object.defineProperty(IC,"__esModule",{value:!0}),IC.BLANK_URL=IC.relativeFirstCharacters=IC.whitespaceEscapeCharsRegex=IC.urlSchemeRegex=IC.ctrlCharactersRegex=IC.htmlCtrlEntityRegex=IC.htmlEntitiesRegex=IC.invalidProtocolRegex=void 0,IC.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,IC.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,IC.htmlCtrlEntityRegex=/&(newline|tab);/gi,IC.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,IC.urlSchemeRegex=/^.+(:|:)/gim,IC.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,IC.relativeFirstCharacters=[".","/"],IC.BLANK_URL="about:blank",Object.defineProperty(MC,"__esModule",{value:!0});var BC=MC.sanitizeUrl=function(e){if(!e)return LC.BLANK_URL;var t,r=NC(e.trim());do{t=(r=NC(r=jC(r).replace(LC.htmlCtrlEntityRegex,"").replace(LC.ctrlCharactersRegex,"").replace(LC.whitespaceEscapeCharsRegex,"").trim())).match(LC.ctrlCharactersRegex)||r.match(LC.htmlEntitiesRegex)||r.match(LC.htmlCtrlEntityRegex)||r.match(LC.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var n=r;if(!n)return LC.BLANK_URL;if(function(e){return LC.relativeFirstCharacters.indexOf(e[0])>-1}(n))return n;var i=n.trimStart(),o=i.match(LC.urlSchemeRegex);if(!o)return n;var a=o[0].toLowerCase().trim();if(LC.invalidProtocolRegex.test(a))return LC.BLANK_URL;var s=i.replace(/\\/g,"/");if("mailto:"===a||a.includes("://"))return s;if("http:"===a||"https:"===a){if(!function(e){return URL.canParse(e)}(s))return LC.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s},LC=IC;function jC(e){return e.replace(LC.ctrlCharactersRegex,"").replace(LC.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function NC(e){try{return decodeURIComponent(e)}catch(t){return e}}var DC="object"==typeof global&&global&&global.Object===Object&&global,OC="object"==typeof self&&self&&self.Object===Object&&self,FC=DC||OC||Function("return this")(),RC=FC.Symbol,$C=Object.prototype,zC=$C.hasOwnProperty,VC=$C.toString,WC=RC?RC.toStringTag:void 0;var HC=Object.prototype.toString;var qC=RC?RC.toStringTag:void 0;function UC(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":qC&&qC in Object(e)?function(e){var t=zC.call(e,WC),r=e[WC];try{e[WC]=void 0;var n=!0}catch(o){}var i=VC.call(e);return n&&(t?e[WC]=r:delete e[WC]),i}(e):function(e){return HC.call(e)}(e)}function GC(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function XC(e){if(!GC(e))return!1;var t=UC(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var JC,YC=FC["__core-js_shared__"],ZC=(JC=/[^.]+$/.exec(YC&&YC.keys&&YC.keys.IE_PROTO||""))?"Symbol(src)_1."+JC:"";var KC=Function.prototype.toString;function QC(e){if(null!=e){try{return KC.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var ew=/^\[object .+?Constructor\]$/,tw=Function.prototype,rw=Object.prototype,nw=tw.toString,iw=rw.hasOwnProperty,ow=RegExp("^"+nw.call(iw).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aw(e){return!(!GC(e)||(t=e,ZC&&ZC in t))&&(XC(e)?ow:ew).test(QC(e));var t}function sw(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return aw(r)?r:void 0}var lw=sw(Object,"create");var cw=Object.prototype.hasOwnProperty;var uw=Object.prototype.hasOwnProperty;function hw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dw(e,t){return e===t||e!=e&&t!=t}function pw(e,t){for(var r=e.length;r--;)if(dw(e[r][0],t))return r;return-1}hw.prototype.clear=function(){this.__data__=lw?lw(null):{},this.size=0},hw.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},hw.prototype.get=function(e){var t=this.__data__;if(lw){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return cw.call(t,e)?t[e]:void 0},hw.prototype.has=function(e){var t=this.__data__;return lw?void 0!==t[e]:uw.call(t,e)},hw.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=lw&&void 0===t?"__lodash_hash_undefined__":t,this};var fw=Array.prototype.splice;function gw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gw.prototype.clear=function(){this.__data__=[],this.size=0},gw.prototype.delete=function(e){var t=this.__data__,r=pw(t,e);return!(r<0)&&(r==t.length-1?t.pop():fw.call(t,r,1),--this.size,!0)},gw.prototype.get=function(e){var t=this.__data__,r=pw(t,e);return r<0?void 0:t[r][1]},gw.prototype.has=function(e){return pw(this.__data__,e)>-1},gw.prototype.set=function(e,t){var r=this.__data__,n=pw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var mw=sw(FC,"Map");function yw(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function xw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xw.prototype.clear=function(){this.size=0,this.__data__={hash:new hw,map:new(mw||gw),string:new hw}},xw.prototype.delete=function(e){var t=yw(this,e).delete(e);return this.size-=t?1:0,t},xw.prototype.get=function(e){return yw(this,e).get(e)},xw.prototype.has=function(e){return yw(this,e).has(e)},xw.prototype.set=function(e,t){var r=yw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function bw(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(bw.Cache||xw),r}bw.Cache=xw;function vw(e){var t=this.__data__=new gw(e);this.size=t.size}vw.prototype.clear=function(){this.__data__=new gw,this.size=0},vw.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},vw.prototype.get=function(e){return this.__data__.get(e)},vw.prototype.has=function(e){return this.__data__.has(e)},vw.prototype.set=function(e,t){var r=this.__data__;if(r instanceof gw){var n=r.__data__;if(!mw||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xw(n)}return r.set(e,t),this.size=r.size,this};var Cw=function(){try{var e=sw(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();function ww(e,t,r){"__proto__"==t&&Cw?Cw(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function kw(e,t,r){(void 0!==r&&!dw(e[t],r)||void 0===r&&!(t in e))&&ww(e,t,r)}var Sw=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[++n];if(!1===t(i[s],s,i))break}return e},_w="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tw=_w&&"object"==typeof module&&module&&!module.nodeType&&module,Aw=Tw&&Tw.exports===_w?FC.Buffer:void 0,Pw=Aw?Aw.allocUnsafe:void 0;function Ew(e,t){if(t)return e.slice();var r=e.length,n=Pw?Pw(r):new e.constructor(r);return e.copy(n),n}var Mw=FC.Uint8Array;function Iw(e){var t=new e.constructor(e.byteLength);return new Mw(t).set(new Mw(e)),t}function Bw(e,t){var r=t?Iw(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Lw(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var jw=Object.create,Nw=function(){function e(){}return function(t){if(!GC(t))return{};if(jw)return jw(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Dw(e,t){return function(r){return e(t(r))}}var Ow=Dw(Object.getPrototypeOf,Object),Fw=Object.prototype;function Rw(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fw)}function $w(e){return"function"!=typeof e.constructor||Rw(e)?{}:Nw(Ow(e))}function zw(e){return null!=e&&"object"==typeof e}function Vw(e){return zw(e)&&"[object Arguments]"==UC(e)}var Ww=Object.prototype,Hw=Ww.hasOwnProperty,qw=Ww.propertyIsEnumerable,Uw=Vw(function(){return arguments}())?Vw:function(e){return zw(e)&&Hw.call(e,"callee")&&!qw.call(e,"callee")},Gw=Array.isArray;function Xw(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Jw(e){return null!=e&&Xw(e.length)&&!XC(e)}var Yw="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zw=Yw&&"object"==typeof module&&module&&!module.nodeType&&module,Kw=Zw&&Zw.exports===Yw?FC.Buffer:void 0,Qw=(Kw?Kw.isBuffer:void 0)||function(){return!1},ek=Function.prototype,tk=Object.prototype,rk=ek.toString,nk=tk.hasOwnProperty,ik=rk.call(Object);var ok={};function ak(e){return function(t){return e(t)}}ok["[object Float32Array]"]=ok["[object Float64Array]"]=ok["[object Int8Array]"]=ok["[object Int16Array]"]=ok["[object Int32Array]"]=ok["[object Uint8Array]"]=ok["[object Uint8ClampedArray]"]=ok["[object Uint16Array]"]=ok["[object Uint32Array]"]=!0,ok["[object Arguments]"]=ok["[object Array]"]=ok["[object ArrayBuffer]"]=ok["[object Boolean]"]=ok["[object DataView]"]=ok["[object Date]"]=ok["[object Error]"]=ok["[object Function]"]=ok["[object Map]"]=ok["[object Number]"]=ok["[object Object]"]=ok["[object RegExp]"]=ok["[object Set]"]=ok["[object String]"]=ok["[object WeakMap]"]=!1;var sk="object"==typeof exports&&exports&&!exports.nodeType&&exports,lk=sk&&"object"==typeof module&&module&&!module.nodeType&&module,ck=lk&&lk.exports===sk&&DC.process,uk=function(){try{var e=lk&&lk.require&&lk.require("util").types;return e||ck&&ck.binding&&ck.binding("util")}catch(t){}}(),hk=uk&&uk.isTypedArray,dk=hk?ak(hk):function(e){return zw(e)&&Xw(e.length)&&!!ok[UC(e)]};function pk(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fk=Object.prototype.hasOwnProperty;function gk(e,t,r){var n=e[t];fk.call(e,t)&&dw(n,r)&&(void 0!==r||t in e)||ww(e,t,r)}function mk(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;void 0===l&&(l=e[s]),i?ww(r,s,l):gk(r,s,l)}return r}var yk=/^(?:0|[1-9]\d*)$/;function xk(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&yk.test(e))&&e>-1&&e%1==0&&e<t}var bk=Object.prototype.hasOwnProperty;function vk(e,t){var r=Gw(e),n=!r&&Uw(e),i=!r&&!n&&Qw(e),o=!r&&!n&&!i&&dk(e),a=r||n||i||o,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],l=s.length;for(var c in e)!t&&!bk.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||xk(c,l))||s.push(c);return s}var Ck=Object.prototype.hasOwnProperty;function wk(e){if(!GC(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Rw(e),r=[];for(var n in e)("constructor"!=n||!t&&Ck.call(e,n))&&r.push(n);return r}function kk(e){return Jw(e)?vk(e,!0):wk(e)}function Sk(e,t,r,n,i,o,a){var s=pk(e,r),l=pk(t,r),c=a.get(l);if(c)kw(e,r,c);else{var u,h=o?o(s,l,r+"",e,t,a):void 0,d=void 0===h;if(d){var p=Gw(l),f=!p&&Qw(l),g=!p&&!f&&dk(l);h=l,p||f||g?Gw(s)?h=s:zw(u=s)&&Jw(u)?h=Lw(s):f?(d=!1,h=Ew(l,!0)):g?(d=!1,h=Bw(l,!0)):h=[]:function(e){if(!zw(e)||"[object Object]"!=UC(e))return!1;var t=Ow(e);if(null===t)return!0;var r=nk.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&rk.call(r)==ik}(l)||Uw(l)?(h=s,Uw(s)?h=function(e){return mk(e,kk(e))}(s):GC(s)&&!XC(s)||(h=$w(l))):d=!1}d&&(a.set(l,h),i(h,l,n,o,a),a.delete(l)),kw(e,r,h)}}function _k(e,t,r,n,i){e!==t&&Sw(t,function(o,a){if(i||(i=new vw),GC(o))Sk(e,t,a,r,_k,n,i);else{var s=n?n(pk(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),kw(e,a,s)}},kk)}function Tk(e){return e}var Ak=Math.max;var Pk=Cw?function(e,t){return Cw(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Tk,Ek=Date.now;var Mk,Ik,Bk,Lk=(Mk=Pk,Ik=0,Bk=0,function(){var e=Ek(),t=16-(e-Bk);if(Bk=e,t>0){if(++Ik>=800)return arguments[0]}else Ik=0;return Mk.apply(void 0,arguments)});function jk(e,t){return Lk(function(e,t,r){return t=Ak(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Ak(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,t,Tk),e+"")}var Nk,Dk=(Nk=function(e,t,r){_k(e,t,r)},jk(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Nk.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!GC(r))return!1;var n=typeof t;return!!("number"==n?Jw(r)&&xk(t,r.length):"string"==n&&t in r)&&dw(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&Nk(e,a,r,i)}return e})),Ok={curveBasis:Oy,curveBasisClosed:function(e){return new Fy(e)},curveBasisOpen:function(e){return new Ry(e)},curveBumpX:By,curveBumpY:Ly,curveBundle:zy,curveCardinalClosed:Uy,curveCardinalOpen:Xy,curveCardinal:Hy,curveCatmullRomClosed:Qy,curveCatmullRomOpen:tx,curveCatmullRom:Zy,curveLinear:Ay,curveLinearClosed:function(e){return new rx(e)},curveMonotoneX:ux,curveMonotoneY:hx,curveNatural:fx,curveStep:mx,curveStepAfter:xx,curveStepBefore:yx},Fk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Rk=mu(function(e,t){const r=$k(e,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const e=r.map(e=>e.args);Sd(e),n=od(n,[...e])}else n=r.args;if(!n)return;let i=ed(e,t);const o="config";return void 0!==n[o]&&("flowchart-v2"===i&&(i="flowchart"),n[i]=n[o],delete n[o]),n},"detectInit"),$k=mu(function(e,t=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${Fk.source})(?=[}][%]{2}).*\n`,"ig");let o;e=e.trim().replace(i,"").replace(/'/gm,'"'),bu.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:${e}`);const a=[];for(;null!==(o=Yh.exec(e));)if(o.index===Yh.lastIndex&&Yh.lastIndex++,o&&!t||t&&(null==(r=o[1])?void 0:r.match(t))||t&&(null==(n=o[2])?void 0:n.match(t))){const e=o[1]?o[1]:o[2],t=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:e,args:t})}return 0===a.length?{type:e,args:null}:1===a.length?a[0]:a}catch(i){return bu.error(`ERROR: ${i.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),zk=mu(function(e){return e.replace(Yh,"")},"removeDirectives"),Vk=mu(function(e,t){for(const[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");function Wk(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Ok[r]??t}function Hk(e,t){const r=e.trim();if(r)return"loose"!==t.securityLevel?BC(r):r}mu(Wk,"interpolateToCurve"),mu(Hk,"formatUrl");var qk=mu((e,...t)=>{const r=e.split("."),n=r.length-1,i=r[n];let o=window;for(let a=0;a<n;a++)if(o=o[r[a]],!o)return void bu.error(`Function name: ${e} not found in window`);o[i](...t)},"runFunc");function Uk(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function Gk(e){let t,r=0;e.forEach(e=>{r+=Uk(e,t),t=e});return Yk(e,r/2)}function Xk(e){return 1===e.length?e[0]:Gk(e)}mu(Uk,"distance"),mu(Gk,"traverseEdge"),mu(Xk,"calcLabelPosition");var Jk=mu((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Yk=mu((e,t)=>{let r,n=t;for(const i of e){if(r){const e=Uk(i,r);if(0===e)return r;if(e<n)n-=e;else{const t=n/e;if(t<=0)return r;if(t>=1)return{x:i.x,y:i.y};if(t>0&&t<1)return{x:Jk((1-t)*r.x+t*i.x,5),y:Jk((1-t)*r.y+t*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Zk=mu((e,t,r)=>{bu.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Yk(t,25),i=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),a={x:0,y:0};return a.x=Math.sin(o)*i+(t[0].x+n.x)/2,a.y=-Math.cos(o)*i+(t[0].y+n.y)/2,a},"calcCardinalityPosition");function Kk(e,t,r){const n=structuredClone(r);bu.info("our points",n),"start_left"!==t&&"start_right"!==t&&n.reverse();const i=Yk(n,25+e),o=10+.5*e,a=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return"start_left"===t?(s.x=Math.sin(a+Math.PI)*o+(n[0].x+i.x)/2,s.y=-Math.cos(a+Math.PI)*o+(n[0].y+i.y)/2):"end_right"===t?(s.x=Math.sin(a-Math.PI)*o+(n[0].x+i.x)/2-5,s.y=-Math.cos(a-Math.PI)*o+(n[0].y+i.y)/2-5):"end_left"===t?(s.x=Math.sin(a)*o+(n[0].x+i.x)/2-5,s.y=-Math.cos(a)*o+(n[0].y+i.y)/2-5):(s.x=Math.sin(a)*o+(n[0].x+i.x)/2,s.y=-Math.cos(a)*o+(n[0].y+i.y)/2),s}function Qk(e){let t="",r="";for(const n of e)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}mu(Kk,"calcTerminalLabelPosition"),mu(Qk,"getStylesFromArray");var eS=0,tS=mu(()=>(eS++,"id-"+Math.random().toString(36).substr(2,12)+"-"+eS),"generateId");function rS(e){let t="";const r="0123456789abcdef";for(let n=0;n<e;n++)t+=r.charAt(Math.floor(16*Math.random()));return t}mu(rS,"makeRandomHex");var nS=mu(e=>rS(e.length),"random"),iS=mu(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"),oS=mu(function(e,t){const r=t.text.replace(yp.lineBreakRegex," "),[,n]=mS(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),void 0!==t.class&&i.attr("class",t.class);const o=i.append("tspan");return o.attr("x",t.x+2*t.textMargin),o.attr("fill",t.fill),o.text(r),i},"drawSimpleText"),aS=bw((e,t,r)=>{if(!e)return e;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),yp.lineBreakRegex.test(e))return e;const n=e.split(" ").filter(Boolean),i=[];let o="";return n.forEach((e,a)=>{const s=cS(`${e} `,r),l=cS(o,r);if(s>t){const{hyphenatedStrings:n,remainingWord:a}=sS(e,t,"-",r);i.push(o,...n),o=a}else l+s>=t?(i.push(o),o=e):o=[o,e].filter(Boolean).join(" ");a+1===n.length&&i.push(o)}),i.filter(e=>""!==e).join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sS=bw((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...e],o=[];let a="";return i.forEach((e,s)=>{const l=`${a}${e}`;if(cS(l,n)>=t){const e=s+1,t=i.length===e,n=`${l}${r}`;o.push(t?l:n),a=""}else a=l}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function lS(e,t){return hS(e,t).height}function cS(e,t){return hS(e,t).width}mu(lS,"calculateTextHeight"),mu(cS,"calculateTextWidth");var uS,hS=bw((e,t)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,o]=mS(r),a=["sans-serif",n],s=e.split(yp.lineBreakRegex),l=[],c=fg("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const h of a){let e=0;const t={width:0,height:0,lineHeight:0};for(const r of s){const n=iS();n.text=r||"";const a=oS(u,n).style("font-size",o).style("font-weight",i).style("font-family",h),s=(a._groups||a)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");t.width=Math.round(Math.max(t.width,s.width)),e=Math.round(s.height),t.height+=e,t.lineHeight=Math.round(Math.max(t.lineHeight,e))}l.push(t)}u.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]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),dS=(mu(p=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),p),pS=mu(function(e){return uS=uS||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),uS.innerHTML=e,unescape(uS.textContent)},"entityDecode");function fS(e){return"str"in e}mu(fS,"isDetailedError");var gS=mu((e,t,r,n)=>{var i;if(!n)return;const o=null==(i=e.node())?void 0:i.getBBox();o&&e.append("text").text(n).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),mS=mu(e=>{if("number"==typeof e)return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function yS(e,t){return Dk({},e,t)}mu(yS,"cleanAndMerge");var xS={assignWithDepth:od,wrapLabel:aS,calculateTextHeight:lS,calculateTextWidth:cS,calculateTextDimensions:hS,cleanAndMerge:yS,detectInit:Rk,detectDirective:$k,isSubstringInArray:Vk,interpolateToCurve:Wk,calcLabelPosition:Xk,calcCardinalityPosition:Zk,calcTerminalLabelPosition:Kk,formatUrl:Hk,getStylesFromArray:Qk,generateId:tS,random:nS,runFunc:qk,entityDecode:pS,insertTitle:gS,isLabelCoordinateInPath:kS,parseFontSize:mS,InitIDGenerator:dS},bS=mu(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){const t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"}),t},"encodeEntities"),vS=mu(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),CS=mu((e,t,{counter:r=0,prefix:n,suffix:i},o)=>o||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");function wS(e){return e??null}function kS(e,t){const r=Math.round(e.x),n=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(r.toString())||i.includes(n.toString())}mu(wS,"handleUndefinedAttr"),mu(kS,"isLabelCoordinateInPath");const SS=Object.freeze({left:0,top:0,width:16,height:16}),_S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),TS=Object.freeze({...SS,..._S}),AS=Object.freeze({...TS,body:"",hidden:!1}),PS=Object.freeze({width:null,height:null}),ES=Object.freeze({...PS,..._S}),MS=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name);function IS(e,t){const r=function(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}(e,t);for(const n in AS)n in _S?n in e&&!(n in r)&&(r[n]=_S[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function BS(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(e){o=IS(n[e]||i[e],o)}return a(t),r.forEach(a),IS(e,o)}function LS(e,t){if(e.icons[t])return BS(e,t,[]);const r=function(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);return(t||Object.keys(r).concat(Object.keys(n))).forEach(function e(t){if(r[t])return i[t]=[];if(!(t in i)){i[t]=null;const r=n[t]&&n[t].parent,o=r&&e(r);o&&(i[t]=[r].concat(o))}return i[t]}),i}(e,[t])[t];return r?BS(e,t,r):null}const jS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,NS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function DS(e,t,r){if(1===t)return e;if(r=r||100,"number"==typeof e)return Math.ceil(e*t*r)/r;if("string"!=typeof e)return e;const n=e.split(jS);if(null===n||!n.length)return e;const i=[];let o=n.shift(),a=NS.test(o);for(;;){if(a){const e=parseFloat(o);isNaN(e)?i.push(o):i.push(Math.ceil(e*t*r)/r)}else i.push(o);if(o=n.shift(),void 0===o)return i.join("");a=!a}}const OS=/\sid="(\S+)"/g,FS=new Map;function RS(e){const t=[];let r;for(;r=OS.exec(e);)t.push(r[1]);if(!t.length)return e;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return t.forEach(t=>{const r=function(e){e=e.replace(/[0-9]+$/,"")||"a";const t=FS.get(e)||0;return FS.set(e,t+1),t?`${e}${t}`:e}(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),e=e.replace(new RegExp(n,"g"),"")}function $S(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zS={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function VS(e){zS=e}var WS={exec:()=>null};function HS(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(US.caret,"$1"),r=r.replace(e,i),n},getRegex:()=>new RegExp(r,t)};return n}var qS=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),US={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},GS=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XS=/(?:[*+-]|\d{1,9}[.)])/,JS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,YS=HS(JS).replace(/bull/g,XS).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(),ZS=HS(JS).replace(/bull/g,XS).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(),KS=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,QS=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,e_=HS(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",QS).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),t_=HS(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,XS).getRegex(),r_="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",n_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,i_=HS("^ {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",n_).replace("tag",r_).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o_=HS(KS).replace("hr",GS).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",r_).getRegex(),a_={blockquote:HS(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",o_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:e_,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:GS,html:i_,lheading:YS,list:t_,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:o_,table:WS,text:/^[^\n]+/},s_=HS("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",GS).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",r_).getRegex(),l_={...a_,lheading:ZS,table:s_,paragraph:HS(KS).replace("hr",GS).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",s_).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",r_).getRegex()},c_={...a_,html:HS("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n_).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:WS,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:HS(KS).replace("hr",GS).replace("heading"," *#{1,6} *[^\n]").replace("lheading",YS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},u_=/^( {2,}|\\)\n(?!\s*$)/,h_=/[\p{P}\p{S}]/u,d_=/[\s\p{P}\p{S}]/u,p_=/[^\s\p{P}\p{S}]/u,f_=HS(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,d_).getRegex(),g_=/(?!~)[\p{P}\p{S}]/u,m_=HS(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",qS?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),y_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,x_=HS(y_,"u").replace(/punct/g,h_).getRegex(),b_=HS(y_,"u").replace(/punct/g,g_).getRegex(),v_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C_=HS(v_,"gu").replace(/notPunctSpace/g,p_).replace(/punctSpace/g,d_).replace(/punct/g,h_).getRegex(),w_=HS(v_,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,g_).getRegex(),k_=HS("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,p_).replace(/punctSpace/g,d_).replace(/punct/g,h_).getRegex(),S_=HS(/\\(punct)/,"gu").replace(/punct/g,h_).getRegex(),__=HS(/^<(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(),T_=HS(n_).replace("(?:--\x3e|$)","--\x3e").getRegex(),A_=HS("^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",T_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),P_=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,E_=HS(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",P_).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),M_=HS(/^!?\[(label)\]\[(ref)\]/).replace("label",P_).replace("ref",QS).getRegex(),I_=HS(/^!?\[(ref)\](?:\[\])?/).replace("ref",QS).getRegex(),B_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,L_={_backpedal:WS,anyPunctuation:S_,autolink:__,blockSkip:m_,br:u_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:WS,emStrongLDelim:x_,emStrongRDelimAst:C_,emStrongRDelimUnd:k_,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:E_,nolink:I_,punctuation:f_,reflink:M_,reflinkSearch:HS("reflink|nolink(?!\\()","g").replace("reflink",M_).replace("nolink",I_).getRegex(),tag:A_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:WS},j_={...L_,link:HS(/^!?\[(label)\]\((.*?)\)/).replace("label",P_).getRegex(),reflink:HS(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",P_).getRegex()},N_={...L_,emStrongRDelimAst:w_,emStrongLDelim:b_,url:HS(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",B_).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:HS(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",B_).getRegex()},D_={...N_,br:HS(u_).replace("{2,}","*").getRegex(),text:HS(N_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},O_={normal:a_,gfm:l_,pedantic:c_},F_={normal:L_,gfm:N_,breaks:D_,pedantic:j_},R_={"&":"&","<":"<",">":">",'"':""","'":"'"},$_=e=>R_[e];function z_(e,t){if(t){if(US.escapeTest.test(e))return e.replace(US.escapeReplace,$_)}else if(US.escapeTestNoEncode.test(e))return e.replace(US.escapeReplaceNoEncode,$_);return e}function V_(e){try{e=encodeURI(e).replace(US.percentDecode,"%")}catch{return null}return e}function W_(e,t){var r;let n=e.replace(US.findPipe,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(US.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!(null==(r=n.at(-1))?void 0:r.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(US.slashPipe,"|");return n}function H_(e,t,r){let n=e.length;if(0===n)return"";let i=0;for(;i<n;){if(e.charAt(n-i-1)!==t)break;i++}return e.slice(0,n-i)}function q_(e,t,r,n,i){let o=t.href,a=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:o,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}var U_=class{constructor(e){y(this,"options"),y(this,"rules"),y(this,"lexer"),this.options=e||zS}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:H_(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let i=n[1];return t.split("\n").map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=H_(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:H_(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=H_(t[0],"\n").split("\n"),r="",n="",i=[];for(;e.length>0;){let t,o=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),o=!0;else{if(o)break;a.push(e[t])}e=e.slice(t);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===e.length)break;let u=i.at(-1);if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){let t=u,o=t.raw+"\n"+e.join("\n"),a=this.blockquote(o);i[i.length-1]=a,r=r.substring(0,r.length-t.raw.length)+a.raw,n=n.substring(0,n.length-t.text.length)+a.text;break}if("list"===(null==u?void 0:u.type)){let t=u,o=t.raw+"\n"+e.join("\n"),a=this.list(o);i[i.length-1]=a,r=r.substring(0,r.length-u.raw.length)+a.raw,n=n.substring(0,n.length-t.raw.length)+a.raw,e=o.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;e;){let r=!1,n="",s="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],u=!l.trim(),h=0;if(this.options.pedantic?(h=2,s=l.trimStart()):u?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,s=l.slice(h),h+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(h),r=this.rules.other.hrRegex(h),i=this.rules.other.fencesBeginRegex(h),o=this.rules.other.headingBeginRegex(h),a=this.rules.other.htmlBeginRegex(h);for(;e;){let d,p=e.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||o.test(c)||a.test(c)||t.test(c)||r.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=h||!c.trim())s+="\n"+d.slice(h);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||o.test(l)||r.test(l))break;s+="\n"+c}!u&&!c.trim()&&(u=!0),n+=p+"\n",e=e.substring(p.length+1),l=d.slice(h)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),i.raw+=n}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>"space"===e.type),r=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){var t;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=W_(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(null==(t=r[3])?void 0:t.trim())?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let e of i)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of o)a.rows.push(W_(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=H_(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),q_(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return q_(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){let r,i,o=[...n[0]].length-1,a=o,s=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+o);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(i=[...r].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);let t=[...n[0]][0].length,l=e.slice(0,o+n.index+t+i);if(Math.min(o,i)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=r[0],n="mailto:"+e;else{let i;do{i=r[0],r[0]=(null==(t=this.rules.inline._backpedal.exec(r[0]))?void 0:t[0])??""}while(i!==r[0]);e=r[0],n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},G_=class e{constructor(e){y(this,"tokens"),y(this,"options"),y(this,"state"),y(this,"tokenizer"),y(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zS,this.options.tokenizer=this.options.tokenizer||new U_,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 t={other:US,block:O_.normal,inline:F_.normal};this.options.pedantic?(t.block=O_.pedantic,t.inline=F_.pedantic):this.options.gfm&&(t.block=O_.gfm,this.options.breaks?t.inline=F_.breaks:t.inline=F_.gfm),this.tokenizer.rules=t}static get rules(){return{block:O_,inline:F_}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(US.carriageReturn,"\n"),this.blockTokens(e,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(e,t=[],r=!1){var n,i,o;for(this.options.pedantic&&(e=e.replace(US.tabCharGlobal," ").replace(US.spaceLine,""));e;){let a;if(null==(i=null==(n=this.options.extensions)?void 0:n.block)?void 0:i.some(r=>!!(a=r.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let r=t.at(-1);1===a.raw.length&&void 0!==r?r.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null==(o=this.options.extensions)?void 0:o.startBlock){let t,r=1/0,n=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},n),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(s=e.substring(0,r+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let n=t.at(-1);r&&"paragraph"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a),r=s.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var r,n,i,o,a;let s,l=e,c=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(c=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(c=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,c.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(c=this.tokenizer.rules.inline.blockSkip.exec(l));)s=c[2]?c[2].length:0,l=l.slice(0,c.index+s)+"["+"a".repeat(c[0].length-s-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=(null==(n=null==(r=this.options.hooks)?void 0:r.emStrongMask)?void 0:n.call({lexer:this},l))??l;let u=!1,h="";for(;e;){let r;if(u||(h=""),u=!1,null==(o=null==(i=this.options.extensions)?void 0:i.inline)?void 0:o.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,l,h)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(null==(a=this.options.extensions)?void 0:a.startInline){let t,r=1/0,i=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},i),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(h=r.raw.slice(-1)),u=!0;let n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},X_=class{constructor(e){y(this,"options"),y(this,"parser"),this.options=e||zS}space(e){return""}code({text:e,lang:t,escaped:r}){var n;let i=null==(n=(t||"").match(US.notSpaceStart))?void 0:n[0],o=e.replace(US.endingNewline,"")+"\n";return i?'<pre><code class="language-'+z_(i)+'">'+(r?o:z_(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:z_(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o<e.items.length;o++){let t=e.items[o];n+=this.listitem(t)}let i=t?"ol":"ul";return"<"+i+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+i+">\n"}listitem(e){var t;let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+z_(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let t=e.rows[i];r="";for(let e=0;e<t.length;e++)r+=this.tablecell(t[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${z_(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=V_(e);if(null===i)return n;let o='<a href="'+(e=i)+'"';return t&&(o+=' title="'+z_(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=V_(e);if(null===i)return z_(r);let o=`<img src="${e=i}" alt="${r}"`;return t&&(o+=` title="${z_(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:z_(e.text)}},J_=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Y_=class e{constructor(e){y(this,"options"),y(this,"renderer"),y(this,"textRenderer"),this.options=e||zS,this.options.renderer=this.options.renderer||new X_,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new J_}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){i+=t||"";continue}}let s=a;switch(s.type){case"space":i+=this.renderer.space(s);continue;case"hr":i+=this.renderer.hr(s);continue;case"heading":i+=this.renderer.heading(s);continue;case"code":i+=this.renderer.code(s);continue;case"table":i+=this.renderer.table(s);continue;case"blockquote":i+=this.renderer.blockquote(s);continue;case"list":i+=this.renderer.list(s);continue;case"html":i+=this.renderer.html(s);continue;case"def":i+=this.renderer.def(s);continue;case"paragraph":i+=this.renderer.paragraph(s);continue;case"text":{let r=s,n=this.renderer.text(r);for(;o+1<e.length&&"text"===e[o+1].type;)r=e[++o],n+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t=this.renderer){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=e||"";continue}}let s=a;switch(s.type){case"escape":case"text":i+=t.text(s);break;case"html":i+=t.html(s);break;case"link":i+=t.link(s);break;case"image":i+=t.image(s);break;case"strong":i+=t.strong(s);break;case"em":i+=t.em(s);break;case"codespan":i+=t.codespan(s);break;case"br":i+=t.br(s);break;case"del":i+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}},Z_=(f=class{constructor(e){y(this,"options"),y(this,"block"),this.options=e||zS}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?G_.lex:G_.lexInline}provideParser(){return this.block?Y_.parse:Y_.parseInline}},y(f,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),y(f,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),f),K_=new class{constructor(...e){y(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),y(this,"options",this.setOptions),y(this,"parse",this.parseMarkdown(!0)),y(this,"parseInline",this.parseMarkdown(!1)),y(this,"Parser",Y_),y(this,"Renderer",X_),y(this,"TextRenderer",J_),y(this,"Lexer",G_),y(this,"Tokenizer",U_),y(this,"Hooks",Z_),this.use(...e)}walkTokens(e,t){var r,n;let i=[];for(let o of e)switch(i=i.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=o;i=i.concat(this.walkTokens(e.items,t));break}default:{let e=o;(null==(n=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:n[e.type])?this.defaults.extensions.childTokens[e.type].forEach(r=>{let n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,t))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new X_(this.defaults);for(let r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=r,i=e.renderer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new U_(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=r,i=e.tokenizer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Z_;for(let r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=r,i=e.hooks[n],o=t[n];Z_.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async&&Z_.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(t,e);return o.call(t,r)})();let n=i.call(t,e);return o.call(t,n)}:t[n]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(t,e);return!1===r&&(r=await o.apply(t,e)),r})();let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return G_.lex(e,t??this.defaults)}parser(e,t){return Y_.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let r=i.hooks?await i.hooks.preprocess(t):t,n=await(i.hooks?await i.hooks.provideLexer():e?G_.lex:G_.lexInline)(r,i),o=i.hooks?await i.hooks.processAllTokens(n):n;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let a=await(i.hooks?await i.hooks.provideParser():e?Y_.parse:Y_.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(a):a})().catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let r=(i.hooks?i.hooks.provideLexer():e?G_.lex:G_.lexInline)(t,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let n=(i.hooks?i.hooks.provideParser():e?Y_.parse:Y_.parseInline)(r,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(a){return o(a)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+z_(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function Q_(e,t){return K_.parse(e,t)}function eT(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Array.from("string"==typeof e?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(e,t){var r=t.match(/\n([\t ]+|(?!\s).)/g);return r?e.concat(r.map(function(e){var t,r;return null!==(r=null===(t=e.match(/[\t ]/g))||void 0===t?void 0:t.length)&&void 0!==r?r:0})):e},[]);if(i.length){var o=new RegExp("\n[\t ]{"+Math.min.apply(Math,i)+"}","g");n=n.map(function(e){return e.replace(o,"\n")})}n[0]=n[0].replace(/^\r?\n/,"");var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:"",o=e;"string"==typeof e&&e.includes("\n")&&(o=String(e).split("\n").map(function(e,t){return 0===t?e:""+i+e}).join("\n")),a+=o+n[t+1]}),a}Q_.options=Q_.setOptions=function(e){return K_.setOptions(e),Q_.defaults=K_.defaults,VS(Q_.defaults),Q_},Q_.getDefaults=$S,Q_.defaults=zS,Q_.use=function(...e){return K_.use(...e),Q_.defaults=K_.defaults,VS(Q_.defaults),Q_},Q_.walkTokens=function(e,t){return K_.walkTokens(e,t)},Q_.parseInline=K_.parseInline,Q_.Parser=Y_,Q_.parser=Y_.parse,Q_.Renderer=X_,Q_.TextRenderer=J_,Q_.Lexer=G_,Q_.lexer=G_.lex,Q_.Tokenizer=U_,Q_.Hooks=Z_,Q_.parse=Q_,Q_.options,Q_.setOptions,Q_.use,Q_.walkTokens,Q_.parseInline,Y_.parse,G_.lex;var tT={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},rT=new Map,nT=new Map,iT=mu(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(bu.debug("Registering icon pack:",t.name),"loader"in t)nT.set(t.name,t.loader);else{if(!("icons"in t))throw bu.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');rT.set(t.name,t.icons)}}},"registerIconPacks"),oT=mu(async(e,t)=>{const r=((e,t,r,n="")=>{const i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const e=i.pop(),t=i.pop(),r={provider:i.length>0?i[0]:n,prefix:t,name:e};return MS(r)?r:null}const o=i[0],a=o.split("-");if(a.length>1){const e={provider:n,prefix:a.shift(),name:a.join("-")};return MS(e)?e:null}if(r&&""===n){const e={provider:n,prefix:"",name:o};return MS(e,r)?e:null}return null})(e,0,void 0!==t);if(!r)throw new Error(`Invalid icon name: ${e}`);const n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=rT.get(n);if(!i){const e=nT.get(n);if(!e)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await e(),prefix:n},rT.set(n,i)}catch(a){throw bu.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=LS(i,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),aT=mu(async e=>{try{return await oT(e),!0}catch{return!1}},"isIconAvailable"),sT=mu(async(e,t,r)=>{let n;try{n=await oT(e,null==t?void 0:t.fallbackPrefix)}catch(a){bu.error(a),n=tT}const i=function(e,t){const r={...TS,...e},n={...ES,...t},i={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(e=>{const t=[],r=e.hFlip,n=e.vFlip;let a,s=e.rotate;switch(r?n?s+=2:(t.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),t.push("scale(-1 1)"),i.top=i.left=0):n&&(t.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),t.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=i.height/2+i.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:a=i.width/2+i.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(i.left!==i.top&&(a=i.left,i.left=i.top,i.top=a),i.width!==i.height&&(a=i.width,i.width=i.height,i.height=a)),t.length&&(o=function(e,t,r){const n=function(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const i=e.indexOf(">",n),o=e.indexOf("</"+t);if(-1===i||-1===o)break;const a=e.indexOf(">",o);if(-1===a)break;r+=e.slice(i+1,o).trim(),e=e.slice(0,n).trim()+e.slice(a+1)}return{defs:r,content:e}}(e);return i=n.defs,o=t+n.content+r,i?"<defs>"+i+"</defs>"+o:o;var i,o}(o,'<g transform="'+t.join(" ")+'">',"</g>"))});const a=n.width,s=n.height,l=i.width,c=i.height;let u,h;null===a?(h=null===s?"1em":"auto"===s?c:s,u=DS(h,l/c)):(u="auto"===a?l:a,h=null===s?DS(u,c/l):"auto"===s?c:s);const d={},p=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(d[e]=t.toString())};p("width",u),p("height",h);const f=[i.left,i.top,l,c];return d.viewBox=f.join(" "),{attributes:d,viewBox:f,body:o}}(n,t),o=function(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}(RS(i.body),{...i.attributes,...r});return Zd(o,Dd())},"getIconSVG");function lT(e,{markdownAutoWrap:t}){const r=eT(e.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===t?r.replace(/ /g," "):r}function cT(e,t={}){const r=lT(e,t),n=Q_.lexer(r),i=[[]];let o=0;function a(e,t="normal"){if("text"===e.type){e.text.split("\n").forEach((e,r)=>{0!==r&&(o++,i.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&i[o].push({content:e,type:t})})})}else"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{a(t,e.type)}):"html"===e.type&&i[o].push({content:e.text,type:"normal"})}return mu(a,"processNode"),n.forEach(e=>{var t;"paragraph"===e.type?null==(t=e.tokens)||t.forEach(e=>{a(e)}):"html"===e.type?i[o].push({content:e.text,type:"normal"}):i[o].push({content:e.raw,type:"normal"})}),i}function uT(e,{markdownAutoWrap:t}={}){const r=Q_.lexer(e);function n(e){var r,i,o;return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g," "):e.text.replace(/\n */g,"<br/>"):"strong"===e.type?`<strong>${null==(r=e.tokens)?void 0:r.map(n).join("")}</strong>`:"em"===e.type?`<em>${null==(i=e.tokens)?void 0:i.map(n).join("")}</em>`:"paragraph"===e.type?`<p>${null==(o=e.tokens)?void 0:o.map(n).join("")}</p>`:"space"===e.type?"":"html"===e.type?`${e.text}`:"escape"===e.type?e.text:(bu.warn(`Unsupported markdown: ${e.type}`),e.raw)}return mu(n,"output"),r.map(n).join("")}function hT(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function dT(e,t){return pT(e,[],hT(t.content),t.type)}function pT(e,t,r,n){if(0===r.length)return[{content:t.join(""),type:n},{content:"",type:n}];const[i,...o]=r,a=[...t,i];return e([{content:a.join(""),type:n}])?pT(e,a,o,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function fT(e,t){if(e.some(({content:e})=>e.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return gT(e,t)}function gT(e,t,r=[],n=[]){if(0===e.length)return n.length>0&&r.push(n),r.length>0?r:[];let i="";" "===e[0].content&&(i=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...n];if(""!==i&&a.push({content:i,type:"normal"}),a.push(o),t(a))return gT(e,t,r,a);if(n.length>0)r.push(n),e.unshift(o);else if(o.content){const[n,i]=dT(t,o);r.push([n]),i.content&&e.unshift(i)}return gT(e,t,r)}function mT(e,t){t&&e.attr("style",t)}async function yT(e,t,r,n,i=!1,o=Dd()){const a=e.append("foreignObject");a.attr("width",10*r+"px"),a.attr("height",10*r+"px");const s=a.append("xhtml:div"),l=pp(t.label)?await mp(t.label.replace(yp.lineBreakRegex,"\n"),o):Zd(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(l),mT(u,t.labelStyle),u.attr("class",`${c} ${n}`),mT(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}function xT(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function bT(e,t,r){const n=e.append("text"),i=xT(n,1,t);wT(i,r);const o=i.node().getComputedTextLength();return n.remove(),o}function vT(e,t,r){var n;const i=e.append("text"),o=xT(i,1,t);wT(o,[{content:r,type:"normal"}]);const a=null==(n=o.node())?void 0:n.getBoundingClientRect();return a&&i.remove(),a}function CT(e,t,r,n=!1){const i=t.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),a=i.append("text").attr("y","-10.1");let s=0;for(const l of r){const t=mu(t=>bT(i,1.1,t)<=e,"checkWidth"),r=t(l)?[l]:fT(l,t);for(const e of r){wT(xT(a,s,1.1),e),s++}}if(n){const e=a.node().getBBox(),t=2;return o.attr("x",e.x-t).attr("y",e.y-t).attr("width",e.width+2*t).attr("height",e.height+2*t),i.node()}return a.node()}function wT(e,t){e.text(""),t.forEach((t,r)=>{const n=e.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===r?n.text(t.content):n.text(" "+t.content)})}async function kT(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,n,i)=>(r.push((async()=>{const r=`${n}:${i}`;return await aT(r)?await sT(r,void 0,{class:"label-icon"}):`<i class='${Zd(e,t).replace(":"," ")}'></i>`})()),e));const n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}mu(lT,"preprocessMarkdown"),mu(cT,"markdownToLines"),mu(uT,"markdownToHTML"),mu(hT,"splitTextToChars"),mu(dT,"splitWordToFitWidth"),mu(pT,"splitWordToFitWidthRecursion"),mu(fT,"splitLineToFitWidth"),mu(gT,"splitLineToFitWidthRecursion"),mu(mT,"applyStyle"),mu(yT,"addHtmlSpan"),mu(xT,"createTspan"),mu(bT,"computeWidthOfText"),mu(vT,"computeDimensionOfText"),mu(CT,"createFormattedText"),mu(wT,"updateTextContentAndStyles"),mu(kT,"replaceIconSubstring");var ST=mu(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:o=!0,isNode:a=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(bu.debug("XYZ createText",t,r,n,i,o,a,"addSvgBackground: ",l),o){const n=uT(t,c),o=await kT(vS(n),c),u=t.replace(/\\\\/g,"\\"),h={isNode:a,label:pp(t)?u:o,labelStyle:r.replace("fill:","color:")};return await yT(e,h,s,i,l,c)}{const n=CT(s,e,cT(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!t&&l);if(a){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");fg(n).attr("style",e)}else{const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");fg(n).select("rect").attr("style",e.replace(/background:/g,"fill:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");fg(n).select("text").attr("style",t)}return n}},"createText");function _T(e,t,r){if(e&&e.length){const[n,i]=t,o=Math.PI/180*r,a=Math.cos(o),s=Math.sin(o);for(const t of e){const[e,r]=t;t[0]=(e-n)*a-(r-i)*s+n,t[1]=(e-n)*s+(r-i)*a+i}}}function TT(e,t){return e[0]===t[0]&&e[1]===t[1]}function AT(e,t){var r;const n=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return t.roughness>=1&&((null===(r=t.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=i),function(e,t,r,n=1){const i=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,s=[0,0];if(i)for(const c of a)_T(c,s,i);const l=function(e,t,r){const n=[];for(const c of e){const e=[...c];TT(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&n.push(e)}const i=[];t=Math.max(t,.1);const o=[];for(const c of n)for(let e=0;e<c.length-1;e++){const t=c[e],r=c[e+1];if(t[1]!==r[1]){const e=Math.min(t[1],r[1]);o.push({ymin:e,ymax:Math.max(t[1],r[1]),x:e===t[1]?t[0]:r[0],islope:(r[0]-t[0])/(r[1]-t[1])})}}if(o.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!o.length)return i;let a=[],s=o[0].ymin,l=0;for(;a.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>s);t++)e=t;o.splice(0,e+1).forEach(e=>{a.push({s:s,edge:e})})}if(a=a.filter(e=>!(e.edge.ymax<=s)),a.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==r||l%t==0)&&a.length>1)for(let e=0;e<a.length;e+=2){const t=e+1;if(t>=a.length)break;const r=a[e].edge,n=a[t].edge;i.push([[Math.round(r.x),s],[Math.round(n.x),s]])}s+=r,a.forEach(e=>{e.edge.x=e.edge.x+r*e.edge.islope}),l++}return i}(a,o,n);if(i){for(const e of a)_T(e,s,-i);!function(e,t,r){const n=[];e.forEach(e=>n.push(...e)),_T(n,t,r)}(l,s,-i)}return l}(e,i,n,o||1)}class PT{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const r=AT(e,t);return{type:"fillSketch",ops:this.renderLines(r,t)}}renderLines(e,t){const r=[];for(const n of e)r.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],t));return r}}function ET(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class MT extends PT{fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);const n=AT(e,Object.assign({},t,{hachureGap:r})),i=Math.PI/180*t.hachureAngle,o=[],a=.5*r*Math.cos(i),s=.5*r*Math.sin(i);for(const[l,c]of n)ET([l,c])&&o.push([[l[0]-a,l[1]+s],[...c]],[[l[0]+a,l[1]-s],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,t)}}}class IT extends PT{fillPolygons(e,t){const r=this._fillPolygons(e,t),n=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,n);return r.ops=r.ops.concat(i.ops),r}}class BT{constructor(e){this.helper=e}fillPolygons(e,t){const r=AT(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(r,t)}dotsOnLines(e,t){const r=[];let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);const o=n/4;for(const a of e){const e=ET(a),s=e/n,l=Math.ceil(s)-1,c=e-l*n,u=(a[0][0]+a[1][0])/2-n/4,h=Math.min(a[0][1],a[1][1]);for(let a=0;a<l;a++){const e=h+c+a*n,s=u-o+2*Math.random()*o,l=e-o+2*Math.random()*o,d=this.helper.ellipse(s,l,i,i,t);r.push(...d.ops)}}return{type:"fillSketch",ops:r}}}class LT{constructor(e){this.helper=e}fillPolygons(e,t){const r=AT(e,t);return{type:"fillSketch",ops:this.dashedLine(r,t)}}dashedLine(e,t){const r=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,n=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach(e=>{const o=ET(e),a=Math.floor(o/(r+n)),s=(o+n-a*(r+n))/2;let l=e[0],c=e[1];l[0]>c[0]&&(l=e[1],c=e[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let h=0;h<a;h++){const e=h*(r+n),o=e+r,a=[l[0]+e*Math.cos(u)+s*Math.cos(u),l[1]+e*Math.sin(u)+s*Math.sin(u)],c=[l[0]+o*Math.cos(u)+s*Math.cos(u),l[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(a[0],a[1],c[0],c[1],t))}}),i}}class jT{constructor(e){this.helper=e}fillPolygons(e,t){const r=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,n=t.zigzagOffset<0?r:t.zigzagOffset,i=AT(e,t=Object.assign({},t,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(i,n,t)}}zigzagLines(e,t,r){const n=[];return e.forEach(e=>{const i=ET(e),o=Math.round(i/(2*t));let a=e[0],s=e[1];a[0]>s[0]&&(a=e[1],s=e[0]);const l=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let c=0;c<o;c++){const e=2*c*t,i=2*(c+1)*t,o=Math.sqrt(2*Math.pow(t,2)),s=[a[0]+e*Math.cos(l),a[1]+e*Math.sin(l)],u=[a[0]+i*Math.cos(l),a[1]+i*Math.sin(l)],h=[s[0]+o*Math.cos(l+Math.PI/4),s[1]+o*Math.sin(l+Math.PI/4)];n.push(...this.helper.doubleLineOps(s[0],s[1],h[0],h[1],r),...this.helper.doubleLineOps(h[0],h[1],u[0],u[1],r))}}),n}}const NT={};class DT{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const OT={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 FT(e,t){return e.type===t}function RT(e){const t=[],r=function(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e);let n="BOD",i=0,o=r[i];for(;!FT(o,2);){let a=0;const s=[];if("BOD"===n){if("M"!==o.text&&"m"!==o.text)return RT("M0,0"+e);i++,a=OT[o.text],n=o.text}else FT(o,1)?a=OT[n]:(i++,a=OT[o.text],n=o.text);if(!(i+a<r.length))throw new Error("Path data ended short");for(let e=i;e<i+a;e++){const t=r[e];if(!FT(t,1))throw new Error("Param not a number: "+n+","+t.text);s[s.length]=+t.text}if("number"!=typeof OT[n])throw new Error("Bad segment: "+n);{const e={key:n,data:s};t.push(e),i+=a,o=r[i],"M"===n&&(n="L"),"m"===n&&(n="l")}}return t}function $T(e){let t=0,r=0,n=0,i=0;const o=[];for(const{key:a,data:s}of e)switch(a){case"M":o.push({key:"M",data:[...s]}),[t,r]=s,[n,i]=s;break;case"m":t+=s[0],r+=s[1],o.push({key:"M",data:[t,r]}),n=t,i=r;break;case"L":o.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const e=s.map((e,n)=>n%2?e+r:e+t);o.push({key:"C",data:e}),t=e[4],r=e[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const e=s.map((e,n)=>n%2?e+r:e+t);o.push({key:"Q",data:e}),t=e[2],r=e[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const e=s.map((e,n)=>n%2?e+r:e+t);o.push({key:"S",data:e}),t=e[2],r=e[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=n,r=i}return o}function zT(e){const t=[];let r="",n=0,i=0,o=0,a=0,s=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[n,i]=u,[o,a]=u;break;case"C":t.push({key:"C",data:[...u]}),n=u[4],i=u[5],s=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[n,i]=u;break;case"H":n=u[0],t.push({key:"L",data:[n,i]});break;case"V":i=u[0],t.push({key:"L",data:[n,i]});break;case"S":{let e=0,o=0;"C"===r||"S"===r?(e=n+(n-s),o=i+(i-l)):(e=n,o=i),t.push({key:"C",data:[e,o,...u]}),s=u[0],l=u[1],n=u[2],i=u[3];break}case"T":{const[e,o]=u;let a=0,c=0;"Q"===r||"T"===r?(a=n+(n-s),c=i+(i-l)):(a=n,c=i);const h=n+2*(a-n)/3,d=i+2*(c-i)/3,p=e+2*(a-e)/3,f=o+2*(c-o)/3;t.push({key:"C",data:[h,d,p,f,e,o]}),s=a,l=c,n=e,i=o;break}case"Q":{const[e,r,o,a]=u,c=n+2*(e-n)/3,h=i+2*(r-i)/3,d=o+2*(e-o)/3,p=a+2*(r-a)/3;t.push({key:"C",data:[c,h,d,p,o,a]}),s=e,l=r,n=o,i=a;break}case"A":{const e=Math.abs(u[0]),r=Math.abs(u[1]),o=u[2],a=u[3],s=u[4],l=u[5],c=u[6];0===e||0===r?(t.push({key:"C",data:[n,i,l,c,l,c]}),n=l,i=c):n===l&&i===c||(WT(n,i,l,c,e,r,o,a,s).forEach(function(e){t.push({key:"C",data:e})}),n=l,i=c);break}case"Z":t.push({key:"Z",data:[]}),n=o,i=a}r=c}return t}function VT(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function WT(e,t,r,n,i,o,a,s,l,c){const u=(h=a,Math.PI*h/180);var h;let d=[],p=0,f=0,g=0,m=0;if(c)[p,f,g,m]=c;else{[e,t]=VT(e,t,-u),[r,n]=VT(r,n,-u);const a=(e-r)/2,c=(t-n)/2;let h=a*a/(i*i)+c*c/(o*o);h>1&&(h=Math.sqrt(h),i*=h,o*=h);const d=i*i,y=o*o,x=d*y-d*c*c-y*a*a,b=d*c*c+y*a*a,v=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=v*i*c/o+(e+r)/2,m=v*-o*a/i+(t+n)/2,p=Math.asin(parseFloat(((t-m)/o).toFixed(9))),f=Math.asin(parseFloat(((n-m)/o).toFixed(9))),e<g&&(p=Math.PI-p),r<g&&(f=Math.PI-f),p<0&&(p=2*Math.PI+p),f<0&&(f=2*Math.PI+f),l&&p>f&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let y=f-p;if(Math.abs(y)>120*Math.PI/180){const e=f,t=r,s=n;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=WT(r=g+i*Math.cos(f),n=m+o*Math.sin(f),t,s,i,o,a,0,l,[f,e,g,m])}y=f-p;const x=Math.cos(p),b=Math.sin(p),v=Math.cos(f),C=Math.sin(f),w=Math.tan(y/4),k=4/3*i*w,S=4/3*o*w,_=[e,t],T=[e+k*b,t-S*x],A=[r+k*C,n-S*v],P=[r,n];if(T[0]=2*_[0]-T[0],T[1]=2*_[1]-T[1],c)return[T,A,P].concat(d);{d=[T,A,P].concat(d);const e=[];for(let t=0;t<d.length;t+=3){const r=VT(d[t][0],d[t][1],u),n=VT(d[t+1][0],d[t+1][1],u),i=VT(d[t+2][0],d[t+2][1],u);e.push([r[0],r[1],n[0],n[1],i[0],i[1]])}return e}}const HT={randOffset:function(e,t){return nA(e,t)},randOffsetWithRange:function(e,t,r){return rA(e,t,r)},ellipse:function(e,t,r,n,i){return JT(e,t,i,XT(r,n,i)).opset},doubleLineOps:function(e,t,r,n,i){return iA(e,t,r,n,i,!0)}};function qT(e,t,r,n,i){return{type:"path",ops:iA(e,t,r,n,i)}}function UT(e,t,r){const n=(e||[]).length;if(n>2){const i=[];for(let t=0;t<n-1;t++)i.push(...iA(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&i.push(...iA(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return 2===n?qT(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function GT(e,t){if(e.length){const r="number"==typeof e[0][0]?[e]:e,n=aA(r[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:aA(r[0],1.5*(1+.22*t.roughness),eA(t));for(let e=1;e<r.length;e++){const o=r[e];if(o.length){const e=aA(o,1*(1+.2*t.roughness),t),r=t.disableMultiStroke?[]:aA(o,1.5*(1+.22*t.roughness),eA(t));for(const t of e)"move"!==t.op&&n.push(t);for(const t of r)"move"!==t.op&&i.push(t)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function XT(e,t,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/i;let a=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return a+=nA(a*l,r),s+=nA(s*l,r),{increment:o,rx:a,ry:s}}function JT(e,t,r,n){const[i,o]=lA(n.increment,e,t,n.rx,n.ry,1,n.increment*rA(.1,rA(.4,1,r),r),r);let a=sA(i,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[i]=lA(n.increment,e,t,n.rx,n.ry,1.5,0,r),o=sA(i,null,r);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function YT(e,t,r,n,i,o,a,s,l){const c=e,u=t;let h=Math.abs(r/2),d=Math.abs(n/2);h+=nA(.01*h,l),d+=nA(.01*d,l);let p=i,f=o;for(;p<0;)p+=2*Math.PI,f+=2*Math.PI;f-p>2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(f-p)/2),y=cA(m,c,u,h,d,p,f,1,l);if(!l.disableMultiStroke){const e=cA(m,c,u,h,d,p,f,1.5,l);y.push(...e)}return a&&(s?y.push(...iA(c,u,c+h*Math.cos(p),u+d*Math.sin(p),l),...iA(c,u,c+h*Math.cos(f),u+d*Math.sin(f),l)):y.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+h*Math.cos(p),u+d*Math.sin(p)]})),{type:"path",ops:y}}function ZT(e,t){const r=zT($T(RT(e))),n=[];let i=[0,0],o=[0,0];for(const{key:a,data:s}of r)switch(a){case"M":o=[s[0],s[1]],i=[s[0],s[1]];break;case"L":n.push(...iA(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{const[e,r,i,a,l,c]=s;n.push(...uA(e,r,i,a,l,c,o,t)),o=[l,c];break}case"Z":n.push(...iA(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:n}}function KT(e,t){const r=[];for(const n of e)if(n.length){const e=t.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+nA(e,t),n[0][1]+nA(e,t)]});for(let o=1;o<i;o++)r.push({op:"lineTo",data:[n[o][0]+nA(e,t),n[o][1]+nA(e,t)]})}}return{type:"fillPath",ops:r}}function QT(e,t){return function(e,t){let r=e.fillStyle||"hachure";if(!NT[r])switch(r){case"zigzag":NT[r]||(NT[r]=new MT(t));break;case"cross-hatch":NT[r]||(NT[r]=new IT(t));break;case"dots":NT[r]||(NT[r]=new BT(t));break;case"dashed":NT[r]||(NT[r]=new LT(t));break;case"zigzag-line":NT[r]||(NT[r]=new jT(t));break;default:r="hachure",NT[r]||(NT[r]=new PT(t))}return NT[r]}(t,HT).fillPolygons(e,t)}function eA(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function tA(e){return e.randomizer||(e.randomizer=new DT(e.seed||0)),e.randomizer.next()}function rA(e,t,r,n=1){return r.roughness*n*(tA(r)*(t-e)+e)}function nA(e,t,r=1){return rA(-e,e,t,r)}function iA(e,t,r,n,i,o=!1){const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=oA(e,t,r,n,i,!0,!1);if(a)return s;const l=oA(e,t,r,n,i,!0,!0);return s.concat(l)}function oA(e,t,r,n,i,o,a){const s=Math.pow(e-r,2)+Math.pow(t-n,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=l/10);const h=u/2,d=.2+.2*tA(i);let p=i.bowing*i.maxRandomnessOffset*(n-t)/200,f=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=nA(p,i,c),f=nA(f,i,c);const g=[],m=()=>nA(h,i,c),y=()=>nA(u,i,c),x=i.preserveVertices;return a?g.push({op:"move",data:[e+(x?0:m()),t+(x?0:m())]}):g.push({op:"move",data:[e+(x?0:nA(u,i,c)),t+(x?0:nA(u,i,c))]}),a?g.push({op:"bcurveTo",data:[p+e+(r-e)*d+m(),f+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),f+t+2*(n-t)*d+m(),r+(x?0:m()),n+(x?0:m())]}):g.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),f+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),f+t+2*(n-t)*d+y(),r+(x?0:y()),n+(x?0:y())]}),g}function aA(e,t,r){if(!e.length)return[];const n=[];n.push([e[0][0]+nA(t,r),e[0][1]+nA(t,r)]),n.push([e[0][0]+nA(t,r),e[0][1]+nA(t,r)]);for(let i=1;i<e.length;i++)n.push([e[i][0]+nA(t,r),e[i][1]+nA(t,r)]),i===e.length-1&&n.push([e[i][0]+nA(t,r),e[i][1]+nA(t,r)]);return sA(n,null,r)}function sA(e,t,r){const n=e.length,i=[];if(n>3){const t=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let r=1;r+2<n;r++){const n=e[r];t[0]=[n[0],n[1]],t[1]=[n[0]+(o*e[r+1][0]-o*e[r-1][0])/6,n[1]+(o*e[r+1][1]-o*e[r-1][1])/6],t[2]=[e[r+1][0]+(o*e[r][0]-o*e[r+2][0])/6,e[r+1][1]+(o*e[r][1]-o*e[r+2][1])/6],t[3]=[e[r+1][0],e[r+1][1]],i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[3][0],t[3][1]]})}}else 3===n?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===n&&i.push(...oA(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return i}function lA(e,t,r,n,i,o,a,s){const l=[],c=[];if(0===s.roughness){e/=4,c.push([t+n*Math.cos(-e),r+i*Math.sin(-e)]);for(let o=0;o<=2*Math.PI;o+=e){const e=[t+n*Math.cos(o),r+i*Math.sin(o)];l.push(e),c.push(e)}c.push([t+n*Math.cos(0),r+i*Math.sin(0)]),c.push([t+n*Math.cos(e),r+i*Math.sin(e)])}else{const u=nA(.5,s)-Math.PI/2;c.push([nA(o,s)+t+.9*n*Math.cos(u-e),nA(o,s)+r+.9*i*Math.sin(u-e)]);const h=2*Math.PI+u-.01;for(let a=u;a<h;a+=e){const e=[nA(o,s)+t+n*Math.cos(a),nA(o,s)+r+i*Math.sin(a)];l.push(e),c.push(e)}c.push([nA(o,s)+t+n*Math.cos(u+2*Math.PI+.5*a),nA(o,s)+r+i*Math.sin(u+2*Math.PI+.5*a)]),c.push([nA(o,s)+t+.98*n*Math.cos(u+a),nA(o,s)+r+.98*i*Math.sin(u+a)]),c.push([nA(o,s)+t+.9*n*Math.cos(u+.5*a),nA(o,s)+r+.9*i*Math.sin(u+.5*a)])}return[c,l]}function cA(e,t,r,n,i,o,a,s,l){const c=o+nA(.1,l),u=[];u.push([nA(s,l)+t+.9*n*Math.cos(c-e),nA(s,l)+r+.9*i*Math.sin(c-e)]);for(let h=c;h<=a;h+=e)u.push([nA(s,l)+t+n*Math.cos(h),nA(s,l)+r+i*Math.sin(h)]);return u.push([t+n*Math.cos(a),r+i*Math.sin(a)]),u.push([t+n*Math.cos(a),r+i*Math.sin(a)]),sA(u,0,l)}function uA(e,t,r,n,i,o,a,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let u=[0,0];const h=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let p=0;p<h;p++)0===p?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(d?0:nA(c[0],s)),a[1]+(d?0:nA(c[0],s))]}),u=d?[i,o]:[i+nA(c[p],s),o+nA(c[p],s)],l.push({op:"bcurveTo",data:[e+nA(c[p],s),t+nA(c[p],s),r+nA(c[p],s),n+nA(c[p],s),u[0],u[1]]});return l}function hA(e){return[...e]}function dA(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(3===r)n.push(hA(e[0]),hA(e[1]),hA(e[2]),hA(e[2]));else{const r=[];r.push(e[0],e[0]);for(let t=1;t<e.length;t++)r.push(e[t]),t===e.length-1&&r.push(e[t]);const i=[],o=1-t;n.push(hA(r[0]));for(let e=1;e+2<r.length;e++){const t=r[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(o*r[e+1][0]-o*r[e-1][0])/6,t[1]+(o*r[e+1][1]-o*r[e-1][1])/6],i[2]=[r[e+1][0]+(o*r[e][0]-o*r[e+2][0])/6,r[e+1][1]+(o*r[e][1]-o*r[e+2][1])/6],i[3]=[r[e+1][0],r[e+1][1]],n.push(i[1],i[2],i[3])}}return n}function pA(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function fA(e,t,r){const n=pA(t,r);if(0===n)return pA(e,t);let i=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/n;return i=Math.max(0,Math.min(1,i)),pA(e,gA(t,r,i))}function gA(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function mA(e,t,r,n){const i=n||[];if(function(e,t){const r=e[t+0],n=e[t+1],i=e[t+2],o=e[t+3];let a=3*n[0]-2*r[0]-o[0];a*=a;let s=3*n[1]-2*r[1]-o[1];s*=s;let l=3*i[0]-2*o[0]-r[0];l*=l;let c=3*i[1]-2*o[1]-r[1];return c*=c,a<l&&(a=l),s<c&&(s=c),a+s}(e,t)<r){const r=e[t+0];i.length?(o=i[i.length-1],a=r,Math.sqrt(pA(o,a))>1&&i.push(r)):i.push(r),i.push(e[t+3])}else{const n=.5,o=e[t+0],a=e[t+1],s=e[t+2],l=e[t+3],c=gA(o,a,n),u=gA(a,s,n),h=gA(s,l,n),d=gA(c,u,n),p=gA(u,h,n),f=gA(d,p,n);mA([o,c,d,f],0,r,i),mA([f,p,h,l],0,r,i)}var o,a;return i}function yA(e,t){return xA(e,0,e.length,t)}function xA(e,t,r,n,i){const o=i||[],a=e[t],s=e[r-1];let l=0,c=1;for(let u=t+1;u<r-1;++u){const t=fA(e[u],a,s);t>l&&(l=t,c=u)}return Math.sqrt(l)>n?(xA(e,t,c+1,n,o),xA(e,c,r,n,o)):(o.length||o.push(a),o.push(s)),o}function bA(e,t=.15,r){const n=[],i=(e.length-1)/3;for(let o=0;o<i;o++)mA(e,3*o,t,n);return r&&r>0?xA(n,0,n.length,r):n}const vA="none";class CA{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,r){return{shape:e,sets:t||[],options:r||this.defaultOptions}}line(e,t,r,n,i){const o=this._o(i);return this._d("line",[qT(e,t,r,n,o)],o)}rectangle(e,t,r,n,i){const o=this._o(i),a=[],s=function(e,t,r,n,i){return UT([[e,t],[e+r,t],[e+r,t+n],[e,t+n]],!0,i)}(e,t,r,n,o);if(o.fill){const i=[[e,t],[e+r,t],[e+r,t+n],[e,t+n]];"solid"===o.fillStyle?a.push(KT([i],o)):a.push(QT([i],o))}return o.stroke!==vA&&a.push(s),this._d("rectangle",a,o)}ellipse(e,t,r,n,i){const o=this._o(i),a=[],s=XT(r,n,o),l=JT(e,t,o,s);if(o.fill)if("solid"===o.fillStyle){const r=JT(e,t,o,s).opset;r.type="fillPath",a.push(r)}else a.push(QT([l.estimatedPoints],o));return o.stroke!==vA&&a.push(l.opset),this._d("ellipse",a,o)}circle(e,t,r,n){const i=this.ellipse(e,t,r,r,n);return i.shape="circle",i}linearPath(e,t){const r=this._o(t);return this._d("linearPath",[UT(e,!1,r)],r)}arc(e,t,r,n,i,o,a=!1,s){const l=this._o(s),c=[],u=YT(e,t,r,n,i,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=YT(e,t,r,n,i,o,!0,!1,a);s.type="fillPath",c.push(s)}else c.push(function(e,t,r,n,i,o,a){const s=e,l=t;let c=Math.abs(r/2),u=Math.abs(n/2);c+=nA(.01*c,a),u+=nA(.01*u,a);let h=i,d=o;for(;h<0;)h+=2*Math.PI,d+=2*Math.PI;d-h>2*Math.PI&&(h=0,d=2*Math.PI);const p=(d-h)/a.curveStepCount,f=[];for(let g=h;g<=d;g+=p)f.push([s+c*Math.cos(g),l+u*Math.sin(g)]);return f.push([s+c*Math.cos(d),l+u*Math.sin(d)]),f.push([s,l]),QT([f],a)}(e,t,r,n,i,o,l));return l.stroke!==vA&&c.push(u),this._d("arc",c,l)}curve(e,t){const r=this._o(t),n=[],i=GT(e,r);if(r.fill&&r.fill!==vA)if("solid"===r.fillStyle){const t=GT(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else{const t=[],i=e;if(i.length){const e="number"==typeof i[0][0]?[i]:i;for(const n of e)n.length<3?t.push(...n):3===n.length?t.push(...bA(dA([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):t.push(...bA(dA(n),10,(1+r.roughness)/2))}t.length&&n.push(QT([t],r))}return r.stroke!==vA&&n.push(i),this._d("curve",n,r)}polygon(e,t){const r=this._o(t),n=[],i=UT(e,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(KT([e],r)):n.push(QT([e],r))),r.stroke!==vA&&n.push(i),this._d("polygon",n,r)}path(e,t){const r=this._o(t),n=[];if(!e)return this._d("path",n,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&"transparent"!==r.fill&&r.fill!==vA,o=r.stroke!==vA,a=!!(r.simplification&&r.simplification<1),s=function(e,t,r){const n=zT($T(RT(e))),i=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...bA(s,1)),s=[]},c=()=>{l(),o.length&&(i.push(o),o=[])};for(const{key:h,data:d}of n)switch(h){case"M":c(),a=[d[0],d[1]],o.push(a);break;case"L":l(),o.push([d[0],d[1]]);break;case"C":if(!s.length){const e=o.length?o[o.length-1]:a;s.push([e[0],e[1]])}s.push([d[0],d[1]]),s.push([d[2],d[3]]),s.push([d[4],d[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(c(),!r)return i;const u=[];for(const h of i){const e=yA(h,r);e.length&&u.push(e)}return u}(e,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=ZT(e,r);if(i)if("solid"===r.fillStyle)if(1===s.length){const t=ZT(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else n.push(KT(s,r));else n.push(QT(s,r));return o&&(a?s.forEach(e=>{n.push(UT(e,!1,r))}):n.push(l)),this._d("path",n,r)}opsToPath(e,t){let r="";for(const n of e.ops){const e="number"==typeof t&&t>=0?n.data.map(e=>+e.toFixed(t)):n.data;switch(n.op){case"move":r+=`M${e[0]} ${e[1]} `;break;case"bcurveTo":r+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case"lineTo":r+=`L${e[0]} ${e[1]} `}}return r.trim()}toPaths(e){const t=e.sets||[],r=e.options||this.defaultOptions,n=[];for(const i of t){let e=null;switch(i.type){case"path":e={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:vA};break;case"fillPath":e={d:this.opsToPath(i),stroke:vA,strokeWidth:0,fill:r.fill||vA};break;case"fillSketch":e=this.fillSketch(i,r)}e&&n.push(e)}return n}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||vA,strokeWidth:r,fill:vA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}}const wA="http://www.w3.org/2000/svg";class kA{constructor(e,t){this.svg=e,this.gen=new CA(t)}draw(e){const t=e.sets||[],r=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(wA,"g"),o=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=n.createElementNS(wA,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke",r.stroke),t.setAttribute("stroke-width",r.strokeWidth+""),t.setAttribute("fill","none"),r.strokeLineDash&&t.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":t=n.createElementNS(wA,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",r.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(n,a,r)}t&&i.appendChild(t)}return i}fillSketch(e,t,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const i=e.createElementNS(wA,"path");return i.setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",n+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,r,n,i){const o=this.gen.line(e,t,r,n,i);return this.draw(o)}rectangle(e,t,r,n,i){const o=this.gen.rectangle(e,t,r,n,i);return this.draw(o)}ellipse(e,t,r,n,i){const o=this.gen.ellipse(e,t,r,n,i);return this.draw(o)}circle(e,t,r,n){const i=this.gen.circle(e,t,r,n);return this.draw(i)}linearPath(e,t){const r=this.gen.linearPath(e,t);return this.draw(r)}polygon(e,t){const r=this.gen.polygon(e,t);return this.draw(r)}arc(e,t,r,n,i,o,a=!1,s){const l=this.gen.arc(e,t,r,n,i,o,a,s);return this.draw(l)}curve(e,t){const r=this.gen.curve(e,t);return this.draw(r)}path(e,t){const r=this.gen.path(e,t);return this.draw(r)}}var SA=(e,t)=>new kA(e,t),_A=mu(async(e,t,r)=>{var n,i;let o;const a=t.useHtmlLabels||ip(null==(n=$p())?void 0:n.htmlLabels);o=r||"node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),l=s.insert("g").attr("class","label").attr("style",wS(t.labelStyle));let c;c=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0];const u=await ST(l,Zd(vS(c),$p()),{useHtmlLabels:a,width:t.width||(null==(i=$p().flowchart)?void 0:i.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let h=u.getBBox();const d=((null==t?void 0:t.padding)??0)/2;if(a){const e=u.children[0],t=fg(u),r=e.getElementsByTagName("img");if(r){const e=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(r=>{function n(){if(t.style.display="flex",t.style.flexDirection="column",e){const e=$p().fontSize?$p().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=kd.fontSize]=mS(e),i=n*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";r(t)}mu(n,"setupImage"),setTimeout(()=>{t.complete&&n()}),t.addEventListener("error",n),t.addEventListener("load",n)})))}h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}return a?l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):l.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:d,label:l}},"labelHelper"),TA=mu(async(e,t,r)=>{var n,i,o,a,s,l;const c=r.useHtmlLabels||ip(null==(i=null==(n=$p())?void 0:n.flowchart)?void 0:i.htmlLabels),u=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),h=await ST(u,Zd(vS(t),$p()),{useHtmlLabels:c,width:r.width||(null==(a=null==(o=$p())?void 0:o.flowchart)?void 0:a.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let d=h.getBBox();const p=r.padding/2;if(ip(null==(l=null==(s=$p())?void 0:s.flowchart)?void 0:l.htmlLabels)){const e=h.children[0],t=fg(h);d=e.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return c?u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):u.attr("transform","translate(0, "+-d.height/2+")"),r.centerLabel&&u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:e,bbox:d,halfPadding:p,label:u}},"insertLabel"),AA=mu((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),PA=mu((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function EA(e){const t=e.map((e,t)=>`${0===t?"M":"L"}${e.x},${e.y}`);return t.push("Z"),t.join(" ")}function MA(e,t,r,n,i,o){const a=[],s=r-e,l=n-t,c=s/o,u=2*Math.PI/c,h=t+l/2;for(let d=0;d<=50;d++){const t=e+d/50*s,r=h+i*Math.sin(u*(t-e));a.push({x:t,y:r})}return a}function IA(e,t,r,n,i,o){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:-i,y:-o})}return a}mu(EA,"createPathFromPoints"),mu(MA,"generateFullSineWavePoints"),mu(IA,"generateCirclePoints");var BA=mu((e,t)=>{var r,n,i=e.x,o=e.y,a=t.x-i,s=t.y-o,l=e.width/2,c=e.height/2;return Math.abs(s)*l>Math.abs(a)*c?(s<0&&(c=-c),r=0===s?0:c*a/s,n=c):(a<0&&(l=-l),r=l,n=0===a?0:l*s/a),{x:i+r,y:o+n}},"intersectRect");function LA(e,t){t&&e.attr("style",t)}async function jA(e){const t=fg(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=$p();let i=e.label;e.label&&pp(e.label)&&(i=await mp(e.label.replace(yp.lineBreakRegex,"\n"),n));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>";return r.html(Zd(o,n)),LA(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}mu(LA,"applyStyle"),mu(jA,"addHtmlLabel");var NA=mu(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),ip($p().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),bu.info("vertexText"+i);const e={isNode:n,label:vS(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t?t.replace("fill:","color:"):t};return await jA(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",t.replace("color:","fill:"));let n=[];n="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const t of n){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),r?n.setAttribute("class","title-row"):n.setAttribute("class","row"),n.textContent=t.trim(),e.appendChild(n)}return e}},"createLabel"),DA=mu((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD"),OA=mu(async(e,t)=>{bu.info("Creating subgraph rect for ",t.id,t);const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=AC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=ip(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),f=await ST(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let g=f.getBBox();if(ip(r.flowchart.htmlLabels)){const e=f.children[0],t=fg(f);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-m/2,b=t.y-y/2;let v;if(bu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=SA(h),r=PC(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:i}),n=e.path(DA(x,b,m,y,0),r);v=h.insert(()=>(bu.debug("Rough node insert CXC",n),n),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",u.join(";").replace("fill","stroke"))}else v=h.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=wC(r);if(p.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=v.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return BA(t,e)},{cluster:h,labelBBox:g}},"rect"),FA=mu((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,o=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const a=n.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(e){return BA(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),RA=mu(async(e,t)=>{const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:s,nodeBorder:l}=n,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),u=c.insert("g",":first-child"),h=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const p=h.node().appendChild(await NA(t.label,t.labelStyle,void 0,!0));let f=p.getBBox();if(ip(r.flowchart.htmlLabels)){const e=p.children[0],t=fg(p);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const g=0*t.padding,m=g/2,y=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+g;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height+g,b=t.height+g-f.height-6,v=t.x-y/2,C=t.y-x/2;t.width=y;const w=t.y-t.height/2-m+f.height+2;let k;if("handDrawn"===t.look){const e=t.cssClasses.includes("statediagram-cluster-alt"),r=SA(c),n=t.rx||t.ry?r.path(DA(v,C,y,x,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:i}):r.rectangle(v,C,y,x,{seed:i});k=c.insert(()=>n,":first-child");const u=r.rectangle(v,w,y,b,{fill:e?o:a,fillStyle:e?"hachure":"solid",stroke:l,seed:i});k=c.insert(()=>n,":first-child"),d=c.insert(()=>u)}else{k=u.insert("rect",":first-child");const e="outer";k.attr("class",e).attr("x",v).attr("y",C).attr("width",y).attr("height",x).attr("data-look",t.look),d.attr("class","inner").attr("x",v).attr("y",w).attr("width",y).attr("height",b)}h.attr("transform",`translate(${t.x-f.width/2}, ${C+1-(ip(r.flowchart.htmlLabels)?0:3)})`);const S=k.node().getBBox();return t.height=S.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(e){return BA(t,e)},{cluster:c,labelBBox:f}},"roundedWithTitle"),$A=mu(async(e,t)=>{bu.info("Creating subgraph rect for ",t.id,t);const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=AC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=ip(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),f=await ST(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let g=f.getBBox();if(ip(r.flowchart.htmlLabels)){const e=f.children[0],t=fg(f);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-m/2,b=t.y-y/2;let v;if(bu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=SA(h),r=PC(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:i}),n=e.path(DA(x,b,m,y,t.rx),r);v=h.insert(()=>(bu.debug("Rough node insert CXC",n),n),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",u.join(";").replace("fill","stroke"))}else v=h.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=wC(r);if(p.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=v.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return BA(t,e)},{cluster:h,labelBBox:g}},"kanbanSection"),zA={rect:OA,squareRect:OA,roundedWithTitle:RA,noteGroup:FA,divider:mu((e,t)=>{const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:o}=n,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const u=t.height+l,h=t.x-c/2,d=t.y-u/2;let p;if(t.width=c,"handDrawn"===t.look){const e=SA(a).rectangle(h,d,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:i});p=a.insert(()=>e,":first-child")}else{p=s.insert("rect",":first-child");const e="divider";p.attr("class",e).attr("x",h).attr("y",d).attr("width",c).attr("height",u).attr("data-look",t.look)}const f=p.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return BA(t,e)},{cluster:a,labelBBox:{}}},"divider"),kanbanSection:$A},VA=new Map,WA=mu(async(e,t)=>{const r=t.shape||"rect",n=await zA[r](e,t);return VA.set(t.id,n),n},"insertCluster"),HA=mu(()=>{VA=new Map},"clear");function qA(e,t){return e.intersect(t)}mu(qA,"intersectNode");var UA=qA;function GA(e,t,r,n){var i=e.x,o=e.y,a=i-n.x,s=o-n.y,l=Math.sqrt(t*t*s*s+r*r*a*a),c=Math.abs(t*r*a/l);n.x<i&&(c=-c);var u=Math.abs(t*r*s/l);return n.y<o&&(u=-u),{x:i+c,y:o+u}}mu(GA,"intersectEllipse");var XA=GA;function JA(e,t,r){return XA(e,t,t,r)}mu(JA,"intersectCircle");var YA=JA;function ZA(e,t,r,n){{const i=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,s=i*r.x+o*r.y+a,l=i*n.x+o*n.y+a,c=1e-6;if(0!==s&&0!==l&&KA(s,l))return;const u=n.y-r.y,h=r.x-n.x,d=n.x*r.y-r.x*n.y,p=u*e.x+h*e.y+d,f=u*t.x+h*t.y+d;if(Math.abs(p)<c&&Math.abs(f)<c&&KA(p,f))return;const g=i*h-u*o;if(0===g)return;const m=Math.abs(g/2);let y=o*d-h*a;const x=y<0?(y-m)/g:(y+m)/g;y=u*a-i*d;return{x:x,y:y<0?(y-m)/g:(y+m)/g}}}function KA(e,t){return e*t>0}mu(ZA,"intersectLine"),mu(KA,"sameSign");var QA=ZA;function eP(e,t,r){let n=e.x,i=e.y,o=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof t.forEach?t.forEach(function(e){a=Math.min(a,e.x),s=Math.min(s,e.y)}):(a=Math.min(a,t.x),s=Math.min(s,t.y));let l=n-e.width/2-a,c=i-e.height/2-s;for(let u=0;u<t.length;u++){let n=t[u],i=t[u<t.length-1?u+1:0],a=QA(e,r,{x:l+n.x,y:c+n.y},{x:l+i.x,y:c+i.y});a&&o.push(a)}return o.length?(o.length>1&&o.sort(function(e,t){let n=e.x-r.x,i=e.y-r.y,o=Math.sqrt(n*n+i*i),a=t.x-r.x,s=t.y-r.y,l=Math.sqrt(a*a+s*s);return o<l?-1:o===l?0:1}),o[0]):e}mu(eP,"intersectPolygon");var tP={node:UA,circle:YA,ellipse:XA,polygon:eP,rect:BA};function rP(e,t){const{labelStyles:r}=AC(t);t.labelStyle=r;const n=PA(t);let i=n;n||(i="anchor");const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),{cssStyles:a}=t,s=SA(o),l=PC(t,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==t.look&&(l.roughness=0);const c=s.circle(0,0,2,l),u=o.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",wS(a)),AA(t,u),t.intersect=function(e){return bu.info("Circle intersect",t,1,e),tP.circle(t,1,e)},o}function nP(e,t,r,n,i,o,a){const s=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),u=(r-e)/2/i,h=(n-t)/2/o,d=Math.sqrt(u**2+h**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*o*Math.sin(c)*(a?-1:1),g=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-g)/o,(e-f)/i);let y=Math.atan2((n-g)/o,(r-f)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const e=m+b/19*y,t=f+i*Math.cos(e),r=g+o*Math.sin(e);x.push({x:t,y:r})}return x}async function iP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.width+t.padding+20,s=o.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:u}=t,h=[{x:a/2,y:-s/2},{x:-a/2,y:-s/2},...nP(-a/2,-s/2,-a/2,s/2,c,l,!1),{x:a/2,y:s/2},...nP(a/2,s/2,a/2,-s/2,c,l,!0)],d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=EA(h),g=d.path(f,p),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),AA(t,m),t.intersect=function(e){return tP.polygon(t,h,e)},i}function oP(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function aP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.height+t.padding,s=o.width+t.padding+12,l=-a,c=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let u;const{cssStyles:h}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(c),o=e.path(n,r);u=i.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${a/2})`),h&&u.attr("style",h)}else u=oP(i,s,a,c);return n&&u.attr("style",n),AA(t,u),t.intersect=function(e){return tP.polygon(t,c,e)},i}function sP(e,t){const{nodeStyles:r}=AC(t);t.label="";const n=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],s=SA(n),l=PC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=EA(a),u=s.path(c,l),h=n.insert(()=>u,":first-child");return i&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",i),r&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return tP.polygon(t,a,e)},n}async function lP(e,t,r){const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,halfPadding:s}=await _A(e,t,PA(t)),l=(null==r?void 0:r.padding)??s,c=a.width/2+l;let u;const{cssStyles:h}=t;if("handDrawn"===t.look){const e=SA(o),r=PC(t,{}),n=e.circle(0,0,2*c,r);u=o.insert(()=>n,":first-child"),u.attr("class","basic label-container").attr("style",wS(h))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0);return AA(t,u),t.calcIntersect=function(e,t){const r=e.width/2;return tP.circle(e,r,t)},t.intersect=function(e){return bu.info("Circle intersect",t,c,e),tP.circle(t,c,e)},o}function cP(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=2*e;return`M ${-n/2*t},${n/2*r} L ${n/2*t},${-n/2*r}\n M ${n/2*t},${n/2*r} L ${-n/2*t},${-n/2*r}`}function uP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r,t.label="";const i=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),o=Math.max(30,(null==t?void 0:t.width)??0),{cssStyles:a}=t,s=SA(i),l=PC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,2*o,l),u=cP(o),h=s.path(u,l),d=i.insert(()=>c,":first-child");return d.insert(()=>h),a&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",a),n&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",n),AA(t,d),t.intersect=function(e){bu.info("crossedCircle intersect",t,{radius:o,point:e});return tP.circle(t,o,e)},i}function hP(e,t,r,n=100,i=0,o=180){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:-i,y:-o})}return a}async function dP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...hP(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...hP(s/2+2*c,-c,c,20,-180,-270),...hP(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...hP(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...hP(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...hP(s/2+.1*s,-c,c,20,-180,-270),...hP(s/2+.1*s,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...hP(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=SA(i),f=PC(t,{fill:"none"});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=EA(h).replace("Z",""),m=p.path(g,f),y=EA(d),x=p.path(y,{...f}),b=i.insert("g",":first-child");return b.insert(()=>x,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${c}, 0)`),a.attr("transform",`translate(${-s/2+c-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,b),t.intersect=function(e){return tP.polygon(t,d,e)},i}function pP(e,t,r,n=100,i=0,o=180){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:i,y:o})}return a}async function fP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...pP(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...pP(s/2+2*c,-c,c,20,-180,-270),...pP(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...pP(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...pP(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...pP(s/2+2*c,-c,c,20,-180,-270),...pP(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...pP(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=SA(i),f=PC(t,{fill:"none"});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=EA(h).replace("Z",""),m=p.path(g,f),y=EA(d),x=p.path(y,{...f}),b=i.insert("g",":first-child");return b.insert(()=>x,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-c}, 0)`),a.attr("transform",`translate(${-s/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,b),t.intersect=function(e){return tP.polygon(t,d,e)},i}function gP(e,t,r,n=100,i=0,o=180){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:-i,y:-o})}return a}async function mP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...gP(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...gP(s/2+2*c,-c,c,20,-180,-270),...gP(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...gP(s/2,l/2,c,20,0,90)],d=[...gP(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...gP(-s/2-c/2,-c,c,20,0,90),...gP(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...gP(-s/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...gP(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...gP(s/2+2*c,-c,c,20,-180,-270),...gP(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...gP(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...gP(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...gP(-s/2-c/2,-c,c,20,0,90),...gP(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...gP(-s/2+c+c/2,l/2,c,30,-180,-270)],f=SA(i),g=PC(t,{fill:"none"});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=EA(h).replace("Z",""),y=f.path(m,g),x=EA(d).replace("Z",""),b=f.path(x,g),v=EA(p),C=f.path(v,{...g}),w=i.insert("g",":first-child");return w.insert(()=>C,":first-child").attr("stroke-opacity",0),w.insert(()=>y,":first-child"),w.insert(()=>b,":first-child"),w.attr("class","text"),u&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(${c-c/4}, 0)`),a.attr("transform",`translate(${-s/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,w),t.intersect=function(e){return tP.polygon(t,p,e)},i}async function yP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(80,1.25*(o.width+2*(t.padding??0)),(null==t?void 0:t.width)??0),s=Math.max(20,o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=s/2,{cssStyles:c}=t,u=SA(i),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=a-l,p=s/4,f=[{x:d,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:d,y:s},...IA(-d,-s/2,l,50,270,90)],g=EA(f),m=u.path(g,h),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-a/2}, ${-s/2})`),AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}mu(rP,"anchor"),mu(nP,"generateArcPoints"),mu(iP,"bowTieRect"),mu(oP,"insertPolygonShape"),mu(aP,"card"),mu(sP,"choice"),mu(lP,"circle"),mu(cP,"createLine"),mu(uP,"crossedCircle"),mu(hP,"generateCirclePoints"),mu(dP,"curlyBraceLeft"),mu(pP,"generateCirclePoints"),mu(fP,"curlyBraceRight"),mu(gP,"generateCirclePoints"),mu(mP,"curlyBraces"),mu(yP,"curvedTrapezoid");var xP=mu((e,t,r,n,i,o)=>[`M${e},${t+o}`,`a${i},${o} 0,0,0 ${r},0`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),bP=mu((e,t,r,n,i,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),vP=mu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function CP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),u=Math.max(o.height+c+t.padding,t.height??0);let h;const{cssStyles:d}=t;if("handDrawn"===t.look){const e=SA(i),r=bP(0,0,s,u,l,c),n=vP(0,c,s,u,l,c),o=e.path(r,PC(t,{})),a=e.path(n,PC(t,{fill:"none"}));h=i.insert(()=>a,":first-child"),h=i.insert(()=>o,":first-child"),h.attr("class","basic label-container"),d&&h.attr("style",d)}else{const e=xP(0,0,s,u,l,c);h=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wS(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),AA(t,h),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(t.padding??0)/1.5-(o.y-(o.top??0))})`),t.intersect=function(e){const r=tP.rect(t,e),n=r.x-(t.x??0);if(0!=l&&(Math.abs(n)<(t.width??0)/2||Math.abs(n)==(t.width??0)/2&&Math.abs(r.y-(t.y??0))>(t.height??0)/2-c)){let i=c*c*(1-n*n/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,e.y-(t.y??0)>0&&(i=-i),r.y+=i}return r},i}async function wP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+t.padding,l=o.height+t.padding,c=.2*l,u=-s/2,h=-l/2-c/2,{cssStyles:d}=t,p=SA(i),f=PC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:u,y:h+c},{x:-u,y:h+c},{x:-u,y:-h},{x:u,y:-h},{x:u,y:h},{x:-u,y:h},{x:-u,y:h+c}],m=p.polygon(g.map(e=>[e.x,e.y]),f),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),a.attr("transform",`translate(${u+(t.padding??0)/2-(o.x-(o.left??0))}, ${h+c+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.rect(t,e)},i}async function kP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=AC(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:l}=await _A(e,t,PA(t)),c=s.width/2+l+5,u=s.width/2+l;let h;const{cssStyles:d}=t;if("handDrawn"===t.look){const e=SA(a),i=PC(t,{roughness:.2,strokeWidth:2.5}),o=PC(t,{roughness:.2,strokeWidth:1.5}),s=e.circle(0,0,2*c,i),l=e.circle(0,0,2*u,o);h=a.insert("g",":first-child"),h.attr("class",wS(t.cssClasses)).attr("style",wS(d)),null==(r=h.node())||r.appendChild(s),null==(n=h.node())||n.appendChild(l)}else{h=a.insert("g",":first-child");const e=h.insert("circle",":first-child"),t=h.insert("circle");h.attr("class","basic label-container").attr("style",o),e.attr("class","outer-circle").attr("style",o).attr("r",c).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",o).attr("r",u).attr("cx",0).attr("cy",0)}return AA(t,h),t.intersect=function(e){return bu.info("DoubleCircle intersect",t,c,e),tP.circle(t,c,e)},a}function SP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=AC(t);t.label="",t.labelStyle=n;const o=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=SA(o),{nodeBorder:l}=r,c=PC(t,{fillStyle:"solid"});"handDrawn"!==t.look&&(c.roughness=0);const u=s.circle(0,0,14,c),h=o.insert(()=>u,":first-child");return h.selectAll("path").attr("style",`fill: ${l} !important;`),a&&a.length>0&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",a),i&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",i),AA(t,h),t.intersect=function(e){bu.info("filledCircle intersect",t,{radius:7,point:e});return tP.circle(t,7,e)},o}async function _P(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=s+o.height,c=s+o.height,u=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=EA(u),g=d.path(f,p),m=i.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return h&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),t.width=s,t.height=l,AA(t,m),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-l/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(e){return bu.info("Triangle intersect",t,u,e),tP.polygon(t,u,e)},i}function TP(e,t,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:o}=AC(t);t.label="";const a=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(null==t?void 0:t.width)??0),c=Math.max(10,(null==t?void 0:t.height)??0);"LR"===r&&(l=Math.max(10,(null==t?void 0:t.width)??0),c=Math.max(70,(null==t?void 0:t.height)??0));const u=-1*l/2,h=-1*c/2,d=SA(a),p=PC(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=d.rectangle(u,h,l,c,p),g=a.insert(()=>f,":first-child");s&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",s),o&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",o),AA(t,g);const m=(null==n?void 0:n.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(e){return tP.rect(t,e)},a}async function AP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(80,o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(50,o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=s/2,{cssStyles:c}=t,u=SA(i),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-a/2,y:-s/2},{x:a/2-l,y:-s/2},...IA(-a/2+l,0,l,50,90,270),{x:a/2-l,y:s/2},{x:-a/2,y:s/2}],p=EA(d),f=u.path(p,h),g=i.insert(()=>f,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",n),AA(t,g),t.intersect=function(e){bu.info("Pill intersect",t,{radius:l,point:e});return tP.polygon(t,d,e)},i}async function PP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.height+(t.padding??0),s=o.width+2.5*(t.padding??0),{cssStyles:l}=t,c=SA(i),u=PC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let h=s/2;h+=h/6;const d=a/2,p=h-d/2,f=[{x:-p,y:-d},{x:0,y:-d},{x:p,y:-d},{x:h,y:0},{x:p,y:d},{x:0,y:d},{x:-p,y:d},{x:-h,y:0}],g=EA(f),m=c.path(g,u),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",l),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),t.width=s,t.height=a,AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function EP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.label="",t.labelStyle=r;const{shapeSvg:i}=await _A(e,t,PA(t)),o=Math.max(30,(null==t?void 0:t.width)??0),a=Math.max(30,(null==t?void 0:t.height)??0),{cssStyles:s}=t,l=SA(i),c=PC(t,{});"handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],h=EA(u),d=l.path(h,c),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",s),n&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-o/2}, ${-a/2})`),AA(t,p),t.intersect=function(e){bu.info("Pill intersect",t,{points:u});return tP.polygon(t,u,e)},i}async function MP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,label:h}=await _A(e,t,"icon-shape default"),d="t"===t.pos,p=s,f=s,{nodeBorder:g}=r,{stylesMap:m}=SC(t),y=-f/2,x=-p/2,b=t.label?8:0,v=SA(c),C=PC(t,{stroke:"none",fill:"none"});"handDrawn"!==t.look&&(C.roughness=0,C.fillStyle="solid");const w=v.rectangle(y,x,f,p,C),k=Math.max(f,u.width),S=p+u.height+b,_=v.rectangle(-k/2,-S/2,k,S,{...C,fill:"transparent",stroke:"none"}),T=c.insert(()=>w,":first-child"),A=c.insert(()=>_);if(t.icon){const e=c.append("g");e.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=e.node().getBBox(),n=r.width,i=r.height,o=r.x,a=r.y;e.attr("transform",`translate(${-n/2-o},${d?u.height/2+b/2-i/2-a:-u.height/2-b/2-i/2-a})`),e.attr("style",`color: ${m.get("stroke")??g};`)}return h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-S/2:S/2-u.height})`),T.attr("transform",`translate(0,${d?u.height/2+b/2:-u.height/2-b/2})`),AA(t,A),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=d?[{x:r-u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2+u.height+b},{x:r+f/2,y:n-i/2+u.height+b},{x:r+f/2,y:n+i/2},{x:r-f/2,y:n+i/2},{x:r-f/2,y:n-i/2+u.height+b},{x:r-u.width/2,y:n-i/2+u.height+b}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+p},{x:r+u.width/2,y:n-i/2+p},{x:r+u.width/2/2,y:n+i/2},{x:r-u.width/2,y:n+i/2},{x:r-u.width/2,y:n-i/2+p},{x:r-f/2,y:n-i/2+p}];return tP.polygon(t,o,e)},c}async function IP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,label:h}=await _A(e,t,"icon-shape default"),d=t.label?8:0,p="t"===t.pos,{nodeBorder:f,mainBkg:g}=r,{stylesMap:m}=SC(t),y=SA(c),x=PC(t,{});"handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid");const b=m.get("fill");x.stroke=b??g;const v=c.append("g");t.icon&&v.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=v.node().getBBox(),w=C.width,k=C.height,S=C.x,_=C.y,T=Math.max(w,k)*Math.SQRT2+40,A=y.circle(0,0,T,x),P=Math.max(T,u.width),E=T+u.height+d,M=y.rectangle(-P/2,-E/2,P,E,{...x,fill:"transparent",stroke:"none"}),I=c.insert(()=>A,":first-child"),B=c.insert(()=>M);return v.attr("transform",`translate(${-w/2-S},${p?u.height/2+d/2-k/2-_:-u.height/2-d/2-k/2-_})`),v.attr("style",`color: ${m.get("stroke")??f};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-E/2:E/2-u.height})`),I.attr("transform",`translate(0,${p?u.height/2+d/2:-u.height/2-d/2})`),AA(t,B),t.intersect=function(e){bu.info("iconSquare intersect",t,e);return tP.rect(t,e)},c}async function BP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await _A(e,t,"icon-shape default"),p="t"===t.pos,f=s+2*h,g=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=SC(t),b=-g/2,v=-f/2,C=t.label?8:0,w=SA(c),k=PC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=x.get("fill");k.stroke=S??y;const _=w.path(DA(b,v,g,f,5),k),T=Math.max(g,u.width),A=f+u.height+C,P=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),E=c.insert(()=>_,":first-child").attr("class","icon-shape2"),M=c.insert(()=>P);if(t.icon){const e=c.append("g");e.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=e.node().getBBox(),n=r.width,i=r.height,o=r.x,a=r.y;e.attr("transform",`translate(${-n/2-o},${p?u.height/2+C/2-i/2-a:-u.height/2-C/2-i/2-a})`),e.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),E.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),AA(t,M),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=p?[{x:r-u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2+u.height+C},{x:r+g/2,y:n-i/2+u.height+C},{x:r+g/2,y:n+i/2},{x:r-g/2,y:n+i/2},{x:r-g/2,y:n-i/2+u.height+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/2,y:n-i/2+f},{x:r+u.width/2,y:n-i/2+f},{x:r+u.width/2/2,y:n+i/2},{x:r-u.width/2,y:n+i/2},{x:r-u.width/2,y:n-i/2+f},{x:r-g/2,y:n-i/2+f}];return tP.polygon(t,o,e)},c}async function LP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await _A(e,t,"icon-shape default"),p="t"===t.pos,f=s+2*h,g=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=SC(t),b=-g/2,v=-f/2,C=t.label?8:0,w=SA(c),k=PC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=x.get("fill");k.stroke=S??y;const _=w.path(DA(b,v,g,f,.1),k),T=Math.max(g,u.width),A=f+u.height+C,P=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),E=c.insert(()=>_,":first-child"),M=c.insert(()=>P);if(t.icon){const e=c.append("g");e.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=e.node().getBBox(),n=r.width,i=r.height,o=r.x,a=r.y;e.attr("transform",`translate(${-n/2-o},${p?u.height/2+C/2-i/2-a:-u.height/2-C/2-i/2-a})`),e.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),E.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),AA(t,M),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=p?[{x:r-u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2+u.height+C},{x:r+g/2,y:n-i/2+u.height+C},{x:r+g/2,y:n+i/2},{x:r-g/2,y:n+i/2},{x:r-g/2,y:n-i/2+u.height+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/2,y:n-i/2+f},{x:r+u.width/2,y:n-i/2+f},{x:r+u.width/2/2,y:n+i/2},{x:r-u.width/2,y:n+i/2},{x:r-u.width/2,y:n-i/2+f},{x:r-g/2,y:n-i/2+f}];return tP.polygon(t,o,e)},c}async function jP(e,t,{config:{flowchart:r}}){const n=new Image;n.src=(null==t?void 0:t.img)??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/o;const{labelStyles:a}=AC(t);t.labelStyle=a;const s=null==r?void 0:r.wrappingWidth;t.defaultWidth=null==r?void 0:r.wrappingWidth;const l=Math.max(t.label?s??0:0,(null==t?void 0:t.assetWidth)??i),c="on"===t.constraint&&(null==t?void 0:t.assetHeight)?t.assetHeight*t.imageAspectRatio:l,u="on"===t.constraint?c/t.imageAspectRatio:(null==t?void 0:t.assetHeight)??o;t.width=Math.max(c,s??0);const{shapeSvg:h,bbox:d,label:p}=await _A(e,t,"image-shape default"),f="t"===t.pos,g=-c/2,m=-u/2,y=t.label?8:0,x=SA(h),b=PC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=x.rectangle(g,m,c,u,b),C=Math.max(c,d.width),w=u+d.height+y,k=x.rectangle(-C/2,-w/2,C,w,{...b,fill:"none",stroke:"none"}),S=h.insert(()=>v,":first-child"),_=h.insert(()=>k);if(t.img){const e=h.append("image");e.attr("href",t.img),e.attr("width",c),e.attr("height",u),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-c/2},${f?w/2-u:-w/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${f?-u/2-d.height/2-y/2:u/2-d.height/2+y/2})`),S.attr("transform",`translate(0,${f?d.height/2+y/2:-d.height/2-y/2})`),AA(t,_),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=f?[{x:r-d.width/2,y:n-i/2},{x:r+d.width/2,y:n-i/2},{x:r+d.width/2,y:n-i/2+d.height+y},{x:r+c/2,y:n-i/2+d.height+y},{x:r+c/2,y:n+i/2},{x:r-c/2,y:n+i/2},{x:r-c/2,y:n-i/2+d.height+y},{x:r-d.width/2,y:n-i/2+d.height+y}]:[{x:r-c/2,y:n-i/2},{x:r+c/2,y:n-i/2},{x:r+c/2,y:n-i/2+u},{x:r+d.width/2,y:n-i/2+u},{x:r+d.width/2/2,y:n+i/2},{x:r-d.width/2,y:n+i/2},{x:r-d.width/2,y:n-i/2+u},{x:r-c/2,y:n-i/2+u}];return tP.polygon(t,o,e)},h}async function NP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=[{x:0,y:0},{x:a,y:0},{x:a+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}async function DP(e,t,r){const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a}=await _A(e,t,PA(t)),s=Math.max(a.width+2*r.labelPaddingX,(null==t?void 0:t.width)||0),l=Math.max(a.height+2*r.labelPaddingY,(null==t?void 0:t.height)||0),c=-s/2,u=-l/2;let h,{rx:d,ry:p}=t;const{cssStyles:f}=t;if((null==r?void 0:r.rx)&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===t.look){const e=SA(o),r=PC(t,{}),n=d||p?e.path(DA(c,u,s,l,d||0),r):e.rectangle(c,u,s,l,r);h=o.insert(()=>n,":first-child"),h.attr("class","basic label-container").attr("style",wS(f))}else h=o.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",wS(d)).attr("ry",wS(p)).attr("x",c).attr("y",u).attr("width",s).attr("height",l);return AA(t,h),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return tP.rect(t,e)},o}async function OP(e,t){const{shapeSvg:r,bbox:n,label:i}=await _A(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),AA(t,o),t.intersect=function(e){return tP.rect(t,e)},r}async function FP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+(t.padding??0),(null==t?void 0:t.height)??0),l=[{x:0,y:0},{x:a+3*s/6,y:0},{x:a,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}async function RP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+(t.padding??0),(null==t?void 0:t.height)??0),l=[{x:-3*s/6,y:0},{x:a,y:0},{x:a+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}function $P(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.label="",t.labelStyle=r;const i=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,(null==t?void 0:t.width)??0),s=Math.max(35,(null==t?void 0:t.height)??0),l=[{x:a,y:0},{x:0,y:s+3.5},{x:a-14,y:s+3.5},{x:0,y:2*s},{x:a,y:s-3.5},{x:14,y:s-3.5}],c=SA(i),u=PC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");const h=EA(l),d=c.path(h,u),p=i.insert(()=>d,":first-child");return o&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",o),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${a/2},${-s})`),AA(t,p),t.intersect=function(e){bu.info("lightningBolt intersect",t,e);return tP.polygon(t,l,e)},i}mu(CP,"cylinder"),mu(wP,"dividedRectangle"),mu(kP,"doublecircle"),mu(SP,"filledCircle"),mu(_P,"flippedTriangle"),mu(TP,"forkJoin"),mu(AP,"halfRoundedRectangle"),mu(PP,"hexagon"),mu(EP,"hourglass"),mu(MP,"icon"),mu(IP,"iconCircle"),mu(BP,"iconRounded"),mu(LP,"iconSquare"),mu(jP,"imageSquare"),mu(NP,"inv_trapezoid"),mu(DP,"drawRect"),mu(OP,"labelRect"),mu(FP,"lean_left"),mu(RP,"lean_right"),mu($P,"lightningBolt");var zP=mu((e,t,r,n,i,o,a)=>[`M${e},${t+o}`,`a${i},${o} 0,0,0 ${r},0`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n,`M${e},${t+o+a}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),VP=mu((e,t,r,n,i,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n,`M${e},${t+o+a}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),WP=mu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function HP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),u=Math.max(o.height+c+(t.padding??0),t.height??0),h=.1*u;let d;const{cssStyles:p}=t;if("handDrawn"===t.look){const e=SA(i),r=VP(0,0,s,u,l,c,h),n=WP(0,c,s,u,l,c),o=PC(t,{}),a=e.path(r,o),f=e.path(n,o);i.insert(()=>f,":first-child").attr("class","line"),d=i.insert(()=>a,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const e=zP(0,0,s,u,l,c,h);d=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wS(p)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),AA(t,d),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+c-(o.y-(o.top??0))})`),t.intersect=function(e){const r=tP.rect(t,e),n=r.x-(t.x??0);if(0!=l&&(Math.abs(n)<(t.width??0)/2||Math.abs(n)==(t.width??0)/2&&Math.abs(r.y-(t.y??0))>(t.height??0)/2-c)){let i=c*c*(1-n*n/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,e.y-(t.y??0)>0&&(i=-i),r.y+=i}return r},i}async function qP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/4,u=l+c,{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=[{x:-s/2-s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:u/2},...MA(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,c,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2},{x:-s/2,y:-u/2},{x:-s/2,y:u/2*1.1},{x:-s/2,y:-u/2}],g=d.polygon(f.map(e=>[e.x,e.y]),p),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),AA(t,m),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function UP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=-s/2,u=-l/2,{cssStyles:h}=t,d=SA(i),p=PC(t,{}),f=[{x:c-5,y:u+5},{x:c-5,y:u+l+5},{x:c+s-5,y:u+l+5},{x:c+s-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u+l-5},{x:c+s+5,y:u+l-5},{x:c+s+5,y:u-5},{x:c+5,y:u-5},{x:c+5,y:u},{x:c,y:u},{x:c,y:u+5}],g=[{x:c,y:u+5},{x:c+s-5,y:u+5},{x:c+s-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u},{x:c,y:u}];"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const m=EA(f),y=d.path(m,p),x=EA(g),b=d.path(x,{...p,fill:"none"}),v=i.insert(()=>b,":first-child");return v.insert(()=>y,":first-child"),v.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),a.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),AA(t,v),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function GP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/4,u=l+c,h=-s/2,d=-u/2,{cssStyles:p}=t,f=MA(h-5,d+u+5,h+s-5,d+u+5,c,.8),g=null==f?void 0:f[f.length-1],m=[{x:h-5,y:d+5},{x:h-5,y:d+u+5},...f,{x:h+s-5,y:g.y-5},{x:h+s,y:g.y-5},{x:h+s,y:g.y-10},{x:h+s+5,y:g.y-10},{x:h+s+5,y:d-5},{x:h+5,y:d-5},{x:h+5,y:d},{x:h,y:d},{x:h,y:d+5}],y=[{x:h,y:d+5},{x:h+s-5,y:d+5},{x:h+s-5,y:g.y-5},{x:h+s,y:g.y-5},{x:h+s,y:d},{x:h,y:d}],x=SA(i),b=PC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=EA(m),C=x.path(v,b),w=EA(y),k=x.path(w,b),S=i.insert(()=>C,":first-child");return S.insert(()=>k),S.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-c/2-(o.y-(o.top??0))})`),AA(t,S),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function XP(e,t,{config:{themeVariables:r}}){var n;const{labelStyles:i,nodeStyles:o}=AC(t);t.labelStyle=i;t.useHtmlLabels||!1!==(null==(n=Dd().flowchart)?void 0:n.htmlLabels)||(t.centerLabel=!0);const{shapeSvg:a,bbox:s,label:l}=await _A(e,t,PA(t)),c=Math.max(s.width+2*(t.padding??0),(null==t?void 0:t.width)??0),u=Math.max(s.height+2*(t.padding??0),(null==t?void 0:t.height)??0),h=-c/2,d=-u/2,{cssStyles:p}=t,f=SA(a),g=PC(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=f.rectangle(h,d,c,u,g),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",p),o&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",o),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),AA(t,y),t.intersect=function(e){return tP.rect(t,e)},a}mu(HP,"linedCylinder"),mu(qP,"linedWaveEdgedRect"),mu(UP,"multiRect"),mu(GP,"multiWaveEdgedRectangle"),mu(XP,"note");var JP=mu((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function YP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.width+t.padding+(o.height+t.padding),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];let l;const{cssStyles:c}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=JP(0,0,a),o=e.path(n,r);l=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2+.5}, ${a/2})`),c&&l.attr("style",c)}else l=oP(i,a,a,s),l.attr("transform",`translate(${-a/2+.5}, ${a/2})`);return n&&l.attr("style",n),AA(t,l),t.calcIntersect=function(e,t){const r=e.width,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],i=tP.polygon(e,n,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}async function ZP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=-Math.max(o.width+(t.padding??0),(null==t?void 0:t.width)??0)/2,l=-Math.max(o.height+(t.padding??0),(null==t?void 0:t.height)??0)/2,c=l/2,u=[{x:s+c,y:l},{x:s,y:0},{x:s+c,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=EA(u),g=d.path(f,p),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${-c/2},0)`),a.attr("transform",`translate(${-c/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),AA(t,m),t.intersect=function(e){return tP.polygon(t,u,e)},i}async function KP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=AC(t);let a;t.labelStyle=i,a=t.cssClasses?"node "+t.cssClasses:"node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("g"),c=s.insert("g").attr("class","label").attr("style",o),u=t.description,h=t.label,d=c.node().appendChild(await NA(h,t.labelStyle,!0,!0));let p={width:0,height:0};if(ip(null==(n=null==(r=$p())?void 0:r.flowchart)?void 0:n.htmlLabels)){const e=d.children[0],t=fg(d);p=e.getBoundingClientRect(),t.attr("width",p.width),t.attr("height",p.height)}bu.info("Text 2",u);const f=u||[],g=d.getBBox(),m=c.node().appendChild(await NA(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),y=m.children[0],x=fg(m);p=y.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(t.padding||0)/2;fg(m).attr("transform","translate( "+(p.width>g.width?0:(g.width-p.width)/2)+", "+(g.height+b+5)+")"),fg(d).attr("transform","translate( "+(p.width<g.width?0:-(g.width-p.width)/2)+", 0)"),p=c.node().getBBox(),c.attr("transform","translate("+-p.width/2+", "+(-p.height/2-b+3)+")");const v=p.width+(t.padding||0),C=p.height+(t.padding||0),w=-p.width/2-b,k=-p.height/2-b;let S,_;if("handDrawn"===t.look){const e=SA(s),r=PC(t,{}),n=e.path(DA(w,k,v,C,t.rx||0),r),i=e.line(-p.width/2-b,-p.height/2-b+g.height+b,p.width/2+b,-p.height/2-b+g.height+b,r);_=s.insert(()=>(bu.debug("Rough node insert CXC",n),i),":first-child"),S=s.insert(()=>(bu.debug("Rough node insert CXC",n),n),":first-child")}else S=l.insert("rect",":first-child"),_=l.insert("line"),S.attr("class","outer title-state").attr("style",o).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(t.padding||0)).attr("height",p.height+(t.padding||0)),_.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+g.height+b).attr("y2",-p.height/2-b+g.height+b);return AA(t,S),t.intersect=function(e){return tP.rect(t,e)},s}function QP(e,t,r,n,i,o,a){const s=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),u=(r-e)/2/i,h=(n-t)/2/o,d=Math.sqrt(u**2+h**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*o*Math.sin(c)*(a?-1:1),g=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-g)/o,(e-f)/i);let y=Math.atan2((n-g)/o,(r-f)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const e=m+b/19*y,t=f+i*Math.cos(e),r=g+o*Math.sin(e);x.push({x:t,y:r})}return x}async function eE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=(null==t?void 0:t.padding)??0,s=(null==t?void 0:t.padding)??0,l=((null==t?void 0:t.width)?null==t?void 0:t.width:o.width)+2*a,c=((null==t?void 0:t.height)?null==t?void 0:t.height:o.height)+2*s,u=t.radius||5,h=t.taper||5,{cssStyles:d}=t,p=SA(i),f=PC(t,{});t.stroke&&(f.stroke=t.stroke),"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...QP(l/2-h,-c/2,l/2,-c/2+h,u,u,!0),{x:l/2,y:-c/2+h},{x:l/2,y:c/2-h},...QP(l/2,c/2-h,l/2-h,c/2,u,u,!0),{x:l/2-h,y:c/2},{x:-l/2+h,y:c/2},...QP(-l/2+h,c/2,-l/2,c/2-h,u,u,!0),{x:-l/2,y:c/2-h},{x:-l/2,y:-c/2+h},...QP(-l/2,-c/2+h,-l/2+h,-c/2,u,u,!0)],m=EA(g),y=p.path(m,f),x=i.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),d&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",n),AA(t,x),t.intersect=function(e){return tP.polygon(t,g,e)},i}async function tE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=(null==t?void 0:t.padding)??0,l=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),u=-o.width/2-s,h=-o.height/2-s,{cssStyles:d}=t,p=SA(i),f=PC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:u,y:h},{x:u+l+8,y:h},{x:u+l+8,y:h+c},{x:u-8,y:h+c},{x:u-8,y:h},{x:u,y:h},{x:u,y:h+c}],m=p.polygon(g.map(e=>[e.x,e.y]),f),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container").attr("style",wS(d)),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),d&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),a.attr("transform",`translate(${-l/2+4+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.rect(t,e)},i}async function rE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=-s/2,u=-l/2,{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=[{x:c,y:u},{x:c,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-l/2}],g=EA(f),m=d.path(g,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",h),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))}, ${-l/4+(t.padding??0)-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function nE(e,t){return DP(e,t,{rx:0,ry:0,labelPaddingX:t.labelPaddingX??2*((null==t?void 0:t.padding)||0),labelPaddingY:1*((null==t?void 0:t.padding)||0)})}async function iE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.height+t.padding,s=o.width+a/4+t.padding,l=a/2,{cssStyles:c}=t,u=SA(i),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-s/2+l,y:-a/2},{x:s/2-l,y:-a/2},...IA(-s/2+l,0,l,50,90,270),{x:s/2-l,y:a/2},...IA(s/2-l,0,l,50,270,450)],p=EA(d),f=u.path(p,h),g=i.insert(()=>f,":first-child");return g.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",n),AA(t,g),t.intersect=function(e){return tP.polygon(t,d,e)},i}async function oE(e,t){return DP(e,t,{rx:5,ry:5})}function aE(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{cssStyles:o}=t,{lineColor:a,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),u=SA(c),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=u.circle(0,0,14,{...h,stroke:a,strokeWidth:2}),p=s??l,f=u.circle(0,0,5,{...h,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),g=c.insert(()=>d,":first-child");return g.insert(()=>f),o&&g.selectAll("path").attr("style",o),i&&g.selectAll("path").attr("style",i),AA(t,g),t.intersect=function(e){return tP.circle(t,7,e)},c}function sE(e,t,{config:{themeVariables:r}}){const{lineColor:n}=r,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if("handDrawn"===t.look){const e=SA(i).circle(0,0,14,kC(n));o=i.insert(()=>e),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=i.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return AA(t,o),t.intersect=function(e){return tP.circle(t,7,e)},i}async function lE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=((null==t?void 0:t.padding)||0)/2,s=o.width+t.padding,l=o.height+t.padding,c=-o.width/2-a,u=-o.height/2-a,h=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=e.rectangle(c-8,u,s+16,l,r),o=e.line(c,u,c,u+l,r),a=e.line(c+s,u,c+s,u+l,r);i.insert(()=>o,":first-child"),i.insert(()=>a,":first-child");const h=i.insert(()=>n,":first-child"),{cssStyles:d}=t;h.attr("class","basic label-container").attr("style",wS(d)),AA(t,h)}else{const e=oP(i,s,l,h);n&&e.attr("style",n),AA(t,e)}return t.intersect=function(e){return tP.polygon(t,h,e)},i}async function cE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=-a/2,c=-s/2,u=.2*s,h=.2*s,{cssStyles:d}=t,p=SA(i),f=PC(t,{}),g=[{x:l-u/2,y:c},{x:l+a+u/2,y:c},{x:l+a+u/2,y:c+s},{x:l-u/2,y:c+s}],m=[{x:l+a-u/2,y:c+s},{x:l+a+u/2,y:c+s},{x:l+a+u/2,y:c+s-h}];"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const y=EA(g),x=p.path(y,f),b=EA(m),v=p.path(b,{...f,fillStyle:"solid"}),C=i.insert(()=>v,":first-child");return C.insert(()=>x,":first-child"),C.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",n),AA(t,C),t.intersect=function(e){return tP.polygon(t,g,e)},i}async function uE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/4,u=.2*s,h=.2*l,d=l+c,{cssStyles:p}=t,f=SA(i),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-s/2-s/2*.1,y:d/2},...MA(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,c,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2}],y=-s/2+s/2*.1,x=-d/2-.4*h,b=[{x:y+s-u,y:1.4*(x+l)},{x:y+s,y:x+l-h},{x:y+s,y:.9*(x+l)},...MA(y+s,1.3*(x+l),y+s-u,1.5*(x+l),.03*-l,.5)],v=EA(m),C=f.path(v,g),w=EA(b),k=f.path(w,{...g,fillStyle:"solid"}),S=i.insert(()=>k,":first-child");return S.insert(()=>C,":first-child"),S.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),AA(t,S),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function hE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+t.padding,(null==t?void 0:t.width)||0),s=Math.max(o.height+t.padding,(null==t?void 0:t.height)||0),l=-a/2,c=-s/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",s),AA(t,u),t.intersect=function(e){return tP.rect(t,e)},i}mu(YP,"question"),mu(ZP,"rect_left_inv_arrow"),mu(KP,"rectWithTitle"),mu(QP,"generateArcPoints"),mu(eE,"roundedRect"),mu(tE,"shadedProcess"),mu(rE,"slopedRect"),mu(nE,"squareRect"),mu(iE,"stadium"),mu(oE,"state"),mu(aE,"stateEnd"),mu(sE,"stateStart"),mu(lE,"subroutine"),mu(cE,"taggedRect"),mu(uE,"taggedWaveEdgedRectangle"),mu(hE,"text");var dE=mu((e,t,r,n,i,o)=>`M${e},${t}\n a${i},${o} 0,0,1 0,${-n}\n l${r},0\n a${i},${o} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${o} 0,0,0 0,${n}\n l${-r},0`,"createCylinderPathD"),pE=mu((e,t,r,n,i,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fE=mu((e,t,r,n,i,o)=>[`M${e+r/2},${-n/2}`,`a${i},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function gE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a,halfPadding:s}=await _A(e,t,PA(t)),l="neo"===t.look?2*s:s,c=o.height+l,u=c/2,h=u/(2.5+c/50),d=o.width+h+l,{cssStyles:p}=t;let f;if("handDrawn"===t.look){const e=SA(i),r=pE(0,0,d,c,h,u),n=fE(0,0,d,c,h,u),o=e.path(r,PC(t,{})),a=e.path(n,PC(t,{fill:"none"}));f=i.insert(()=>a,":first-child"),f=i.insert(()=>o,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const e=dE(0,0,d,c,h,u);f=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wS(p)).attr("style",n),f.attr("class","basic label-container"),p&&f.selectAll("path").attr("style",p),n&&f.selectAll("path").attr("style",n)}return f.attr("label-offset-x",h),f.attr("transform",`translate(${-d/2}, ${c/2} )`),a.attr("transform",`translate(${-o.width/2-h-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),AA(t,f),t.intersect=function(e){const r=tP.rect(t,e),n=r.y-(t.y??0);if(0!=u&&(Math.abs(n)<(t.height??0)/2||Math.abs(n)==(t.height??0)/2&&Math.abs(r.x-(t.x??0))>(t.width??0)/2-h)){let i=h*h*(1-n*n/(u*u));0!=i&&(i=Math.sqrt(Math.abs(i))),i=h-i,e.x-(t.x??0)>0&&(i=-i),r.x+=i}return r},i}async function mE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.width+t.padding,s=o.height+t.padding,l=[{x:-3*s/6,y:0},{x:a+3*s/6,y:0},{x:a,y:-s},{x:0,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}async function yE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(60,o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(20,o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),{cssStyles:l}=t,c=SA(i),u=PC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");const h=[{x:-a/2*.8,y:-s/2},{x:a/2*.8,y:-s/2},{x:a/2,y:-s/2*.6},{x:a/2,y:s/2},{x:-a/2,y:s/2},{x:-a/2,y:-s/2*.6}],d=EA(h),p=c.path(d,u),f=i.insert(()=>p,":first-child");return f.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",l),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),AA(t,f),t.intersect=function(e){return tP.polygon(t,h,e)},i}async function xE(e,t){var r;const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,label:s}=await _A(e,t,PA(t)),l=ip(null==(r=$p().flowchart)?void 0:r.htmlLabels),c=a.width+(t.padding??0),u=c+a.height,h=c+a.height,d=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:p}=t,f=SA(o),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=EA(d),y=f.path(m,g),x=o.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return p&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",p),i&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",i),t.width=c,t.height=u,AA(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(t.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return bu.info("Triangle intersect",t,d,e),tP.polygon(t,d,e)},o}async function bE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/8,u=l+c,{cssStyles:h}=t,d=70-s,p=d>0?d/2:0,f=SA(i),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-s/2-p,y:u/2},...MA(-s/2-p,u/2,s/2+p,u/2,c,.8),{x:s/2+p,y:-u/2},{x:-s/2-p,y:-u/2}],y=EA(m),x=f.path(y,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c-(o.y-(o.top??0))})`),AA(t,b),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function vE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=a/s;let c=a,u=s;c>u*l?u=c/l:c=u*l,c=Math.max(c,100),u=Math.max(u,50);const h=Math.min(.2*u,u/4),d=u+2*h,{cssStyles:p}=t,f=SA(i),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2,y:d/2},...MA(-c/2,d/2,c/2,d/2,h,1),{x:c/2,y:-d/2},...MA(c/2,-d/2,-c/2,-d/2,h,-1)],y=EA(m),x=f.path(y,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),AA(t,b),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function CE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=-s/2,u=-l/2,{cssStyles:h}=t,d=SA(i),p=PC(t,{}),f=[{x:c-5,y:u-5},{x:c-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-5}],g=`M${c-5},${u-5} L${c+s},${u-5} L${c+s},${u+l} L${c-5},${u+l} L${c-5},${u-5}\n M${c-5},${u} L${c+s},${u}\n M${c},${u-5} L${c},${u+l}`;"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const m=d.path(g,p),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),a.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function wE(e,t){var r,n,i,o;const a=t;if(a.alias&&(t.label=a.alias),"handDrawn"===t.look){const{themeVariables:r}=Dd(),{background:n}=r,i={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await wE(e,i)}const s=Dd();t.useHtmlLabels=s.htmlLabels;let l=(null==(r=s.er)?void 0:r.diagramPadding)??10,c=(null==(n=s.er)?void 0:n.entityPadding)??6;const{cssStyles:u}=t,{labelStyles:h,nodeStyles:d}=AC(t);if(0===a.attributes.length&&t.label){const r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l};cS(t.label,s)+2*r.labelPaddingX<s.er.minEntityWidth&&(t.width=s.er.minEntityWidth);const n=await DP(e,t,r);if(!ip(s.htmlLabels)){const e=n.select("text"),t=null==(i=e.node())?void 0:i.getBBox();e.attr("transform",`translate(${-t.width/2}, 0)`)}return n}s.htmlLabels||(l*=1.25,c*=1.25);let p=PA(t);p||(p="node default");const f=e.insert("g").attr("class",p).attr("id",t.domId||t.id),g=await kE(f,t.label??"",s,0,0,["name"],h);g.height+=c;let m=0;const y=[],x=[];let b=0,v=0,C=0,w=0,k=!0,S=!0;for(const V of a.attributes){const e=await kE(f,V.type,s,0,m,["attribute-type"],h);b=Math.max(b,e.width+l);const t=await kE(f,V.name,s,0,m,["attribute-name"],h);v=Math.max(v,t.width+l);const r=await kE(f,V.keys.join(),s,0,m,["attribute-keys"],h);C=Math.max(C,r.width+l);const n=await kE(f,V.comment,s,0,m,["attribute-comment"],h);w=Math.max(w,n.width+l);const i=Math.max(e.height,t.height,r.height,n.height)+c;x.push({yOffset:m,rowHeight:i}),m+=i}let _=4;C<=l&&(k=!1,C=0,_--),w<=l&&(S=!1,w=0,_--);const T=f.node().getBBox();if(g.width+2*l-(b+v+C+w)>0){const e=g.width+2*l-(b+v+C+w);b+=e/_,v+=e/_,C>0&&(C+=e/_),w>0&&(w+=e/_)}const A=b+v+C+w,P=SA(f),E=PC(t,{});"handDrawn"!==t.look&&(E.roughness=0,E.fillStyle="solid");let M=0;x.length>0&&(M=x.reduce((e,t)=>e+((null==t?void 0:t.rowHeight)??0),0));const I=Math.max(T.width+2*l,(null==t?void 0:t.width)||0,A),B=Math.max((M??0)+g.height,(null==t?void 0:t.height)||0),L=-I/2,j=-B/2;f.selectAll("g:not(:first-child)").each((e,t,r)=>{const n=fg(r[t]),i=n.attr("transform");let o=0,a=0;if(i){const e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(o=parseFloat(e[1]),a=parseFloat(e[2]),n.attr("class").includes("attribute-name")?o+=b:n.attr("class").includes("attribute-keys")?o+=b+v:n.attr("class").includes("attribute-comment")&&(o+=b+v+C))}n.attr("transform",`translate(${L+l/2+o}, ${a+j+g.height+c/2})`)}),f.select(".name").attr("transform","translate("+-g.width/2+", "+(j+c/2)+")");const N=P.rectangle(L,j,I,B,E),D=f.insert(()=>N,":first-child").attr("style",u.join("")),{themeVariables:O}=Dd(),{rowEven:F,rowOdd:R,nodeBorder:$}=O;y.push(0);for(const[V,W]of x.entries()){const e=(V+1)%2==0&&0!==W.yOffset,t=P.rectangle(L,g.height+j+(null==W?void 0:W.yOffset),I,null==W?void 0:W.rowHeight,{...E,fill:e?F:R,stroke:$});f.insert(()=>t,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let z=P.line(L,g.height+j,I+L,g.height+j,E);f.insert(()=>z).attr("class","divider"),z=P.line(b+L,g.height+j,b+L,B+j,E),f.insert(()=>z).attr("class","divider"),k&&(z=P.line(b+v+L,g.height+j,b+v+L,B+j,E),f.insert(()=>z).attr("class","divider")),S&&(z=P.line(b+v+C+L,g.height+j,b+v+C+L,B+j,E),f.insert(()=>z).attr("class","divider"));for(const V of y)z=P.line(L,g.height+j+V,I+L,g.height+j+V,E),f.insert(()=>z).attr("class","divider");if(AA(t,D),d&&"handDrawn"!==t.look){const e=d.split(";"),t=null==(o=null==e?void 0:e.filter(e=>e.includes("stroke")))?void 0:o.map(e=>`${e}`).join("; ");f.selectAll("path").attr("style",t??""),f.selectAll(".row-rect-even path").attr("style",d)}return t.intersect=function(e){return tP.rect(t,e)},f}async function kE(e,t,r,n=0,i=0,o=[],a=""){const s=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",a);t!==sp(t)&&(t=(t=sp(t)).replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await ST(s,t,{width:cS(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let e=l.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(ip(r.htmlLabels)){const e=l.children[0];e.style.textAlign="start";const t=fg(l);c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return c}async function SE(e,t,r,n,i=r.class.padding??12){const o=n?0:3,a=e.insert("g").attr("class",PA(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,u=null,h=0,d=0,p=0;if(s=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const e=t.annotations[0];await _E(s,{text:`«${e}»`},0);h=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await _E(l,t,0,["font-weight: bolder"]);const f=l.node().getBBox();d=f.height,c=a.insert("g").attr("class","members-group text");let g=0;for(const x of t.members){g+=await _E(c,x,g,[x.parseClassifier()])+o}p=c.node().getBBox().height,p<=0&&(p=i/2),u=a.insert("g").attr("class","methods-group text");let m=0;for(const x of t.methods){m+=await _E(u,x,m,[x.parseClassifier()])+o}let y=a.node().getBBox();if(null!==s){const e=s.node().getBBox();s.attr("transform",`translate(${-e.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${h})`),y=a.node().getBBox(),c.attr("transform",`translate(0, ${h+d+2*i})`),y=a.node().getBBox(),u.attr("transform",`translate(0, ${h+d+(p?p+4*i:2*i)})`),y=a.node().getBBox(),{shapeSvg:a,bbox:y}}async function _E(e,t,r,n=[]){const i=e.insert("g").attr("class","label").attr("style",n.join("; ")),o=Dd();let a="useHtmlLabels"in t?t.useHtmlLabels:ip(o.htmlLabels)??!0,s="";s="text"in t?t.text:t.label,!a&&s.startsWith("\\")&&(s=s.substring(1)),pp(s)&&(a=!0);const l=await ST(i,Wp(vS(s)),{width:cS(s,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,u=1;if(a){const e=l.children[0],t=fg(l);u=e.innerHTML.split("<br>").length,e.innerHTML.includes("</math>")&&(u+=e.innerHTML.split("<mrow>").length-1);const r=e.getElementsByTagName("img");if(r){const e=""===s.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(r=>{function n(){var n;if(t.style.display="flex",t.style.flexDirection="column",e){const e=(null==(n=o.fontSize)?void 0:n.toString())??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(e,10)*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";r(t)}mu(n,"setupImage"),setTimeout(()=>{t.complete&&n()}),t.addEventListener("error",n),t.addEventListener("load",n)})))}c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}else{n.includes("font-weight: bolder")&&fg(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const e=l.children[0];if(""===l.textContent||l.textContent.includes(">")){e.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===s[1]&&(e.textContent=e.textContent[0]+" "+e.textContent.substring(1))}"undefined"===e.textContent&&(e.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*u)+r)+")"),c.height}async function TE(e,t){var r,n;const i=$p(),o=i.class.padding??12,a=o,s=t.useHtmlLabels??ip(i.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:u}=await SE(e,t,i,s,a),{labelStyles:h,nodeStyles:d}=AC(t);t.labelStyle=h,t.cssStyles=l.styles||"";const p=(null==(r=l.styles)?void 0:r.join(";"))||d||"";t.cssStyles||(t.cssStyles=p.replaceAll("!important","").split(";"));const f=0===l.members.length&&0===l.methods.length&&!(null==(n=i.class)?void 0:n.hideEmptyMembersBox),g=SA(c),m=PC(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");const y=u.width;let x=u.height;0===l.members.length&&0===l.methods.length?x+=a:l.members.length>0&&0===l.methods.length&&(x+=2*a);const b=-y/2,v=-x/2,C=g.rectangle(b-o,v-o-(f?o:0===l.members.length&&0===l.methods.length?-o/2:0),y+2*o,x+2*o+(f?2*o:0===l.members.length&&0===l.methods.length?-o:0),m),w=c.insert(()=>C,":first-child");w.attr("class","basic label-container");const k=w.node().getBBox();c.selectAll(".text").each((e,t,r)=>{var n;const i=fg(r[t]),a=i.attr("transform");let u=0;if(a){const e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(u=parseFloat(e[2]))}let h=u+v+o-(f?o:0===l.members.length&&0===l.methods.length?-o/2:0);s||(h-=4);let d=b;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(d=-(null==(n=i.node())?void 0:n.getBBox().width)/2||0,c.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(d=0)})),i.attr("transform",`translate(${d}, ${h})`)});const S=c.select(".annotation-group").node().getBBox().height-(f?o/2:0)||0,_=c.select(".label-group").node().getBBox().height-(f?o/2:0)||0,T=c.select(".members-group").node().getBBox().height-(f?o/2:0)||0;if(l.members.length>0||l.methods.length>0||f){const e=g.line(k.x,S+_+v+o,k.x+k.width,S+_+v+o,m);c.insert(()=>e).attr("class","divider").attr("style",p)}if(f||l.members.length>0||l.methods.length>0){const e=g.line(k.x,S+_+T+v+2*a+o,k.x+k.width,S+_+T+v+o+2*a,m);c.insert(()=>e).attr("class","divider").attr("style",p)}if("handDrawn"!==l.look&&c.selectAll("path").attr("style",p),w.select(":nth-child(2)").attr("style",p),c.selectAll(".divider").select("path").attr("style",p),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",p),!s){const e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(p);if(t){const e=t[0].replace("color","fill");c.selectAll("tspan").attr("style",e)}else if(h){const t=e.exec(h);if(t){const e=t[0].replace("color","fill");c.selectAll("tspan").attr("style",e)}}}return AA(t,w),t.intersect=function(e){return tP.rect(t,e)},c}async function AE(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=AC(t);t.labelStyle=i;const a=t,s=t,l="verifyMethod"in t,c=PA(t),u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let h;h=l?await PE(u,`<<${a.type}>>`,0,t.labelStyle):await PE(u,"<<Element>>",0,t.labelStyle);let d=h;const p=await PE(u,a.name,d,t.labelStyle+"; font-weight: bold;");if(d+=p+20,l){d+=await PE(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),d,t.labelStyle);d+=await PE(u,""+(a.text?`Text: ${a.text}`:""),d,t.labelStyle);d+=await PE(u,""+(a.risk?`Risk: ${a.risk}`:""),d,t.labelStyle),await PE(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),d,t.labelStyle)}else{d+=await PE(u,""+(s.type?`Type: ${s.type}`:""),d,t.labelStyle),await PE(u,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),d,t.labelStyle)}const f=((null==(r=u.node())?void 0:r.getBBox().width)??200)+20,g=((null==(n=u.node())?void 0:n.getBBox().height)??200)+20,m=-f/2,y=-g/2,x=SA(u),b=PC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=x.rectangle(m,y,f,g,b),C=u.insert(()=>v,":first-child");if(C.attr("class","basic label-container").attr("style",o),u.selectAll(".label").each((e,t,r)=>{const n=fg(r[t]),i=n.attr("transform");let o=0,a=0;if(i){const e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(o=parseFloat(e[1]),a=parseFloat(e[2]))}const s=a-g/2;let l=m+10;0!==t&&1!==t||(l=o),n.attr("transform",`translate(${l}, ${s+20})`)}),d>h+p+20){const e=x.line(m,y+h+p+20,m+f,y+h+p+20,b);u.insert(()=>e).attr("style",o)}return AA(t,C),t.intersect=function(e){return tP.rect(t,e)},u}async function PE(e,t,r,n=""){if(""===t)return 0;const i=e.insert("g").attr("class","label").attr("style",n),o=$p(),a=o.htmlLabels??!0,s=await ST(i,Wp(vS(t)),{width:cS(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:n},o);let l;if(a){const e=s.children[0],t=fg(s);l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height)}else{const e=s.children[0];for(const t of e.children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),n&&t.setAttribute("style",n);l=s.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}mu(gE,"tiltedCylinder"),mu(mE,"trapezoid"),mu(yE,"trapezoidalPentagon"),mu(xE,"triangle"),mu(bE,"waveEdgedRectangle"),mu(vE,"waveRectangle"),mu(CE,"windowPane"),mu(wE,"erBox"),mu(kE,"addText"),mu(SE,"textHelper"),mu(_E,"addText"),mu(TE,"classBox"),mu(AE,"requirementBox"),mu(PE,"addText");var EE=mu(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ME(e,t,{config:r}){var n,i;const{labelStyles:o,nodeStyles:a}=AC(t);t.labelStyle=o||"";const s=t.width;t.width=(t.width??200)-10;const{shapeSvg:l,bbox:c,label:u}=await _A(e,t,PA(t)),h=t.padding||10;let d,p="";"ticket"in t&&t.ticket&&(null==(n=null==r?void 0:r.kanban)?void 0:n.ticketBaseUrl)&&(p=null==(i=null==r?void 0:r.kanban)?void 0:i.ticketBaseUrl.replace("#TICKET#",t.ticket),d=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;({label:g,bbox:m}=d?await TA(d,"ticket"in t&&t.ticket||"",f):await TA(l,"ticket"in t&&t.ticket||"",f));const{label:y,bbox:x}=await TA(l,"assigned"in t&&t.assigned||"",f);t.width=s;const b=(null==t?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,C=Math.max(c.height+20,(null==t?void 0:t.height)||0)+v,w=-b/2,k=-C/2;let S;u.attr("transform","translate("+(h-b/2)+", "+(-v-c.height/2)+")"),g.attr("transform","translate("+(h-b/2)+", "+(-v+c.height/2)+")"),y.attr("transform","translate("+(h+b/2-x.width-20)+", "+(-v+c.height/2)+")");const{rx:_,ry:T}=t,{cssStyles:A}=t;if("handDrawn"===t.look){const e=SA(l),r=PC(t,{}),n=_||T?e.path(DA(w,k,b,C,_||0),r):e.rectangle(w,k,b,C,r);S=l.insert(()=>n,":first-child"),S.attr("class","basic label-container").attr("style",A||null)}else{S=l.insert("rect",":first-child"),S.attr("class","basic label-container __APA__").attr("style",a).attr("rx",_??5).attr("ry",T??5).attr("x",w).attr("y",k).attr("width",b).attr("height",C);const e="priority"in t&&t.priority;if(e){const t=l.append("line"),r=w+2,n=k+Math.floor((_??0)/2),i=k+C-Math.floor((_??0)/2);t.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",EE(e))}}return AA(t,S),t.height=C,t.intersect=function(e){return tP.rect(t,e)},l}async function IE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await _A(e,t,PA(t)),l=o.width+10*a,c=o.height+8*a,u=.15*l,{cssStyles:h}=t,d=o.width+20,p=o.height+20,f=Math.max(l,d),g=Math.max(c,p);let m;s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);const y=`M0 0 \n a${u},${u} 1 0,0 ${.25*f},${-1*g*.1}\n a${u},${u} 1 0,0 ${.25*f},0\n a${u},${u} 1 0,0 ${.25*f},0\n a${u},${u} 1 0,0 ${.25*f},${.1*g}\n\n a${u},${u} 1 0,0 ${.15*f},${.33*g}\n a${.8*u},${.8*u} 1 0,0 0,${.34*g}\n a${u},${u} 1 0,0 ${-1*f*.15},${.33*g}\n\n a${u},${u} 1 0,0 ${-1*f*.25},${.15*g}\n a${u},${u} 1 0,0 ${-1*f*.25},0\n a${u},${u} 1 0,0 ${-1*f*.25},0\n a${u},${u} 1 0,0 ${-1*f*.25},${-1*g*.15}\n\n a${u},${u} 1 0,0 ${-1*f*.1},${-1*g*.33}\n a${.8*u},${.8*u} 1 0,0 0,${-1*g*.34}\n a${u},${u} 1 0,0 ${.1*f},${-1*g*.33}\n H0 V0 Z`;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=e.path(y,r);m=i.insert(()=>n,":first-child"),m.attr("class","basic label-container").attr("style",wS(h))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return m.attr("transform",`translate(${-f/2}, ${-g/2})`),AA(t,m),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return bu.info("Bang intersect",t,e),tP.rect(t,e)},i}async function BE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await _A(e,t,PA(t)),l=o.width+2*a,c=o.height+2*a,u=.15*l,h=.25*l,d=.35*l,p=.2*l,{cssStyles:f}=t;let g;const m=`M0 0 \n a${u},${u} 0 0,1 ${.25*l},${-1*l*.1}\n a${d},${d} 1 0,1 ${.4*l},${-1*l*.1}\n a${h},${h} 1 0,1 ${.35*l},${.2*l}\n\n a${u},${u} 1 0,1 ${.15*l},${.35*c}\n a${p},${p} 1 0,1 ${-1*l*.15},${.65*c}\n\n a${h},${u} 1 0,1 ${-1*l*.25},${.15*l}\n a${d},${d} 1 0,1 ${-1*l*.5},0\n a${u},${u} 1 0,1 ${-1*l*.25},${-1*l*.15}\n\n a${u},${u} 1 0,1 ${-1*l*.1},${-1*c*.35}\n a${p},${p} 1 0,1 ${.1*l},${-1*c*.65}\n H0 V0 Z`;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=e.path(m,r);g=i.insert(()=>n,":first-child"),g.attr("class","basic label-container").attr("style",wS(f))}else g=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",m);return s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),AA(t,g),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return bu.info("Cloud intersect",t,e),tP.rect(t,e)},i}async function LE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await _A(e,t,PA(t)),l=o.width+8*a,c=o.height+2*a,u=`\n M${-l/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${10-l}\n q-5,0 -5,-5\n Z\n `,h=i.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",u);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),i.append(()=>s.node()),AA(t,h),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return tP.rect(t,e)},i}async function jE(e,t){return lP(e,t,{padding:t.padding??0})}mu(ME,"kanbanItem"),mu(IE,"bang"),mu(BE,"cloud"),mu(LE,"defaultMindmapNode"),mu(jE,"mindmapCircle");var NE=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:nE},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:eE},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:iE},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:lE},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:CP},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:lP},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:IE},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:BE},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:YP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:PP},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:RP},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:FP},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:mE},{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:NP},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kP},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:hE},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:aP},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tE},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:sE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:aE},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:TP},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:EP},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dP},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:fP},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:mP},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:$P},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:bE},{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:gE},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:HP},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:yP},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:wP},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:xE},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:CE},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:SP},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:yE},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:_P},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:rE},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:GP},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:UP},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:iP},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:uP},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:uE},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:cE},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:vE},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ZP},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:qP}],DE=mu(()=>{const e={state:oE,choice:sP,note:XP,rectWithTitle:KP,labelRect:OP,iconSquare:LP,iconCircle:IP,icon:MP,iconRounded:BP,imageSquare:jP,anchor:rP,kanbanItem:ME,mindmapCircle:jE,defaultMindmapNode:LE,classBox:TE,erBox:wE,requirementBox:AE},t=[...Object.entries(e),...NE.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap")();function OE(e){return e in DE}mu(OE,"isValidShape");var FE=new Map;async function RE(e,t,r){let n,i;"rect"===t.shape&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?DE[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;"sandbox"===r.config.securityLevel?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),i=await o(n,t,r)}else i=await o(e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),FE.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}mu(RE,"insertNode");var $E=mu((e,t)=>{FE.set(t.id,e)},"setNodeElem"),zE=mu(()=>{FE.clear()},"clear"),VE=mu(e=>{const t=FE.get(e.id);bu.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode"),WE=mu((e,t,r,n,i,o)=>{t.arrowTypeStart&&qE(e,"start",t.arrowTypeStart,r,n,i,o),t.arrowTypeEnd&&qE(e,"end",t.arrowTypeEnd,r,n,i,o)},"addEdgeMarkers"),HE={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},qE=mu((e,t,r,n,i,o,a)=>{var s;const l=HE[r];if(!l)return void bu.warn(`Unknown arrow type: ${r}`);const c=`${i}_${o}-${l.type}${"start"===t?"Start":"End"}`;if(a&&""!==a.trim()){const r=`${c}_${a.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const e=document.getElementById(c);if(e){const t=e.cloneNode(!0);t.id=r;t.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",a),l.fill&&e.setAttribute("fill",a)}),null==(s=e.parentNode)||s.appendChild(t)}}e.attr(`marker-${t}`,`url(${n}#${r})`)}else e.attr(`marker-${t}`,`url(${n}#${c})`)},"addEdgeMarker"),UE=new Map,GE=new Map,XE=mu(()=>{UE.clear(),GE.clear()},"clear"),JE=mu(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),YE=mu(async(e,t)=>{let r=ip($p().flowchart.htmlLabels);const{labelStyles:n}=AC(t);t.labelStyle=n;const i=await ST(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});bu.info("abc82",t,t.labelType);const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id);a.node().appendChild(i);let s,l=i.getBBox();if(r){const e=i.children[0],t=fg(i);l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height)}if(a.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),UE.set(t.id,o),t.width=l.width,t.height=l.height,t.startLabelLeft){const r=await NA(t.startLabelLeft,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).startLeft=n,ZE(s,t.startLabelLeft)}if(t.startLabelRight){const r=await NA(t.startLabelRight,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=n.node().appendChild(r),i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).startRight=n,ZE(s,t.startLabelRight)}if(t.endLabelLeft){const r=await NA(t.endLabelLeft,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.node().appendChild(r),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).endLeft=n,ZE(s,t.endLabelLeft)}if(t.endLabelRight){const r=await NA(t.endLabelRight,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.node().appendChild(r),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).endRight=n,ZE(s,t.endLabelRight)}return i},"insertEdgeLabel");function ZE(e,t){$p().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}mu(ZE,"setTerminalWidth");var KE=mu((e,t)=>{bu.debug("Moving label abc88 ",e.id,e.label,UE.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=$p(),{subGraphTitleTotalMargin:i}=wC(n);if(e.label){const n=UE.get(e.id);let o=e.x,a=e.y;if(r){const n=xS.calcLabelPosition(r);bu.debug("Moving label "+e.label+" from (",o,",",a,") to (",n.x,",",n.y,") abc88"),t.updatedPath&&(o=n.x,a=n.y)}n.attr("transform",`translate(${o}, ${a+i/2})`)}if(e.startLabelLeft){const t=GE.get(e.id).startLeft;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}if(e.startLabelRight){const t=GE.get(e.id).startRight;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}if(e.endLabelLeft){const t=GE.get(e.id).endLeft;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}if(e.endLabelRight){const t=GE.get(e.id).endRight;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),QE=mu((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),o=Math.abs(t.y-n),a=e.width/2,s=e.height/2;return i>=a||o>=s},"outsideNode"),eM=mu((e,t,r)=>{bu.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(t)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,o=Math.abs(n-r.x),a=e.width/2;let s=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),u=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*a>Math.abs(n-t.x)*l){let e=r.y<t.y?t.y-l-i:i-l-t.y;s=u*e/c;const n={x:r.x<t.x?r.x+s:r.x-u+s,y:r.y<t.y?r.y+c-e:r.y-c+e};return 0===s&&(n.x=t.x,n.y=t.y),0===u&&(n.x=t.x),0===c&&(n.y=t.y),bu.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${u}, r ${s}`,n),n}{s=r.x<t.x?t.x-a-n:n-a-t.x;let e=c*s/u,i=r.x<t.x?r.x+u-s:r.x-u+s,o=r.y<t.y?r.y+e:r.y-e;return bu.debug(`sides calc abc89, Q ${c}, q ${e}, R ${u}, r ${s}`,{_x:i,_y:o}),0===s&&(i=t.x,o=t.y),0===u&&(i=t.x),0===c&&(o=t.y),{x:i,y:o}}},"intersection"),tM=mu((e,t)=>{bu.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(e=>{if(bu.info("abc88 checking point",e,t),QE(t,e)||i)bu.warn("abc88 outside",e,n),n=e,i||r.push(e);else{const o=eM(t,n,e);bu.debug("abc88 inside",e,n,o),bu.debug("abc88 intersection",o,t);let a=!1;r.forEach(e=>{a=a||e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?bu.warn("abc88 no intersect",o,r):r.push(o),i=!0}}),bu.debug("returning points",r),r},"cutPathAtIntersect");function rM(e){const t=[],r=[];for(let n=1;n<e.length-1;n++){const i=e[n-1],o=e[n],a=e[n+1];(i.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-i.y)>5||i.y===o.y&&o.x===a.x&&Math.abs(o.x-i.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}mu(rM,"extractCornerPoints");var nM=mu(function(e,t,r){const n=t.x-e.x,i=t.y-e.y,o=r/Math.sqrt(n*n+i*i);return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),iM=mu(function(e){const{cornerPointPositions:t}=rM(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){const t=e[n-1],i=e[n+1],o=e[n],a=nM(t,o,5),s=nM(i,o,5),l=s.x-a.x,c=s.y-a.y;r.push(a);const u=2*Math.sqrt(2);let h={x:o.x,y:o.y};if(Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10){bu.debug("Corner point fixing",Math.abs(i.x-t.x),Math.abs(i.y-t.y));const e=5;h=o.x===a.x?{x:l<0?a.x-e+u:a.x+e-u,y:c<0?a.y-u:a.y+u}:{x:l<0?a.x-u:a.x+u,y:c<0?a.y-e+u:a.y+e-u}}else bu.debug("Corner point skipping fixing",Math.abs(i.x-t.x),Math.abs(i.y-t.y));r.push(h,s)}else r.push(e[n]);return r},"fixCorners"),oM=mu((e,t,r)=>{const n=e-t-r,i=Math.floor(n/4);return`0 ${t} ${Array(i).fill("2 2").join(" ")} ${r}`},"generateDashArray"),aM=mu(function(e,t,r,n,i,o,a,s=!1){var l;const{handDrawnSeed:c}=$p();let u=t.points,h=!1;const d=i;var p=o;const f=[];for(const M in t.cssCompiledStyles)TC(M)||f.push(t.cssCompiledStyles[M]);bu.debug("UIO intersect check",t.points,p.x,d.x),p.intersect&&d.intersect&&!s&&(u=u.slice(1,t.points.length-1),u.unshift(d.intersect(u[0])),bu.debug("Last point UIO",t.start,"--\x3e",t.end,u[u.length-1],p,p.intersect(u[u.length-1])),u.push(p.intersect(u[u.length-1])));const g=btoa(JSON.stringify(u));t.toCluster&&(bu.info("to cluster abc88",r.get(t.toCluster)),u=tM(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(bu.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=tM(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=u.filter(e=>!Number.isNaN(e.y));m=iM(m);let y=Oy;switch(y=Ay,t.curve){case"linear":y=Ay;break;case"basis":default:y=Oy;break;case"cardinal":y=Hy;break;case"bumpX":y=By;break;case"bumpY":y=Ly;break;case"catmullRom":y=Zy;break;case"monotoneX":y=ux;break;case"monotoneY":y=hx;break;case"natural":y=fx;break;case"step":y=mx;break;case"stepAfter":y=xx;break;case"stepBefore":y=yx}const{x:x,y:b}=CC(t),v=My().x(x).y(b).curve(y);let C,w;switch(t.thickness){case"normal":default:C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible"}switch(t.pattern){case"solid":default:C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed"}let k="rounded"===t.curve?sM(cM(m,t),5):v(m);const S=Array.isArray(t.style)?t.style:[t.style];let _=S.find(e=>null==e?void 0:e.startsWith("stroke:")),T=!1;if("handDrawn"===t.look){const r=SA(e);Object.assign([],m);C+=" transition",w=fg(r.path(k,{roughness:.3,seed:c})).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((e,t)=>e+";"+t,""):"");let n=w.attr("d");w.attr("d",n),e.node().appendChild(w.node())}else{const r=f.join(";"),n=S?S.reduce((e,t)=>e+t+";",""):"";let i="";t.animate&&(i=" edge-animation-fast"),t.animation&&(i=" edge-animation-"+t.animation);const o=(r?r+";"+n+";":n)+";"+(S?S.reduce((e,t)=>e+";"+t,""):"");w=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(i??"")).attr("style",o),_=null==(l=o.match(/stroke:([^;]+)/))?void 0:l[1],T=!0===t.animate||!!t.animation||r.includes("animation");const a=w.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,c=xC[t.arrowTypeStart]||0,u=xC[t.arrowTypeEnd]||0;if("neo"===t.look&&!T){const e=`stroke-dasharray: ${"dotted"===t.pattern||"dashed"===t.pattern?oM(s,c,u):`0 ${c} ${s-c-u} ${u}`}; stroke-dashoffset: 0;`;w.attr("style",e+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(t=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",t.x).attr("cy",t.y)});let A="";($p().flowchart.arrowMarkerAbsolute||$p().state.arrowMarkerAbsolute)&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),bu.info("arrowTypeStart",t.arrowTypeStart),bu.info("arrowTypeEnd",t.arrowTypeEnd),WE(w,t,A,a,n,_);const P=u[Math.floor(u.length/2)];xS.isLabelCoordinateInPath(P,w.attr("d"))||(h=!0);let E={};return h&&(E.updatedPath=u),E.originalPath=t.points,E},"insertEdge");function sM(e,t){if(e.length<2)return"";let r="";const n=e.length,i=1e-5;for(let o=0;o<n;o++){const a=e[o],s=e[o-1],l=e[o+1];if(0===o)r+=`M${a.x},${a.y}`;else if(o===n-1)r+=`L${a.x},${a.y}`;else{const e=a.x-s.x,n=a.y-s.y,o=l.x-a.x,c=l.y-a.y,u=Math.hypot(e,n),h=Math.hypot(o,c);if(u<i||h<i){r+=`L${a.x},${a.y}`;continue}const d=e/u,p=n/u,f=o/h,g=c/h,m=d*f+p*g,y=Math.max(-1,Math.min(1,m)),x=Math.acos(y);if(x<i||Math.abs(Math.PI-x)<i){r+=`L${a.x},${a.y}`;continue}const b=Math.min(t/Math.sin(x/2),u/2,h/2),v=a.x-d*b,C=a.y-p*b,w=a.x+f*b,k=a.y+g*b;r+=`L${v},${C}`,r+=`Q${a.x},${a.y} ${w},${k}`}}return r}function lM(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,n=t.y-e.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}function cM(e,t){const r=e.map(e=>({...e}));if(e.length>=2&&yC[t.arrowTypeStart]){const n=yC[t.arrowTypeStart],i=e[0],o=e[1],{angle:a}=lM(i,o),s=n*Math.cos(a),l=n*Math.sin(a);r[0].x=i.x+s,r[0].y=i.y+l}const n=e.length;if(n>=2&&yC[t.arrowTypeEnd]){const i=yC[t.arrowTypeEnd],o=e[n-1],a=e[n-2],{angle:s}=lM(a,o),l=i*Math.cos(s),c=i*Math.sin(s);r[n-1].x=o.x-l,r[n-1].y=o.y-c}return r}mu(sM,"generateRoundedPath"),mu(lM,"calculateDeltaAndAngle"),mu(cM,"applyMarkerOffsetsToPoints");var uM=mu((e,t,r,n)=>{t.forEach(t=>{hM[t](e,r,n)})},"insertMarkers"),hM={extension:mu((e,t,r)=>{bu.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:mu((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:mu((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:mu((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:mu((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:mu((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:mu((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},dM=uM,pM={common:yp,getConfig:Dd,insertCluster:WA,insertEdge:aM,insertEdgeLabel:YE,insertMarkers:dM,insertNode:RE,interpolateToCurve:Wk,labelHelper:_A,log:bu,positionEdgeLabel:KE},fM={},gM=mu(e=>{for(const t of e)fM[t.name]=t},"registerLayoutLoaders");mu(()=>{gM([{name:"dagre",loader:mu(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-CDYaaqiU.cjs")),"loader")},{name:"cose-bilkent",loader:mu(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-CC01Tkem.cjs")),"loader")}])},"registerDefaultLayoutLoaders")();var mM=mu(async(e,t)=>{if(!(e.layoutAlgorithm in fM))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=fM[e.layoutAlgorithm];return(await r.loader()).render(e,t,pM,{algorithm:r.algorithm})},"render"),yM=mu((e="",{fallback:t="dagre"}={})=>{if(e in fM)return e;if(t in fM)return bu.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),xM="comm",bM="rule",vM="decl",CM=Math.abs,wM=String.fromCharCode;function kM(e){return e.trim()}function SM(e,t,r){return e.replace(t,r)}function _M(e,t,r){return e.indexOf(t,r)}function TM(e,t){return 0|e.charCodeAt(t)}function AM(e,t,r){return e.slice(t,r)}function PM(e){return e.length}function EM(e,t){return t.push(e),e}var MM=1,IM=1,BM=0,LM=0,jM=0,NM="";function DM(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:MM,column:IM,length:a,return:"",siblings:s}}function OM(){return jM=LM>0?TM(NM,--LM):0,IM--,10===jM&&(IM=1,MM--),jM}function FM(){return jM=LM<BM?TM(NM,LM++):0,IM++,10===jM&&(IM=1,MM++),jM}function RM(){return TM(NM,LM)}function $M(){return LM}function zM(e,t){return AM(NM,e,t)}function VM(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function WM(e){return kM(zM(LM-1,UM(91===e?e+2:40===e?e+1:e)))}function HM(e){for(;(jM=RM())&&jM<33;)FM();return VM(e)>2||VM(jM)>3?"":" "}function qM(e,t){for(;--t&&FM()&&!(jM<48||jM>102||jM>57&&jM<65||jM>70&&jM<97););return zM(e,$M()+(t<6&&32==RM()&&32==FM()))}function UM(e){for(;FM();)switch(jM){case e:return LM;case 34:case 39:34!==e&&39!==e&&UM(jM);break;case 40:41===e&&UM(e);break;case 92:FM()}return LM}function GM(e,t){for(;FM()&&e+jM!==57&&(e+jM!==84||47!==RM()););return"/*"+zM(t,LM-1)+"*"+wM(47===e?e:FM())}function XM(e){for(;!VM(RM());)FM();return zM(e,LM)}function JM(e){return function(e){return NM="",e}(YM("",null,null,null,[""],e=function(e){return MM=IM=1,BM=PM(NM=e),LM=0,[]}(e),0,[0],e))}function YM(e,t,r,n,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,p=0,f=0,g=1,m=1,y=1,x=0,b="",v=i,C=o,w=n,k=b;m;)switch(f=x,x=FM()){case 40:if(108!=f&&58==TM(k,h-1)){-1!=_M(k+=SM(WM(x),"&","&\f"),"&\f",CM(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:k+=WM(x);break;case 9:case 10:case 13:case 32:k+=HM(f);break;case 92:k+=qM($M()-1,7);continue;case 47:switch(RM()){case 42:case 47:EM(KM(GM(FM(),$M()),t,r,l),l),5!=VM(f||1)&&5!=VM(RM()||1)||!PM(k)||" "===AM(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*g:s[c++]=PM(k)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+u:-1==y&&(k=SM(k,/\f/g,"")),p>0&&(PM(k)-h||0===g&&47===f)&&EM(p>32?QM(k+";",n,r,h-1,l):QM(SM(k," ","")+";",n,r,h-2,l),l);break;case 59:k+=";";default:if(EM(w=ZM(k,t,r,c,u,i,s,b,v=[],C=[],h,o),o),123===x)if(0===u)YM(k,t,w,w,v,o,h,s,C);else{switch(d){case 99:if(110===TM(k,3))break;case 108:if(97===TM(k,2))break;default:u=0;case 100:case 109:case 115:}u?YM(e,w,w,n&&EM(ZM(e,w,w,0,0,i,s,b,i,v=[],h,C),C),i,C,h,s,n?v:C):YM(k,w,w,w,[""],C,0,s,C)}}c=u=p=0,g=y=1,b=k="",h=a;break;case 58:h=1+PM(k),p=f;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==OM())continue;switch(k+=wM(x),x*g){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(PM(k)-1)*y,y=1;break;case 64:45===RM()&&(k+=WM(FM())),d=RM(),u=h=PM(b=k+=XM($M())),x++;break;case 45:45===f&&2==PM(k)&&(g=0)}}return o}function ZM(e,t,r,n,i,o,a,s,l,c,u,h){for(var d=i-1,p=0===i?o:[""],f=function(e){return e.length}(p),g=0,m=0,y=0;g<n;++g)for(var x=0,b=AM(e,d+1,d=CM(m=a[g])),v=e;x<f;++x)(v=kM(m>0?p[x]+" "+b:SM(b,/&\f/g,p[x])))&&(l[y++]=v);return DM(e,t,r,0===i?bM:s,l,c,u,h)}function KM(e,t,r,n){return DM(e,t,r,xM,wM(jM),AM(e,2,-2),0,n)}function QM(e,t,r,n,i){return DM(e,t,r,vM,AM(e,0,n),AM(e,n+1,-1),n,i)}function eI(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function tI(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case vM:return e.return=e.return||e.value;case xM:return"";case"@keyframes":return e.return=e.value+"{"+eI(e.children,n)+"}";case bM:if(!PM(e.value=e.props.join(",")))return""}return PM(r=eI(e.children,n))?e.return=e.value+"{"+r+"}":""}var rI=Dw(Object.keys,Object),nI=Object.prototype.hasOwnProperty;function iI(e){if(!Rw(e))return rI(e);var t=[];for(var r in Object(e))nI.call(e,r)&&"constructor"!=r&&t.push(r);return t}var oI=sw(FC,"DataView"),aI=sw(FC,"Promise"),sI=sw(FC,"Set"),lI=sw(FC,"WeakMap"),cI="[object Map]",uI="[object Promise]",hI="[object Set]",dI="[object WeakMap]",pI="[object DataView]",fI=QC(oI),gI=QC(mw),mI=QC(aI),yI=QC(sI),xI=QC(lI);exports.getTag=UC,(oI&&exports.getTag(new oI(new ArrayBuffer(1)))!=pI||mw&&exports.getTag(new mw)!=cI||aI&&exports.getTag(aI.resolve())!=uI||sI&&exports.getTag(new sI)!=hI||lI&&exports.getTag(new lI)!=dI)&&(exports.getTag=function(e){var t=UC(e),r="[object Object]"==t?e.constructor:void 0,n=r?QC(r):"";if(n)switch(n){case fI:return pI;case gI:return cI;case mI:return uI;case yI:return hI;case xI:return dI}return t});var bI=Object.prototype.hasOwnProperty;function vI(e){if(null==e)return!0;if(Jw(e)&&(Gw(e)||"string"==typeof e||"function"==typeof e.splice||Qw(e)||dk(e)||Uw(e)))return!e.length;var t=exports.getTag(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Rw(e))return!iI(e).length;for(var r in e)if(bI.call(e,r))return!1;return!0}var CI={id:"c4",detector:mu(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-D_8NNIZj.cjs"));return{id:"c4",diagram:e}},"loader")},wI="flowchart",kI={id:wI,detector:mu((e,t)=>{var r,n;return"dagre-wrapper"!==(null==(r=null==t?void 0:t.flowchart)?void 0:r.defaultRenderer)&&"elk"!==(null==(n=null==t?void 0:t.flowchart)?void 0:n.defaultRenderer)&&/^\s*graph/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-B-5P4uRf.cjs"));return{id:wI,diagram:e}},"loader")},SI="flowchart-v2",_I={id:SI,detector:mu((e,t)=>{var r,n,i;return"dagre-d3"!==(null==(r=null==t?void 0:t.flowchart)?void 0:r.defaultRenderer)&&("elk"===(null==(n=null==t?void 0:t.flowchart)?void 0:n.defaultRenderer)&&(t.layout="elk"),!(!/^\s*graph/.test(e)||"dagre-wrapper"!==(null==(i=null==t?void 0:t.flowchart)?void 0:i.defaultRenderer))||/^\s*flowchart/.test(e))},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-B-5P4uRf.cjs"));return{id:SI,diagram:e}},"loader")},TI={id:"er",detector:mu(e=>/^\s*erDiagram/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-D6Xk9c-u.cjs"));return{id:"er",diagram:e}},"loader")},AI="gitGraph",PI={id:AI,detector:mu(e=>/^\s*gitGraph/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-V2S2FVAM-DStoHbQA.cjs"));return{id:AI,diagram:e}},"loader")},EI="gantt",MI={id:EI,detector:mu(e=>/^\s*gantt/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-BvXDYjE1.cjs"));return{id:EI,diagram:e}},"loader")},II="info",BI={id:II,detector:mu(e=>/^\s*info/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-HS3SLOUP-BnevWU-I.cjs"));return{id:II,diagram:e}},"loader")},LI={id:"pie",detector:mu(e=>/^\s*pie/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-BExkCjtp.cjs"));return{id:"pie",diagram:e}},"loader")},jI="quadrantChart",NI={id:jI,detector:mu(e=>/^\s*quadrantChart/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-Dn_KGYm_.cjs"));return{id:jI,diagram:e}},"loader")},DI="xychart",OI={id:DI,detector:mu(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-ClwDpfOS.cjs"));return{id:DI,diagram:e}},"loader")},FI="requirement",RI={id:FI,detector:mu(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-Cnr0krQo.cjs"));return{id:FI,diagram:e}},"loader")},$I="sequence",zI={id:$I,detector:mu(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-DmCBPiOU.cjs"));return{id:$I,diagram:e}},"loader")},VI="class",WI={id:VI,detector:mu((e,t)=>{var r;return"dagre-wrapper"!==(null==(r=null==t?void 0:t.class)?void 0:r.defaultRenderer)&&/^\s*classDiagram/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-ChI1HQhB.cjs"));return{id:VI,diagram:e}},"loader")},HI="classDiagram",qI={id:HI,detector:mu((e,t)=>{var r;return!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==(null==(r=null==t?void 0:t.class)?void 0:r.defaultRenderer))||/^\s*classDiagram-v2/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-ChI1HQhB.cjs"));return{id:HI,diagram:e}},"loader")},UI="state",GI={id:UI,detector:mu((e,t)=>{var r;return"dagre-wrapper"!==(null==(r=null==t?void 0:t.state)?void 0:r.defaultRenderer)&&/^\s*stateDiagram/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-Dkv9EsDA.cjs"));return{id:UI,diagram:e}},"loader")},XI="stateDiagram",JI={id:XI,detector:mu((e,t)=>{var r;return!!/^\s*stateDiagram-v2/.test(e)||!(!/^\s*stateDiagram/.test(e)||"dagre-wrapper"!==(null==(r=null==t?void 0:t.state)?void 0:r.defaultRenderer))},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-ClwE0oA4.cjs"));return{id:XI,diagram:e}},"loader")},YI="journey",ZI={id:YI,detector:mu(e=>/^\s*journey/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-BODApzJb.cjs"));return{id:YI,diagram:e}},"loader")},KI={draw:mu((e,t,r)=>{bu.debug("rendering svg for syntax error\n");const n=vx(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),vp(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},QI=KI,eB={db:{},renderer:KI,parser:{parse:mu(()=>{},"parse")}},tB="flowchart-elk",rB={id:tB,detector:mu((e,t={})=>{var r;return!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===(null==(r=null==t?void 0:t.flowchart)?void 0:r.defaultRenderer))&&(t.layout="elk",!0)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-B-5P4uRf.cjs"));return{id:tB,diagram:e}},"loader")},nB="timeline",iB={id:nB,detector:mu(e=>/^\s*timeline/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-C-NbrBWK.cjs"));return{id:nB,diagram:e}},"loader")},oB="mindmap",aB={id:oB,detector:mu(e=>/^\s*mindmap/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-BWtHcwxS.cjs"));return{id:oB,diagram:e}},"loader")},sB="kanban",lB={id:sB,detector:mu(e=>/^\s*kanban/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-BY1oKhQF.cjs"));return{id:sB,diagram:e}},"loader")},cB="sankey",uB={id:cB,detector:mu(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-hSdLQwtC.cjs"));return{id:cB,diagram:e}},"loader")},hB="packet",dB={id:hB,detector:mu(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-OdSmYpDj.cjs"));return{id:hB,diagram:e}},"loader")},pB="radar",fB={id:pB,detector:mu(e=>/^\s*radar-beta/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-UQaqb5nU.cjs"));return{id:pB,diagram:e}},"loader")},gB="block",mB={id:gB,detector:mu(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-eoa5Tjmi.cjs"));return{id:gB,diagram:e}},"loader")},yB="architecture",xB={id:yB,detector:mu(e=>/^\s*architecture/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-DIlvBP7n.cjs"));return{id:yB,diagram:e}},"loader")},bB="treemap",vB={id:bB,detector:mu(e=>/^\s*treemap/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-DqhM0iw7.cjs"));return{id:bB,diagram:e}},"loader")},CB=!1,wB=mu(()=>{CB||(CB=!0,Gp("error",eB,e=>"error"===e.toLowerCase().trim()),Gp("---",{db:{clear:mu(()=>{},"clear")},styles:{},renderer:{draw:mu(()=>{},"draw")},parser:{parse:mu(()=>{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:mu(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),td(rB,aB,xB),td(CI,lB,qI,WI,TI,MI,BI,LI,RI,zI,_I,kI,iB,PI,JI,GI,ZI,NI,uB,dB,OI,mB,fB,vB))},"addDiagrams"),kB=mu(async()=>{bu.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Qh).map(async([e,{detector:t,loader:r}])=>{if(r)try{Xp(e)}catch{try{const{diagram:e,id:n}=await r();Gp(n,e,t)}catch(n){throw bu.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Qh[e],n}}}))).filter(e=>"rejected"===e.status);if(e.length>0){bu.error(`Failed to load ${e.length} external diagrams`);for(const t of e)bu.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function SB(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function _B(e,t,r,n){if(void 0!==e.insert){if(r){const t=`chart-desc-${n}`;e.attr("aria-describedby",t),e.insert("desc",":first-child").attr("id",t).text(r)}if(t){const r=`chart-title-${n}`;e.attr("aria-labelledby",r),e.insert("title",":first-child").attr("id",r).text(t)}}}mu(SB,"setA11yDiagramInfo"),mu(_B,"addSVGa11yTitleDescription");var TB=(mu(g=class{constructor(e,t,r,n,i){this.type=e,this.text=t,this.db=r,this.parser=n,this.renderer=i}static async fromText(e,t={}){var r,n;const i=Dd(),o=ed(e,i);e=bS(e)+"\n";try{Xp(o)}catch{const e=nd(o);if(!e)throw new Kh(`Diagram ${o} not found.`);const{id:t,diagram:r}=await e();Gp(t,r)}const{db:a,parser:s,renderer:l,init:c}=Xp(o);return s.parser&&(s.parser.yy=a),null==(r=a.clear)||r.call(a),null==c||c(i),t.title&&(null==(n=a.setDiagramTitle)||n.call(a,t.title)),await s.parse(e),new g(o,e,a,s,l)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},"Diagram"),g),AB=[],PB=mu(()=>{AB.forEach(e=>{e()}),AB=[]},"attachFunctions"),EB=mu(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function MB(e){const t=e.match(Jh);if(!t)return{text:e,metadata:{}};let r=mC(t[1],{schema:gC})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}mu(MB,"extractFrontMatter");var IB=mu(e=>e.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BB=mu(e=>{const{text:t,metadata:r}=MB(e),{displayMode:n,title:i,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:i,config:o,text:t}},"processFrontmatter"),LB=mu(e=>{const t=xS.detectInit(e)??{},r=xS.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===(null==r?void 0:r.type)&&(t.wrap=!0),{text:zk(e),directive:t}},"processDirectives");function jB(e){const t=IB(e),r=BB(t),n=LB(r.text),i=yS(r.config,n.directive);return{code:e=EB(n.text),title:r.title,config:i}}function NB(e){const t=(new TextEncoder).encode(e),r=Array.from(t,e=>String.fromCodePoint(e)).join("");return btoa(r)}mu(jB,"preprocessDiagram"),mu(NB,"toBase64");var DB=["foreignobject"],OB=["dominant-baseline"];function FB(e){const t=jB(e);return Rd(),Fd(t.config??{}),t}async function RB(e,t){wB();try{const{code:t,config:r}=FB(e);return{diagramType:(await YB(t)).type,config:r}}catch(r){if(null==t?void 0:t.suppressErrors)return!1;throw r}}mu(FB,"processAndSetConfigs"),mu(RB,"parse");var $B=mu((e,t,r=[])=>`\n.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),zB=mu((e,t=new Map)=>{var r;let n="";if(void 0!==e.themeCSS&&(n+=`\n${e.themeCSS}`),void 0!==e.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const i=e.htmlLabels??(null==(r=e.flowchart)?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(e=>{vI(e.styles)||i.forEach(t=>{n+=$B(e.id,t,e.styles)}),vI(e.textStyles)||(n+=$B(e.id,"tspan",((null==e?void 0:e.textStyles)||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),VB=mu((e,t,r,n)=>{const i=zB(e,r);return eI(JM(`${n}{${_p(t,i,e.themeVariables)}}`),tI)},"createUserStyles"),WB=mu((e="",t,r)=>{let n=e;return r||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=vS(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),HB=mu((e="",t)=>{var r,n;return`<iframe style="width:100%;height:${(null==(n=null==(r=null==t?void 0:t.viewBox)?void 0:r.baseVal)?void 0:n.height)?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${NB(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`},"putIntoIFrame"),qB=mu((e,t,r,n,i)=>{const o=e.append("div");o.attr("id",r),n&&o.attr("style",n);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),e},"appendDivSvgG");function UB(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mu(UB,"sandboxedIframe");var GB=mu((e,t,r,n)=>{var i,o,a;null==(i=e.getElementById(t))||i.remove(),null==(o=e.getElementById(r))||o.remove(),null==(a=e.getElementById(n))||a.remove()},"removeExistingElements"),XB=mu(async function(e,t,r){var n,i,o,a,s,l;wB();const c=FB(t);t=c.code;const u=Dd();bu.debug(u),t.length>((null==u?void 0:u.maxTextSize)??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const h="#"+e,d="i"+e,p="#"+d,f="d"+e,g="#"+f,m=mu(()=>{const e=fg(x?p:g).node();e&&"remove"in e&&e.remove()},"removeTempElements");let y=fg("body");const x="sandbox"===u.securityLevel,b="loose"===u.securityLevel,v=u.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const e=UB(fg(r),d);y=fg(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=fg(r);qB(y,e,f,`font-family: ${v}`,"http://www.w3.org/1999/xlink")}else{if(GB(document,e,f,d),x){const e=UB(fg("body"),d);y=fg(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=fg("body");qB(y,e,f)}let C,w;try{C=await TB.fromText(t,{title:c.title})}catch(I){if(u.suppressErrorRendering)throw m(),I;C=await TB.fromText("error"),w=I}const k=y.select(g).node(),S=C.type,_=k.firstChild,T=_.firstChild,A=null==(i=(n=C.renderer).getClasses)?void 0:i.call(n,t,C),P=VB(u,S,A,h),E=document.createElement("style");E.innerHTML=P,_.insertBefore(E,T);try{await C.renderer.draw(t,e,du.version,C)}catch(B){throw u.suppressErrorRendering?m():QI.draw(t,e,du.version),B}ZB(S,y.select(`${g} svg`),null==(a=(o=C.db).getAccTitle)?void 0:a.call(o),null==(l=(s=C.db).getAccDescription)?void 0:l.call(s)),y.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let M=y.select(g).node().innerHTML;if(bu.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),M=WB(M,x,ip(u.arrowMarkerAbsolute)),x){const e=y.select(g+" svg").node();M=HB(M,e)}else b||(M=Xh.sanitize(M,{ADD_TAGS:DB,ADD_ATTR:OB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(PB(),w)throw w;return m(),{diagramType:S,svg:M,bindFunctions:C.db.bindFunctions}},"render");function JB(e={}){var t;const r=od({},e);(null==r?void 0:r.fontFamily)&&!(null==(t=r.themeVariables)?void 0:t.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Bd(r),(null==r?void 0:r.theme)&&r.theme in xd?r.themeVariables=xd[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=xd.default.getThemeVariables(r.themeVariables));const n="object"==typeof r?Id(r):jd();vu(n.logLevel),wB()}mu(JB,"initialize");var YB=mu((e,t={})=>{const{code:r}=jB(e);return TB.fromText(r,t)},"getDiagramFromText");function ZB(e,t,r,n){SB(t,e),_B(t,r,n,t.attr("id"))}mu(ZB,"addA11yInfo");var KB=Object.freeze({render:XB,parse:RB,getDiagramFromText:YB,initialize:JB,getConfig:Dd,setConfig:Nd,getSiteConfig:jd,updateSiteConfig:Ld,reset:mu(()=>{Rd()},"reset"),globalReset:mu(()=>{Rd(Td)},"globalReset"),defaultConfig:Td});vu(Dd().logLevel),Rd(Dd());var QB=mu((e,t,r)=>{bu.warn(e),fS(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),eL=mu(async function(e={querySelector:".mermaid"}){try{await tL(e)}catch(t){if(fS(t)&&bu.error(t.str),dL.parseError&&dL.parseError(t),!e.suppressErrors)throw bu.error("Use the suppressErrors option to suppress these errors"),t}},"run"),tL=mu(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const n=KB.getConfig();let i;if(bu.debug((e?"":"No ")+"Callback function found"),r)i=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(t)}bu.debug(`Found ${i.length} diagrams`),void 0!==(null==n?void 0:n.startOnLoad)&&(bu.debug("Start On Load: "+(null==n?void 0:n.startOnLoad)),KB.updateSiteConfig({startOnLoad:null==n?void 0:n.startOnLoad}));const o=new xS.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const s=[];for(const c of Array.from(i)){if(bu.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const t=`mermaid-${o.next()}`;a=c.innerHTML,a=eT(xS.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=xS.detectInit(a);r&&bu.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await hL(t,a,c);c.innerHTML=r,e&&await e(t),n&&n(c)}catch(l){QB(l,s,dL.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),rL=mu(function(e){KB.initialize(e)},"initialize"),nL=mu(async function(e,t,r){bu.warn("mermaid.init is deprecated. Please use run instead."),e&&rL(e);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof t?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await eL(n)},"init"),iL=mu(async(e,{lazyLoad:t=!0}={})=>{wB(),td(...e),!1===t&&await kB()},"registerExternalDiagrams"),oL=mu(function(){if(dL.startOnLoad){const{startOnLoad:e}=KB.getConfig();e&&dL.run().catch(e=>bu.error("Mermaid failed to initialize",e))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",oL,!1);var aL=mu(function(e){dL.parseError=e},"setParseErrorHandler"),sL=[],lL=!1,cL=mu(async()=>{if(!lL){for(lL=!0;sL.length>0;){const t=sL.shift();if(t)try{await t()}catch(e){bu.error("Error executing queue",e)}}lL=!1}},"executeQueue"),uL=mu(async(e,t)=>new Promise((r,n)=>{const i=mu(()=>new Promise((i,o)=>{KB.parse(e,t).then(e=>{i(e),r(e)},e=>{var t;bu.error("Error parsing",e),null==(t=dL.parseError)||t.call(dL,e),o(e),n(e)})}),"performCall");sL.push(i),cL().catch(n)}),"parse"),hL=mu((e,t,r)=>new Promise((n,i)=>{const o=mu(()=>new Promise((o,a)=>{KB.render(e,t,r).then(e=>{o(e),n(e)},e=>{var t;bu.error("Error parsing",e),null==(t=dL.parseError)||t.call(dL,e),a(e),i(e)})}),"performCall");sL.push(o),cL().catch(i)}),"render"),dL={startOnLoad:!0,mermaidAPI:KB,parse:uL,render:hL,init:nL,run:eL,registerExternalDiagrams:iL,registerLayoutLoaders:gM,initialize:rL,parseError:void 0,contentLoaded:oL,setParseErrorHandler:aL,detectType:ed,registerIconPacks:iT,getRegisteredDiagramsMetadata:mu(()=>Object.keys(Qh).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},pL=dL;
|
|
150
|
+
`}})();return b.jsxs("div",{className:e.root,children:[b.jsx("div",{className:`${e.dot} ${e.dot1}`}),b.jsx("div",{className:`${e.dot} ${e.dot2}`}),b.jsx("div",{className:`${e.dot} ${e.dot3}`})]})},au=(e,t)=>{switch(t.type){case"INIT":return{...e,messages:[t.welcomeMessage],isLoading:!1};case"SET_INPUT":return{...e,inputText:t.inputText};case"ADD_USER_MESSAGE":case"ADD_ASSISTANT_MESSAGE":return{...e,messages:[...e.messages,t.message]};case"UPDATE_LAST_ASSISTANT_MESSAGE":{const r=[...e.messages],n=r.length-1;return n>=0&&"Assistant"===r[n].senderName&&(r[n]=t.message),{...e,messages:r}}case"SET_ERROR":return{...e,error:t.error};case"CLEAR_INPUT":return{...e,inputText:""};case"SET_IS_RUNNING":return{...e,isRunning:!e.isRunning};default:return e}},su=({content:e,className:t})=>{const r={markdown:T.css({fontFamily:w.tokens.fontFamilyBase,fontSize:w.tokens.fontSizeBase300,lineHeight:w.tokens.lineHeightBase300,color:w.tokens.colorNeutralForeground1,"& p":{marginTop:"0",marginBottom:w.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:w.tokens.spacingVerticalL,marginBottom:w.tokens.spacingVerticalM,fontWeight:w.tokens.fontWeightSemibold},"& h1":{fontSize:w.tokens.fontSizeBase500},"& h2":{fontSize:w.tokens.fontSizeBase400},"& h3":{fontSize:w.tokens.fontSizeBase300},"& ul, & ol":{marginTop:"0",marginBottom:w.tokens.spacingVerticalM,paddingLeft:w.tokens.spacingHorizontalXXL},"& li":{marginBottom:w.tokens.spacingVerticalXS},"& code":{fontFamily:w.tokens.fontFamilyMonospace,fontSize:w.tokens.fontSizeBase200,backgroundColor:w.tokens.colorNeutralBackground3,padding:"2px 4px",borderRadius:w.tokens.borderRadiusSmall},"& pre":{backgroundColor:w.tokens.colorNeutralBackground3,padding:w.tokens.spacingVerticalM,borderRadius:w.tokens.borderRadiusMedium,overflowX:"auto",marginBottom:w.tokens.spacingVerticalM},"& pre code":{backgroundColor:"transparent",padding:"0"},"& table":{borderCollapse:"collapse",width:"100%",marginBottom:w.tokens.spacingVerticalM,border:`1px solid ${w.tokens.colorNeutralStroke1}`},"& thead":{backgroundColor:w.tokens.colorNeutralBackground3},"& th":{padding:w.tokens.spacingVerticalS+" "+w.tokens.spacingHorizontalM,textAlign:"left",fontWeight:w.tokens.fontWeightSemibold,borderBottom:`2px solid ${w.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${w.tokens.colorNeutralStroke2}`},"& td":{padding:w.tokens.spacingVerticalS+" "+w.tokens.spacingHorizontalM,borderBottom:`1px solid ${w.tokens.colorNeutralStroke2}`,borderRight:`1px solid ${w.tokens.colorNeutralStroke2}`},"& tr:last-child td":{borderBottom:"none"},"& th:last-child, & td:last-child":{borderRight:"none"},"& blockquote":{borderLeft:`4px solid ${w.tokens.colorBrandStroke1}`,paddingLeft:w.tokens.spacingHorizontalM,marginLeft:"0",marginBottom:w.tokens.spacingVerticalM,color:w.tokens.colorNeutralForeground2},"& a":{color:w.tokens.colorBrandForeground1,textDecoration:"none",":hover":{textDecoration:"underline"}},"& hr":{border:"none",borderTop:`1px solid ${w.tokens.colorNeutralStroke2}`,marginTop:w.tokens.spacingVerticalL,marginBottom:w.tokens.spacingVerticalL}})},[n,i]=q.useState("");return q.useEffect(()=>{const t=new D({html:!1,linkify:!0,typographer:!0,breaks:!0}).render(e);i(t)},[e]),b.jsx("div",{className:`${r.markdown} ${t||""}`,dangerouslySetInnerHTML:{__html:n}})},lu=w.makeStyles({plainText:{fontFamily:w.tokens.fontFamilyBase,fontSize:w.tokens.fontSizeBase300,lineHeight:w.tokens.lineHeightBase300,color:w.tokens.colorNeutralForeground1,whiteSpace:"pre-wrap",wordBreak:"break-word"},htmlContent:{fontFamily:w.tokens.fontFamilyBase,fontSize:w.tokens.fontSizeBase300,lineHeight:w.tokens.lineHeightBase300,color:w.tokens.colorNeutralForeground1,"& p":{marginTop:"0",marginBottom:w.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:w.tokens.spacingVerticalL,marginBottom:w.tokens.spacingVerticalM,fontWeight:w.tokens.fontWeightSemibold},"& table":{borderCollapse:"collapse",width:"100%",marginBottom:w.tokens.spacingVerticalM},"& th, & td":{border:`1px solid ${w.tokens.colorNeutralStroke1}`,padding:w.tokens.spacingHorizontalS,textAlign:"left"},"& th":{backgroundColor:w.tokens.colorNeutralBackground3,fontWeight:w.tokens.fontWeightSemibold}},debugBadge:{display:"inline-block",padding:`${w.tokens.spacingVerticalXS} ${w.tokens.spacingHorizontalS}`,marginBottom:w.tokens.spacingVerticalS,backgroundColor:w.tokens.colorNeutralBackground3,borderRadius:w.tokens.borderRadiusSmall,fontSize:w.tokens.fontSizeBase200,fontFamily:w.tokens.fontFamilyMonospace,color:w.tokens.colorNeutralForeground2},adaptiveCardWrapper:{width:"100%"}}),cu=({content:e,forceType:t,onTypeDetected:r,context:n,theme:i=co.SharePoint,fluentTheme:o,onAdaptiveCardAction:a,className:s,debug:l=!1})=>{const c=lu(),{error:u}=Q(),[h,d]=q.useState(null);if(q.useEffect(()=>{if(q.isValidElement(e))return;if("string"!=typeof e&&"object"!=typeof e)return;const t=st(e);d(t),r&&r(t)},[e,r]),q.isValidElement(e))return b.jsx(b.Fragment,{children:e});const p=t||(null==h?void 0:h.type),f=(null==h?void 0:h.content)||e;return b.jsxs(b.Fragment,{children:[l&&h?b.jsxs("div",{className:c.debugBadge,children:["Type: ",h.type," | Confidence: ",(100*h.confidence).toFixed(0),"%"]}):null,(()=>{switch(p){case ot.MARKDOWN:return b.jsx(su,{content:f,className:s});case ot.HTML:return b.jsx("div",{className:`${c.htmlContent} ${s||""}`,dangerouslySetInnerHTML:{__html:f}});case ot.ADAPTIVE_CARD:return b.jsx("div",{className:`${c.adaptiveCardWrapper} ${s||""}`,children:b.jsx(Uc,{card:"string"==typeof f?JSON.parse(f):f,context:n,theme:o,themeType:i,onInvokeAction:a||(()=>{}),onError:e=>u("Adaptive Card Error:",e instanceof Error?e:void 0)})});case ot.PLAIN_TEXT:default:return b.jsx("div",{className:`${c.plainText} ${s||""}`,children:f})}})()]})},uu=q.forwardRef((e,t)=>{const{messages:r,context:n}=e,i=e=>{if(q.isValidElement(e))return e;if("string"==typeof e){return e.replace(/\{"status"\s*:\s*"executing"\}/gi,"").replace(/\{'status'\s*:\s*'executing'\}/gi,"").trim()}return e},o=T.css({flex:"1 1 0",overflowY:"auto",overflowX:"hidden",padding:"16px",paddingRight:"25px","::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{background:w.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:w.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:w.tokens.colorNeutralStroke2}}),a=T.css({display:"flex",flexDirection:"column",gap:"10px",paddingRight:"30px"});return b.jsx("div",{ref:t,className:o,children:b.jsx(z.Chat,{className:a,children:r.map((e,t)=>"User"===e.senderName?b.jsx(z.ChatMyMessage,{status:e.status,author:e.senderName,children:i(e.message)},t):b.jsx(z.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:b.jsx(M.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:w.tokens.colorBrandBackground}}),author:e.senderName,children:b.jsx(cu,{content:i(e.message),context:n})},t))})})});uu.displayName="ChatList";const hu=(e,t)=>{const{getFormatRelative:r}=rt(e,t);return r(new Date)};var du={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},pu={exports:{}};const fu=Tn(pu.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",h="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,m={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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},y=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},x={s:y,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,c),o=r-i<0,a=t.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:l,d:s,D:d,h:a,m:o,s:i,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",v={};v[b]=m;var C="$isDayjsObject",w=function(e){return e instanceof T||!(!e||!e[C])},k=function e(t,r,n){var i;if(!t)return b;if("string"==typeof t){var o=t.toLowerCase();v[o]&&(i=o),r&&(v[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;v[s]=t,i=s}return!n&&i&&(b=i),i||!n&&b},S=function(e,t){if(w(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new T(r)},_=x;_.l=k,_.i=w,_.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function m(e){this.$L=k(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[C]=!0}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(f);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return _},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(e,t){var r=S(e);return this.startOf(t)<=r&&r<=this.endOf(t)},y.isAfter=function(e,t){return S(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<S(e)},y.$g=function(e,t,r){return _.u(e)?this[t]:this.set(r,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var r=this,n=!!_.u(t)||t,u=_.p(e),p=function(e,t){var i=_.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?i:i.endOf(s)},f=function(e,t){return _.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},g=this.$W,m=this.$M,y=this.$D,x="set"+(this.$u?"UTC":"");switch(u){case h:return n?p(1,0):p(31,11);case c:return n?p(1,m):p(0,m+1);case l:var b=this.$locale().weekStart||0,v=(g<b?g+7:g)-b;return p(n?y-v:y+(6-v),m);case s:case d:return f(x+"Hours",0);case a:return f(x+"Minutes",1);case o:return f(x+"Seconds",2);case i:return f(x+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var r,l=_.p(e),u="set"+(this.$u?"UTC":""),p=(r={},r[s]=u+"Date",r[d]=u+"Date",r[c]=u+"Month",r[h]=u+"FullYear",r[a]=u+"Hours",r[o]=u+"Minutes",r[i]=u+"Seconds",r[n]=u+"Milliseconds",r)[l],f=l===s?this.$D+(t-this.$W):t;if(l===c||l===h){var g=this.clone().set(d,1);g.$d[p](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[_.p(e)]()},y.add=function(n,u){var d,p=this;n=Number(n);var f=_.p(u),g=function(e){var t=S(p);return _.w(t.date(t.date()+Math.round(e*n)),p)};if(f===c)return this.set(c,this.$M+n);if(f===h)return this.set(h,this.$y+n);if(f===s)return g(1);if(f===l)return g(7);var m=(d={},d[o]=t,d[a]=r,d[i]=e,d)[f]||1,y=this.$d.getTime()+n*m;return _.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=_.z(this),o=this.$H,a=this.$m,s=this.$M,l=r.weekdays,c=r.months,u=r.meridiem,h=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].slice(0,o)},d=function(e){return _.s(o%12||12,e,"0")},f=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(g,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return s+1;case"MM":return _.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,c,3);case"MMMM":return h(c,s);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,l,2);case"ddd":return h(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return _.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(o,a,!0);case"A":return f(o,a,!1);case"m":return String(a);case"mm":return _.s(a,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(n,d,p){var f,g=this,m=_.p(d),y=S(n),x=(y.utcOffset()-this.utcOffset())*t,b=this-y,v=function(){return _.m(g,y)};switch(m){case h:f=v()/12;break;case c:f=v();break;case u:f=v()/3;break;case l:f=(b-x)/6048e5;break;case s:f=(b-x)/864e5;break;case a:f=b/r;break;case o:f=b/t;break;case i:f=b/e;break;default:f=b}return p?f:_.a(f)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return v[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=k(e,t,!0);return n&&(r.$L=n),r},y.clone=function(){return _.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),A=T.prototype;return S.prototype=A,[["$ms",n],["$s",i],["$m",o],["$H",a],["$W",s],["$M",c],["$y",h],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),S.extend=function(e,t){return e.$i||(e(t,T,S),e.$i=!0),S},S.locale=k,S.isDayjs=w,S.unix=function(e){return S(1e3*e)},S.en=v[b],S.Ls=v,S.p={},S}());var gu=Object.defineProperty,mu=(e,t)=>gu(e,"name",{value:t,configurable:!0}),yu=(e,t)=>{for(var r in t)gu(e,r,{get:t[r],enumerable:!0})},xu={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},bu={trace:mu((...e)=>{},"trace"),debug:mu((...e)=>{},"debug"),info:mu((...e)=>{},"info"),warn:mu((...e)=>{},"warn"),error:mu((...e)=>{},"error"),fatal:mu((...e)=>{},"fatal")},vu=mu(function(e="fatal"){let t=xu.fatal;"string"==typeof e?e.toLowerCase()in xu&&(t=xu[e]):"number"==typeof e&&(t=e),bu.trace=()=>{},bu.debug=()=>{},bu.info=()=>{},bu.warn=()=>{},bu.error=()=>{},bu.fatal=()=>{},t<=xu.fatal&&(bu.fatal=console.error?console.error.bind(console,Cu("FATAL"),"color: orange"):console.log.bind(console,"[35m",Cu("FATAL"))),t<=xu.error&&(bu.error=console.error?console.error.bind(console,Cu("ERROR"),"color: orange"):console.log.bind(console,"[31m",Cu("ERROR"))),t<=xu.warn&&(bu.warn=console.warn?console.warn.bind(console,Cu("WARN"),"color: orange"):console.log.bind(console,"[33m",Cu("WARN"))),t<=xu.info&&(bu.info=console.info?console.info.bind(console,Cu("INFO"),"color: lightblue"):console.log.bind(console,"[34m",Cu("INFO"))),t<=xu.debug&&(bu.debug=console.debug?console.debug.bind(console,Cu("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",Cu("DEBUG"))),t<=xu.trace&&(bu.trace=console.debug?console.debug.bind(console,Cu("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",Cu("TRACE")))},"setLogLevel"),Cu=mu(e=>`%c${fu().format("ss.SSS")} : ${e} : `,"format");const wu={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},n)=>{if(!t)return 2.55*r;e/=360,t/=100;const i=(r/=100)<.5?r*(1+t):r+t-r*t,o=2*r-i;switch(n){case"r":return 255*wu.hue2rgb(o,i,e+1/3);case"g":return 255*wu.hue2rgb(o,i,e);case"b":return 255*wu.hue2rgb(o,i,e-1/3)}},rgb2hsl:({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;const i=Math.max(e,t,r),o=Math.min(e,t,r),a=(i+o)/2;if("l"===n)return 100*a;if(i===o)return 0;const s=i-o;if("s"===n)return 100*(a>.5?s/(2-i-o):s/(i+o));switch(i){case e:return 60*((t-r)/s+(t<r?6:0));case t:return 60*((r-e)/s+2);case r:return 60*((e-t)/s+4);default:return-1}}},ku={channel:wu,lang:{clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(1e10*e)/1e10},unit:{dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},Su={};for(let RL=0;RL<=255;RL++)Su[RL]=ku.unit.dec2hex(RL);const _u=0,Tu=1,Au=2;class Pu{constructor(){this.type=_u}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=_u}is(e){return this.type===e}}const Eu=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new Pu}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=_u,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=ku.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=ku.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=ku.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=ku.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=ku.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=ku.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(Au)||void 0===t?(this._ensureHSL(),ku.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(Au)||void 0===t?(this._ensureHSL(),ku.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(Au)||void 0===t?(this._ensureHSL(),ku.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Tu)||void 0===t?(this._ensureRGB(),ku.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Tu)||void 0===t?(this._ensureRGB(),ku.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Tu)||void 0===t?(this._ensureRGB(),ku.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Tu),this.changed=!0,this.data.r=e}set g(e){this.type.set(Tu),this.changed=!0,this.data.g=e}set b(e){this.type.set(Tu),this.changed=!0,this.data.b=e}set h(e){this.type.set(Au),this.changed=!0,this.data.h=e}set s(e){this.type.set(Au),this.changed=!0,this.data.s=e}set l(e){this.type.set(Au),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),Mu={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(35!==e.charCodeAt(0))return;const t=e.match(Mu.re);if(!t)return;const r=t[1],n=parseInt(r,16),i=r.length,o=i%4==0,a=i>4,s=a?1:17,l=a?8:4,c=o?0:-1,u=a?255:15;return Eu.set({r:(n>>l*(c+3)&u)*s,g:(n>>l*(c+2)&u)*s,b:(n>>l*(c+1)&u)*s,a:o?(n&u)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`#${Su[Math.round(t)]}${Su[Math.round(r)]}${Su[Math.round(n)]}${Su[Math.round(255*i)]}`:`#${Su[Math.round(t)]}${Su[Math.round(r)]}${Su[Math.round(n)]}`}},Iu={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Iu.hueRe);if(t){const[,e,r]=t;switch(r){case"grad":return ku.channel.clamp.h(.9*parseFloat(e));case"rad":return ku.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return ku.channel.clamp.h(360*parseFloat(e))}}return ku.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(104!==t&&72!==t)return;const r=e.match(Iu.re);if(!r)return;const[,n,i,o,a,s]=r;return Eu.set({h:Iu._hue2deg(n),s:ku.channel.clamp.s(parseFloat(i)),l:ku.channel.clamp.l(parseFloat(o)),a:a?ku.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${ku.lang.round(t)}, ${ku.lang.round(r)}%, ${ku.lang.round(n)}%, ${i})`:`hsl(${ku.lang.round(t)}, ${ku.lang.round(r)}%, ${ku.lang.round(n)}%)`}},Bu={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Bu.colors[e];if(t)return Mu.parse(t)},stringify:e=>{const t=Mu.stringify(e);for(const r in Bu.colors)if(Bu.colors[r]===t)return r}},Lu={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(114!==t&&82!==t)return;const r=e.match(Lu.re);if(!r)return;const[,n,i,o,a,s,l,c,u]=r;return Eu.set({r:ku.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:ku.channel.clamp.g(a?2.55*parseFloat(o):parseFloat(o)),b:ku.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:c?ku.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${ku.lang.round(t)}, ${ku.lang.round(r)}, ${ku.lang.round(n)}, ${ku.lang.round(i)})`:`rgb(${ku.lang.round(t)}, ${ku.lang.round(r)}, ${ku.lang.round(n)})`}},ju={format:{keyword:Bu,hex:Mu,rgb:Lu,rgba:Lu,hsl:Iu,hsla:Iu},parse:e=>{if("string"!=typeof e)return e;const t=Mu.parse(e)||Lu.parse(e)||Iu.parse(e)||Bu.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Au)||void 0===e.data.r?Iu.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Lu.stringify(e):Mu.stringify(e)},Nu=(e,t)=>{const r=ju.parse(e);for(const n in t)r[n]=ku.channel.clamp[n](t[n]);return ju.stringify(r)},Du=(e,t,r=0,n=1)=>{if("number"!=typeof e)return Nu(e,{a:t});const i=Eu.set({r:ku.channel.clamp.r(e),g:ku.channel.clamp.g(t),b:ku.channel.clamp.b(r),a:ku.channel.clamp.a(n)});return ju.stringify(i)},Ou=e=>(e=>{const{r:t,g:r,b:n}=ju.parse(e),i=.2126*ku.channel.toLinear(t)+.7152*ku.channel.toLinear(r)+.0722*ku.channel.toLinear(n);return ku.lang.round(i)})(e)>=.5,Fu=e=>!Ou(e),Ru=(e,t,r)=>{const n=ju.parse(e),i=n[t],o=ku.channel.clamp[t](i+r);return i!==o&&(n[t]=o),ju.stringify(n)},$u=(e,t)=>Ru(e,"l",t),zu=(e,t)=>Ru(e,"l",-t),Vu=(e,t)=>{const r=ju.parse(e),n={};for(const i in t)t[i]&&(n[i]=r[i]+t[i]);return Nu(e,n)},Wu=(e,t=100)=>{const r=ju.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((e,t,r=50)=>{const{r:n,g:i,b:o,a:a}=ju.parse(e),{r:s,g:l,b:c,a:u}=ju.parse(t),h=r/100,d=2*h-1,p=a-u,f=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,g=1-f;return Du(n*f+s*g,i*f+l*g,o*f+c*g,a*h+u*(1-h))})(r,e,t)},{entries:Hu,setPrototypeOf:qu,isFrozen:Uu,getPrototypeOf:Gu,getOwnPropertyDescriptor:Xu}=Object;let{freeze:Ju,seal:Yu,create:Zu}=Object,{apply:Ku,construct:Qu}="undefined"!=typeof Reflect&&Reflect;Ju||(Ju=function(e){return e}),Yu||(Yu=function(e){return e}),Ku||(Ku=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return e.apply(t,n)}),Qu||(Qu=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});const eh=gh(Array.prototype.forEach),th=gh(Array.prototype.lastIndexOf),rh=gh(Array.prototype.pop),nh=gh(Array.prototype.push),ih=gh(Array.prototype.splice),oh=gh(String.prototype.toLowerCase),ah=gh(String.prototype.toString),sh=gh(String.prototype.match),lh=gh(String.prototype.replace),ch=gh(String.prototype.indexOf),uh=gh(String.prototype.trim),hh=gh(Object.prototype.hasOwnProperty),dh=gh(RegExp.prototype.test),ph=(fh=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Qu(fh,t)});var fh;function gh(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Ku(e,t,n)}}function mh(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:oh;qu&&qu(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(Uu(t)||(t[n]=e),i=e)}e[i]=!0}return e}function yh(e){for(let t=0;t<e.length;t++){hh(e,t)||(e[t]=null)}return e}function xh(e){const t=Zu(null);for(const[r,n]of Hu(e)){hh(e,r)&&(Array.isArray(n)?t[r]=yh(n):n&&"object"==typeof n&&n.constructor===Object?t[r]=xh(n):t[r]=n)}return t}function bh(e,t){for(;null!==e;){const r=Xu(e,t);if(r){if(r.get)return gh(r.get);if("function"==typeof r.value)return gh(r.value)}e=Gu(e)}return function(){return null}}const vh=Ju(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ch=Ju(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wh=Ju(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kh=Ju(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Sh=Ju(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_h=Ju(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Th=Ju(["#text"]),Ah=Ju(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ph=Ju(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Eh=Ju(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mh=Ju(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ih=Yu(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Bh=Yu(/<%[\w\W]*|[\w\W]*%>/gm),Lh=Yu(/\$\{[\w\W]*/gm),jh=Yu(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nh=Yu(/^aria-[\-\w]+$/),Dh=Yu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oh=Yu(/^(?:\w+script|data):/i),Fh=Yu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rh=Yu(/^html$/i),$h=Yu(/^[a-z][.\w]*(-[.\w]+)+$/i);var zh=Object.freeze({__proto__:null,ARIA_ATTR:Nh,ATTR_WHITESPACE:Fh,CUSTOM_ELEMENT:$h,DATA_ATTR:jh,DOCTYPE_NAME:Rh,ERB_EXPR:Bh,IS_ALLOWED_URI:Dh,IS_SCRIPT_OR_DATA:Oh,MUSTACHE_EXPR:Ih,TMPLIT_EXPR:Lh});const Vh=1,Wh=3,Hh=7,qh=8,Uh=9;var Gh,Xh=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=t=>e(t);if(r.version="3.3.1",r.removed=[],!t||!t.document||t.document.nodeType!==Uh||!t.Element)return r.isSupported=!1,r;let{document:n}=t;const i=n,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=t,g=c.prototype,m=bh(g,"cloneNode"),y=bh(g,"remove"),x=bh(g,"nextSibling"),b=bh(g,"childNodes"),v=bh(g,"parentNode");if("function"==typeof s){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let C,w="";const{implementation:k,createNodeIterator:S,createDocumentFragment:_,getElementsByTagName:T}=n,{importNode:A}=i;let P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof Hu&&"function"==typeof v&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:E,ERB_EXPR:M,TMPLIT_EXPR:I,DATA_ATTR:B,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:D}=zh;let{IS_ALLOWED_URI:O}=zh,F=null;const R=mh({},[...vh,...Ch,...wh,...Sh,...Th]);let $=null;const z=mh({},[...Ah,...Ph,...Eh,...Mh]);let V=Object.seal(Zu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,H=null;const q=Object.seal(Zu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let U=!0,G=!0,X=!1,J=!0,Y=!1,Z=!0,K=!1,Q=!1,ee=!1,te=!1,re=!1,ne=!1,ie=!0,oe=!1,ae=!0,se=!1,le={},ce=null;const ue=mh({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let he=null;const de=mh({},["audio","video","img","source","image","track"]);let pe=null;const fe=mh({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let xe=ye,be=!1,ve=null;const Ce=mh({},[ge,me,ye],ah);let we=mh({},["mi","mo","mn","ms","mtext"]),ke=mh({},["annotation-xml"]);const Se=mh({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let Ae=null,Pe=null;const Ee=n.createElement("form"),Me=function(e){return e instanceof RegExp||e instanceof Function},Ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Pe||Pe!==e){if(e&&"object"==typeof e||(e={}),e=xh(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===_e?ah:oh,F=hh(e,"ALLOWED_TAGS")?mh({},e.ALLOWED_TAGS,Ae):R,$=hh(e,"ALLOWED_ATTR")?mh({},e.ALLOWED_ATTR,Ae):z,ve=hh(e,"ALLOWED_NAMESPACES")?mh({},e.ALLOWED_NAMESPACES,ah):Ce,pe=hh(e,"ADD_URI_SAFE_ATTR")?mh(xh(fe),e.ADD_URI_SAFE_ATTR,Ae):fe,he=hh(e,"ADD_DATA_URI_TAGS")?mh(xh(de),e.ADD_DATA_URI_TAGS,Ae):de,ce=hh(e,"FORBID_CONTENTS")?mh({},e.FORBID_CONTENTS,Ae):ue,W=hh(e,"FORBID_TAGS")?mh({},e.FORBID_TAGS,Ae):xh({}),H=hh(e,"FORBID_ATTR")?mh({},e.FORBID_ATTR,Ae):xh({}),le=!!hh(e,"USE_PROFILES")&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,X=e.ALLOW_UNKNOWN_PROTOCOLS||!1,J=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,re=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,O=e.ALLOWED_URI_REGEXP||Dh,xe=e.NAMESPACE||ye,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,ke=e.HTML_INTEGRATION_POINTS||ke,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(G=!1),re&&(te=!0),le&&(F=mh({},Th),$=[],!0===le.html&&(mh(F,vh),mh($,Ah)),!0===le.svg&&(mh(F,Ch),mh($,Ph),mh($,Mh)),!0===le.svgFilters&&(mh(F,wh),mh($,Ph),mh($,Mh)),!0===le.mathMl&&(mh(F,Sh),mh($,Eh),mh($,Mh))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?q.tagCheck=e.ADD_TAGS:(F===R&&(F=xh(F)),mh(F,e.ADD_TAGS,Ae))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?q.attributeCheck=e.ADD_ATTR:($===z&&($=xh($)),mh($,e.ADD_ATTR,Ae))),e.ADD_URI_SAFE_ATTR&&mh(pe,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(ce===ue&&(ce=xh(ce)),mh(ce,e.FORBID_CONTENTS,Ae)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=xh(ce)),mh(ce,e.ADD_FORBID_CONTENTS,Ae)),ae&&(F["#text"]=!0),K&&mh(F,["html","head","body"]),F.table&&(mh(F,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ph('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ph('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(o){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(f,o)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));Ju&&Ju(e),Pe=e}},Be=mh({},[...Ch,...wh,...kh]),Le=mh({},[...Sh,..._h]),je=function(e){nh(r.removed,{element:e});try{v(e).removeChild(e)}catch(t){y(e)}},Ne=function(e,t){try{nh(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){nh(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||re)try{je(t)}catch(n){}else try{t.setAttribute(e,"")}catch(n){}},De=function(e){let t=null,r=null;if(ee)e="<remove></remove>"+e;else{const t=sh(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===_e&&xe===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=C?C.createHTML(e):e;if(xe===ye)try{t=(new p).parseFromString(i,_e)}catch(a){}if(!t||!t.documentElement){t=k.createDocument(xe,"template",null);try{t.documentElement.innerHTML=be?w:i}catch(a){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),xe===ye?T.call(t,K?"html":"body")[0]:K?t.documentElement:o},Oe=function(e){return S.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Fe=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Re=function(e){return"function"==typeof l&&e instanceof l};function $e(e,t,n){eh(e,e=>{e.call(r,t,n,Pe)})}const ze=function(e){let t=null;if($e(P.beforeSanitizeElements,e,null),Fe(e))return je(e),!0;const n=Ae(e.nodeName);if($e(P.uponSanitizeElement,e,{tagName:n,allowedTags:F}),Z&&e.hasChildNodes()&&!Re(e.firstElementChild)&&dh(/<[/\w!]/g,e.innerHTML)&&dh(/<[/\w!]/g,e.textContent))return je(e),!0;if(e.nodeType===Hh)return je(e),!0;if(Z&&e.nodeType===qh&&dh(/<[/\w]/g,e.data))return je(e),!0;if(!(q.tagCheck instanceof Function&&q.tagCheck(n))&&(!F[n]||W[n])){if(!W[n]&&We(n)){if(V.tagNameCheck instanceof RegExp&&dh(V.tagNameCheck,n))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(n))return!1}if(ae&&!ce[n]){const t=v(e)||e.parentNode,r=b(e)||e.childNodes;if(r&&t){for(let n=r.length-1;n>=0;--n){const i=m(r[n],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,x(e))}}}return je(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:xe,tagName:"template"});const r=oh(e.tagName),n=oh(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ye?"svg"===r:t.namespaceURI===ge?"svg"===r&&("annotation-xml"===n||we[n]):Boolean(Be[r]):e.namespaceURI===ge?t.namespaceURI===ye?"math"===r:t.namespaceURI===me?"math"===r&&ke[n]:Boolean(Le[r]):e.namespaceURI===ye?!(t.namespaceURI===me&&!ke[n])&&!(t.namespaceURI===ge&&!we[n])&&!Le[r]&&(Se[r]||!Be[r]):!("application/xhtml+xml"!==_e||!ve[e.namespaceURI]))}(e)?(je(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!dh(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Wh&&(t=e.textContent,eh([E,M,I],e=>{t=lh(t,e," ")}),e.textContent!==t&&(nh(r.removed,{element:e.cloneNode()}),e.textContent=t)),$e(P.afterSanitizeElements,e,null),!1):(je(e),!0)},Ve=function(e,t,r){if(ie&&("id"===t||"name"===t)&&(r in n||r in Ee))return!1;if(G&&!H[t]&&dh(B,t));else if(U&&dh(L,t));else if(q.attributeCheck instanceof Function&&q.attributeCheck(t,e));else if(!$[t]||H[t]){if(!(We(e)&&(V.tagNameCheck instanceof RegExp&&dh(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&dh(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t,e))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&dh(V.tagNameCheck,r)||V.tagNameCheck instanceof Function&&V.tagNameCheck(r))))return!1}else if(pe[t]);else if(dh(O,lh(r,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ch(r,"data:")||!he[e]){if(X&&!dh(j,lh(r,N,"")));else if(r)return!1}else;return!0},We=function(e){return"annotation-xml"!==e&&sh(e,D)},He=function(e){$e(P.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Fe(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let i=t.length;for(;i--;){const a=t[i],{name:s,namespaceURI:l,value:c}=a,u=Ae(s),h=c;let d="value"===s?h:uh(h);if(n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$e(P.uponSanitizeAttribute,e,n),d=n.attrValue,!oe||"id"!==u&&"name"!==u||(Ne(s,e),d="user-content-"+d),Z&&dh(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Ne(s,e);continue}if("attributename"===u&&sh(d,"href")){Ne(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ne(s,e);continue}if(!J&&dh(/\/>/i,d)){Ne(s,e);continue}Y&&eh([E,M,I],e=>{d=lh(d,e," ")});const p=Ae(e.nodeName);if(Ve(p,u,d)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(l);else switch(f.getAttributeType(p,u)){case"TrustedHTML":d=C.createHTML(d);break;case"TrustedScriptURL":d=C.createScriptURL(d)}if(d!==h)try{l?e.setAttributeNS(l,s,d):e.setAttribute(s,d),Fe(e)?je(e):rh(r.removed)}catch(o){Ne(s,e)}}else Ne(s,e)}$e(P.afterSanitizeAttributes,e,null)},qe=function e(t){let r=null;const n=Oe(t);for($e(P.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)$e(P.uponSanitizeShadowNode,r,null),ze(r),He(r),r.content instanceof a&&e(r.content);$e(P.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw ph("toString is not a function");if("string"!=typeof(e=e.toString()))throw ph("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Q||Ie(t),r.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ae(e.nodeName);if(!F[t]||W[t])throw ph("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=De("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),o.nodeType===Vh&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!te&&!Y&&!K&&-1===e.indexOf("<"))return C&&ne?C.createHTML(e):e;if(n=De(e),!n)return te?null:ne?w:""}n&&ee&&je(n.firstChild);const u=Oe(se?e:n);for(;s=u.nextNode();)ze(s),He(s),s.content instanceof a&&qe(s.content);if(se)return e;if(te){if(re)for(c=_.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return($.shadowroot||$.shadowrootmode)&&(c=A.call(i,c,!0)),c}let h=K?n.outerHTML:n.innerHTML;return K&&F["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&dh(Rh,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Y&&eh([E,M,I],e=>{h=lh(h,e," ")}),C&&ne?C.createHTML(h):h},r.setConfig=function(){Ie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},r.clearConfig=function(){Pe=null,Q=!1},r.isValidAttribute=function(e,t,r){Pe||Ie({});const n=Ae(e),i=Ae(t);return Ve(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&nh(P[e],t)},r.removeHook=function(e,t){if(void 0!==t){const r=th(P[e],t);return-1===r?void 0:ih(P[e],r,1)[0]}return rh(P[e])},r.removeHooks=function(e){P[e]=[]},r.removeAllHooks=function(){P={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),Jh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Yh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Zh=/\s*%%.*\n/gm,Kh=(a=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},mu(a,"UnknownDiagramError"),a),Qh={},ed=mu(function(e,t){e=e.replace(Jh,"").replace(Yh,"").replace(Zh,"\n");for(const[r,{detector:n}]of Object.entries(Qh)){if(n(e,t))return r}throw new Kh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),td=mu((...e)=>{for(const{id:t,detector:r,loader:n}of e)rd(t,r,n)},"registerLazyLoadedDiagrams"),rd=mu((e,t,r)=>{Qh[e]&&bu.warn(`Detector with key ${e} already exists. Overwriting.`),Qh[e]={detector:t,loader:r},bu.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),nd=mu(e=>Qh[e].loader,"getDiagramLoader"),id=mu((e,t,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>id(e,t,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||r<=0?null!=e&&"object"==typeof e&&"object"==typeof t?Object.assign(e,t):t:(void 0!==t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).forEach(i=>{"object"!=typeof t[i]||void 0!==e[i]&&"object"!=typeof e[i]?(n||"object"!=typeof e[i]&&"object"!=typeof t[i])&&(e[i]=t[i]):(void 0===e[i]&&(e[i]=Array.isArray(t[i])?[]:{}),e[i]=id(e[i],t[i],{depth:r-1,clobber:n}))}),e)},"assignWithDepth"),od=id,ad="#ffffff",sd="#f2f2f2",ld=mu((e,t)=>Vu(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),cd=(mu(s=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Vu(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Vu(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ld(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ld(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wu(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wu(this.tertiaryColor),this.lineColor=this.lineColor||Wu(this.background),this.arrowheadColor=this.arrowheadColor||Wu(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?zu(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||zu(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wu(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||$u(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||zu(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||zu(this.mainBkg,10)):(this.rowOdd=this.rowOdd||$u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$u(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||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330}),this.darkMode)for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=zu(this["cScale"+w],75);else for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=zu(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||Wu(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||$u(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||zu(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;const C=this.darkMode?-4:-1;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||Vu(this.mainBkg,{h:180,s:-15,l:C*(5+3*w)}),this["surfacePeer"+w]=this["surfacePeer"+w]||Vu(this.mainBkg,{h:180,s:-15,l:C*(8+3*w)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Vu(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Vu(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Vu(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Vu(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Vu(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Vu(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||Vu(this.primaryColor,{l:-10}),this.pie5=this.pie5||Vu(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Vu(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Vu(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Vu(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Vu(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Vu(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Vu(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Vu(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:(null==(e=this.radar)?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:(null==(t=this.radar)?void 0:t.axisStrokeWidth)||2,axisLabelFontSize:(null==(r=this.radar)?void 0:r.axisLabelFontSize)||12,curveOpacity:(null==(n=this.radar)?void 0:n.curveOpacity)||.5,curveStrokeWidth:(null==(i=this.radar)?void 0:i.curveStrokeWidth)||2,graticuleColor:(null==(o=this.radar)?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(a=this.radar)?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:(null==(s=this.radar)?void 0:s.graticuleOpacity)||.3,legendBoxSize:(null==(l=this.radar)?void 0:l.legendBoxSize)||12,legendFontSize:(null==(c=this.radar)?void 0:c.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||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(u=this.xyChart)?void 0:u.backgroundColor)||this.background,titleColor:(null==(h=this.xyChart)?void 0:h.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(d=this.xyChart)?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(p=this.xyChart)?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(f=this.xyChart)?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(g=this.xyChart)?void 0:g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(m=this.xyChart)?void 0:m.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(y=this.xyChart)?void 0:y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(x=this.xyChart)?void 0:x.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(b=this.xyChart)?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(v=this.xyChart)?void 0:v.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?zu(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||Vu(this.primaryColor,{h:-30}),this.git4=this.git4||Vu(this.primaryColor,{h:-60}),this.git5=this.git5||Vu(this.primaryColor,{h:-90}),this.git6=this.git6||Vu(this.primaryColor,{h:60}),this.git7=this.git7||Vu(this.primaryColor,{h:120}),this.darkMode?(this.git0=$u(this.git0,25),this.git1=$u(this.git1,25),this.git2=$u(this.git2,25),this.git3=$u(this.git3,25),this.git4=$u(this.git4,25),this.git5=$u(this.git5,25),this.git6=$u(this.git6,25),this.git7=$u(this.git7,25)):(this.git0=zu(this.git0,25),this.git1=zu(this.git1,25),this.git2=zu(this.git2,25),this.git3=zu(this.git3,25),this.git4=zu(this.git4,25),this.git5=zu(this.git5,25),this.git6=zu(this.git6,25),this.git7=zu(this.git7,25)),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),s),ud=mu(e=>{const t=new cd;return t.calculate(e),t},"getThemeVariables"),hd=(mu(l=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=$u(this.primaryColor,16),this.tertiaryColor=Vu(this.primaryColor,{h:-160}),this.primaryBorderColor=Wu(this.background),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.tertiaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=$u(Wu("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Du(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=zu("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=zu(this.sectionBkgColor,10),this.taskBorderColor=Du(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Du(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||$u(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||zu(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.secondBkg=$u(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=$u(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=$u(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(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||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Wu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||$u(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(4*C-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.xyChart)?void 0:e.backgroundColor)||this.background,titleColor:(null==(t=this.xyChart)?void 0:t.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(n=this.xyChart)?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(i=this.xyChart)?void 0:i.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.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:(null==(h=this.radar)?void 0:h.axisColor)||this.lineColor,axisStrokeWidth:(null==(d=this.radar)?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:(null==(p=this.radar)?void 0:p.axisLabelFontSize)||12,curveOpacity:(null==(f=this.radar)?void 0:f.curveOpacity)||.5,curveStrokeWidth:(null==(g=this.radar)?void 0:g.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(x=this.radar)?void 0:x.graticuleOpacity)||.3,legendBoxSize:(null==(b=this.radar)?void 0:b.legendBoxSize)||12,legendFontSize:(null==(v=this.radar)?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?zu(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=$u(this.secondaryColor,20),this.git1=$u(this.pie2||this.secondaryColor,20),this.git2=$u(this.pie3||this.tertiaryColor,20),this.git3=$u(this.pie4||Vu(this.primaryColor,{h:-30}),20),this.git4=$u(this.pie5||Vu(this.primaryColor,{h:-60}),20),this.git5=$u(this.pie6||Vu(this.primaryColor,{h:-90}),10),this.git6=$u(this.pie7||Vu(this.primaryColor,{h:60}),10),this.git7=$u(this.pie8||Vu(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wu(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||$u(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$u(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),l),dd=mu(e=>{const t=new hd;return t.calculate(e),t},"getThemeVariables"),pd=(mu(c=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Vu(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Vu(this.primaryColor,{h:-160}),this.primaryBorderColor=ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.tertiaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Du(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||zu(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||zu(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=zu(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||zu(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Vu(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{h:30,l:-(7+5*C)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||Wu(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Wu(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||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=$u(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$u(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||$u(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=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Vu(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Vu(this.primaryColor,{l:-10}),this.pie5=this.pie5||Vu(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Vu(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Vu(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Vu(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Vu(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Vu(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Vu(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Vu(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.radar)?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:(null==(t=this.radar)?void 0:t.axisStrokeWidth)||2,axisLabelFontSize:(null==(r=this.radar)?void 0:r.axisLabelFontSize)||12,curveOpacity:(null==(n=this.radar)?void 0:n.curveOpacity)||.5,curveStrokeWidth:(null==(i=this.radar)?void 0:i.curveStrokeWidth)||2,graticuleColor:(null==(o=this.radar)?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(a=this.radar)?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:(null==(s=this.radar)?void 0:s.graticuleOpacity)||.3,legendBoxSize:(null==(l=this.radar)?void 0:l.legendBoxSize)||12,legendFontSize:(null==(c=this.radar)?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:(null==(u=this.xyChart)?void 0:u.backgroundColor)||this.background,titleColor:(null==(h=this.xyChart)?void 0:h.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(d=this.xyChart)?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(p=this.xyChart)?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(f=this.xyChart)?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(g=this.xyChart)?void 0:g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(m=this.xyChart)?void 0:m.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(y=this.xyChart)?void 0:y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(x=this.xyChart)?void 0:x.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(b=this.xyChart)?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(v=this.xyChart)?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vu(this.primaryColor,{h:-30}),this.git4=this.git4||Vu(this.primaryColor,{h:-60}),this.git5=this.git5||Vu(this.primaryColor,{h:-90}),this.git6=this.git6||Vu(this.primaryColor,{h:60}),this.git7=this.git7||Vu(this.primaryColor,{h:120}),this.darkMode?(this.git0=$u(this.git0,25),this.git1=$u(this.git1,25),this.git2=$u(this.git2,25),this.git3=$u(this.git3,25),this.git4=$u(this.git4,25),this.git5=$u(this.git5,25),this.git6=$u(this.git6,25),this.git7=$u(this.git7,25)):(this.git0=zu(this.git0,25),this.git1=zu(this.git1,25),this.git2=zu(this.git2,25),this.git3=zu(this.git3,25),this.git4=zu(this.git4,25),this.git5=zu(this.git5,25),this.git6=zu(this.git6,25),this.git7=zu(this.git7,25)),this.gitInv0=this.gitInv0||zu(Wu(this.git0),25),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if(Object.keys(this).forEach(e=>{"calculated"===this[e]&&(this[e]=void 0)}),"object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),c),fd=mu(e=>{const t=new pd;return t.calculate(e),t},"getThemeVariables"),gd=(mu(u=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=$u("#cde498",10),this.primaryBorderColor=ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.primaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.actorBorder=zu(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||Vu(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Vu(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Vu(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Vu(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Vu(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Vu(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Vu(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Vu(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Vu(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||zu(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||zu(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=zu(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||zu(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Vu(this["cScale"+C],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{h:30,s:-30,l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||$u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||$u(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=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(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||Vu(this.primaryColor,{l:-30}),this.pie5=this.pie5||Vu(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Vu(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Vu(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Vu(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Vu(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Vu(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Vu(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Vu(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.radar)?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:(null==(t=this.radar)?void 0:t.axisStrokeWidth)||2,axisLabelFontSize:(null==(r=this.radar)?void 0:r.axisLabelFontSize)||12,curveOpacity:(null==(n=this.radar)?void 0:n.curveOpacity)||.5,curveStrokeWidth:(null==(i=this.radar)?void 0:i.curveStrokeWidth)||2,graticuleColor:(null==(o=this.radar)?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(a=this.radar)?void 0:a.graticuleStrokeWidth)||1,graticuleOpacity:(null==(s=this.radar)?void 0:s.graticuleOpacity)||.3,legendBoxSize:(null==(l=this.radar)?void 0:l.legendBoxSize)||12,legendFontSize:(null==(c=this.radar)?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:(null==(u=this.xyChart)?void 0:u.backgroundColor)||this.background,titleColor:(null==(h=this.xyChart)?void 0:h.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(d=this.xyChart)?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(p=this.xyChart)?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(f=this.xyChart)?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(g=this.xyChart)?void 0:g.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(m=this.xyChart)?void 0:m.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(y=this.xyChart)?void 0:y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(x=this.xyChart)?void 0:x.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(b=this.xyChart)?void 0:b.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(v=this.xyChart)?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Vu(this.primaryColor,{h:-30}),this.git4=this.git4||Vu(this.primaryColor,{h:-60}),this.git5=this.git5||Vu(this.primaryColor,{h:-90}),this.git6=this.git6||Vu(this.primaryColor,{h:60}),this.git7=this.git7||Vu(this.primaryColor,{h:120}),this.darkMode?(this.git0=$u(this.git0,25),this.git1=$u(this.git1,25),this.git2=$u(this.git2,25),this.git3=$u(this.git3,25),this.git4=$u(this.git4,25),this.git5=$u(this.git5,25),this.git6=$u(this.git6,25),this.git7=$u(this.git7,25)):(this.git0=zu(this.git0,25),this.git1=zu(this.git1,25),this.git2=zu(this.git2,25),this.git3=zu(this.git3,25),this.git4=zu(this.git4,25),this.git5=zu(this.git5,25),this.git6=zu(this.git6,25),this.git7=zu(this.git7,25)),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),u),md=mu(e=>{const t=new gd;return t.calculate(e),t},"getThemeVariables"),yd=(mu(h=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=$u(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Vu(this.primaryColor,{h:-160}),this.primaryBorderColor=ld(this.primaryColor,this.darkMode),this.secondaryBorderColor=ld(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ld(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wu(this.primaryColor),this.secondaryTextColor=Wu(this.secondaryColor),this.tertiaryTextColor=Wu(this.tertiaryColor),this.lineColor=Wu(this.background),this.textColor=Wu(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||$u(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,t,r,n,i,o,a,s,l,c,u,h,d,p,f,g,m,y,x,b,v;this.secondBkg=$u(this.contrast,55),this.border2=this.contrast,this.actorBorder=$u(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Wu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||$u(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||zu(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Vu(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Vu(this.mainBkg,{l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=$u(this.contrast,30),this.sectionBkgColor2=$u(this.contrast,30),this.taskBorderColor=zu(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=$u(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=zu(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=Vu(this.primaryColor,{h:64}),this.fillType3=Vu(this.secondaryColor,{h:64}),this.fillType4=Vu(this.primaryColor,{h:-64}),this.fillType5=Vu(this.secondaryColor,{h:-64}),this.fillType6=Vu(this.primaryColor,{h:128}),this.fillType7=Vu(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Vu(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Vu(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Vu(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Vu(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Vu(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Vu(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fu(this.quadrant1Fill)?$u(this.quadrant1Fill):zu(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:(null==(e=this.xyChart)?void 0:e.backgroundColor)||this.background,titleColor:(null==(t=this.xyChart)?void 0:t.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(n=this.xyChart)?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(i=this.xyChart)?void 0:i.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:(null==(h=this.radar)?void 0:h.axisColor)||this.lineColor,axisStrokeWidth:(null==(d=this.radar)?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:(null==(p=this.radar)?void 0:p.axisLabelFontSize)||12,curveOpacity:(null==(f=this.radar)?void 0:f.curveOpacity)||.5,curveStrokeWidth:(null==(g=this.radar)?void 0:g.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(x=this.radar)?void 0:x.graticuleOpacity)||.3,legendBoxSize:(null==(b=this.radar)?void 0:b.legendBoxSize)||12,legendFontSize:(null==(v=this.radar)?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=zu(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Vu(this.primaryColor,{h:-30}),this.git4=this.pie5||Vu(this.primaryColor,{h:-60}),this.git5=this.pie6||Vu(this.primaryColor,{h:-90}),this.git6=this.pie7||Vu(this.primaryColor,{h:60}),this.git7=this.pie8||Vu(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Wu(this.git0),this.gitInv1=this.gitInv1||Wu(this.git1),this.gitInv2=this.gitInv2||Wu(this.git2),this.gitInv3=this.gitInv3||Wu(this.git3),this.gitInv4=this.gitInv4||Wu(this.git4),this.gitInv5=this.gitInv5||Wu(this.git5),this.gitInv6=this.gitInv6||Wu(this.git6),this.gitInv7=this.gitInv7||Wu(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||ad,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sd}calculate(e){if("object"!=typeof e)return void this.updateColors();const t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},"Theme"),h),xd={base:{getThemeVariables:ud},dark:{getThemeVariables:dd},default:{getThemeVariables:fd},forest:{getThemeVariables:md},neutral:{getThemeVariables:mu(e=>{const t=new yd;return t.calculate(e),t},"getThemeVariables")}},bd={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},vd={...bd,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:xd.default.getThemeVariables(),sequence:{...bd.sequence,messageFont:mu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mu(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mu(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...bd.gantt,tickInterval:void 0,useWidth:void 0},c4:{...bd.c4,useWidth:void 0,personFont:mu(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...bd.flowchart,inheritDir:!1},external_personFont:mu(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:mu(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:mu(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:mu(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:mu(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:mu(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:mu(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:mu(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:mu(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:mu(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:mu(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:mu(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:mu(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:mu(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:mu(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:mu(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:mu(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:mu(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:mu(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:mu(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:mu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...bd.pie,useWidth:984},xyChart:{...bd.xyChart,useWidth:void 0},requirement:{...bd.requirement,useWidth:void 0},packet:{...bd.packet},radar:{...bd.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Cd=mu((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:"object"==typeof e[n]&&null!==e[n]?[...r,t+n,...Cd(e[n],"")]:[...r,t+n],[]),"keyify"),wd=new Set(Cd(vd,"")),kd=vd,Sd=mu(e=>{if(bu.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>Sd(e));else{for(const t of Object.keys(e)){if(bu.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!wd.has(t)||null==e[t]){bu.debug("sanitize deleting key: ",t),delete e[t];continue}if("object"==typeof e[t]){bu.debug("sanitizing object",t),Sd(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)t.includes(n)&&(bu.debug("sanitizing css option",t),e[t]=_d(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];(null==r?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}bu.debug("After sanitization",e)}},"sanitizeDirective"),_d=mu(e=>{let t=0,r=0;for(const n of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===n?t++:"}"===n&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Td=Object.freeze(kd),Ad=od({},Td),Pd=[],Ed=od({},Td),Md=mu((e,t)=>{let r=od({},e),n={};for(const i of t)Od(i),n=od(n,i);if(r=od(r,n),n.theme&&n.theme in xd){const e=od({},Gh),t=od(e.themeVariables||{},n.themeVariables);r.theme&&r.theme in xd&&(r.themeVariables=xd[r.theme].getThemeVariables(t))}return Wd(Ed=r),Ed},"updateCurrentConfig"),Id=mu(e=>(Ad=od({},Td),Ad=od(Ad,e),e.theme&&xd[e.theme]&&(Ad.themeVariables=xd[e.theme].getThemeVariables(e.themeVariables)),Md(Ad,Pd),Ad),"setSiteConfig"),Bd=mu(e=>{Gh=od({},e)},"saveConfigFromInitialize"),Ld=mu(e=>(Ad=od(Ad,e),Md(Ad,Pd),Ad),"updateSiteConfig"),jd=mu(()=>od({},Ad),"getSiteConfig"),Nd=mu(e=>(Wd(e),od(Ed,e),Dd()),"setConfig"),Dd=mu(()=>od({},Ed),"getConfig"),Od=mu(e=>{e&&(["secure",...Ad.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(bu.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Od(e[t])}))},"sanitize"),Fd=mu(e=>{var t;Sd(e),e.fontFamily&&!(null==(t=e.themeVariables)?void 0:t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Pd.push(e),Md(Ad,Pd)},"addDirective"),Rd=mu((e=Ad)=>{Md(e,Pd=[])},"reset"),$d={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},zd={},Vd=mu(e=>{zd[e]||(bu.warn($d[e]),zd[e]=!0)},"issueWarning"),Wd=mu(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Vd("LAZY_LOAD_DEPRECATED")},"checkConfig"),Hd=mu(()=>{let e={};Gh&&(e=od(e,Gh));for(const t of Pd)e=od(e,t);return e},"getUserDefinedConfig"),qd=/<br\s*\/?>/gi,Ud=mu(e=>{if(!e)return[""];return rp(e).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Gd=(()=>{let e=!1;return()=>{e||(Xd(),e=!0)}})();function Xd(){const e="data-temp-href-target";Xh.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Xh.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target")&&t.setAttribute("rel","noopener"))})}mu(Xd,"setupDompurifyHooks");var Jd=mu(e=>{Gd();return Xh.sanitize(e)},"removeScript"),Yd=mu((e,t)=>{var r;if(!1!==(null==(r=t.flowchart)?void 0:r.htmlLabels)){const r=t.securityLevel;"antiscript"===r||"strict"===r?e=Jd(e):"loose"!==r&&(e=(e=(e=rp(e)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),e=tp(e))}return e},"sanitizeMore"),Zd=mu((e,t)=>e?e=t.dompurifyConfig?Xh.sanitize(Yd(e,t),t.dompurifyConfig).toString():Xh.sanitize(Yd(e,t),{FORBID_TAGS:["style"]}).toString():e,"sanitizeText"),Kd=mu((e,t)=>"string"==typeof e?Zd(e,t):e.flat().map(e=>Zd(e,t)),"sanitizeTextOrArray"),Qd=mu(e=>qd.test(e),"hasBreaks"),ep=mu(e=>e.split(qd),"splitBreaks"),tp=mu(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),rp=mu(e=>e.replace(qd,"#br#"),"breakToPlaceholder"),np=mu(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),ip=mu(e=>!1!==e&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),op=mu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.max(...t)},"getMax"),ap=mu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.min(...t)},"getMin"),sp=mu(function(e){const t=e.split(/(,)/),r=[];for(let n=0;n<t.length;n++){let e=t[n];if(","===e&&n>0&&n+1<t.length){const i=t[n-1],o=t[n+1];cp(i,o)&&(e=i+","+o,n++,r.pop())}r.push(up(e))}return r.join("")},"parseGenericTypes"),lp=mu((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),cp=mu((e,t)=>{const r=lp(e,"~"),n=lp(t,"~");return 1===r&&1===n},"shouldCombineSets"),up=mu(e=>{const t=lp(e,"~");let r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const n=[...e];let i=n.indexOf("~"),o=n.lastIndexOf("~");for(;-1!==i&&-1!==o&&i!==o;)n[i]="<",n[o]=">",i=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),hp=mu(()=>void 0!==window.MathMLElement,"isMathMLSupported"),dp=/\$\$(.*)\$\$/g,pp=mu(e=>{var t;return((null==(t=e.match(dp))?void 0:t.length)??0)>0},"hasKatex"),fp=mu(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await mp(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");null==n||n.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),gp=mu(async(e,t)=>{if(!pp(e))return e;if(!(hp()||t.legacyMathML||t.forceLegacyMathML))return e.replace(dp,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DPu4QpBP.cjs")),n=t.forceLegacyMathML||!hp()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(qd).map(e=>pp(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(dp,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),mp=mu(async(e,t)=>Zd(await gp(e,t),t),"renderKatexSanitized"),yp={getRows:Ud,sanitizeText:Zd,sanitizeTextOrArray:Kd,hasBreaks:Qd,splitBreaks:ep,lineBreakRegex:qd,removeScript:Jd,getUrl:np,evaluate:ip,getMax:op,getMin:ap},xp=mu(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),bp=mu(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),vp=mu(function(e,t,r,n){const i=bp(t,r,n);xp(e,i)},"configureSvgSize"),Cp=mu(function(e,t,r,n){const i=t.node().getBBox(),o=i.width,a=i.height;bu.info(`SVG bounds: ${o}x${a}`,i);let s=0,l=0;bu.info(`Graph bounds: ${s}x${l}`,e),s=o+2*r,l=a+2*r,bu.info(`Calculated bounds: ${s}x${l}`),vp(t,l,s,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),wp={},kp=mu((e,t,r)=>{let n="";return e in wp&&wp[e]?n=wp[e](r):bu.warn(`No theme found for ${e}`),` & {\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: 1px;\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 ${n}\n\n ${t}\n`},"getStyles"),Sp=mu((e,t)=>{void 0!==t&&(wp[e]=t)},"addStylesForDiagram"),_p=kp,Tp={};yu(Tp,{clear:()=>Ip,getAccDescription:()=>Np,getAccTitle:()=>Lp,getDiagramTitle:()=>Op,setAccDescription:()=>jp,setAccTitle:()=>Bp,setDiagramTitle:()=>Dp});var Ap="",Pp="",Ep="",Mp=mu(e=>Zd(e,Dd()),"sanitizeText"),Ip=mu(()=>{Ap="",Ep="",Pp=""},"clear"),Bp=mu(e=>{Ap=Mp(e).replace(/^\s+/g,"")},"setAccTitle"),Lp=mu(()=>Ap,"getAccTitle"),jp=mu(e=>{Ep=Mp(e).replace(/\n\s+/g,"\n")},"setAccDescription"),Np=mu(()=>Ep,"getAccDescription"),Dp=mu(e=>{Pp=Mp(e)},"setDiagramTitle"),Op=mu(()=>Pp,"getDiagramTitle"),Fp=bu,Rp=vu,$p=Dd,zp=Nd,Vp=Td,Wp=mu(e=>Zd(e,$p()),"sanitizeText"),Hp=Cp,qp=mu(()=>Tp,"getCommonDb"),Up={},Gp=mu((e,t,r)=>{var n;Up[e]&&Fp.warn(`Diagram with id ${e} already registered. Overwriting.`),Up[e]=t,r&&rd(e,r),Sp(e,t.styles),null==(n=t.injectUtils)||n.call(t,Fp,Rp,$p,Wp,Hp,qp(),()=>{})},"registerDiagram"),Xp=mu(e=>{if(e in Up)return Up[e];throw new Jp(e)},"getDiagram"),Jp=(d=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},mu(d,"DiagramNotFoundError"),d),Yp={value:()=>{}};function Zp(){for(var e,t=0,r=arguments.length,n={};t<r;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new Kp(n)}function Kp(e){this._=e}function Qp(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}function ef(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=Yp,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}Kp.prototype=Zp.prototype={constructor:Kp,on:function(e,t){var r,n,i=this._,o=(n=i,(e+"").trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");if(r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(r=(e=o[a]).type)i[r]=ef(i[r],e.name,t);else if(null==t)for(r in i)i[r]=ef(i[r],e.name,null);return this}for(;++a<s;)if((r=(e=o[a]).type)&&(r=Qp(i[r],e.name)))return r},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Kp(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),o=0;o<r;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,r=(n=this._[e]).length;o<r;++o)n[o].value.apply(t,i)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};var tf="http://www.w3.org/1999/xhtml";const rf={svg:"http://www.w3.org/2000/svg",xhtml:tf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nf(e){var t=e+="",r=t.indexOf(":");return r>=0&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),rf.hasOwnProperty(t)?{space:rf[t],local:e}:e}function of(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===tf&&t.documentElement.namespaceURI===tf?t.createElement(e):t.createElementNS(r,e)}}function af(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function sf(e){var t=nf(e);return(t.local?af:of)(t)}function lf(){}function cf(e){return null==e?lf:function(){return this.querySelector(e)}}function uf(){return[]}function hf(e){return null==e?uf:function(){return this.querySelectorAll(e)}}function df(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function pf(e){return function(){return this.matches(e)}}function ff(e){return function(t){return t.matches(e)}}var gf=Array.prototype.find;function mf(){return this.firstElementChild}var yf=Array.prototype.filter;function xf(){return Array.from(this.children)}function bf(e){return new Array(e.length)}function vf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Cf(e,t,r,n,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],n[s]=a):r[s]=new vf(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function wf(e,t,r,n,i,o,a){var s,l,c,u=new Map,h=t.length,d=o.length,p=new Array(h);for(s=0;s<h;++s)(l=t[s])&&(p[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<d;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(n[s]=l,l.__data__=o[s],u.delete(c)):r[s]=new vf(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(p[s])===l&&(i[s]=l)}function kf(e){return e.__data__}function Sf(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function _f(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Tf(e){return function(){this.removeAttribute(e)}}function Af(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pf(e,t){return function(){this.setAttribute(e,t)}}function Ef(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Mf(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}}function If(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Bf(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Lf(e){return function(){this.style.removeProperty(e)}}function jf(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Nf(e,t,r){return function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function Df(e,t){return e.style.getPropertyValue(t)||Bf(e).getComputedStyle(e,null).getPropertyValue(t)}function Of(e){return function(){delete this[e]}}function Ff(e,t){return function(){this[e]=t}}function Rf(e,t){return function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}}function $f(e){return e.trim().split(/^|\s+/)}function zf(e){return e.classList||new Vf(e)}function Vf(e){this._node=e,this._names=$f(e.getAttribute("class")||"")}function Wf(e,t){for(var r=zf(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Hf(e,t){for(var r=zf(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function qf(e){return function(){Wf(this,e)}}function Uf(e){return function(){Hf(this,e)}}function Gf(e,t){return function(){(t.apply(this,arguments)?Wf:Hf)(this,e)}}function Xf(){this.textContent=""}function Jf(e){return function(){this.textContent=e}}function Yf(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Zf(){this.innerHTML=""}function Kf(e){return function(){this.innerHTML=e}}function Qf(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function eg(){this.nextSibling&&this.parentNode.appendChild(this)}function tg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rg(){return null}function ng(){var e=this.parentNode;e&&e.removeChild(this)}function ig(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function og(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ag(e){return function(){var t=this.__on;if(t){for(var r,n=0,i=-1,o=t.length;n<o;++n)r=t[n],e.type&&r.type!==e.type||r.name!==e.name?t[++i]=r:this.removeEventListener(r.type,r.listener,r.options);++i?t.length=i:delete this.__on}}}function sg(e,t,r){return function(){var n,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name)return this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),void(n.value=t);this.addEventListener(e.type,o,r),n={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(n):this.__on=[n]}}function lg(e,t,r){var n=Bf(e),i=n.CustomEvent;"function"==typeof i?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function cg(e,t){return function(){return lg(this,e,t)}}function ug(e,t){return function(){return lg(this,e,t.apply(this,arguments))}}vf.prototype={constructor:vf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Vf.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var hg=[null];function dg(e,t){this._groups=e,this._parents=t}function pg(){return new dg([[document.documentElement]],hg)}function fg(e){return"string"==typeof e?new dg([[document.querySelector(e)]],[document.documentElement]):new dg([[e]],hg)}function gg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function yg(){}dg.prototype=pg.prototype={constructor:dg,select:function(e){"function"!=typeof e&&(e=cf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o,a,s=t[i],l=s.length,c=n[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new dg(n,this._parents)},selectAll:function(e){e="function"==typeof e?df(e):hf(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(n.push(e.call(a,a.__data__,c,s)),i.push(a));return new dg(n,i)},selectChild:function(e){return this.select(null==e?mf:function(e){return function(){return gf.call(this.children,e)}}("function"==typeof e?e:ff(e)))},selectChildren:function(e){return this.selectAll(null==e?xf:function(e){return function(){return yf.call(this.children,e)}}("function"==typeof e?e:ff(e)))},filter:function(e){"function"!=typeof e&&(e=pf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o,a=t[i],s=a.length,l=n[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new dg(n,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,kf);var r,n=t?wf:Cf,i=this._parents,o=this._groups;"function"!=typeof e&&(r=e,e=function(){return r});for(var a=o.length,s=new Array(a),l=new Array(a),c=new Array(a),u=0;u<a;++u){var h=i[u],d=o[u],p=d.length,f=Sf(e.call(h,h&&h.__data__,u,i)),g=f.length,m=l[u]=new Array(g),y=s[u]=new Array(g);n(h,d,m,y,c[u]=new Array(p),f,t);for(var x,b,v=0,C=0;v<g;++v)if(x=m[v]){for(v>=C&&(C=v+1);!(b=y[C])&&++C<g;);x._next=b||null}}return(s=new dg(s,i))._enter=l,s._exit=c,s},enter:function(){return new dg(this._enter||this._groups.map(bf),this._parents)},exit:function(){return new dg(this._exit||this._groups.map(bf),this._parents)},join:function(e,t,r){var n=this.enter(),i=this,o=this.exit();return"function"==typeof e?(n=e(n))&&(n=n.selection()):n=n.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==r?o.remove():r(o),n&&i?n.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=r[l],h=n[l],d=u.length,p=s[l]=new Array(d),f=0;f<d;++f)(c=u[f]||h[f])&&(p[f]=c);for(;l<i;++l)s[l]=r[l];return new dg(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n,i=e[t],o=i.length-1,a=i[o];--o>=0;)(n=i[o])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this},sort:function(e){function t(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}e||(e=_f);for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a,s=r[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new dg(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i,o=t[r],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var r=nf(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==t?r.local?Af:Tf:"function"==typeof t?r.local?If:Mf:r.local?Ef:Pf)(r,t))},style:function(e,t,r){return arguments.length>1?this.each((null==t?Lf:"function"==typeof t?Nf:jf)(e,t,null==r?"":r)):Df(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Of:"function"==typeof t?Rf:Ff)(e,t)):this.node()[e]},classed:function(e,t){var r=$f(e+"");if(arguments.length<2){for(var n=zf(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?Gf:t?qf:Uf)(r,t))},text:function(e){return arguments.length?this.each(null==e?Xf:("function"==typeof e?Yf:Jf)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Zf:("function"==typeof e?Qf:Kf)(e)):this.node().innerHTML},raise:function(){return this.each(eg)},lower:function(){return this.each(tg)},append:function(e){var t="function"==typeof e?e:sf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var r="function"==typeof e?e:sf(e),n=null==t?rg:"function"==typeof t?t:cf(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(ng)},clone:function(e){return this.select(e?og:ig)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,r){var n,i,o=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return r>=0&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?sg:ag,n=0;n<a;++n)this.each(s(o[n],t,r));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(n=0,l=s[c];n<a;++n)if((i=o[n]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?ug:cg)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n,i=e[t],o=0,a=i.length;o<a;++o)(n=i[o])&&(yield n)}};var xg=.7,bg=1/xg,vg="\\s*([+-]?\\d+)\\s*",Cg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kg=/^#([0-9a-f]{3,8})$/,Sg=new RegExp(`^rgb\\(${vg},${vg},${vg}\\)$`),_g=new RegExp(`^rgb\\(${wg},${wg},${wg}\\)$`),Tg=new RegExp(`^rgba\\(${vg},${vg},${vg},${Cg}\\)$`),Ag=new RegExp(`^rgba\\(${wg},${wg},${wg},${Cg}\\)$`),Pg=new RegExp(`^hsl\\(${Cg},${wg},${wg}\\)$`),Eg=new RegExp(`^hsla\\(${Cg},${wg},${wg},${Cg}\\)$`),Mg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ig(){return this.rgb().formatHex()}function Bg(){return this.rgb().formatRgb()}function Lg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?jg(t):3===r?new Fg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ng(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ng(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Sg.exec(e))?new Fg(t[1],t[2],t[3],1):(t=_g.exec(e))?new Fg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Tg.exec(e))?Ng(t[1],t[2],t[3],t[4]):(t=Ag.exec(e))?Ng(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Pg.exec(e))?Hg(t[1],t[2]/100,t[3]/100,1):(t=Eg.exec(e))?Hg(t[1],t[2]/100,t[3]/100,t[4]):Mg.hasOwnProperty(e)?jg(Mg[e]):"transparent"===e?new Fg(NaN,NaN,NaN,0):null}function jg(e){return new Fg(e>>16&255,e>>8&255,255&e,1)}function Ng(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fg(e,t,r,n)}function Dg(e){return e instanceof yg||(e=Lg(e)),e?new Fg((e=e.rgb()).r,e.g,e.b,e.opacity):new Fg}function Og(e,t,r,n){return 1===arguments.length?Dg(e):new Fg(e,t,r,null==n?1:n)}function Fg(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Rg(){return`#${Wg(this.r)}${Wg(this.g)}${Wg(this.b)}`}function $g(){const e=zg(this.opacity);return`${1===e?"rgb(":"rgba("}${Vg(this.r)}, ${Vg(this.g)}, ${Vg(this.b)}${1===e?")":`, ${e})`}`}function zg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wg(e){return((e=Vg(e))<16?"0":"")+e.toString(16)}function Hg(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ug(e,t,r,n)}function qg(e){if(e instanceof Ug)return new Ug(e.h,e.s,e.l,e.opacity);if(e instanceof yg||(e=Lg(e)),!e)return new Ug;if(e instanceof Ug)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ug(a,s,l,e.opacity)}function Ug(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Gg(e){return(e=(e||0)%360)<0?e+360:e}function Xg(e){return Math.max(0,Math.min(1,e||0))}function Jg(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}gg(yg,Lg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ig,formatHex:Ig,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return qg(this).formatHsl()},formatRgb:Bg,toString:Bg}),gg(Fg,Og,mg(yg,{brighter(e){return e=null==e?bg:Math.pow(bg,e),new Fg(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?xg:Math.pow(xg,e),new Fg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fg(Vg(this.r),Vg(this.g),Vg(this.b),zg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Rg,formatHex:Rg,formatHex8:function(){return`#${Wg(this.r)}${Wg(this.g)}${Wg(this.b)}${Wg(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:$g,toString:$g})),gg(Ug,function(e,t,r,n){return 1===arguments.length?qg(e):new Ug(e,t,r,null==n?1:n)},mg(yg,{brighter(e){return e=null==e?bg:Math.pow(bg,e),new Ug(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?xg:Math.pow(xg,e),new Ug(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Fg(Jg(e>=240?e-240:e+120,i,n),Jg(e,i,n),Jg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Ug(Gg(this.h),Xg(this.s),Xg(this.l),zg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zg(this.opacity);return`${1===e?"hsl(":"hsla("}${Gg(this.h)}, ${100*Xg(this.s)}%, ${100*Xg(this.l)}%${1===e?")":`, ${e})`}`}}));const Yg=e=>()=>e;function Zg(e,t){return function(r){return e+r*t}}function Kg(e){return 1===(e=+e)?Qg:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):Yg(isNaN(t)?r:t)}}function Qg(e,t){var r=t-e;return r?Zg(e,r):Yg(isNaN(e)?t:e)}const em=function e(t){var r=Kg(t);function n(e,t){var n=r((e=Og(e)).r,(t=Og(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Qg(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function tm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var rm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nm=new RegExp(rm.source,"g");function im(e,t){var r,n,i,o=rm.lastIndex=nm.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=rm.exec(e))&&(n=nm.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:tm(r,n)})),o=nm.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}var om,am=180/Math.PI,sm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lm(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*am,skewX:Math.atan(l)*am,scaleX:a,scaleY:s}}function cm(e,t,r,n){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,n,i,o,a,s){if(e!==i||n!==o){var l=a.push("translate(",null,t,null,r);s.push({i:l-4,x:tm(e,i)},{i:l-2,x:tm(n,o)})}else(i||o)&&a.push("translate("+i+t+o+r)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,r,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:r.push(i(r)+"rotate(",null,n)-2,x:tm(e,t)})):t&&r.push(i(r)+"rotate("+t+n)}(o.rotate,a.rotate,s,l),function(e,t,r,o){e!==t?o.push({i:r.push(i(r)+"skewX(",null,n)-2,x:tm(e,t)}):t&&r.push(i(r)+"skewX("+t+n)}(o.skewX,a.skewX,s,l),function(e,t,r,n,o,a){if(e!==r||t!==n){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:tm(e,r)},{i:s-2,x:tm(t,n)})}else 1===r&&1===n||o.push(i(o)+"scale("+r+","+n+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,r=-1,n=l.length;++r<n;)s[(t=l[r]).i]=t.x(e);return s.join("")}}}var um,hm,dm=cm(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?sm:lm(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),pm=cm(function(e){return null==e?sm:(om||(om=document.createElementNS("http://www.w3.org/2000/svg","g")),om.setAttribute("transform",e),(e=om.transform.baseVal.consolidate())?lm((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):sm)},", ",")",")"),fm=0,gm=0,mm=0,ym=0,xm=0,bm=0,vm="object"==typeof performance&&performance.now?performance:Date,Cm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function wm(){return xm||(Cm(km),xm=vm.now()+bm)}function km(){xm=0}function Sm(){this._call=this._time=this._next=null}function _m(e,t,r){var n=new Sm;return n.restart(e,t,r),n}function Tm(){xm=(ym=vm.now())+bm,fm=gm=0;try{!function(){wm(),++fm;for(var e,t=um;t;)(e=xm-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fm}()}finally{fm=0,function(){var e,t,r=um,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:um=t);hm=e,Pm(n)}(),xm=0}}function Am(){var e=vm.now(),t=e-ym;t>1e3&&(bm-=t,ym=e)}function Pm(e){fm||(gm&&(gm=clearTimeout(gm)),e-xm>24?(e<1/0&&(gm=setTimeout(Tm,e-vm.now()-bm)),mm&&(mm=clearInterval(mm))):(mm||(ym=vm.now(),mm=setInterval(Am,1e3)),fm=1,Cm(Tm)))}function Em(e,t,r){var n=new Sm;return t=null==t?0:+t,n.restart(r=>{n.stop(),e(r+t)},t,r),n}Sm.prototype=_m.prototype={constructor:Sm,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?wm():+r)+(null==t?0:+t),this._next||hm===this||(hm?hm._next=this:um=this,hm=this),this._call=e,this._time=r,Pm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pm())}};var Mm=Zp("start","end","cancel","interrupt"),Im=[];function Bm(e,t,r,n,i,o){var a=e.__transition;if(a){if(r in a)return}else e.__transition={};!function(e,t,r){var n,i=e.__transition;function o(e){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=e&&a(e-r.delay)}function a(o){var c,u,h,d;if(1!==r.state)return l();for(c in i)if((d=i[c]).name===r.name){if(3===d.state)return Em(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Em(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(o))}),r.state=2,r.on.call("start",e,e.__data__,r.index,r.group),2===r.state){for(r.state=3,n=new Array(h=r.tween.length),c=0,u=-1;c<h;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=d);n.length=u+1}}function s(t){for(var i=t<r.duration?r.ease.call(null,t/r.duration):(r.timer.restart(l),r.state=5,1),o=-1,a=n.length;++o<a;)n[o].call(e,i);5===r.state&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){for(var n in r.state=6,r.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=r,r.timer=_m(o,0,r.time)}(e,r,{name:t,index:n,group:i,on:Mm,tween:Im,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Lm(e,t){var r=Nm(e,t);if(r.state>0)throw new Error("too late; already scheduled");return r}function jm(e,t){var r=Nm(e,t);if(r.state>3)throw new Error("too late; already running");return r}function Nm(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Dm(e,t){var r,n;return function(){var i=jm(this,e),o=i.tween;if(o!==r)for(var a=0,s=(n=r=o).length;a<s;++a)if(n[a].name===t){(n=n.slice()).splice(a,1);break}i.tween=n}}function Om(e,t,r){var n,i;if("function"!=typeof r)throw new Error;return function(){var o=jm(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function Fm(e,t,r){var n=e._id;return e.each(function(){var e=jm(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return Nm(e,n).value[t]}}function Rm(e,t){var r;return("number"==typeof t?tm:t instanceof Lg?em:(r=Lg(t))?(t=r,em):im)(e,t)}function $m(e){return function(){this.removeAttribute(e)}}function zm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vm(e,t,r){var n,i,o=r+"";return function(){var a=this.getAttribute(e);return a===o?null:a===n?i:i=t(n=a,r)}}function Wm(e,t,r){var n,i,o=r+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===n?i:i=t(n=a,r)}}function Hm(e,t,r){var n,i,o;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===n&&s===i?o:(i=s,o=t(n=a,l));this.removeAttribute(e)}}function qm(e,t,r){var n,i,o;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===n&&s===i?o:(i=s,o=t(n=a,l));this.removeAttributeNS(e.space,e.local)}}function Um(e,t){var r,n;function i(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&function(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}(e,i)),r}return i._value=t,i}function Gm(e,t){var r,n;function i(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&function(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}(e,i)),r}return i._value=t,i}function Xm(e,t){return function(){Lm(this,e).delay=+t.apply(this,arguments)}}function Jm(e,t){return t=+t,function(){Lm(this,e).delay=t}}function Ym(e,t){return function(){jm(this,e).duration=+t.apply(this,arguments)}}function Zm(e,t){return t=+t,function(){jm(this,e).duration=t}}var Km=pg.prototype.constructor;function Qm(e){return function(){this.style.removeProperty(e)}}var ey=0;function ty(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function ry(){return++ey}var ny=pg.prototype;ty.prototype={constructor:ty,select:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=cf(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=n[a],u=c.length,h=o[a]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=e.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,Bm(h[d],t,r,d,h,Nm(s,r)));return new ty(o,this._parents,t,r)},selectAll:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=hf(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l,c=n[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,p=e.call(l,l.__data__,h,c),f=Nm(l,r),g=0,m=p.length;g<m;++g)(d=p[g])&&Bm(d,t,r,g,p,f);o.push(p),a.push(l)}return new ty(o,a,t,r)},selectChild:ny.selectChild,selectChildren:ny.selectChildren,filter:function(e){"function"!=typeof e&&(e=pf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o,a=t[i],s=a.length,l=n[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new ty(n,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l,c=t[s],u=r[s],h=c.length,d=a[s]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(d[p]=l);for(;s<n;++s)a[s]=t[s];return new ty(a,this._parents,this._name,this._id)},selection:function(){return new Km(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,r=ry(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Nm(a,t);Bm(a,e,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ty(n,this._parents,e,r)},call:ny.call,nodes:ny.nodes,node:ny.node,size:ny.size,empty:ny.empty,each:ny.each,on:function(e,t){var r=this._id;return arguments.length<2?Nm(this.node(),r).on.on(e):this.each(function(e,t,r){var n,i,o=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?Lm:jm;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}(r,e,t))},attr:function(e,t){var r=nf(e),n="transform"===r?pm:Rm;return this.attrTween(e,"function"==typeof t?(r.local?qm:Hm)(r,n,Fm(this,"attr."+e,t)):null==t?(r.local?zm:$m)(r):(r.local?Wm:Vm)(r,n,t))},attrTween:function(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;var n=nf(e);return this.tween(r,(n.local?Um:Gm)(n,t))},style:function(e,t,r){var n="transform"==(e+="")?dm:Rm;return null==t?this.styleTween(e,function(e,t){var r,n,i;return function(){var o=Df(this,e),a=(this.style.removeProperty(e),Df(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}(e,n)).on("end.style."+e,Qm(e)):"function"==typeof t?this.styleTween(e,function(e,t,r){var n,i,o;return function(){var a=Df(this,e),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Df(this,e)),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}(e,n,Fm(this,"style."+e,t))).each(function(e,t){var r,n,i,o,a="style."+t,s="end."+a;return function(){var l=jm(this,e),c=l.on,u=null==l.value[a]?o||(o=Qm(t)):void 0;c===r&&i===u||(n=(r=c).copy()).on(s,i=u),l.on=n}}(this._id,e)):this.styleTween(e,function(e,t,r){var n,i,o=r+"";return function(){var a=Df(this,e);return a===o?null:a===n?i:i=t(n=a,r)}}(e,n,t),r).on("end.style."+e,null)},styleTween:function(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(e,t,r){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&function(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}(e,o,r)),n}return o._value=t,o}(e,t,null==r?"":r))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Fm(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,r;function n(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&function(e){return function(t){this.textContent=e.call(this,t)}}(n)),t}return n._value=e,n}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n,i=Nm(this.node(),r).tween,o=0,a=i.length;o<a;++o)if((n=i[o]).name===e)return n.value;return null}return this.each((null==t?Dm:Om)(r,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Xm:Jm)(t,e)):Nm(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Ym:Zm)(t,e)):Nm(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){jm(this,e).ease=t}}(t,e)):Nm(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var r=t.apply(this,arguments);if("function"!=typeof r)throw new Error;jm(this,e).ease=r}}(this._id,e))},end:function(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0===--i&&o()}};r.each(function(){var r=jm(this,n),i=r.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),r.on=t}),0===i&&o()})},[Symbol.iterator]:ny[Symbol.iterator]};var iy={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function oy(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}pg.prototype.interrupt=function(e){return this.each(function(){!function(e,t){var r,n,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(r=o[i]).name===t?(n=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete o[i]):a=!1;a&&delete e.__transition}}(this,e)})},pg.prototype.transition=function(e){var t,r;e instanceof ty?(t=e._id,e=e._name):(t=ry(),(r=iy).time=wm(),e=null==e?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)(a=s[c])&&Bm(a,e,t,c,s,r||oy(a,t));return new ty(n,this._parents,e,t)};const ay=Math.PI,sy=2*ay,ly=1e-6,cy=sy-ly;function uy(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class hy{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?uy:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return uy;const r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=Math.round(arguments[t]*r)/r+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,o){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(h>ly)if(Math.abs(u*s-l*c)>ly&&i){let d=r-o,p=n-a,f=s*s+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(h),x=i*Math.tan((ay-Math.acos((f+h-g)/(2*m*y)))/2),b=x/y,v=x/m;Math.abs(b-1)>ly&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*d>c*p)},${this._x1=e+v*s},${this._y1=t+v*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,r,n,i,o){if(e=+e,t=+t,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>ly||Math.abs(this._y1-c)>ly)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%sy+sy),h>cy?this._append`A${r},${r},0,1,${u},${e-a},${t-s}A${r},${r},0,1,${u},${this._x1=l},${this._y1=c}`:h>ly&&this._append`A${r},${r},0,${+(h>=ay)},${u},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function dy(e){return function(){return e}}const py=Math.abs,fy=Math.atan2,gy=Math.cos,my=Math.max,yy=Math.min,xy=Math.sin,by=Math.sqrt,vy=1e-12,Cy=Math.PI,wy=Cy/2,ky=2*Cy;function Sy(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{const e=Math.floor(r);if(!(e>=0))throw new RangeError(`invalid digits: ${r}`);t=e}return e},()=>new hy(t)}function _y(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Ty(e){this._context=e}function Ay(e){return new Ty(e)}function Py(e){return e[0]}function Ey(e){return e[1]}function My(e,t){var r=dy(!0),n=null,i=Ay,o=null,a=Sy(s);function s(s){var l,c,u,h=(s=_y(s)).length,d=!1;for(null==n&&(o=i(u=a())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?Py:dy(e),t="function"==typeof t?t:void 0===t?Ey:dy(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:dy(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:dy(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:dy(!!e),s):r},s.curve=function(e){return arguments.length?(i=e,null!=n&&(o=i(n)),s):i},s.context=function(e){return arguments.length?(null==e?n=o=null:o=i(n=e),s):n},s}Ty.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class Iy{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function By(e){return new Iy(e,!0)}function Ly(e){return new Iy(e,!1)}function jy(){}function Ny(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Dy(e){this._context=e}function Oy(e){return new Dy(e)}function Fy(e){this._context=e}function Ry(e){this._context=e}function $y(e,t){this._basis=new Dy(e),this._beta=t}Dy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ny(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ny(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Fy.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ny(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ry.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ny(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},$y.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,i=e[0],o=t[0],a=e[r]-i,s=t[r]-o,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+n*a),this._beta*t[l]+(1-this._beta)*(o+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const zy=function e(t){function r(e){return 1===t?new Dy(e):new $y(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function Vy(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Wy(e,t){this._context=e,this._k=(1-t)/6}Wy.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:Vy(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Vy(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hy=function e(t){function r(e){return new Wy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function qy(e,t){this._context=e,this._k=(1-t)/6}qy.prototype={areaStart:jy,areaEnd:jy,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Vy(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Uy=function e(t){function r(e){return new qy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function Gy(e,t){this._context=e,this._k=(1-t)/6}Gy.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vy(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Xy=function e(t){function r(e){return new Gy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function Jy(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>vy){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>vy){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,o,a,e._x2,e._y2)}function Yy(e,t){this._context=e,this._alpha=t}Yy.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jy(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Zy=function e(t){function r(e){return t?new Yy(e,t):new Wy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Ky(e,t){this._context=e,this._alpha=t}Ky.prototype={areaStart:jy,areaEnd:jy,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jy(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Qy=function e(t){function r(e){return t?new Ky(e,t):new qy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ex(e,t){this._context=e,this._alpha=t}ex.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jy(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tx=function e(t){function r(e){return t?new ex(e,t):new Gy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function rx(e){this._context=e}function nx(e){return e<0?-1:1}function ix(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(nx(o)+nx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function ox(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ax(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function sx(e){this._context=e}function lx(e){this._context=new cx(e)}function cx(e){this._context=e}function ux(e){return new sx(e)}function hx(e){return new lx(e)}function dx(e){this._context=e}function px(e){var t,r,n=e.length-1,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function fx(e){return new dx(e)}function gx(e,t){this._context=e,this._t=t}function mx(e){return new gx(e,.5)}function yx(e){return new gx(e,0)}function xx(e){return new gx(e,1)}function bx(e,t,r){this.k=e,this.x=t,this.y=r}rx.prototype={areaStart:jy,areaEnd:jy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},sx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ax(this,this._t0,ox(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ax(this,ox(this,r=ix(this,e,t)),r);break;default:ax(this,this._t0,r=ix(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(lx.prototype=Object.create(sx.prototype)).point=function(e,t){sx.prototype.point.call(this,t,e)},cx.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}},dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=px(e),i=px(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},gx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},bx.prototype={constructor:bx,scale:function(e){return 1===e?this:new bx(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new bx(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},bx.prototype;var vx=mu(e=>{var t;const{securityLevel:r}=$p();let n=fg("body");if("sandbox"===r){const r=fg(`#i${e}`);n=fg(((null==(t=r.node())?void 0:t.contentDocument)??document).body)}return n.select(`#${e}`)},"selectSvgElement");function Cx(e){return null==e}function wx(e){return"object"==typeof e&&null!==e}function kx(e){return Array.isArray(e)?e:Cx(e)?[]:[e]}function Sx(e,t){var r,n,i,o;if(t)for(r=0,n=(o=Object.keys(t)).length;r<n;r+=1)e[i=o[r]]=t[i];return e}function _x(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n}function Tx(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}mu(Cx,"isNothing"),mu(wx,"isObject"),mu(kx,"toArray"),mu(Sx,"extend"),mu(_x,"repeat"),mu(Tx,"isNegativeZero");var Ax={isNothing:Cx,isObject:wx,toArray:kx,repeat:_x,isNegativeZero:Tx,extend:Sx};function Px(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function Ex(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Px(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}mu(Px,"formatError"),mu(Ex,"YAMLException$1"),Ex.prototype=Object.create(Error.prototype),Ex.prototype.constructor=Ex,Ex.prototype.toString=mu(function(e){return this.name+": "+Px(this,e)},"toString");var Mx=Ex;function Ix(e,t,r,n,i){var o="",a="",s=Math.floor(i/2)-1;return n-t>s&&(t=n-s+(o=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:n-t+o.length}}function Bx(e,t){return Ax.repeat(" ",t-e.length)+e}function Lx(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],o=[],a=-1;r=n.exec(e.buffer);)o.push(r.index),i.push(r.index+r[0].length),e.position<=r.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,l,c="",u=Math.min(e.line+t.linesAfter,o.length).toString().length,h=t.maxLength-(t.indent+u+3);for(s=1;s<=t.linesBefore&&!(a-s<0);s++)l=Ix(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),h),c=Ax.repeat(" ",t.indent)+Bx((e.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=Ix(e.buffer,i[a],o[a],e.position,h),c+=Ax.repeat(" ",t.indent)+Bx((e.line+1).toString(),u)+" | "+l.str+"\n",c+=Ax.repeat("-",t.indent+u+3+l.pos)+"^\n",s=1;s<=t.linesAfter&&!(a+s>=o.length);s++)l=Ix(e.buffer,i[a+s],o[a+s],e.position-(i[a]-i[a+s]),h),c+=Ax.repeat(" ",t.indent)+Bx((e.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}mu(Ix,"getLine"),mu(Bx,"padStart"),mu(Lx,"makeSnippet");var jx=Lx,Nx=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Dx=["scalar","sequence","mapping"];function Ox(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}function Fx(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===Nx.indexOf(t))throw new Mx('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ox(t.styleAliases||null),-1===Dx.indexOf(this.kind))throw new Mx('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}mu(Ox,"compileStyleAliases"),mu(Fx,"Type$1");var Rx=Fx;function $x(e,t){var r=[];return e[t].forEach(function(e){var t=r.length;r.forEach(function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)}),r[t]=e}),r}function zx(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(mu(n,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}function Vx(e){return this.extend(e)}mu($x,"compileList"),mu(zx,"compileMap"),mu(Vx,"Schema$1"),Vx.prototype.extend=mu(function(e){var t=[],r=[];if(e instanceof Rx)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new Mx("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof Rx))throw new Mx("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Mx("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new Mx("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(e){if(!(e instanceof Rx))throw new Mx("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Vx.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=$x(n,"implicit"),n.compiledExplicit=$x(n,"explicit"),n.compiledTypeMap=zx(n.compiledImplicit,n.compiledExplicit),n},"extend");var Wx=new Vx({explicit:[new Rx("tag:yaml.org,2002:str",{kind:"scalar",construct:mu(function(e){return null!==e?e:""},"construct")}),new Rx("tag:yaml.org,2002:seq",{kind:"sequence",construct:mu(function(e){return null!==e?e:[]},"construct")}),new Rx("tag:yaml.org,2002:map",{kind:"mapping",construct:mu(function(e){return null!==e?e:{}},"construct")})]});function Hx(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function qx(){return null}function Ux(e){return null===e}mu(Hx,"resolveYamlNull"),mu(qx,"constructYamlNull"),mu(Ux,"isNull");var Gx=new Rx("tag:yaml.org,2002:null",{kind:"scalar",resolve:Hx,construct:qx,predicate:Ux,represent:{canonical:mu(function(){return"~"},"canonical"),lowercase:mu(function(){return"null"},"lowercase"),uppercase:mu(function(){return"NULL"},"uppercase"),camelcase:mu(function(){return"Null"},"camelcase"),empty:mu(function(){return""},"empty")},defaultStyle:"lowercase"});function Xx(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function Jx(e){return"true"===e||"True"===e||"TRUE"===e}function Yx(e){return"[object Boolean]"===Object.prototype.toString.call(e)}mu(Xx,"resolveYamlBoolean"),mu(Jx,"constructYamlBoolean"),mu(Yx,"isBoolean");var Zx=new Rx("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xx,construct:Jx,predicate:Yx,represent:{lowercase:mu(function(e){return e?"true":"false"},"lowercase"),uppercase:mu(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:mu(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Kx(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Qx(e){return 48<=e&&e<=55}function eb(e){return 48<=e&&e<=57}function tb(e){if(null===e)return!1;var t,r=e.length,n=0,i=!1;if(!r)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;n<r;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!Kx(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!Qx(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(!eb(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)}function rb(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)}function nb(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!Ax.isNegativeZero(e)}mu(Kx,"isHexCode"),mu(Qx,"isOctCode"),mu(eb,"isDecCode"),mu(tb,"resolveYamlInteger"),mu(rb,"constructYamlInteger"),mu(nb,"isInteger");var ib=new Rx("tag:yaml.org,2002:int",{kind:"scalar",resolve:tb,construct:rb,predicate:nb,represent:{binary:mu(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:mu(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:mu(function(e){return e.toString(10)},"decimal"),hexadecimal:mu(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ob=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ab(e){return null!==e&&!(!ob.test(e)||"_"===e[e.length-1])}function sb(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)}mu(ab,"resolveYamlFloat"),mu(sb,"constructYamlFloat");var lb=/^[-+]?[0-9]+e/;function cb(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ax.isNegativeZero(e))return"-0.0";return r=e.toString(10),lb.test(r)?r.replace("e",".e"):r}function ub(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Ax.isNegativeZero(e))}mu(cb,"representYamlFloat"),mu(ub,"isFloat");var hb=new Rx("tag:yaml.org,2002:float",{kind:"scalar",resolve:ab,construct:sb,predicate:ub,represent:cb,defaultStyle:"lowercase"}),db=Wx.extend({implicit:[Gx,Zx,ib,hb]}),pb=db,fb=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),gb=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 mb(e){return null!==e&&(null!==fb.exec(e)||null!==gb.exec(e))}function yb(e){var t,r,n,i,o,a,s,l,c=0,u=null;if(null===(t=fb.exec(e))&&(t=gb.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),l=new Date(Date.UTC(r,n,i,o,a,s,c)),u&&l.setTime(l.getTime()-u),l}function xb(e){return e.toISOString()}mu(mb,"resolveYamlTimestamp"),mu(yb,"constructYamlTimestamp"),mu(xb,"representYamlTimestamp");var bb=new Rx("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:mb,construct:yb,instanceOf:Date,represent:xb});function vb(e){return"<<"===e||null===e}mu(vb,"resolveYamlMerge");var Cb=new Rx("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vb}),wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function kb(e){if(null===e)return!1;var t,r,n=0,i=e.length,o=wb;for(r=0;r<i;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0}function Sb(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=wb,a=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function _b(e){var t,r,n="",i=0,o=e.length,a=wb;for(t=0;t<o;t++)t%3==0&&t&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+e[t];return 0===(r=o%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}function Tb(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}mu(kb,"resolveYamlBinary"),mu(Sb,"constructYamlBinary"),mu(_b,"representYamlBinary"),mu(Tb,"isBinary");var Ab=new Rx("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kb,construct:Sb,predicate:Tb,represent:_b}),Pb=Object.prototype.hasOwnProperty,Eb=Object.prototype.toString;function Mb(e){if(null===e)return!0;var t,r,n,i,o,a=[],s=e;for(t=0,r=s.length;t<r;t+=1){if(n=s[t],o=!1,"[object Object]"!==Eb.call(n))return!1;for(i in n)if(Pb.call(n,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(i))return!1;a.push(i)}return!0}function Ib(e){return null!==e?e:[]}mu(Mb,"resolveYamlOmap"),mu(Ib,"constructYamlOmap");var Bb=new Rx("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Mb,construct:Ib}),Lb=Object.prototype.toString;function jb(e){if(null===e)return!0;var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],"[object Object]"!==Lb.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;o[t]=[i[0],n[i[0]]]}return!0}function Nb(e){if(null===e)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}mu(jb,"resolveYamlPairs"),mu(Nb,"constructYamlPairs");var Db=new Rx("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jb,construct:Nb}),Ob=Object.prototype.hasOwnProperty;function Fb(e){if(null===e)return!0;var t,r=e;for(t in r)if(Ob.call(r,t)&&null!==r[t])return!1;return!0}function Rb(e){return null!==e?e:{}}mu(Fb,"resolveYamlSet"),mu(Rb,"constructYamlSet");var $b=new Rx("tag:yaml.org,2002:set",{kind:"mapping",resolve:Fb,construct:Rb}),zb=pb.extend({implicit:[bb,Cb],explicit:[Ab,Bb,Db,$b]}),Vb=Object.prototype.hasOwnProperty,Wb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Hb=/[\x85\u2028\u2029]/,qb=/[,\[\]\{\}]/,Ub=/^(?:!|!!|![a-z\-]+!)$/i,Gb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Xb(e){return Object.prototype.toString.call(e)}function Jb(e){return 10===e||13===e}function Yb(e){return 9===e||32===e}function Zb(e){return 9===e||32===e||10===e||13===e}function Kb(e){return 44===e||91===e||93===e||123===e||125===e}function Qb(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ev(e){return 120===e?2:117===e?4:85===e?8:0}function tv(e){return 48<=e&&e<=57?e-48:-1}function rv(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function nv(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}mu(Xb,"_class"),mu(Jb,"is_EOL"),mu(Yb,"is_WHITE_SPACE"),mu(Zb,"is_WS_OR_EOL"),mu(Kb,"is_FLOW_INDICATOR"),mu(Qb,"fromHexCode"),mu(ev,"escapedHexLen"),mu(tv,"fromDecimalCode"),mu(rv,"simpleEscapeSequence"),mu(nv,"charFromCodepoint");var iv,ov=new Array(256),av=new Array(256);for(iv=0;iv<256;iv++)ov[iv]=rv(iv)?1:0,av[iv]=rv(iv);function sv(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||zb,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function lv(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=jx(r),new Mx(t,r)}function cv(e,t){throw lv(e,t)}function uv(e,t){e.onWarning&&e.onWarning.call(null,lv(e,t))}mu(sv,"State$1"),mu(lv,"generateError"),mu(cv,"throwError"),mu(uv,"throwWarning");var hv={YAML:mu(function(e,t,r){var n,i,o;null!==e.version&&cv(e,"duplication of %YAML directive"),1!==r.length&&cv(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&cv(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&cv(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&uv(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mu(function(e,t,r){var n,i;2!==r.length&&cv(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Ub.test(n)||cv(e,"ill-formed tag handle (first argument) of the TAG directive"),Vb.call(e.tagMap,n)&&cv(e,'there is a previously declared suffix for "'+n+'" tag handle'),Gb.test(i)||cv(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(o){cv(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i},"handleTagDirective")};function dv(e,t,r,n){var i,o,a,s;if(t<r){if(s=e.input.slice(t,r),n)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||cv(e,"expected valid JSON character");else Wb.test(s)&&cv(e,"the stream contains non-printable characters");e.result+=s}}function pv(e,t,r,n){var i,o,a,s;for(Ax.isObject(r)||cv(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(i=Object.keys(r)).length;a<s;a+=1)o=i[a],Vb.call(t,o)||(t[o]=r[o],n[o]=!0)}function fv(e,t,r,n,i,o,a,s,l){var c,u;if(Array.isArray(i))for(c=0,u=(i=Array.prototype.slice.call(i)).length;c<u;c+=1)Array.isArray(i[c])&&cv(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===Xb(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===Xb(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)pv(e,t,o[c],r);else pv(e,t,o,r);else e.json||Vb.call(r,i)||!Vb.call(t,i)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,cv(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}function gv(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):cv(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function mv(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;Yb(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!Jb(i))break;for(gv(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&uv(e,"deficient indentation"),n}function yv(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!Zb(t)))}function xv(e,t){1===t?e.result+=" ":t>1&&(e.result+=Ax.repeat("\n",t-1))}function bv(e,t,r){var n,i,o,a,s,l,c,u,h=e.kind,d=e.result;if(Zb(u=e.input.charCodeAt(e.position))||Kb(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(Zb(n=e.input.charCodeAt(e.position+1))||r&&Kb(n)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(Zb(n=e.input.charCodeAt(e.position+1))||r&&Kb(n))break}else if(35===u){if(Zb(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&yv(e)||r&&Kb(u))break;if(Jb(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,mv(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(dv(e,i,o,!1),xv(e,e.line-s),i=o=e.position,a=!1),Yb(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return dv(e,i,o,!1),!!e.result||(e.kind=h,e.result=d,!1)}function vv(e,t){var r,n,i;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(dv(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else Jb(r)?(dv(e,n,i,!0),xv(e,mv(e,!1,t)),n=i=e.position):e.position===e.lineStart&&yv(e)?cv(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);cv(e,"unexpected end of the stream within a single quoted scalar")}function Cv(e,t){var r,n,i,o,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return dv(e,r,e.position,!0),e.position++,!0;if(92===s){if(dv(e,r,e.position,!0),Jb(s=e.input.charCodeAt(++e.position)))mv(e,!1,t);else if(s<256&&ov[s])e.result+=av[s],e.position++;else if((a=ev(s))>0){for(i=a,o=0;i>0;i--)(a=Qb(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:cv(e,"expected hexadecimal character");e.result+=nv(o),e.position++}else cv(e,"unknown escape sequence");r=n=e.position}else Jb(s)?(dv(e,r,n,!0),xv(e,mv(e,!1,t)),r=n=e.position):e.position===e.lineStart&&yv(e)?cv(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}cv(e,"unexpected end of the stream within a double quoted scalar")}function wv(e,t){var r,n,i,o,a,s,l,c,u,h,d,p,f=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(p=e.input.charCodeAt(e.position)))a=93,c=!1,o=[];else{if(123!==p)return!1;a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),p=e.input.charCodeAt(++e.position);0!==p;){if(mv(e,!0,t),(p=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=o,!0;f?44===p&&cv(e,"expected the node content, but found ','"):cv(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Zb(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,mv(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,Ev(e,t,1,!1,!0),h=e.tag,u=e.result,mv(e,!0,t),p=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),mv(e,!0,t),Ev(e,t,1,!1,!0),d=e.result),c?fv(e,o,y,h,u,d,r,n,i):s?o.push(fv(e,null,y,h,u,d,r,n,i)):o.push(u),mv(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(f=!0,p=e.input.charCodeAt(++e.position)):f=!1}cv(e,"unexpected end of the stream within a flow collection")}function kv(e,t){var r,n,i,o,a=1,s=!1,l=!1,c=t,u=0,h=!1;if(124===(o=e.input.charCodeAt(e.position)))n=!1;else{if(62!==o)return!1;n=!0}for(e.kind="scalar",e.result="";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)1===a?a=43===o?3:2:cv(e,"repeat of a chomping mode identifier");else{if(!((i=tv(o))>=0))break;0===i?cv(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?cv(e,"repeat of an indentation width identifier"):(c=t+i-1,l=!0)}if(Yb(o)){do{o=e.input.charCodeAt(++e.position)}while(Yb(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!Jb(o)&&0!==o)}for(;0!==o;){for(gv(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!l||e.lineIndent<c)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>c&&(c=e.lineIndent),Jb(o))u++;else{if(e.lineIndent<c){3===a?e.result+=Ax.repeat("\n",s?1+u:u):1===a&&s&&(e.result+="\n");break}for(n?Yb(o)?(h=!0,e.result+=Ax.repeat("\n",s?1+u:u)):h?(h=!1,e.result+=Ax.repeat("\n",u+1)):0===u?s&&(e.result+=" "):e.result+=Ax.repeat("\n",u):e.result+=Ax.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=e.position;!Jb(o)&&0!==o;)o=e.input.charCodeAt(++e.position);dv(e,r,e.position,!1)}}return!0}function Sv(e,t){var r,n,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,cv(e,"tab characters must not be used in indentation")),45===n)&&Zb(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,mv(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,Ev(e,t,3,!1,!0),a.push(e.result),mv(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)cv(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=o,e.kind="sequence",e.result=a,!0)}function _v(e,t,r){var n,i,o,a,s,l,c,u=e.tag,h=e.anchor,d={},p=Object.create(null),f=null,g=null,m=null,y=!1,x=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,cv(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!Zb(n)){if(a=e.line,s=e.lineStart,l=e.position,!Ev(e,r,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);Yb(c);)c=e.input.charCodeAt(++e.position);if(58===c)Zb(c=e.input.charCodeAt(++e.position))||cv(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(fv(e,d,p,f,g,null,a,s,l),f=g=m=null),x=!0,y=!1,i=!1,f=e.tag,g=e.result;else{if(!x)return e.tag=u,e.anchor=h,!0;cv(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return e.tag=u,e.anchor=h,!0;cv(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(fv(e,d,p,f,g,null,a,s,l),f=g=m=null),x=!0,y=!0,i=!0):y?(y=!1,i=!0):cv(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,s=e.lineStart,l=e.position),Ev(e,t,4,!0,i)&&(y?g=e.result:m=e.result),y||(fv(e,d,p,f,g,m,a,s,l),f=g=m=null),mv(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)cv(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&fv(e,d,p,f,g,null,a,s,l),x&&(e.tag=u,e.anchor=h,e.kind="mapping",e.result=d),x}function Tv(e){var t,r,n,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&cv(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(a=!0,r="!!",i=e.input.charCodeAt(++e.position)):r="!",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(n=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):cv(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Zb(i);)33===i&&(a?cv(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),Ub.test(r)||cv(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),qb.test(n)&&cv(e,"tag suffix cannot contain flow indicator characters")}n&&!Gb.test(n)&&cv(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(s){cv(e,"tag name is malformed: "+n)}return o?e.tag=n:Vb.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:cv(e,'undeclared tag handle "'+r+'"'),!0}function Av(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&cv(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!Zb(r)&&!Kb(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&cv(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Pv(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Zb(n)&&!Kb(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&cv(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Vb.call(e.anchorMap,r)||cv(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],mv(e,!0,-1),!0}function Ev(e,t,r,n,i){var o,a,s,l,c,u,h,d,p,f=1,g=!1,m=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=4===r||3===r,n&&mv(e,!0,-1)&&(g=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),1===f)for(;Tv(e)||Av(e);)mv(e,!0,-1)?(g=!0,s=o,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):s=!1;if(s&&(s=g||i),1!==f&&4!==r||(d=1===r||2===r?t:t+1,p=e.position-e.lineStart,1===f?s&&(Sv(e,p)||_v(e,p,d))||wv(e,d)?m=!0:(a&&kv(e,d)||vv(e,d)||Cv(e,d)?m=!0:Pv(e)?(m=!0,null===e.tag&&null===e.anchor||cv(e,"alias node should not have any properties")):bv(e,d,1===r)&&(m=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(m=s&&Sv(e,p))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&cv(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((h=e.implicitTypes[l]).resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(Vb.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,l=0,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,u[l].tag.length)===u[l].tag){h=u[l];break}h||cv(e,"unknown tag !<"+e.tag+">"),null!==e.result&&h.kind!==e.kind&&cv(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):cv(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function Mv(e){var t,r,n,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(mv(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!Zb(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&cv(e,"directive name must not be less than one character in length");0!==i;){for(;Yb(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!Jb(i));break}if(Jb(i))break;for(t=e.position;0!==i&&!Zb(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&gv(e),Vb.call(hv,r)?hv[r](e,r,n):uv(e,'unknown document directive "'+r+'"')}mv(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,mv(e,!0,-1)):a&&cv(e,"directives end mark is expected"),Ev(e,e.lineIndent-1,4,!1,!0),mv(e,!0,-1),e.checkLineBreaks&&Hb.test(e.input.slice(o,e.position))&&uv(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&yv(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,mv(e,!0,-1)):e.position<e.length-1&&cv(e,"end of the stream or a document separator is expected")}function Iv(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new sv(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,cv(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;)Mv(r);return r.documents}function Bv(e,t){var r=Iv(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Mx("expected a single document in the stream, but found more")}}mu(dv,"captureSegment"),mu(pv,"mergeMappings"),mu(fv,"storeMappingPair"),mu(gv,"readLineBreak"),mu(mv,"skipSeparationSpace"),mu(yv,"testDocumentSeparator"),mu(xv,"writeFoldedLines"),mu(bv,"readPlainScalar"),mu(vv,"readSingleQuotedScalar"),mu(Cv,"readDoubleQuotedScalar"),mu(wv,"readFlowCollection"),mu(kv,"readBlockScalar"),mu(Sv,"readBlockSequence"),mu(_v,"readBlockMapping"),mu(Tv,"readTagProperty"),mu(Av,"readAnchorProperty"),mu(Pv,"readAlias"),mu(Ev,"composeNode"),mu(Mv,"readDocument"),mu(Iv,"loadDocuments"),mu(function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=Iv(e,r);if("function"!=typeof t)return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])},"loadAll$1"),mu(Bv,"load$1");var Lv={load:Bv},jv=Object.prototype.toString,Nv=Object.prototype.hasOwnProperty,Dv=65279,Ov={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"},Fv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $v(e,t){var r,n,i,o,a,s,l;if(null===t)return{};for(r={},i=0,o=(n=Object.keys(t)).length;i<o;i+=1)a=n[i],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&Nv.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}function zv(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else{if(!(e<=4294967295))throw new Mx("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+Ax.repeat("0",n-t.length)+t}mu($v,"compileStyleMap"),mu(zv,"encodeHex");function Vv(e){this.schema=e.schema||zb,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ax.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=$v(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wv(e,t){for(var r,n=Ax.repeat(" ",t),i=0,o=-1,a="",s=e.length;i<s;)-1===(o=e.indexOf("\n",i))?(r=e.slice(i),i=s):(r=e.slice(i,o+1),i=o+1),r.length&&"\n"!==r&&(a+=n),a+=r;return a}function Hv(e,t){return"\n"+Ax.repeat(" ",e.indent*t)}function qv(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function Uv(e){return 32===e||9===e}function Gv(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Dv||65536<=e&&e<=1114111}function Xv(e){return Gv(e)&&e!==Dv&&13!==e&&10!==e}function Jv(e,t,r){var n=Xv(e),i=n&&!Uv(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||Xv(t)&&!Uv(t)&&35===e||58===t&&i}function Yv(e){return Gv(e)&&e!==Dv&&!Uv(e)&&45!==e&&63!==e&&58!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&35!==e&&38!==e&&42!==e&&33!==e&&124!==e&&61!==e&&62!==e&&39!==e&&34!==e&&37!==e&&64!==e&&96!==e}function Zv(e){return!Uv(e)&&58!==e}function Kv(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Qv(e){return/^\n* /.test(e)}mu(Vv,"State"),mu(Wv,"indentString"),mu(Hv,"generateNextLine"),mu(qv,"testImplicitResolving"),mu(Uv,"isWhitespace"),mu(Gv,"isPrintable"),mu(Xv,"isNsCharOrWhitespace"),mu(Jv,"isPlainSafe"),mu(Yv,"isPlainSafeFirst"),mu(Zv,"isPlainSafeLast"),mu(Kv,"codePointAt"),mu(Qv,"needIndentIndicator");function eC(e,t,r,n,i,o,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==n,f=-1,g=Yv(Kv(e,0))&&Zv(Kv(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(!Gv(c=Kv(e,l)))return 5;g=g&&Jv(c,u,s),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(10===(c=Kv(e,l)))h=!0,p&&(d=d||l-f-1>n&&" "!==e[f+1],f=l);else if(!Gv(c))return 5;g=g&&Jv(c,u,s),u=c}d=d||p&&l-f-1>n&&" "!==e[f+1]}return h||d?r>9&&Qv(e)?5:a?2===o?5:2:d?4:3:!g||a||i(e)?2===o?5:2:1}function tC(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Fv.indexOf(t)||Rv.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=n||e.flowLevel>-1&&r>=e.flowLevel;function l(t){return qv(e,t)}switch(mu(l,"testAmbiguity"),eC(t,s,e.indent,a,l,e.quotingType,e.forceQuotes&&!n,i)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+rC(t,e.indent)+nC(Wv(t,o));case 4:return">"+rC(t,e.indent)+nC(Wv(iC(t,a),o));case 5:return'"'+aC(t)+'"';default:throw new Mx("impossible error: invalid scalar style")}}()}function rC(e,t){var r=Qv(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function nC(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function iC(e,t){for(var r,n,i,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=e.indexOf("\n"))?r:e.length,o.lastIndex=r,oC(e.slice(0,r),t)),s="\n"===e[0]||" "===e[0];i=o.exec(e);){var l=i[1],c=i[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+oC(c,t),s=n}return a}function oC(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,o=0,a=0,s=0,l="";r=i.exec(e);)(s=r.index)-o>t&&(n=a>o?a:s,l+="\n"+e.slice(o,n),o=n+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function aC(e){for(var t,r="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=Kv(e,i),!(t=Ov[n])&&Gv(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||zv(n);return r}function sC(e,t,r){var n,i,o,a="",s=e.tag;for(n=0,i=r.length;n<i;n+=1)o=r[n],e.replacer&&(o=e.replacer.call(r,String(n),o)),(dC(e,t,o,!1,!1)||void 0===o&&dC(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}function lC(e,t,r,n){var i,o,a,s="",l=e.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(dC(e,t+1,a,!0,!0,!1,!0)||void 0===a&&dC(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Hv(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function cC(e,t,r){var n,i,o,a,s,l="",c=e.tag,u=Object.keys(r);for(n=0,i=u.length;n<i;n+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),a=r[o=u[n]],e.replacer&&(a=e.replacer.call(r,o,a)),dC(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),dC(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}function uC(e,t,r,n){var i,o,a,s,l,c,u="",h=e.tag,d=Object.keys(r);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new Mx("sortKeys must be a boolean or a function");for(i=0,o=d.length;i<o;i+=1)c="",n&&""===u||(c+=Hv(e,t)),s=r[a=d[i]],e.replacer&&(s=e.replacer.call(r,a,s)),dC(e,t+1,a,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,l&&(c+=Hv(e,t)),dC(e,t+1,s,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=h,e.dump=u||"{}"}function hC(e,t,r){var n,i,o,a,s,l;for(o=0,a=(i=r?e.explicitTypes:e.implicitTypes).length;o<a;o+=1)if(((s=i[o]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===jv.call(s.represent))n=s.represent(t,l);else{if(!Nv.call(s.represent,l))throw new Mx("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');n=s.represent[l](t,l)}e.dump=n}return!0}return!1}function dC(e,t,r,n,i,o,a){e.tag=null,e.dump=r,hC(e,r,!1)||hC(e,r,!0);var s,l=jv.call(e.dump),c=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||h||2!==e.indent&&t>0)&&(i=!1),h&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(d&&h&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)n&&0!==Object.keys(e.dump).length?(uC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(cC(e,t,e.dump),h&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l)n&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?lC(e,t-1,e.dump,i):lC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(sC(e,t,e.dump),h&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(e.skipInvalid)return!1;throw new Mx("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&tC(e,e.dump,t,o,c)}null!==e.tag&&"?"!==e.tag&&(s=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),s="!"===e.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",e.dump=s+" "+e.dump)}return!0}function pC(e,t){var r,n,i=[],o=[];for(fC(e,i,o),r=0,n=o.length;r<n;r+=1)t.duplicates.push(i[o[r]]);t.usedDuplicates=new Array(n)}function fC(e,t,r){var n,i,o;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===r.indexOf(i)&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)fC(e[i],t,r);else for(i=0,o=(n=Object.keys(e)).length;i<o;i+=1)fC(e[n[i]],t,r)}mu(eC,"chooseScalarStyle"),mu(tC,"writeScalar"),mu(rC,"blockHeader"),mu(nC,"dropEndingNewline"),mu(iC,"foldString"),mu(oC,"foldLine"),mu(aC,"escapeString"),mu(sC,"writeFlowSequence"),mu(lC,"writeBlockSequence"),mu(cC,"writeFlowMapping"),mu(uC,"writeBlockMapping"),mu(hC,"detectType"),mu(dC,"writeNode"),mu(pC,"getDuplicateReferences"),mu(fC,"inspectNode"),mu(function(e,t){var r=new Vv(t=t||{});r.noRefs||pC(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),dC(r,0,n,!0,!0)?r.dump+"\n":""},"dump$1"),mu(function(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}},"renamed");var gC=db,mC=Lv.load,yC={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},xC={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function bC(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=vC(e),t=vC(t);const[r,n]=[e.x,e.y],[i,o]=[t.x,t.y],a=i-r,s=o-n;return{angle:Math.atan(s/a),deltaX:a,deltaY:s}}mu(bC,"calculateDeltaAndAngle");var vC=mu(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),CC=mu(e=>({x:mu(function(t,r,n){let i=0;const o=vC(n[0]).x<vC(n[n.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(yC,e.arrowTypeStart)){const{angle:t,deltaX:r}=bC(n[0],n[1]);i=yC[e.arrowTypeStart]*Math.cos(t)*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(yC,e.arrowTypeEnd)){const{angle:t,deltaX:r}=bC(n[n.length-1],n[n.length-2]);i=yC[e.arrowTypeEnd]*Math.cos(t)*(r>=0?1:-1)}const a=Math.abs(vC(t).x-vC(n[n.length-1]).x),s=Math.abs(vC(t).y-vC(n[n.length-1]).y),l=Math.abs(vC(t).x-vC(n[0]).x),c=Math.abs(vC(t).y-vC(n[0]).y),u=yC[e.arrowTypeStart],h=yC[e.arrowTypeEnd];if(a<h&&a>0&&s<h){let e=h+1-a;e*="right"===o?-1:1,i-=e}if(l<u&&l>0&&c<u){let e=u+1-l;e*="right"===o?-1:1,i+=e}return vC(t).x+i},"x"),y:mu(function(t,r,n){let i=0;const o=vC(n[0]).y<vC(n[n.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(yC,e.arrowTypeStart)){const{angle:t,deltaY:r}=bC(n[0],n[1]);i=yC[e.arrowTypeStart]*Math.abs(Math.sin(t))*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(yC,e.arrowTypeEnd)){const{angle:t,deltaY:r}=bC(n[n.length-1],n[n.length-2]);i=yC[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(r>=0?1:-1)}const a=Math.abs(vC(t).y-vC(n[n.length-1]).y),s=Math.abs(vC(t).x-vC(n[n.length-1]).x),l=Math.abs(vC(t).y-vC(n[0]).y),c=Math.abs(vC(t).x-vC(n[0]).x),u=yC[e.arrowTypeStart],h=yC[e.arrowTypeEnd];if(a<h&&a>0&&s<h){let e=h+1-a;e*="up"===o?-1:1,i-=e}if(l<u&&l>0&&c<u){let e=u+1-l;e*="up"===o?-1:1,i+=e}return vC(t).y+i},"y")}),"getLineFunctionsWithOffset"),wC=mu(({flowchart:e})=>{var t,r;const n=(null==(t=null==e?void 0:e.subGraphTitleMargin)?void 0:t.top)??0,i=(null==(r=null==e?void 0:e.subGraphTitleMargin)?void 0:r.bottom)??0;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:n+i}},"getSubGraphTitleMargins"),kC=mu(e=>{const{handDrawnSeed:t}=$p();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),SC=mu(e=>{const t=_C([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),_C=mu(e=>{const t=new Map;return e.forEach(e=>{const[r,n]=e.split(":");t.set(r.trim(),null==n?void 0:n.trim())}),t},"styles2Map"),TC=mu(e=>"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e,"isLabelStyle"),AC=mu(e=>{const{stylesArray:t}=SC(e),r=[],n=[],i=[],o=[];return t.forEach(e=>{const t=e[0];TC(t)?r.push(e.join(":")+" !important"):(n.push(e.join(":")+" !important"),t.includes("stroke")&&i.push(e.join(":")+" !important"),"fill"===t&&o.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:o}},"styles2String"),PC=mu((e,t)=>{var r;const{themeVariables:n,handDrawnSeed:i}=$p(),{nodeBorder:o,mainBkg:a}=n,{stylesMap:s}=SC(e);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:(null==(r=s.get("stroke-width"))?void 0:r.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:EC(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),EC=mu(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(1===t.length){const e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},"getStrokeDashArray"),MC={},IC={};Object.defineProperty(IC,"__esModule",{value:!0}),IC.BLANK_URL=IC.relativeFirstCharacters=IC.whitespaceEscapeCharsRegex=IC.urlSchemeRegex=IC.ctrlCharactersRegex=IC.htmlCtrlEntityRegex=IC.htmlEntitiesRegex=IC.invalidProtocolRegex=void 0,IC.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,IC.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,IC.htmlCtrlEntityRegex=/&(newline|tab);/gi,IC.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,IC.urlSchemeRegex=/^.+(:|:)/gim,IC.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,IC.relativeFirstCharacters=[".","/"],IC.BLANK_URL="about:blank",Object.defineProperty(MC,"__esModule",{value:!0});var BC=MC.sanitizeUrl=function(e){if(!e)return LC.BLANK_URL;var t,r=NC(e.trim());do{t=(r=NC(r=jC(r).replace(LC.htmlCtrlEntityRegex,"").replace(LC.ctrlCharactersRegex,"").replace(LC.whitespaceEscapeCharsRegex,"").trim())).match(LC.ctrlCharactersRegex)||r.match(LC.htmlEntitiesRegex)||r.match(LC.htmlCtrlEntityRegex)||r.match(LC.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var n=r;if(!n)return LC.BLANK_URL;if(function(e){return LC.relativeFirstCharacters.indexOf(e[0])>-1}(n))return n;var i=n.trimStart(),o=i.match(LC.urlSchemeRegex);if(!o)return n;var a=o[0].toLowerCase().trim();if(LC.invalidProtocolRegex.test(a))return LC.BLANK_URL;var s=i.replace(/\\/g,"/");if("mailto:"===a||a.includes("://"))return s;if("http:"===a||"https:"===a){if(!function(e){return URL.canParse(e)}(s))return LC.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s},LC=IC;function jC(e){return e.replace(LC.ctrlCharactersRegex,"").replace(LC.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function NC(e){try{return decodeURIComponent(e)}catch(t){return e}}var DC="object"==typeof global&&global&&global.Object===Object&&global,OC="object"==typeof self&&self&&self.Object===Object&&self,FC=DC||OC||Function("return this")(),RC=FC.Symbol,$C=Object.prototype,zC=$C.hasOwnProperty,VC=$C.toString,WC=RC?RC.toStringTag:void 0;var HC=Object.prototype.toString;var qC=RC?RC.toStringTag:void 0;function UC(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":qC&&qC in Object(e)?function(e){var t=zC.call(e,WC),r=e[WC];try{e[WC]=void 0;var n=!0}catch(o){}var i=VC.call(e);return n&&(t?e[WC]=r:delete e[WC]),i}(e):function(e){return HC.call(e)}(e)}function GC(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function XC(e){if(!GC(e))return!1;var t=UC(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var JC,YC=FC["__core-js_shared__"],ZC=(JC=/[^.]+$/.exec(YC&&YC.keys&&YC.keys.IE_PROTO||""))?"Symbol(src)_1."+JC:"";var KC=Function.prototype.toString;function QC(e){if(null!=e){try{return KC.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var ew=/^\[object .+?Constructor\]$/,tw=Function.prototype,rw=Object.prototype,nw=tw.toString,iw=rw.hasOwnProperty,ow=RegExp("^"+nw.call(iw).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aw(e){return!(!GC(e)||(t=e,ZC&&ZC in t))&&(XC(e)?ow:ew).test(QC(e));var t}function sw(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return aw(r)?r:void 0}var lw=sw(Object,"create");var cw=Object.prototype.hasOwnProperty;var uw=Object.prototype.hasOwnProperty;function hw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dw(e,t){return e===t||e!=e&&t!=t}function pw(e,t){for(var r=e.length;r--;)if(dw(e[r][0],t))return r;return-1}hw.prototype.clear=function(){this.__data__=lw?lw(null):{},this.size=0},hw.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},hw.prototype.get=function(e){var t=this.__data__;if(lw){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return cw.call(t,e)?t[e]:void 0},hw.prototype.has=function(e){var t=this.__data__;return lw?void 0!==t[e]:uw.call(t,e)},hw.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=lw&&void 0===t?"__lodash_hash_undefined__":t,this};var fw=Array.prototype.splice;function gw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gw.prototype.clear=function(){this.__data__=[],this.size=0},gw.prototype.delete=function(e){var t=this.__data__,r=pw(t,e);return!(r<0)&&(r==t.length-1?t.pop():fw.call(t,r,1),--this.size,!0)},gw.prototype.get=function(e){var t=this.__data__,r=pw(t,e);return r<0?void 0:t[r][1]},gw.prototype.has=function(e){return pw(this.__data__,e)>-1},gw.prototype.set=function(e,t){var r=this.__data__,n=pw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var mw=sw(FC,"Map");function yw(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function xw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xw.prototype.clear=function(){this.size=0,this.__data__={hash:new hw,map:new(mw||gw),string:new hw}},xw.prototype.delete=function(e){var t=yw(this,e).delete(e);return this.size-=t?1:0,t},xw.prototype.get=function(e){return yw(this,e).get(e)},xw.prototype.has=function(e){return yw(this,e).has(e)},xw.prototype.set=function(e,t){var r=yw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function bw(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(bw.Cache||xw),r}bw.Cache=xw;function vw(e){var t=this.__data__=new gw(e);this.size=t.size}vw.prototype.clear=function(){this.__data__=new gw,this.size=0},vw.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},vw.prototype.get=function(e){return this.__data__.get(e)},vw.prototype.has=function(e){return this.__data__.has(e)},vw.prototype.set=function(e,t){var r=this.__data__;if(r instanceof gw){var n=r.__data__;if(!mw||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xw(n)}return r.set(e,t),this.size=r.size,this};var Cw=function(){try{var e=sw(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();function ww(e,t,r){"__proto__"==t&&Cw?Cw(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function kw(e,t,r){(void 0!==r&&!dw(e[t],r)||void 0===r&&!(t in e))&&ww(e,t,r)}var Sw=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[++n];if(!1===t(i[s],s,i))break}return e},_w="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tw=_w&&"object"==typeof module&&module&&!module.nodeType&&module,Aw=Tw&&Tw.exports===_w?FC.Buffer:void 0,Pw=Aw?Aw.allocUnsafe:void 0;function Ew(e,t){if(t)return e.slice();var r=e.length,n=Pw?Pw(r):new e.constructor(r);return e.copy(n),n}var Mw=FC.Uint8Array;function Iw(e){var t=new e.constructor(e.byteLength);return new Mw(t).set(new Mw(e)),t}function Bw(e,t){var r=t?Iw(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Lw(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var jw=Object.create,Nw=function(){function e(){}return function(t){if(!GC(t))return{};if(jw)return jw(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Dw(e,t){return function(r){return e(t(r))}}var Ow=Dw(Object.getPrototypeOf,Object),Fw=Object.prototype;function Rw(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fw)}function $w(e){return"function"!=typeof e.constructor||Rw(e)?{}:Nw(Ow(e))}function zw(e){return null!=e&&"object"==typeof e}function Vw(e){return zw(e)&&"[object Arguments]"==UC(e)}var Ww=Object.prototype,Hw=Ww.hasOwnProperty,qw=Ww.propertyIsEnumerable,Uw=Vw(function(){return arguments}())?Vw:function(e){return zw(e)&&Hw.call(e,"callee")&&!qw.call(e,"callee")},Gw=Array.isArray;function Xw(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Jw(e){return null!=e&&Xw(e.length)&&!XC(e)}var Yw="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zw=Yw&&"object"==typeof module&&module&&!module.nodeType&&module,Kw=Zw&&Zw.exports===Yw?FC.Buffer:void 0,Qw=(Kw?Kw.isBuffer:void 0)||function(){return!1},ek=Function.prototype,tk=Object.prototype,rk=ek.toString,nk=tk.hasOwnProperty,ik=rk.call(Object);var ok={};function ak(e){return function(t){return e(t)}}ok["[object Float32Array]"]=ok["[object Float64Array]"]=ok["[object Int8Array]"]=ok["[object Int16Array]"]=ok["[object Int32Array]"]=ok["[object Uint8Array]"]=ok["[object Uint8ClampedArray]"]=ok["[object Uint16Array]"]=ok["[object Uint32Array]"]=!0,ok["[object Arguments]"]=ok["[object Array]"]=ok["[object ArrayBuffer]"]=ok["[object Boolean]"]=ok["[object DataView]"]=ok["[object Date]"]=ok["[object Error]"]=ok["[object Function]"]=ok["[object Map]"]=ok["[object Number]"]=ok["[object Object]"]=ok["[object RegExp]"]=ok["[object Set]"]=ok["[object String]"]=ok["[object WeakMap]"]=!1;var sk="object"==typeof exports&&exports&&!exports.nodeType&&exports,lk=sk&&"object"==typeof module&&module&&!module.nodeType&&module,ck=lk&&lk.exports===sk&&DC.process,uk=function(){try{var e=lk&&lk.require&&lk.require("util").types;return e||ck&&ck.binding&&ck.binding("util")}catch(t){}}(),hk=uk&&uk.isTypedArray,dk=hk?ak(hk):function(e){return zw(e)&&Xw(e.length)&&!!ok[UC(e)]};function pk(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fk=Object.prototype.hasOwnProperty;function gk(e,t,r){var n=e[t];fk.call(e,t)&&dw(n,r)&&(void 0!==r||t in e)||ww(e,t,r)}function mk(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;void 0===l&&(l=e[s]),i?ww(r,s,l):gk(r,s,l)}return r}var yk=/^(?:0|[1-9]\d*)$/;function xk(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&yk.test(e))&&e>-1&&e%1==0&&e<t}var bk=Object.prototype.hasOwnProperty;function vk(e,t){var r=Gw(e),n=!r&&Uw(e),i=!r&&!n&&Qw(e),o=!r&&!n&&!i&&dk(e),a=r||n||i||o,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],l=s.length;for(var c in e)!t&&!bk.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||xk(c,l))||s.push(c);return s}var Ck=Object.prototype.hasOwnProperty;function wk(e){if(!GC(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Rw(e),r=[];for(var n in e)("constructor"!=n||!t&&Ck.call(e,n))&&r.push(n);return r}function kk(e){return Jw(e)?vk(e,!0):wk(e)}function Sk(e,t,r,n,i,o,a){var s=pk(e,r),l=pk(t,r),c=a.get(l);if(c)kw(e,r,c);else{var u,h=o?o(s,l,r+"",e,t,a):void 0,d=void 0===h;if(d){var p=Gw(l),f=!p&&Qw(l),g=!p&&!f&&dk(l);h=l,p||f||g?Gw(s)?h=s:zw(u=s)&&Jw(u)?h=Lw(s):f?(d=!1,h=Ew(l,!0)):g?(d=!1,h=Bw(l,!0)):h=[]:function(e){if(!zw(e)||"[object Object]"!=UC(e))return!1;var t=Ow(e);if(null===t)return!0;var r=nk.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&rk.call(r)==ik}(l)||Uw(l)?(h=s,Uw(s)?h=function(e){return mk(e,kk(e))}(s):GC(s)&&!XC(s)||(h=$w(l))):d=!1}d&&(a.set(l,h),i(h,l,n,o,a),a.delete(l)),kw(e,r,h)}}function _k(e,t,r,n,i){e!==t&&Sw(t,function(o,a){if(i||(i=new vw),GC(o))Sk(e,t,a,r,_k,n,i);else{var s=n?n(pk(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),kw(e,a,s)}},kk)}function Tk(e){return e}var Ak=Math.max;var Pk=Cw?function(e,t){return Cw(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Tk,Ek=Date.now;var Mk,Ik,Bk,Lk=(Mk=Pk,Ik=0,Bk=0,function(){var e=Ek(),t=16-(e-Bk);if(Bk=e,t>0){if(++Ik>=800)return arguments[0]}else Ik=0;return Mk.apply(void 0,arguments)});function jk(e,t){return Lk(function(e,t,r){return t=Ak(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Ak(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,t,Tk),e+"")}var Nk,Dk=(Nk=function(e,t,r){_k(e,t,r)},jk(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Nk.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!GC(r))return!1;var n=typeof t;return!!("number"==n?Jw(r)&&xk(t,r.length):"string"==n&&t in r)&&dw(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&Nk(e,a,r,i)}return e})),Ok={curveBasis:Oy,curveBasisClosed:function(e){return new Fy(e)},curveBasisOpen:function(e){return new Ry(e)},curveBumpX:By,curveBumpY:Ly,curveBundle:zy,curveCardinalClosed:Uy,curveCardinalOpen:Xy,curveCardinal:Hy,curveCatmullRomClosed:Qy,curveCatmullRomOpen:tx,curveCatmullRom:Zy,curveLinear:Ay,curveLinearClosed:function(e){return new rx(e)},curveMonotoneX:ux,curveMonotoneY:hx,curveNatural:fx,curveStep:mx,curveStepAfter:xx,curveStepBefore:yx},Fk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Rk=mu(function(e,t){const r=$k(e,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const e=r.map(e=>e.args);Sd(e),n=od(n,[...e])}else n=r.args;if(!n)return;let i=ed(e,t);const o="config";return void 0!==n[o]&&("flowchart-v2"===i&&(i="flowchart"),n[i]=n[o],delete n[o]),n},"detectInit"),$k=mu(function(e,t=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${Fk.source})(?=[}][%]{2}).*\n`,"ig");let o;e=e.trim().replace(i,"").replace(/'/gm,'"'),bu.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:${e}`);const a=[];for(;null!==(o=Yh.exec(e));)if(o.index===Yh.lastIndex&&Yh.lastIndex++,o&&!t||t&&(null==(r=o[1])?void 0:r.match(t))||t&&(null==(n=o[2])?void 0:n.match(t))){const e=o[1]?o[1]:o[2],t=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:e,args:t})}return 0===a.length?{type:e,args:null}:1===a.length?a[0]:a}catch(i){return bu.error(`ERROR: ${i.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),zk=mu(function(e){return e.replace(Yh,"")},"removeDirectives"),Vk=mu(function(e,t){for(const[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");function Wk(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Ok[r]??t}function Hk(e,t){const r=e.trim();if(r)return"loose"!==t.securityLevel?BC(r):r}mu(Wk,"interpolateToCurve"),mu(Hk,"formatUrl");var qk=mu((e,...t)=>{const r=e.split("."),n=r.length-1,i=r[n];let o=window;for(let a=0;a<n;a++)if(o=o[r[a]],!o)return void bu.error(`Function name: ${e} not found in window`);o[i](...t)},"runFunc");function Uk(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function Gk(e){let t,r=0;e.forEach(e=>{r+=Uk(e,t),t=e});return Yk(e,r/2)}function Xk(e){return 1===e.length?e[0]:Gk(e)}mu(Uk,"distance"),mu(Gk,"traverseEdge"),mu(Xk,"calcLabelPosition");var Jk=mu((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Yk=mu((e,t)=>{let r,n=t;for(const i of e){if(r){const e=Uk(i,r);if(0===e)return r;if(e<n)n-=e;else{const t=n/e;if(t<=0)return r;if(t>=1)return{x:i.x,y:i.y};if(t>0&&t<1)return{x:Jk((1-t)*r.x+t*i.x,5),y:Jk((1-t)*r.y+t*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Zk=mu((e,t,r)=>{bu.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Yk(t,25),i=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),a={x:0,y:0};return a.x=Math.sin(o)*i+(t[0].x+n.x)/2,a.y=-Math.cos(o)*i+(t[0].y+n.y)/2,a},"calcCardinalityPosition");function Kk(e,t,r){const n=structuredClone(r);bu.info("our points",n),"start_left"!==t&&"start_right"!==t&&n.reverse();const i=Yk(n,25+e),o=10+.5*e,a=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return"start_left"===t?(s.x=Math.sin(a+Math.PI)*o+(n[0].x+i.x)/2,s.y=-Math.cos(a+Math.PI)*o+(n[0].y+i.y)/2):"end_right"===t?(s.x=Math.sin(a-Math.PI)*o+(n[0].x+i.x)/2-5,s.y=-Math.cos(a-Math.PI)*o+(n[0].y+i.y)/2-5):"end_left"===t?(s.x=Math.sin(a)*o+(n[0].x+i.x)/2-5,s.y=-Math.cos(a)*o+(n[0].y+i.y)/2-5):(s.x=Math.sin(a)*o+(n[0].x+i.x)/2,s.y=-Math.cos(a)*o+(n[0].y+i.y)/2),s}function Qk(e){let t="",r="";for(const n of e)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}mu(Kk,"calcTerminalLabelPosition"),mu(Qk,"getStylesFromArray");var eS=0,tS=mu(()=>(eS++,"id-"+Math.random().toString(36).substr(2,12)+"-"+eS),"generateId");function rS(e){let t="";const r="0123456789abcdef";for(let n=0;n<e;n++)t+=r.charAt(Math.floor(16*Math.random()));return t}mu(rS,"makeRandomHex");var nS=mu(e=>rS(e.length),"random"),iS=mu(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"),oS=mu(function(e,t){const r=t.text.replace(yp.lineBreakRegex," "),[,n]=mS(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),void 0!==t.class&&i.attr("class",t.class);const o=i.append("tspan");return o.attr("x",t.x+2*t.textMargin),o.attr("fill",t.fill),o.text(r),i},"drawSimpleText"),aS=bw((e,t,r)=>{if(!e)return e;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),yp.lineBreakRegex.test(e))return e;const n=e.split(" ").filter(Boolean),i=[];let o="";return n.forEach((e,a)=>{const s=cS(`${e} `,r),l=cS(o,r);if(s>t){const{hyphenatedStrings:n,remainingWord:a}=sS(e,t,"-",r);i.push(o,...n),o=a}else l+s>=t?(i.push(o),o=e):o=[o,e].filter(Boolean).join(" ");a+1===n.length&&i.push(o)}),i.filter(e=>""!==e).join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sS=bw((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...e],o=[];let a="";return i.forEach((e,s)=>{const l=`${a}${e}`;if(cS(l,n)>=t){const e=s+1,t=i.length===e,n=`${l}${r}`;o.push(t?l:n),a=""}else a=l}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function lS(e,t){return hS(e,t).height}function cS(e,t){return hS(e,t).width}mu(lS,"calculateTextHeight"),mu(cS,"calculateTextWidth");var uS,hS=bw((e,t)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,o]=mS(r),a=["sans-serif",n],s=e.split(yp.lineBreakRegex),l=[],c=fg("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const h of a){let e=0;const t={width:0,height:0,lineHeight:0};for(const r of s){const n=iS();n.text=r||"";const a=oS(u,n).style("font-size",o).style("font-weight",i).style("font-family",h),s=(a._groups||a)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");t.width=Math.round(Math.max(t.width,s.width)),e=Math.round(s.height),t.height+=e,t.lineHeight=Math.round(Math.max(t.lineHeight,e))}l.push(t)}u.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]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),dS=(mu(p=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),p),pS=mu(function(e){return uS=uS||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),uS.innerHTML=e,unescape(uS.textContent)},"entityDecode");function fS(e){return"str"in e}mu(fS,"isDetailedError");var gS=mu((e,t,r,n)=>{var i;if(!n)return;const o=null==(i=e.node())?void 0:i.getBBox();o&&e.append("text").text(n).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),mS=mu(e=>{if("number"==typeof e)return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function yS(e,t){return Dk({},e,t)}mu(yS,"cleanAndMerge");var xS={assignWithDepth:od,wrapLabel:aS,calculateTextHeight:lS,calculateTextWidth:cS,calculateTextDimensions:hS,cleanAndMerge:yS,detectInit:Rk,detectDirective:$k,isSubstringInArray:Vk,interpolateToCurve:Wk,calcLabelPosition:Xk,calcCardinalityPosition:Zk,calcTerminalLabelPosition:Kk,formatUrl:Hk,getStylesFromArray:Qk,generateId:tS,random:nS,runFunc:qk,entityDecode:pS,insertTitle:gS,isLabelCoordinateInPath:kS,parseFontSize:mS,InitIDGenerator:dS},bS=mu(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){const t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"}),t},"encodeEntities"),vS=mu(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),CS=mu((e,t,{counter:r=0,prefix:n,suffix:i},o)=>o||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");function wS(e){return e??null}function kS(e,t){const r=Math.round(e.x),n=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(r.toString())||i.includes(n.toString())}mu(wS,"handleUndefinedAttr"),mu(kS,"isLabelCoordinateInPath");const SS=Object.freeze({left:0,top:0,width:16,height:16}),_S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),TS=Object.freeze({...SS,..._S}),AS=Object.freeze({...TS,body:"",hidden:!1}),PS=Object.freeze({width:null,height:null}),ES=Object.freeze({...PS,..._S}),MS=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name);function IS(e,t){const r=function(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}(e,t);for(const n in AS)n in _S?n in e&&!(n in r)&&(r[n]=_S[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function BS(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(e){o=IS(n[e]||i[e],o)}return a(t),r.forEach(a),IS(e,o)}function LS(e,t){if(e.icons[t])return BS(e,t,[]);const r=function(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);return(t||Object.keys(r).concat(Object.keys(n))).forEach(function e(t){if(r[t])return i[t]=[];if(!(t in i)){i[t]=null;const r=n[t]&&n[t].parent,o=r&&e(r);o&&(i[t]=[r].concat(o))}return i[t]}),i}(e,[t])[t];return r?BS(e,t,r):null}const jS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,NS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function DS(e,t,r){if(1===t)return e;if(r=r||100,"number"==typeof e)return Math.ceil(e*t*r)/r;if("string"!=typeof e)return e;const n=e.split(jS);if(null===n||!n.length)return e;const i=[];let o=n.shift(),a=NS.test(o);for(;;){if(a){const e=parseFloat(o);isNaN(e)?i.push(o):i.push(Math.ceil(e*t*r)/r)}else i.push(o);if(o=n.shift(),void 0===o)return i.join("");a=!a}}const OS=/\sid="(\S+)"/g,FS=new Map;function RS(e){const t=[];let r;for(;r=OS.exec(e);)t.push(r[1]);if(!t.length)return e;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return t.forEach(t=>{const r=function(e){e=e.replace(/[0-9]+$/,"")||"a";const t=FS.get(e)||0;return FS.set(e,t+1),t?`${e}${t}`:e}(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),e=e.replace(new RegExp(n,"g"),"")}function $S(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zS={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function VS(e){zS=e}var WS={exec:()=>null};function HS(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(US.caret,"$1"),r=r.replace(e,i),n},getRegex:()=>new RegExp(r,t)};return n}var qS=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),US={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},GS=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,XS=/(?:[*+-]|\d{1,9}[.)])/,JS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,YS=HS(JS).replace(/bull/g,XS).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(),ZS=HS(JS).replace(/bull/g,XS).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(),KS=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,QS=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,e_=HS(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",QS).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),t_=HS(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,XS).getRegex(),r_="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",n_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,i_=HS("^ {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",n_).replace("tag",r_).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o_=HS(KS).replace("hr",GS).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",r_).getRegex(),a_={blockquote:HS(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",o_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:e_,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:GS,html:i_,lheading:YS,list:t_,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:o_,table:WS,text:/^[^\n]+/},s_=HS("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",GS).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",r_).getRegex(),l_={...a_,lheading:ZS,table:s_,paragraph:HS(KS).replace("hr",GS).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",s_).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",r_).getRegex()},c_={...a_,html:HS("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n_).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:WS,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:HS(KS).replace("hr",GS).replace("heading"," *#{1,6} *[^\n]").replace("lheading",YS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},u_=/^( {2,}|\\)\n(?!\s*$)/,h_=/[\p{P}\p{S}]/u,d_=/[\s\p{P}\p{S}]/u,p_=/[^\s\p{P}\p{S}]/u,f_=HS(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,d_).getRegex(),g_=/(?!~)[\p{P}\p{S}]/u,m_=HS(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",qS?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),y_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,x_=HS(y_,"u").replace(/punct/g,h_).getRegex(),b_=HS(y_,"u").replace(/punct/g,g_).getRegex(),v_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C_=HS(v_,"gu").replace(/notPunctSpace/g,p_).replace(/punctSpace/g,d_).replace(/punct/g,h_).getRegex(),w_=HS(v_,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,g_).getRegex(),k_=HS("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,p_).replace(/punctSpace/g,d_).replace(/punct/g,h_).getRegex(),S_=HS(/\\(punct)/,"gu").replace(/punct/g,h_).getRegex(),__=HS(/^<(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(),T_=HS(n_).replace("(?:--\x3e|$)","--\x3e").getRegex(),A_=HS("^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",T_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),P_=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,E_=HS(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",P_).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),M_=HS(/^!?\[(label)\]\[(ref)\]/).replace("label",P_).replace("ref",QS).getRegex(),I_=HS(/^!?\[(ref)\](?:\[\])?/).replace("ref",QS).getRegex(),B_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,L_={_backpedal:WS,anyPunctuation:S_,autolink:__,blockSkip:m_,br:u_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:WS,emStrongLDelim:x_,emStrongRDelimAst:C_,emStrongRDelimUnd:k_,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:E_,nolink:I_,punctuation:f_,reflink:M_,reflinkSearch:HS("reflink|nolink(?!\\()","g").replace("reflink",M_).replace("nolink",I_).getRegex(),tag:A_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:WS},j_={...L_,link:HS(/^!?\[(label)\]\((.*?)\)/).replace("label",P_).getRegex(),reflink:HS(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",P_).getRegex()},N_={...L_,emStrongRDelimAst:w_,emStrongLDelim:b_,url:HS(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",B_).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:HS(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",B_).getRegex()},D_={...N_,br:HS(u_).replace("{2,}","*").getRegex(),text:HS(N_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},O_={normal:a_,gfm:l_,pedantic:c_},F_={normal:L_,gfm:N_,breaks:D_,pedantic:j_},R_={"&":"&","<":"<",">":">",'"':""","'":"'"},$_=e=>R_[e];function z_(e,t){if(t){if(US.escapeTest.test(e))return e.replace(US.escapeReplace,$_)}else if(US.escapeTestNoEncode.test(e))return e.replace(US.escapeReplaceNoEncode,$_);return e}function V_(e){try{e=encodeURI(e).replace(US.percentDecode,"%")}catch{return null}return e}function W_(e,t){var r;let n=e.replace(US.findPipe,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(US.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!(null==(r=n.at(-1))?void 0:r.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(US.slashPipe,"|");return n}function H_(e,t,r){let n=e.length;if(0===n)return"";let i=0;for(;i<n;){if(e.charAt(n-i-1)!==t)break;i++}return e.slice(0,n-i)}function q_(e,t,r,n,i){let o=t.href,a=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:o,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}var U_=class{constructor(e){y(this,"options"),y(this,"rules"),y(this,"lexer"),this.options=e||zS}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:H_(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let i=n[1];return t.split("\n").map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=H_(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:H_(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=H_(t[0],"\n").split("\n"),r="",n="",i=[];for(;e.length>0;){let t,o=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),o=!0;else{if(o)break;a.push(e[t])}e=e.slice(t);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===e.length)break;let u=i.at(-1);if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){let t=u,o=t.raw+"\n"+e.join("\n"),a=this.blockquote(o);i[i.length-1]=a,r=r.substring(0,r.length-t.raw.length)+a.raw,n=n.substring(0,n.length-t.text.length)+a.text;break}if("list"===(null==u?void 0:u.type)){let t=u,o=t.raw+"\n"+e.join("\n"),a=this.list(o);i[i.length-1]=a,r=r.substring(0,r.length-u.raw.length)+a.raw,n=n.substring(0,n.length-t.raw.length)+a.raw,e=o.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;e;){let r=!1,n="",s="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],u=!l.trim(),h=0;if(this.options.pedantic?(h=2,s=l.trimStart()):u?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,s=l.slice(h),h+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(h),r=this.rules.other.hrRegex(h),i=this.rules.other.fencesBeginRegex(h),o=this.rules.other.headingBeginRegex(h),a=this.rules.other.htmlBeginRegex(h);for(;e;){let d,p=e.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||o.test(c)||a.test(c)||t.test(c)||r.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=h||!c.trim())s+="\n"+d.slice(h);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||o.test(l)||r.test(l))break;s+="\n"+c}!u&&!c.trim()&&(u=!0),n+=p+"\n",e=e.substring(p.length+1),l=d.slice(h)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),i.raw+=n}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>"space"===e.type),r=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){var t;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=W_(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(null==(t=r[3])?void 0:t.trim())?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let e of i)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of o)a.rows.push(W_(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=H_(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),q_(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return q_(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){let r,i,o=[...n[0]].length-1,a=o,s=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+o);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(i=[...r].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);let t=[...n[0]][0].length,l=e.slice(0,o+n.index+t+i);if(Math.min(o,i)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=r[0],n="mailto:"+e;else{let i;do{i=r[0],r[0]=(null==(t=this.rules.inline._backpedal.exec(r[0]))?void 0:t[0])??""}while(i!==r[0]);e=r[0],n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},G_=class e{constructor(e){y(this,"tokens"),y(this,"options"),y(this,"state"),y(this,"tokenizer"),y(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zS,this.options.tokenizer=this.options.tokenizer||new U_,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 t={other:US,block:O_.normal,inline:F_.normal};this.options.pedantic?(t.block=O_.pedantic,t.inline=F_.pedantic):this.options.gfm&&(t.block=O_.gfm,this.options.breaks?t.inline=F_.breaks:t.inline=F_.gfm),this.tokenizer.rules=t}static get rules(){return{block:O_,inline:F_}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(US.carriageReturn,"\n"),this.blockTokens(e,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(e,t=[],r=!1){var n,i,o;for(this.options.pedantic&&(e=e.replace(US.tabCharGlobal," ").replace(US.spaceLine,""));e;){let a;if(null==(i=null==(n=this.options.extensions)?void 0:n.block)?void 0:i.some(r=>!!(a=r.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let r=t.at(-1);1===a.raw.length&&void 0!==r?r.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null==(o=this.options.extensions)?void 0:o.startBlock){let t,r=1/0,n=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},n),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(s=e.substring(0,r+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let n=t.at(-1);r&&"paragraph"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a),r=s.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var r,n,i,o,a;let s,l=e,c=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(c=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(c=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,c.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(c=this.tokenizer.rules.inline.blockSkip.exec(l));)s=c[2]?c[2].length:0,l=l.slice(0,c.index+s)+"["+"a".repeat(c[0].length-s-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=(null==(n=null==(r=this.options.hooks)?void 0:r.emStrongMask)?void 0:n.call({lexer:this},l))??l;let u=!1,h="";for(;e;){let r;if(u||(h=""),u=!1,null==(o=null==(i=this.options.extensions)?void 0:i.inline)?void 0:o.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,l,h)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(null==(a=this.options.extensions)?void 0:a.startInline){let t,r=1/0,i=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},i),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(h=r.raw.slice(-1)),u=!0;let n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},X_=class{constructor(e){y(this,"options"),y(this,"parser"),this.options=e||zS}space(e){return""}code({text:e,lang:t,escaped:r}){var n;let i=null==(n=(t||"").match(US.notSpaceStart))?void 0:n[0],o=e.replace(US.endingNewline,"")+"\n";return i?'<pre><code class="language-'+z_(i)+'">'+(r?o:z_(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:z_(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o<e.items.length;o++){let t=e.items[o];n+=this.listitem(t)}let i=t?"ol":"ul";return"<"+i+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+i+">\n"}listitem(e){var t;let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+z_(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let t=e.rows[i];r="";for(let e=0;e<t.length;e++)r+=this.tablecell(t[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${z_(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=V_(e);if(null===i)return n;let o='<a href="'+(e=i)+'"';return t&&(o+=' title="'+z_(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=V_(e);if(null===i)return z_(r);let o=`<img src="${e=i}" alt="${r}"`;return t&&(o+=` title="${z_(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:z_(e.text)}},J_=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Y_=class e{constructor(e){y(this,"options"),y(this,"renderer"),y(this,"textRenderer"),this.options=e||zS,this.options.renderer=this.options.renderer||new X_,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new J_}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){i+=t||"";continue}}let s=a;switch(s.type){case"space":i+=this.renderer.space(s);continue;case"hr":i+=this.renderer.hr(s);continue;case"heading":i+=this.renderer.heading(s);continue;case"code":i+=this.renderer.code(s);continue;case"table":i+=this.renderer.table(s);continue;case"blockquote":i+=this.renderer.blockquote(s);continue;case"list":i+=this.renderer.list(s);continue;case"html":i+=this.renderer.html(s);continue;case"def":i+=this.renderer.def(s);continue;case"paragraph":i+=this.renderer.paragraph(s);continue;case"text":{let r=s,n=this.renderer.text(r);for(;o+1<e.length&&"text"===e[o+1].type;)r=e[++o],n+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t=this.renderer){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=e||"";continue}}let s=a;switch(s.type){case"escape":case"text":i+=t.text(s);break;case"html":i+=t.html(s);break;case"link":i+=t.link(s);break;case"image":i+=t.image(s);break;case"strong":i+=t.strong(s);break;case"em":i+=t.em(s);break;case"codespan":i+=t.codespan(s);break;case"br":i+=t.br(s);break;case"del":i+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}},Z_=(f=class{constructor(e){y(this,"options"),y(this,"block"),this.options=e||zS}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?G_.lex:G_.lexInline}provideParser(){return this.block?Y_.parse:Y_.parseInline}},y(f,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),y(f,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),f),K_=new class{constructor(...e){y(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),y(this,"options",this.setOptions),y(this,"parse",this.parseMarkdown(!0)),y(this,"parseInline",this.parseMarkdown(!1)),y(this,"Parser",Y_),y(this,"Renderer",X_),y(this,"TextRenderer",J_),y(this,"Lexer",G_),y(this,"Tokenizer",U_),y(this,"Hooks",Z_),this.use(...e)}walkTokens(e,t){var r,n;let i=[];for(let o of e)switch(i=i.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=o;i=i.concat(this.walkTokens(e.items,t));break}default:{let e=o;(null==(n=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:n[e.type])?this.defaults.extensions.childTokens[e.type].forEach(r=>{let n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,t))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new X_(this.defaults);for(let r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=r,i=e.renderer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new U_(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=r,i=e.tokenizer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Z_;for(let r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=r,i=e.hooks[n],o=t[n];Z_.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async&&Z_.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(t,e);return o.call(t,r)})();let n=i.call(t,e);return o.call(t,n)}:t[n]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(t,e);return!1===r&&(r=await o.apply(t,e)),r})();let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return G_.lex(e,t??this.defaults)}parser(e,t){return Y_.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let r=i.hooks?await i.hooks.preprocess(t):t,n=await(i.hooks?await i.hooks.provideLexer():e?G_.lex:G_.lexInline)(r,i),o=i.hooks?await i.hooks.processAllTokens(n):n;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let a=await(i.hooks?await i.hooks.provideParser():e?Y_.parse:Y_.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(a):a})().catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let r=(i.hooks?i.hooks.provideLexer():e?G_.lex:G_.lexInline)(t,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let n=(i.hooks?i.hooks.provideParser():e?Y_.parse:Y_.parseInline)(r,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(a){return o(a)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+z_(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function Q_(e,t){return K_.parse(e,t)}function eT(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Array.from("string"==typeof e?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(e,t){var r=t.match(/\n([\t ]+|(?!\s).)/g);return r?e.concat(r.map(function(e){var t,r;return null!==(r=null===(t=e.match(/[\t ]/g))||void 0===t?void 0:t.length)&&void 0!==r?r:0})):e},[]);if(i.length){var o=new RegExp("\n[\t ]{"+Math.min.apply(Math,i)+"}","g");n=n.map(function(e){return e.replace(o,"\n")})}n[0]=n[0].replace(/^\r?\n/,"");var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:"",o=e;"string"==typeof e&&e.includes("\n")&&(o=String(e).split("\n").map(function(e,t){return 0===t?e:""+i+e}).join("\n")),a+=o+n[t+1]}),a}Q_.options=Q_.setOptions=function(e){return K_.setOptions(e),Q_.defaults=K_.defaults,VS(Q_.defaults),Q_},Q_.getDefaults=$S,Q_.defaults=zS,Q_.use=function(...e){return K_.use(...e),Q_.defaults=K_.defaults,VS(Q_.defaults),Q_},Q_.walkTokens=function(e,t){return K_.walkTokens(e,t)},Q_.parseInline=K_.parseInline,Q_.Parser=Y_,Q_.parser=Y_.parse,Q_.Renderer=X_,Q_.TextRenderer=J_,Q_.Lexer=G_,Q_.lexer=G_.lex,Q_.Tokenizer=U_,Q_.Hooks=Z_,Q_.parse=Q_,Q_.options,Q_.setOptions,Q_.use,Q_.walkTokens,Q_.parseInline,Y_.parse,G_.lex;var tT={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},rT=new Map,nT=new Map,iT=mu(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(bu.debug("Registering icon pack:",t.name),"loader"in t)nT.set(t.name,t.loader);else{if(!("icons"in t))throw bu.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');rT.set(t.name,t.icons)}}},"registerIconPacks"),oT=mu(async(e,t)=>{const r=((e,t,r,n="")=>{const i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const e=i.pop(),t=i.pop(),r={provider:i.length>0?i[0]:n,prefix:t,name:e};return MS(r)?r:null}const o=i[0],a=o.split("-");if(a.length>1){const e={provider:n,prefix:a.shift(),name:a.join("-")};return MS(e)?e:null}if(r&&""===n){const e={provider:n,prefix:"",name:o};return MS(e,r)?e:null}return null})(e,0,void 0!==t);if(!r)throw new Error(`Invalid icon name: ${e}`);const n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=rT.get(n);if(!i){const e=nT.get(n);if(!e)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await e(),prefix:n},rT.set(n,i)}catch(a){throw bu.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=LS(i,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),aT=mu(async e=>{try{return await oT(e),!0}catch{return!1}},"isIconAvailable"),sT=mu(async(e,t,r)=>{let n;try{n=await oT(e,null==t?void 0:t.fallbackPrefix)}catch(a){bu.error(a),n=tT}const i=function(e,t){const r={...TS,...e},n={...ES,...t},i={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(e=>{const t=[],r=e.hFlip,n=e.vFlip;let a,s=e.rotate;switch(r?n?s+=2:(t.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),t.push("scale(-1 1)"),i.top=i.left=0):n&&(t.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),t.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=i.height/2+i.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:a=i.width/2+i.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(i.left!==i.top&&(a=i.left,i.left=i.top,i.top=a),i.width!==i.height&&(a=i.width,i.width=i.height,i.height=a)),t.length&&(o=function(e,t,r){const n=function(e,t="defs"){let r="";const n=e.indexOf("<"+t);for(;n>=0;){const i=e.indexOf(">",n),o=e.indexOf("</"+t);if(-1===i||-1===o)break;const a=e.indexOf(">",o);if(-1===a)break;r+=e.slice(i+1,o).trim(),e=e.slice(0,n).trim()+e.slice(a+1)}return{defs:r,content:e}}(e);return i=n.defs,o=t+n.content+r,i?"<defs>"+i+"</defs>"+o:o;var i,o}(o,'<g transform="'+t.join(" ")+'">',"</g>"))});const a=n.width,s=n.height,l=i.width,c=i.height;let u,h;null===a?(h=null===s?"1em":"auto"===s?c:s,u=DS(h,l/c)):(u="auto"===a?l:a,h=null===s?DS(u,c/l):"auto"===s?c:s);const d={},p=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(d[e]=t.toString())};p("width",u),p("height",h);const f=[i.left,i.top,l,c];return d.viewBox=f.join(" "),{attributes:d,viewBox:f,body:o}}(n,t),o=function(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}(RS(i.body),{...i.attributes,...r});return Zd(o,Dd())},"getIconSVG");function lT(e,{markdownAutoWrap:t}){const r=eT(e.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===t?r.replace(/ /g," "):r}function cT(e,t={}){const r=lT(e,t),n=Q_.lexer(r),i=[[]];let o=0;function a(e,t="normal"){if("text"===e.type){e.text.split("\n").forEach((e,r)=>{0!==r&&(o++,i.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&i[o].push({content:e,type:t})})})}else"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{a(t,e.type)}):"html"===e.type&&i[o].push({content:e.text,type:"normal"})}return mu(a,"processNode"),n.forEach(e=>{var t;"paragraph"===e.type?null==(t=e.tokens)||t.forEach(e=>{a(e)}):"html"===e.type?i[o].push({content:e.text,type:"normal"}):i[o].push({content:e.raw,type:"normal"})}),i}function uT(e,{markdownAutoWrap:t}={}){const r=Q_.lexer(e);function n(e){var r,i,o;return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g," "):e.text.replace(/\n */g,"<br/>"):"strong"===e.type?`<strong>${null==(r=e.tokens)?void 0:r.map(n).join("")}</strong>`:"em"===e.type?`<em>${null==(i=e.tokens)?void 0:i.map(n).join("")}</em>`:"paragraph"===e.type?`<p>${null==(o=e.tokens)?void 0:o.map(n).join("")}</p>`:"space"===e.type?"":"html"===e.type?`${e.text}`:"escape"===e.type?e.text:(bu.warn(`Unsupported markdown: ${e.type}`),e.raw)}return mu(n,"output"),r.map(n).join("")}function hT(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function dT(e,t){return pT(e,[],hT(t.content),t.type)}function pT(e,t,r,n){if(0===r.length)return[{content:t.join(""),type:n},{content:"",type:n}];const[i,...o]=r,a=[...t,i];return e([{content:a.join(""),type:n}])?pT(e,a,o,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function fT(e,t){if(e.some(({content:e})=>e.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return gT(e,t)}function gT(e,t,r=[],n=[]){if(0===e.length)return n.length>0&&r.push(n),r.length>0?r:[];let i="";" "===e[0].content&&(i=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...n];if(""!==i&&a.push({content:i,type:"normal"}),a.push(o),t(a))return gT(e,t,r,a);if(n.length>0)r.push(n),e.unshift(o);else if(o.content){const[n,i]=dT(t,o);r.push([n]),i.content&&e.unshift(i)}return gT(e,t,r)}function mT(e,t){t&&e.attr("style",t)}async function yT(e,t,r,n,i=!1,o=Dd()){const a=e.append("foreignObject");a.attr("width",10*r+"px"),a.attr("height",10*r+"px");const s=a.append("xhtml:div"),l=pp(t.label)?await mp(t.label.replace(yp.lineBreakRegex,"\n"),o):Zd(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(l),mT(u,t.labelStyle),u.attr("class",`${c} ${n}`),mT(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}function xT(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function bT(e,t,r){const n=e.append("text"),i=xT(n,1,t);wT(i,r);const o=i.node().getComputedTextLength();return n.remove(),o}function vT(e,t,r){var n;const i=e.append("text"),o=xT(i,1,t);wT(o,[{content:r,type:"normal"}]);const a=null==(n=o.node())?void 0:n.getBoundingClientRect();return a&&i.remove(),a}function CT(e,t,r,n=!1){const i=t.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),a=i.append("text").attr("y","-10.1");let s=0;for(const l of r){const t=mu(t=>bT(i,1.1,t)<=e,"checkWidth"),r=t(l)?[l]:fT(l,t);for(const e of r){wT(xT(a,s,1.1),e),s++}}if(n){const e=a.node().getBBox(),t=2;return o.attr("x",e.x-t).attr("y",e.y-t).attr("width",e.width+2*t).attr("height",e.height+2*t),i.node()}return a.node()}function wT(e,t){e.text(""),t.forEach((t,r)=>{const n=e.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===r?n.text(t.content):n.text(" "+t.content)})}async function kT(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,n,i)=>(r.push((async()=>{const r=`${n}:${i}`;return await aT(r)?await sT(r,void 0,{class:"label-icon"}):`<i class='${Zd(e,t).replace(":"," ")}'></i>`})()),e));const n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}mu(lT,"preprocessMarkdown"),mu(cT,"markdownToLines"),mu(uT,"markdownToHTML"),mu(hT,"splitTextToChars"),mu(dT,"splitWordToFitWidth"),mu(pT,"splitWordToFitWidthRecursion"),mu(fT,"splitLineToFitWidth"),mu(gT,"splitLineToFitWidthRecursion"),mu(mT,"applyStyle"),mu(yT,"addHtmlSpan"),mu(xT,"createTspan"),mu(bT,"computeWidthOfText"),mu(vT,"computeDimensionOfText"),mu(CT,"createFormattedText"),mu(wT,"updateTextContentAndStyles"),mu(kT,"replaceIconSubstring");var ST=mu(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:o=!0,isNode:a=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(bu.debug("XYZ createText",t,r,n,i,o,a,"addSvgBackground: ",l),o){const n=uT(t,c),o=await kT(vS(n),c),u=t.replace(/\\\\/g,"\\"),h={isNode:a,label:pp(t)?u:o,labelStyle:r.replace("fill:","color:")};return await yT(e,h,s,i,l,c)}{const n=CT(s,e,cT(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!t&&l);if(a){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");fg(n).attr("style",e)}else{const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");fg(n).select("rect").attr("style",e.replace(/background:/g,"fill:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");fg(n).select("text").attr("style",t)}return n}},"createText");function _T(e,t,r){if(e&&e.length){const[n,i]=t,o=Math.PI/180*r,a=Math.cos(o),s=Math.sin(o);for(const t of e){const[e,r]=t;t[0]=(e-n)*a-(r-i)*s+n,t[1]=(e-n)*s+(r-i)*a+i}}}function TT(e,t){return e[0]===t[0]&&e[1]===t[1]}function AT(e,t){var r;const n=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return t.roughness>=1&&((null===(r=t.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=i),function(e,t,r,n=1){const i=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,s=[0,0];if(i)for(const c of a)_T(c,s,i);const l=function(e,t,r){const n=[];for(const c of e){const e=[...c];TT(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&n.push(e)}const i=[];t=Math.max(t,.1);const o=[];for(const c of n)for(let e=0;e<c.length-1;e++){const t=c[e],r=c[e+1];if(t[1]!==r[1]){const e=Math.min(t[1],r[1]);o.push({ymin:e,ymax:Math.max(t[1],r[1]),x:e===t[1]?t[0]:r[0],islope:(r[0]-t[0])/(r[1]-t[1])})}}if(o.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!o.length)return i;let a=[],s=o[0].ymin,l=0;for(;a.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>s);t++)e=t;o.splice(0,e+1).forEach(e=>{a.push({s:s,edge:e})})}if(a=a.filter(e=>!(e.edge.ymax<=s)),a.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==r||l%t==0)&&a.length>1)for(let e=0;e<a.length;e+=2){const t=e+1;if(t>=a.length)break;const r=a[e].edge,n=a[t].edge;i.push([[Math.round(r.x),s],[Math.round(n.x),s]])}s+=r,a.forEach(e=>{e.edge.x=e.edge.x+r*e.edge.islope}),l++}return i}(a,o,n);if(i){for(const e of a)_T(e,s,-i);!function(e,t,r){const n=[];e.forEach(e=>n.push(...e)),_T(n,t,r)}(l,s,-i)}return l}(e,i,n,o||1)}class PT{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const r=AT(e,t);return{type:"fillSketch",ops:this.renderLines(r,t)}}renderLines(e,t){const r=[];for(const n of e)r.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],t));return r}}function ET(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class MT extends PT{fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);const n=AT(e,Object.assign({},t,{hachureGap:r})),i=Math.PI/180*t.hachureAngle,o=[],a=.5*r*Math.cos(i),s=.5*r*Math.sin(i);for(const[l,c]of n)ET([l,c])&&o.push([[l[0]-a,l[1]+s],[...c]],[[l[0]+a,l[1]-s],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,t)}}}class IT extends PT{fillPolygons(e,t){const r=this._fillPolygons(e,t),n=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,n);return r.ops=r.ops.concat(i.ops),r}}class BT{constructor(e){this.helper=e}fillPolygons(e,t){const r=AT(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(r,t)}dotsOnLines(e,t){const r=[];let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);const o=n/4;for(const a of e){const e=ET(a),s=e/n,l=Math.ceil(s)-1,c=e-l*n,u=(a[0][0]+a[1][0])/2-n/4,h=Math.min(a[0][1],a[1][1]);for(let a=0;a<l;a++){const e=h+c+a*n,s=u-o+2*Math.random()*o,l=e-o+2*Math.random()*o,d=this.helper.ellipse(s,l,i,i,t);r.push(...d.ops)}}return{type:"fillSketch",ops:r}}}class LT{constructor(e){this.helper=e}fillPolygons(e,t){const r=AT(e,t);return{type:"fillSketch",ops:this.dashedLine(r,t)}}dashedLine(e,t){const r=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,n=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach(e=>{const o=ET(e),a=Math.floor(o/(r+n)),s=(o+n-a*(r+n))/2;let l=e[0],c=e[1];l[0]>c[0]&&(l=e[1],c=e[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let h=0;h<a;h++){const e=h*(r+n),o=e+r,a=[l[0]+e*Math.cos(u)+s*Math.cos(u),l[1]+e*Math.sin(u)+s*Math.sin(u)],c=[l[0]+o*Math.cos(u)+s*Math.cos(u),l[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(a[0],a[1],c[0],c[1],t))}}),i}}class jT{constructor(e){this.helper=e}fillPolygons(e,t){const r=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,n=t.zigzagOffset<0?r:t.zigzagOffset,i=AT(e,t=Object.assign({},t,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(i,n,t)}}zigzagLines(e,t,r){const n=[];return e.forEach(e=>{const i=ET(e),o=Math.round(i/(2*t));let a=e[0],s=e[1];a[0]>s[0]&&(a=e[1],s=e[0]);const l=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let c=0;c<o;c++){const e=2*c*t,i=2*(c+1)*t,o=Math.sqrt(2*Math.pow(t,2)),s=[a[0]+e*Math.cos(l),a[1]+e*Math.sin(l)],u=[a[0]+i*Math.cos(l),a[1]+i*Math.sin(l)],h=[s[0]+o*Math.cos(l+Math.PI/4),s[1]+o*Math.sin(l+Math.PI/4)];n.push(...this.helper.doubleLineOps(s[0],s[1],h[0],h[1],r),...this.helper.doubleLineOps(h[0],h[1],u[0],u[1],r))}}),n}}const NT={};class DT{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const OT={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 FT(e,t){return e.type===t}function RT(e){const t=[],r=function(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e);let n="BOD",i=0,o=r[i];for(;!FT(o,2);){let a=0;const s=[];if("BOD"===n){if("M"!==o.text&&"m"!==o.text)return RT("M0,0"+e);i++,a=OT[o.text],n=o.text}else FT(o,1)?a=OT[n]:(i++,a=OT[o.text],n=o.text);if(!(i+a<r.length))throw new Error("Path data ended short");for(let e=i;e<i+a;e++){const t=r[e];if(!FT(t,1))throw new Error("Param not a number: "+n+","+t.text);s[s.length]=+t.text}if("number"!=typeof OT[n])throw new Error("Bad segment: "+n);{const e={key:n,data:s};t.push(e),i+=a,o=r[i],"M"===n&&(n="L"),"m"===n&&(n="l")}}return t}function $T(e){let t=0,r=0,n=0,i=0;const o=[];for(const{key:a,data:s}of e)switch(a){case"M":o.push({key:"M",data:[...s]}),[t,r]=s,[n,i]=s;break;case"m":t+=s[0],r+=s[1],o.push({key:"M",data:[t,r]}),n=t,i=r;break;case"L":o.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const e=s.map((e,n)=>n%2?e+r:e+t);o.push({key:"C",data:e}),t=e[4],r=e[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const e=s.map((e,n)=>n%2?e+r:e+t);o.push({key:"Q",data:e}),t=e[2],r=e[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const e=s.map((e,n)=>n%2?e+r:e+t);o.push({key:"S",data:e}),t=e[2],r=e[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=n,r=i}return o}function zT(e){const t=[];let r="",n=0,i=0,o=0,a=0,s=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[n,i]=u,[o,a]=u;break;case"C":t.push({key:"C",data:[...u]}),n=u[4],i=u[5],s=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[n,i]=u;break;case"H":n=u[0],t.push({key:"L",data:[n,i]});break;case"V":i=u[0],t.push({key:"L",data:[n,i]});break;case"S":{let e=0,o=0;"C"===r||"S"===r?(e=n+(n-s),o=i+(i-l)):(e=n,o=i),t.push({key:"C",data:[e,o,...u]}),s=u[0],l=u[1],n=u[2],i=u[3];break}case"T":{const[e,o]=u;let a=0,c=0;"Q"===r||"T"===r?(a=n+(n-s),c=i+(i-l)):(a=n,c=i);const h=n+2*(a-n)/3,d=i+2*(c-i)/3,p=e+2*(a-e)/3,f=o+2*(c-o)/3;t.push({key:"C",data:[h,d,p,f,e,o]}),s=a,l=c,n=e,i=o;break}case"Q":{const[e,r,o,a]=u,c=n+2*(e-n)/3,h=i+2*(r-i)/3,d=o+2*(e-o)/3,p=a+2*(r-a)/3;t.push({key:"C",data:[c,h,d,p,o,a]}),s=e,l=r,n=o,i=a;break}case"A":{const e=Math.abs(u[0]),r=Math.abs(u[1]),o=u[2],a=u[3],s=u[4],l=u[5],c=u[6];0===e||0===r?(t.push({key:"C",data:[n,i,l,c,l,c]}),n=l,i=c):n===l&&i===c||(WT(n,i,l,c,e,r,o,a,s).forEach(function(e){t.push({key:"C",data:e})}),n=l,i=c);break}case"Z":t.push({key:"Z",data:[]}),n=o,i=a}r=c}return t}function VT(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function WT(e,t,r,n,i,o,a,s,l,c){const u=(h=a,Math.PI*h/180);var h;let d=[],p=0,f=0,g=0,m=0;if(c)[p,f,g,m]=c;else{[e,t]=VT(e,t,-u),[r,n]=VT(r,n,-u);const a=(e-r)/2,c=(t-n)/2;let h=a*a/(i*i)+c*c/(o*o);h>1&&(h=Math.sqrt(h),i*=h,o*=h);const d=i*i,y=o*o,x=d*y-d*c*c-y*a*a,b=d*c*c+y*a*a,v=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=v*i*c/o+(e+r)/2,m=v*-o*a/i+(t+n)/2,p=Math.asin(parseFloat(((t-m)/o).toFixed(9))),f=Math.asin(parseFloat(((n-m)/o).toFixed(9))),e<g&&(p=Math.PI-p),r<g&&(f=Math.PI-f),p<0&&(p=2*Math.PI+p),f<0&&(f=2*Math.PI+f),l&&p>f&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let y=f-p;if(Math.abs(y)>120*Math.PI/180){const e=f,t=r,s=n;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=WT(r=g+i*Math.cos(f),n=m+o*Math.sin(f),t,s,i,o,a,0,l,[f,e,g,m])}y=f-p;const x=Math.cos(p),b=Math.sin(p),v=Math.cos(f),C=Math.sin(f),w=Math.tan(y/4),k=4/3*i*w,S=4/3*o*w,_=[e,t],T=[e+k*b,t-S*x],A=[r+k*C,n-S*v],P=[r,n];if(T[0]=2*_[0]-T[0],T[1]=2*_[1]-T[1],c)return[T,A,P].concat(d);{d=[T,A,P].concat(d);const e=[];for(let t=0;t<d.length;t+=3){const r=VT(d[t][0],d[t][1],u),n=VT(d[t+1][0],d[t+1][1],u),i=VT(d[t+2][0],d[t+2][1],u);e.push([r[0],r[1],n[0],n[1],i[0],i[1]])}return e}}const HT={randOffset:function(e,t){return nA(e,t)},randOffsetWithRange:function(e,t,r){return rA(e,t,r)},ellipse:function(e,t,r,n,i){return JT(e,t,i,XT(r,n,i)).opset},doubleLineOps:function(e,t,r,n,i){return iA(e,t,r,n,i,!0)}};function qT(e,t,r,n,i){return{type:"path",ops:iA(e,t,r,n,i)}}function UT(e,t,r){const n=(e||[]).length;if(n>2){const i=[];for(let t=0;t<n-1;t++)i.push(...iA(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&i.push(...iA(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return 2===n?qT(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function GT(e,t){if(e.length){const r="number"==typeof e[0][0]?[e]:e,n=aA(r[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:aA(r[0],1.5*(1+.22*t.roughness),eA(t));for(let e=1;e<r.length;e++){const o=r[e];if(o.length){const e=aA(o,1*(1+.2*t.roughness),t),r=t.disableMultiStroke?[]:aA(o,1.5*(1+.22*t.roughness),eA(t));for(const t of e)"move"!==t.op&&n.push(t);for(const t of r)"move"!==t.op&&i.push(t)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function XT(e,t,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/i;let a=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return a+=nA(a*l,r),s+=nA(s*l,r),{increment:o,rx:a,ry:s}}function JT(e,t,r,n){const[i,o]=lA(n.increment,e,t,n.rx,n.ry,1,n.increment*rA(.1,rA(.4,1,r),r),r);let a=sA(i,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[i]=lA(n.increment,e,t,n.rx,n.ry,1.5,0,r),o=sA(i,null,r);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function YT(e,t,r,n,i,o,a,s,l){const c=e,u=t;let h=Math.abs(r/2),d=Math.abs(n/2);h+=nA(.01*h,l),d+=nA(.01*d,l);let p=i,f=o;for(;p<0;)p+=2*Math.PI,f+=2*Math.PI;f-p>2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(f-p)/2),y=cA(m,c,u,h,d,p,f,1,l);if(!l.disableMultiStroke){const e=cA(m,c,u,h,d,p,f,1.5,l);y.push(...e)}return a&&(s?y.push(...iA(c,u,c+h*Math.cos(p),u+d*Math.sin(p),l),...iA(c,u,c+h*Math.cos(f),u+d*Math.sin(f),l)):y.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+h*Math.cos(p),u+d*Math.sin(p)]})),{type:"path",ops:y}}function ZT(e,t){const r=zT($T(RT(e))),n=[];let i=[0,0],o=[0,0];for(const{key:a,data:s}of r)switch(a){case"M":o=[s[0],s[1]],i=[s[0],s[1]];break;case"L":n.push(...iA(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{const[e,r,i,a,l,c]=s;n.push(...uA(e,r,i,a,l,c,o,t)),o=[l,c];break}case"Z":n.push(...iA(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:n}}function KT(e,t){const r=[];for(const n of e)if(n.length){const e=t.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+nA(e,t),n[0][1]+nA(e,t)]});for(let o=1;o<i;o++)r.push({op:"lineTo",data:[n[o][0]+nA(e,t),n[o][1]+nA(e,t)]})}}return{type:"fillPath",ops:r}}function QT(e,t){return function(e,t){let r=e.fillStyle||"hachure";if(!NT[r])switch(r){case"zigzag":NT[r]||(NT[r]=new MT(t));break;case"cross-hatch":NT[r]||(NT[r]=new IT(t));break;case"dots":NT[r]||(NT[r]=new BT(t));break;case"dashed":NT[r]||(NT[r]=new LT(t));break;case"zigzag-line":NT[r]||(NT[r]=new jT(t));break;default:r="hachure",NT[r]||(NT[r]=new PT(t))}return NT[r]}(t,HT).fillPolygons(e,t)}function eA(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function tA(e){return e.randomizer||(e.randomizer=new DT(e.seed||0)),e.randomizer.next()}function rA(e,t,r,n=1){return r.roughness*n*(tA(r)*(t-e)+e)}function nA(e,t,r=1){return rA(-e,e,t,r)}function iA(e,t,r,n,i,o=!1){const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=oA(e,t,r,n,i,!0,!1);if(a)return s;const l=oA(e,t,r,n,i,!0,!0);return s.concat(l)}function oA(e,t,r,n,i,o,a){const s=Math.pow(e-r,2)+Math.pow(t-n,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=l/10);const h=u/2,d=.2+.2*tA(i);let p=i.bowing*i.maxRandomnessOffset*(n-t)/200,f=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=nA(p,i,c),f=nA(f,i,c);const g=[],m=()=>nA(h,i,c),y=()=>nA(u,i,c),x=i.preserveVertices;return a?g.push({op:"move",data:[e+(x?0:m()),t+(x?0:m())]}):g.push({op:"move",data:[e+(x?0:nA(u,i,c)),t+(x?0:nA(u,i,c))]}),a?g.push({op:"bcurveTo",data:[p+e+(r-e)*d+m(),f+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),f+t+2*(n-t)*d+m(),r+(x?0:m()),n+(x?0:m())]}):g.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),f+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),f+t+2*(n-t)*d+y(),r+(x?0:y()),n+(x?0:y())]}),g}function aA(e,t,r){if(!e.length)return[];const n=[];n.push([e[0][0]+nA(t,r),e[0][1]+nA(t,r)]),n.push([e[0][0]+nA(t,r),e[0][1]+nA(t,r)]);for(let i=1;i<e.length;i++)n.push([e[i][0]+nA(t,r),e[i][1]+nA(t,r)]),i===e.length-1&&n.push([e[i][0]+nA(t,r),e[i][1]+nA(t,r)]);return sA(n,null,r)}function sA(e,t,r){const n=e.length,i=[];if(n>3){const t=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let r=1;r+2<n;r++){const n=e[r];t[0]=[n[0],n[1]],t[1]=[n[0]+(o*e[r+1][0]-o*e[r-1][0])/6,n[1]+(o*e[r+1][1]-o*e[r-1][1])/6],t[2]=[e[r+1][0]+(o*e[r][0]-o*e[r+2][0])/6,e[r+1][1]+(o*e[r][1]-o*e[r+2][1])/6],t[3]=[e[r+1][0],e[r+1][1]],i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[3][0],t[3][1]]})}}else 3===n?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===n&&i.push(...oA(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return i}function lA(e,t,r,n,i,o,a,s){const l=[],c=[];if(0===s.roughness){e/=4,c.push([t+n*Math.cos(-e),r+i*Math.sin(-e)]);for(let o=0;o<=2*Math.PI;o+=e){const e=[t+n*Math.cos(o),r+i*Math.sin(o)];l.push(e),c.push(e)}c.push([t+n*Math.cos(0),r+i*Math.sin(0)]),c.push([t+n*Math.cos(e),r+i*Math.sin(e)])}else{const u=nA(.5,s)-Math.PI/2;c.push([nA(o,s)+t+.9*n*Math.cos(u-e),nA(o,s)+r+.9*i*Math.sin(u-e)]);const h=2*Math.PI+u-.01;for(let a=u;a<h;a+=e){const e=[nA(o,s)+t+n*Math.cos(a),nA(o,s)+r+i*Math.sin(a)];l.push(e),c.push(e)}c.push([nA(o,s)+t+n*Math.cos(u+2*Math.PI+.5*a),nA(o,s)+r+i*Math.sin(u+2*Math.PI+.5*a)]),c.push([nA(o,s)+t+.98*n*Math.cos(u+a),nA(o,s)+r+.98*i*Math.sin(u+a)]),c.push([nA(o,s)+t+.9*n*Math.cos(u+.5*a),nA(o,s)+r+.9*i*Math.sin(u+.5*a)])}return[c,l]}function cA(e,t,r,n,i,o,a,s,l){const c=o+nA(.1,l),u=[];u.push([nA(s,l)+t+.9*n*Math.cos(c-e),nA(s,l)+r+.9*i*Math.sin(c-e)]);for(let h=c;h<=a;h+=e)u.push([nA(s,l)+t+n*Math.cos(h),nA(s,l)+r+i*Math.sin(h)]);return u.push([t+n*Math.cos(a),r+i*Math.sin(a)]),u.push([t+n*Math.cos(a),r+i*Math.sin(a)]),sA(u,0,l)}function uA(e,t,r,n,i,o,a,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let u=[0,0];const h=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let p=0;p<h;p++)0===p?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(d?0:nA(c[0],s)),a[1]+(d?0:nA(c[0],s))]}),u=d?[i,o]:[i+nA(c[p],s),o+nA(c[p],s)],l.push({op:"bcurveTo",data:[e+nA(c[p],s),t+nA(c[p],s),r+nA(c[p],s),n+nA(c[p],s),u[0],u[1]]});return l}function hA(e){return[...e]}function dA(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(3===r)n.push(hA(e[0]),hA(e[1]),hA(e[2]),hA(e[2]));else{const r=[];r.push(e[0],e[0]);for(let t=1;t<e.length;t++)r.push(e[t]),t===e.length-1&&r.push(e[t]);const i=[],o=1-t;n.push(hA(r[0]));for(let e=1;e+2<r.length;e++){const t=r[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(o*r[e+1][0]-o*r[e-1][0])/6,t[1]+(o*r[e+1][1]-o*r[e-1][1])/6],i[2]=[r[e+1][0]+(o*r[e][0]-o*r[e+2][0])/6,r[e+1][1]+(o*r[e][1]-o*r[e+2][1])/6],i[3]=[r[e+1][0],r[e+1][1]],n.push(i[1],i[2],i[3])}}return n}function pA(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function fA(e,t,r){const n=pA(t,r);if(0===n)return pA(e,t);let i=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/n;return i=Math.max(0,Math.min(1,i)),pA(e,gA(t,r,i))}function gA(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function mA(e,t,r,n){const i=n||[];if(function(e,t){const r=e[t+0],n=e[t+1],i=e[t+2],o=e[t+3];let a=3*n[0]-2*r[0]-o[0];a*=a;let s=3*n[1]-2*r[1]-o[1];s*=s;let l=3*i[0]-2*o[0]-r[0];l*=l;let c=3*i[1]-2*o[1]-r[1];return c*=c,a<l&&(a=l),s<c&&(s=c),a+s}(e,t)<r){const r=e[t+0];i.length?(o=i[i.length-1],a=r,Math.sqrt(pA(o,a))>1&&i.push(r)):i.push(r),i.push(e[t+3])}else{const n=.5,o=e[t+0],a=e[t+1],s=e[t+2],l=e[t+3],c=gA(o,a,n),u=gA(a,s,n),h=gA(s,l,n),d=gA(c,u,n),p=gA(u,h,n),f=gA(d,p,n);mA([o,c,d,f],0,r,i),mA([f,p,h,l],0,r,i)}var o,a;return i}function yA(e,t){return xA(e,0,e.length,t)}function xA(e,t,r,n,i){const o=i||[],a=e[t],s=e[r-1];let l=0,c=1;for(let u=t+1;u<r-1;++u){const t=fA(e[u],a,s);t>l&&(l=t,c=u)}return Math.sqrt(l)>n?(xA(e,t,c+1,n,o),xA(e,c,r,n,o)):(o.length||o.push(a),o.push(s)),o}function bA(e,t=.15,r){const n=[],i=(e.length-1)/3;for(let o=0;o<i;o++)mA(e,3*o,t,n);return r&&r>0?xA(n,0,n.length,r):n}const vA="none";class CA{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,r){return{shape:e,sets:t||[],options:r||this.defaultOptions}}line(e,t,r,n,i){const o=this._o(i);return this._d("line",[qT(e,t,r,n,o)],o)}rectangle(e,t,r,n,i){const o=this._o(i),a=[],s=function(e,t,r,n,i){return UT([[e,t],[e+r,t],[e+r,t+n],[e,t+n]],!0,i)}(e,t,r,n,o);if(o.fill){const i=[[e,t],[e+r,t],[e+r,t+n],[e,t+n]];"solid"===o.fillStyle?a.push(KT([i],o)):a.push(QT([i],o))}return o.stroke!==vA&&a.push(s),this._d("rectangle",a,o)}ellipse(e,t,r,n,i){const o=this._o(i),a=[],s=XT(r,n,o),l=JT(e,t,o,s);if(o.fill)if("solid"===o.fillStyle){const r=JT(e,t,o,s).opset;r.type="fillPath",a.push(r)}else a.push(QT([l.estimatedPoints],o));return o.stroke!==vA&&a.push(l.opset),this._d("ellipse",a,o)}circle(e,t,r,n){const i=this.ellipse(e,t,r,r,n);return i.shape="circle",i}linearPath(e,t){const r=this._o(t);return this._d("linearPath",[UT(e,!1,r)],r)}arc(e,t,r,n,i,o,a=!1,s){const l=this._o(s),c=[],u=YT(e,t,r,n,i,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=YT(e,t,r,n,i,o,!0,!1,a);s.type="fillPath",c.push(s)}else c.push(function(e,t,r,n,i,o,a){const s=e,l=t;let c=Math.abs(r/2),u=Math.abs(n/2);c+=nA(.01*c,a),u+=nA(.01*u,a);let h=i,d=o;for(;h<0;)h+=2*Math.PI,d+=2*Math.PI;d-h>2*Math.PI&&(h=0,d=2*Math.PI);const p=(d-h)/a.curveStepCount,f=[];for(let g=h;g<=d;g+=p)f.push([s+c*Math.cos(g),l+u*Math.sin(g)]);return f.push([s+c*Math.cos(d),l+u*Math.sin(d)]),f.push([s,l]),QT([f],a)}(e,t,r,n,i,o,l));return l.stroke!==vA&&c.push(u),this._d("arc",c,l)}curve(e,t){const r=this._o(t),n=[],i=GT(e,r);if(r.fill&&r.fill!==vA)if("solid"===r.fillStyle){const t=GT(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else{const t=[],i=e;if(i.length){const e="number"==typeof i[0][0]?[i]:i;for(const n of e)n.length<3?t.push(...n):3===n.length?t.push(...bA(dA([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):t.push(...bA(dA(n),10,(1+r.roughness)/2))}t.length&&n.push(QT([t],r))}return r.stroke!==vA&&n.push(i),this._d("curve",n,r)}polygon(e,t){const r=this._o(t),n=[],i=UT(e,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(KT([e],r)):n.push(QT([e],r))),r.stroke!==vA&&n.push(i),this._d("polygon",n,r)}path(e,t){const r=this._o(t),n=[];if(!e)return this._d("path",n,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&"transparent"!==r.fill&&r.fill!==vA,o=r.stroke!==vA,a=!!(r.simplification&&r.simplification<1),s=function(e,t,r){const n=zT($T(RT(e))),i=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...bA(s,1)),s=[]},c=()=>{l(),o.length&&(i.push(o),o=[])};for(const{key:h,data:d}of n)switch(h){case"M":c(),a=[d[0],d[1]],o.push(a);break;case"L":l(),o.push([d[0],d[1]]);break;case"C":if(!s.length){const e=o.length?o[o.length-1]:a;s.push([e[0],e[1]])}s.push([d[0],d[1]]),s.push([d[2],d[3]]),s.push([d[4],d[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(c(),!r)return i;const u=[];for(const h of i){const e=yA(h,r);e.length&&u.push(e)}return u}(e,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=ZT(e,r);if(i)if("solid"===r.fillStyle)if(1===s.length){const t=ZT(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(t.ops)})}else n.push(KT(s,r));else n.push(QT(s,r));return o&&(a?s.forEach(e=>{n.push(UT(e,!1,r))}):n.push(l)),this._d("path",n,r)}opsToPath(e,t){let r="";for(const n of e.ops){const e="number"==typeof t&&t>=0?n.data.map(e=>+e.toFixed(t)):n.data;switch(n.op){case"move":r+=`M${e[0]} ${e[1]} `;break;case"bcurveTo":r+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case"lineTo":r+=`L${e[0]} ${e[1]} `}}return r.trim()}toPaths(e){const t=e.sets||[],r=e.options||this.defaultOptions,n=[];for(const i of t){let e=null;switch(i.type){case"path":e={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:vA};break;case"fillPath":e={d:this.opsToPath(i),stroke:vA,strokeWidth:0,fill:r.fill||vA};break;case"fillSketch":e=this.fillSketch(i,r)}e&&n.push(e)}return n}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||vA,strokeWidth:r,fill:vA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}}const wA="http://www.w3.org/2000/svg";class kA{constructor(e,t){this.svg=e,this.gen=new CA(t)}draw(e){const t=e.sets||[],r=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(wA,"g"),o=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=n.createElementNS(wA,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke",r.stroke),t.setAttribute("stroke-width",r.strokeWidth+""),t.setAttribute("fill","none"),r.strokeLineDash&&t.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":t=n.createElementNS(wA,"path"),t.setAttribute("d",this.opsToPath(a,o)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",r.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(n,a,r)}t&&i.appendChild(t)}return i}fillSketch(e,t,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const i=e.createElementNS(wA,"path");return i.setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",n+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,r,n,i){const o=this.gen.line(e,t,r,n,i);return this.draw(o)}rectangle(e,t,r,n,i){const o=this.gen.rectangle(e,t,r,n,i);return this.draw(o)}ellipse(e,t,r,n,i){const o=this.gen.ellipse(e,t,r,n,i);return this.draw(o)}circle(e,t,r,n){const i=this.gen.circle(e,t,r,n);return this.draw(i)}linearPath(e,t){const r=this.gen.linearPath(e,t);return this.draw(r)}polygon(e,t){const r=this.gen.polygon(e,t);return this.draw(r)}arc(e,t,r,n,i,o,a=!1,s){const l=this.gen.arc(e,t,r,n,i,o,a,s);return this.draw(l)}curve(e,t){const r=this.gen.curve(e,t);return this.draw(r)}path(e,t){const r=this.gen.path(e,t);return this.draw(r)}}var SA=(e,t)=>new kA(e,t),_A=mu(async(e,t,r)=>{var n,i;let o;const a=t.useHtmlLabels||ip(null==(n=$p())?void 0:n.htmlLabels);o=r||"node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),l=s.insert("g").attr("class","label").attr("style",wS(t.labelStyle));let c;c=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0];const u=await ST(l,Zd(vS(c),$p()),{useHtmlLabels:a,width:t.width||(null==(i=$p().flowchart)?void 0:i.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let h=u.getBBox();const d=((null==t?void 0:t.padding)??0)/2;if(a){const e=u.children[0],t=fg(u),r=e.getElementsByTagName("img");if(r){const e=""===c.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(r=>{function n(){if(t.style.display="flex",t.style.flexDirection="column",e){const e=$p().fontSize?$p().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=kd.fontSize]=mS(e),i=n*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";r(t)}mu(n,"setupImage"),setTimeout(()=>{t.complete&&n()}),t.addEventListener("error",n),t.addEventListener("load",n)})))}h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}return a?l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):l.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:d,label:l}},"labelHelper"),TA=mu(async(e,t,r)=>{var n,i,o,a,s,l;const c=r.useHtmlLabels||ip(null==(i=null==(n=$p())?void 0:n.flowchart)?void 0:i.htmlLabels),u=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),h=await ST(u,Zd(vS(t),$p()),{useHtmlLabels:c,width:r.width||(null==(a=null==(o=$p())?void 0:o.flowchart)?void 0:a.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let d=h.getBBox();const p=r.padding/2;if(ip(null==(l=null==(s=$p())?void 0:s.flowchart)?void 0:l.htmlLabels)){const e=h.children[0],t=fg(h);d=e.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return c?u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):u.attr("transform","translate(0, "+-d.height/2+")"),r.centerLabel&&u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:e,bbox:d,halfPadding:p,label:u}},"insertLabel"),AA=mu((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),PA=mu((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function EA(e){const t=e.map((e,t)=>`${0===t?"M":"L"}${e.x},${e.y}`);return t.push("Z"),t.join(" ")}function MA(e,t,r,n,i,o){const a=[],s=r-e,l=n-t,c=s/o,u=2*Math.PI/c,h=t+l/2;for(let d=0;d<=50;d++){const t=e+d/50*s,r=h+i*Math.sin(u*(t-e));a.push({x:t,y:r})}return a}function IA(e,t,r,n,i,o){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:-i,y:-o})}return a}mu(EA,"createPathFromPoints"),mu(MA,"generateFullSineWavePoints"),mu(IA,"generateCirclePoints");var BA=mu((e,t)=>{var r,n,i=e.x,o=e.y,a=t.x-i,s=t.y-o,l=e.width/2,c=e.height/2;return Math.abs(s)*l>Math.abs(a)*c?(s<0&&(c=-c),r=0===s?0:c*a/s,n=c):(a<0&&(l=-l),r=l,n=0===a?0:l*s/a),{x:i+r,y:o+n}},"intersectRect");function LA(e,t){t&&e.attr("style",t)}async function jA(e){const t=fg(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=$p();let i=e.label;e.label&&pp(e.label)&&(i=await mp(e.label.replace(yp.lineBreakRegex,"\n"),n));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>";return r.html(Zd(o,n)),LA(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}mu(LA,"applyStyle"),mu(jA,"addHtmlLabel");var NA=mu(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),ip($p().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),bu.info("vertexText"+i);const e={isNode:n,label:vS(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t?t.replace("fill:","color:"):t};return await jA(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",t.replace("color:","fill:"));let n=[];n="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(const t of n){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),r?n.setAttribute("class","title-row"):n.setAttribute("class","row"),n.textContent=t.trim(),e.appendChild(n)}return e}},"createLabel"),DA=mu((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD"),OA=mu(async(e,t)=>{bu.info("Creating subgraph rect for ",t.id,t);const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=AC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=ip(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),f=await ST(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let g=f.getBBox();if(ip(r.flowchart.htmlLabels)){const e=f.children[0],t=fg(f);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-m/2,b=t.y-y/2;let v;if(bu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=SA(h),r=PC(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:i}),n=e.path(DA(x,b,m,y,0),r);v=h.insert(()=>(bu.debug("Rough node insert CXC",n),n),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",u.join(";").replace("fill","stroke"))}else v=h.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=wC(r);if(p.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=v.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return BA(t,e)},{cluster:h,labelBBox:g}},"rect"),FA=mu((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,o=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const a=n.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(e){return BA(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),RA=mu(async(e,t)=>{const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:s,nodeBorder:l}=n,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),u=c.insert("g",":first-child"),h=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const p=h.node().appendChild(await NA(t.label,t.labelStyle,void 0,!0));let f=p.getBBox();if(ip(r.flowchart.htmlLabels)){const e=p.children[0],t=fg(p);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const g=0*t.padding,m=g/2,y=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+g;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height+g,b=t.height+g-f.height-6,v=t.x-y/2,C=t.y-x/2;t.width=y;const w=t.y-t.height/2-m+f.height+2;let k;if("handDrawn"===t.look){const e=t.cssClasses.includes("statediagram-cluster-alt"),r=SA(c),n=t.rx||t.ry?r.path(DA(v,C,y,x,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:i}):r.rectangle(v,C,y,x,{seed:i});k=c.insert(()=>n,":first-child");const u=r.rectangle(v,w,y,b,{fill:e?o:a,fillStyle:e?"hachure":"solid",stroke:l,seed:i});k=c.insert(()=>n,":first-child"),d=c.insert(()=>u)}else{k=u.insert("rect",":first-child");const e="outer";k.attr("class",e).attr("x",v).attr("y",C).attr("width",y).attr("height",x).attr("data-look",t.look),d.attr("class","inner").attr("x",v).attr("y",w).attr("width",y).attr("height",b)}h.attr("transform",`translate(${t.x-f.width/2}, ${C+1-(ip(r.flowchart.htmlLabels)?0:3)})`);const S=k.node().getBBox();return t.height=S.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(e){return BA(t,e)},{cluster:c,labelBBox:f}},"roundedWithTitle"),$A=mu(async(e,t)=>{bu.info("Creating subgraph rect for ",t.id,t);const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=AC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=ip(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),f=await ST(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let g=f.getBBox();if(ip(r.flowchart.htmlLabels)){const e=f.children[0],t=fg(f);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-m/2,b=t.y-y/2;let v;if(bu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=SA(h),r=PC(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:i}),n=e.path(DA(x,b,m,y,t.rx),r);v=h.insert(()=>(bu.debug("Rough node insert CXC",n),n),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",u.join(";").replace("fill","stroke"))}else v=h.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=wC(r);if(p.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=v.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return BA(t,e)},{cluster:h,labelBBox:g}},"kanbanSection"),zA={rect:OA,squareRect:OA,roundedWithTitle:RA,noteGroup:FA,divider:mu((e,t)=>{const r=$p(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:o}=n,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const u=t.height+l,h=t.x-c/2,d=t.y-u/2;let p;if(t.width=c,"handDrawn"===t.look){const e=SA(a).rectangle(h,d,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:i});p=a.insert(()=>e,":first-child")}else{p=s.insert("rect",":first-child");const e="divider";p.attr("class",e).attr("x",h).attr("y",d).attr("width",c).attr("height",u).attr("data-look",t.look)}const f=p.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return BA(t,e)},{cluster:a,labelBBox:{}}},"divider"),kanbanSection:$A},VA=new Map,WA=mu(async(e,t)=>{const r=t.shape||"rect",n=await zA[r](e,t);return VA.set(t.id,n),n},"insertCluster"),HA=mu(()=>{VA=new Map},"clear");function qA(e,t){return e.intersect(t)}mu(qA,"intersectNode");var UA=qA;function GA(e,t,r,n){var i=e.x,o=e.y,a=i-n.x,s=o-n.y,l=Math.sqrt(t*t*s*s+r*r*a*a),c=Math.abs(t*r*a/l);n.x<i&&(c=-c);var u=Math.abs(t*r*s/l);return n.y<o&&(u=-u),{x:i+c,y:o+u}}mu(GA,"intersectEllipse");var XA=GA;function JA(e,t,r){return XA(e,t,t,r)}mu(JA,"intersectCircle");var YA=JA;function ZA(e,t,r,n){{const i=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,s=i*r.x+o*r.y+a,l=i*n.x+o*n.y+a,c=1e-6;if(0!==s&&0!==l&&KA(s,l))return;const u=n.y-r.y,h=r.x-n.x,d=n.x*r.y-r.x*n.y,p=u*e.x+h*e.y+d,f=u*t.x+h*t.y+d;if(Math.abs(p)<c&&Math.abs(f)<c&&KA(p,f))return;const g=i*h-u*o;if(0===g)return;const m=Math.abs(g/2);let y=o*d-h*a;const x=y<0?(y-m)/g:(y+m)/g;y=u*a-i*d;return{x:x,y:y<0?(y-m)/g:(y+m)/g}}}function KA(e,t){return e*t>0}mu(ZA,"intersectLine"),mu(KA,"sameSign");var QA=ZA;function eP(e,t,r){let n=e.x,i=e.y,o=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof t.forEach?t.forEach(function(e){a=Math.min(a,e.x),s=Math.min(s,e.y)}):(a=Math.min(a,t.x),s=Math.min(s,t.y));let l=n-e.width/2-a,c=i-e.height/2-s;for(let u=0;u<t.length;u++){let n=t[u],i=t[u<t.length-1?u+1:0],a=QA(e,r,{x:l+n.x,y:c+n.y},{x:l+i.x,y:c+i.y});a&&o.push(a)}return o.length?(o.length>1&&o.sort(function(e,t){let n=e.x-r.x,i=e.y-r.y,o=Math.sqrt(n*n+i*i),a=t.x-r.x,s=t.y-r.y,l=Math.sqrt(a*a+s*s);return o<l?-1:o===l?0:1}),o[0]):e}mu(eP,"intersectPolygon");var tP={node:UA,circle:YA,ellipse:XA,polygon:eP,rect:BA};function rP(e,t){const{labelStyles:r}=AC(t);t.labelStyle=r;const n=PA(t);let i=n;n||(i="anchor");const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),{cssStyles:a}=t,s=SA(o),l=PC(t,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==t.look&&(l.roughness=0);const c=s.circle(0,0,2,l),u=o.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",wS(a)),AA(t,u),t.intersect=function(e){return bu.info("Circle intersect",t,1,e),tP.circle(t,1,e)},o}function nP(e,t,r,n,i,o,a){const s=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),u=(r-e)/2/i,h=(n-t)/2/o,d=Math.sqrt(u**2+h**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*o*Math.sin(c)*(a?-1:1),g=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-g)/o,(e-f)/i);let y=Math.atan2((n-g)/o,(r-f)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const e=m+b/19*y,t=f+i*Math.cos(e),r=g+o*Math.sin(e);x.push({x:t,y:r})}return x}async function iP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.width+t.padding+20,s=o.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:u}=t,h=[{x:a/2,y:-s/2},{x:-a/2,y:-s/2},...nP(-a/2,-s/2,-a/2,s/2,c,l,!1),{x:a/2,y:s/2},...nP(a/2,s/2,a/2,-s/2,c,l,!0)],d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=EA(h),g=d.path(f,p),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),AA(t,m),t.intersect=function(e){return tP.polygon(t,h,e)},i}function oP(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function aP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.height+t.padding,s=o.width+t.padding+12,l=-a,c=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let u;const{cssStyles:h}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(c),o=e.path(n,r);u=i.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${a/2})`),h&&u.attr("style",h)}else u=oP(i,s,a,c);return n&&u.attr("style",n),AA(t,u),t.intersect=function(e){return tP.polygon(t,c,e)},i}function sP(e,t){const{nodeStyles:r}=AC(t);t.label="";const n=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],s=SA(n),l=PC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=EA(a),u=s.path(c,l),h=n.insert(()=>u,":first-child");return i&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",i),r&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return tP.polygon(t,a,e)},n}async function lP(e,t,r){const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,halfPadding:s}=await _A(e,t,PA(t)),l=(null==r?void 0:r.padding)??s,c=a.width/2+l;let u;const{cssStyles:h}=t;if("handDrawn"===t.look){const e=SA(o),r=PC(t,{}),n=e.circle(0,0,2*c,r);u=o.insert(()=>n,":first-child"),u.attr("class","basic label-container").attr("style",wS(h))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0);return AA(t,u),t.calcIntersect=function(e,t){const r=e.width/2;return tP.circle(e,r,t)},t.intersect=function(e){return bu.info("Circle intersect",t,c,e),tP.circle(t,c,e)},o}function cP(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=2*e;return`M ${-n/2*t},${n/2*r} L ${n/2*t},${-n/2*r}\n M ${n/2*t},${n/2*r} L ${-n/2*t},${-n/2*r}`}function uP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r,t.label="";const i=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),o=Math.max(30,(null==t?void 0:t.width)??0),{cssStyles:a}=t,s=SA(i),l=PC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,2*o,l),u=cP(o),h=s.path(u,l),d=i.insert(()=>c,":first-child");return d.insert(()=>h),a&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",a),n&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",n),AA(t,d),t.intersect=function(e){bu.info("crossedCircle intersect",t,{radius:o,point:e});return tP.circle(t,o,e)},i}function hP(e,t,r,n=100,i=0,o=180){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:-i,y:-o})}return a}async function dP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...hP(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...hP(s/2+2*c,-c,c,20,-180,-270),...hP(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...hP(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...hP(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...hP(s/2+.1*s,-c,c,20,-180,-270),...hP(s/2+.1*s,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...hP(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=SA(i),f=PC(t,{fill:"none"});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=EA(h).replace("Z",""),m=p.path(g,f),y=EA(d),x=p.path(y,{...f}),b=i.insert("g",":first-child");return b.insert(()=>x,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${c}, 0)`),a.attr("transform",`translate(${-s/2+c-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,b),t.intersect=function(e){return tP.polygon(t,d,e)},i}function pP(e,t,r,n=100,i=0,o=180){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:i,y:o})}return a}async function fP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...pP(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...pP(s/2+2*c,-c,c,20,-180,-270),...pP(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...pP(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...pP(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...pP(s/2+2*c,-c,c,20,-180,-270),...pP(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...pP(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=SA(i),f=PC(t,{fill:"none"});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=EA(h).replace("Z",""),m=p.path(g,f),y=EA(d),x=p.path(y,{...f}),b=i.insert("g",":first-child");return b.insert(()=>x,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-c}, 0)`),a.attr("transform",`translate(${-s/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,b),t.intersect=function(e){return tP.polygon(t,d,e)},i}function gP(e,t,r,n=100,i=0,o=180){const a=[],s=i*Math.PI/180,l=(o*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=e+r*Math.cos(n),o=t+r*Math.sin(n);a.push({x:-i,y:-o})}return a}async function mP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...gP(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...gP(s/2+2*c,-c,c,20,-180,-270),...gP(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...gP(s/2,l/2,c,20,0,90)],d=[...gP(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...gP(-s/2-c/2,-c,c,20,0,90),...gP(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...gP(-s/2+c+c/2,l/2,c,30,-180,-270)],p=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...gP(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...gP(s/2+2*c,-c,c,20,-180,-270),...gP(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...gP(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...gP(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...gP(-s/2-c/2,-c,c,20,0,90),...gP(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...gP(-s/2+c+c/2,l/2,c,30,-180,-270)],f=SA(i),g=PC(t,{fill:"none"});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=EA(h).replace("Z",""),y=f.path(m,g),x=EA(d).replace("Z",""),b=f.path(x,g),v=EA(p),C=f.path(v,{...g}),w=i.insert("g",":first-child");return w.insert(()=>C,":first-child").attr("stroke-opacity",0),w.insert(()=>y,":first-child"),w.insert(()=>b,":first-child"),w.attr("class","text"),u&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(${c-c/4}, 0)`),a.attr("transform",`translate(${-s/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,w),t.intersect=function(e){return tP.polygon(t,p,e)},i}async function yP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(80,1.25*(o.width+2*(t.padding??0)),(null==t?void 0:t.width)??0),s=Math.max(20,o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=s/2,{cssStyles:c}=t,u=SA(i),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=a-l,p=s/4,f=[{x:d,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:d,y:s},...IA(-d,-s/2,l,50,270,90)],g=EA(f),m=u.path(g,h),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-a/2}, ${-s/2})`),AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}mu(rP,"anchor"),mu(nP,"generateArcPoints"),mu(iP,"bowTieRect"),mu(oP,"insertPolygonShape"),mu(aP,"card"),mu(sP,"choice"),mu(lP,"circle"),mu(cP,"createLine"),mu(uP,"crossedCircle"),mu(hP,"generateCirclePoints"),mu(dP,"curlyBraceLeft"),mu(pP,"generateCirclePoints"),mu(fP,"curlyBraceRight"),mu(gP,"generateCirclePoints"),mu(mP,"curlyBraces"),mu(yP,"curvedTrapezoid");var xP=mu((e,t,r,n,i,o)=>[`M${e},${t+o}`,`a${i},${o} 0,0,0 ${r},0`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),bP=mu((e,t,r,n,i,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),vP=mu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function CP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),u=Math.max(o.height+c+t.padding,t.height??0);let h;const{cssStyles:d}=t;if("handDrawn"===t.look){const e=SA(i),r=bP(0,0,s,u,l,c),n=vP(0,c,s,u,l,c),o=e.path(r,PC(t,{})),a=e.path(n,PC(t,{fill:"none"}));h=i.insert(()=>a,":first-child"),h=i.insert(()=>o,":first-child"),h.attr("class","basic label-container"),d&&h.attr("style",d)}else{const e=xP(0,0,s,u,l,c);h=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wS(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),AA(t,h),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(t.padding??0)/1.5-(o.y-(o.top??0))})`),t.intersect=function(e){const r=tP.rect(t,e),n=r.x-(t.x??0);if(0!=l&&(Math.abs(n)<(t.width??0)/2||Math.abs(n)==(t.width??0)/2&&Math.abs(r.y-(t.y??0))>(t.height??0)/2-c)){let i=c*c*(1-n*n/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,e.y-(t.y??0)>0&&(i=-i),r.y+=i}return r},i}async function wP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+t.padding,l=o.height+t.padding,c=.2*l,u=-s/2,h=-l/2-c/2,{cssStyles:d}=t,p=SA(i),f=PC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:u,y:h+c},{x:-u,y:h+c},{x:-u,y:-h},{x:u,y:-h},{x:u,y:h},{x:-u,y:h},{x:-u,y:h+c}],m=p.polygon(g.map(e=>[e.x,e.y]),f),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),a.attr("transform",`translate(${u+(t.padding??0)/2-(o.x-(o.left??0))}, ${h+c+(t.padding??0)/2-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.rect(t,e)},i}async function kP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=AC(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:l}=await _A(e,t,PA(t)),c=s.width/2+l+5,u=s.width/2+l;let h;const{cssStyles:d}=t;if("handDrawn"===t.look){const e=SA(a),i=PC(t,{roughness:.2,strokeWidth:2.5}),o=PC(t,{roughness:.2,strokeWidth:1.5}),s=e.circle(0,0,2*c,i),l=e.circle(0,0,2*u,o);h=a.insert("g",":first-child"),h.attr("class",wS(t.cssClasses)).attr("style",wS(d)),null==(r=h.node())||r.appendChild(s),null==(n=h.node())||n.appendChild(l)}else{h=a.insert("g",":first-child");const e=h.insert("circle",":first-child"),t=h.insert("circle");h.attr("class","basic label-container").attr("style",o),e.attr("class","outer-circle").attr("style",o).attr("r",c).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",o).attr("r",u).attr("cx",0).attr("cy",0)}return AA(t,h),t.intersect=function(e){return bu.info("DoubleCircle intersect",t,c,e),tP.circle(t,c,e)},a}function SP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=AC(t);t.label="",t.labelStyle=n;const o=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=SA(o),{nodeBorder:l}=r,c=PC(t,{fillStyle:"solid"});"handDrawn"!==t.look&&(c.roughness=0);const u=s.circle(0,0,14,c),h=o.insert(()=>u,":first-child");return h.selectAll("path").attr("style",`fill: ${l} !important;`),a&&a.length>0&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",a),i&&"handDrawn"!==t.look&&h.selectAll("path").attr("style",i),AA(t,h),t.intersect=function(e){bu.info("filledCircle intersect",t,{radius:7,point:e});return tP.circle(t,7,e)},o}async function _P(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=o.width+(t.padding??0),l=s+o.height,c=s+o.height,u=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=EA(u),g=d.path(f,p),m=i.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return h&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),t.width=s,t.height=l,AA(t,m),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-l/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(e){return bu.info("Triangle intersect",t,u,e),tP.polygon(t,u,e)},i}function TP(e,t,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:o}=AC(t);t.label="";const a=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(null==t?void 0:t.width)??0),c=Math.max(10,(null==t?void 0:t.height)??0);"LR"===r&&(l=Math.max(10,(null==t?void 0:t.width)??0),c=Math.max(70,(null==t?void 0:t.height)??0));const u=-1*l/2,h=-1*c/2,d=SA(a),p=PC(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=d.rectangle(u,h,l,c,p),g=a.insert(()=>f,":first-child");s&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",s),o&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",o),AA(t,g);const m=(null==n?void 0:n.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(e){return tP.rect(t,e)},a}async function AP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(80,o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(50,o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=s/2,{cssStyles:c}=t,u=SA(i),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-a/2,y:-s/2},{x:a/2-l,y:-s/2},...IA(-a/2+l,0,l,50,90,270),{x:a/2-l,y:s/2},{x:-a/2,y:s/2}],p=EA(d),f=u.path(p,h),g=i.insert(()=>f,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",n),AA(t,g),t.intersect=function(e){bu.info("Pill intersect",t,{radius:l,point:e});return tP.polygon(t,d,e)},i}async function PP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.height+(t.padding??0),s=o.width+2.5*(t.padding??0),{cssStyles:l}=t,c=SA(i),u=PC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let h=s/2;h+=h/6;const d=a/2,p=h-d/2,f=[{x:-p,y:-d},{x:0,y:-d},{x:p,y:-d},{x:h,y:0},{x:p,y:d},{x:0,y:d},{x:-p,y:d},{x:-h,y:0}],g=EA(f),m=c.path(g,u),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",l),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),t.width=s,t.height=a,AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function EP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.label="",t.labelStyle=r;const{shapeSvg:i}=await _A(e,t,PA(t)),o=Math.max(30,(null==t?void 0:t.width)??0),a=Math.max(30,(null==t?void 0:t.height)??0),{cssStyles:s}=t,l=SA(i),c=PC(t,{});"handDrawn"!==t.look&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],h=EA(u),d=l.path(h,c),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",s),n&&"handDrawn"!==t.look&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-o/2}, ${-a/2})`),AA(t,p),t.intersect=function(e){bu.info("Pill intersect",t,{points:u});return tP.polygon(t,u,e)},i}async function MP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,label:h}=await _A(e,t,"icon-shape default"),d="t"===t.pos,p=s,f=s,{nodeBorder:g}=r,{stylesMap:m}=SC(t),y=-f/2,x=-p/2,b=t.label?8:0,v=SA(c),C=PC(t,{stroke:"none",fill:"none"});"handDrawn"!==t.look&&(C.roughness=0,C.fillStyle="solid");const w=v.rectangle(y,x,f,p,C),k=Math.max(f,u.width),S=p+u.height+b,_=v.rectangle(-k/2,-S/2,k,S,{...C,fill:"transparent",stroke:"none"}),T=c.insert(()=>w,":first-child"),A=c.insert(()=>_);if(t.icon){const e=c.append("g");e.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=e.node().getBBox(),n=r.width,i=r.height,o=r.x,a=r.y;e.attr("transform",`translate(${-n/2-o},${d?u.height/2+b/2-i/2-a:-u.height/2-b/2-i/2-a})`),e.attr("style",`color: ${m.get("stroke")??g};`)}return h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-S/2:S/2-u.height})`),T.attr("transform",`translate(0,${d?u.height/2+b/2:-u.height/2-b/2})`),AA(t,A),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=d?[{x:r-u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2+u.height+b},{x:r+f/2,y:n-i/2+u.height+b},{x:r+f/2,y:n+i/2},{x:r-f/2,y:n+i/2},{x:r-f/2,y:n-i/2+u.height+b},{x:r-u.width/2,y:n-i/2+u.height+b}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+p},{x:r+u.width/2,y:n-i/2+p},{x:r+u.width/2/2,y:n+i/2},{x:r-u.width/2,y:n+i/2},{x:r-u.width/2,y:n-i/2+p},{x:r-f/2,y:n-i/2+p}];return tP.polygon(t,o,e)},c}async function IP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,label:h}=await _A(e,t,"icon-shape default"),d=t.label?8:0,p="t"===t.pos,{nodeBorder:f,mainBkg:g}=r,{stylesMap:m}=SC(t),y=SA(c),x=PC(t,{});"handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid");const b=m.get("fill");x.stroke=b??g;const v=c.append("g");t.icon&&v.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=v.node().getBBox(),w=C.width,k=C.height,S=C.x,_=C.y,T=Math.max(w,k)*Math.SQRT2+40,A=y.circle(0,0,T,x),P=Math.max(T,u.width),E=T+u.height+d,M=y.rectangle(-P/2,-E/2,P,E,{...x,fill:"transparent",stroke:"none"}),I=c.insert(()=>A,":first-child"),B=c.insert(()=>M);return v.attr("transform",`translate(${-w/2-S},${p?u.height/2+d/2-k/2-_:-u.height/2-d/2-k/2-_})`),v.attr("style",`color: ${m.get("stroke")??f};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-E/2:E/2-u.height})`),I.attr("transform",`translate(0,${p?u.height/2+d/2:-u.height/2-d/2})`),AA(t,B),t.intersect=function(e){bu.info("iconSquare intersect",t,e);return tP.rect(t,e)},c}async function BP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await _A(e,t,"icon-shape default"),p="t"===t.pos,f=s+2*h,g=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=SC(t),b=-g/2,v=-f/2,C=t.label?8:0,w=SA(c),k=PC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=x.get("fill");k.stroke=S??y;const _=w.path(DA(b,v,g,f,5),k),T=Math.max(g,u.width),A=f+u.height+C,P=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),E=c.insert(()=>_,":first-child").attr("class","icon-shape2"),M=c.insert(()=>P);if(t.icon){const e=c.append("g");e.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=e.node().getBBox(),n=r.width,i=r.height,o=r.x,a=r.y;e.attr("transform",`translate(${-n/2-o},${p?u.height/2+C/2-i/2-a:-u.height/2-C/2-i/2-a})`),e.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),E.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),AA(t,M),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=p?[{x:r-u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2+u.height+C},{x:r+g/2,y:n-i/2+u.height+C},{x:r+g/2,y:n+i/2},{x:r-g/2,y:n+i/2},{x:r-g/2,y:n-i/2+u.height+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/2,y:n-i/2+f},{x:r+u.width/2,y:n-i/2+f},{x:r+u.width/2/2,y:n+i/2},{x:r-u.width/2,y:n+i/2},{x:r-u.width/2,y:n-i/2+f},{x:r-g/2,y:n-i/2+f}];return tP.polygon(t,o,e)},c}async function LP(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=AC(t);t.labelStyle=i;const o=t.assetHeight??48,a=t.assetWidth??48,s=Math.max(o,a),l=null==n?void 0:n.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await _A(e,t,"icon-shape default"),p="t"===t.pos,f=s+2*h,g=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=SC(t),b=-g/2,v=-f/2,C=t.label?8:0,w=SA(c),k=PC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=x.get("fill");k.stroke=S??y;const _=w.path(DA(b,v,g,f,.1),k),T=Math.max(g,u.width),A=f+u.height+C,P=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),E=c.insert(()=>_,":first-child"),M=c.insert(()=>P);if(t.icon){const e=c.append("g");e.html(`<g>${await sT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=e.node().getBBox(),n=r.width,i=r.height,o=r.x,a=r.y;e.attr("transform",`translate(${-n/2-o},${p?u.height/2+C/2-i/2-a:-u.height/2-C/2-i/2-a})`),e.attr("style",`color: ${x.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),E.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),AA(t,M),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=p?[{x:r-u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2},{x:r+u.width/2,y:n-i/2+u.height+C},{x:r+g/2,y:n-i/2+u.height+C},{x:r+g/2,y:n+i/2},{x:r-g/2,y:n+i/2},{x:r-g/2,y:n-i/2+u.height+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/2,y:n-i/2+f},{x:r+u.width/2,y:n-i/2+f},{x:r+u.width/2/2,y:n+i/2},{x:r-u.width/2,y:n+i/2},{x:r-u.width/2,y:n-i/2+f},{x:r-g/2,y:n-i/2+f}];return tP.polygon(t,o,e)},c}async function jP(e,t,{config:{flowchart:r}}){const n=new Image;n.src=(null==t?void 0:t.img)??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/o;const{labelStyles:a}=AC(t);t.labelStyle=a;const s=null==r?void 0:r.wrappingWidth;t.defaultWidth=null==r?void 0:r.wrappingWidth;const l=Math.max(t.label?s??0:0,(null==t?void 0:t.assetWidth)??i),c="on"===t.constraint&&(null==t?void 0:t.assetHeight)?t.assetHeight*t.imageAspectRatio:l,u="on"===t.constraint?c/t.imageAspectRatio:(null==t?void 0:t.assetHeight)??o;t.width=Math.max(c,s??0);const{shapeSvg:h,bbox:d,label:p}=await _A(e,t,"image-shape default"),f="t"===t.pos,g=-c/2,m=-u/2,y=t.label?8:0,x=SA(h),b=PC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=x.rectangle(g,m,c,u,b),C=Math.max(c,d.width),w=u+d.height+y,k=x.rectangle(-C/2,-w/2,C,w,{...b,fill:"none",stroke:"none"}),S=h.insert(()=>v,":first-child"),_=h.insert(()=>k);if(t.img){const e=h.append("image");e.attr("href",t.img),e.attr("width",c),e.attr("height",u),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-c/2},${f?w/2-u:-w/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${f?-u/2-d.height/2-y/2:u/2-d.height/2+y/2})`),S.attr("transform",`translate(0,${f?d.height/2+y/2:-d.height/2-y/2})`),AA(t,_),t.intersect=function(e){if(bu.info("iconSquare intersect",t,e),!t.label)return tP.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=f?[{x:r-d.width/2,y:n-i/2},{x:r+d.width/2,y:n-i/2},{x:r+d.width/2,y:n-i/2+d.height+y},{x:r+c/2,y:n-i/2+d.height+y},{x:r+c/2,y:n+i/2},{x:r-c/2,y:n+i/2},{x:r-c/2,y:n-i/2+d.height+y},{x:r-d.width/2,y:n-i/2+d.height+y}]:[{x:r-c/2,y:n-i/2},{x:r+c/2,y:n-i/2},{x:r+c/2,y:n-i/2+u},{x:r+d.width/2,y:n-i/2+u},{x:r+d.width/2/2,y:n+i/2},{x:r-d.width/2,y:n+i/2},{x:r-d.width/2,y:n-i/2+u},{x:r-c/2,y:n-i/2+u}];return tP.polygon(t,o,e)},h}async function NP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=[{x:0,y:0},{x:a,y:0},{x:a+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}async function DP(e,t,r){const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a}=await _A(e,t,PA(t)),s=Math.max(a.width+2*r.labelPaddingX,(null==t?void 0:t.width)||0),l=Math.max(a.height+2*r.labelPaddingY,(null==t?void 0:t.height)||0),c=-s/2,u=-l/2;let h,{rx:d,ry:p}=t;const{cssStyles:f}=t;if((null==r?void 0:r.rx)&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===t.look){const e=SA(o),r=PC(t,{}),n=d||p?e.path(DA(c,u,s,l,d||0),r):e.rectangle(c,u,s,l,r);h=o.insert(()=>n,":first-child"),h.attr("class","basic label-container").attr("style",wS(f))}else h=o.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",wS(d)).attr("ry",wS(p)).attr("x",c).attr("y",u).attr("width",s).attr("height",l);return AA(t,h),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return tP.rect(t,e)},o}async function OP(e,t){const{shapeSvg:r,bbox:n,label:i}=await _A(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),AA(t,o),t.intersect=function(e){return tP.rect(t,e)},r}async function FP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+(t.padding??0),(null==t?void 0:t.height)??0),l=[{x:0,y:0},{x:a+3*s/6,y:0},{x:a,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}async function RP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+(t.padding??0),(null==t?void 0:t.height)??0),l=[{x:-3*s/6,y:0},{x:a,y:0},{x:a+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}function $P(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.label="",t.labelStyle=r;const i=e.insert("g").attr("class",PA(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,(null==t?void 0:t.width)??0),s=Math.max(35,(null==t?void 0:t.height)??0),l=[{x:a,y:0},{x:0,y:s+3.5},{x:a-14,y:s+3.5},{x:0,y:2*s},{x:a,y:s-3.5},{x:14,y:s-3.5}],c=SA(i),u=PC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");const h=EA(l),d=c.path(h,u),p=i.insert(()=>d,":first-child");return o&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",o),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${a/2},${-s})`),AA(t,p),t.intersect=function(e){bu.info("lightningBolt intersect",t,e);return tP.polygon(t,l,e)},i}mu(CP,"cylinder"),mu(wP,"dividedRectangle"),mu(kP,"doublecircle"),mu(SP,"filledCircle"),mu(_P,"flippedTriangle"),mu(TP,"forkJoin"),mu(AP,"halfRoundedRectangle"),mu(PP,"hexagon"),mu(EP,"hourglass"),mu(MP,"icon"),mu(IP,"iconCircle"),mu(BP,"iconRounded"),mu(LP,"iconSquare"),mu(jP,"imageSquare"),mu(NP,"inv_trapezoid"),mu(DP,"drawRect"),mu(OP,"labelRect"),mu(FP,"lean_left"),mu(RP,"lean_right"),mu($P,"lightningBolt");var zP=mu((e,t,r,n,i,o,a)=>[`M${e},${t+o}`,`a${i},${o} 0,0,0 ${r},0`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n,`M${e},${t+o+a}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),VP=mu((e,t,r,n,i,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${i},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${o} 0,0,0 ${r},0`,"l0,"+-n,`M${e},${t+o+a}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),WP=mu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function HP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),u=Math.max(o.height+c+(t.padding??0),t.height??0),h=.1*u;let d;const{cssStyles:p}=t;if("handDrawn"===t.look){const e=SA(i),r=VP(0,0,s,u,l,c,h),n=WP(0,c,s,u,l,c),o=PC(t,{}),a=e.path(r,o),f=e.path(n,o);i.insert(()=>f,":first-child").attr("class","line"),d=i.insert(()=>a,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const e=zP(0,0,s,u,l,c,h);d=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wS(p)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),AA(t,d),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+c-(o.y-(o.top??0))})`),t.intersect=function(e){const r=tP.rect(t,e),n=r.x-(t.x??0);if(0!=l&&(Math.abs(n)<(t.width??0)/2||Math.abs(n)==(t.width??0)/2&&Math.abs(r.y-(t.y??0))>(t.height??0)/2-c)){let i=c*c*(1-n*n/(l*l));i>0&&(i=Math.sqrt(i)),i=c-i,e.y-(t.y??0)>0&&(i=-i),r.y+=i}return r},i}async function qP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/4,u=l+c,{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=[{x:-s/2-s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:u/2},...MA(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,c,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2},{x:-s/2,y:-u/2},{x:-s/2,y:u/2*1.1},{x:-s/2,y:-u/2}],g=d.polygon(f.map(e=>[e.x,e.y]),p),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),AA(t,m),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function UP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=-s/2,u=-l/2,{cssStyles:h}=t,d=SA(i),p=PC(t,{}),f=[{x:c-5,y:u+5},{x:c-5,y:u+l+5},{x:c+s-5,y:u+l+5},{x:c+s-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u+l-5},{x:c+s+5,y:u+l-5},{x:c+s+5,y:u-5},{x:c+5,y:u-5},{x:c+5,y:u},{x:c,y:u},{x:c,y:u+5}],g=[{x:c,y:u+5},{x:c+s-5,y:u+5},{x:c+s-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u},{x:c,y:u}];"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const m=EA(f),y=d.path(m,p),x=EA(g),b=d.path(x,{...p,fill:"none"}),v=i.insert(()=>b,":first-child");return v.insert(()=>y,":first-child"),v.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),a.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),AA(t,v),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function GP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/4,u=l+c,h=-s/2,d=-u/2,{cssStyles:p}=t,f=MA(h-5,d+u+5,h+s-5,d+u+5,c,.8),g=null==f?void 0:f[f.length-1],m=[{x:h-5,y:d+5},{x:h-5,y:d+u+5},...f,{x:h+s-5,y:g.y-5},{x:h+s,y:g.y-5},{x:h+s,y:g.y-10},{x:h+s+5,y:g.y-10},{x:h+s+5,y:d-5},{x:h+5,y:d-5},{x:h+5,y:d},{x:h,y:d},{x:h,y:d+5}],y=[{x:h,y:d+5},{x:h+s-5,y:d+5},{x:h+s-5,y:g.y-5},{x:h+s,y:g.y-5},{x:h+s,y:d},{x:h,y:d}],x=SA(i),b=PC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=EA(m),C=x.path(v,b),w=EA(y),k=x.path(w,b),S=i.insert(()=>C,":first-child");return S.insert(()=>k),S.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-c/2-(o.y-(o.top??0))})`),AA(t,S),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function XP(e,t,{config:{themeVariables:r}}){var n;const{labelStyles:i,nodeStyles:o}=AC(t);t.labelStyle=i;t.useHtmlLabels||!1!==(null==(n=Dd().flowchart)?void 0:n.htmlLabels)||(t.centerLabel=!0);const{shapeSvg:a,bbox:s,label:l}=await _A(e,t,PA(t)),c=Math.max(s.width+2*(t.padding??0),(null==t?void 0:t.width)??0),u=Math.max(s.height+2*(t.padding??0),(null==t?void 0:t.height)??0),h=-c/2,d=-u/2,{cssStyles:p}=t,f=SA(a),g=PC(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=f.rectangle(h,d,c,u,g),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",p),o&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",o),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),AA(t,y),t.intersect=function(e){return tP.rect(t,e)},a}mu(HP,"linedCylinder"),mu(qP,"linedWaveEdgedRect"),mu(UP,"multiRect"),mu(GP,"multiWaveEdgedRectangle"),mu(XP,"note");var JP=mu((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function YP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.width+t.padding+(o.height+t.padding),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];let l;const{cssStyles:c}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=JP(0,0,a),o=e.path(n,r);l=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2+.5}, ${a/2})`),c&&l.attr("style",c)}else l=oP(i,a,a,s),l.attr("transform",`translate(${-a/2+.5}, ${a/2})`);return n&&l.attr("style",n),AA(t,l),t.calcIntersect=function(e,t){const r=e.width,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],i=tP.polygon(e,n,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}async function ZP(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=-Math.max(o.width+(t.padding??0),(null==t?void 0:t.width)??0)/2,l=-Math.max(o.height+(t.padding??0),(null==t?void 0:t.height)??0)/2,c=l/2,u=[{x:s+c,y:l},{x:s,y:0},{x:s+c,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=EA(u),g=d.path(f,p),m=i.insert(()=>g,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${-c/2},0)`),a.attr("transform",`translate(${-c/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),AA(t,m),t.intersect=function(e){return tP.polygon(t,u,e)},i}async function KP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=AC(t);let a;t.labelStyle=i,a=t.cssClasses?"node "+t.cssClasses:"node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("g"),c=s.insert("g").attr("class","label").attr("style",o),u=t.description,h=t.label,d=c.node().appendChild(await NA(h,t.labelStyle,!0,!0));let p={width:0,height:0};if(ip(null==(n=null==(r=$p())?void 0:r.flowchart)?void 0:n.htmlLabels)){const e=d.children[0],t=fg(d);p=e.getBoundingClientRect(),t.attr("width",p.width),t.attr("height",p.height)}bu.info("Text 2",u);const f=u||[],g=d.getBBox(),m=c.node().appendChild(await NA(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0)),y=m.children[0],x=fg(m);p=y.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(t.padding||0)/2;fg(m).attr("transform","translate( "+(p.width>g.width?0:(g.width-p.width)/2)+", "+(g.height+b+5)+")"),fg(d).attr("transform","translate( "+(p.width<g.width?0:-(g.width-p.width)/2)+", 0)"),p=c.node().getBBox(),c.attr("transform","translate("+-p.width/2+", "+(-p.height/2-b+3)+")");const v=p.width+(t.padding||0),C=p.height+(t.padding||0),w=-p.width/2-b,k=-p.height/2-b;let S,_;if("handDrawn"===t.look){const e=SA(s),r=PC(t,{}),n=e.path(DA(w,k,v,C,t.rx||0),r),i=e.line(-p.width/2-b,-p.height/2-b+g.height+b,p.width/2+b,-p.height/2-b+g.height+b,r);_=s.insert(()=>(bu.debug("Rough node insert CXC",n),i),":first-child"),S=s.insert(()=>(bu.debug("Rough node insert CXC",n),n),":first-child")}else S=l.insert("rect",":first-child"),_=l.insert("line"),S.attr("class","outer title-state").attr("style",o).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(t.padding||0)).attr("height",p.height+(t.padding||0)),_.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+g.height+b).attr("y2",-p.height/2-b+g.height+b);return AA(t,S),t.intersect=function(e){return tP.rect(t,e)},s}function QP(e,t,r,n,i,o,a){const s=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),u=(r-e)/2/i,h=(n-t)/2/o,d=Math.sqrt(u**2+h**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*o*Math.sin(c)*(a?-1:1),g=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-g)/o,(e-f)/i);let y=Math.atan2((n-g)/o,(r-f)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const e=m+b/19*y,t=f+i*Math.cos(e),r=g+o*Math.sin(e);x.push({x:t,y:r})}return x}async function eE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=(null==t?void 0:t.padding)??0,s=(null==t?void 0:t.padding)??0,l=((null==t?void 0:t.width)?null==t?void 0:t.width:o.width)+2*a,c=((null==t?void 0:t.height)?null==t?void 0:t.height:o.height)+2*s,u=t.radius||5,h=t.taper||5,{cssStyles:d}=t,p=SA(i),f=PC(t,{});t.stroke&&(f.stroke=t.stroke),"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...QP(l/2-h,-c/2,l/2,-c/2+h,u,u,!0),{x:l/2,y:-c/2+h},{x:l/2,y:c/2-h},...QP(l/2,c/2-h,l/2-h,c/2,u,u,!0),{x:l/2-h,y:c/2},{x:-l/2+h,y:c/2},...QP(-l/2+h,c/2,-l/2,c/2-h,u,u,!0),{x:-l/2,y:c/2-h},{x:-l/2,y:-c/2+h},...QP(-l/2,-c/2+h,-l/2+h,-c/2,u,u,!0)],m=EA(g),y=p.path(m,f),x=i.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),d&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",n),AA(t,x),t.intersect=function(e){return tP.polygon(t,g,e)},i}async function tE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=(null==t?void 0:t.padding)??0,l=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),u=-o.width/2-s,h=-o.height/2-s,{cssStyles:d}=t,p=SA(i),f=PC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:u,y:h},{x:u+l+8,y:h},{x:u+l+8,y:h+c},{x:u-8,y:h+c},{x:u-8,y:h},{x:u,y:h},{x:u,y:h+c}],m=p.polygon(g.map(e=>[e.x,e.y]),f),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container").attr("style",wS(d)),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),d&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),a.attr("transform",`translate(${-l/2+4+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.rect(t,e)},i}async function rE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=-s/2,u=-l/2,{cssStyles:h}=t,d=SA(i),p=PC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const f=[{x:c,y:u},{x:c,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-l/2}],g=EA(f),m=d.path(g,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",h),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))}, ${-l/4+(t.padding??0)-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function nE(e,t){return DP(e,t,{rx:0,ry:0,labelPaddingX:t.labelPaddingX??2*((null==t?void 0:t.padding)||0),labelPaddingY:1*((null==t?void 0:t.padding)||0)})}async function iE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.height+t.padding,s=o.width+a/4+t.padding,l=a/2,{cssStyles:c}=t,u=SA(i),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-s/2+l,y:-a/2},{x:s/2-l,y:-a/2},...IA(-s/2+l,0,l,50,90,270),{x:s/2-l,y:a/2},...IA(s/2-l,0,l,50,270,450)],p=EA(d),f=u.path(p,h),g=i.insert(()=>f,":first-child");return g.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",n),AA(t,g),t.intersect=function(e){return tP.polygon(t,d,e)},i}async function oE(e,t){return DP(e,t,{rx:5,ry:5})}function aE(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{cssStyles:o}=t,{lineColor:a,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),u=SA(c),h=PC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=u.circle(0,0,14,{...h,stroke:a,strokeWidth:2}),p=s??l,f=u.circle(0,0,5,{...h,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),g=c.insert(()=>d,":first-child");return g.insert(()=>f),o&&g.selectAll("path").attr("style",o),i&&g.selectAll("path").attr("style",i),AA(t,g),t.intersect=function(e){return tP.circle(t,7,e)},c}function sE(e,t,{config:{themeVariables:r}}){const{lineColor:n}=r,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if("handDrawn"===t.look){const e=SA(i).circle(0,0,14,kC(n));o=i.insert(()=>e),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=i.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return AA(t,o),t.intersect=function(e){return tP.circle(t,7,e)},i}async function lE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=((null==t?void 0:t.padding)||0)/2,s=o.width+t.padding,l=o.height+t.padding,c=-o.width/2-a,u=-o.height/2-a,h=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=e.rectangle(c-8,u,s+16,l,r),o=e.line(c,u,c,u+l,r),a=e.line(c+s,u,c+s,u+l,r);i.insert(()=>o,":first-child"),i.insert(()=>a,":first-child");const h=i.insert(()=>n,":first-child"),{cssStyles:d}=t;h.attr("class","basic label-container").attr("style",wS(d)),AA(t,h)}else{const e=oP(i,s,l,h);n&&e.attr("style",n),AA(t,e)}return t.intersect=function(e){return tP.polygon(t,h,e)},i}async function cE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=-a/2,c=-s/2,u=.2*s,h=.2*s,{cssStyles:d}=t,p=SA(i),f=PC(t,{}),g=[{x:l-u/2,y:c},{x:l+a+u/2,y:c},{x:l+a+u/2,y:c+s},{x:l-u/2,y:c+s}],m=[{x:l+a-u/2,y:c+s},{x:l+a+u/2,y:c+s},{x:l+a+u/2,y:c+s-h}];"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const y=EA(g),x=p.path(y,f),b=EA(m),v=p.path(b,{...f,fillStyle:"solid"}),C=i.insert(()=>v,":first-child");return C.insert(()=>x,":first-child"),C.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",n),AA(t,C),t.intersect=function(e){return tP.polygon(t,g,e)},i}async function uE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/4,u=.2*s,h=.2*l,d=l+c,{cssStyles:p}=t,f=SA(i),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-s/2-s/2*.1,y:d/2},...MA(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,c,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2}],y=-s/2+s/2*.1,x=-d/2-.4*h,b=[{x:y+s-u,y:1.4*(x+l)},{x:y+s,y:x+l-h},{x:y+s,y:.9*(x+l)},...MA(y+s,1.3*(x+l),y+s-u,1.5*(x+l),.03*-l,.5)],v=EA(m),C=f.path(v,g),w=EA(b),k=f.path(w,{...g,fillStyle:"solid"}),S=i.insert(()=>k,":first-child");return S.insert(()=>C,":first-child"),S.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),AA(t,S),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function hE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+t.padding,(null==t?void 0:t.width)||0),s=Math.max(o.height+t.padding,(null==t?void 0:t.height)||0),l=-a/2,c=-s/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",s),AA(t,u),t.intersect=function(e){return tP.rect(t,e)},i}mu(YP,"question"),mu(ZP,"rect_left_inv_arrow"),mu(KP,"rectWithTitle"),mu(QP,"generateArcPoints"),mu(eE,"roundedRect"),mu(tE,"shadedProcess"),mu(rE,"slopedRect"),mu(nE,"squareRect"),mu(iE,"stadium"),mu(oE,"state"),mu(aE,"stateEnd"),mu(sE,"stateStart"),mu(lE,"subroutine"),mu(cE,"taggedRect"),mu(uE,"taggedWaveEdgedRectangle"),mu(hE,"text");var dE=mu((e,t,r,n,i,o)=>`M${e},${t}\n a${i},${o} 0,0,1 0,${-n}\n l${r},0\n a${i},${o} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${o} 0,0,0 0,${n}\n l${-r},0`,"createCylinderPathD"),pE=mu((e,t,r,n,i,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fE=mu((e,t,r,n,i,o)=>[`M${e+r/2},${-n/2}`,`a${i},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function gE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a,halfPadding:s}=await _A(e,t,PA(t)),l="neo"===t.look?2*s:s,c=o.height+l,u=c/2,h=u/(2.5+c/50),d=o.width+h+l,{cssStyles:p}=t;let f;if("handDrawn"===t.look){const e=SA(i),r=pE(0,0,d,c,h,u),n=fE(0,0,d,c,h,u),o=e.path(r,PC(t,{})),a=e.path(n,PC(t,{fill:"none"}));f=i.insert(()=>a,":first-child"),f=i.insert(()=>o,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const e=dE(0,0,d,c,h,u);f=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wS(p)).attr("style",n),f.attr("class","basic label-container"),p&&f.selectAll("path").attr("style",p),n&&f.selectAll("path").attr("style",n)}return f.attr("label-offset-x",h),f.attr("transform",`translate(${-d/2}, ${c/2} )`),a.attr("transform",`translate(${-o.width/2-h-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),AA(t,f),t.intersect=function(e){const r=tP.rect(t,e),n=r.y-(t.y??0);if(0!=u&&(Math.abs(n)<(t.height??0)/2||Math.abs(n)==(t.height??0)/2&&Math.abs(r.x-(t.x??0))>(t.width??0)/2-h)){let i=h*h*(1-n*n/(u*u));0!=i&&(i=Math.sqrt(Math.abs(i))),i=h-i,e.x-(t.x??0)>0&&(i=-i),r.x+=i}return r},i}async function mE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=o.width+t.padding,s=o.height+t.padding,l=[{x:-3*s/6,y:0},{x:a+3*s/6,y:0},{x:a,y:-s},{x:0,y:-s}];let c;const{cssStyles:u}=t;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=EA(l),o=e.path(n,r);c=i.insert(()=>o,":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),u&&c.attr("style",u)}else c=oP(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,AA(t,c),t.intersect=function(e){return tP.polygon(t,l,e)},i}async function yE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(60,o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(20,o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),{cssStyles:l}=t,c=SA(i),u=PC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");const h=[{x:-a/2*.8,y:-s/2},{x:a/2*.8,y:-s/2},{x:a/2,y:-s/2*.6},{x:a/2,y:s/2},{x:-a/2,y:s/2},{x:-a/2,y:-s/2*.6}],d=EA(h),p=c.path(d,u),f=i.insert(()=>p,":first-child");return f.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",l),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),AA(t,f),t.intersect=function(e){return tP.polygon(t,h,e)},i}async function xE(e,t){var r;const{labelStyles:n,nodeStyles:i}=AC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,label:s}=await _A(e,t,PA(t)),l=ip(null==(r=$p().flowchart)?void 0:r.htmlLabels),c=a.width+(t.padding??0),u=c+a.height,h=c+a.height,d=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:p}=t,f=SA(o),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=EA(d),y=f.path(m,g),x=o.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return p&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",p),i&&"handDrawn"!==t.look&&x.selectChildren("path").attr("style",i),t.width=c,t.height=u,AA(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(t.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return bu.info("Triangle intersect",t,d,e),tP.polygon(t,d,e)},o}async function bE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=l/8,u=l+c,{cssStyles:h}=t,d=70-s,p=d>0?d/2:0,f=SA(i),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-s/2-p,y:u/2},...MA(-s/2-p,u/2,s/2+p,u/2,c,.8),{x:s/2+p,y:-u/2},{x:-s/2-p,y:-u/2}],y=EA(m),x=f.path(y,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-s/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c-(o.y-(o.top??0))})`),AA(t,b),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function vE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await _A(e,t,PA(t)),a=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),s=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),l=a/s;let c=a,u=s;c>u*l?u=c/l:c=u*l,c=Math.max(c,100),u=Math.max(u,50);const h=Math.min(.2*u,u/4),d=u+2*h,{cssStyles:p}=t,f=SA(i),g=PC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2,y:d/2},...MA(-c/2,d/2,c/2,d/2,h,1),{x:c/2,y:-d/2},...MA(c/2,-d/2,-c/2,-d/2,h,-1)],y=EA(m),x=f.path(y,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),AA(t,b),t.intersect=function(e){return tP.polygon(t,m,e)},i}async function CE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await _A(e,t,PA(t)),s=Math.max(o.width+2*(t.padding??0),(null==t?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(null==t?void 0:t.height)??0),c=-s/2,u=-l/2,{cssStyles:h}=t,d=SA(i),p=PC(t,{}),f=[{x:c-5,y:u-5},{x:c-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-5}],g=`M${c-5},${u-5} L${c+s},${u-5} L${c+s},${u+l} L${c-5},${u+l} L${c-5},${u-5}\n M${c-5},${u} L${c+s},${u}\n M${c},${u-5} L${c},${u+l}`;"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const m=d.path(g,p),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),a.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),AA(t,y),t.intersect=function(e){return tP.polygon(t,f,e)},i}async function wE(e,t){var r,n,i,o;const a=t;if(a.alias&&(t.label=a.alias),"handDrawn"===t.look){const{themeVariables:r}=Dd(),{background:n}=r,i={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await wE(e,i)}const s=Dd();t.useHtmlLabels=s.htmlLabels;let l=(null==(r=s.er)?void 0:r.diagramPadding)??10,c=(null==(n=s.er)?void 0:n.entityPadding)??6;const{cssStyles:u}=t,{labelStyles:h,nodeStyles:d}=AC(t);if(0===a.attributes.length&&t.label){const r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l};cS(t.label,s)+2*r.labelPaddingX<s.er.minEntityWidth&&(t.width=s.er.minEntityWidth);const n=await DP(e,t,r);if(!ip(s.htmlLabels)){const e=n.select("text"),t=null==(i=e.node())?void 0:i.getBBox();e.attr("transform",`translate(${-t.width/2}, 0)`)}return n}s.htmlLabels||(l*=1.25,c*=1.25);let p=PA(t);p||(p="node default");const f=e.insert("g").attr("class",p).attr("id",t.domId||t.id),g=await kE(f,t.label??"",s,0,0,["name"],h);g.height+=c;let m=0;const y=[],x=[];let b=0,v=0,C=0,w=0,k=!0,S=!0;for(const V of a.attributes){const e=await kE(f,V.type,s,0,m,["attribute-type"],h);b=Math.max(b,e.width+l);const t=await kE(f,V.name,s,0,m,["attribute-name"],h);v=Math.max(v,t.width+l);const r=await kE(f,V.keys.join(),s,0,m,["attribute-keys"],h);C=Math.max(C,r.width+l);const n=await kE(f,V.comment,s,0,m,["attribute-comment"],h);w=Math.max(w,n.width+l);const i=Math.max(e.height,t.height,r.height,n.height)+c;x.push({yOffset:m,rowHeight:i}),m+=i}let _=4;C<=l&&(k=!1,C=0,_--),w<=l&&(S=!1,w=0,_--);const T=f.node().getBBox();if(g.width+2*l-(b+v+C+w)>0){const e=g.width+2*l-(b+v+C+w);b+=e/_,v+=e/_,C>0&&(C+=e/_),w>0&&(w+=e/_)}const A=b+v+C+w,P=SA(f),E=PC(t,{});"handDrawn"!==t.look&&(E.roughness=0,E.fillStyle="solid");let M=0;x.length>0&&(M=x.reduce((e,t)=>e+((null==t?void 0:t.rowHeight)??0),0));const I=Math.max(T.width+2*l,(null==t?void 0:t.width)||0,A),B=Math.max((M??0)+g.height,(null==t?void 0:t.height)||0),L=-I/2,j=-B/2;f.selectAll("g:not(:first-child)").each((e,t,r)=>{const n=fg(r[t]),i=n.attr("transform");let o=0,a=0;if(i){const e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(o=parseFloat(e[1]),a=parseFloat(e[2]),n.attr("class").includes("attribute-name")?o+=b:n.attr("class").includes("attribute-keys")?o+=b+v:n.attr("class").includes("attribute-comment")&&(o+=b+v+C))}n.attr("transform",`translate(${L+l/2+o}, ${a+j+g.height+c/2})`)}),f.select(".name").attr("transform","translate("+-g.width/2+", "+(j+c/2)+")");const N=P.rectangle(L,j,I,B,E),D=f.insert(()=>N,":first-child").attr("style",u.join("")),{themeVariables:O}=Dd(),{rowEven:F,rowOdd:R,nodeBorder:$}=O;y.push(0);for(const[V,W]of x.entries()){const e=(V+1)%2==0&&0!==W.yOffset,t=P.rectangle(L,g.height+j+(null==W?void 0:W.yOffset),I,null==W?void 0:W.rowHeight,{...E,fill:e?F:R,stroke:$});f.insert(()=>t,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let z=P.line(L,g.height+j,I+L,g.height+j,E);f.insert(()=>z).attr("class","divider"),z=P.line(b+L,g.height+j,b+L,B+j,E),f.insert(()=>z).attr("class","divider"),k&&(z=P.line(b+v+L,g.height+j,b+v+L,B+j,E),f.insert(()=>z).attr("class","divider")),S&&(z=P.line(b+v+C+L,g.height+j,b+v+C+L,B+j,E),f.insert(()=>z).attr("class","divider"));for(const V of y)z=P.line(L,g.height+j+V,I+L,g.height+j+V,E),f.insert(()=>z).attr("class","divider");if(AA(t,D),d&&"handDrawn"!==t.look){const e=d.split(";"),t=null==(o=null==e?void 0:e.filter(e=>e.includes("stroke")))?void 0:o.map(e=>`${e}`).join("; ");f.selectAll("path").attr("style",t??""),f.selectAll(".row-rect-even path").attr("style",d)}return t.intersect=function(e){return tP.rect(t,e)},f}async function kE(e,t,r,n=0,i=0,o=[],a=""){const s=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",a);t!==sp(t)&&(t=(t=sp(t)).replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await ST(s,t,{width:cS(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let e=l.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(ip(r.htmlLabels)){const e=l.children[0];e.style.textAlign="start";const t=fg(l);c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return c}async function SE(e,t,r,n,i=r.class.padding??12){const o=n?0:3,a=e.insert("g").attr("class",PA(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,u=null,h=0,d=0,p=0;if(s=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const e=t.annotations[0];await _E(s,{text:`«${e}»`},0);h=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await _E(l,t,0,["font-weight: bolder"]);const f=l.node().getBBox();d=f.height,c=a.insert("g").attr("class","members-group text");let g=0;for(const x of t.members){g+=await _E(c,x,g,[x.parseClassifier()])+o}p=c.node().getBBox().height,p<=0&&(p=i/2),u=a.insert("g").attr("class","methods-group text");let m=0;for(const x of t.methods){m+=await _E(u,x,m,[x.parseClassifier()])+o}let y=a.node().getBBox();if(null!==s){const e=s.node().getBBox();s.attr("transform",`translate(${-e.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${h})`),y=a.node().getBBox(),c.attr("transform",`translate(0, ${h+d+2*i})`),y=a.node().getBBox(),u.attr("transform",`translate(0, ${h+d+(p?p+4*i:2*i)})`),y=a.node().getBBox(),{shapeSvg:a,bbox:y}}async function _E(e,t,r,n=[]){const i=e.insert("g").attr("class","label").attr("style",n.join("; ")),o=Dd();let a="useHtmlLabels"in t?t.useHtmlLabels:ip(o.htmlLabels)??!0,s="";s="text"in t?t.text:t.label,!a&&s.startsWith("\\")&&(s=s.substring(1)),pp(s)&&(a=!0);const l=await ST(i,Wp(vS(s)),{width:cS(s,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,u=1;if(a){const e=l.children[0],t=fg(l);u=e.innerHTML.split("<br>").length,e.innerHTML.includes("</math>")&&(u+=e.innerHTML.split("<mrow>").length-1);const r=e.getElementsByTagName("img");if(r){const e=""===s.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(r=>{function n(){var n;if(t.style.display="flex",t.style.flexDirection="column",e){const e=(null==(n=o.fontSize)?void 0:n.toString())??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(e,10)*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";r(t)}mu(n,"setupImage"),setTimeout(()=>{t.complete&&n()}),t.addEventListener("error",n),t.addEventListener("load",n)})))}c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}else{n.includes("font-weight: bolder")&&fg(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const e=l.children[0];if(""===l.textContent||l.textContent.includes(">")){e.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===s[1]&&(e.textContent=e.textContent[0]+" "+e.textContent.substring(1))}"undefined"===e.textContent&&(e.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*u)+r)+")"),c.height}async function TE(e,t){var r,n;const i=$p(),o=i.class.padding??12,a=o,s=t.useHtmlLabels??ip(i.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:u}=await SE(e,t,i,s,a),{labelStyles:h,nodeStyles:d}=AC(t);t.labelStyle=h,t.cssStyles=l.styles||"";const p=(null==(r=l.styles)?void 0:r.join(";"))||d||"";t.cssStyles||(t.cssStyles=p.replaceAll("!important","").split(";"));const f=0===l.members.length&&0===l.methods.length&&!(null==(n=i.class)?void 0:n.hideEmptyMembersBox),g=SA(c),m=PC(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");const y=u.width;let x=u.height;0===l.members.length&&0===l.methods.length?x+=a:l.members.length>0&&0===l.methods.length&&(x+=2*a);const b=-y/2,v=-x/2,C=g.rectangle(b-o,v-o-(f?o:0===l.members.length&&0===l.methods.length?-o/2:0),y+2*o,x+2*o+(f?2*o:0===l.members.length&&0===l.methods.length?-o:0),m),w=c.insert(()=>C,":first-child");w.attr("class","basic label-container");const k=w.node().getBBox();c.selectAll(".text").each((e,t,r)=>{var n;const i=fg(r[t]),a=i.attr("transform");let u=0;if(a){const e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(u=parseFloat(e[2]))}let h=u+v+o-(f?o:0===l.members.length&&0===l.methods.length?-o/2:0);s||(h-=4);let d=b;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(d=-(null==(n=i.node())?void 0:n.getBBox().width)/2||0,c.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(d=0)})),i.attr("transform",`translate(${d}, ${h})`)});const S=c.select(".annotation-group").node().getBBox().height-(f?o/2:0)||0,_=c.select(".label-group").node().getBBox().height-(f?o/2:0)||0,T=c.select(".members-group").node().getBBox().height-(f?o/2:0)||0;if(l.members.length>0||l.methods.length>0||f){const e=g.line(k.x,S+_+v+o,k.x+k.width,S+_+v+o,m);c.insert(()=>e).attr("class","divider").attr("style",p)}if(f||l.members.length>0||l.methods.length>0){const e=g.line(k.x,S+_+T+v+2*a+o,k.x+k.width,S+_+T+v+o+2*a,m);c.insert(()=>e).attr("class","divider").attr("style",p)}if("handDrawn"!==l.look&&c.selectAll("path").attr("style",p),w.select(":nth-child(2)").attr("style",p),c.selectAll(".divider").select("path").attr("style",p),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",p),!s){const e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(p);if(t){const e=t[0].replace("color","fill");c.selectAll("tspan").attr("style",e)}else if(h){const t=e.exec(h);if(t){const e=t[0].replace("color","fill");c.selectAll("tspan").attr("style",e)}}}return AA(t,w),t.intersect=function(e){return tP.rect(t,e)},c}async function AE(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=AC(t);t.labelStyle=i;const a=t,s=t,l="verifyMethod"in t,c=PA(t),u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let h;h=l?await PE(u,`<<${a.type}>>`,0,t.labelStyle):await PE(u,"<<Element>>",0,t.labelStyle);let d=h;const p=await PE(u,a.name,d,t.labelStyle+"; font-weight: bold;");if(d+=p+20,l){d+=await PE(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),d,t.labelStyle);d+=await PE(u,""+(a.text?`Text: ${a.text}`:""),d,t.labelStyle);d+=await PE(u,""+(a.risk?`Risk: ${a.risk}`:""),d,t.labelStyle),await PE(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),d,t.labelStyle)}else{d+=await PE(u,""+(s.type?`Type: ${s.type}`:""),d,t.labelStyle),await PE(u,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),d,t.labelStyle)}const f=((null==(r=u.node())?void 0:r.getBBox().width)??200)+20,g=((null==(n=u.node())?void 0:n.getBBox().height)??200)+20,m=-f/2,y=-g/2,x=SA(u),b=PC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=x.rectangle(m,y,f,g,b),C=u.insert(()=>v,":first-child");if(C.attr("class","basic label-container").attr("style",o),u.selectAll(".label").each((e,t,r)=>{const n=fg(r[t]),i=n.attr("transform");let o=0,a=0;if(i){const e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(o=parseFloat(e[1]),a=parseFloat(e[2]))}const s=a-g/2;let l=m+10;0!==t&&1!==t||(l=o),n.attr("transform",`translate(${l}, ${s+20})`)}),d>h+p+20){const e=x.line(m,y+h+p+20,m+f,y+h+p+20,b);u.insert(()=>e).attr("style",o)}return AA(t,C),t.intersect=function(e){return tP.rect(t,e)},u}async function PE(e,t,r,n=""){if(""===t)return 0;const i=e.insert("g").attr("class","label").attr("style",n),o=$p(),a=o.htmlLabels??!0,s=await ST(i,Wp(vS(t)),{width:cS(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:n},o);let l;if(a){const e=s.children[0],t=fg(s);l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height)}else{const e=s.children[0];for(const t of e.children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),n&&t.setAttribute("style",n);l=s.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}mu(gE,"tiltedCylinder"),mu(mE,"trapezoid"),mu(yE,"trapezoidalPentagon"),mu(xE,"triangle"),mu(bE,"waveEdgedRectangle"),mu(vE,"waveRectangle"),mu(CE,"windowPane"),mu(wE,"erBox"),mu(kE,"addText"),mu(SE,"textHelper"),mu(_E,"addText"),mu(TE,"classBox"),mu(AE,"requirementBox"),mu(PE,"addText");var EE=mu(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ME(e,t,{config:r}){var n,i;const{labelStyles:o,nodeStyles:a}=AC(t);t.labelStyle=o||"";const s=t.width;t.width=(t.width??200)-10;const{shapeSvg:l,bbox:c,label:u}=await _A(e,t,PA(t)),h=t.padding||10;let d,p="";"ticket"in t&&t.ticket&&(null==(n=null==r?void 0:r.kanban)?void 0:n.ticketBaseUrl)&&(p=null==(i=null==r?void 0:r.kanban)?void 0:i.ticketBaseUrl.replace("#TICKET#",t.ticket),d=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;({label:g,bbox:m}=d?await TA(d,"ticket"in t&&t.ticket||"",f):await TA(l,"ticket"in t&&t.ticket||"",f));const{label:y,bbox:x}=await TA(l,"assigned"in t&&t.assigned||"",f);t.width=s;const b=(null==t?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,C=Math.max(c.height+20,(null==t?void 0:t.height)||0)+v,w=-b/2,k=-C/2;let S;u.attr("transform","translate("+(h-b/2)+", "+(-v-c.height/2)+")"),g.attr("transform","translate("+(h-b/2)+", "+(-v+c.height/2)+")"),y.attr("transform","translate("+(h+b/2-x.width-20)+", "+(-v+c.height/2)+")");const{rx:_,ry:T}=t,{cssStyles:A}=t;if("handDrawn"===t.look){const e=SA(l),r=PC(t,{}),n=_||T?e.path(DA(w,k,b,C,_||0),r):e.rectangle(w,k,b,C,r);S=l.insert(()=>n,":first-child"),S.attr("class","basic label-container").attr("style",A||null)}else{S=l.insert("rect",":first-child"),S.attr("class","basic label-container __APA__").attr("style",a).attr("rx",_??5).attr("ry",T??5).attr("x",w).attr("y",k).attr("width",b).attr("height",C);const e="priority"in t&&t.priority;if(e){const t=l.append("line"),r=w+2,n=k+Math.floor((_??0)/2),i=k+C-Math.floor((_??0)/2);t.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",EE(e))}}return AA(t,S),t.height=C,t.intersect=function(e){return tP.rect(t,e)},l}async function IE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await _A(e,t,PA(t)),l=o.width+10*a,c=o.height+8*a,u=.15*l,{cssStyles:h}=t,d=o.width+20,p=o.height+20,f=Math.max(l,d),g=Math.max(c,p);let m;s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);const y=`M0 0 \n a${u},${u} 1 0,0 ${.25*f},${-1*g*.1}\n a${u},${u} 1 0,0 ${.25*f},0\n a${u},${u} 1 0,0 ${.25*f},0\n a${u},${u} 1 0,0 ${.25*f},${.1*g}\n\n a${u},${u} 1 0,0 ${.15*f},${.33*g}\n a${.8*u},${.8*u} 1 0,0 0,${.34*g}\n a${u},${u} 1 0,0 ${-1*f*.15},${.33*g}\n\n a${u},${u} 1 0,0 ${-1*f*.25},${.15*g}\n a${u},${u} 1 0,0 ${-1*f*.25},0\n a${u},${u} 1 0,0 ${-1*f*.25},0\n a${u},${u} 1 0,0 ${-1*f*.25},${-1*g*.15}\n\n a${u},${u} 1 0,0 ${-1*f*.1},${-1*g*.33}\n a${.8*u},${.8*u} 1 0,0 0,${-1*g*.34}\n a${u},${u} 1 0,0 ${.1*f},${-1*g*.33}\n H0 V0 Z`;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=e.path(y,r);m=i.insert(()=>n,":first-child"),m.attr("class","basic label-container").attr("style",wS(h))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return m.attr("transform",`translate(${-f/2}, ${-g/2})`),AA(t,m),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return bu.info("Bang intersect",t,e),tP.rect(t,e)},i}async function BE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await _A(e,t,PA(t)),l=o.width+2*a,c=o.height+2*a,u=.15*l,h=.25*l,d=.35*l,p=.2*l,{cssStyles:f}=t;let g;const m=`M0 0 \n a${u},${u} 0 0,1 ${.25*l},${-1*l*.1}\n a${d},${d} 1 0,1 ${.4*l},${-1*l*.1}\n a${h},${h} 1 0,1 ${.35*l},${.2*l}\n\n a${u},${u} 1 0,1 ${.15*l},${.35*c}\n a${p},${p} 1 0,1 ${-1*l*.15},${.65*c}\n\n a${h},${u} 1 0,1 ${-1*l*.25},${.15*l}\n a${d},${d} 1 0,1 ${-1*l*.5},0\n a${u},${u} 1 0,1 ${-1*l*.25},${-1*l*.15}\n\n a${u},${u} 1 0,1 ${-1*l*.1},${-1*c*.35}\n a${p},${p} 1 0,1 ${.1*l},${-1*c*.65}\n H0 V0 Z`;if("handDrawn"===t.look){const e=SA(i),r=PC(t,{}),n=e.path(m,r);g=i.insert(()=>n,":first-child"),g.attr("class","basic label-container").attr("style",wS(f))}else g=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",m);return s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),AA(t,g),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return bu.info("Cloud intersect",t,e),tP.rect(t,e)},i}async function LE(e,t){const{labelStyles:r,nodeStyles:n}=AC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await _A(e,t,PA(t)),l=o.width+8*a,c=o.height+2*a,u=`\n M${-l/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${10-l}\n q-5,0 -5,-5\n Z\n `,h=i.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",u);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),i.append(()=>s.node()),AA(t,h),t.calcIntersect=function(e,t){return tP.rect(e,t)},t.intersect=function(e){return tP.rect(t,e)},i}async function jE(e,t){return lP(e,t,{padding:t.padding??0})}mu(ME,"kanbanItem"),mu(IE,"bang"),mu(BE,"cloud"),mu(LE,"defaultMindmapNode"),mu(jE,"mindmapCircle");var NE=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:nE},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:eE},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:iE},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:lE},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:CP},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:lP},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:IE},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:BE},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:YP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:PP},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:RP},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:FP},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:mE},{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:NP},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kP},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:hE},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:aP},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tE},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:sE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:aE},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:TP},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:EP},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dP},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:fP},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:mP},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:$P},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:bE},{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:gE},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:HP},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:yP},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:wP},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:xE},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:CE},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:SP},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:yE},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:_P},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:rE},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:GP},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:UP},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:iP},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:uP},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:uE},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:cE},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:vE},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ZP},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:qP}],DE=mu(()=>{const e={state:oE,choice:sP,note:XP,rectWithTitle:KP,labelRect:OP,iconSquare:LP,iconCircle:IP,icon:MP,iconRounded:BP,imageSquare:jP,anchor:rP,kanbanItem:ME,mindmapCircle:jE,defaultMindmapNode:LE,classBox:TE,erBox:wE,requirementBox:AE},t=[...Object.entries(e),...NE.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap")();function OE(e){return e in DE}mu(OE,"isValidShape");var FE=new Map;async function RE(e,t,r){let n,i;"rect"===t.shape&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?DE[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;"sandbox"===r.config.securityLevel?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),i=await o(n,t,r)}else i=await o(e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),FE.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}mu(RE,"insertNode");var $E=mu((e,t)=>{FE.set(t.id,e)},"setNodeElem"),zE=mu(()=>{FE.clear()},"clear"),VE=mu(e=>{const t=FE.get(e.id);bu.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode"),WE=mu((e,t,r,n,i,o)=>{t.arrowTypeStart&&qE(e,"start",t.arrowTypeStart,r,n,i,o),t.arrowTypeEnd&&qE(e,"end",t.arrowTypeEnd,r,n,i,o)},"addEdgeMarkers"),HE={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},qE=mu((e,t,r,n,i,o,a)=>{var s;const l=HE[r];if(!l)return void bu.warn(`Unknown arrow type: ${r}`);const c=`${i}_${o}-${l.type}${"start"===t?"Start":"End"}`;if(a&&""!==a.trim()){const r=`${c}_${a.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const e=document.getElementById(c);if(e){const t=e.cloneNode(!0);t.id=r;t.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",a),l.fill&&e.setAttribute("fill",a)}),null==(s=e.parentNode)||s.appendChild(t)}}e.attr(`marker-${t}`,`url(${n}#${r})`)}else e.attr(`marker-${t}`,`url(${n}#${c})`)},"addEdgeMarker"),UE=new Map,GE=new Map,XE=mu(()=>{UE.clear(),GE.clear()},"clear"),JE=mu(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),YE=mu(async(e,t)=>{let r=ip($p().flowchart.htmlLabels);const{labelStyles:n}=AC(t);t.labelStyle=n;const i=await ST(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});bu.info("abc82",t,t.labelType);const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id);a.node().appendChild(i);let s,l=i.getBBox();if(r){const e=i.children[0],t=fg(i);l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height)}if(a.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),UE.set(t.id,o),t.width=l.width,t.height=l.height,t.startLabelLeft){const r=await NA(t.startLabelLeft,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).startLeft=n,ZE(s,t.startLabelLeft)}if(t.startLabelRight){const r=await NA(t.startLabelRight,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=n.node().appendChild(r),i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).startRight=n,ZE(s,t.startLabelRight)}if(t.endLabelLeft){const r=await NA(t.endLabelLeft,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.node().appendChild(r),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).endLeft=n,ZE(s,t.endLabelLeft)}if(t.endLabelRight){const r=await NA(t.endLabelRight,JE(t.labelStyle)),n=e.insert("g").attr("class","edgeTerminals"),i=n.insert("g").attr("class","inner");s=i.node().appendChild(r);const o=r.getBBox();i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.node().appendChild(r),GE.get(t.id)||GE.set(t.id,{}),GE.get(t.id).endRight=n,ZE(s,t.endLabelRight)}return i},"insertEdgeLabel");function ZE(e,t){$p().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}mu(ZE,"setTerminalWidth");var KE=mu((e,t)=>{bu.debug("Moving label abc88 ",e.id,e.label,UE.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=$p(),{subGraphTitleTotalMargin:i}=wC(n);if(e.label){const n=UE.get(e.id);let o=e.x,a=e.y;if(r){const n=xS.calcLabelPosition(r);bu.debug("Moving label "+e.label+" from (",o,",",a,") to (",n.x,",",n.y,") abc88"),t.updatedPath&&(o=n.x,a=n.y)}n.attr("transform",`translate(${o}, ${a+i/2})`)}if(e.startLabelLeft){const t=GE.get(e.id).startLeft;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}if(e.startLabelRight){const t=GE.get(e.id).startRight;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}if(e.endLabelLeft){const t=GE.get(e.id).endLeft;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}if(e.endLabelRight){const t=GE.get(e.id).endRight;let n=e.x,i=e.y;if(r){const t=xS.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),QE=mu((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),o=Math.abs(t.y-n),a=e.width/2,s=e.height/2;return i>=a||o>=s},"outsideNode"),eM=mu((e,t,r)=>{bu.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(t)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,o=Math.abs(n-r.x),a=e.width/2;let s=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),u=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*a>Math.abs(n-t.x)*l){let e=r.y<t.y?t.y-l-i:i-l-t.y;s=u*e/c;const n={x:r.x<t.x?r.x+s:r.x-u+s,y:r.y<t.y?r.y+c-e:r.y-c+e};return 0===s&&(n.x=t.x,n.y=t.y),0===u&&(n.x=t.x),0===c&&(n.y=t.y),bu.debug(`abc89 top/bottom calc, Q ${c}, q ${e}, R ${u}, r ${s}`,n),n}{s=r.x<t.x?t.x-a-n:n-a-t.x;let e=c*s/u,i=r.x<t.x?r.x+u-s:r.x-u+s,o=r.y<t.y?r.y+e:r.y-e;return bu.debug(`sides calc abc89, Q ${c}, q ${e}, R ${u}, r ${s}`,{_x:i,_y:o}),0===s&&(i=t.x,o=t.y),0===u&&(i=t.x),0===c&&(o=t.y),{x:i,y:o}}},"intersection"),tM=mu((e,t)=>{bu.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(e=>{if(bu.info("abc88 checking point",e,t),QE(t,e)||i)bu.warn("abc88 outside",e,n),n=e,i||r.push(e);else{const o=eM(t,n,e);bu.debug("abc88 inside",e,n,o),bu.debug("abc88 intersection",o,t);let a=!1;r.forEach(e=>{a=a||e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?bu.warn("abc88 no intersect",o,r):r.push(o),i=!0}}),bu.debug("returning points",r),r},"cutPathAtIntersect");function rM(e){const t=[],r=[];for(let n=1;n<e.length-1;n++){const i=e[n-1],o=e[n],a=e[n+1];(i.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-i.y)>5||i.y===o.y&&o.x===a.x&&Math.abs(o.x-i.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}mu(rM,"extractCornerPoints");var nM=mu(function(e,t,r){const n=t.x-e.x,i=t.y-e.y,o=r/Math.sqrt(n*n+i*i);return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),iM=mu(function(e){const{cornerPointPositions:t}=rM(e),r=[];for(let n=0;n<e.length;n++)if(t.includes(n)){const t=e[n-1],i=e[n+1],o=e[n],a=nM(t,o,5),s=nM(i,o,5),l=s.x-a.x,c=s.y-a.y;r.push(a);const u=2*Math.sqrt(2);let h={x:o.x,y:o.y};if(Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10){bu.debug("Corner point fixing",Math.abs(i.x-t.x),Math.abs(i.y-t.y));const e=5;h=o.x===a.x?{x:l<0?a.x-e+u:a.x+e-u,y:c<0?a.y-u:a.y+u}:{x:l<0?a.x-u:a.x+u,y:c<0?a.y-e+u:a.y+e-u}}else bu.debug("Corner point skipping fixing",Math.abs(i.x-t.x),Math.abs(i.y-t.y));r.push(h,s)}else r.push(e[n]);return r},"fixCorners"),oM=mu((e,t,r)=>{const n=e-t-r,i=Math.floor(n/4);return`0 ${t} ${Array(i).fill("2 2").join(" ")} ${r}`},"generateDashArray"),aM=mu(function(e,t,r,n,i,o,a,s=!1){var l;const{handDrawnSeed:c}=$p();let u=t.points,h=!1;const d=i;var p=o;const f=[];for(const M in t.cssCompiledStyles)TC(M)||f.push(t.cssCompiledStyles[M]);bu.debug("UIO intersect check",t.points,p.x,d.x),p.intersect&&d.intersect&&!s&&(u=u.slice(1,t.points.length-1),u.unshift(d.intersect(u[0])),bu.debug("Last point UIO",t.start,"--\x3e",t.end,u[u.length-1],p,p.intersect(u[u.length-1])),u.push(p.intersect(u[u.length-1])));const g=btoa(JSON.stringify(u));t.toCluster&&(bu.info("to cluster abc88",r.get(t.toCluster)),u=tM(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(bu.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=tM(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=u.filter(e=>!Number.isNaN(e.y));m=iM(m);let y=Oy;switch(y=Ay,t.curve){case"linear":y=Ay;break;case"basis":default:y=Oy;break;case"cardinal":y=Hy;break;case"bumpX":y=By;break;case"bumpY":y=Ly;break;case"catmullRom":y=Zy;break;case"monotoneX":y=ux;break;case"monotoneY":y=hx;break;case"natural":y=fx;break;case"step":y=mx;break;case"stepAfter":y=xx;break;case"stepBefore":y=yx}const{x:x,y:b}=CC(t),v=My().x(x).y(b).curve(y);let C,w;switch(t.thickness){case"normal":default:C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible"}switch(t.pattern){case"solid":default:C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed"}let k="rounded"===t.curve?sM(cM(m,t),5):v(m);const S=Array.isArray(t.style)?t.style:[t.style];let _=S.find(e=>null==e?void 0:e.startsWith("stroke:")),T=!1;if("handDrawn"===t.look){const r=SA(e);Object.assign([],m);C+=" transition",w=fg(r.path(k,{roughness:.3,seed:c})).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce((e,t)=>e+";"+t,""):"");let n=w.attr("d");w.attr("d",n),e.node().appendChild(w.node())}else{const r=f.join(";"),n=S?S.reduce((e,t)=>e+t+";",""):"";let i="";t.animate&&(i=" edge-animation-fast"),t.animation&&(i=" edge-animation-"+t.animation);const o=(r?r+";"+n+";":n)+";"+(S?S.reduce((e,t)=>e+";"+t,""):"");w=e.append("path").attr("d",k).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(i??"")).attr("style",o),_=null==(l=o.match(/stroke:([^;]+)/))?void 0:l[1],T=!0===t.animate||!!t.animation||r.includes("animation");const a=w.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,c=xC[t.arrowTypeStart]||0,u=xC[t.arrowTypeEnd]||0;if("neo"===t.look&&!T){const e=`stroke-dasharray: ${"dotted"===t.pattern||"dashed"===t.pattern?oM(s,c,u):`0 ${c} ${s-c-u} ${u}`}; stroke-dashoffset: 0;`;w.attr("style",e+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(t=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",t.x).attr("cy",t.y)});let A="";($p().flowchart.arrowMarkerAbsolute||$p().state.arrowMarkerAbsolute)&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),bu.info("arrowTypeStart",t.arrowTypeStart),bu.info("arrowTypeEnd",t.arrowTypeEnd),WE(w,t,A,a,n,_);const P=u[Math.floor(u.length/2)];xS.isLabelCoordinateInPath(P,w.attr("d"))||(h=!0);let E={};return h&&(E.updatedPath=u),E.originalPath=t.points,E},"insertEdge");function sM(e,t){if(e.length<2)return"";let r="";const n=e.length,i=1e-5;for(let o=0;o<n;o++){const a=e[o],s=e[o-1],l=e[o+1];if(0===o)r+=`M${a.x},${a.y}`;else if(o===n-1)r+=`L${a.x},${a.y}`;else{const e=a.x-s.x,n=a.y-s.y,o=l.x-a.x,c=l.y-a.y,u=Math.hypot(e,n),h=Math.hypot(o,c);if(u<i||h<i){r+=`L${a.x},${a.y}`;continue}const d=e/u,p=n/u,f=o/h,g=c/h,m=d*f+p*g,y=Math.max(-1,Math.min(1,m)),x=Math.acos(y);if(x<i||Math.abs(Math.PI-x)<i){r+=`L${a.x},${a.y}`;continue}const b=Math.min(t/Math.sin(x/2),u/2,h/2),v=a.x-d*b,C=a.y-p*b,w=a.x+f*b,k=a.y+g*b;r+=`L${v},${C}`,r+=`Q${a.x},${a.y} ${w},${k}`}}return r}function lM(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,n=t.y-e.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}function cM(e,t){const r=e.map(e=>({...e}));if(e.length>=2&&yC[t.arrowTypeStart]){const n=yC[t.arrowTypeStart],i=e[0],o=e[1],{angle:a}=lM(i,o),s=n*Math.cos(a),l=n*Math.sin(a);r[0].x=i.x+s,r[0].y=i.y+l}const n=e.length;if(n>=2&&yC[t.arrowTypeEnd]){const i=yC[t.arrowTypeEnd],o=e[n-1],a=e[n-2],{angle:s}=lM(a,o),l=i*Math.cos(s),c=i*Math.sin(s);r[n-1].x=o.x-l,r[n-1].y=o.y-c}return r}mu(sM,"generateRoundedPath"),mu(lM,"calculateDeltaAndAngle"),mu(cM,"applyMarkerOffsetsToPoints");var uM=mu((e,t,r,n)=>{t.forEach(t=>{hM[t](e,r,n)})},"insertMarkers"),hM={extension:mu((e,t,r)=>{bu.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:mu((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:mu((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:mu((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:mu((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:mu((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:mu((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:mu((e,t,r)=>{const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},dM=uM,pM={common:yp,getConfig:Dd,insertCluster:WA,insertEdge:aM,insertEdgeLabel:YE,insertMarkers:dM,insertNode:RE,interpolateToCurve:Wk,labelHelper:_A,log:bu,positionEdgeLabel:KE},fM={},gM=mu(e=>{for(const t of e)fM[t.name]=t},"registerLayoutLoaders");mu(()=>{gM([{name:"dagre",loader:mu(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-BTjEhGrQ.cjs")),"loader")},{name:"cose-bilkent",loader:mu(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-CDJnP_Yk.cjs")),"loader")}])},"registerDefaultLayoutLoaders")();var mM=mu(async(e,t)=>{if(!(e.layoutAlgorithm in fM))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=fM[e.layoutAlgorithm];return(await r.loader()).render(e,t,pM,{algorithm:r.algorithm})},"render"),yM=mu((e="",{fallback:t="dagre"}={})=>{if(e in fM)return e;if(t in fM)return bu.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),xM="comm",bM="rule",vM="decl",CM=Math.abs,wM=String.fromCharCode;function kM(e){return e.trim()}function SM(e,t,r){return e.replace(t,r)}function _M(e,t,r){return e.indexOf(t,r)}function TM(e,t){return 0|e.charCodeAt(t)}function AM(e,t,r){return e.slice(t,r)}function PM(e){return e.length}function EM(e,t){return t.push(e),e}var MM=1,IM=1,BM=0,LM=0,jM=0,NM="";function DM(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:MM,column:IM,length:a,return:"",siblings:s}}function OM(){return jM=LM>0?TM(NM,--LM):0,IM--,10===jM&&(IM=1,MM--),jM}function FM(){return jM=LM<BM?TM(NM,LM++):0,IM++,10===jM&&(IM=1,MM++),jM}function RM(){return TM(NM,LM)}function $M(){return LM}function zM(e,t){return AM(NM,e,t)}function VM(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function WM(e){return kM(zM(LM-1,UM(91===e?e+2:40===e?e+1:e)))}function HM(e){for(;(jM=RM())&&jM<33;)FM();return VM(e)>2||VM(jM)>3?"":" "}function qM(e,t){for(;--t&&FM()&&!(jM<48||jM>102||jM>57&&jM<65||jM>70&&jM<97););return zM(e,$M()+(t<6&&32==RM()&&32==FM()))}function UM(e){for(;FM();)switch(jM){case e:return LM;case 34:case 39:34!==e&&39!==e&&UM(jM);break;case 40:41===e&&UM(e);break;case 92:FM()}return LM}function GM(e,t){for(;FM()&&e+jM!==57&&(e+jM!==84||47!==RM()););return"/*"+zM(t,LM-1)+"*"+wM(47===e?e:FM())}function XM(e){for(;!VM(RM());)FM();return zM(e,LM)}function JM(e){return function(e){return NM="",e}(YM("",null,null,null,[""],e=function(e){return MM=IM=1,BM=PM(NM=e),LM=0,[]}(e),0,[0],e))}function YM(e,t,r,n,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,p=0,f=0,g=1,m=1,y=1,x=0,b="",v=i,C=o,w=n,k=b;m;)switch(f=x,x=FM()){case 40:if(108!=f&&58==TM(k,h-1)){-1!=_M(k+=SM(WM(x),"&","&\f"),"&\f",CM(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:k+=WM(x);break;case 9:case 10:case 13:case 32:k+=HM(f);break;case 92:k+=qM($M()-1,7);continue;case 47:switch(RM()){case 42:case 47:EM(KM(GM(FM(),$M()),t,r,l),l),5!=VM(f||1)&&5!=VM(RM()||1)||!PM(k)||" "===AM(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*g:s[c++]=PM(k)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+u:-1==y&&(k=SM(k,/\f/g,"")),p>0&&(PM(k)-h||0===g&&47===f)&&EM(p>32?QM(k+";",n,r,h-1,l):QM(SM(k," ","")+";",n,r,h-2,l),l);break;case 59:k+=";";default:if(EM(w=ZM(k,t,r,c,u,i,s,b,v=[],C=[],h,o),o),123===x)if(0===u)YM(k,t,w,w,v,o,h,s,C);else{switch(d){case 99:if(110===TM(k,3))break;case 108:if(97===TM(k,2))break;default:u=0;case 100:case 109:case 115:}u?YM(e,w,w,n&&EM(ZM(e,w,w,0,0,i,s,b,i,v=[],h,C),C),i,C,h,s,n?v:C):YM(k,w,w,w,[""],C,0,s,C)}}c=u=p=0,g=y=1,b=k="",h=a;break;case 58:h=1+PM(k),p=f;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==OM())continue;switch(k+=wM(x),x*g){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(PM(k)-1)*y,y=1;break;case 64:45===RM()&&(k+=WM(FM())),d=RM(),u=h=PM(b=k+=XM($M())),x++;break;case 45:45===f&&2==PM(k)&&(g=0)}}return o}function ZM(e,t,r,n,i,o,a,s,l,c,u,h){for(var d=i-1,p=0===i?o:[""],f=function(e){return e.length}(p),g=0,m=0,y=0;g<n;++g)for(var x=0,b=AM(e,d+1,d=CM(m=a[g])),v=e;x<f;++x)(v=kM(m>0?p[x]+" "+b:SM(b,/&\f/g,p[x])))&&(l[y++]=v);return DM(e,t,r,0===i?bM:s,l,c,u,h)}function KM(e,t,r,n){return DM(e,t,r,xM,wM(jM),AM(e,2,-2),0,n)}function QM(e,t,r,n,i){return DM(e,t,r,vM,AM(e,0,n),AM(e,n+1,-1),n,i)}function eI(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function tI(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case vM:return e.return=e.return||e.value;case xM:return"";case"@keyframes":return e.return=e.value+"{"+eI(e.children,n)+"}";case bM:if(!PM(e.value=e.props.join(",")))return""}return PM(r=eI(e.children,n))?e.return=e.value+"{"+r+"}":""}var rI=Dw(Object.keys,Object),nI=Object.prototype.hasOwnProperty;function iI(e){if(!Rw(e))return rI(e);var t=[];for(var r in Object(e))nI.call(e,r)&&"constructor"!=r&&t.push(r);return t}var oI=sw(FC,"DataView"),aI=sw(FC,"Promise"),sI=sw(FC,"Set"),lI=sw(FC,"WeakMap"),cI="[object Map]",uI="[object Promise]",hI="[object Set]",dI="[object WeakMap]",pI="[object DataView]",fI=QC(oI),gI=QC(mw),mI=QC(aI),yI=QC(sI),xI=QC(lI);exports.getTag=UC,(oI&&exports.getTag(new oI(new ArrayBuffer(1)))!=pI||mw&&exports.getTag(new mw)!=cI||aI&&exports.getTag(aI.resolve())!=uI||sI&&exports.getTag(new sI)!=hI||lI&&exports.getTag(new lI)!=dI)&&(exports.getTag=function(e){var t=UC(e),r="[object Object]"==t?e.constructor:void 0,n=r?QC(r):"";if(n)switch(n){case fI:return pI;case gI:return cI;case mI:return uI;case yI:return hI;case xI:return dI}return t});var bI=Object.prototype.hasOwnProperty;function vI(e){if(null==e)return!0;if(Jw(e)&&(Gw(e)||"string"==typeof e||"function"==typeof e.splice||Qw(e)||dk(e)||Uw(e)))return!e.length;var t=exports.getTag(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Rw(e))return!iI(e).length;for(var r in e)if(bI.call(e,r))return!1;return!0}var CI={id:"c4",detector:mu(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-F89ysfvk.cjs"));return{id:"c4",diagram:e}},"loader")},wI="flowchart",kI={id:wI,detector:mu((e,t)=>{var r,n;return"dagre-wrapper"!==(null==(r=null==t?void 0:t.flowchart)?void 0:r.defaultRenderer)&&"elk"!==(null==(n=null==t?void 0:t.flowchart)?void 0:n.defaultRenderer)&&/^\s*graph/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-D447_R3t.cjs"));return{id:wI,diagram:e}},"loader")},SI="flowchart-v2",_I={id:SI,detector:mu((e,t)=>{var r,n,i;return"dagre-d3"!==(null==(r=null==t?void 0:t.flowchart)?void 0:r.defaultRenderer)&&("elk"===(null==(n=null==t?void 0:t.flowchart)?void 0:n.defaultRenderer)&&(t.layout="elk"),!(!/^\s*graph/.test(e)||"dagre-wrapper"!==(null==(i=null==t?void 0:t.flowchart)?void 0:i.defaultRenderer))||/^\s*flowchart/.test(e))},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-D447_R3t.cjs"));return{id:SI,diagram:e}},"loader")},TI={id:"er",detector:mu(e=>/^\s*erDiagram/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-B8Cby2EW.cjs"));return{id:"er",diagram:e}},"loader")},AI="gitGraph",PI={id:AI,detector:mu(e=>/^\s*gitGraph/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-V2S2FVAM-BzDdhr7h.cjs"));return{id:AI,diagram:e}},"loader")},EI="gantt",MI={id:EI,detector:mu(e=>/^\s*gantt/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-BHGSOmkk.cjs"));return{id:EI,diagram:e}},"loader")},II="info",BI={id:II,detector:mu(e=>/^\s*info/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-HS3SLOUP-Bs3peWgl.cjs"));return{id:II,diagram:e}},"loader")},LI={id:"pie",detector:mu(e=>/^\s*pie/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-D9M6lhX5.cjs"));return{id:"pie",diagram:e}},"loader")},jI="quadrantChart",NI={id:jI,detector:mu(e=>/^\s*quadrantChart/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-DDWEpiLt.cjs"));return{id:jI,diagram:e}},"loader")},DI="xychart",OI={id:DI,detector:mu(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-s6lxWNao.cjs"));return{id:DI,diagram:e}},"loader")},FI="requirement",RI={id:FI,detector:mu(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-D8SeZ83D.cjs"));return{id:FI,diagram:e}},"loader")},$I="sequence",zI={id:$I,detector:mu(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-BpCabHUR.cjs"));return{id:$I,diagram:e}},"loader")},VI="class",WI={id:VI,detector:mu((e,t)=>{var r;return"dagre-wrapper"!==(null==(r=null==t?void 0:t.class)?void 0:r.defaultRenderer)&&/^\s*classDiagram/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-BmFRijDQ.cjs"));return{id:VI,diagram:e}},"loader")},HI="classDiagram",qI={id:HI,detector:mu((e,t)=>{var r;return!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==(null==(r=null==t?void 0:t.class)?void 0:r.defaultRenderer))||/^\s*classDiagram-v2/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-BmFRijDQ.cjs"));return{id:HI,diagram:e}},"loader")},UI="state",GI={id:UI,detector:mu((e,t)=>{var r;return"dagre-wrapper"!==(null==(r=null==t?void 0:t.state)?void 0:r.defaultRenderer)&&/^\s*stateDiagram/.test(e)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-cgi0ko-6.cjs"));return{id:UI,diagram:e}},"loader")},XI="stateDiagram",JI={id:XI,detector:mu((e,t)=>{var r;return!!/^\s*stateDiagram-v2/.test(e)||!(!/^\s*stateDiagram/.test(e)||"dagre-wrapper"!==(null==(r=null==t?void 0:t.state)?void 0:r.defaultRenderer))},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-BGbtkwft.cjs"));return{id:XI,diagram:e}},"loader")},YI="journey",ZI={id:YI,detector:mu(e=>/^\s*journey/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-DQFssTKA.cjs"));return{id:YI,diagram:e}},"loader")},KI={draw:mu((e,t,r)=>{bu.debug("rendering svg for syntax error\n");const n=vx(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),vp(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},QI=KI,eB={db:{},renderer:KI,parser:{parse:mu(()=>{},"parse")}},tB="flowchart-elk",rB={id:tB,detector:mu((e,t={})=>{var r;return!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===(null==(r=null==t?void 0:t.flowchart)?void 0:r.defaultRenderer))&&(t.layout="elk",!0)},"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-D447_R3t.cjs"));return{id:tB,diagram:e}},"loader")},nB="timeline",iB={id:nB,detector:mu(e=>/^\s*timeline/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-DONwhI2c.cjs"));return{id:nB,diagram:e}},"loader")},oB="mindmap",aB={id:oB,detector:mu(e=>/^\s*mindmap/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-C7Scfjt5.cjs"));return{id:oB,diagram:e}},"loader")},sB="kanban",lB={id:sB,detector:mu(e=>/^\s*kanban/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-CQiLQ-MZ.cjs"));return{id:sB,diagram:e}},"loader")},cB="sankey",uB={id:cB,detector:mu(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-DM5sLVVS.cjs"));return{id:cB,diagram:e}},"loader")},hB="packet",dB={id:hB,detector:mu(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-CTLNC-Iz.cjs"));return{id:hB,diagram:e}},"loader")},pB="radar",fB={id:pB,detector:mu(e=>/^\s*radar-beta/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-DsFIAL3v.cjs"));return{id:pB,diagram:e}},"loader")},gB="block",mB={id:gB,detector:mu(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-Cf1w6RSy.cjs"));return{id:gB,diagram:e}},"loader")},yB="architecture",xB={id:yB,detector:mu(e=>/^\s*architecture/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-BmUckqP4.cjs"));return{id:yB,diagram:e}},"loader")},bB="treemap",vB={id:bB,detector:mu(e=>/^\s*treemap/.test(e),"detector"),loader:mu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-H6bEKZLm.cjs"));return{id:bB,diagram:e}},"loader")},CB=!1,wB=mu(()=>{CB||(CB=!0,Gp("error",eB,e=>"error"===e.toLowerCase().trim()),Gp("---",{db:{clear:mu(()=>{},"clear")},styles:{},renderer:{draw:mu(()=>{},"draw")},parser:{parse:mu(()=>{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:mu(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),td(rB,aB,xB),td(CI,lB,qI,WI,TI,MI,BI,LI,RI,zI,_I,kI,iB,PI,JI,GI,ZI,NI,uB,dB,OI,mB,fB,vB))},"addDiagrams"),kB=mu(async()=>{bu.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Qh).map(async([e,{detector:t,loader:r}])=>{if(r)try{Xp(e)}catch{try{const{diagram:e,id:n}=await r();Gp(n,e,t)}catch(n){throw bu.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Qh[e],n}}}))).filter(e=>"rejected"===e.status);if(e.length>0){bu.error(`Failed to load ${e.length} external diagrams`);for(const t of e)bu.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function SB(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function _B(e,t,r,n){if(void 0!==e.insert){if(r){const t=`chart-desc-${n}`;e.attr("aria-describedby",t),e.insert("desc",":first-child").attr("id",t).text(r)}if(t){const r=`chart-title-${n}`;e.attr("aria-labelledby",r),e.insert("title",":first-child").attr("id",r).text(t)}}}mu(SB,"setA11yDiagramInfo"),mu(_B,"addSVGa11yTitleDescription");var TB=(mu(g=class{constructor(e,t,r,n,i){this.type=e,this.text=t,this.db=r,this.parser=n,this.renderer=i}static async fromText(e,t={}){var r,n;const i=Dd(),o=ed(e,i);e=bS(e)+"\n";try{Xp(o)}catch{const e=nd(o);if(!e)throw new Kh(`Diagram ${o} not found.`);const{id:t,diagram:r}=await e();Gp(t,r)}const{db:a,parser:s,renderer:l,init:c}=Xp(o);return s.parser&&(s.parser.yy=a),null==(r=a.clear)||r.call(a),null==c||c(i),t.title&&(null==(n=a.setDiagramTitle)||n.call(a,t.title)),await s.parse(e),new g(o,e,a,s,l)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},"Diagram"),g),AB=[],PB=mu(()=>{AB.forEach(e=>{e()}),AB=[]},"attachFunctions"),EB=mu(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function MB(e){const t=e.match(Jh);if(!t)return{text:e,metadata:{}};let r=mC(t[1],{schema:gC})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}mu(MB,"extractFrontMatter");var IB=mu(e=>e.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BB=mu(e=>{const{text:t,metadata:r}=MB(e),{displayMode:n,title:i,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:i,config:o,text:t}},"processFrontmatter"),LB=mu(e=>{const t=xS.detectInit(e)??{},r=xS.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===(null==r?void 0:r.type)&&(t.wrap=!0),{text:zk(e),directive:t}},"processDirectives");function jB(e){const t=IB(e),r=BB(t),n=LB(r.text),i=yS(r.config,n.directive);return{code:e=EB(n.text),title:r.title,config:i}}function NB(e){const t=(new TextEncoder).encode(e),r=Array.from(t,e=>String.fromCodePoint(e)).join("");return btoa(r)}mu(jB,"preprocessDiagram"),mu(NB,"toBase64");var DB=["foreignobject"],OB=["dominant-baseline"];function FB(e){const t=jB(e);return Rd(),Fd(t.config??{}),t}async function RB(e,t){wB();try{const{code:t,config:r}=FB(e);return{diagramType:(await YB(t)).type,config:r}}catch(r){if(null==t?void 0:t.suppressErrors)return!1;throw r}}mu(FB,"processAndSetConfigs"),mu(RB,"parse");var $B=mu((e,t,r=[])=>`\n.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),zB=mu((e,t=new Map)=>{var r;let n="";if(void 0!==e.themeCSS&&(n+=`\n${e.themeCSS}`),void 0!==e.fontFamily&&(n+=`\n:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`\n:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const i=e.htmlLabels??(null==(r=e.flowchart)?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(e=>{vI(e.styles)||i.forEach(t=>{n+=$B(e.id,t,e.styles)}),vI(e.textStyles)||(n+=$B(e.id,"tspan",((null==e?void 0:e.textStyles)||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),VB=mu((e,t,r,n)=>{const i=zB(e,r);return eI(JM(`${n}{${_p(t,i,e.themeVariables)}}`),tI)},"createUserStyles"),WB=mu((e="",t,r)=>{let n=e;return r||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=vS(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),HB=mu((e="",t)=>{var r,n;return`<iframe style="width:100%;height:${(null==(n=null==(r=null==t?void 0:t.viewBox)?void 0:r.baseVal)?void 0:n.height)?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${NB(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`},"putIntoIFrame"),qB=mu((e,t,r,n,i)=>{const o=e.append("div");o.attr("id",r),n&&o.attr("style",n);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&a.attr("xmlns:xlink",i),a.append("g"),e},"appendDivSvgG");function UB(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mu(UB,"sandboxedIframe");var GB=mu((e,t,r,n)=>{var i,o,a;null==(i=e.getElementById(t))||i.remove(),null==(o=e.getElementById(r))||o.remove(),null==(a=e.getElementById(n))||a.remove()},"removeExistingElements"),XB=mu(async function(e,t,r){var n,i,o,a,s,l;wB();const c=FB(t);t=c.code;const u=Dd();bu.debug(u),t.length>((null==u?void 0:u.maxTextSize)??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const h="#"+e,d="i"+e,p="#"+d,f="d"+e,g="#"+f,m=mu(()=>{const e=fg(x?p:g).node();e&&"remove"in e&&e.remove()},"removeTempElements");let y=fg("body");const x="sandbox"===u.securityLevel,b="loose"===u.securityLevel,v=u.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const e=UB(fg(r),d);y=fg(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=fg(r);qB(y,e,f,`font-family: ${v}`,"http://www.w3.org/1999/xlink")}else{if(GB(document,e,f,d),x){const e=UB(fg("body"),d);y=fg(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=fg("body");qB(y,e,f)}let C,w;try{C=await TB.fromText(t,{title:c.title})}catch(I){if(u.suppressErrorRendering)throw m(),I;C=await TB.fromText("error"),w=I}const k=y.select(g).node(),S=C.type,_=k.firstChild,T=_.firstChild,A=null==(i=(n=C.renderer).getClasses)?void 0:i.call(n,t,C),P=VB(u,S,A,h),E=document.createElement("style");E.innerHTML=P,_.insertBefore(E,T);try{await C.renderer.draw(t,e,du.version,C)}catch(B){throw u.suppressErrorRendering?m():QI.draw(t,e,du.version),B}ZB(S,y.select(`${g} svg`),null==(a=(o=C.db).getAccTitle)?void 0:a.call(o),null==(l=(s=C.db).getAccDescription)?void 0:l.call(s)),y.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let M=y.select(g).node().innerHTML;if(bu.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),M=WB(M,x,ip(u.arrowMarkerAbsolute)),x){const e=y.select(g+" svg").node();M=HB(M,e)}else b||(M=Xh.sanitize(M,{ADD_TAGS:DB,ADD_ATTR:OB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(PB(),w)throw w;return m(),{diagramType:S,svg:M,bindFunctions:C.db.bindFunctions}},"render");function JB(e={}){var t;const r=od({},e);(null==r?void 0:r.fontFamily)&&!(null==(t=r.themeVariables)?void 0:t.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Bd(r),(null==r?void 0:r.theme)&&r.theme in xd?r.themeVariables=xd[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=xd.default.getThemeVariables(r.themeVariables));const n="object"==typeof r?Id(r):jd();vu(n.logLevel),wB()}mu(JB,"initialize");var YB=mu((e,t={})=>{const{code:r}=jB(e);return TB.fromText(r,t)},"getDiagramFromText");function ZB(e,t,r,n){SB(t,e),_B(t,r,n,t.attr("id"))}mu(ZB,"addA11yInfo");var KB=Object.freeze({render:XB,parse:RB,getDiagramFromText:YB,initialize:JB,getConfig:Dd,setConfig:Nd,getSiteConfig:jd,updateSiteConfig:Ld,reset:mu(()=>{Rd()},"reset"),globalReset:mu(()=>{Rd(Td)},"globalReset"),defaultConfig:Td});vu(Dd().logLevel),Rd(Dd());var QB=mu((e,t,r)=>{bu.warn(e),fS(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),eL=mu(async function(e={querySelector:".mermaid"}){try{await tL(e)}catch(t){if(fS(t)&&bu.error(t.str),dL.parseError&&dL.parseError(t),!e.suppressErrors)throw bu.error("Use the suppressErrors option to suppress these errors"),t}},"run"),tL=mu(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const n=KB.getConfig();let i;if(bu.debug((e?"":"No ")+"Callback function found"),r)i=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(t)}bu.debug(`Found ${i.length} diagrams`),void 0!==(null==n?void 0:n.startOnLoad)&&(bu.debug("Start On Load: "+(null==n?void 0:n.startOnLoad)),KB.updateSiteConfig({startOnLoad:null==n?void 0:n.startOnLoad}));const o=new xS.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const s=[];for(const c of Array.from(i)){if(bu.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const t=`mermaid-${o.next()}`;a=c.innerHTML,a=eT(xS.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=xS.detectInit(a);r&&bu.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await hL(t,a,c);c.innerHTML=r,e&&await e(t),n&&n(c)}catch(l){QB(l,s,dL.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),rL=mu(function(e){KB.initialize(e)},"initialize"),nL=mu(async function(e,t,r){bu.warn("mermaid.init is deprecated. Please use run instead."),e&&rL(e);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof t?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await eL(n)},"init"),iL=mu(async(e,{lazyLoad:t=!0}={})=>{wB(),td(...e),!1===t&&await kB()},"registerExternalDiagrams"),oL=mu(function(){if(dL.startOnLoad){const{startOnLoad:e}=KB.getConfig();e&&dL.run().catch(e=>bu.error("Mermaid failed to initialize",e))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",oL,!1);var aL=mu(function(e){dL.parseError=e},"setParseErrorHandler"),sL=[],lL=!1,cL=mu(async()=>{if(!lL){for(lL=!0;sL.length>0;){const t=sL.shift();if(t)try{await t()}catch(e){bu.error("Error executing queue",e)}}lL=!1}},"executeQueue"),uL=mu(async(e,t)=>new Promise((r,n)=>{const i=mu(()=>new Promise((i,o)=>{KB.parse(e,t).then(e=>{i(e),r(e)},e=>{var t;bu.error("Error parsing",e),null==(t=dL.parseError)||t.call(dL,e),o(e),n(e)})}),"performCall");sL.push(i),cL().catch(n)}),"parse"),hL=mu((e,t,r)=>new Promise((n,i)=>{const o=mu(()=>new Promise((o,a)=>{KB.render(e,t,r).then(e=>{o(e),n(e)},e=>{var t;bu.error("Error parsing",e),null==(t=dL.parseError)||t.call(dL,e),a(e),i(e)})}),"performCall");sL.push(o),cL().catch(i)}),"render"),dL={startOnLoad:!0,mermaidAPI:KB,parse:uL,render:hL,init:nL,run:eL,registerExternalDiagrams:iL,registerLayoutLoaders:gM,initialize:rL,parseError:void 0,contentLoaded:oL,setParseErrorHandler:aL,detectType:ed,registerIconPacks:iT,getRegisteredDiagramsMetadata:mu(()=>Object.keys(Qh).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},pL=dL;
|
|
151
151
|
/*! Check if previously processed */
|
|
152
152
|
/*!
|
|
153
153
|
* Wait for document loaded before starting the execution
|
|
@@ -245,7 +245,7 @@ const fL=e=>{const{width:t,height:r,zoomable:n=!1}=e;return{root:T.css({position
|
|
|
245
245
|
align-items: center;
|
|
246
246
|
padding: 2px;
|
|
247
247
|
margin-right: 8px;
|
|
248
|
-
`},S=v.useCallback(async e=>{if(e.trim()){const t=u.notConfiguredError;return void(null==o||o(t,e.trim()))}},[d,e,n,i,o,c,p]),_=v.useCallback((e,t)=>{y(t.value)},[]),T=v.useCallback(()=>{var e;y(""),null==(e=b.current)||e.blur(),null==n||n("","")},[n]),A=v.useCallback(e=>{var t;"Enter"===e.key&&!f&&m.trim()?S(m).catch(e=>{c("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=b.current)||t.blur(),y(""),null==n||n("",""))},[S,f,m,n]);return ni(w.SearchBox,{ref:b,css:C,className:s,style:{width:l},placeholder:h,value:m,onChange:_,onKeyDown:A,disabled:a||f,contentBefore:ni("span",{css:k,children:ni(Kc,{size:20})}),dismiss:{onClick:T}})},exports.AISearchIcon=Kc,exports.AISearchIconExample=()=>{const e=Qc();return b.jsxs("div",{className:e.container,children:[b.jsx("h2",{children:"AI Search Icon Examples"}),b.jsxs("div",{className:e.section,children:[b.jsx("h3",{children:"Standard AI Search Icon"}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Small (16px):"}),b.jsx(Kc,{size:16})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Medium (20px):"}),b.jsx(Kc,{size:20})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Large (24px):"}),b.jsx(Kc,{size:24})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Extra Large (32px):"}),b.jsx(Kc,{size:32})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Custom Colors:"}),b.jsx(Kc,{size:24,color:w.tokens.colorPaletteBlueForeground2,aiIndicatorColor:w.tokens.colorPaletteGreenForeground2})]})]}),b.jsxs("div",{className:e.section,children:[b.jsx("h3",{children:"Usage in Buttons"}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Primary Button:"}),b.jsx(w.Button,{appearance:"primary",icon:b.jsx(Kc,{size:16}),children:"AI Search"})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Secondary Button:"}),b.jsx(w.Button,{appearance:"secondary",icon:b.jsx(Kc,{size:16}),children:"Smart Search"})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Icon Only Button:"}),b.jsx(w.Button,{appearance:"subtle",icon:b.jsx(Kc,{size:20}),title:"AI Search"})]})]}),b.jsxs("div",{className:e.section,children:[b.jsx("h3",{children:"Usage Example Code"}),b.jsx("pre",{className:e.codeBlock,children:"// Basic usage\nimport { AISearchIcon } from './AISearchIcon';\n\n// Standard icon with AI badge\n<AISearchIcon size={20} />\n\n// Icon with custom colors\n<AISearchIcon \n size={24} \n color={tokens.colorPaletteBlueForeground2}\n aiIndicatorColor={tokens.colorPaletteGreenForeground2}\n/>\n\n// In a button\n<Button \n appearance=\"primary\"\n icon={<AISearchIcon size={16} />}\n>\n AI Search\n</Button>"})]})]})},exports.AdaptiveCardHost=Uc,exports.AdaptiveCardHostThemeType=co,exports.AppDashboard=({cards:e,containerWidth:t,containerHeight:r="100%",maxSpanRows:n=4,enableDragAndDrop:i=!0,enableCache:o=!0,cacheKeyPrefix:a="app-dashboard",onCardsReorder:s,onCardResize:l})=>{const{warn:c}=Q(),u={dashboardContainer:T.css({display:"grid",padding:"20px",gap:"16px",backgroundColor:w.tokens.colorNeutralBackground2,gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gridAutoRows:"350px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:w.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:w.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:w.tokens.colorNeutralStroke2},justifyContent:"center",gridAutoFlow:"dense"}),cardBody:T.css({display:"flex",flexDirection:"column",height:"100%",minHeight:"320px"}),chartContainer:T.css({flex:1,width:"100%",minHeight:"280px"}),cardDescription:T.css({color:`${w.tokens.colorNeutralForeground2}`}),cardWrapper:T.css({position:"relative",height:"100%",minHeight:"300px",borderRadius:w.tokens.borderRadiusMedium,transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:`${w.tokens.shadow16}`},"&:active":{transform:"translateY(0)",boxShadow:`${w.tokens.shadow8}`}})},h=`${a}-layout-settings`,d=`${a}-card-order`,{getCachedData:p,setCachedData:f}=ee(),g=v.useCallback(e=>p(e),[p]),m=v.useCallback((e,t)=>f(e,t,43200),[f]),{getCachedData:y,setCachedData:x}=ee(),C=v.useCallback(e=>y(e),[y]),k=v.useCallback((e,t)=>x(e,t,43200),[x]),[S,_]=v.useState([]),[A,P]=v.useState({}),E=v.useRef(null),M=v.useRef(null),I=v.useRef(null);v.useEffect(()=>{(async()=>{try{let t=e;const r={};if(o){const[n,i]=await Promise.all([g(h),C(d)]);if(i&&i.length>0){const r=new Map(e.map(e=>[e.id,e])),n=i.filter(e=>r.has(e)),o=e.filter(e=>!i.includes(e.id));t=[...n.map(e=>r.get(e)),...o]}e.forEach(e=>{var t,i;const o=null==n?void 0:n[e.id];r[e.id]={spanCols:(null==o?void 0:o.spanCols)??(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==o?void 0:o.spanRows)??(null==(i=e.defaultSpan)?void 0:i.spanRows)??1}})}else e.forEach(e=>{var t,n;r[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(n=e.defaultSpan)?void 0:n.spanRows)??1}});_(t),P(r)}catch(t){c("Failed to load dashboard data from cache:",t),_(e);const r={};e.forEach(e=>{var t,n;r[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(n=e.defaultSpan)?void 0:n.spanRows)??1}}),P(r)}})()},[e,o,h,d,g,C]),v.useEffect(()=>{if(!o||0===Object.keys(A).length)return;(async()=>{try{await m(h,A)}catch(e){c("Failed to save dashboard layout to cache:",e)}})()},[A,o,h,m]),v.useEffect(()=>{if(!o||0===S.length)return;(async()=>{try{const e=S.map(e=>e.id);await k(d,e)}catch(e){c("Failed to save dashboard order to cache:",e)}})()},[S,o,d,k]),v.useEffect(()=>{t<=600&&P(()=>{const e={};return S.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,S]);const B=v.useMemo(()=>t>600,[t]),{minCardWidth:L,gridGap:j,containerPadding:N}=v.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),D=t-2*N,O=v.useMemo(()=>Math.floor((D+j)/(L+j)),[D,j,L]),F=Math.max(O,1),R=v.useCallback(()=>{if(null!==E.current&&null!==M.current&&E.current!==M.current){const e=[...S],[t]=e.splice(E.current,1);e.splice(M.current,0,t),_(e),s&&s(e)}E.current=null,M.current=null},[S,s]),$=v.useCallback((e,t)=>{const r={spanCols:Math.min(Math.max(t.spanCols,1),F),spanRows:Math.min(Math.max(t.spanRows,1),n)};P(t=>({...t,[e]:r})),l&&l(e,r)},[F,n,l]),z=v.useMemo(()=>S.reduce((e,t)=>{var r,n;return e[t.id]={spanCols:Math.min((null==(r=t.defaultSpan)?void 0:r.spanCols)??1,O),spanRows:(null==(n=t.defaultSpan)?void 0:n.spanRows)??1},e},{}),[S,O]),V=v.useMemo(()=>S.map((e,t)=>{var o,a,s,l;const c=!1!==e.showZoom&&B,h=e.headerAction||(c?b.jsx(EL,{values:A[e.id]||z[e.id]||{spanCols:1,spanRows:1},maxCols:F,maxRows:n,IsOpen:!1,onChange:t=>$(e.id,t)}):void 0);return b.jsx("div",{className:u.cardWrapper,draggable:i,onDragStart:()=>i&&(E.current=t),onDragEnter:()=>i&&(M.current=t),onDragOver:e=>i&&e.preventDefault(),onDragEnd:i?R:void 0,style:{gridColumnEnd:(null==(o=A[e.id])?void 0:o.spanCols)?`span ${A[e.id].spanCols}`:`span ${(null==(a=z[e.id])?void 0:a.spanCols)||1}`,gridRowEnd:(null==(s=A[e.id])?void 0:s.spanRows)?`span ${A[e.id].spanRows}`:`span ${(null==(l=z[e.id])?void 0:l.spanRows)||1}`,cursor:i?"grab":"default"},children:b.jsxs(w.Card,{className:`${u.cardBody} ${e.className||""}`,children:[b.jsx(w.CardHeader,{header:b.jsxs(bt,{gap:"0px",children:[b.jsx(w.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&b.jsx(w.Text,{className:u.cardDescription,size:200,children:e.cardDescription})]}),action:h}),b.jsx("div",{className:u.chartContainer,style:{height:r,...e.style},children:e.content})]})},e.id)}),[S,i,R,A,u.cardBody,u.cardDescription,u.chartContainer,u.cardWrapper,B,F,n,$,r,z]);return 0===S.length?b.jsx(PL,{}):b.jsx("div",{ref:I,className:u.dashboardContainer,style:{height:r},children:V})},exports.AspectRatio=({ratio:e,children:t,maxWidth:r,maxHeight:n,style:i={},...o})=>{const a={position:"relative",width:"100%",paddingTop:100/e+"%",maxWidth:r||"none",maxHeight:n||"none",...i};return b.jsx("div",{style:a,...o,children:b.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:t})})},exports.Breadcrumb=({items:e,maxWidth:t="100%",styles:r,theme:n,size:i="medium",currentIndex:o=e.length-1,className:a})=>{const{styles:s,getStyles:l}=Et(),c=v.useRef(null),[u,h]=v.useState([]),[d,p]=v.useState([]);return v.useEffect(()=>{const t=()=>{if(!c.current)return;const t=c.current.offsetWidth;let r=0;const n=[],i=[];e.forEach(e=>{r+80<=t-50?(n.push(e),r+=80):i.push(e)}),h(n),p(i)},r=((e,t)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}})(t,100),n=new _.ResizeObserver(()=>{r()});return c.current&&n.observe(c.current),t(),()=>{n.disconnect()}},[e]),b.jsx("div",{ref:c,className:w.mergeClasses(s.container,a),style:{maxWidth:t,...r},children:b.jsxs(ft,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[u.map((e,t)=>b.jsxs(v.Fragment,{children:[t===o?b.jsxs(ft,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?v.cloneElement(e.icon,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}}):null,b.jsx(w.Text,{className:w.mergeClasses(s.breadcrumbItem,l(e,i),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):b.jsx(w.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:b.jsx(w.Text,{className:l(e,i),children:e.label})},e.label),t<u.length-1&&b.jsx(P.ChevronRightRegular,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}})]},e.label??`breadcrumb-${t}`)),d.length>0&&b.jsx(Mt,{items:d,theme:n})]})})},exports.ButtonMenu=Pt,exports.CalendarControl=({events:e,height:t=800,theme:r,onDayChange:n,onMonthChange:i,onWeekChange:o,onViewChange:a,onDaySlotClick:s,defaultView:l,strings:c})=>{const{styles:u}=Ft(),h=v.useRef(null),[d,p]=v.useState(null),f=v.useRef(0),[g,m]=v.useState(new Date),[y,x]=v.useState(l??rr.Month),{getMonthCalendar:C}=Kt(Intl.DateTimeFormat().resolvedOptions().timeZone),S=q.useCallback(e=>{const t=e.getMonth(),r=k.startOfMonth(e),n=k.startOfWeek(r);return Array.from({length:42},(e,r)=>{const i=k.addDays(n,r);return{day:i.getDate(),currentMonth:i.getMonth()===t,date:i}})},[42]),T=q.useCallback(e=>{i&&i(e),m(e)},[i]),A=q.useCallback(e=>{n&&n(e),m(e)},[n]),P=q.useCallback(e=>{o&&o(e),m(e)},[o]),E=q.useCallback(e=>{a&&a(e),x(e)},[a]),M=q.useCallback(t=>{var r;const{date:n}=t;return(null==(r=C(e,g.getFullYear(),g.getMonth())[k.format(n,"yyyy-MM-dd")])?void 0:r.flatMap(e=>e))||[]},[g,e]),I=q.useCallback(()=>{h.current&&requestAnimationFrame(()=>{if(h.current){const e=h.current.querySelector(`.${u.calendarWrapper} > div:nth-child(8)`);e&&(p(e.offsetHeight),f.current=e.offsetHeight)}})},[u.calendarWrapper]);v.useEffect(()=>{const e=new _.ResizeObserver(I);return h.current&&e.observe(h.current),I(),window.addEventListener("resize",I),()=>{e.disconnect(),window.removeEventListener("resize",I)}},[I,y]),v.useEffect(()=>{x(l||rr.Month)},[l]);const B=q.useCallback(()=>{switch(y){case rr.Month:return b.jsx(xr,{events:e,currentDate:g,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl});case rr.Week:return b.jsx(br,{events:e,currentDay:g,height:t,strings:null==c?void 0:c.weekView});case rr.Day:return b.jsx(vr,{events:e,currentDay:g,height:t,strings:null==c?void 0:c.dayView});default:return b.jsx(xr,{events:e,currentDate:g,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl})}},[y,e,g,d,S,M,u,s,t]),L=b.jsxs(ft,{height:"100%",verticalAlign:"start",children:[b.jsx(fr,{selectedView:y,onSelectedView:E,currentDate:g,setCurrentDate:m,onWeekChange:P,onMonthChange:T,onDayChange:A,strings:null==c?void 0:c.toolbar}),b.jsx(B,{})]});return b.jsx(w.IdPrefixProvider,{value:"calendarControl-",children:r?b.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:!0,style:{width:"100%"},children:L}):b.jsx("div",{style:{width:"100%"},children:L})})},exports.CalendarMonth=sr,exports.Card=lt,exports.Carousel=e=>{const{className:t,items:r,title:n}=e,i=q.useRef(null),[o,a]=q.useState(0),[s,l]=q.useState(0),{carouselStyles:c}=(e=>{const{styles:t}=e,{getBaseStyles:r}=ne();return{carouselStyles:q.useCallback((n,i)=>({...r(e,n,i),...t}),[r,e,t])}})(e),[u,h]=A(),d={titleStyles:T.css({display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",textAlign:"start",height:"25px"})},{enableControls:p,embla__slide:f,embla__container:g,embla__viewport:m,embla__buttons:y}=((e,t)=>{const{getCurrentDevice:r}=ne(),n=q.useCallback(()=>{let e="95%";switch(r(t)){case"Medium":e="45%";break;case"Large":e="calc(95% / 4)";break;case"ExtraLarge":e="calc(95% / 5)";break;case"ExtraExtraLarge":e="calc(95% / 6)";break;default:e="95%"}return e},[t,r]),i=q.useCallback(()=>{const e=r(t);let n=w.tokens.spacingVerticalM;switch(e){case"Medium":default:n=w.tokens.spacingVerticalM;break;case"Large":n=w.tokens.spacingVerticalL;break;case"ExtraLarge":n=w.tokens.spacingVerticalXL}return n},[t,r]);return{enableControls:T.css({display:"flex",justifyContent:"space-between",alignItems:"stretch",gap:10,padding:5}),embla__viewport:T.css({overflow:"hidden",paddingTop:"10px",paddingBottom:"20px"}),embla__container:T.css({backfaceVisibility:"hidden",display:"flex",touchAction:"pan-y"}),embla:T.css({".embla":{}}),embla__slide:T.css({minWidth:0,flex:`0 0 ${n()}`,paddingLeft:`${i()}`}),embla__buttons:T.css({display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:0,alignItems:"center"})}})(0,o),{prevBtnDisabled:x,nextBtnDisabled:C,onPrevButtonClick:k,onNextButtonClick:S}=(e=>{const[t,r]=v.useState(!0),[n,i]=v.useState(!0),o=v.useCallback(()=>{e&&e.scrollPrev()},[e]),a=v.useCallback(()=>{e&&e.scrollNext()},[e]),s=v.useCallback(e=>{r(!e.canScrollPrev()),i(!e.canScrollNext())},[]);return v.useEffect(()=>{e&&(s(e),e.on("reInit",s),e.on("select",s))},[e,s]),{prevBtnDisabled:t,nextBtnDisabled:n,onPrevButtonClick:o,onNextButtonClick:a}})(h);return q.useEffect(()=>{let e;return i.current&&(e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;a(e),l(r)}}),a(i.current.clientWidth),l(i.current.clientHeight),e.observe(i.current)),()=>{e&&e.disconnect()}},[]),b.jsx(b.Fragment,{children:b.jsxs("div",{id:"-carousel",className:w.mergeClasses(t,"embla"),style:{...c(o,s)},ref:i,children:[b.jsxs("div",{className:p,children:[b.jsx(w.Subtitle2,{className:d.titleStyles,children:n}),b.jsxs("div",{className:y,children:[b.jsx(w.Button,{onClick:k,disabled:x,appearance:"subtle",icon:b.jsx(P.ChevronLeftRegular,{})}),b.jsx(w.Button,{onClick:S,disabled:C,appearance:"subtle",icon:b.jsx(P.ChevronRightRegular,{})})]})]}),b.jsx("div",{className:m,ref:u,children:b.jsx("div",{className:g,children:r.map((e,t)=>b.jsx("div",{className:f,children:e},t))})})]})})},exports.Center=mt,exports.ChatInput=eu,exports.ChatInputWithMensions=iu,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:r,placeholder:n,onSend:i,theme:o,isRunning:a,onAbort:s})=>{const[l,c]=v.useState(r||""),[u,h]=v.useState(!1),d=v.useRef(null),p=x.useAIAssistantStrings(),[f,g]=v.useState({top:0,left:0}),[m,y]=v.useState([]),C=v.useRef({}),k=nu(),{warn:S,error:_}=Q();v.useEffect(()=>{var e;null==(e=d.current)||e.focus(),c(r||"")},[r]);const T=v.useCallback(it(async t=>{const r=await(async t=>{var r,n;if(C.current[t])return C.current[t];if(!(null==e?void 0:e.graphClient))return S("Graph client not available"),[];try{const i=t&&t.length>0?`/users?$filter=startswith(displayName,'${t}')`:"/users?$orderby=displayName&$top=10",o=await e.graphClient.get(i),a=(null==o?void 0:o.value)||[],s=(null==(n=null==(r=e.pageContext)?void 0:r.web)?void 0:n.absoluteUrl)||"";return a.forEach(e=>{e.avatar=s?`${s}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),C.current[t]=a,a}catch(i){return _("Error fetching users from Graph:",i instanceof Error?i:void 0),[]}})(t);r.sort((e,t)=>e.displayName.localeCompare(t.displayName)),y(r),h(!0),setTimeout(()=>{var e;null==(e=d.current)||e.focus()},0)},300),[e]),A=e=>{var r;const n=l.replace(/@(\w*)$/,`@${e} `);c(n),t&&t(n),h(!1),y([]),null==(r=d.current)||r.focus()},P=v.useCallback(({users:e})=>b.jsxs("div",{className:k.listContainer,children:[0===e.length&&b.jsx(w.Caption1,{children:p.noUsersFound}),e.map(e=>b.jsx(w.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.mail),children:b.jsx(w.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[k.listContainer,A]);return b.jsxs(ft,{horizontal:!0,width:"100%",className:k.inputContainer,children:[b.jsx(eu,{ref:d,onSend:i,value:l,onChange:async e=>{var r;c(e),t&&t(e),null==(r=d.current)||r.focus();const n=e.lastIndexOf("@");if(-1===n||0!==n&&" "!==e[n-1])h(!1);else{const t=e.slice(n+1);await T(t);const r=d.current;if(r){const e=$(r,n),t=r.getBoundingClientRect(),i=t.top+e.top+22,o=t.left+e.left+16;g({top:i,left:o})}}},theme:o,placeholder:n,isRunning:a,onAbort:s}),b.jsxs(vt,{theme:o,anchorPoint:f,isOpen:u,onClose:()=>h(!1),excludeRefs:[d],children:[b.jsx(w.CardHeader,{header:b.jsx(w.Body1Strong,{className:k.sugestionsHeader,children:"Sugestions"})}),b.jsx(w.Divider,{}),b.jsx(P,{users:m})]})]})},exports.ChatList=uu,exports.Color=ju,exports.Color$1=yg,exports.Container=e=>{const{className:t,children:r,style:n,alignItems:i="center",justifyContent:o="center",flexDirection:a="row",centerContent:s=!0}=e,l=q.useRef(null),[c,u]=q.useState(0),[h,d]=q.useState(0),{containerStyles:p}=(e=>{const{maxWidth:t}=e,{getBaseStyles:r}=ne();return{containerStyles:q.useCallback((n,i)=>n&&i?{...r(e,n,i),maxWidth:t}:{},[r,t,e])}})(e),f=q.useMemo(()=>S.debounce(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;u(e),d(r)}},200),[]);q.useEffect(()=>{const e=new _.ResizeObserver(e=>{f(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),f.cancel()}},[f]);const g=q.useMemo(()=>{if(!n)return;const{padding:e,margin:t,...r}=n;return r},[n]);return b.jsx("div",{id:"container",className:t,style:{...p(c,h),display:"flex",justifyContent:o,alignItems:i,flexDirection:a,...g},ref:l,children:s?b.jsx(mt,{children:r}):r})},exports.ContentRenderer=cu,exports.ContentType=ot,exports.CustomControlBar=({items:e,selectedItemId:t,onSelectedItem:r,renderControl:n,theme:i})=>{const o={container:T.css({display:"flex",flexWrap:"nowrap",minWidth:0,overflow:"hidden",gap:10,marginBottom:20,width:"100%"}),text1LineStyle:T.css({display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),button:T.css({cursor:"pointer",minWidth:107})},a=q.useCallback(e=>{r&&r(e)},[r]);return b.jsx(w.Overflow,{children:b.jsxs(w.FluentProvider,{theme:i,children:[" ",b.jsxs("div",{className:w.mergeClasses(o.container),children:[e.map(e=>{const r=e.id===t;return b.jsx(w.OverflowItem,{id:e.id,priority:r?2:1,children:n(e,r,()=>a(e.id))},e.id)}),b.jsx(Ai,{items:e,onSelectedItem:a,theme:i})," "]})]})})},exports.DataGrid=e=>{const{items:t,columns:r,defaultSelectedItems:n=[],enableSorting:i=!1,selectionMode:o="none",onSelectionChange:a,onSortChange:s,defaultSortState:l,columnSizingOptions:c,enableResizing:u=!1,noItemsMessage:h,isLoadingData:d,isLoadingDataMessage:p,dataGridBodyClassName:f,dataGridBodyStyles:g,refreshData:m}=e,y=e=>t.findIndex(t=>t===e),[x,v]=q.useState(new Set(n.map(e=>y(e)))),C=q.useRef(null),{styles:k}=yi();q.useEffect(()=>{n.length>0&&v(new Set(n.map(e=>y(e))))},[n,t]),q.useEffect(()=>{m&&v(new Set)},[m]);const S=r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>b.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>b.jsx(w.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[null==e?void 0:e.column]??"")}),compare:e.order})),_=q.useCallback((e,t)=>{e.stopPropagation(),"row"===o&&a&&a([t])},[o,a]),T=q.useMemo(()=>"row"===o?k.rowSelection:"",[o,k.rowSelection]),A=q.useCallback(()=>b.jsx(w.DataGridBody,{style:g??{},className:f??"",children:({item:e,rowId:t})=>b.jsx(w.DataGridRow,{className:T,onClick:t=>_(t,e),children:({renderCell:t})=>b.jsx(w.DataGridCell,{children:t(e)})},t)}),[_,T,g,f]),P=q.useMemo(()=>t.length&&!d,[t,d]),E=q.useCallback(()=>d?b.jsx(b.Fragment,{children:p??b.jsx(mi,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:b.jsx(w.Spinner,{})})}):P?b.jsx(A,{}):d||t.length?b.jsx(b.Fragment,{}):b.jsx("div",{children:h}),[P,d,t,h]);return b.jsx("div",{ref:C,children:b.jsxs(w.DataGrid,{as:"div",items:t,onSelectionChange:(e,r)=>{const n=new Set;if(r.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||n.add(t)}),v(n),a){const e=Array.from(n).map(e=>t[e]);a(e)}},sortable:i,columns:S,selectionMode:"none"===o||"row"===o?void 0:"multiple"===o?"multiselect":"single"===o?"single":void 0,selectedItems:x,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:c,resizableColumns:u,resizableColumnsOptions:{autoFitColumns:!1},children:[b.jsx(w.DataGridHeader,{children:b.jsx(w.DataGridRow,{children:({renderHeaderCell:e})=>b.jsx(w.DataGridHeaderCell,{children:e()})})}),b.jsx(E,{})]})})},exports.DataGridV2=bi,exports.DropdownField=({options:e,onChange:t,renderItem:r,validate:n,label:i,placeholder:o,message:a,messageType:s,required:l,size:c,hint:u})=>{const[h,d]=v.useState(""),[p,f]=v.useState(""),[g,m]=v.useState(""),y={tagPickerControl:T.css({border:`1px solid ${w.tokens.colorNeutralStroke2} !important`,borderRadius:"50px !important",backgroundColor:`${w.tokens.colorNeutralBackground1} !important`,padding:"0px 10px",boxShadow:"none",transition:"all 0.2s ease !important","&::after":{display:"none !important"},"&:hover":{borderColor:`${w.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${w.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${w.tokens.colorBrandBackground2} !important`}})},x=q.useMemo(()=>g?"error":"warning"===s?"warning":"info"===s?"success":"none",[g,s]),C=q.useMemo(()=>g||a,[g,a]),k=q.useCallback(()=>{switch(x){case"error":return b.jsx(P.ErrorCircle12Filled,{});case"warning":return b.jsx(P.Warning12Filled,{});case"success":return b.jsx(P.CheckmarkCircle12Filled,{});default:return null}},[x]);return b.jsx(w.Field,{label:i,required:l,validationMessage:C,validationMessageIcon:k(),size:c,hint:u,validationState:x,children:b.jsx(w.Dropdown,{placeholder:o,onOptionSelect:(e,r)=>{const i=r.optionValue||"",o=r.optionText||"";d(i),f(o);const a=n?n(i):"";m(a),!a&&t&&t(i)},value:p,selectedOptions:h?[h]:[],className:y.tagPickerControl,children:e.map(e=>b.jsxs(w.Option,{value:e.value,disabled:e.disabled,checkIcon:e.checkIcon,as:e.as,text:e.text||"",children:[r&&r(e)," "]},e.value))})})},exports.EBreakPoints=J,exports.ECalendarViews=rr,exports.EGoalMetric=LL,exports.EMessageType=Y,exports.FluentUIProvider=e=>{const t=q.useId(),{theme:r=w.webLightTheme,applicationName:n=t,targetDocument:i=document,applyStylesToPortals:o=!0,styles:a,children:s}=e;return b.jsx(w.IdPrefixProvider,{value:n,children:b.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:o,targetDocument:i,style:a,children:s})})},exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu();return o?b.jsxs(w.Menu,{children:[b.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:b.jsxs(w.MenuButton,{ref:n,children:["+",i," items"]})}),b.jsx(w.MenuPopover,{children:b.jsx(w.MenuList,{children:e.map(e=>b.jsx(Pi,{id:r(e),children:t(e)},r(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:r}=e,{gridStyles:n}=ct(e),i=q.useRef(null),[o,a]=q.useState(0),[s,l]=q.useState(0);return q.useEffect(()=>{let e;return i.current&&(e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;a(e),l(r)}}),e.observe(i.current)),()=>{e&&e.disconnect()}},[]),b.jsx(b.Fragment,{children:b.jsx("div",{className:r,style:n(o,s),ref:i,children:t})})},exports.IconButton=It,exports.InputField=({value:e,type:t="text",shape:r="normal",onChange:n,validate:i,label:o,placeholder:a,message:s,messageType:l,required:c,size:u,hint:h,disabled:d,readOnly:p,min:f,max:g,step:m,contentBefore:y,contentAfter:C})=>{const[k,S]=v.useState(void 0!==e?String(e):""),[_,A]=v.useState(""),E={inputRoot:T.css({border:`1px solid ${w.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${w.tokens.colorNeutralStroke2} !important`,borderRadius:"50px !important",backgroundColor:`${w.tokens.colorNeutralBackground1} !important`,padding:"0px 10px !important",boxShadow:"none !important",transition:"all 0.2s ease","&::after":{display:"none !important",borderWidth:"0 !important",content:'"none !important"'},"&:hover":{borderColor:`${w.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${w.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${w.tokens.colorBrandBackground2} !important`}})},M=x.useInputFieldStrings(),I=void 0!==e,B=I?String(e):k,L=v.useCallback(e=>{if(c&&""===e.trim())return"number"===t?M.numberRequired:M.fieldRequired;if("number"===t&&""!==e.trim()){const t=Number(e);if(isNaN(t))return M.invalidNumber;if(void 0!==f&&t<f)return M.valueMustBeAtLeast.replace("{0}",String(f));if(void 0!==g&&t>g)return M.valueMustBeAtMost.replace("{0}",String(g))}if(i){const r="number"===t&&""!==e.trim()?Number(e):e;return i(r)}return""},[c,t,i,f,g,M]),j=v.useCallback((e,r)=>{const i=r.value;if("number"===t&&""!==i&&!/^-?\d*\.?\d*$/.test(i))return;I||S(i);const o=L(i);if(A(o),!o&&n){const e="number"===t&&""!==i.trim()?Number(i):i;n(e)}},[t,I,L,n]),N=v.useCallback(()=>{const e=L(B);A(e)},[L,B]),D=v.useMemo(()=>_?"error":"warning"===l?"warning":"info"===l?"success":"none",[_,l]),O=v.useMemo(()=>_||s,[_,s]),F=v.useCallback(()=>{switch(D){case"error":return b.jsx(P.ErrorCircle12Filled,{});case"warning":return b.jsx(P.Warning12Filled,{});case"success":return b.jsx(P.CheckmarkCircle12Filled,{});default:return null}},[D]),R="circular"===r?E.inputRoot:void 0;return b.jsx(w.Field,{label:o,required:c,validationMessage:O,validationMessageIcon:F(),size:u,hint:h,validationState:D,children:b.jsx(w.Input,{value:B,placeholder:a,onChange:j,onBlur:N,disabled:d,readOnly:p,type:"text",inputMode:"number"===t?"decimal":"text",step:"number"===t?m:void 0,className:R,contentBefore:y,contentAfter:C})})},exports.ItemPicker=({options:e,selectedOptions:t=[],onSelectionChange:r,onSearchChange:n,onLoadMore:i,pagingInfo:o,placeholder:a,disabled:s=!1,maxSelectedOptions:l,width:c,className:u,noResultsMessage:h,loadingMessage:d,loadingMoreMessage:p,searchDebounceMs:f=300})=>{const g={container:T.css({display:"flex",flexDirection:"column",gap:w.tokens.spacingVerticalS,position:"relative"}),pickerList:T.css({maxHeight:300,overflowY:"auto",backgroundColor:w.tokens.colorNeutralBackground1,border:`1px solid ${w.tokens.colorNeutralStroke2}`,borderRadius:w.tokens.borderRadiusMedium,boxShadow:w.tokens.shadow16,scrollbarColor:`${w.tokens.colorBrandForeground1} ${w.tokens.colorNeutralBackground1}`,scrollbarWidth:"thin","&::-webkit-scrollbar-track":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar-thumb":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar":{height:7,width:7}}),optionContent:T.css({display:"flex",flexDirection:"column",gap:w.tokens.spacingVerticalXXS}),optionSecondary:T.css({fontSize:w.tokens.fontSizeBase200,color:w.tokens.colorNeutralForeground3,fontWeight:w.tokens.fontWeightRegular}),tagPickerControl:T.css({}),tagPickerInput:T.css({backgroundColor:"transparent",border:"none",outline:"none",fontSize:w.tokens.fontSizeBase300,"&::placeholder":{color:w.tokens.colorNeutralForeground4},"&:focus":{outline:"none"}})},m=x.useItemPickerStrings(),y=a||m.placeholder,C=h||m.noResultsFound,k=d||m.searching,S=p||m.loadingMore,[_,A]=v.useState(""),P=v.useRef(null),E=v.useRef(null),M=t.map(e=>e.value),I=(null==o?void 0:o.isLoading)??!1,B=(null==o?void 0:o.isLoadingMore)??!1,L=(null==o?void 0:o.hasMore)??!1,j=e.filter(e=>!M.includes(e.value)),N=v.useCallback(e=>{A(e),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{null==n||n(e)},f)},[n,f]),D=v.useCallback(e=>{if(!L||B)return;const{scrollTop:t,scrollHeight:r,clientHeight:n}=e.currentTarget;t+n>=r-100&&(null==i||i())},[L,B,i]),O=v.useCallback((i,o)=>{if("no-options"===o.value||"loading"===o.value||"loading-more"===o.value)return;const a=o.selectedOptions,s=t.filter(e=>a.includes(e.value));if(a.length>M.length){const r=a.find(e=>!M.includes(e));if(r){const n=e.find(e=>e.value===r);if(n){if(l&&t.length>=l)return;s.push(n)}}A(""),null==n||n("")}null==r||r(s)},[e,t,M,r,n,l]);return v.useEffect(()=>()=>{P.current&&clearTimeout(P.current)},[]),b.jsx("div",{className:`${g.container} ${u||""}`,...c&&{style:{width:c}},children:b.jsxs(w.TagPicker,{onOptionSelect:O,selectedOptions:M,disabled:s,children:[b.jsxs(w.TagPickerControl,{className:g.tagPickerControl,children:[b.jsx(w.TagPickerGroup,{"aria-label":m.selectedItems,children:t.map(e=>b.jsx(w.Tag,{shape:"circular",media:e.tagMedia??e.media,value:e.value,dismissible:!0,disabled:s,style:{minHeight:30},children:e.text},e.value))}),b.jsx(w.TagPickerInput,{className:g.tagPickerInput,"aria-label":m.searchItems,placeholder:y,value:_,onChange:e=>N(e.target.value),disabled:s})]}),b.jsx(w.TagPickerList,{ref:E,onScroll:D,className:g.pickerList,children:I?b.jsx(w.TagPickerOption,{value:"loading",children:k}):j.length>0?b.jsxs(b.Fragment,{children:[j.map(e=>b.jsx(w.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:b.jsxs("div",{className:g.optionContent,children:[b.jsx(w.Text,{weight:"semibold",children:e.text}),e.secondaryText&&b.jsx(w.Text,{size:200,className:g.optionSecondary,children:e.secondaryText})]})},e.value)),B&&b.jsx(w.TagPickerOption,{value:"loading-more",children:S})]}):b.jsx(w.TagPickerOption,{value:"no-options",children:C})})]})})},exports.JSON_SCHEMA=gC,exports.KPICard=jL,exports.KPICardCompact=OL,exports.KPICardSkeleton=NL,exports.Kpis=e=>{const{skeletonCount:t=3,compact:r=!1}=e,n=BL(),i=FL;return q.useCallback(()=>Array.from({length:t}).map((e,t)=>b.jsx(NL,{},`kpi-skeleton-${t}`)),[t]),b.jsx(b.Fragment,{children:b.jsx(bt,{gap:"l",direction:"horizontal",padding:"l",paddingTop:"s",children:b.jsx(b.Fragment,{children:b.jsx("div",{className:n.kpiContainer,children:i.length>0?i.map(e=>r?b.jsx(OL,{dataCard:e},e.identifier):b.jsx(jL,{dataCard:e},e.identifier)):b.jsx(DL,{})})})})})},exports.Layout=e=>{const{className:t,children:r,layoutConfig:n=ht}=e,i=q.useRef(null),[o,a]=q.useState(0),[s,l]=q.useState(0),{rootStyles:c,layoutGridStyles:u}=ut({...e,layoutConfig:n}),h=((e,t)=>{let r;return q.useCallback((...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return q.useEffect(()=>{if(!i.current)return;const e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;h(e,r)}});return e.observe(i.current),()=>e.disconnect()},[h]),b.jsx("div",{id:"-Layout",className:w.mergeClasses(t,u),style:{...c(o,s),gridTemplateAreas:n.areas.join(" "),gridTemplateColumns:n.columns,gridTemplateRows:n.rows},ref:i,children:q.Children.map(r,(e,t)=>{var r;if(q.isValidElement(e)){const n=e;return b.jsx("div",{style:{gridArea:(null==(r=n.props)?void 0:r.area)??`area-${t}`},children:e},t)}return e})})},exports.LayoutItem=e=>{const{area:t,children:r}=e;return b.jsx(b.Fragment,{children:b.jsx("div",{style:{gridArea:t},children:r})})},exports.ListItemActivityMessage=({siteId:e,listId:t,itemId:r,currentUserEmail:n,strings:i,context:o})=>{var a,s,l,c,u,h,d,p,f,g,m;const{getItemActivities:y}=(e=>{const t=K(),r=e||t,n=null==r?void 0:r.graphClient,{warn:i,error:o}=Q();return{getItemActivities:v.useCallback(async(e,t,r)=>{if(!n)return i("Graph client not available for SharePoint activities"),{activities:[]};try{const i=await n.get(`/sites/${e}/lists/${t}/items/${r}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return i&&i.value?{activities:i.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(a){throw o("Error fetching SharePoint activities:",a instanceof Error?a:void 0),a}},[n])}})(o),C=x.useListItemActivityStrings(),{warn:w,error:k}=Q(),S=new Map([["access",{message:(null==i?void 0:i.access)||C.accessed||(null==(a=TL.get("access"))?void 0:a.message)||"",icon:b.jsx(P.OpenRegular,{style:SL})}],["comment",{message:(null==i?void 0:i.comment)||C.commented||(null==(s=TL.get("comment"))?void 0:s.message)||"",icon:b.jsx(P.CommentRegular,{style:SL})}],["create",{message:(null==i?void 0:i.create)||C.created||(null==(l=TL.get("create"))?void 0:l.message)||"",icon:b.jsx(P.AddRegular,{style:SL})}],["delete",{message:(null==i?void 0:i.delete)||C.deleted||(null==(c=TL.get("delete"))?void 0:c.message)||"",icon:b.jsx(P.DeleteRegular,{style:SL})}],["edit",{message:(null==i?void 0:i.edit)||C.edited||(null==(u=TL.get("edit"))?void 0:u.message)||"",icon:b.jsx(P.EditRegular,{style:SL})}],["mention",{message:(null==i?void 0:i.mention)||C.mentioned||(null==(h=TL.get("mention"))?void 0:h.message)||"",icon:b.jsx(P.MentionRegular,{style:SL})}],["move",{message:(null==i?void 0:i.move)||C.moved||(null==(d=TL.get("move"))?void 0:d.message)||"",icon:b.jsx(P.ArrowMoveRegular,{style:SL})}],["rename",{message:(null==i?void 0:i.rename)||C.renamed||(null==(p=TL.get("rename"))?void 0:p.message)||"",icon:b.jsx(P.RenameRegular,{style:SL})}],["restore",{message:(null==i?void 0:i.restore)||C.restored||(null==(f=TL.get("restore"))?void 0:f.message)||"",icon:b.jsx(P.ArrowSyncRegular,{style:SL})}],["share",{message:(null==i?void 0:i.share)||C.shared||(null==(g=TL.get("share"))?void 0:g.message)||"",icon:b.jsx(P.PeopleRegular,{style:SL})}],["version",{message:(null==i?void 0:i.version)||C.versioned||(null==(m=TL.get("version"))?void 0:m.message)||"",icon:b.jsx(P.HistoryRegular,{style:SL})}]]),[_,T]=q.useState({message:"",icon:b.jsx(b.Fragment,{})}),[A,E]=q.useState(!0),M=q.useRef(void 0),I=q.useRef(void 0),[B]=q.useState(30),L=q.useCallback(e=>e.user.email===n,[n]),j=q.useCallback(e=>{if(!e)return{message:"",icon:b.jsx(b.Fragment,{})};const{action:t,actor:r}=e,{displayName:n}=(null==r?void 0:r.user)||{displayName:""},i=_L.find(e=>t[e]);if(i){const e=S.get(i);if(e){return{message:`${L(r)?C.you:n} ${e.message}`,icon:e.icon}}}return{message:"",icon:b.jsx(b.Fragment,{})}},[S,L]);return q.useEffect(()=>{var e;null==(e=I.current)||e.setPlaybackRate(B/100)},[B,A]),q.useEffect(()=>{let n=!1;const i=async(o=1e3)=>{var a;if(e&&t&&r)try{const i=await y(e,t,r);if(n)return;const o=i.activities[0];M.current&&JSON.stringify(M.current)===JSON.stringify(o)||(M.current=o,T(j(o)))}catch(s){if(429===s.status){const e=null==(a=s.headers)?void 0:a.get("Retry-After"),t=e?1e3*parseInt(e,10):o;return w(`Throttled. Retrying after ${t}ms`),void setTimeout(()=>i(2*t),t)}k("Activity Error",s instanceof Error?s:void 0)}finally{n||E(!1)}},o=setTimeout(()=>{i()},1e3);return()=>{clearTimeout(o),n=!0}},[e,t,r,y,j]),b.jsx(V.Fade,{imperativeRef:I,visible:!A,children:b.jsx("div",{children:b.jsxs(ft,{horizontal:!0,verticalAlign:"center",horizontalAlign:"center",RowGap:4,columnGap:4,children:[_.icon," ",_.message]})})})},exports.ListToolbar=({items:e,farItems:t=[],isLoading:r=!1,ariaLabel:n="Toolbar",totalCount:i,className:o,showGroupDividers:a=!0})=>{const s={toolbar:T.css`
|
|
248
|
+
`},S=v.useCallback(async e=>{if(e.trim()){const t=u.notConfiguredError;return void(null==o||o(t,e.trim()))}},[d,e,n,i,o,c,p]),_=v.useCallback((e,t)=>{y(t.value)},[]),T=v.useCallback(()=>{var e;y(""),null==(e=b.current)||e.blur(),null==n||n("","")},[n]),A=v.useCallback(e=>{var t;"Enter"===e.key&&!f&&m.trim()?S(m).catch(e=>{c("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=b.current)||t.blur(),y(""),null==n||n("",""))},[S,f,m,n]);return ni(w.SearchBox,{ref:b,css:C,className:s,style:{width:l},placeholder:h,value:m,onChange:_,onKeyDown:A,disabled:a||f,contentBefore:ni("span",{css:k,children:ni(Kc,{size:20})}),dismiss:{onClick:T}})},exports.AISearchIcon=Kc,exports.AISearchIconExample=()=>{const e=Qc();return b.jsxs("div",{className:e.container,children:[b.jsx("h2",{children:"AI Search Icon Examples"}),b.jsxs("div",{className:e.section,children:[b.jsx("h3",{children:"Standard AI Search Icon"}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Small (16px):"}),b.jsx(Kc,{size:16})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Medium (20px):"}),b.jsx(Kc,{size:20})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Large (24px):"}),b.jsx(Kc,{size:24})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Extra Large (32px):"}),b.jsx(Kc,{size:32})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Custom Colors:"}),b.jsx(Kc,{size:24,color:w.tokens.colorPaletteBlueForeground2,aiIndicatorColor:w.tokens.colorPaletteGreenForeground2})]})]}),b.jsxs("div",{className:e.section,children:[b.jsx("h3",{children:"Usage in Buttons"}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Primary Button:"}),b.jsx(w.Button,{appearance:"primary",icon:b.jsx(Kc,{size:16}),children:"AI Search"})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Secondary Button:"}),b.jsx(w.Button,{appearance:"secondary",icon:b.jsx(Kc,{size:16}),children:"Smart Search"})]}),b.jsxs("div",{className:e.iconRow,children:[b.jsx("span",{className:e.label,children:"Icon Only Button:"}),b.jsx(w.Button,{appearance:"subtle",icon:b.jsx(Kc,{size:20}),title:"AI Search"})]})]}),b.jsxs("div",{className:e.section,children:[b.jsx("h3",{children:"Usage Example Code"}),b.jsx("pre",{className:e.codeBlock,children:"// Basic usage\nimport { AISearchIcon } from './AISearchIcon';\n\n// Standard icon with AI badge\n<AISearchIcon size={20} />\n\n// Icon with custom colors\n<AISearchIcon \n size={24} \n color={tokens.colorPaletteBlueForeground2}\n aiIndicatorColor={tokens.colorPaletteGreenForeground2}\n/>\n\n// In a button\n<Button \n appearance=\"primary\"\n icon={<AISearchIcon size={16} />}\n>\n AI Search\n</Button>"})]})]})},exports.AdaptiveCardHost=Uc,exports.AdaptiveCardHostThemeType=co,exports.AppDashboard=({cards:e,containerWidth:t,containerHeight:r="100%",maxSpanRows:n=4,enableDragAndDrop:i=!0,enableCache:o=!0,cacheKeyPrefix:a="app-dashboard",onCardsReorder:s,onCardResize:l})=>{const{warn:c}=Q(),u={dashboardContainer:T.css({display:"grid",padding:"20px",gap:"16px",backgroundColor:w.tokens.colorNeutralBackground2,gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gridAutoRows:"350px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:w.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:w.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:w.tokens.colorNeutralStroke2},justifyContent:"center",gridAutoFlow:"dense"}),cardBody:T.css({display:"flex",flexDirection:"column",height:"100%",minHeight:"320px"}),chartContainer:T.css({flex:1,width:"100%",minHeight:"280px"}),cardDescription:T.css({color:`${w.tokens.colorNeutralForeground2}`}),cardWrapper:T.css({position:"relative",height:"100%",minHeight:"300px",borderRadius:w.tokens.borderRadiusMedium,transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:`${w.tokens.shadow16}`},"&:active":{transform:"translateY(0)",boxShadow:`${w.tokens.shadow8}`}})},h=`${a}-layout-settings`,d=`${a}-card-order`,{getCachedData:p,setCachedData:f}=ee(),g=v.useCallback(e=>p(e),[p]),m=v.useCallback((e,t)=>f(e,t,43200),[f]),{getCachedData:y,setCachedData:x}=ee(),C=v.useCallback(e=>y(e),[y]),k=v.useCallback((e,t)=>x(e,t,43200),[x]),[S,_]=v.useState([]),[A,P]=v.useState({}),E=v.useRef(null),M=v.useRef(null),I=v.useRef(null);v.useEffect(()=>{(async()=>{try{let t=e;const r={};if(o){const[n,i]=await Promise.all([g(h),C(d)]);if(i&&i.length>0){const r=new Map(e.map(e=>[e.id,e])),n=i.filter(e=>r.has(e)),o=e.filter(e=>!i.includes(e.id));t=[...n.map(e=>r.get(e)),...o]}e.forEach(e=>{var t,i;const o=null==n?void 0:n[e.id];r[e.id]={spanCols:(null==o?void 0:o.spanCols)??(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==o?void 0:o.spanRows)??(null==(i=e.defaultSpan)?void 0:i.spanRows)??1}})}else e.forEach(e=>{var t,n;r[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(n=e.defaultSpan)?void 0:n.spanRows)??1}});_(t),P(r)}catch(t){c("Failed to load dashboard data from cache:",t),_(e);const r={};e.forEach(e=>{var t,n;r[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(n=e.defaultSpan)?void 0:n.spanRows)??1}}),P(r)}})()},[e,o,h,d,g,C]),v.useEffect(()=>{if(!o||0===Object.keys(A).length)return;(async()=>{try{await m(h,A)}catch(e){c("Failed to save dashboard layout to cache:",e)}})()},[A,o,h,m]),v.useEffect(()=>{if(!o||0===S.length)return;(async()=>{try{const e=S.map(e=>e.id);await k(d,e)}catch(e){c("Failed to save dashboard order to cache:",e)}})()},[S,o,d,k]),v.useEffect(()=>{t<=600&&P(()=>{const e={};return S.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,S]);const B=v.useMemo(()=>t>600,[t]),{minCardWidth:L,gridGap:j,containerPadding:N}=v.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),D=t-2*N,O=v.useMemo(()=>Math.floor((D+j)/(L+j)),[D,j,L]),F=Math.max(O,1),R=v.useCallback(()=>{if(null!==E.current&&null!==M.current&&E.current!==M.current){const e=[...S],[t]=e.splice(E.current,1);e.splice(M.current,0,t),_(e),s&&s(e)}E.current=null,M.current=null},[S,s]),$=v.useCallback((e,t)=>{const r={spanCols:Math.min(Math.max(t.spanCols,1),F),spanRows:Math.min(Math.max(t.spanRows,1),n)};P(t=>({...t,[e]:r})),l&&l(e,r)},[F,n,l]),z=v.useMemo(()=>S.reduce((e,t)=>{var r,n;return e[t.id]={spanCols:Math.min((null==(r=t.defaultSpan)?void 0:r.spanCols)??1,O),spanRows:(null==(n=t.defaultSpan)?void 0:n.spanRows)??1},e},{}),[S,O]),V=v.useMemo(()=>S.map((e,t)=>{var o,a,s,l;const c=!1!==e.showZoom&&B,h=e.headerAction||(c?b.jsx(EL,{values:A[e.id]||z[e.id]||{spanCols:1,spanRows:1},maxCols:F,maxRows:n,IsOpen:!1,onChange:t=>$(e.id,t)}):void 0);return b.jsx("div",{className:u.cardWrapper,draggable:i,onDragStart:()=>i&&(E.current=t),onDragEnter:()=>i&&(M.current=t),onDragOver:e=>i&&e.preventDefault(),onDragEnd:i?R:void 0,style:{gridColumnEnd:(null==(o=A[e.id])?void 0:o.spanCols)?`span ${A[e.id].spanCols}`:`span ${(null==(a=z[e.id])?void 0:a.spanCols)||1}`,gridRowEnd:(null==(s=A[e.id])?void 0:s.spanRows)?`span ${A[e.id].spanRows}`:`span ${(null==(l=z[e.id])?void 0:l.spanRows)||1}`,cursor:i?"grab":"default"},children:b.jsxs(w.Card,{className:`${u.cardBody} ${e.className||""}`,children:[b.jsx(w.CardHeader,{header:b.jsxs(bt,{gap:"0px",children:[b.jsx(w.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&b.jsx(w.Text,{className:u.cardDescription,size:200,children:e.cardDescription})]}),action:h}),b.jsx("div",{className:u.chartContainer,style:{height:r,...e.style},children:e.content})]})},e.id)}),[S,i,R,A,u.cardBody,u.cardDescription,u.chartContainer,u.cardWrapper,B,F,n,$,r,z]);return 0===S.length?b.jsx(PL,{}):b.jsx("div",{ref:I,className:u.dashboardContainer,style:{height:r},children:V})},exports.AspectRatio=({ratio:e,children:t,maxWidth:r,maxHeight:n,style:i={},...o})=>{const a={position:"relative",width:"100%",paddingTop:100/e+"%",maxWidth:r||"none",maxHeight:n||"none",...i};return b.jsx("div",{style:a,...o,children:b.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:t})})},exports.Breadcrumb=({items:e,maxWidth:t="100%",styles:r,theme:n,size:i="medium",currentIndex:o=e.length-1,className:a})=>{const{styles:s,getStyles:l}=Et(),c=v.useRef(null),[u,h]=v.useState([]),[d,p]=v.useState([]);return v.useEffect(()=>{const t=()=>{if(!c.current)return;const t=c.current.offsetWidth;let r=0;const n=[],i=[];e.forEach(e=>{r+80<=t-50?(n.push(e),r+=80):i.push(e)}),h(n),p(i)},r=((e,t)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}})(t,100),n=new _.ResizeObserver(()=>{r()});return c.current&&n.observe(c.current),t(),()=>{n.disconnect()}},[e]),b.jsx("div",{ref:c,className:w.mergeClasses(s.container,a),style:{maxWidth:t,...r},children:b.jsxs(ft,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[u.map((e,t)=>b.jsxs(v.Fragment,{children:[t===o?b.jsxs(ft,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?v.cloneElement(e.icon,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}}):null,b.jsx(w.Text,{className:w.mergeClasses(s.breadcrumbItem,l(e,i),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):b.jsx(w.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:b.jsx(w.Text,{className:l(e,i),children:e.label})},e.label),t<u.length-1&&b.jsx(P.ChevronRightRegular,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}})]},e.label??`breadcrumb-${t}`)),d.length>0&&b.jsx(Mt,{items:d,theme:n})]})})},exports.ButtonMenu=Pt,exports.CalendarControl=({events:e,height:t=800,theme:r,onDayChange:n,onMonthChange:i,onWeekChange:o,onViewChange:a,onDaySlotClick:s,defaultView:l,strings:c})=>{const{styles:u}=Ft(),h=v.useRef(null),[d,p]=v.useState(null),f=v.useRef(0),[g,m]=v.useState(new Date),[y,x]=v.useState(l??rr.Month),{getMonthCalendar:C}=Kt(Intl.DateTimeFormat().resolvedOptions().timeZone),S=q.useCallback(e=>{const t=e.getMonth(),r=k.startOfMonth(e),n=k.startOfWeek(r);return Array.from({length:42},(e,r)=>{const i=k.addDays(n,r);return{day:i.getDate(),currentMonth:i.getMonth()===t,date:i}})},[42]),T=q.useCallback(e=>{i&&i(e),m(e)},[i]),A=q.useCallback(e=>{n&&n(e),m(e)},[n]),P=q.useCallback(e=>{o&&o(e),m(e)},[o]),E=q.useCallback(e=>{a&&a(e),x(e)},[a]),M=q.useCallback(t=>{var r;const{date:n}=t;return(null==(r=C(e,g.getFullYear(),g.getMonth())[k.format(n,"yyyy-MM-dd")])?void 0:r.flatMap(e=>e))||[]},[g,e]),I=q.useCallback(()=>{h.current&&requestAnimationFrame(()=>{if(h.current){const e=h.current.querySelector(`.${u.calendarWrapper} > div:nth-child(8)`);e&&(p(e.offsetHeight),f.current=e.offsetHeight)}})},[u.calendarWrapper]);v.useEffect(()=>{const e=new _.ResizeObserver(I);return h.current&&e.observe(h.current),I(),window.addEventListener("resize",I),()=>{e.disconnect(),window.removeEventListener("resize",I)}},[I,y]),v.useEffect(()=>{x(l||rr.Month)},[l]);const B=q.useCallback(()=>{switch(y){case rr.Month:return b.jsx(xr,{events:e,currentDate:g,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl});case rr.Week:return b.jsx(br,{events:e,currentDay:g,height:t,strings:null==c?void 0:c.weekView});case rr.Day:return b.jsx(vr,{events:e,currentDay:g,height:t,strings:null==c?void 0:c.dayView});default:return b.jsx(xr,{events:e,currentDate:g,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl})}},[y,e,g,d,S,M,u,s,t]),L=b.jsxs(ft,{height:"100%",verticalAlign:"start",children:[b.jsx(fr,{selectedView:y,onSelectedView:E,currentDate:g,setCurrentDate:m,onWeekChange:P,onMonthChange:T,onDayChange:A,strings:null==c?void 0:c.toolbar}),b.jsx(B,{})]});return b.jsx(w.IdPrefixProvider,{value:"calendarControl-",children:r?b.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:!0,style:{width:"100%"},children:L}):b.jsx("div",{style:{width:"100%"},children:L})})},exports.CalendarMonth=sr,exports.Card=lt,exports.Carousel=e=>{const{className:t,items:r,title:n}=e,i=q.useRef(null),[o,a]=q.useState(0),[s,l]=q.useState(0),{carouselStyles:c}=(e=>{const{styles:t}=e,{getBaseStyles:r}=ne();return{carouselStyles:q.useCallback((n,i)=>({...r(e,n,i),...t}),[r,e,t])}})(e),[u,h]=A(),d={titleStyles:T.css({display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",textAlign:"start",height:"25px"})},{enableControls:p,embla__slide:f,embla__container:g,embla__viewport:m,embla__buttons:y}=((e,t)=>{const{getCurrentDevice:r}=ne(),n=q.useCallback(()=>{let e="95%";switch(r(t)){case"Medium":e="45%";break;case"Large":e="calc(95% / 4)";break;case"ExtraLarge":e="calc(95% / 5)";break;case"ExtraExtraLarge":e="calc(95% / 6)";break;default:e="95%"}return e},[t,r]),i=q.useCallback(()=>{const e=r(t);let n=w.tokens.spacingVerticalM;switch(e){case"Medium":default:n=w.tokens.spacingVerticalM;break;case"Large":n=w.tokens.spacingVerticalL;break;case"ExtraLarge":n=w.tokens.spacingVerticalXL}return n},[t,r]);return{enableControls:T.css({display:"flex",justifyContent:"space-between",alignItems:"stretch",gap:10,padding:5}),embla__viewport:T.css({overflow:"hidden",paddingTop:"10px",paddingBottom:"20px"}),embla__container:T.css({backfaceVisibility:"hidden",display:"flex",touchAction:"pan-y"}),embla:T.css({".embla":{}}),embla__slide:T.css({minWidth:0,flex:`0 0 ${n()}`,paddingLeft:`${i()}`}),embla__buttons:T.css({display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:0,alignItems:"center"})}})(0,o),{prevBtnDisabled:x,nextBtnDisabled:C,onPrevButtonClick:k,onNextButtonClick:S}=(e=>{const[t,r]=v.useState(!0),[n,i]=v.useState(!0),o=v.useCallback(()=>{e&&e.scrollPrev()},[e]),a=v.useCallback(()=>{e&&e.scrollNext()},[e]),s=v.useCallback(e=>{r(!e.canScrollPrev()),i(!e.canScrollNext())},[]);return v.useEffect(()=>{e&&(s(e),e.on("reInit",s),e.on("select",s))},[e,s]),{prevBtnDisabled:t,nextBtnDisabled:n,onPrevButtonClick:o,onNextButtonClick:a}})(h);return q.useEffect(()=>{let e;return i.current&&(e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;a(e),l(r)}}),a(i.current.clientWidth),l(i.current.clientHeight),e.observe(i.current)),()=>{e&&e.disconnect()}},[]),b.jsx(b.Fragment,{children:b.jsxs("div",{id:"-carousel",className:w.mergeClasses(t,"embla"),style:{...c(o,s)},ref:i,children:[b.jsxs("div",{className:p,children:[b.jsx(w.Subtitle2,{className:d.titleStyles,children:n}),b.jsxs("div",{className:y,children:[b.jsx(w.Button,{onClick:k,disabled:x,appearance:"subtle",icon:b.jsx(P.ChevronLeftRegular,{})}),b.jsx(w.Button,{onClick:S,disabled:C,appearance:"subtle",icon:b.jsx(P.ChevronRightRegular,{})})]})]}),b.jsx("div",{className:m,ref:u,children:b.jsx("div",{className:g,children:r.map((e,t)=>b.jsx("div",{className:f,children:e},t))})})]})})},exports.Center=mt,exports.ChatInput=eu,exports.ChatInputWithMensions=iu,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:r,placeholder:n,onSend:i,theme:o,isRunning:a,onAbort:s})=>{const[l,c]=v.useState(r||""),[u,h]=v.useState(!1),d=v.useRef(null),p=x.useAIAssistantStrings(),[f,g]=v.useState({top:0,left:0}),[m,y]=v.useState([]),C=v.useRef({}),k=nu(),{warn:S,error:_}=Q();v.useEffect(()=>{var e;null==(e=d.current)||e.focus(),c(r||"")},[r]);const T=v.useCallback(it(async t=>{const r=await(async t=>{var r,n;if(C.current[t])return C.current[t];if(!(null==e?void 0:e.graphClient))return S("Graph client not available"),[];try{const i=t&&t.length>0?`/users?$filter=startswith(displayName,'${t}')`:"/users?$orderby=displayName&$top=10",o=await e.graphClient.get(i),a=(null==o?void 0:o.value)||[],s=(null==(n=null==(r=e.pageContext)?void 0:r.web)?void 0:n.absoluteUrl)||"";return a.forEach(e=>{e.avatar=s?`${s}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),C.current[t]=a,a}catch(i){return _("Error fetching users from Graph:",i instanceof Error?i:void 0),[]}})(t);r.sort((e,t)=>e.displayName.localeCompare(t.displayName)),y(r),h(!0),setTimeout(()=>{var e;null==(e=d.current)||e.focus()},0)},300),[e]),A=e=>{var r;const n=l.replace(/@(\w*)$/,`@${e} `);c(n),t&&t(n),h(!1),y([]),null==(r=d.current)||r.focus()},P=v.useCallback(({users:e})=>b.jsxs("div",{className:k.listContainer,children:[0===e.length&&b.jsx(w.Caption1,{children:p.noUsersFound}),e.map(e=>b.jsx(w.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.mail),children:b.jsx(w.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[k.listContainer,A]);return b.jsxs(ft,{horizontal:!0,width:"100%",className:k.inputContainer,children:[b.jsx(eu,{ref:d,onSend:i,value:l,onChange:async e=>{var r;c(e),t&&t(e),null==(r=d.current)||r.focus();const n=e.lastIndexOf("@");if(-1===n||0!==n&&" "!==e[n-1])h(!1);else{const t=e.slice(n+1);await T(t);const r=d.current;if(r){const e=$(r,n),t=r.getBoundingClientRect(),i=t.top+e.top+22,o=t.left+e.left+16;g({top:i,left:o})}}},theme:o,placeholder:n,isRunning:a,onAbort:s}),b.jsxs(vt,{theme:o,anchorPoint:f,isOpen:u,onClose:()=>h(!1),excludeRefs:[d],children:[b.jsx(w.CardHeader,{header:b.jsx(w.Body1Strong,{className:k.sugestionsHeader,children:"Sugestions"})}),b.jsx(w.Divider,{}),b.jsx(P,{users:m})]})]})},exports.ChatList=uu,exports.Color=ju,exports.Color$1=yg,exports.Container=e=>{const{className:t,children:r,style:n,alignItems:i="center",justifyContent:o="center",flexDirection:a="row",centerContent:s=!0}=e,l=q.useRef(null),[c,u]=q.useState(0),[h,d]=q.useState(0),{containerStyles:p}=(e=>{const{maxWidth:t}=e,{getBaseStyles:r}=ne();return{containerStyles:q.useCallback((n,i)=>n&&i?{...r(e,n,i),maxWidth:t}:{},[r,t,e])}})(e),f=q.useMemo(()=>S.debounce(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;u(e),d(r)}},200),[]);q.useEffect(()=>{const e=new _.ResizeObserver(e=>{f(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),f.cancel()}},[f]);const g=q.useMemo(()=>{if(!n)return;const{padding:e,margin:t,...r}=n;return r},[n]);return b.jsx("div",{id:"container",className:t,style:{...p(c,h),display:"flex",justifyContent:o,alignItems:i,flexDirection:a,...g},ref:l,children:s?b.jsx(mt,{children:r}):r})},exports.ContentRenderer=cu,exports.ContentType=ot,exports.CustomControlBar=({items:e,selectedItemId:t,onSelectedItem:r,renderControl:n,theme:i})=>{const o={container:T.css({display:"flex",flexWrap:"nowrap",minWidth:0,overflow:"hidden",gap:10,marginBottom:20,width:"100%"}),text1LineStyle:T.css({display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),button:T.css({cursor:"pointer",minWidth:107})},a=q.useCallback(e=>{r&&r(e)},[r]);return b.jsx(w.Overflow,{children:b.jsxs(w.FluentProvider,{theme:i,children:[" ",b.jsxs("div",{className:w.mergeClasses(o.container),children:[e.map(e=>{const r=e.id===t;return b.jsx(w.OverflowItem,{id:e.id,priority:r?2:1,children:n(e,r,()=>a(e.id))},e.id)}),b.jsx(Ai,{items:e,onSelectedItem:a,theme:i})," "]})]})})},exports.DataGrid=e=>{const{items:t,columns:r,defaultSelectedItems:n=[],enableSorting:i=!1,selectionMode:o="none",onSelectionChange:a,onSortChange:s,defaultSortState:l,columnSizingOptions:c,enableResizing:u=!1,noItemsMessage:h,isLoadingData:d,isLoadingDataMessage:p,dataGridBodyClassName:f,dataGridBodyStyles:g,refreshData:m}=e,y=e=>t.findIndex(t=>t===e),[x,v]=q.useState(new Set(n.map(e=>y(e)))),C=q.useRef(null),{styles:k}=yi();q.useEffect(()=>{n.length>0&&v(new Set(n.map(e=>y(e))))},[n,t]),q.useEffect(()=>{m&&v(new Set)},[m]);const S=r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>b.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>b.jsx(w.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[null==e?void 0:e.column]??"")}),compare:e.order})),_=q.useCallback((e,t)=>{e.stopPropagation(),"row"===o&&a&&a([t])},[o,a]),T=q.useMemo(()=>"row"===o?k.rowSelection:"",[o,k.rowSelection]),A=q.useCallback(()=>b.jsx(w.DataGridBody,{style:g??{},className:f??"",children:({item:e,rowId:t})=>b.jsx(w.DataGridRow,{className:T,onClick:t=>_(t,e),children:({renderCell:t})=>b.jsx(w.DataGridCell,{children:t(e)})},t)}),[_,T,g,f]),P=q.useMemo(()=>t.length&&!d,[t,d]),E=q.useCallback(()=>d?b.jsx(b.Fragment,{children:p??b.jsx(mi,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:b.jsx(w.Spinner,{})})}):P?b.jsx(A,{}):d||t.length?b.jsx(b.Fragment,{}):b.jsx("div",{children:h}),[P,d,t,h]);return b.jsx("div",{ref:C,children:b.jsxs(w.DataGrid,{as:"div",items:t,onSelectionChange:(e,r)=>{const n=new Set;if(r.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||n.add(t)}),v(n),a){const e=Array.from(n).map(e=>t[e]);a(e)}},sortable:i,columns:S,selectionMode:"none"===o||"row"===o?void 0:"multiple"===o?"multiselect":"single"===o?"single":void 0,selectedItems:x,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:c,resizableColumns:u,resizableColumnsOptions:{autoFitColumns:!1},children:[b.jsx(w.DataGridHeader,{children:b.jsx(w.DataGridRow,{children:({renderHeaderCell:e})=>b.jsx(w.DataGridHeaderCell,{children:e()})})}),b.jsx(E,{})]})})},exports.DataGridV2=bi,exports.DropdownField=({options:e,onChange:t,renderItem:r,validate:n,label:i,placeholder:o,message:a,messageType:s,required:l,size:c,hint:u})=>{const[h,d]=v.useState(""),[p,f]=v.useState(""),[g,m]=v.useState(""),y={tagPickerControl:T.css({border:`1px solid ${w.tokens.colorNeutralStroke2} !important`,borderRadius:"50px !important",backgroundColor:`${w.tokens.colorNeutralBackground1} !important`,padding:"0px 10px",boxShadow:"none",transition:"all 0.2s ease !important","&::after":{display:"none !important"},"&:hover":{borderColor:`${w.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${w.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${w.tokens.colorBrandBackground2} !important`}})},x=q.useMemo(()=>g?"error":"warning"===s?"warning":"info"===s?"success":"none",[g,s]),C=q.useMemo(()=>g||a,[g,a]),k=q.useCallback(()=>{switch(x){case"error":return b.jsx(P.ErrorCircle12Filled,{});case"warning":return b.jsx(P.Warning12Filled,{});case"success":return b.jsx(P.CheckmarkCircle12Filled,{});default:return null}},[x]);return b.jsx(w.Field,{label:i,required:l,validationMessage:C,validationMessageIcon:k(),size:c,hint:u,validationState:x,children:b.jsx(w.Dropdown,{placeholder:o,onOptionSelect:(e,r)=>{const i=r.optionValue||"",o=r.optionText||"";d(i),f(o);const a=n?n(i):"";m(a),!a&&t&&t(i)},value:p,selectedOptions:h?[h]:[],className:y.tagPickerControl,children:e.map(e=>b.jsxs(w.Option,{value:e.value,disabled:e.disabled,checkIcon:e.checkIcon,as:e.as,text:e.text||"",children:[r&&r(e)," "]},e.value))})})},exports.EBreakPoints=J,exports.ECalendarViews=rr,exports.EGoalMetric=LL,exports.EMessageType=Y,exports.FluentUIProvider=e=>{const t=(()=>{const e=q.useRef("");return e.current||(e.current="fui-"+Math.random().toString(36).slice(2,9)),e.current})(),{theme:r=w.webLightTheme,applicationName:n=t,targetDocument:i=document,applyStylesToPortals:o=!0,styles:a,children:s}=e;return b.jsx(w.IdPrefixProvider,{value:n,children:b.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:o,targetDocument:i,style:a,children:s})})},exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu();return o?b.jsxs(w.Menu,{children:[b.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:b.jsxs(w.MenuButton,{ref:n,children:["+",i," items"]})}),b.jsx(w.MenuPopover,{children:b.jsx(w.MenuList,{children:e.map(e=>b.jsx(Pi,{id:r(e),children:t(e)},r(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:r}=e,{gridStyles:n}=ct(e),i=q.useRef(null),[o,a]=q.useState(0),[s,l]=q.useState(0);return q.useEffect(()=>{let e;return i.current&&(e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;a(e),l(r)}}),e.observe(i.current)),()=>{e&&e.disconnect()}},[]),b.jsx(b.Fragment,{children:b.jsx("div",{className:r,style:n(o,s),ref:i,children:t})})},exports.IconButton=It,exports.InputField=({value:e,type:t="text",shape:r="normal",onChange:n,validate:i,label:o,placeholder:a,message:s,messageType:l,required:c,size:u,hint:h,disabled:d,readOnly:p,min:f,max:g,step:m,contentBefore:y,contentAfter:C})=>{const[k,S]=v.useState(void 0!==e?String(e):""),[_,A]=v.useState(""),E={inputRoot:T.css({border:`1px solid ${w.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${w.tokens.colorNeutralStroke2} !important`,borderRadius:"50px !important",backgroundColor:`${w.tokens.colorNeutralBackground1} !important`,padding:"0px 10px !important",boxShadow:"none !important",transition:"all 0.2s ease","&::after":{display:"none !important",borderWidth:"0 !important",content:'"none !important"'},"&:hover":{borderColor:`${w.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${w.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${w.tokens.colorBrandBackground2} !important`}})},M=x.useInputFieldStrings(),I=void 0!==e,B=I?String(e):k,L=v.useCallback(e=>{if(c&&""===e.trim())return"number"===t?M.numberRequired:M.fieldRequired;if("number"===t&&""!==e.trim()){const t=Number(e);if(isNaN(t))return M.invalidNumber;if(void 0!==f&&t<f)return M.valueMustBeAtLeast.replace("{0}",String(f));if(void 0!==g&&t>g)return M.valueMustBeAtMost.replace("{0}",String(g))}if(i){const r="number"===t&&""!==e.trim()?Number(e):e;return i(r)}return""},[c,t,i,f,g,M]),j=v.useCallback((e,r)=>{const i=r.value;if("number"===t&&""!==i&&!/^-?\d*\.?\d*$/.test(i))return;I||S(i);const o=L(i);if(A(o),!o&&n){const e="number"===t&&""!==i.trim()?Number(i):i;n(e)}},[t,I,L,n]),N=v.useCallback(()=>{const e=L(B);A(e)},[L,B]),D=v.useMemo(()=>_?"error":"warning"===l?"warning":"info"===l?"success":"none",[_,l]),O=v.useMemo(()=>_||s,[_,s]),F=v.useCallback(()=>{switch(D){case"error":return b.jsx(P.ErrorCircle12Filled,{});case"warning":return b.jsx(P.Warning12Filled,{});case"success":return b.jsx(P.CheckmarkCircle12Filled,{});default:return null}},[D]),R="circular"===r?E.inputRoot:void 0;return b.jsx(w.Field,{label:o,required:c,validationMessage:O,validationMessageIcon:F(),size:u,hint:h,validationState:D,children:b.jsx(w.Input,{value:B,placeholder:a,onChange:j,onBlur:N,disabled:d,readOnly:p,type:"text",inputMode:"number"===t?"decimal":"text",step:"number"===t?m:void 0,className:R,contentBefore:y,contentAfter:C})})},exports.ItemPicker=({options:e,selectedOptions:t=[],onSelectionChange:r,onSearchChange:n,onLoadMore:i,pagingInfo:o,placeholder:a,disabled:s=!1,maxSelectedOptions:l,width:c,className:u,noResultsMessage:h,loadingMessage:d,loadingMoreMessage:p,searchDebounceMs:f=300})=>{const g={container:T.css({display:"flex",flexDirection:"column",gap:w.tokens.spacingVerticalS,position:"relative"}),pickerList:T.css({maxHeight:300,overflowY:"auto",backgroundColor:w.tokens.colorNeutralBackground1,border:`1px solid ${w.tokens.colorNeutralStroke2}`,borderRadius:w.tokens.borderRadiusMedium,boxShadow:w.tokens.shadow16,scrollbarColor:`${w.tokens.colorBrandForeground1} ${w.tokens.colorNeutralBackground1}`,scrollbarWidth:"thin","&::-webkit-scrollbar-track":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar-thumb":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar":{height:7,width:7}}),optionContent:T.css({display:"flex",flexDirection:"column",gap:w.tokens.spacingVerticalXXS}),optionSecondary:T.css({fontSize:w.tokens.fontSizeBase200,color:w.tokens.colorNeutralForeground3,fontWeight:w.tokens.fontWeightRegular}),tagPickerControl:T.css({}),tagPickerInput:T.css({backgroundColor:"transparent",border:"none",outline:"none",fontSize:w.tokens.fontSizeBase300,"&::placeholder":{color:w.tokens.colorNeutralForeground4},"&:focus":{outline:"none"}})},m=x.useItemPickerStrings(),y=a||m.placeholder,C=h||m.noResultsFound,k=d||m.searching,S=p||m.loadingMore,[_,A]=v.useState(""),P=v.useRef(null),E=v.useRef(null),M=t.map(e=>e.value),I=(null==o?void 0:o.isLoading)??!1,B=(null==o?void 0:o.isLoadingMore)??!1,L=(null==o?void 0:o.hasMore)??!1,j=e.filter(e=>!M.includes(e.value)),N=v.useCallback(e=>{A(e),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{null==n||n(e)},f)},[n,f]),D=v.useCallback(e=>{if(!L||B)return;const{scrollTop:t,scrollHeight:r,clientHeight:n}=e.currentTarget;t+n>=r-100&&(null==i||i())},[L,B,i]),O=v.useCallback((i,o)=>{if("no-options"===o.value||"loading"===o.value||"loading-more"===o.value)return;const a=o.selectedOptions,s=t.filter(e=>a.includes(e.value));if(a.length>M.length){const r=a.find(e=>!M.includes(e));if(r){const n=e.find(e=>e.value===r);if(n){if(l&&t.length>=l)return;s.push(n)}}A(""),null==n||n("")}null==r||r(s)},[e,t,M,r,n,l]);return v.useEffect(()=>()=>{P.current&&clearTimeout(P.current)},[]),b.jsx("div",{className:`${g.container} ${u||""}`,...c&&{style:{width:c}},children:b.jsxs(w.TagPicker,{onOptionSelect:O,selectedOptions:M,disabled:s,children:[b.jsxs(w.TagPickerControl,{className:g.tagPickerControl,children:[b.jsx(w.TagPickerGroup,{"aria-label":m.selectedItems,children:t.map(e=>b.jsx(w.Tag,{shape:"circular",media:e.tagMedia??e.media,value:e.value,dismissible:!0,disabled:s,style:{minHeight:30},children:e.text},e.value))}),b.jsx(w.TagPickerInput,{className:g.tagPickerInput,"aria-label":m.searchItems,placeholder:y,value:_,onChange:e=>N(e.target.value),disabled:s})]}),b.jsx(w.TagPickerList,{ref:E,onScroll:D,className:g.pickerList,children:I?b.jsx(w.TagPickerOption,{value:"loading",children:k}):j.length>0?b.jsxs(b.Fragment,{children:[j.map(e=>b.jsx(w.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:b.jsxs("div",{className:g.optionContent,children:[b.jsx(w.Text,{weight:"semibold",children:e.text}),e.secondaryText&&b.jsx(w.Text,{size:200,className:g.optionSecondary,children:e.secondaryText})]})},e.value)),B&&b.jsx(w.TagPickerOption,{value:"loading-more",children:S})]}):b.jsx(w.TagPickerOption,{value:"no-options",children:C})})]})})},exports.JSON_SCHEMA=gC,exports.KPICard=jL,exports.KPICardCompact=OL,exports.KPICardSkeleton=NL,exports.Kpis=e=>{const{skeletonCount:t=3,compact:r=!1}=e,n=BL(),i=FL;return q.useCallback(()=>Array.from({length:t}).map((e,t)=>b.jsx(NL,{},`kpi-skeleton-${t}`)),[t]),b.jsx(b.Fragment,{children:b.jsx(bt,{gap:"l",direction:"horizontal",padding:"l",paddingTop:"s",children:b.jsx(b.Fragment,{children:b.jsx("div",{className:n.kpiContainer,children:i.length>0?i.map(e=>r?b.jsx(OL,{dataCard:e},e.identifier):b.jsx(jL,{dataCard:e},e.identifier)):b.jsx(DL,{})})})})})},exports.Layout=e=>{const{className:t,children:r,layoutConfig:n=ht}=e,i=q.useRef(null),[o,a]=q.useState(0),[s,l]=q.useState(0),{rootStyles:c,layoutGridStyles:u}=ut({...e,layoutConfig:n}),h=((e,t)=>{let r;return q.useCallback((...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return q.useEffect(()=>{if(!i.current)return;const e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;h(e,r)}});return e.observe(i.current),()=>e.disconnect()},[h]),b.jsx("div",{id:"-Layout",className:w.mergeClasses(t,u),style:{...c(o,s),gridTemplateAreas:n.areas.join(" "),gridTemplateColumns:n.columns,gridTemplateRows:n.rows},ref:i,children:q.Children.map(r,(e,t)=>{var r;if(q.isValidElement(e)){const n=e;return b.jsx("div",{style:{gridArea:(null==(r=n.props)?void 0:r.area)??`area-${t}`},children:e},t)}return e})})},exports.LayoutItem=e=>{const{area:t,children:r}=e;return b.jsx(b.Fragment,{children:b.jsx("div",{style:{gridArea:t},children:r})})},exports.ListItemActivityMessage=({siteId:e,listId:t,itemId:r,currentUserEmail:n,strings:i,context:o})=>{var a,s,l,c,u,h,d,p,f,g,m;const{getItemActivities:y}=(e=>{const t=K(),r=e||t,n=null==r?void 0:r.graphClient,{warn:i,error:o}=Q();return{getItemActivities:v.useCallback(async(e,t,r)=>{if(!n)return i("Graph client not available for SharePoint activities"),{activities:[]};try{const i=await n.get(`/sites/${e}/lists/${t}/items/${r}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return i&&i.value?{activities:i.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(a){throw o("Error fetching SharePoint activities:",a instanceof Error?a:void 0),a}},[n])}})(o),C=x.useListItemActivityStrings(),{warn:w,error:k}=Q(),S=new Map([["access",{message:(null==i?void 0:i.access)||C.accessed||(null==(a=TL.get("access"))?void 0:a.message)||"",icon:b.jsx(P.OpenRegular,{style:SL})}],["comment",{message:(null==i?void 0:i.comment)||C.commented||(null==(s=TL.get("comment"))?void 0:s.message)||"",icon:b.jsx(P.CommentRegular,{style:SL})}],["create",{message:(null==i?void 0:i.create)||C.created||(null==(l=TL.get("create"))?void 0:l.message)||"",icon:b.jsx(P.AddRegular,{style:SL})}],["delete",{message:(null==i?void 0:i.delete)||C.deleted||(null==(c=TL.get("delete"))?void 0:c.message)||"",icon:b.jsx(P.DeleteRegular,{style:SL})}],["edit",{message:(null==i?void 0:i.edit)||C.edited||(null==(u=TL.get("edit"))?void 0:u.message)||"",icon:b.jsx(P.EditRegular,{style:SL})}],["mention",{message:(null==i?void 0:i.mention)||C.mentioned||(null==(h=TL.get("mention"))?void 0:h.message)||"",icon:b.jsx(P.MentionRegular,{style:SL})}],["move",{message:(null==i?void 0:i.move)||C.moved||(null==(d=TL.get("move"))?void 0:d.message)||"",icon:b.jsx(P.ArrowMoveRegular,{style:SL})}],["rename",{message:(null==i?void 0:i.rename)||C.renamed||(null==(p=TL.get("rename"))?void 0:p.message)||"",icon:b.jsx(P.RenameRegular,{style:SL})}],["restore",{message:(null==i?void 0:i.restore)||C.restored||(null==(f=TL.get("restore"))?void 0:f.message)||"",icon:b.jsx(P.ArrowSyncRegular,{style:SL})}],["share",{message:(null==i?void 0:i.share)||C.shared||(null==(g=TL.get("share"))?void 0:g.message)||"",icon:b.jsx(P.PeopleRegular,{style:SL})}],["version",{message:(null==i?void 0:i.version)||C.versioned||(null==(m=TL.get("version"))?void 0:m.message)||"",icon:b.jsx(P.HistoryRegular,{style:SL})}]]),[_,T]=q.useState({message:"",icon:b.jsx(b.Fragment,{})}),[A,E]=q.useState(!0),M=q.useRef(void 0),I=q.useRef(void 0),[B]=q.useState(30),L=q.useCallback(e=>e.user.email===n,[n]),j=q.useCallback(e=>{if(!e)return{message:"",icon:b.jsx(b.Fragment,{})};const{action:t,actor:r}=e,{displayName:n}=(null==r?void 0:r.user)||{displayName:""},i=_L.find(e=>t[e]);if(i){const e=S.get(i);if(e){return{message:`${L(r)?C.you:n} ${e.message}`,icon:e.icon}}}return{message:"",icon:b.jsx(b.Fragment,{})}},[S,L]);return q.useEffect(()=>{var e;null==(e=I.current)||e.setPlaybackRate(B/100)},[B,A]),q.useEffect(()=>{let n=!1;const i=async(o=1e3)=>{var a;if(e&&t&&r)try{const i=await y(e,t,r);if(n)return;const o=i.activities[0];M.current&&JSON.stringify(M.current)===JSON.stringify(o)||(M.current=o,T(j(o)))}catch(s){if(429===s.status){const e=null==(a=s.headers)?void 0:a.get("Retry-After"),t=e?1e3*parseInt(e,10):o;return w(`Throttled. Retrying after ${t}ms`),void setTimeout(()=>i(2*t),t)}k("Activity Error",s instanceof Error?s:void 0)}finally{n||E(!1)}},o=setTimeout(()=>{i()},1e3);return()=>{clearTimeout(o),n=!0}},[e,t,r,y,j]),b.jsx(V.Fade,{imperativeRef:I,visible:!A,children:b.jsx("div",{children:b.jsxs(ft,{horizontal:!0,verticalAlign:"center",horizontalAlign:"center",RowGap:4,columnGap:4,children:[_.icon," ",_.message]})})})},exports.ListToolbar=({items:e,farItems:t=[],isLoading:r=!1,ariaLabel:n="Toolbar",totalCount:i,className:o,showGroupDividers:a=!0})=>{const s={toolbar:T.css`
|
|
249
249
|
display: flex !important;
|
|
250
250
|
flex-wrap: nowrap !important;
|
|
251
251
|
align-items: center !important;
|
|
@@ -425,4 +425,4 @@ const fL=e=>{const{width:t,height:r,zoomable:n=!1}=e;return{root:T.css({position
|
|
|
425
425
|
padding: 2px;
|
|
426
426
|
margin-right: 8px;
|
|
427
427
|
`},y=x.useSearchControlStrings(),b=e||y.placeholder,C=void 0!==s,k=C?s:h,S="circular"===l?f:g,_=v.useCallback((e,t)=>{C||d(t.value),null==r||r(t.value)},[C,r]),T=v.useCallback(()=>{var e;C||d(""),null==(e=p.current)||e.blur(),null==n||n(),null==t||t("")},[C,n,t]),A=v.useCallback(e=>{var r;"Enter"===e.key&&k.trim()?null==t||t(k.trim()):"Escape"===e.key&&(null==(r=p.current)||r.blur(),C||d(""),null==n||n())},[k,C,t,n]),E=c??ni("span",{css:m,children:ni(P.SearchRegular,{})});return ni(w.SearchBox,{ref:p,css:S,className:o,style:{width:a},placeholder:b,value:k,onChange:_,onKeyDown:A,disabled:i,size:u,contentBefore:E,dismiss:{onClick:T}})},exports.SelectDay=or,exports.SelectMonth=lr,exports.SelectTime=fi,exports.SelectView=({onChange:e,defaultKey:t,label:r,options:n=[]})=>{const[i,o]=v.useState(()=>n.map(e=>({...e,selected:e.key===(t??"status")})));v.useEffect(()=>{const t=i.find(e=>e.selected);t&&e(t.key)},[]);const a=v.useCallback(t=>{const r=i.map(e=>({...e,selected:e.key===t.key}));o(r),e(t.key)},[i,e]);return b.jsxs(bt,{gap:"s",alignItems:"center",children:[r&&b.jsx(w.Label,{children:r}),b.jsx(Pt,{options:i,onSelected:a,styles:{width:220}})]})},exports.SelectWeek=dr,exports.Set=sI,exports.ShareDialog=({isOpen:e,options:t,onClose:r})=>{const{log:n}=Q(),[i,o]=v.useState(void 0);n(i||"");const a=v.useRef(null),[s,l]=v.useState(400),{siteUrl:c,listId:u,itemId:h,name:d}=t,p=v.useCallback(()=>{r()},[r]),f=v.useCallback(e=>{if(e.origin!==window.location.origin)return;n("Message from iframe:",e.data);const{name:t,height:r}=JSON.parse(e.data);switch(t){case"share_dismiss":p();break;case"share_resize":l(r)}},[p]);return v.useEffect(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]),v.useEffect(()=>{if(e){const e="sharePoint",t=0,r="",i=(new Date).getTime(),a=!1,s=encodeURIComponent(window.location.origin),l=encodeURIComponent(d),p=`${c}/_layouts/15/sharedialog.aspx?listId=${u}&listItemId=${h}&clientId=${e}&policyTip=${t}&folderColor=${r}&clickTime=${i}&ma=0&fullScreenMode=${a}&itemName= ${l}&channelId=&origin=${s}`;n(p),o(p)}else o(void 0)},[e,c,u,h]),b.jsx(Ci,{isOpen:e,onDismiss:p,maxHeight:"fit-content",children:b.jsx("iframe",{ref:a,src:i||"",style:{width:"100%",height:s,border:"none"},onLoad:()=>n("Iframe loaded")})})},exports.ShowError=({title:e,message:t})=>{const r=ki();return b.jsx(w.Card,{className:r.container,children:b.jsxs(bt,{gap:"l",alignItems:"center",children:[b.jsx(P.ErrorCircleRegular,{className:r.icon}),b.jsxs(bt,{gap:"s",alignItems:"center",children:[b.jsx(w.Title3,{className:r.title,children:e}),b.jsx(w.Body1,{className:r.message,children:t})]})]})})},exports.ShowMessage=_i,exports.Space=e=>{const t=q.useRef(null),[r,n]=q.useState(0),{spaceStyles:i}=dt(e);return q.useEffect(()=>{let e;return t.current&&(e=new _.ResizeObserver(e=>{for(const t of e){const{width:e}=t.contentRect;n(e)}}),e.observe(t.current)),()=>{e&&e.disconnect()}},[]),b.jsx(b.Fragment,{children:b.jsx("div",{id:"-space",style:i(r),ref:t})})},exports.SplitPane=e=>{const{direction:t="horizontal",defaultSize:r="50%",minSize:n=100,maxSize:i=1/0,minSecondarySize:o=100,resizable:a=!0,onResize:s,onResizeEnd:l,primaryContent:c,secondaryContent:u,className:h,styles:d}=e,p=yt(e),f="horizontal"===t,g=q.useRef(null),m=q.useRef(null),[y,x]=q.useState(null),[v,C]=q.useState(!1),[w,k]=q.useState(!1);q.useEffect(()=>{if(null!==y)return;if(!g.current)return;const e=g.current.getBoundingClientRect(),t=f?e.width:e.height;if("number"==typeof r)x(Math.min(Math.max(r,n),i));else if("string"==typeof r&&r.endsWith("%")){const e=parseFloat(r)/100;x(Math.min(Math.max(t*e,n),i))}else x(t/2)},[r,n,i,f,y]);const S=q.useCallback(t=>{if(!g.current)return t;const r=g.current.getBoundingClientRect(),a=(f?r.width:r.height)-(e.resizerSize??6)-o,s=Math.min(i,a);return Math.min(Math.max(t,n),s)},[f,i,n,o,e.resizerSize]),_=q.useCallback(e=>{if(!a)return;e.preventDefault(),C(!0);const t=f?e.clientX:e.clientY,r=y??0,n=e=>{const n=f?e.clientX:e.clientY,i=S(r+(n-t));x(i),null==s||s(i)},i=()=>{if(C(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),m.current){const e=f?m.current.getBoundingClientRect().width:m.current.getBoundingClientRect().height;null==l||l(e)}};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)},[a,f,y,S,s,l]),T=q.useCallback(e=>{if(!a)return;C(!0);const t=e.touches[0],r=f?t.clientX:t.clientY,n=y??0,i=e=>{const t=e.touches[0],i=f?t.clientX:t.clientY,o=S(n+(i-r));x(o),null==s||s(o)},o=()=>{if(C(!1),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",o),m.current){const e=f?m.current.getBoundingClientRect().width:m.current.getBoundingClientRect().height;null==l||l(e)}};document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",o)},[a,f,y,S,s,l]),A=q.useCallback(e=>{if(!a||null===y)return;const t=e.shiftKey?50:10;let r=0;if(f?"ArrowLeft"===e.key?r=-t:"ArrowRight"===e.key&&(r=t):"ArrowUp"===e.key?r=-t:"ArrowDown"===e.key&&(r=t),0!==r){e.preventDefault();const t=S(y+r);x(t),null==s||s(t),null==l||l(t)}},[a,y,f,S,s,l]);q.useEffect(()=>(v?(document.body.style.userSelect="none",document.body.style.cursor=f?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[v,f]);const P=q.useRef(null),E=[p.resizer,w||v?p.resizerActive:""].filter(Boolean).join(" ");return q.useEffect(()=>{if(!a||!P.current)return;const e=P.current,t=e=>_(e),r=e=>T(e),n=e=>A(e),i=()=>k(!0),o=()=>k(!1);return e.addEventListener("mousedown",t),e.addEventListener("touchstart",r),e.addEventListener("keydown",n),e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("mousedown",t),e.removeEventListener("touchstart",r),e.removeEventListener("keydown",n),e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",o)}},[a,_,T,A]),b.jsxs(bt,{ref:g,className:[p.root,h].filter(Boolean).join(" "),style:{height:"100%",width:"100%",...d},direction:f?"horizontal":"vertical",overflow:"hidden",children:[b.jsx(bt,{ref:m,className:p.pane(y??void 0),style:{flex:"0 0 auto"},children:c}),a&&b.jsx(bt,{ref:P,className:E,alignItems:"center",justifyContent:"center",style:{flex:"0 0 auto"},children:b.jsxs(bt,{className:p.resizerGrip,direction:f?"vertical":"horizontal",alignItems:"center",justifyContent:"center",children:[b.jsx(bt,{className:p.gripDot,children:""}),b.jsx(bt,{className:p.gripDot,children:""}),b.jsx(bt,{className:p.gripDot,children:""})]})}),b.jsx(bt,{className:p.secondaryPane,style:{flex:1,minWidth:0,minHeight:0},children:u})]})},exports.Stack=vw,exports.Stack$1=ft,exports.StackItem=e=>{const{children:t,grow:r,disableShrink:n,shrink:i,order:o,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=ne(),c=q.useRef(null),[u,h]=q.useState(0),[d,p]=q.useState(0),f=l(e,u,d);q.useEffect(()=>{let e;return c.current&&(e=new _.ResizeObserver(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;h(e),p(r)}}),e.observe(c.current)),()=>{e&&e.disconnect()}},[]);const g={...f,alignSelf:a,order:o,height:s?"100%":"auto",flexGrow:r?"boolean"==typeof r?1:r:void 0,flexShrink:n||!r&&!i?0:1,minWidth:0,minHeight:0,width:"auto"};return b.jsx(b.Fragment,{children:b.jsx("div",{ref:c,style:g,children:t})})},exports.StackV2=bt,exports.StackedUsers=({users:e,maxVisible:t=5,avatarSize:r=32,showHoverCard:n=!0,context:i,className:o,layout:a="stack",overflowText:s})=>{const l={container:T.css({display:"flex",alignItems:"center",gap:"4px"}),stackLayout:T.css({"& > *:not(:first-child)":{marginLeft:"-8px"}}),spreadLayout:T.css({display:"flex",flexDirection:"row",gap:"8px","& > *":{marginLeft:"0"}}),userCardWrapper:T.css({position:"relative",zIndex:1,transition:"transform 0.2s ease, z-index 0.2s ease","&:hover":{transform:"scale(1.1)",zIndex:10}}),overflowButton:T.css({backgroundColor:w.tokens.colorNeutralBackground1,border:`2px solid ${w.tokens.colorNeutralStroke1}`,borderRadius:"50%",color:w.tokens.colorNeutralForeground1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:600,minWidth:"32px",minHeight:"32px",position:"relative",zIndex:1,transition:"all 0.2s ease","&:hover":{backgroundColor:w.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:T.css({maxWidth:"300px",padding:"12px"}),popoverUserList:T.css({display:"flex",flexDirection:"column",gap:"8px"}),popoverUserCard:T.css({padding:"4px",borderRadius:"4px",transition:"background-color 0.2s ease","&:hover":{backgroundColor:w.tokens.colorNeutralBackground1Hover}})},{warn:c}=Q(),{visibleUsers:u,overflowUsers:h}=v.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),d=v.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?i?b.jsxs(bt,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${o||""}`,children:[u.map((e,t)=>b.jsx("div",{className:l.userCardWrapper,children:b.jsx(kL,{userId:e.id,avatarSize:r,showHoverCard:n??!0,context:i,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&b.jsxs(w.Popover,{withArrow:!0,children:[b.jsx(w.PopoverTrigger,{disableButtonEnhancement:!0,children:b.jsx(w.Button,{className:l.overflowButton,style:{width:`${r}px`,height:`${r}px`,fontSize:r>40?"14px":"12px"},appearance:"subtle",children:d})}),b.jsx(w.PopoverSurface,{className:l.popover,children:b.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>b.jsx("div",{className:l.popoverUserCard,children:b.jsx(kL,{userId:e.id,avatarSize:32,showHoverCard:n??!0,context:i,textPosition:"after",avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(c("StackedUsers: context is required to display user cards"),null):null},exports.Symbol=RC,exports.TIME_RADIO_GROUP=ci,exports.TypographyControl=e=>{const{fontSize:t,fontWeight:r,numberOfLines:n,as:i,padding:o,paddingTop:a,paddingBottom:s,paddingLeft:l,paddingRight:c,margin:u,marginTop:h,marginBottom:d,marginLeft:p,marginRight:f,children:g,style:m,className:y,color:x,block:v,truncate:C,wrap:k}=e,S=T.css({color:x,padding:o&&Tt[o]?Tt[o]:o,paddingTop:a&&Tt[a]?Tt[a]:a,paddingBottom:s&&Tt[s]?Tt[s]:s,paddingLeft:l&&Tt[l]?Tt[l]:l,paddingRight:c&&Tt[c]?Tt[c]:c,margin:u&&Tt[u]?Tt[u]:u,marginTop:h&&Tt[h]?Tt[h]:h,marginBottom:d&&Tt[d]?Tt[d]:d,marginLeft:p&&Tt[p]?Tt[p]:p,marginRight:f&&Tt[f]?Tt[f]:f}),_={...m,...t?{fontSize:_t[t]?_t[t]:t}:{},...r?{fontWeight:At[r]?At[r]:r}:{},...n?{display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",WebkitLineClamp:n}:{}};return b.jsx(w.Text,{as:i,className:w.mergeClasses(y,S),style:_,block:v,truncate:C,wrap:k,children:g})},exports.Uint8Array=Mw,exports.UniversalProvider=({context:e,children:t})=>b.jsx(Z.Provider,{value:e,children:t}),exports.UserCard=kL,exports.Utils=ku,exports.VideoPlayer=e=>{const{url:t,controls:r=!0,width:n="100%",height:i="100%",loop:o=!1,muted:a=!1}=e,[s,l]=v.useState(!1),c=Mi(e);return b.jsx("div",{className:c.videoPlayerContainer,children:b.jsx(L,{url:t,controls:r,width:n,height:i,playing:s,loop:o,muted:a,onPause:()=>l(!1),onPlay:()=>l(!0),className:c.reactPlayer})})},exports.ZERO_WIDTH_SPACE="",exports.__export=yu,exports.__name=mu,exports.abs=py,exports.acos=function(e){return e>1?0:e<-1?Cy:Math.acos(e)},exports.array=_y,exports.arrayLikeKeys=vk,exports.asin=function(e){return e>=1?wy:e<=-1?-wy:Math.asin(e)},exports.assignValue=gk,exports.assignWithDepth_default=od,exports.atan2=fy,exports.baseFor=Sw,exports.baseGetTag=UC,exports.baseKeys=iI,exports.baseUnary=ak,exports.calculateMathMLDimensions=fp,exports.calculateTextHeight=lS,exports.calculateTextWidth=cS,exports.cleanAndMerge=yS,exports.clear=Ip,exports.clear$1=XE,exports.clear$2=HA,exports.clear2=zE,exports.cloneArrayBuffer=Iw,exports.cloneBuffer=Ew,exports.cloneDeep=function e(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array)return t.map(t=>e(t));if(t instanceof Object){const r={};for(const n in t)t.hasOwnProperty(n)&&(r[n]=e(t[n]));return r}return t},exports.cloneTypedArray=Bw,exports.color=Lg,exports.commonDb_exports=Tp,exports.common_default=yp,exports.commonjsGlobal=_n,exports.computeDimensionOfText=vT,exports.configureSvgSize=vp,exports.constant=dy,exports.constant$1=Yg,exports.copyArray=Lw,exports.copyObject=mk,exports.cos=gy,exports.createText=ST,exports.curveBasis=Oy,exports.darken=zu,exports.dayjs2=fu,exports.debounce=it,exports.decodeEntities=vS,exports.defaultCalendarControlStrings=yr,exports.defaultCalendarMonthStrings=ar,exports.defaultConfig2=Vp,exports.defaultConfig_default=kd,exports.defaultSelectWeekStrings=cr,exports.define=gg,exports.detectContentType=st,exports.epsilon=vy,exports.eq=dw,exports.evaluate=ip,exports.every=function(e,t){return e.every(t)},exports.extend=mg,exports.filter=function(e,t){return e.filter(t)},exports.formatTime=hi,exports.generateId=tS,exports.get=function(e,t,r){const n=Array.isArray(t)?t:t.split(".");let i=e;for(const o of n){if(null==i)return r;i=i[o]}return void 0===i?r:i},exports.getAccDescription=Np,exports.getAccTitle=Lp,exports.getAugmentedNamespace=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r},exports.getConfig=Dd,exports.getConfig2=$p,exports.getContentType=e=>st(e).type,exports.getDefaultExportFromCjs=Tn,exports.getDiagramTitle=Op,exports.getEdgeId=CS,exports.getIconSVG=sT,exports.getLineFunctionsWithOffset=CC,exports.getRegisteredLayoutAlgorithm=yM,exports.getStylesFromArray=Qk,exports.getSubGraphTitleMargins=wC,exports.getThemeVariables3=fd,exports.getUrl=np,exports.getUserDefinedConfig=Hd,exports.groupBy=function(e,t){return e.reduce((e,r)=>{const n=String(t(r));return e[n]||(e[n]=[]),e[n].push(r),e},{})},exports.halfPi=wy,exports.hasKatex=pp,exports.hue=function(e,t){var r=t-e;return r?Zg(e,r>180||r<-180?r-360*Math.round(r/360):r):Yg(isNaN(e)?t:e)},exports.identity=Tk,exports.initCloneObject=$w,exports.insertCluster=WA,exports.insertEdge=aM,exports.insertEdgeLabel=YE,exports.insertNode=RE,exports.interpolateNumber=tm,exports.interpolateRgb=em,exports.interpolateString=im,exports.isArguments=Uw,exports.isArray=Gw,exports.isArrayLike=Jw,exports.isBuffer=Qw,exports.isDark=Fu,exports.isEmpty=vI,exports.isEmpty$1=function(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)},exports.isIndex=xk,exports.isLabelStyle=TC,exports.isLength=Xw,exports.isObject=GC,exports.isObjectLike=zw,exports.isTypedArray=dk,exports.isValidShape=OE,exports.lighten=$u,exports.line=My,exports.lineBreakRegex=qd,exports.load=mC,exports.log=bu,exports.map=function(e,t){return e.map(t)},exports.markers_default=dM,exports.max=my,exports.memoize=bw,exports.min=yy,exports.nodeUtil=uk,exports.nogamma=Qg,exports.package_default=du,exports.parseFontSize=mS,exports.parseGenericTypes=sp,exports.pi=Cy,exports.positionEdgeLabel=KE,exports.positionNode=VE,exports.random=nS,exports.registerIconPacks=iT,exports.render=mM,exports.renderKatexSanitized=mp,exports.replaceIconSubstring=kT,exports.rgbConvert=Dg,exports.rgba=Du,exports.sanitizeText=Zd,exports.sanitizeUrl_1=BC,exports.select=fg,exports.selectSvgElement=vx,exports.set=function(e,t,r){const n=Array.isArray(t)?t:t.split("."),i=n.pop();if(!i)return e;let o=e;for(const a of n)a in o&&"object"==typeof o[a]||(o[a]={}),o=o[a];return o[i]=r,e},exports.setAccDescription=jp,exports.setAccTitle=Bp,exports.setConfig2=zp,exports.setDiagramTitle=Dp,exports.setNodeElem=$E,exports.setupGraphViewbox=Cp,exports.setupGraphViewbox2=Hp,exports.sin=xy,exports.some=function(e,t){return e.some(t)},exports.sqrt=by,exports.styles2String=AC,exports.tau=ky,exports.throttle=function(e,t=0){let r=null,n=0;return function(...i){const o=this,a=Date.now();n||(n=a);const s=t-(a-n);s<=0||s>t?(r&&(clearTimeout(r),r=null),n=a,e.apply(o,i)):r||(r=setTimeout(()=>{n=Date.now(),r=null,e.apply(o,i)},s))}},exports.timeKey=di,exports.uniq=function(e){return Array.from(new Set(e))},exports.uniqBy=function(e,t){const r=new Set;return e.filter(e=>{const n=t(e);return!r.has(n)&&(r.add(n),!0)})},exports.unknownIcon=tT,exports.updateNodeBounds=AA,exports.useApplicationContext=K,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:r}=ne();return{aspectRatioStyles:q.useCallback((n,i)=>({...r(e,n,i),...t}),[r,e,t])}},exports.useCalendar=Kt,exports.useCalendarStyles=Ft,exports.useCenterStyles=gt,exports.useComponentUtils=ne,exports.useDataGridStyles=yi,exports.useDateUtils=(e,t,r)=>{const{getFormatRelative:n,formatDate:i}=rt(t,e);return{formatUtcDate:(e,t="PP")=>{const r=k.differenceInDays(new Date,k.parseISO(e));let o="";return void 0!==e&&(o=r>7?i(e,t):n(e)),o},formatTime:r=>r.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:r=>{const n="string"==typeof r?new Date(r):r,i=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(n);let o,a,s,l,c,u;for(const e of i)switch(e.type){case"year":o=e.value;break;case"month":a=e.value;break;case"day":s=e.value;break;case"hour":l=e.value;break;case"minute":c=e.value;break;case"second":u=e.value}return new Date(`${o}-${a}-${s}T${l}:${c}:${u}Z`)}}},exports.useDayViewStyles=Qt,exports.useGraphAPI=()=>{const e=K(),t=null==e?void 0:e.graphClient,{warn:r,error:n}=Q();return{getUser:v.useCallback(async e=>{if(!t)return r("Graph client not available"),null;try{return await t.get(`/users/${e}`)}catch(i){return n("Error fetching user:",i instanceof Error?i:void 0),null}},[t]),getCurrentUser:v.useCallback(async()=>{if(!t)return r("Graph client not available"),null;try{return await t.get("/me")}catch(e){return n("Error fetching current user:",e instanceof Error?e:void 0),null}},[t]),searchUsers:v.useCallback(async(e,i=10)=>{if(!t)return r("Graph client not available"),[];try{return(await t.get(`/users?$search="displayName:${e}" OR "mail:${e}"&$top=${i}`)).value||[]}catch(o){return n("Error searching users:",o instanceof Error?o:void 0),[]}},[t]),getUserPhoto:v.useCallback(async e=>{if(!t)return r("Graph client not available"),null;try{const r=await t.get(`/users/${e}/photo/$value`);return URL.createObjectURL(r)}catch(i){return n("Error fetching user photo:",i instanceof Error?i:void 0),null}},[t]),graphClient:t}},exports.useGridStyles=ct,exports.useImageUtils=()=>{const{error:e}=Q(),t=v.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),r=v.useCallback(async(t,r,n)=>new Promise((i,o)=>{const a=new Image;a.crossOrigin="anonymous",a.addEventListener("load",()=>{var t;const s=document.createElement("canvas");let l;s.width=r??a.width,s.height=n??a.height,null==(t=null==s?void 0:s.getContext("2d"))||t.drawImage(a,0,0,r??a.width,n??a.height);try{l=s.toDataURL("image/png",1),i(l)}catch(c){nt&&e(`[ImageService.getBase64Image]: Err='${c.message}'`),o(c)}}),a.addEventListener("error",t=>{nt&&e(`[ImageService.getBase64Image]: Image load error='${t.message}'`),o(t)}),a.src=t}),[]),n=v.useCallback(e=>!S.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:v.useCallback(t=>{try{const e=document.getElementById(t),r=document.createElement("canvas");r.width=e.width,r.height=e.height;const n=r.getContext("2d");null==n||n.drawImage(e,0,0);return r.toDataURL("image/png")}catch(r){return void(nt&&e(`[getBase64ImageFromDOMImg]: Err='${r.message}'`))}},[]),isBase64Image:n,getImageBase64:r,base64FromSVGUrl:t}},exports.useIndexedDBCache=ee,exports.useLayoutStyles=ut,exports.useLogging=Q,exports.useMensionsStyles=tu,exports.useMermaidDiagramStyles=fL,exports.useNavigationStyles=()=>({root:T.css({width:"100%"}),sectionHeader:T.css({color:w.tokens.colorNeutralForeground3,fontSize:w.tokens.fontSizeBase200,fontWeight:w.tokens.fontWeightSemibold,padding:`${w.tokens.spacingVerticalS} ${w.tokens.spacingHorizontalM}`,textTransform:"uppercase",letterSpacing:"0.5px"})}),exports.useOptionTimeStyles=li,exports.usePolling=te,exports.useRenderHeaderStyles=wi,exports.useSelectTimeStyles=si,exports.useShowErrorStyles=ki,exports.useShowMessageStyles=Si,exports.useSpaceStyles=dt,exports.useSplitPaneStyles=yt,exports.useStackStyles=pt,exports.useStyles=()=>({inputContainer:T.css({marginTop:"auto",marginLeft:"auto","::after":{content:'""',position:"absolute",bottom:0,left:0,right:0,borderBottom:"2px solid transparent",pointerEvents:"none",borderRadius:w.tokens.borderRadiusMedium}}),listContainer:T.css({maxHeight:"400px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:w.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:w.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:w.tokens.colorNeutralStroke2}}),sugestionsHeader:T.css({color:w.tokens.colorBrandBackground})}),exports.useTimeZoneHelper=()=>{const e=K(),t=v.useMemo(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,[]);return{timeZone:t,convertToUserTimeZone:(e,r)=>{const n=r||t;return C.toZonedTime(e,n)},convertFromUserTimeZone:(e,r)=>{const n=r||t;return C.fromZonedTime(e,n)},formatInTimeZone:(e,r,n)=>{const i=n||t;return C.format(C.toZonedTime(e,i),r,{timeZone:i})},getUserTimeZone:()=>{var r,n;return null==(n=null==(r=null==e?void 0:e.pageContext)?void 0:r.user)||n.preferUserTimeZone,t}}},exports.useUtils=Lt,exports.useVideoStyles=Mi,exports.useWeekViewStyles=zt,exports.utils_default=xS,exports.withPath=Sy,exports.wrapLabel=aS;
|
|
428
|
-
//# sourceMappingURL=index-
|
|
428
|
+
//# sourceMappingURL=index-D5nkqpSD.cjs.map
|