@spteck/react-controls-v2 2.3.1 → 2.3.2

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.
Files changed (111) hide show
  1. package/dist/{_arrayEach-DBvjR1ge.cjs → _arrayEach-BRqO-SpE.cjs} +2 -2
  2. package/dist/{_arrayEach-DKae2bvp.js → _arrayEach-Cwvw4ni2.js} +2 -2
  3. package/dist/{arc-iq0incG2.cjs → arc-BL2Lk9fi.cjs} +2 -2
  4. package/dist/{arc-BxA6Yg5_.js → arc-CQrkoYUA.js} +2 -2
  5. package/dist/{architecture-7HQA4BMR-BV5Wih0x.cjs → architecture-7HQA4BMR-CMEUk3AJ.cjs} +2 -2
  6. package/dist/architecture-7HQA4BMR-D36BUVjB.js +6 -0
  7. package/dist/{architectureDiagram-VXUJARFQ-Qlis18u8.js → architectureDiagram-VXUJARFQ-C29B_61g.js} +4 -4
  8. package/dist/{architectureDiagram-VXUJARFQ-idhniCOT.cjs → architectureDiagram-VXUJARFQ-D1bN8BNZ.cjs} +2 -2
  9. package/dist/{blockDiagram-VD42YOAC-3JpJsqTW.cjs → blockDiagram-VD42YOAC-DZo7FQJs.cjs} +2 -2
  10. package/dist/{blockDiagram-VD42YOAC-DBPKc5Mp.js → blockDiagram-VD42YOAC-F1ipHfpp.js} +5 -5
  11. package/dist/{c4Diagram-YG6GDRKO-bZ0lq-1j.js → c4Diagram-YG6GDRKO-DR7HVzsX.js} +3 -3
  12. package/dist/{c4Diagram-YG6GDRKO-bFh-ym0I.cjs → c4Diagram-YG6GDRKO-dCKFkt_B.cjs} +2 -2
  13. package/dist/{channel-o3CxcuKH.js → channel-CBllz1CD.js} +2 -2
  14. package/dist/channel-ROlpVo6C.cjs +2 -0
  15. package/dist/{chunk-4BX2VUAB-ChffNeve.cjs → chunk-4BX2VUAB-BN0Dsby1.cjs} +2 -2
  16. package/dist/{chunk-4BX2VUAB-FrHmkgoD.js → chunk-4BX2VUAB-Dexu954u.js} +2 -2
  17. package/dist/{chunk-55IACEB6-B20avCOS.js → chunk-55IACEB6-BBGZXLP8.js} +2 -2
  18. package/dist/{chunk-55IACEB6-CWMSWgS5.cjs → chunk-55IACEB6-DePLufkz.cjs} +2 -2
  19. package/dist/{chunk-B4BG7PRW-1JkjmMxQ.js → chunk-B4BG7PRW-BRD2Rh1S.js} +5 -5
  20. package/dist/{chunk-B4BG7PRW-DHxN3AGv.cjs → chunk-B4BG7PRW-DRqM841W.cjs} +2 -2
  21. package/dist/{chunk-DI55MBZ5-BHiUtZoK.cjs → chunk-DI55MBZ5-BRX8Txrg.cjs} +2 -2
  22. package/dist/{chunk-DI55MBZ5-Cekk--Cm.js → chunk-DI55MBZ5-je9sFC-6.js} +4 -4
  23. package/dist/{chunk-FMBD7UC4-AWB24rK9.cjs → chunk-FMBD7UC4-C9FMWBlx.cjs} +2 -2
  24. package/dist/{chunk-FMBD7UC4-Bgpu0FwP.js → chunk-FMBD7UC4-DL7OjOOQ.js} +2 -2
  25. package/dist/{chunk-QN33PNHL-GOKY5hea.js → chunk-QN33PNHL-DhFIE57U.js} +2 -2
  26. package/dist/{chunk-QN33PNHL-BDQd2juq.cjs → chunk-QN33PNHL-V67iLDBT.cjs} +2 -2
  27. package/dist/{chunk-QZHKN3VN-DXRnlHEw.js → chunk-QZHKN3VN-B9yf1CZ_.js} +2 -2
  28. package/dist/{chunk-QZHKN3VN-DrSljM5O.cjs → chunk-QZHKN3VN-BZ0qVcDy.cjs} +2 -2
  29. package/dist/{chunk-TZMSLE5B-CxGg52ib.cjs → chunk-TZMSLE5B-BQNvw-cc.cjs} +2 -2
  30. package/dist/{chunk-TZMSLE5B-BERoVTPQ.js → chunk-TZMSLE5B-DYkbGDbj.js} +2 -2
  31. package/dist/{classDiagram-2ON5EDUG-BPjkW57C.cjs → classDiagram-2ON5EDUG-CidWtlgi.cjs} +2 -2
  32. package/dist/{classDiagram-2ON5EDUG-DPTzQt7M.js → classDiagram-2ON5EDUG-D-GPLgqe.js} +3 -3
  33. package/dist/{classDiagram-v2-WZHVMYZB-BPjkW57C.cjs → classDiagram-v2-WZHVMYZB-CidWtlgi.cjs} +2 -2
  34. package/dist/{classDiagram-v2-WZHVMYZB-DPTzQt7M.js → classDiagram-v2-WZHVMYZB-D-GPLgqe.js} +3 -3
  35. package/dist/components/dropDownField/IDropDownFieldProps.d.ts +1 -0
  36. package/dist/components/selectView/SelectView.d.ts +1 -0
  37. package/dist/{cose-bilkent-S5V4N54A-BCPhea22.js → cose-bilkent-S5V4N54A-9pkFbvgi.js} +2 -2
  38. package/dist/{cose-bilkent-S5V4N54A-C6osVExR.cjs → cose-bilkent-S5V4N54A-DMeEZyLd.cjs} +2 -2
  39. package/dist/{dagre-6UL2VRFP-D6NU_G7J.cjs → dagre-6UL2VRFP-D1BgCpg1.cjs} +2 -2
  40. package/dist/{dagre-6UL2VRFP-DF87v2SP.js → dagre-6UL2VRFP-m--0YRvK.js} +2 -2
  41. package/dist/{diagram-PSM6KHXK-DMBrza7v.js → diagram-PSM6KHXK-RuWvU0LU.js} +5 -5
  42. package/dist/{diagram-PSM6KHXK-BpcNw66L.cjs → diagram-PSM6KHXK-U91xmAoT.cjs} +2 -2
  43. package/dist/{diagram-QEK2KX5R-DXPwxq0x.js → diagram-QEK2KX5R--L8OdbhL.js} +4 -4
  44. package/dist/{diagram-QEK2KX5R-Bokx4-2m.cjs → diagram-QEK2KX5R-D2HiY8GI.cjs} +2 -2
  45. package/dist/{diagram-S2PKOQOG-5Lk7Jvxw.cjs → diagram-S2PKOQOG-DJz0ptvH.cjs} +2 -2
  46. package/dist/{diagram-S2PKOQOG-BML4CSFv.js → diagram-S2PKOQOG-DnKY-URt.js} +4 -4
  47. package/dist/{erDiagram-Q2GNP2WA-C0YzWGzs.cjs → erDiagram-Q2GNP2WA-DsSmT7AE.cjs} +2 -2
  48. package/dist/{erDiagram-Q2GNP2WA-DtyOHj8U.js → erDiagram-Q2GNP2WA-eJvs0oKG.js} +5 -5
  49. package/dist/{flowDiagram-NV44I4VS-D9Ha29xd.cjs → flowDiagram-NV44I4VS-BkCuDgSL.cjs} +2 -2
  50. package/dist/{flowDiagram-NV44I4VS-8LGULBMT.js → flowDiagram-NV44I4VS-C2EzUtAD.js} +6 -6
  51. package/dist/{ganttDiagram-JELNMOA3-BfA1s6s8.cjs → ganttDiagram-JELNMOA3-BX_NQ3yr.cjs} +2 -2
  52. package/dist/{ganttDiagram-JELNMOA3-BTIJYy7v.js → ganttDiagram-JELNMOA3-P58sdJza.js} +3 -3
  53. package/dist/gitGraph-G5XIXVHT-D0WwJntb.js +6 -0
  54. package/dist/{gitGraph-G5XIXVHT-CJquxsrP.cjs → gitGraph-G5XIXVHT-D5hTnKMW.cjs} +2 -2
  55. package/dist/{gitGraphDiagram-V2S2FVAM-DgaiLSV0.cjs → gitGraphDiagram-V2S2FVAM-BbqBVBDG.cjs} +2 -2
  56. package/dist/{gitGraphDiagram-V2S2FVAM-BDuvfgFm.js → gitGraphDiagram-V2S2FVAM-DfqsY2SX.js} +5 -5
  57. package/dist/{index-r6bYN_1a.js → index-DA12LU30.js} +40 -37
  58. package/dist/{index-DBmfYPjr.cjs → index-Drtv-A5D.cjs} +5 -5
  59. package/dist/index.cjs +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/{info-VBDWY6EO-hYQZ7BB0.cjs → info-VBDWY6EO-Bbu_pP-o.cjs} +2 -2
  62. package/dist/info-VBDWY6EO-CAxuDMRM.js +6 -0
  63. package/dist/{infoDiagram-HS3SLOUP-CbvZczcy.cjs → infoDiagram-HS3SLOUP-CHXn5khx.cjs} +2 -2
  64. package/dist/{infoDiagram-HS3SLOUP-FP_yig69.js → infoDiagram-HS3SLOUP-Cl2XyVWg.js} +3 -3
  65. package/dist/{journeyDiagram-XKPGCS4Q-CEFFFkKd.cjs → journeyDiagram-XKPGCS4Q-BSm6x_O4.cjs} +2 -2
  66. package/dist/{journeyDiagram-XKPGCS4Q-CiJ6zb1i.js → journeyDiagram-XKPGCS4Q-IcmQHEEF.js} +5 -5
  67. package/dist/{kanban-definition-3W4ZIXB7-CGmr8XfQ.js → kanban-definition-3W4ZIXB7-B4sGmttl.js} +3 -3
  68. package/dist/{kanban-definition-3W4ZIXB7-DCwMWi3p.cjs → kanban-definition-3W4ZIXB7-BK8dwKR3.cjs} +2 -2
  69. package/dist/{linear-DnGQibMg.js → linear-Caqqc3rR.js} +2 -2
  70. package/dist/{linear-D8E_synt.cjs → linear-D7tV1sDc.cjs} +2 -2
  71. package/dist/{maplibre-gl-dCwYGQU4.js → maplibre-gl-0cvSldGe.js} +2 -2
  72. package/dist/{maplibre-gl-pYF_ngpG.cjs → maplibre-gl-CfxOpEgG.cjs} +2 -2
  73. package/dist/{mermaid-parser.core-CWz1o5JP.js → mermaid-parser.core-C028wJIY.js} +10 -10
  74. package/dist/{mermaid-parser.core-DDF0ccOL.cjs → mermaid-parser.core-D13lzZ3i.cjs} +2 -2
  75. package/dist/{mindmap-definition-VGOIOE7T-FjKtYkWd.cjs → mindmap-definition-VGOIOE7T-Bhox2Let.cjs} +2 -2
  76. package/dist/{mindmap-definition-VGOIOE7T-C5MXjRc9.js → mindmap-definition-VGOIOE7T-D4GTeD4Z.js} +4 -4
  77. package/dist/{packet-DYOGHKS2-D1v8Vy1g.cjs → packet-DYOGHKS2-CHcUlFvl.cjs} +2 -2
  78. package/dist/packet-DYOGHKS2-idXY8lrh.js +6 -0
  79. package/dist/{pie-VRWISCQL-DmeMueEW.cjs → pie-VRWISCQL-B_sCvHdr.cjs} +2 -2
  80. package/dist/pie-VRWISCQL-DpLW6UsW.js +6 -0
  81. package/dist/{pieDiagram-ADFJNKIX-6fWPR7Ls.js → pieDiagram-ADFJNKIX-B2BrCqvZ.js} +5 -5
  82. package/dist/{pieDiagram-ADFJNKIX-Cvyyoe7M.cjs → pieDiagram-ADFJNKIX-BsZNtR_x.cjs} +2 -2
  83. package/dist/{quadrantDiagram-AYHSOK5B-CwDe4KwO.cjs → quadrantDiagram-AYHSOK5B-CZt0bGWV.cjs} +2 -2
  84. package/dist/{quadrantDiagram-AYHSOK5B-BgXQivu3.js → quadrantDiagram-AYHSOK5B-ogZJFMK-.js} +3 -3
  85. package/dist/radar-ZZBFDIW7-D6OzRO1_.js +6 -0
  86. package/dist/{radar-ZZBFDIW7-DO0muZs0.cjs → radar-ZZBFDIW7-DhIykWMF.cjs} +2 -2
  87. package/dist/{requirementDiagram-UZGBJVZJ-CeIJ08b_.js → requirementDiagram-UZGBJVZJ-8JU4oole.js} +4 -4
  88. package/dist/{requirementDiagram-UZGBJVZJ-z39KmEdg.cjs → requirementDiagram-UZGBJVZJ-BIjkRgKu.cjs} +2 -2
  89. package/dist/{sankeyDiagram-TZEHDZUN-DmMl4azI.js → sankeyDiagram-TZEHDZUN-BpODVO08.js} +2 -2
  90. package/dist/{sankeyDiagram-TZEHDZUN-B9TuJmd0.cjs → sankeyDiagram-TZEHDZUN-CRicni84.cjs} +2 -2
  91. package/dist/{sequenceDiagram-WL72ISMW-ChX1PErX.cjs → sequenceDiagram-WL72ISMW-CYC_z645.cjs} +2 -2
  92. package/dist/{sequenceDiagram-WL72ISMW-CcjLhIox.js → sequenceDiagram-WL72ISMW-OHkQEU2A.js} +4 -4
  93. package/dist/{stateDiagram-FKZM4ZOC-DNXrTtku.cjs → stateDiagram-FKZM4ZOC-BkTonyK9.cjs} +2 -2
  94. package/dist/{stateDiagram-FKZM4ZOC-zQUhlqIe.js → stateDiagram-FKZM4ZOC-D2BpasUv.js} +3 -3
  95. package/dist/{stateDiagram-v2-4FDKWEC3-BEegnVik.cjs → stateDiagram-v2-4FDKWEC3-D62yBHYe.cjs} +2 -2
  96. package/dist/{stateDiagram-v2-4FDKWEC3-Dtg323pE.js → stateDiagram-v2-4FDKWEC3-DFtkNO2o.js} +3 -3
  97. package/dist/{timeline-definition-IT6M3QCI-Cf4OkFlr.js → timeline-definition-IT6M3QCI-3zejr2tI.js} +3 -3
  98. package/dist/{timeline-definition-IT6M3QCI-Do30fWDV.cjs → timeline-definition-IT6M3QCI-B0LBMd3f.cjs} +2 -2
  99. package/dist/{treemap-GDKQZRPO-BecKu0FE.cjs → treemap-GDKQZRPO-4mSUrehq.cjs} +2 -2
  100. package/dist/treemap-GDKQZRPO-BiAtAScA.js +6 -0
  101. package/dist/{xychartDiagram-PRI3JC2R-zMeDgcPs.js → xychartDiagram-PRI3JC2R-DGqRjNYl.js} +3 -3
  102. package/dist/{xychartDiagram-PRI3JC2R-haWlXFUn.cjs → xychartDiagram-PRI3JC2R-DMXQ9XWO.cjs} +2 -2
  103. package/package.json +1 -1
  104. package/dist/architecture-7HQA4BMR-ClndFXiy.js +0 -6
  105. package/dist/channel-COiQ5BLW.cjs +0 -2
  106. package/dist/gitGraph-G5XIXVHT-4SUZU9x4.js +0 -6
  107. package/dist/info-VBDWY6EO-ChLOw2tm.js +0 -6
  108. package/dist/packet-DYOGHKS2-gRUdnnSs.js +0 -6
  109. package/dist/pie-VRWISCQL-Bvcic2Eu.js +0 -6
  110. package/dist/radar-ZZBFDIW7-DkPYS2s4.js +0 -6
  111. package/dist/treemap-GDKQZRPO-CoIiWGS-.js +0 -6
@@ -22,7 +22,7 @@
22
22
  &::-webkit-scrollbar-thumb:hover {
23
23
  background: ${w.tokens.colorBrandBackgroundHover};
24
24
  }
25
- `,Ei=H.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:g,isLoadingDataMessage:f,dataGridBodyClassName:m,dataGridBodyStyles:y,refreshData:b,enableInfiniteScroll:x,onLoadMore:C,infiniteScrollPageSize:k,hasNextPage:S,isLoadingMore:_,autoShowLastPage:T=!0,virtualizedHeight:A=600,virtualizedItemSize:E=44,startIndex:P,onRowClick:M}=e,I=H.useMemo(()=>r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>v.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>v.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=H.useCallback(e=>n.findIndex(t=>t===e),[n]),[j,N]=H.useState(new Set(l.map(e=>L(e)))),[D,O]=H.useState(0);H.useEffect(()=>{l.length&&N(new Set(l.map(e=>L(e))))},[l,n,L]),H.useEffect(()=>{b&&N(new Set)},[b]);const[z,F]=H.useState(null),R=H.useMemo(()=>new Map(n.map((e,t)=>[e,t])),[n]);H.useEffect(()=>{"row"===a&&null!=z&&z>=n.length&&F(null)},[n,z,a]),H.useEffect(()=>{b&&"row"===a&&F(null)},[b,a]);const $=H.useRef(null),V=H.useRef(n.length),W=H.useRef(!1),q=H.useRef(!1),U=H.useRef(!1);H.useImperativeHandle(t,()=>({scrollToIndex:(e,t="auto")=>{const r=$.current;r&&"scrollToItem"in r&&r.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{O(e=>e+1),V.current=0,W.current=!1,q.current=!1,U.current=!1,G.current=-1,N(new Set),F(null)},getSelectedRow:()=>null!==z&&z<n.length?{item:n[z],index:z}:null,setSelectedRow:e=>{const t=n.findIndex(t=>t===e);-1!==t&&(F(t),null==s||s([e]))}})),H.useEffect(()=>{if(!W.current&&"number"==typeof P&&$.current){const e=$.current;"scrollToItem"in e&&e.scrollToItem(Math.min(P,Math.max(n.length-1,0)),"start"),W.current=!0}},[P,n.length]),H.useEffect(()=>{const e=V.current,t=n.length,r=t>e;if(V.current=t,!T||!r||0===e)return;const i=$.current;i&&"scrollToItem"in i&&i.scrollToItem(Math.max(t-1,0),"end")},[n.length,T]);const G=H.useRef(-1),X=H.useCallback(({visibleStopIndex:e})=>{if(!x||!C)return;if(_||U.current)return;if(!q.current)return void(q.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())},[x,C,S,_,n.length,k]);H.useEffect(()=>{U.current&&n.length>G.current&&(U.current=!1)},[n.length]);const J=H.useMemo(()=>({overflowX:"auto",overflowY:"hidden",position:"relative"}),[]);return v.jsxs("div",{style:J,className:Ai,children:[g&&v.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",padding:8},children:H.isValidElement(f)?f:v.jsxs(w.Spinner,{size:"extra-tiny",children:[" ",f??"Loading data..."," "]})}),!g&&n.length?v.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:[v.jsx(B.DataGridHeader,{children:v.jsx(B.DataGridRow,{children:({renderHeaderCell:e})=>v.jsx(B.DataGridHeaderCell,{children:e()})})}),v.jsx(B.DataGridBody,{itemSize:E,height:A,width:"100%",listProps:{onItemsRendered:X},children:(e,t)=>(()=>{const r=e.item,i=R.get(r)??n.indexOf(r),o="row"===a,l=o&&z===i;return v.jsx(B.DataGridRow,{style:{...t,cursor:o?"pointer":void 0,background:l?w.tokens.colorSubtleBackgroundSelected:void 0},onClick:e=>{F(i),null==s||s([r]),null==M||M(r,i)},"aria-selected":l||void 0,children:({renderCell:e})=>v.jsx(B.DataGridCell,{children:e(r)})})})()})]},D):g||n.length?null:v.jsx("div",{children:p})]})});Ei.displayName="DataGridV2";const Pi=w.makeStyles({dialog:{overflow:"visible"},dialogBody:{overflow:"visible"}}),Mi=e=>{const{isOpen:t,dialogTitle:r,dialogActions:n,children:i,maxWidth:o,className:a,minHeight:s,minWidth:l,maxHeight:c}=e,u=Pi();return t?v.jsx(w.Dialog,{open:t,modalType:"modal",children:v.jsxs(w.DialogSurface,{className:w.mergeClasses(u.dialog,a),style:{maxWidth:o??600,minWidth:l??200,...s?{minHeight:s}:{},...c?{maxHeight:c}:{}},children:[v.jsx(w.DialogTitle,{children:r}),v.jsx(w.DialogBody,{className:u.dialogBody,children:v.jsx(w.DialogContent,{children:i})}),v.jsx(w.DialogActions,{fluid:!0,position:"end",children:n})]})}):v.jsx(v.Fragment,{})},Ii=()=>({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%"})}),Bi=()=>x.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})}),[]),Li=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%"}}),ji=e=>{const{messageType:t,children:r,message:n}=e,i=Li(),[o,a]=H.useState(null),s=H.useCallback(()=>v.jsx(v.Fragment,{children:v.jsxs("div",{className:i.errorContainer,children:[v.jsx("div",{className:i.errorIcon,children:v.jsx(M.Icon,{icon:"fluent:error-circle-12-regular",width:"32",height:"32",color:w.tokens.colorStatusDangerForeground1})}),v.jsx(w.Body1,{children:n})]})}),[n,i.errorContainer,i.errorIcon]);return H.useEffect(()=>{switch(t){case Y.SUCCESS:a(v.jsx(E.CheckmarkCircle32Regular,{primaryFill:w.tokens.colorStatusSuccessForeground1}));break;case Y.INFO:a(v.jsx(E.Info32Regular,{primaryFill:w.tokens.colorStatusWarningForeground1}))}},[t]),t===Y.ERROR?v.jsx(s,{}):v.jsx(v.Fragment,{children:v.jsxs("div",{className:i.root,children:[o,v.jsx(w.Body1Strong,{children:n}),r]})})},Ni=({item:e,onSelectedItem:t})=>w.useIsOverflowItemVisible(e.id)?null:v.jsx(w.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:v.jsx("div",{children:e.name})},e.id),Di=({items:e,onSelectedItem:t,theme:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu(),a=H.useMemo(()=>E.bundleIcon(E.MoreHorizontalFilled,E.MoreHorizontalRegular),[]);return o?v.jsx(w.IdPrefixProvider,{value:"menu-over-",children:v.jsx(w.FluentProvider,{theme:r,children:v.jsxs(w.Menu,{children:[v.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:v.jsx(w.MenuButton,{appearance:"transparent",ref:n,icon:v.jsx(a,{}),"aria-label":`${i} more options`,role:"button"})}),v.jsx(w.MenuPopover,{children:v.jsx(w.MenuList,{children:e.map(e=>v.jsx(Ni,{item:e,onSelectedItem:t},e.id))})})]})})}):null},Oi=({id:e,children:t})=>w.useIsOverflowItemVisible(e)?null:v.jsx(w.MenuItem,{children:t}),zi=x.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:g,openCategories:f,onCategoryToggle:m,className:y,style:b})=>{const C=x.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=x.useCallback(e=>t=>{e.href&&t.preventDefault(),null==h||h(e.key,e.href)},[h]),S=x.useCallback((e,t)=>{if(!h)return;const r=C.get(t.value);r&&h(t.value,r.href)},[h,C]),_=x.useCallback((e,t)=>{null==m||m(t.value)},[m]),T=e=>v.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key),A=e=>v.jsxs(w.NavCategory,{value:e.key,children:[v.jsx(w.NavCategoryItem,{icon:e.icon,children:e.name}),v.jsx(w.NavSubItemGroup,{children:e.children.map(e=>e.icon?v.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key):v.jsx(w.NavSubItem,{value:e.key,href:e.href,onClick:k(e),children:e.name},e.key))})]},e.key),E=x.useMemo(()=>({flexShrink:0,...b}),[b]);return v.jsxs(w.NavDrawer,{open:t,defaultOpen:r,type:n,size:i,className:y,style:E,selectedValue:l,defaultSelectedValue:c,selectedCategoryValue:u,multiple:d,density:p,defaultOpenCategories:g,openCategories:f,onNavItemSelect:S,onNavCategoryItemToggle:_,children:[void 0!==a&&v.jsx(w.NavDrawerHeader,{children:a}),v.jsxs(w.NavDrawerBody,{children:[o&&(o.href?v.jsx(w.AppItem,{icon:o.icon,href:o.href,children:o.name}):v.jsx(w.AppItemStatic,{icon:o.icon,children:o.name})),e.map(e=>e.isSectionHeader&&e.children&&e.children.length>0?(e=>v.jsxs(x.Fragment,{children:[v.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&&v.jsx(w.NavDrawerFooter,{children:s})]})});zi.displayName="Navigation";const Fi=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"})}),Ri=H.createContext(null);function $i(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(!$i(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(!$i(e[i],t[i]))return!1}return!0}return!1}function Vi(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function Wi(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&&!$i(r.padding,e.padding)&&(n.padding=r.padding),n}const qi=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Hi(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 qi)e in n&&(r[e]=n[e])}return r||e});return{...e,layers:r}}const Ui={version:8,sources:{},layers:[]},Gi={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"},Xi={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"},Ji={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"},Yi=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Zi=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Ki{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[Ji[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||Vi(this._map.transform);const t=this.props[Xi[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=Vi(e),Wi(e,this.props)),this._onPointerEvent=e=>{"mousemove"!==e.type&&"mouseout"!==e.type||this._updateHover(e);const t=this.props[Gi[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=Ki.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=Ui}=t,n={...t,...t.initialViewState,container:e,style:Hi(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 Gi)o.on(a,this._onPointerEvent);for(const a in Xi)o.on(a,this._onCameraEvent);for(const a in Ji)o.on(a,this._onEvent);this._map=o}recycle(){const e=this.map.getContainer().querySelector("[mapboxgl-children]");null==e||e.remove(),Ki.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=Wi(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 Yi)if(i in e&&!$i(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=Ui,styleDiffing:r=!0}=e,n={diff:r};"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(Hi(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&&!$i(e,s.light)&&(s.light=e,a.setLight(e)),t&&!$i(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&&!$i(r,s.sky)&&(s.sky=r,a.setSky(r)),void 0===n||$i(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 Zi){const i=e[n]??!0;$i(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}}Ki.savedMaps=[];const Qi=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function eo(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||Qi.includes(n)||(r[n]=t[n].bind(t));return r}const to="undefined"!=typeof document?x.useLayoutEffect:x.useEffect;const ro=H.createContext(null);const no=H.forwardRef(function(e,t){const r=x.useContext(Ri),[n,i]=x.useState(null),o=x.useRef(),{current:a}=x.useRef({mapLib:null,map:null});x.useEffect(()=>{const t=e.mapLib;let n,s=!0;return Promise.resolve(t||Promise.resolve().then(()=>require("./maplibre-gl-pYF_ngpG.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=Ki.reuse(e,o.current)),n||(n=new Ki(l.Map,e,o.current)),a.map=eo(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())}},[]),to(()=>{n&&n.setProps(e)}),x.useImperativeHandle(t,()=>a.map,[n]);const s=x.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return H.createElement("div",{id:e.id,ref:o,style:s},n&&H.createElement(ro.Provider,{value:a},H.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))}),io=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function oo(e,t){if(!e||!t)return;const r=e.style;for(const n in t){const e=t[n];Number.isFinite(e)&&!io.test(n)?r[n]=`${e}px`:r[n]=e}}function ao(e,t){if(e===t)return null;const r=so(e),n=so(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 so(e){return new Set(e?e.trim().split(/\s+/):[])}const lo=x.memo(x.forwardRef((e,t)=>{const{map:r,mapLib:n}=x.useContext(ro),i=x.useRef({props:e}),o=x.useMemo(()=>{let t=!1;H.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},[]);x.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:g="auto"}=e;x.useEffect(()=>{oo(o.getElement(),c)},[c]),x.useImperativeHandle(t,()=>o,[]);const f=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()!==g&&o.setPitchAlignment(g),o.getPopup()!==h&&o.setPopup(h);const m=ao(f.className,e.className);if(m)for(const y of m)o.toggleClassName(y);return i.current.props=e,P.createPortal(e.children,o.getElement())}));function co(e,t,r,n){const i=x.useContext(ro),o=x.useMemo(()=>e(i),[]);return x.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}x.memo(x.forwardRef((e,t)=>{const{map:r,mapLib:n}=x.useContext(ro),i=x.useMemo(()=>document.createElement("div"),[]),o=x.useRef({props:e}),a=x.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(x.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()}},[]),x.useEffect(()=>{oo(a.getElement(),e.style)},[e.style]),x.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&&!$i(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=ao(t.className,e.className);if(r)for(const e of r)a.toggleClassName(e);o.current.props=e}return P.createPortal(e.children,i)})),x.memo(function(e){const t=co(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return x.useEffect(()=>{oo(t._controlContainer,e.style)},[e.style]),null}),x.memo(x.forwardRef(function(e,t){const r=x.useRef({props:e}),n=co(({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,x.useImperativeHandle(t,()=>n,[]),x.useEffect(()=>{oo(n._container,e.style)},[e.style]),null})),x.memo(function(e){const t=co(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),r=x.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),x.useEffect(()=>{oo(t._container,i)},[i]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null});const uo="spteck-react-controls-maplibre-styles",ho=T.css`
25
+ `,Ei=H.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:g,isLoadingDataMessage:f,dataGridBodyClassName:m,dataGridBodyStyles:y,refreshData:b,enableInfiniteScroll:x,onLoadMore:C,infiniteScrollPageSize:k,hasNextPage:S,isLoadingMore:_,autoShowLastPage:T=!0,virtualizedHeight:A=600,virtualizedItemSize:E=44,startIndex:P,onRowClick:M}=e,I=H.useMemo(()=>r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>v.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>v.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=H.useCallback(e=>n.findIndex(t=>t===e),[n]),[j,N]=H.useState(new Set(l.map(e=>L(e)))),[D,O]=H.useState(0);H.useEffect(()=>{l.length&&N(new Set(l.map(e=>L(e))))},[l,n,L]),H.useEffect(()=>{b&&N(new Set)},[b]);const[z,F]=H.useState(null),R=H.useMemo(()=>new Map(n.map((e,t)=>[e,t])),[n]);H.useEffect(()=>{"row"===a&&null!=z&&z>=n.length&&F(null)},[n,z,a]),H.useEffect(()=>{b&&"row"===a&&F(null)},[b,a]);const $=H.useRef(null),V=H.useRef(n.length),W=H.useRef(!1),q=H.useRef(!1),U=H.useRef(!1);H.useImperativeHandle(t,()=>({scrollToIndex:(e,t="auto")=>{const r=$.current;r&&"scrollToItem"in r&&r.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{O(e=>e+1),V.current=0,W.current=!1,q.current=!1,U.current=!1,G.current=-1,N(new Set),F(null)},getSelectedRow:()=>null!==z&&z<n.length?{item:n[z],index:z}:null,setSelectedRow:e=>{const t=n.findIndex(t=>t===e);-1!==t&&(F(t),null==s||s([e]))}})),H.useEffect(()=>{if(!W.current&&"number"==typeof P&&$.current){const e=$.current;"scrollToItem"in e&&e.scrollToItem(Math.min(P,Math.max(n.length-1,0)),"start"),W.current=!0}},[P,n.length]),H.useEffect(()=>{const e=V.current,t=n.length,r=t>e;if(V.current=t,!T||!r||0===e)return;const i=$.current;i&&"scrollToItem"in i&&i.scrollToItem(Math.max(t-1,0),"end")},[n.length,T]);const G=H.useRef(-1),X=H.useCallback(({visibleStopIndex:e})=>{if(!x||!C)return;if(_||U.current)return;if(!q.current)return void(q.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())},[x,C,S,_,n.length,k]);H.useEffect(()=>{U.current&&n.length>G.current&&(U.current=!1)},[n.length]);const J=H.useMemo(()=>({overflowX:"auto",overflowY:"hidden",position:"relative"}),[]);return v.jsxs("div",{style:J,className:Ai,children:[g&&v.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",padding:8},children:H.isValidElement(f)?f:v.jsxs(w.Spinner,{size:"extra-tiny",children:[" ",f??"Loading data..."," "]})}),!g&&n.length?v.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:[v.jsx(B.DataGridHeader,{children:v.jsx(B.DataGridRow,{children:({renderHeaderCell:e})=>v.jsx(B.DataGridHeaderCell,{children:e()})})}),v.jsx(B.DataGridBody,{itemSize:E,height:A,width:"100%",listProps:{onItemsRendered:X},children:(e,t)=>(()=>{const r=e.item,i=R.get(r)??n.indexOf(r),o="row"===a,l=o&&z===i;return v.jsx(B.DataGridRow,{style:{...t,cursor:o?"pointer":void 0,background:l?w.tokens.colorSubtleBackgroundSelected:void 0},onClick:e=>{F(i),null==s||s([r]),null==M||M(r,i)},"aria-selected":l||void 0,children:({renderCell:e})=>v.jsx(B.DataGridCell,{children:e(r)})})})()})]},D):g||n.length?null:v.jsx("div",{children:p})]})});Ei.displayName="DataGridV2";const Pi=w.makeStyles({dialog:{overflow:"visible"},dialogBody:{overflow:"visible"}}),Mi=e=>{const{isOpen:t,dialogTitle:r,dialogActions:n,children:i,maxWidth:o,className:a,minHeight:s,minWidth:l,maxHeight:c}=e,u=Pi();return t?v.jsx(w.Dialog,{open:t,modalType:"modal",children:v.jsxs(w.DialogSurface,{className:w.mergeClasses(u.dialog,a),style:{maxWidth:o??600,minWidth:l??200,...s?{minHeight:s}:{},...c?{maxHeight:c}:{}},children:[v.jsx(w.DialogTitle,{children:r}),v.jsx(w.DialogBody,{className:u.dialogBody,children:v.jsx(w.DialogContent,{children:i})}),v.jsx(w.DialogActions,{fluid:!0,position:"end",children:n})]})}):v.jsx(v.Fragment,{})},Ii=()=>({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%"})}),Bi=()=>x.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})}),[]),Li=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%"}}),ji=e=>{const{messageType:t,children:r,message:n}=e,i=Li(),[o,a]=H.useState(null),s=H.useCallback(()=>v.jsx(v.Fragment,{children:v.jsxs("div",{className:i.errorContainer,children:[v.jsx("div",{className:i.errorIcon,children:v.jsx(M.Icon,{icon:"fluent:error-circle-12-regular",width:"32",height:"32",color:w.tokens.colorStatusDangerForeground1})}),v.jsx(w.Body1,{children:n})]})}),[n,i.errorContainer,i.errorIcon]);return H.useEffect(()=>{switch(t){case Y.SUCCESS:a(v.jsx(E.CheckmarkCircle32Regular,{primaryFill:w.tokens.colorStatusSuccessForeground1}));break;case Y.INFO:a(v.jsx(E.Info32Regular,{primaryFill:w.tokens.colorStatusWarningForeground1}))}},[t]),t===Y.ERROR?v.jsx(s,{}):v.jsx(v.Fragment,{children:v.jsxs("div",{className:i.root,children:[o,v.jsx(w.Body1Strong,{children:n}),r]})})},Ni=({item:e,onSelectedItem:t})=>w.useIsOverflowItemVisible(e.id)?null:v.jsx(w.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:v.jsx("div",{children:e.name})},e.id),Di=({items:e,onSelectedItem:t,theme:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu(),a=H.useMemo(()=>E.bundleIcon(E.MoreHorizontalFilled,E.MoreHorizontalRegular),[]);return o?v.jsx(w.IdPrefixProvider,{value:"menu-over-",children:v.jsx(w.FluentProvider,{theme:r,children:v.jsxs(w.Menu,{children:[v.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:v.jsx(w.MenuButton,{appearance:"transparent",ref:n,icon:v.jsx(a,{}),"aria-label":`${i} more options`,role:"button"})}),v.jsx(w.MenuPopover,{children:v.jsx(w.MenuList,{children:e.map(e=>v.jsx(Ni,{item:e,onSelectedItem:t},e.id))})})]})})}):null},Oi=({id:e,children:t})=>w.useIsOverflowItemVisible(e)?null:v.jsx(w.MenuItem,{children:t}),zi=x.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:g,openCategories:f,onCategoryToggle:m,className:y,style:b})=>{const C=x.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=x.useCallback(e=>t=>{e.href&&t.preventDefault(),null==h||h(e.key,e.href)},[h]),S=x.useCallback((e,t)=>{if(!h)return;const r=C.get(t.value);r&&h(t.value,r.href)},[h,C]),_=x.useCallback((e,t)=>{null==m||m(t.value)},[m]),T=e=>v.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key),A=e=>v.jsxs(w.NavCategory,{value:e.key,children:[v.jsx(w.NavCategoryItem,{icon:e.icon,children:e.name}),v.jsx(w.NavSubItemGroup,{children:e.children.map(e=>e.icon?v.jsx(w.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:k(e),children:e.name},e.key):v.jsx(w.NavSubItem,{value:e.key,href:e.href,onClick:k(e),children:e.name},e.key))})]},e.key),E=x.useMemo(()=>({flexShrink:0,...b}),[b]);return v.jsxs(w.NavDrawer,{open:t,defaultOpen:r,type:n,size:i,className:y,style:E,selectedValue:l,defaultSelectedValue:c,selectedCategoryValue:u,multiple:d,density:p,defaultOpenCategories:g,openCategories:f,onNavItemSelect:S,onNavCategoryItemToggle:_,children:[void 0!==a&&v.jsx(w.NavDrawerHeader,{children:a}),v.jsxs(w.NavDrawerBody,{children:[o&&(o.href?v.jsx(w.AppItem,{icon:o.icon,href:o.href,children:o.name}):v.jsx(w.AppItemStatic,{icon:o.icon,children:o.name})),e.map(e=>e.isSectionHeader&&e.children&&e.children.length>0?(e=>v.jsxs(x.Fragment,{children:[v.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&&v.jsx(w.NavDrawerFooter,{children:s})]})});zi.displayName="Navigation";const Fi=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"})}),Ri=H.createContext(null);function $i(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(!$i(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(!$i(e[i],t[i]))return!1}return!0}return!1}function Vi(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function Wi(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&&!$i(r.padding,e.padding)&&(n.padding=r.padding),n}const qi=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Hi(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 qi)e in n&&(r[e]=n[e])}return r||e});return{...e,layers:r}}const Ui={version:8,sources:{},layers:[]},Gi={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"},Xi={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"},Ji={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"},Yi=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Zi=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Ki{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[Ji[e.type]];t?t(e):"error"===e.type&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||Vi(this._map.transform);const t=this.props[Xi[e.type]];t&&t(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=Vi(e),Wi(e,this.props)),this._onPointerEvent=e=>{"mousemove"!==e.type&&"mouseout"!==e.type||this._updateHover(e);const t=this.props[Gi[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=Ki.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=Ui}=t,n={...t,...t.initialViewState,container:e,style:Hi(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 Gi)o.on(a,this._onPointerEvent);for(const a in Xi)o.on(a,this._onCameraEvent);for(const a in Ji)o.on(a,this._onEvent);this._map=o}recycle(){const e=this.map.getContainer().querySelector("[mapboxgl-children]");null==e||e.remove(),Ki.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=Wi(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 Yi)if(i in e&&!$i(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=Ui,styleDiffing:r=!0}=e,n={diff:r};"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(Hi(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&&!$i(e,s.light)&&(s.light=e,a.setLight(e)),t&&!$i(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&&!$i(r,s.sky)&&(s.sky=r,a.setSky(r)),void 0===n||$i(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 Zi){const i=e[n]??!0;$i(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}}Ki.savedMaps=[];const Qi=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function eo(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||Qi.includes(n)||(r[n]=t[n].bind(t));return r}const to="undefined"!=typeof document?x.useLayoutEffect:x.useEffect;const ro=H.createContext(null);const no=H.forwardRef(function(e,t){const r=x.useContext(Ri),[n,i]=x.useState(null),o=x.useRef(),{current:a}=x.useRef({mapLib:null,map:null});x.useEffect(()=>{const t=e.mapLib;let n,s=!0;return Promise.resolve(t||Promise.resolve().then(()=>require("./maplibre-gl-CfxOpEgG.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=Ki.reuse(e,o.current)),n||(n=new Ki(l.Map,e,o.current)),a.map=eo(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())}},[]),to(()=>{n&&n.setProps(e)}),x.useImperativeHandle(t,()=>a.map,[n]);const s=x.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return H.createElement("div",{id:e.id,ref:o,style:s},n&&H.createElement(ro.Provider,{value:a},H.createElement("div",{"mapboxgl-children":"",style:{height:"100%"}},e.children)))}),io=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function oo(e,t){if(!e||!t)return;const r=e.style;for(const n in t){const e=t[n];Number.isFinite(e)&&!io.test(n)?r[n]=`${e}px`:r[n]=e}}function ao(e,t){if(e===t)return null;const r=so(e),n=so(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 so(e){return new Set(e?e.trim().split(/\s+/):[])}const lo=x.memo(x.forwardRef((e,t)=>{const{map:r,mapLib:n}=x.useContext(ro),i=x.useRef({props:e}),o=x.useMemo(()=>{let t=!1;H.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},[]);x.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:g="auto"}=e;x.useEffect(()=>{oo(o.getElement(),c)},[c]),x.useImperativeHandle(t,()=>o,[]);const f=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()!==g&&o.setPitchAlignment(g),o.getPopup()!==h&&o.setPopup(h);const m=ao(f.className,e.className);if(m)for(const y of m)o.toggleClassName(y);return i.current.props=e,P.createPortal(e.children,o.getElement())}));function co(e,t,r,n){const i=x.useContext(ro),o=x.useMemo(()=>e(i),[]);return x.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}x.memo(x.forwardRef((e,t)=>{const{map:r,mapLib:n}=x.useContext(ro),i=x.useMemo(()=>document.createElement("div"),[]),o=x.useRef({props:e}),a=x.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(x.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()}},[]),x.useEffect(()=>{oo(a.getElement(),e.style)},[e.style]),x.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&&!$i(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=ao(t.className,e.className);if(r)for(const e of r)a.toggleClassName(e);o.current.props=e}return P.createPortal(e.children,i)})),x.memo(function(e){const t=co(({mapLib:t})=>new t.AttributionControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return x.useEffect(()=>{oo(t._controlContainer,e.style)},[e.style]),null}),x.memo(x.forwardRef(function(e,t){const r=x.useRef({props:e}),n=co(({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,x.useImperativeHandle(t,()=>n,[]),x.useEffect(()=>{oo(n._container,e.style)},[e.style]),null})),x.memo(function(e){const t=co(({mapLib:t})=>new t.NavigationControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.ScaleControl(e),{position:e.position}),r=x.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),x.useEffect(()=>{oo(t._container,i)},[i]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.TerrainControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null}),x.memo(function(e){const t=co(({mapLib:t})=>new t.LogoControl(e),{position:e.position});return x.useEffect(()=>{oo(t._container,e.style)},[e.style]),null});const uo="spteck-react-controls-maplibre-styles",ho=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 v.jsxs("div",{className:e.root,children:[v.jsx("div",{className:`${e.dot} ${e.dot1}`}),v.jsx("div",{className:`${e.dot} ${e.dot2}`}),v.jsx("div",{className:`${e.dot} ${e.dot3}`})]})},mu=(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}},yu=({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]=H.useState("");return H.useEffect(()=>{const t=new D({html:!1,linkify:!0,typographer:!0,breaks:!0}).render(e);i(t)},[e]),v.jsx("div",{className:`${r.markdown} ${t||""}`,dangerouslySetInnerHTML:{__html:n}})},bu=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%"}}),vu=({content:e,forceType:t,onTypeDetected:r,context:n,theme:i=xo.SharePoint,fluentTheme:o,onAdaptiveCardAction:a,className:s,debug:l=!1})=>{const c=bu(),{error:u}=Q(),[h,d]=H.useState(null);if(H.useEffect(()=>{if(H.isValidElement(e))return;if("string"!=typeof e&&"object"!=typeof e)return;const t=mt(e);d(t),r&&r(t)},[e,r]),H.isValidElement(e))return v.jsx(v.Fragment,{children:e});const p=t||(null==h?void 0:h.type),g=(null==h?void 0:h.content)||e;return v.jsxs(v.Fragment,{children:[l&&h?v.jsxs("div",{className:c.debugBadge,children:["Type: ",h.type," | Confidence: ",(100*h.confidence).toFixed(0),"%"]}):null,(()=>{switch(p){case gt.MARKDOWN:return v.jsx(yu,{content:g,className:s});case gt.HTML:return v.jsx("div",{className:`${c.htmlContent} ${s||""}`,dangerouslySetInnerHTML:{__html:g}});case gt.ADAPTIVE_CARD:return v.jsx("div",{className:`${c.adaptiveCardWrapper} ${s||""}`,children:v.jsx(ru,{card:"string"==typeof g?JSON.parse(g):g,context:n,theme:o,themeType:i,onInvokeAction:a||(()=>{}),onError:e=>u("Adaptive Card Error:",e instanceof Error?e:void 0)})});case gt.PLAIN_TEXT:default:return v.jsx("div",{className:`${c.plainText} ${s||""}`,children:g})}})()]})},xu=H.forwardRef((e,t)=>{const{messages:r,context:n}=e,i=e=>{if(H.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 v.jsx("div",{ref:t,className:o,children:v.jsx($.Chat,{className:a,children:r.map((e,t)=>"User"===e.senderName?v.jsx($.ChatMyMessage,{status:e.status,author:e.senderName,children:i(e.message)},t):v.jsx($.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:v.jsx(M.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:w.tokens.colorBrandBackground}}),author:e.senderName,children:v.jsx(vu,{content:i(e.message),context:n})},t))})})});xu.displayName="ChatList";const Cu=(e,t)=>{const{getFormatRelative:r}=ht(e,t);return r(new Date)};var wu={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"}},ku={exports:{}};const Su=Nn(ku.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",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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},b={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}},v="en",x={};x[v]=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 v;if("string"==typeof t){var o=t.toLowerCase();x[o]&&(i=o),r&&(x[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;x[s]=t,i=s}return!n&&i&&(v=i),i||!n&&v},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)},_=b;_.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(g);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)},g=function(e,t){return _.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},f=this.$W,m=this.$M,y=this.$D,b="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 v=this.$locale().weekStart||0,x=(f<v?f+7:f)-v;return p(n?y-x:y+(6-x),m);case s:case d:return g(b+"Hours",0);case a:return g(b+"Minutes",1);case o:return g(b+"Seconds",2);case i:return g(b+"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],g=l===s?this.$D+(t-this.$W):t;if(l===c||l===h){var f=this.clone().set(d,1);f.$d[p](g),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);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 g=_.p(u),f=function(e){var t=S(p);return _.w(t.date(t.date()+Math.round(e*n)),p)};if(g===c)return this.set(c,this.$M+n);if(g===h)return this.set(h,this.$y+n);if(g===s)return f(1);if(g===l)return f(7);var m=(d={},d[o]=t,d[a]=r,d[i]=e,d)[g]||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")},g=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(f,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 g(o,a,!0);case"A":return g(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 g,f=this,m=_.p(d),y=S(n),b=(y.utcOffset()-this.utcOffset())*t,v=this-y,x=function(){return _.m(f,y)};switch(m){case h:g=x()/12;break;case c:g=x();break;case u:g=x()/3;break;case l:g=(v-b)/6048e5;break;case s:g=(v-b)/864e5;break;case a:g=v/r;break;case o:g=v/t;break;case i:g=v/e;break;default:g=v}return p?g:_.a(g)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return x[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=x[v],S.Ls=x,S.p={},S}());var _u=Object.defineProperty,Tu=(e,t)=>_u(e,"name",{value:t,configurable:!0}),Au=(e,t)=>{for(var r in t)_u(e,r,{get:t[r],enumerable:!0})},Eu={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Pu={trace:Tu((...e)=>{},"trace"),debug:Tu((...e)=>{},"debug"),info:Tu((...e)=>{},"info"),warn:Tu((...e)=>{},"warn"),error:Tu((...e)=>{},"error"),fatal:Tu((...e)=>{},"fatal")},Mu=Tu(function(e="fatal"){let t=Eu.fatal;"string"==typeof e?e.toLowerCase()in Eu&&(t=Eu[e]):"number"==typeof e&&(t=e),Pu.trace=()=>{},Pu.debug=()=>{},Pu.info=()=>{},Pu.warn=()=>{},Pu.error=()=>{},Pu.fatal=()=>{},t<=Eu.fatal&&(Pu.fatal=console.error?console.error.bind(console,Iu("FATAL"),"color: orange"):console.log.bind(console,"",Iu("FATAL"))),t<=Eu.error&&(Pu.error=console.error?console.error.bind(console,Iu("ERROR"),"color: orange"):console.log.bind(console,"",Iu("ERROR"))),t<=Eu.warn&&(Pu.warn=console.warn?console.warn.bind(console,Iu("WARN"),"color: orange"):console.log.bind(console,"",Iu("WARN"))),t<=Eu.info&&(Pu.info=console.info?console.info.bind(console,Iu("INFO"),"color: lightblue"):console.log.bind(console,"",Iu("INFO"))),t<=Eu.debug&&(Pu.debug=console.debug?console.debug.bind(console,Iu("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Iu("DEBUG"))),t<=Eu.trace&&(Pu.trace=console.debug?console.debug.bind(console,Iu("TRACE"),"color: lightgreen"):console.log.bind(console,"",Iu("TRACE")))},"setLogLevel"),Iu=Tu(e=>`%c${Su().format("ss.SSS")} : ${e} : `,"format");const Bu={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*Bu.hue2rgb(o,i,e+1/3);case"g":return 255*Bu.hue2rgb(o,i,e);case"b":return 255*Bu.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}}},Lu={channel:Bu,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}`}}},ju={};for(let JL=0;JL<=255;JL++)ju[JL]=Lu.unit.dec2hex(JL);const Nu=0,Du=1,Ou=2;class zu{constructor(){this.type=Nu}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=Nu}is(e){return this.type===e}}const Fu=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new zu}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Nu,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=Lu.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=Lu.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=Lu.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=Lu.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=Lu.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=Lu.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(Ou)||void 0===t?(this._ensureHSL(),Lu.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(Ou)||void 0===t?(this._ensureHSL(),Lu.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(Ou)||void 0===t?(this._ensureHSL(),Lu.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Du)||void 0===t?(this._ensureRGB(),Lu.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Du)||void 0===t?(this._ensureRGB(),Lu.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Du)||void 0===t?(this._ensureRGB(),Lu.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Du),this.changed=!0,this.data.r=e}set g(e){this.type.set(Du),this.changed=!0,this.data.g=e}set b(e){this.type.set(Du),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ou),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ou),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ou),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"),Ru={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(35!==e.charCodeAt(0))return;const t=e.match(Ru.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 Fu.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?`#${ju[Math.round(t)]}${ju[Math.round(r)]}${ju[Math.round(n)]}${ju[Math.round(255*i)]}`:`#${ju[Math.round(t)]}${ju[Math.round(r)]}${ju[Math.round(n)]}`}},$u={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($u.hueRe);if(t){const[,e,r]=t;switch(r){case"grad":return Lu.channel.clamp.h(.9*parseFloat(e));case"rad":return Lu.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return Lu.channel.clamp.h(360*parseFloat(e))}}return Lu.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(104!==t&&72!==t)return;const r=e.match($u.re);if(!r)return;const[,n,i,o,a,s]=r;return Fu.set({h:$u._hue2deg(n),s:Lu.channel.clamp.s(parseFloat(i)),l:Lu.channel.clamp.l(parseFloat(o)),a:a?Lu.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(${Lu.lang.round(t)}, ${Lu.lang.round(r)}%, ${Lu.lang.round(n)}%, ${i})`:`hsl(${Lu.lang.round(t)}, ${Lu.lang.round(r)}%, ${Lu.lang.round(n)}%)`}},Vu={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=Vu.colors[e];if(t)return Ru.parse(t)},stringify:e=>{const t=Ru.stringify(e);for(const r in Vu.colors)if(Vu.colors[r]===t)return r}},Wu={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(Wu.re);if(!r)return;const[,n,i,o,a,s,l,c,u]=r;return Fu.set({r:Lu.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:Lu.channel.clamp.g(a?2.55*parseFloat(o):parseFloat(o)),b:Lu.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:c?Lu.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(${Lu.lang.round(t)}, ${Lu.lang.round(r)}, ${Lu.lang.round(n)}, ${Lu.lang.round(i)})`:`rgb(${Lu.lang.round(t)}, ${Lu.lang.round(r)}, ${Lu.lang.round(n)})`}},qu={format:{keyword:Vu,hex:Ru,rgb:Wu,rgba:Wu,hsl:$u,hsla:$u},parse:e=>{if("string"!=typeof e)return e;const t=Ru.parse(e)||Wu.parse(e)||$u.parse(e)||Vu.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ou)||void 0===e.data.r?$u.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Wu.stringify(e):Ru.stringify(e)},Hu=(e,t)=>{const r=qu.parse(e);for(const n in t)r[n]=Lu.channel.clamp[n](t[n]);return qu.stringify(r)},Uu=(e,t,r=0,n=1)=>{if("number"!=typeof e)return Hu(e,{a:t});const i=Fu.set({r:Lu.channel.clamp.r(e),g:Lu.channel.clamp.g(t),b:Lu.channel.clamp.b(r),a:Lu.channel.clamp.a(n)});return qu.stringify(i)},Gu=e=>(e=>{const{r:t,g:r,b:n}=qu.parse(e),i=.2126*Lu.channel.toLinear(t)+.7152*Lu.channel.toLinear(r)+.0722*Lu.channel.toLinear(n);return Lu.lang.round(i)})(e)>=.5,Xu=e=>!Gu(e),Ju=(e,t,r)=>{const n=qu.parse(e),i=n[t],o=Lu.channel.clamp[t](i+r);return i!==o&&(n[t]=o),qu.stringify(n)},Yu=(e,t)=>Ju(e,"l",t),Zu=(e,t)=>Ju(e,"l",-t),Ku=(e,t)=>{const r=qu.parse(e),n={};for(const i in t)t[i]&&(n[i]=r[i]+t[i]);return Hu(e,n)},Qu=(e,t=100)=>{const r=qu.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}=qu.parse(e),{r:s,g:l,b:c,a:u}=qu.parse(t),h=r/100,d=2*h-1,p=a-u,g=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,f=1-g;return Uu(n*g+s*f,i*g+l*f,o*g+c*f,a*h+u*(1-h))})(r,e,t)},{entries:eh,setPrototypeOf:th,isFrozen:rh,getPrototypeOf:nh,getOwnPropertyDescriptor:ih}=Object;let{freeze:oh,seal:ah,create:sh}=Object,{apply:lh,construct:ch}="undefined"!=typeof Reflect&&Reflect;oh||(oh=function(e){return e}),ah||(ah=function(e){return e}),lh||(lh=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)}),ch||(ch=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 uh=_h(Array.prototype.forEach),hh=_h(Array.prototype.lastIndexOf),dh=_h(Array.prototype.pop),ph=_h(Array.prototype.push),gh=_h(Array.prototype.splice),fh=_h(String.prototype.toLowerCase),mh=_h(String.prototype.toString),yh=_h(String.prototype.match),bh=_h(String.prototype.replace),vh=_h(String.prototype.indexOf),xh=_h(String.prototype.trim),Ch=_h(Object.prototype.hasOwnProperty),wh=_h(RegExp.prototype.test),kh=(Sh=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ch(Sh,t)});var Sh;function _h(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 lh(e,t,n)}}function Th(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fh;th&&th(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(rh(t)||(t[n]=e),i=e)}e[i]=!0}return e}function Ah(e){for(let t=0;t<e.length;t++){Ch(e,t)||(e[t]=null)}return e}function Eh(e){const t=sh(null);for(const[r,n]of eh(e)){Ch(e,r)&&(Array.isArray(n)?t[r]=Ah(n):n&&"object"==typeof n&&n.constructor===Object?t[r]=Eh(n):t[r]=n)}return t}function Ph(e,t){for(;null!==e;){const r=ih(e,t);if(r){if(r.get)return _h(r.get);if("function"==typeof r.value)return _h(r.value)}e=nh(e)}return function(){return null}}const Mh=oh(["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"]),Ih=oh(["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"]),Bh=oh(["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"]),Lh=oh(["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"]),jh=oh(["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"]),Nh=oh(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dh=oh(["#text"]),Oh=oh(["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"]),zh=oh(["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"]),Fh=oh(["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"]),Rh=oh(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$h=ah(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vh=ah(/<%[\w\W]*|[\w\W]*%>/gm),Wh=ah(/\$\{[\w\W]*/gm),qh=ah(/^data-[\-\w.\u00B7-\uFFFF]+$/),Hh=ah(/^aria-[\-\w]+$/),Uh=ah(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gh=ah(/^(?:\w+script|data):/i),Xh=ah(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jh=ah(/^html$/i),Yh=ah(/^[a-z][.\w]*(-[.\w]+)+$/i);var Zh=Object.freeze({__proto__:null,ARIA_ATTR:Hh,ATTR_WHITESPACE:Xh,CUSTOM_ELEMENT:Yh,DATA_ATTR:qh,DOCTYPE_NAME:Jh,ERB_EXPR:Vh,IS_ALLOWED_URI:Uh,IS_SCRIPT_OR_DATA:Gh,MUSTACHE_EXPR:$h,TMPLIT_EXPR:Wh});const Kh=1,Qh=3,ed=7,td=8,rd=9;var nd,id=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!==rd||!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:g}=t,f=c.prototype,m=Ph(f,"cloneNode"),y=Ph(f,"remove"),b=Ph(f,"nextSibling"),v=Ph(f,"childNodes"),x=Ph(f,"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 E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof eh&&"function"==typeof x&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:P,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,z=null;const F=Th({},[...Mh,...Ih,...Bh,...jh,...Dh]);let R=null;const $=Th({},[...Oh,...zh,...Fh,...Rh]);let V=Object.seal(sh(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,q=null;const H=Object.seal(sh(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=Th({},["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=Th({},["audio","video","img","source","image","track"]);let pe=null;const ge=Th({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let be=ye,ve=!1,xe=null;const Ce=Th({},[fe,me,ye],mh);let we=Th({},["mi","mo","mn","ms","mtext"]),ke=Th({},["annotation-xml"]);const Se=Th({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let Ae=null,Ee=null;const Pe=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(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=Eh(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===_e?mh:fh,z=Ch(e,"ALLOWED_TAGS")?Th({},e.ALLOWED_TAGS,Ae):F,R=Ch(e,"ALLOWED_ATTR")?Th({},e.ALLOWED_ATTR,Ae):$,xe=Ch(e,"ALLOWED_NAMESPACES")?Th({},e.ALLOWED_NAMESPACES,mh):Ce,pe=Ch(e,"ADD_URI_SAFE_ATTR")?Th(Eh(ge),e.ADD_URI_SAFE_ATTR,Ae):ge,he=Ch(e,"ADD_DATA_URI_TAGS")?Th(Eh(de),e.ADD_DATA_URI_TAGS,Ae):de,ce=Ch(e,"FORBID_CONTENTS")?Th({},e.FORBID_CONTENTS,Ae):ue,W=Ch(e,"FORBID_TAGS")?Th({},e.FORBID_TAGS,Ae):Eh({}),q=Ch(e,"FORBID_ATTR")?Th({},e.FORBID_ATTR,Ae):Eh({}),le=!!Ch(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||Uh,be=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&&(z=Th({},Dh),R=[],!0===le.html&&(Th(z,Mh),Th(R,Oh)),!0===le.svg&&(Th(z,Ih),Th(R,zh),Th(R,Rh)),!0===le.svgFilters&&(Th(z,Bh),Th(R,zh),Th(R,Rh)),!0===le.mathMl&&(Th(z,jh),Th(R,Fh),Th(R,Rh))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?H.tagCheck=e.ADD_TAGS:(z===F&&(z=Eh(z)),Th(z,e.ADD_TAGS,Ae))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?H.attributeCheck=e.ADD_ATTR:(R===$&&(R=Eh(R)),Th(R,e.ADD_ATTR,Ae))),e.ADD_URI_SAFE_ATTR&&Th(pe,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(ce===ue&&(ce=Eh(ce)),Th(ce,e.FORBID_CONTENTS,Ae)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Eh(ce)),Th(ce,e.ADD_FORBID_CONTENTS,Ae)),ae&&(z["#text"]=!0),K&&Th(z,["html","head","body"]),z.table&&(Th(z,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw kh('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw kh('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}}(g,o)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));oh&&oh(e),Ee=e}},Be=Th({},[...Ih,...Bh,...Lh]),Le=Th({},[...jh,...Nh]),je=function(e){ph(r.removed,{element:e});try{x(e).removeChild(e)}catch(t){y(e)}},Ne=function(e,t){try{ph(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){ph(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=yh(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===_e&&be===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=C?C.createHTML(e):e;if(be===ye)try{t=(new p).parseFromString(i,_e)}catch(a){}if(!t||!t.documentElement){t=k.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?w:i}catch(a){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),be===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)},ze=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)},Fe=function(e){return"function"==typeof l&&e instanceof l};function Re(e,t,n){uh(e,e=>{e.call(r,t,n,Ee)})}const $e=function(e){let t=null;if(Re(E.beforeSanitizeElements,e,null),ze(e))return je(e),!0;const n=Ae(e.nodeName);if(Re(E.uponSanitizeElement,e,{tagName:n,allowedTags:z}),Z&&e.hasChildNodes()&&!Fe(e.firstElementChild)&&wh(/<[/\w!]/g,e.innerHTML)&&wh(/<[/\w!]/g,e.textContent))return je(e),!0;if(e.nodeType===ed)return je(e),!0;if(Z&&e.nodeType===td&&wh(/<[/\w]/g,e.data))return je(e),!0;if(!(H.tagCheck instanceof Function&&H.tagCheck(n))&&(!z[n]||W[n])){if(!W[n]&&We(n)){if(V.tagNameCheck instanceof RegExp&&wh(V.tagNameCheck,n))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(n))return!1}if(ae&&!ce[n]){const t=x(e)||e.parentNode,r=v(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,b(e))}}}return je(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const r=fh(e.tagName),n=fh(t.tagName);return!!xe[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ye?"svg"===r:t.namespaceURI===fe?"svg"===r&&("annotation-xml"===n||we[n]):Boolean(Be[r]):e.namespaceURI===fe?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===fe&&!we[n])&&!Le[r]&&(Se[r]||!Be[r]):!("application/xhtml+xml"!==_e||!xe[e.namespaceURI]))}(e)?(je(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!wh(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Qh&&(t=e.textContent,uh([P,M,I],e=>{t=bh(t,e," ")}),e.textContent!==t&&(ph(r.removed,{element:e.cloneNode()}),e.textContent=t)),Re(E.afterSanitizeElements,e,null),!1):(je(e),!0)},Ve=function(e,t,r){if(ie&&("id"===t||"name"===t)&&(r in n||r in Pe))return!1;if(G&&!q[t]&&wh(B,t));else if(U&&wh(L,t));else if(H.attributeCheck instanceof Function&&H.attributeCheck(t,e));else if(!R[t]||q[t]){if(!(We(e)&&(V.tagNameCheck instanceof RegExp&&wh(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&wh(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t,e))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&wh(V.tagNameCheck,r)||V.tagNameCheck instanceof Function&&V.tagNameCheck(r))))return!1}else if(pe[t]);else if(wh(O,bh(r,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==vh(r,"data:")||!he[e]){if(X&&!wh(j,bh(r,N,"")));else if(r)return!1}else;return!0},We=function(e){return"annotation-xml"!==e&&yh(e,D)},qe=function(e){Re(E.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ze(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,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:xh(h);if(n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Re(E.uponSanitizeAttribute,e,n),d=n.attrValue,!oe||"id"!==u&&"name"!==u||(Ne(s,e),d="user-content-"+d),Z&&wh(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Ne(s,e);continue}if("attributename"===u&&yh(d,"href")){Ne(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ne(s,e);continue}if(!J&&wh(/\/>/i,d)){Ne(s,e);continue}Y&&uh([P,M,I],e=>{d=bh(d,e," ")});const p=Ae(e.nodeName);if(Ve(p,u,d)){if(C&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.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),ze(e)?je(e):dh(r.removed)}catch(o){Ne(s,e)}}else Ne(s,e)}Re(E.afterSanitizeAttributes,e,null)},He=function e(t){let r=null;const n=Oe(t);for(Re(E.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)Re(E.uponSanitizeShadowNode,r,null),$e(r),qe(r),r.content instanceof a&&e(r.content);Re(E.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(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Fe(e)){if("function"!=typeof e.toString)throw kh("toString is not a function");if("string"!=typeof(e=e.toString()))throw kh("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(!z[t]||W[t])throw kh("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===Kh&&"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();)$e(s),qe(s),s.content instanceof a&&He(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(R.shadowroot||R.shadowrootmode)&&(c=A.call(i,c,!0)),c}let h=K?n.outerHTML:n.innerHTML;return K&&z["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&wh(Jh,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Y&&uh([P,M,I],e=>{h=bh(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(){Ee=null,Q=!1},r.isValidAttribute=function(e,t,r){Ee||Ie({});const n=Ae(e),i=Ae(t);return Ve(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&ph(E[e],t)},r.removeHook=function(e,t){if(void 0!==t){const r=hh(E[e],t);return-1===r?void 0:gh(E[e],r,1)[0]}return dh(E[e])},r.removeHooks=function(e){E[e]=[]},r.removeAllHooks=function(){E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),od=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ad=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sd=/\s*%%.*\n/gm,ld=(a=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},Tu(a,"UnknownDiagramError"),a),cd={},ud=Tu(function(e,t){e=e.replace(od,"").replace(ad,"").replace(sd,"\n");for(const[r,{detector:n}]of Object.entries(cd)){if(n(e,t))return r}throw new ld(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),hd=Tu((...e)=>{for(const{id:t,detector:r,loader:n}of e)dd(t,r,n)},"registerLazyLoadedDiagrams"),dd=Tu((e,t,r)=>{cd[e]&&Pu.warn(`Detector with key ${e} already exists. Overwriting.`),cd[e]={detector:t,loader:r},Pu.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),pd=Tu(e=>cd[e].loader,"getDiagramLoader"),gd=Tu((e,t,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>gd(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]=gd(e[i],t[i],{depth:r-1,clobber:n}))}),e)},"assignWithDepth"),fd=gd,md="#ffffff",yd="#f2f2f2",bd=Tu((e,t)=>Ku(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),vd=(Tu(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,g,f,m,y,b,v,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ku(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ku(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bd(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bd(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Qu(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Qu(this.tertiaryColor),this.lineColor=this.lineColor||Qu(this.background),this.arrowheadColor=this.arrowheadColor||Qu(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||Qu(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||Yu(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||Yu(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Yu(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||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(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]||Qu(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||Yu(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]||Ku(this.mainBkg,{h:180,s:-15,l:C*(5+3*w)}),this["surfacePeer"+w]=this["surfacePeer"+w]||Ku(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||Ku(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ku(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ku(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ku(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ku(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ku(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||Ku(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ku(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ku(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ku(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ku(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ku(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ku(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ku(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.xyChart)?void 0:g.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(f=this.xyChart)?void 0:f.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==(b=this.xyChart)?void 0:b.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(v=this.xyChart)?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(x=this.xyChart)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.git4||Ku(this.primaryColor,{h:-60}),this.git5=this.git5||Ku(this.primaryColor,{h:-90}),this.git6=this.git6||Ku(this.primaryColor,{h:60}),this.git7=this.git7||Ku(this.primaryColor,{h:120}),this.darkMode?(this.git0=Yu(this.git0,25),this.git1=Yu(this.git1,25),this.git2=Yu(this.git2,25),this.git3=Yu(this.git3,25),this.git4=Yu(this.git4,25),this.git5=Yu(this.git5,25),this.git6=Yu(this.git6,25),this.git7=Yu(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||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),xd=Tu(e=>{const t=new vd;return t.calculate(e),t},"getThemeVariables"),Cd=(Tu(l=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Yu(this.primaryColor,16),this.tertiaryColor=Ku(this.primaryColor,{h:-160}),this.primaryBorderColor=Qu(this.background),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.tertiaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Yu(Qu("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Uu(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=Uu(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Uu(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||Yu(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,g,f,m,y,b,v,x;this.secondBkg=Yu(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=Yu(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=Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(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||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Qu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||Yu(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Ku(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.radar)?void 0:g.curveOpacity)||.5,curveStrokeWidth:(null==(f=this.radar)?void 0:f.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(b=this.radar)?void 0:b.graticuleOpacity)||.3,legendBoxSize:(null==(v=this.radar)?void 0:v.legendBoxSize)||12,legendFontSize:(null==(x=this.radar)?void 0:x.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=Yu(this.secondaryColor,20),this.git1=Yu(this.pie2||this.secondaryColor,20),this.git2=Yu(this.pie3||this.tertiaryColor,20),this.git3=Yu(this.pie4||Ku(this.primaryColor,{h:-30}),20),this.git4=Yu(this.pie5||Ku(this.primaryColor,{h:-60}),20),this.git5=Yu(this.pie6||Ku(this.primaryColor,{h:-90}),10),this.git6=Yu(this.pie7||Ku(this.primaryColor,{h:60}),10),this.git7=Yu(this.pie8||Ku(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Qu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Qu(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||Yu(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Yu(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),wd=Tu(e=>{const t=new Cd;return t.calculate(e),t},"getThemeVariables"),kd=(Tu(c=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ku(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ku(this.primaryColor,{h:-160}),this.primaryBorderColor=bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.tertiaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(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=Uu(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,g,f,m,y,b,v,x;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(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]||Ku(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Ku(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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||Qu(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Qu(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=Yu(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||Yu(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Ku(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Ku(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ku(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ku(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Ku(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Ku(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Ku(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Ku(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Ku(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.xyChart)?void 0:g.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(f=this.xyChart)?void 0:f.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==(b=this.xyChart)?void 0:b.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(v=this.xyChart)?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(x=this.xyChart)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.git4||Ku(this.primaryColor,{h:-60}),this.git5=this.git5||Ku(this.primaryColor,{h:-90}),this.git6=this.git6||Ku(this.primaryColor,{h:60}),this.git7=this.git7||Ku(this.primaryColor,{h:120}),this.darkMode?(this.git0=Yu(this.git0,25),this.git1=Yu(this.git1,25),this.git2=Yu(this.git2,25),this.git3=Yu(this.git3,25),this.git4=Yu(this.git4,25),this.git5=Yu(this.git5,25),this.git6=Yu(this.git6,25),this.git7=Yu(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(Qu(this.git0),25),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Qu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),Sd=Tu(e=>{const t=new kd;return t.calculate(e),t},"getThemeVariables"),_d=(Tu(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=Yu("#cde498",10),this.primaryBorderColor=bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.primaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(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,g,f,m,y,b,v,x;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||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(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]||Ku(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]||Ku(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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||Yu(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(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||Ku(this.primaryColor,{l:-30}),this.pie5=this.pie5||Ku(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ku(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Ku(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ku(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ku(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ku(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Ku(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.xyChart)?void 0:g.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(f=this.xyChart)?void 0:f.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==(b=this.xyChart)?void 0:b.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(v=this.xyChart)?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(x=this.xyChart)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.git4||Ku(this.primaryColor,{h:-60}),this.git5=this.git5||Ku(this.primaryColor,{h:-90}),this.git6=this.git6||Ku(this.primaryColor,{h:60}),this.git7=this.git7||Ku(this.primaryColor,{h:120}),this.darkMode?(this.git0=Yu(this.git0,25),this.git1=Yu(this.git1,25),this.git2=Yu(this.git2,25),this.git3=Yu(this.git3,25),this.git4=Yu(this.git4,25),this.git5=Yu(this.git5,25),this.git6=Yu(this.git6,25),this.git7=Yu(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||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Qu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),Td=Tu(e=>{const t=new _d;return t.calculate(e),t},"getThemeVariables"),Ad=(Tu(h=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Yu(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ku(this.primaryColor,{h:-160}),this.primaryBorderColor=bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.tertiaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(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||Yu(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,g,f,m,y,b,v,x;this.secondBkg=Yu(this.contrast,55),this.border2=this.contrast,this.actorBorder=Yu(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]||Qu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Yu(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]||Ku(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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=Yu(this.contrast,30),this.sectionBkgColor2=Yu(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=Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.radar)?void 0:g.curveOpacity)||.5,curveStrokeWidth:(null==(f=this.radar)?void 0:f.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(b=this.radar)?void 0:b.graticuleOpacity)||.3,legendBoxSize:(null==(v=this.radar)?void 0:v.legendBoxSize)||12,legendFontSize:(null==(x=this.radar)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.pie5||Ku(this.primaryColor,{h:-60}),this.git5=this.pie6||Ku(this.primaryColor,{h:-90}),this.git6=this.pie7||Ku(this.primaryColor,{h:60}),this.git7=this.pie8||Ku(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),Ed={base:{getThemeVariables:xd},dark:{getThemeVariables:wd},default:{getThemeVariables:Sd},forest:{getThemeVariables:Td},neutral:{getThemeVariables:Tu(e=>{const t=new Ad;return t.calculate(e),t},"getThemeVariables")}},Pd={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},Md={...Pd,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ed.default.getThemeVariables(),sequence:{...Pd.sequence,messageFont:Tu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:Tu(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:Tu(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Pd.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Pd.c4,useWidth:void 0,personFont:Tu(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Pd.flowchart,inheritDir:!1},external_personFont:Tu(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:Tu(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:Tu(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:Tu(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:Tu(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:Tu(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:Tu(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:Tu(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:Tu(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:Tu(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:Tu(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:Tu(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:Tu(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:Tu(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:Tu(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:Tu(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:Tu(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:Tu(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:Tu(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:Tu(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:Tu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Pd.pie,useWidth:984},xyChart:{...Pd.xyChart,useWidth:void 0},requirement:{...Pd.requirement,useWidth:void 0},packet:{...Pd.packet},radar:{...Pd.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Id=Tu((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:"object"==typeof e[n]&&null!==e[n]?[...r,t+n,...Id(e[n],"")]:[...r,t+n],[]),"keyify"),Bd=new Set(Id(Md,"")),Ld=Md,jd=Tu(e=>{if(Pu.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>jd(e));else{for(const t of Object.keys(e)){if(Pu.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Bd.has(t)||null==e[t]){Pu.debug("sanitize deleting key: ",t),delete e[t];continue}if("object"==typeof e[t]){Pu.debug("sanitizing object",t),jd(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)t.includes(n)&&(Pu.debug("sanitizing css option",t),e[t]=Nd(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]="")}Pu.debug("After sanitization",e)}},"sanitizeDirective"),Nd=Tu(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"),Dd=Object.freeze(Ld),Od=fd({},Dd),zd=[],Fd=fd({},Dd),Rd=Tu((e,t)=>{let r=fd({},e),n={};for(const i of t)Gd(i),n=fd(n,i);if(r=fd(r,n),n.theme&&n.theme in Ed){const e=fd({},nd),t=fd(e.themeVariables||{},n.themeVariables);r.theme&&r.theme in Ed&&(r.themeVariables=Ed[r.theme].getThemeVariables(t))}return Qd(Fd=r),Fd},"updateCurrentConfig"),$d=Tu(e=>(Od=fd({},Dd),Od=fd(Od,e),e.theme&&Ed[e.theme]&&(Od.themeVariables=Ed[e.theme].getThemeVariables(e.themeVariables)),Rd(Od,zd),Od),"setSiteConfig"),Vd=Tu(e=>{nd=fd({},e)},"saveConfigFromInitialize"),Wd=Tu(e=>(Od=fd(Od,e),Rd(Od,zd),Od),"updateSiteConfig"),qd=Tu(()=>fd({},Od),"getSiteConfig"),Hd=Tu(e=>(Qd(e),fd(Fd,e),Ud()),"setConfig"),Ud=Tu(()=>fd({},Fd),"getConfig"),Gd=Tu(e=>{e&&(["secure",...Od.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(Pu.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]&&Gd(e[t])}))},"sanitize"),Xd=Tu(e=>{var t;jd(e),e.fontFamily&&!(null==(t=e.themeVariables)?void 0:t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),zd.push(e),Rd(Od,zd)},"addDirective"),Jd=Tu((e=Od)=>{Rd(e,zd=[])},"reset"),Yd={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Zd={},Kd=Tu(e=>{Zd[e]||(Pu.warn(Yd[e]),Zd[e]=!0)},"issueWarning"),Qd=Tu(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Kd("LAZY_LOAD_DEPRECATED")},"checkConfig"),ep=Tu(()=>{let e={};nd&&(e=fd(e,nd));for(const t of zd)e=fd(e,t);return e},"getUserDefinedConfig"),tp=/<br\s*\/?>/gi,rp=Tu(e=>{if(!e)return[""];return dp(e).replace(/\\n/g,"#br#").split("#br#")},"getRows"),np=(()=>{let e=!1;return()=>{e||(ip(),e=!0)}})();function ip(){const e="data-temp-href-target";id.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),id.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"))})}Tu(ip,"setupDompurifyHooks");var op=Tu(e=>{np();return id.sanitize(e)},"removeScript"),ap=Tu((e,t)=>{var r;if(!1!==(null==(r=t.flowchart)?void 0:r.htmlLabels)){const r=t.securityLevel;"antiscript"===r||"strict"===r?e=op(e):"loose"!==r&&(e=(e=(e=dp(e)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),e=hp(e))}return e},"sanitizeMore"),sp=Tu((e,t)=>e?e=t.dompurifyConfig?id.sanitize(ap(e,t),t.dompurifyConfig).toString():id.sanitize(ap(e,t),{FORBID_TAGS:["style"]}).toString():e,"sanitizeText"),lp=Tu((e,t)=>"string"==typeof e?sp(e,t):e.flat().map(e=>sp(e,t)),"sanitizeTextOrArray"),cp=Tu(e=>tp.test(e),"hasBreaks"),up=Tu(e=>e.split(tp),"splitBreaks"),hp=Tu(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),dp=Tu(e=>e.replace(tp,"#br#"),"breakToPlaceholder"),pp=Tu(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),gp=Tu(e=>!1!==e&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),fp=Tu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.max(...t)},"getMax"),mp=Tu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.min(...t)},"getMin"),yp=Tu(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];vp(i,o)&&(e=i+","+o,n++,r.pop())}r.push(xp(e))}return r.join("")},"parseGenericTypes"),bp=Tu((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),vp=Tu((e,t)=>{const r=bp(e,"~"),n=bp(t,"~");return 1===r&&1===n},"shouldCombineSets"),xp=Tu(e=>{const t=bp(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"),Cp=Tu(()=>void 0!==window.MathMLElement,"isMathMLSupported"),wp=/\$\$(.*)\$\$/g,kp=Tu(e=>{var t;return((null==(t=e.match(wp))?void 0:t.length)??0)>0},"hasKatex"),Sp=Tu(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Tp(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"),_p=Tu(async(e,t)=>{if(!kp(e))return e;if(!(Cp()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wp,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DPu4QpBP.cjs")),n=t.forceLegacyMathML||!Cp()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(tp).map(e=>kp(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(wp,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Tp=Tu(async(e,t)=>sp(await _p(e,t),t),"renderKatexSanitized"),Ap={getRows:rp,sanitizeText:sp,sanitizeTextOrArray:lp,hasBreaks:cp,splitBreaks:up,lineBreakRegex:tp,removeScript:op,getUrl:pp,evaluate:gp,getMax:fp,getMin:mp},Ep=Tu(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Pp=Tu(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"),Mp=Tu(function(e,t,r,n){const i=Pp(t,r,n);Ep(e,i)},"configureSvgSize"),Ip=Tu(function(e,t,r,n){const i=t.node().getBBox(),o=i.width,a=i.height;Pu.info(`SVG bounds: ${o}x${a}`,i);let s=0,l=0;Pu.info(`Graph bounds: ${s}x${l}`,e),s=o+2*r,l=a+2*r,Pu.info(`Calculated bounds: ${s}x${l}`),Mp(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"),Bp={},Lp=Tu((e,t,r)=>{let n="";return e in Bp&&Bp[e]?n=Bp[e](r):Pu.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"),jp=Tu((e,t)=>{void 0!==t&&(Bp[e]=t)},"addStylesForDiagram"),Np=Lp,Dp={};Au(Dp,{clear:()=>$p,getAccDescription:()=>Hp,getAccTitle:()=>Wp,getDiagramTitle:()=>Gp,setAccDescription:()=>qp,setAccTitle:()=>Vp,setDiagramTitle:()=>Up});var Op="",zp="",Fp="",Rp=Tu(e=>sp(e,Ud()),"sanitizeText"),$p=Tu(()=>{Op="",Fp="",zp=""},"clear"),Vp=Tu(e=>{Op=Rp(e).replace(/^\s+/g,"")},"setAccTitle"),Wp=Tu(()=>Op,"getAccTitle"),qp=Tu(e=>{Fp=Rp(e).replace(/\n\s+/g,"\n")},"setAccDescription"),Hp=Tu(()=>Fp,"getAccDescription"),Up=Tu(e=>{zp=Rp(e)},"setDiagramTitle"),Gp=Tu(()=>zp,"getDiagramTitle"),Xp=Pu,Jp=Mu,Yp=Ud,Zp=Hd,Kp=Dd,Qp=Tu(e=>sp(e,Yp()),"sanitizeText"),eg=Ip,tg=Tu(()=>Dp,"getCommonDb"),rg={},ng=Tu((e,t,r)=>{var n;rg[e]&&Xp.warn(`Diagram with id ${e} already registered. Overwriting.`),rg[e]=t,r&&dd(e,r),jp(e,t.styles),null==(n=t.injectUtils)||n.call(t,Xp,Jp,Yp,Qp,eg,tg(),()=>{})},"registerDiagram"),ig=Tu(e=>{if(e in rg)return rg[e];throw new og(e)},"getDiagram"),og=(d=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},Tu(d,"DiagramNotFoundError"),d),ag={value:()=>{}};function sg(){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 lg(n)}function lg(e){this._=e}function cg(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}function ug(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=ag,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}lg.prototype=sg.prototype={constructor:lg,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]=ug(i[r],e.name,t);else if(null==t)for(r in i)i[r]=ug(i[r],e.name,null);return this}for(;++a<s;)if((r=(e=o[a]).type)&&(r=cg(i[r],e.name)))return r},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new lg(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 hg="http://www.w3.org/1999/xhtml";const dg={svg:"http://www.w3.org/2000/svg",xhtml:hg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pg(e){var t=e+="",r=t.indexOf(":");return r>=0&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),dg.hasOwnProperty(t)?{space:dg[t],local:e}:e}function gg(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===hg&&t.documentElement.namespaceURI===hg?t.createElement(e):t.createElementNS(r,e)}}function fg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mg(e){var t=pg(e);return(t.local?fg:gg)(t)}function yg(){}function bg(e){return null==e?yg:function(){return this.querySelector(e)}}function vg(){return[]}function xg(e){return null==e?vg:function(){return this.querySelectorAll(e)}}function Cg(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function wg(e){return function(){return this.matches(e)}}function kg(e){return function(t){return t.matches(e)}}var Sg=Array.prototype.find;function _g(){return this.firstElementChild}var Tg=Array.prototype.filter;function Ag(){return Array.from(this.children)}function Eg(e){return new Array(e.length)}function Pg(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Mg(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 Pg(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Ig(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 Pg(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(p[s])===l&&(i[s]=l)}function Bg(e){return e.__data__}function Lg(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ng(e){return function(){this.removeAttribute(e)}}function Dg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Og(e,t){return function(){this.setAttribute(e,t)}}function zg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Fg(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}}function Rg(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 $g(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Vg(e){return function(){this.style.removeProperty(e)}}function Wg(e,t,r){return function(){this.style.setProperty(e,t,r)}}function qg(e,t,r){return function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function Hg(e,t){return e.style.getPropertyValue(t)||$g(e).getComputedStyle(e,null).getPropertyValue(t)}function Ug(e){return function(){delete this[e]}}function Gg(e,t){return function(){this[e]=t}}function Xg(e,t){return function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}}function Jg(e){return e.trim().split(/^|\s+/)}function Yg(e){return e.classList||new Zg(e)}function Zg(e){this._node=e,this._names=Jg(e.getAttribute("class")||"")}function Kg(e,t){for(var r=Yg(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Qg(e,t){for(var r=Yg(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function ef(e){return function(){Kg(this,e)}}function tf(e){return function(){Qg(this,e)}}function rf(e,t){return function(){(t.apply(this,arguments)?Kg:Qg)(this,e)}}function nf(){this.textContent=""}function of(e){return function(){this.textContent=e}}function af(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function sf(){this.innerHTML=""}function lf(e){return function(){this.innerHTML=e}}function cf(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function uf(){this.nextSibling&&this.parentNode.appendChild(this)}function hf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function df(){return null}function pf(){var e=this.parentNode;e&&e.removeChild(this)}function gf(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ff(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mf(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 yf(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 bf(e,t,r){var n=$g(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 vf(e,t){return function(){return bf(this,e,t)}}function xf(e,t){return function(){return bf(this,e,t.apply(this,arguments))}}Pg.prototype={constructor:Pg,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)}},Zg.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 Cf=[null];function wf(e,t){this._groups=e,this._parents=t}function kf(){return new wf([[document.documentElement]],Cf)}function Sf(e){return"string"==typeof e?new wf([[document.querySelector(e)]],[document.documentElement]):new wf([[e]],Cf)}function _f(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tf(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Af(){}wf.prototype=kf.prototype={constructor:wf,select:function(e){"function"!=typeof e&&(e=bg(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 wf(n,this._parents)},selectAll:function(e){e="function"==typeof e?Cg(e):xg(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 wf(n,i)},selectChild:function(e){return this.select(null==e?_g:function(e){return function(){return Sg.call(this.children,e)}}("function"==typeof e?e:kg(e)))},selectChildren:function(e){return this.selectAll(null==e?Ag:function(e){return function(){return Tg.call(this.children,e)}}("function"==typeof e?e:kg(e)))},filter:function(e){"function"!=typeof e&&(e=wg(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 wf(n,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Bg);var r,n=t?Ig:Mg,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,g=Lg(e.call(h,h&&h.__data__,u,i)),f=g.length,m=l[u]=new Array(f),y=s[u]=new Array(f);n(h,d,m,y,c[u]=new Array(p),g,t);for(var b,v,x=0,C=0;x<f;++x)if(b=m[x]){for(x>=C&&(C=x+1);!(v=y[C])&&++C<f;);b._next=v||null}}return(s=new wf(s,i))._enter=l,s._exit=c,s},enter:function(){return new wf(this._enter||this._groups.map(Eg),this._parents)},exit:function(){return new wf(this._exit||this._groups.map(Eg),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),g=0;g<d;++g)(c=u[g]||h[g])&&(p[g]=c);for(;l<i;++l)s[l]=r[l];return new wf(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=jg);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 wf(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=pg(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?Dg:Ng:"function"==typeof t?r.local?Rg:Fg:r.local?zg:Og)(r,t))},style:function(e,t,r){return arguments.length>1?this.each((null==t?Vg:"function"==typeof t?qg:Wg)(e,t,null==r?"":r)):Hg(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ug:"function"==typeof t?Xg:Gg)(e,t)):this.node()[e]},classed:function(e,t){var r=Jg(e+"");if(arguments.length<2){for(var n=Yg(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?rf:t?ef:tf)(r,t))},text:function(e){return arguments.length?this.each(null==e?nf:("function"==typeof e?af:of)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?sf:("function"==typeof e?cf:lf)(e)):this.node().innerHTML},raise:function(){return this.each(uf)},lower:function(){return this.each(hf)},append:function(e){var t="function"==typeof e?e:mg(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var r="function"==typeof e?e:mg(e),n=null==t?df:"function"==typeof t?t:bg(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(pf)},clone:function(e){return this.select(e?ff:gf)},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?yf:mf,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?xf:vf)(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 Ef=.7,Pf=1/Ef,Mf="\\s*([+-]?\\d+)\\s*",If="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lf=/^#([0-9a-f]{3,8})$/,jf=new RegExp(`^rgb\\(${Mf},${Mf},${Mf}\\)$`),Nf=new RegExp(`^rgb\\(${Bf},${Bf},${Bf}\\)$`),Df=new RegExp(`^rgba\\(${Mf},${Mf},${Mf},${If}\\)$`),Of=new RegExp(`^rgba\\(${Bf},${Bf},${Bf},${If}\\)$`),zf=new RegExp(`^hsl\\(${If},${Bf},${Bf}\\)$`),Ff=new RegExp(`^hsla\\(${If},${Bf},${Bf},${If}\\)$`),Rf={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 $f(){return this.rgb().formatHex()}function Vf(){return this.rgb().formatRgb()}function Wf(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Lf.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?qf(t):3===r?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Hf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Hf(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=jf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Nf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Df.exec(e))?Hf(t[1],t[2],t[3],t[4]):(t=Of.exec(e))?Hf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zf.exec(e))?em(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?em(t[1],t[2]/100,t[3]/100,t[4]):Rf.hasOwnProperty(e)?qf(Rf[e]):"transparent"===e?new Xf(NaN,NaN,NaN,0):null}function qf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Hf(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xf(e,t,r,n)}function Uf(e){return e instanceof Af||(e=Wf(e)),e?new Xf((e=e.rgb()).r,e.g,e.b,e.opacity):new Xf}function Gf(e,t,r,n){return 1===arguments.length?Uf(e):new Xf(e,t,r,null==n?1:n)}function Xf(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Jf(){return`#${Qf(this.r)}${Qf(this.g)}${Qf(this.b)}`}function Yf(){const e=Zf(this.opacity);return`${1===e?"rgb(":"rgba("}${Kf(this.r)}, ${Kf(this.g)}, ${Kf(this.b)}${1===e?")":`, ${e})`}`}function Zf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qf(e){return((e=Kf(e))<16?"0":"")+e.toString(16)}function em(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new rm(e,t,r,n)}function tm(e){if(e instanceof rm)return new rm(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Wf(e)),!e)return new rm;if(e instanceof rm)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 rm(a,s,l,e.opacity)}function rm(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function nm(e){return(e=(e||0)%360)<0?e+360:e}function im(e){return Math.max(0,Math.min(1,e||0))}function om(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}_f(Af,Wf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tm(this).formatHsl()},formatRgb:Vf,toString:Vf}),_f(Xf,Gf,Tf(Af,{brighter(e){return e=null==e?Pf:Math.pow(Pf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ef:Math.pow(Ef,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Kf(this.r),Kf(this.g),Kf(this.b),Zf(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:Jf,formatHex:Jf,formatHex8:function(){return`#${Qf(this.r)}${Qf(this.g)}${Qf(this.b)}${Qf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Yf,toString:Yf})),_f(rm,function(e,t,r,n){return 1===arguments.length?tm(e):new rm(e,t,r,null==n?1:n)},Tf(Af,{brighter(e){return e=null==e?Pf:Math.pow(Pf,e),new rm(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ef:Math.pow(Ef,e),new rm(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 Xf(om(e>=240?e-240:e+120,i,n),om(e,i,n),om(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new rm(nm(this.h),im(this.s),im(this.l),Zf(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=Zf(this.opacity);return`${1===e?"hsl(":"hsla("}${nm(this.h)}, ${100*im(this.s)}%, ${100*im(this.l)}%${1===e?")":`, ${e})`}`}}));const am=e=>()=>e;function sm(e,t){return function(r){return e+r*t}}function lm(e){return 1===(e=+e)?cm: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):am(isNaN(t)?r:t)}}function cm(e,t){var r=t-e;return r?sm(e,r):am(isNaN(e)?t:e)}const um=function e(t){var r=lm(t);function n(e,t){var n=r((e=Gf(e)).r,(t=Gf(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=cm(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 hm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var dm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pm=new RegExp(dm.source,"g");function gm(e,t){var r,n,i,o=dm.lastIndex=pm.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=dm.exec(e))&&(n=pm.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:hm(r,n)})),o=pm.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 fm,mm=180/Math.PI,ym={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bm(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)*mm,skewX:Math.atan(l)*mm,scaleX:a,scaleY:s}}function vm(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:hm(e,i)},{i:l-2,x:hm(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:hm(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:hm(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:hm(e,r)},{i:s-2,x:hm(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 xm,Cm,wm=vm(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ym:bm(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),km=vm(function(e){return null==e?ym:(fm||(fm=document.createElementNS("http://www.w3.org/2000/svg","g")),fm.setAttribute("transform",e),(e=fm.transform.baseVal.consolidate())?bm((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ym)},", ",")",")"),Sm=0,_m=0,Tm=0,Am=0,Em=0,Pm=0,Mm="object"==typeof performance&&performance.now?performance:Date,Im="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Bm(){return Em||(Im(Lm),Em=Mm.now()+Pm)}function Lm(){Em=0}function jm(){this._call=this._time=this._next=null}function Nm(e,t,r){var n=new jm;return n.restart(e,t,r),n}function Dm(){Em=(Am=Mm.now())+Pm,Sm=_m=0;try{!function(){Bm(),++Sm;for(var e,t=xm;t;)(e=Em-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sm}()}finally{Sm=0,function(){var e,t,r=xm,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:xm=t);Cm=e,zm(n)}(),Em=0}}function Om(){var e=Mm.now(),t=e-Am;t>1e3&&(Pm-=t,Am=e)}function zm(e){Sm||(_m&&(_m=clearTimeout(_m)),e-Em>24?(e<1/0&&(_m=setTimeout(Dm,e-Mm.now()-Pm)),Tm&&(Tm=clearInterval(Tm))):(Tm||(Am=Mm.now(),Tm=setInterval(Om,1e3)),Sm=1,Im(Dm)))}function Fm(e,t,r){var n=new jm;return t=null==t?0:+t,n.restart(r=>{n.stop(),e(r+t)},t,r),n}jm.prototype=Nm.prototype={constructor:jm,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Bm():+r)+(null==t?0:+t),this._next||Cm===this||(Cm?Cm._next=this:xm=this,Cm=this),this._call=e,this._time=r,zm()},stop:function(){this._call&&(this._call=null,this._time=1/0,zm())}};var Rm=sg("start","end","cancel","interrupt"),$m=[];function Vm(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 Fm(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(Fm(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=Nm(o,0,r.time)}(e,r,{name:t,index:n,group:i,on:Rm,tween:$m,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Wm(e,t){var r=Hm(e,t);if(r.state>0)throw new Error("too late; already scheduled");return r}function qm(e,t){var r=Hm(e,t);if(r.state>3)throw new Error("too late; already running");return r}function Hm(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Um(e,t){var r,n;return function(){var i=qm(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 Gm(e,t,r){var n,i;if("function"!=typeof r)throw new Error;return function(){var o=qm(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 Xm(e,t,r){var n=e._id;return e.each(function(){var e=qm(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return Hm(e,n).value[t]}}function Jm(e,t){var r;return("number"==typeof t?hm:t instanceof Wf?um:(r=Wf(t))?(t=r,um):gm)(e,t)}function Ym(e){return function(){this.removeAttribute(e)}}function Zm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Km(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 Qm(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 ey(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 ty(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 ry(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 ny(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 iy(e,t){return function(){Wm(this,e).delay=+t.apply(this,arguments)}}function oy(e,t){return t=+t,function(){Wm(this,e).delay=t}}function ay(e,t){return function(){qm(this,e).duration=+t.apply(this,arguments)}}function sy(e,t){return t=+t,function(){qm(this,e).duration=t}}var ly=kf.prototype.constructor;function cy(e){return function(){this.style.removeProperty(e)}}var uy=0;function hy(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function dy(){return++uy}var py=kf.prototype;hy.prototype={constructor:hy,select:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=bg(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,Vm(h[d],t,r,d,h,Hm(s,r)));return new hy(o,this._parents,t,r)},selectAll:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=xg(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),g=Hm(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Vm(d,t,r,f,p,g);o.push(p),a.push(l)}return new hy(o,a,t,r)},selectChild:py.selectChild,selectChildren:py.selectChildren,filter:function(e){"function"!=typeof e&&(e=wg(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 hy(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 hy(a,this._parents,this._name,this._id)},selection:function(){return new ly(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,r=dy(),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=Hm(a,t);Vm(a,e,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new hy(n,this._parents,e,r)},call:py.call,nodes:py.nodes,node:py.node,size:py.size,empty:py.empty,each:py.each,on:function(e,t){var r=this._id;return arguments.length<2?Hm(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)?Wm:qm;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=pg(e),n="transform"===r?km:Jm;return this.attrTween(e,"function"==typeof t?(r.local?ty:ey)(r,n,Xm(this,"attr."+e,t)):null==t?(r.local?Zm:Ym)(r):(r.local?Qm:Km)(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=pg(e);return this.tween(r,(n.local?ry:ny)(n,t))},style:function(e,t,r){var n="transform"==(e+="")?wm:Jm;return null==t?this.styleTween(e,function(e,t){var r,n,i;return function(){var o=Hg(this,e),a=(this.style.removeProperty(e),Hg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}(e,n)).on("end.style."+e,cy(e)):"function"==typeof t?this.styleTween(e,function(e,t,r){var n,i,o;return function(){var a=Hg(this,e),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Hg(this,e)),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}(e,n,Xm(this,"style."+e,t))).each(function(e,t){var r,n,i,o,a="style."+t,s="end."+a;return function(){var l=qm(this,e),c=l.on,u=null==l.value[a]?o||(o=cy(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=Hg(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}}(Xm(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=Hm(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?Um:Gm)(r,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?iy:oy)(t,e)):Hm(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ay:sy)(t,e)):Hm(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(){qm(this,e).ease=t}}(t,e)):Hm(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;qm(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=qm(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]:py[Symbol.iterator]};var gy={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function fy(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}kf.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)})},kf.prototype.transition=function(e){var t,r;e instanceof hy?(t=e._id,e=e._name):(t=dy(),(r=gy).time=Bm(),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])&&Vm(a,e,t,c,s,r||fy(a,t));return new hy(n,this._parents,e,t)};const my=Math.PI,yy=2*my,by=1e-6,vy=yy-by;function xy(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class Cy{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?xy:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xy;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>by)if(Math.abs(u*s-l*c)>by&&i){let d=r-o,p=n-a,g=s*s+l*l,f=d*d+p*p,m=Math.sqrt(g),y=Math.sqrt(h),b=i*Math.tan((my-Math.acos((g+h-f)/(2*m*y)))/2),v=b/y,x=b/m;Math.abs(v-1)>by&&this._append`L${e+v*c},${t+v*u}`,this._append`A${i},${i},0,0,${+(u*d>c*p)},${this._x1=e+x*s},${this._y1=t+x*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)>by||Math.abs(this._y1-c)>by)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%yy+yy),h>vy?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>by&&this._append`A${r},${r},0,${+(h>=my)},${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 wy(e){return function(){return e}}const ky=Math.abs,Sy=Math.atan2,_y=Math.cos,Ty=Math.max,Ay=Math.min,Ey=Math.sin,Py=Math.sqrt,My=1e-12,Iy=Math.PI,By=Iy/2,Ly=2*Iy;function jy(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 Cy(t)}function Ny(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Dy(e){this._context=e}function Oy(e){return new Dy(e)}function zy(e){return e[0]}function Fy(e){return e[1]}function Ry(e,t){var r=wy(!0),n=null,i=Oy,o=null,a=jy(s);function s(s){var l,c,u,h=(s=Ny(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?zy:wy(e),t="function"==typeof t?t:void 0===t?Fy:wy(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:wy(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:wy(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:wy(!!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}Dy.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 $y{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 Vy(e){return new $y(e,!0)}function Wy(e){return new $y(e,!1)}function qy(){}function Hy(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 Uy(e){this._context=e}function Gy(e){return new Uy(e)}function Xy(e){this._context=e}function Jy(e){this._context=e}function Yy(e,t){this._basis=new Uy(e),this._beta=t}Uy.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:Hy(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:Hy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Xy.prototype={areaStart:qy,areaEnd:qy,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:Hy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Jy.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:Hy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Yy.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 Uy(e):new Yy(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function Ky(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 Qy(e,t){this._context=e,this._k=(1-t)/6}Qy.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:Ky(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:Ky(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 eb=function e(t){function r(e){return new Qy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function tb(e,t){this._context=e,this._k=(1-t)/6}tb.prototype={areaStart:qy,areaEnd:qy,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:Ky(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 rb=function e(t){function r(e){return new tb(e,t)}return r.tension=function(t){return e(+t)},r}(0);function nb(e,t){this._context=e,this._k=(1-t)/6}nb.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:Ky(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 ib=function e(t){function r(e){return new nb(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ob(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>My){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>My){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 ab(e,t){this._context=e,this._alpha=t}ab.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:ob(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 sb=function e(t){function r(e){return t?new ab(e,t):new Qy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function lb(e,t){this._context=e,this._alpha=t}lb.prototype={areaStart:qy,areaEnd:qy,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:ob(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 cb=function e(t){function r(e){return t?new lb(e,t):new tb(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ub(e,t){this._context=e,this._alpha=t}ub.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:ob(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 hb=function e(t){function r(e){return t?new ub(e,t):new nb(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function db(e){this._context=e}function pb(e){return e<0?-1:1}function gb(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(pb(o)+pb(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function fb(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function mb(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 yb(e){this._context=e}function bb(e){this._context=new vb(e)}function vb(e){this._context=e}function xb(e){return new yb(e)}function Cb(e){return new bb(e)}function wb(e){this._context=e}function kb(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 Sb(e){return new wb(e)}function _b(e,t){this._context=e,this._t=t}function Tb(e){return new _b(e,.5)}function Ab(e){return new _b(e,0)}function Eb(e){return new _b(e,1)}function Pb(e,t,r){this.k=e,this.x=t,this.y=r}db.prototype={areaStart:qy,areaEnd:qy,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))}},yb.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:mb(this,this._t0,fb(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,mb(this,fb(this,r=gb(this,e,t)),r);break;default:mb(this,this._t0,r=gb(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(bb.prototype=Object.create(yb.prototype)).point=function(e,t){yb.prototype.point.call(this,t,e)},vb.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)}},wb.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=kb(e),i=kb(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)}},_b.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}},Pb.prototype={constructor:Pb,scale:function(e){return 1===e?this:new Pb(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Pb(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+")"}},Pb.prototype;var Mb=Tu(e=>{var t;const{securityLevel:r}=Yp();let n=Sf("body");if("sandbox"===r){const r=Sf(`#i${e}`);n=Sf(((null==(t=r.node())?void 0:t.contentDocument)??document).body)}return n.select(`#${e}`)},"selectSvgElement");function Ib(e){return null==e}function Bb(e){return"object"==typeof e&&null!==e}function Lb(e){return Array.isArray(e)?e:Ib(e)?[]:[e]}function jb(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 Nb(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n}function Db(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}Tu(Ib,"isNothing"),Tu(Bb,"isObject"),Tu(Lb,"toArray"),Tu(jb,"extend"),Tu(Nb,"repeat"),Tu(Db,"isNegativeZero");var Ob={isNothing:Ib,isObject:Bb,toArray:Lb,repeat:Nb,isNegativeZero:Db,extend:jb};function zb(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 Fb(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=zb(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Tu(zb,"formatError"),Tu(Fb,"YAMLException$1"),Fb.prototype=Object.create(Error.prototype),Fb.prototype.constructor=Fb,Fb.prototype.toString=Tu(function(e){return this.name+": "+zb(this,e)},"toString");var Rb=Fb;function $b(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 Vb(e,t){return Ob.repeat(" ",t-e.length)+e}function Wb(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=$b(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),h),c=Ob.repeat(" ",t.indent)+Vb((e.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=$b(e.buffer,i[a],o[a],e.position,h),c+=Ob.repeat(" ",t.indent)+Vb((e.line+1).toString(),u)+" | "+l.str+"\n",c+=Ob.repeat("-",t.indent+u+3+l.pos)+"^\n",s=1;s<=t.linesAfter&&!(a+s>=o.length);s++)l=$b(e.buffer,i[a+s],o[a+s],e.position-(i[a]-i[a+s]),h),c+=Ob.repeat(" ",t.indent)+Vb((e.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}Tu($b,"getLine"),Tu(Vb,"padStart"),Tu(Wb,"makeSnippet");var qb=Wb,Hb=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ub=["scalar","sequence","mapping"];function Gb(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}function Xb(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===Hb.indexOf(t))throw new Rb('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=Gb(t.styleAliases||null),-1===Ub.indexOf(this.kind))throw new Rb('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Tu(Gb,"compileStyleAliases"),Tu(Xb,"Type$1");var Jb=Xb;function Yb(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 Zb(){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(Tu(n,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}function Kb(e){return this.extend(e)}Tu(Yb,"compileList"),Tu(Zb,"compileMap"),Tu(Kb,"Schema$1"),Kb.prototype.extend=Tu(function(e){var t=[],r=[];if(e instanceof Jb)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 Rb("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 Jb))throw new Rb("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Rb("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 Rb("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 Jb))throw new Rb("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Kb.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=Yb(n,"implicit"),n.compiledExplicit=Yb(n,"explicit"),n.compiledTypeMap=Zb(n.compiledImplicit,n.compiledExplicit),n},"extend");var Qb=new Kb({explicit:[new Jb("tag:yaml.org,2002:str",{kind:"scalar",construct:Tu(function(e){return null!==e?e:""},"construct")}),new Jb("tag:yaml.org,2002:seq",{kind:"sequence",construct:Tu(function(e){return null!==e?e:[]},"construct")}),new Jb("tag:yaml.org,2002:map",{kind:"mapping",construct:Tu(function(e){return null!==e?e:{}},"construct")})]});function ev(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function tv(){return null}function rv(e){return null===e}Tu(ev,"resolveYamlNull"),Tu(tv,"constructYamlNull"),Tu(rv,"isNull");var nv=new Jb("tag:yaml.org,2002:null",{kind:"scalar",resolve:ev,construct:tv,predicate:rv,represent:{canonical:Tu(function(){return"~"},"canonical"),lowercase:Tu(function(){return"null"},"lowercase"),uppercase:Tu(function(){return"NULL"},"uppercase"),camelcase:Tu(function(){return"Null"},"camelcase"),empty:Tu(function(){return""},"empty")},defaultStyle:"lowercase"});function iv(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 ov(e){return"true"===e||"True"===e||"TRUE"===e}function av(e){return"[object Boolean]"===Object.prototype.toString.call(e)}Tu(iv,"resolveYamlBoolean"),Tu(ov,"constructYamlBoolean"),Tu(av,"isBoolean");var sv=new Jb("tag:yaml.org,2002:bool",{kind:"scalar",resolve:iv,construct:ov,predicate:av,represent:{lowercase:Tu(function(e){return e?"true":"false"},"lowercase"),uppercase:Tu(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:Tu(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function lv(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function cv(e){return 48<=e&&e<=55}function uv(e){return 48<=e&&e<=57}function hv(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(!lv(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!cv(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(!uv(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)}function dv(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 pv(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!Ob.isNegativeZero(e)}Tu(lv,"isHexCode"),Tu(cv,"isOctCode"),Tu(uv,"isDecCode"),Tu(hv,"resolveYamlInteger"),Tu(dv,"constructYamlInteger"),Tu(pv,"isInteger");var gv=new Jb("tag:yaml.org,2002:int",{kind:"scalar",resolve:hv,construct:dv,predicate:pv,represent:{binary:Tu(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:Tu(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:Tu(function(e){return e.toString(10)},"decimal"),hexadecimal:Tu(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"]}}),fv=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mv(e){return null!==e&&!(!fv.test(e)||"_"===e[e.length-1])}function yv(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)}Tu(mv,"resolveYamlFloat"),Tu(yv,"constructYamlFloat");var bv=/^[-+]?[0-9]+e/;function vv(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(Ob.isNegativeZero(e))return"-0.0";return r=e.toString(10),bv.test(r)?r.replace("e",".e"):r}function xv(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Ob.isNegativeZero(e))}Tu(vv,"representYamlFloat"),Tu(xv,"isFloat");var Cv=new Jb("tag:yaml.org,2002:float",{kind:"scalar",resolve:mv,construct:yv,predicate:xv,represent:vv,defaultStyle:"lowercase"}),wv=Qb.extend({implicit:[nv,sv,gv,Cv]}),kv=wv,Sv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_v=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 Tv(e){return null!==e&&(null!==Sv.exec(e)||null!==_v.exec(e))}function Av(e){var t,r,n,i,o,a,s,l,c=0,u=null;if(null===(t=Sv.exec(e))&&(t=_v.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 Ev(e){return e.toISOString()}Tu(Tv,"resolveYamlTimestamp"),Tu(Av,"constructYamlTimestamp"),Tu(Ev,"representYamlTimestamp");var Pv=new Jb("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Tv,construct:Av,instanceOf:Date,represent:Ev});function Mv(e){return"<<"===e||null===e}Tu(Mv,"resolveYamlMerge");var Iv=new Jb("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Mv}),Bv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Lv(e){if(null===e)return!1;var t,r,n=0,i=e.length,o=Bv;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 jv(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=Bv,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 Nv(e){var t,r,n="",i=0,o=e.length,a=Bv;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 Dv(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}Tu(Lv,"resolveYamlBinary"),Tu(jv,"constructYamlBinary"),Tu(Nv,"representYamlBinary"),Tu(Dv,"isBinary");var Ov=new Jb("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Lv,construct:jv,predicate:Dv,represent:Nv}),zv=Object.prototype.hasOwnProperty,Fv=Object.prototype.toString;function Rv(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]"!==Fv.call(n))return!1;for(i in n)if(zv.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 $v(e){return null!==e?e:[]}Tu(Rv,"resolveYamlOmap"),Tu($v,"constructYamlOmap");var Vv=new Jb("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Rv,construct:$v}),Wv=Object.prototype.toString;function qv(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]"!==Wv.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;o[t]=[i[0],n[i[0]]]}return!0}function Hv(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}Tu(qv,"resolveYamlPairs"),Tu(Hv,"constructYamlPairs");var Uv=new Jb("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:qv,construct:Hv}),Gv=Object.prototype.hasOwnProperty;function Xv(e){if(null===e)return!0;var t,r=e;for(t in r)if(Gv.call(r,t)&&null!==r[t])return!1;return!0}function Jv(e){return null!==e?e:{}}Tu(Xv,"resolveYamlSet"),Tu(Jv,"constructYamlSet");var Yv=new Jb("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xv,construct:Jv}),Zv=kv.extend({implicit:[Pv,Iv],explicit:[Ov,Vv,Uv,Yv]}),Kv=Object.prototype.hasOwnProperty,Qv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ex=/[\x85\u2028\u2029]/,tx=/[,\[\]\{\}]/,rx=/^(?:!|!!|![a-z\-]+!)$/i,nx=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ix(e){return Object.prototype.toString.call(e)}function ox(e){return 10===e||13===e}function ax(e){return 9===e||32===e}function sx(e){return 9===e||32===e||10===e||13===e}function lx(e){return 44===e||91===e||93===e||123===e||125===e}function cx(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ux(e){return 120===e?2:117===e?4:85===e?8:0}function hx(e){return 48<=e&&e<=57?e-48:-1}function dx(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 px(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}Tu(ix,"_class"),Tu(ox,"is_EOL"),Tu(ax,"is_WHITE_SPACE"),Tu(sx,"is_WS_OR_EOL"),Tu(lx,"is_FLOW_INDICATOR"),Tu(cx,"fromHexCode"),Tu(ux,"escapedHexLen"),Tu(hx,"fromDecimalCode"),Tu(dx,"simpleEscapeSequence"),Tu(px,"charFromCodepoint");var gx,fx=new Array(256),mx=new Array(256);for(gx=0;gx<256;gx++)fx[gx]=dx(gx)?1:0,mx[gx]=dx(gx);function yx(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zv,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 bx(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=qb(r),new Rb(t,r)}function vx(e,t){throw bx(e,t)}function xx(e,t){e.onWarning&&e.onWarning.call(null,bx(e,t))}Tu(yx,"State$1"),Tu(bx,"generateError"),Tu(vx,"throwError"),Tu(xx,"throwWarning");var Cx={YAML:Tu(function(e,t,r){var n,i,o;null!==e.version&&vx(e,"duplication of %YAML directive"),1!==r.length&&vx(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&vx(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&vx(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&xx(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Tu(function(e,t,r){var n,i;2!==r.length&&vx(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],rx.test(n)||vx(e,"ill-formed tag handle (first argument) of the TAG directive"),Kv.call(e.tagMap,n)&&vx(e,'there is a previously declared suffix for "'+n+'" tag handle'),nx.test(i)||vx(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(o){vx(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i},"handleTagDirective")};function wx(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||vx(e,"expected valid JSON character");else Qv.test(s)&&vx(e,"the stream contains non-printable characters");e.result+=s}}function kx(e,t,r,n){var i,o,a,s;for(Ob.isObject(r)||vx(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],Kv.call(t,o)||(t[o]=r[o],n[o]=!0)}function Sx(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])&&vx(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===ix(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===ix(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)kx(e,t,o[c],r);else kx(e,t,o,r);else e.json||Kv.call(r,i)||!Kv.call(t,i)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,vx(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 _x(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):vx(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Tx(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;ax(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(!ox(i))break;for(_x(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&&xx(e,"deficient indentation"),n}function Ax(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))&&!sx(t)))}function Ex(e,t){1===t?e.result+=" ":t>1&&(e.result+=Ob.repeat("\n",t-1))}function Px(e,t,r){var n,i,o,a,s,l,c,u,h=e.kind,d=e.result;if(sx(u=e.input.charCodeAt(e.position))||lx(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)&&(sx(n=e.input.charCodeAt(e.position+1))||r&&lx(n)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(sx(n=e.input.charCodeAt(e.position+1))||r&&lx(n))break}else if(35===u){if(sx(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Ax(e)||r&&lx(u))break;if(ox(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,Tx(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&&(wx(e,i,o,!1),Ex(e,e.line-s),i=o=e.position,a=!1),ax(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return wx(e,i,o,!1),!!e.result||(e.kind=h,e.result=d,!1)}function Mx(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(wx(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else ox(r)?(wx(e,n,i,!0),Ex(e,Tx(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Ax(e)?vx(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);vx(e,"unexpected end of the stream within a single quoted scalar")}function Ix(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 wx(e,r,e.position,!0),e.position++,!0;if(92===s){if(wx(e,r,e.position,!0),ox(s=e.input.charCodeAt(++e.position)))Tx(e,!1,t);else if(s<256&&fx[s])e.result+=mx[s],e.position++;else if((a=ux(s))>0){for(i=a,o=0;i>0;i--)(a=cx(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:vx(e,"expected hexadecimal character");e.result+=px(o),e.position++}else vx(e,"unknown escape sequence");r=n=e.position}else ox(s)?(wx(e,r,n,!0),Ex(e,Tx(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Ax(e)?vx(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}vx(e,"unexpected end of the stream within a double quoted scalar")}function Bx(e,t){var r,n,i,o,a,s,l,c,u,h,d,p,g=!0,f=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(Tx(e,!0,t),(p=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=f,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=o,!0;g?44===p&&vx(e,"expected the node content, but found ','"):vx(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&sx(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,Tx(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,Fx(e,t,1,!1,!0),h=e.tag,u=e.result,Tx(e,!0,t),p=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),Tx(e,!0,t),Fx(e,t,1,!1,!0),d=e.result),c?Sx(e,o,y,h,u,d,r,n,i):s?o.push(Sx(e,null,y,h,u,d,r,n,i)):o.push(u),Tx(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(g=!0,p=e.input.charCodeAt(++e.position)):g=!1}vx(e,"unexpected end of the stream within a flow collection")}function Lx(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:vx(e,"repeat of a chomping mode identifier");else{if(!((i=hx(o))>=0))break;0===i?vx(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?vx(e,"repeat of an indentation width identifier"):(c=t+i-1,l=!0)}if(ax(o)){do{o=e.input.charCodeAt(++e.position)}while(ax(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!ox(o)&&0!==o)}for(;0!==o;){for(_x(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),ox(o))u++;else{if(e.lineIndent<c){3===a?e.result+=Ob.repeat("\n",s?1+u:u):1===a&&s&&(e.result+="\n");break}for(n?ax(o)?(h=!0,e.result+=Ob.repeat("\n",s?1+u:u)):h?(h=!1,e.result+=Ob.repeat("\n",u+1)):0===u?s&&(e.result+=" "):e.result+=Ob.repeat("\n",u):e.result+=Ob.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=e.position;!ox(o)&&0!==o;)o=e.input.charCodeAt(++e.position);wx(e,r,e.position,!1)}}return!0}function jx(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,vx(e,"tab characters must not be used in indentation")),45===n)&&sx(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Tx(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,Fx(e,t,3,!1,!0),a.push(e.result),Tx(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)vx(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 Nx(e,t,r){var n,i,o,a,s,l,c,u=e.tag,h=e.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,b=!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,vx(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!sx(n)){if(a=e.line,s=e.lineStart,l=e.position,!Fx(e,r,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);ax(c);)c=e.input.charCodeAt(++e.position);if(58===c)sx(c=e.input.charCodeAt(++e.position))||vx(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Sx(e,d,p,g,f,null,a,s,l),g=f=m=null),b=!0,y=!1,i=!1,g=e.tag,f=e.result;else{if(!b)return e.tag=u,e.anchor=h,!0;vx(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=h,!0;vx(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Sx(e,d,p,g,f,null,a,s,l),g=f=m=null),b=!0,y=!0,i=!0):y?(y=!1,i=!0):vx(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),Fx(e,t,4,!0,i)&&(y?f=e.result:m=e.result),y||(Sx(e,d,p,g,f,m,a,s,l),g=f=m=null),Tx(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)vx(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Sx(e,d,p,g,f,null,a,s,l),b&&(e.tag=u,e.anchor=h,e.kind="mapping",e.result=d),b}function Dx(e){var t,r,n,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&vx(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)):vx(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!sx(i);)33===i&&(a?vx(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),rx.test(r)||vx(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),tx.test(n)&&vx(e,"tag suffix cannot contain flow indicator characters")}n&&!nx.test(n)&&vx(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(s){vx(e,"tag name is malformed: "+n)}return o?e.tag=n:Kv.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:vx(e,'undeclared tag handle "'+r+'"'),!0}function Ox(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&vx(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!sx(r)&&!lx(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&vx(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function zx(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&&!sx(n)&&!lx(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&vx(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Kv.call(e.anchorMap,r)||vx(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Tx(e,!0,-1),!0}function Fx(e,t,r,n,i){var o,a,s,l,c,u,h,d,p,g=1,f=!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&&Tx(e,!0,-1)&&(f=!0,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)),1===g)for(;Dx(e)||Ox(e);)Tx(e,!0,-1)?(f=!0,s=o,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)):s=!1;if(s&&(s=f||i),1!==g&&4!==r||(d=1===r||2===r?t:t+1,p=e.position-e.lineStart,1===g?s&&(jx(e,p)||Nx(e,p,d))||Bx(e,d)?m=!0:(a&&Lx(e,d)||Mx(e,d)||Ix(e,d)?m=!0:zx(e)?(m=!0,null===e.tag&&null===e.anchor||vx(e,"alias node should not have any properties")):Px(e,d,1===r)&&(m=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(m=s&&jx(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&&vx(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(Kv.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||vx(e,"unknown tag !<"+e.tag+">"),null!==e.result&&h.kind!==e.kind&&vx(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)):vx(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 Rx(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))&&(Tx(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&&!sx(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&vx(e,"directive name must not be less than one character in length");0!==i;){for(;ax(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!ox(i));break}if(ox(i))break;for(t=e.position;0!==i&&!sx(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&_x(e),Kv.call(Cx,r)?Cx[r](e,r,n):xx(e,'unknown document directive "'+r+'"')}Tx(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,Tx(e,!0,-1)):a&&vx(e,"directives end mark is expected"),Fx(e,e.lineIndent-1,4,!1,!0),Tx(e,!0,-1),e.checkLineBreaks&&ex.test(e.input.slice(o,e.position))&&xx(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ax(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Tx(e,!0,-1)):e.position<e.length-1&&vx(e,"end of the stream or a document separator is expected")}function $x(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 yx(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,vx(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;)Rx(r);return r.documents}function Vx(e,t){var r=$x(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Rb("expected a single document in the stream, but found more")}}Tu(wx,"captureSegment"),Tu(kx,"mergeMappings"),Tu(Sx,"storeMappingPair"),Tu(_x,"readLineBreak"),Tu(Tx,"skipSeparationSpace"),Tu(Ax,"testDocumentSeparator"),Tu(Ex,"writeFoldedLines"),Tu(Px,"readPlainScalar"),Tu(Mx,"readSingleQuotedScalar"),Tu(Ix,"readDoubleQuotedScalar"),Tu(Bx,"readFlowCollection"),Tu(Lx,"readBlockScalar"),Tu(jx,"readBlockSequence"),Tu(Nx,"readBlockMapping"),Tu(Dx,"readTagProperty"),Tu(Ox,"readAnchorProperty"),Tu(zx,"readAlias"),Tu(Fx,"composeNode"),Tu(Rx,"readDocument"),Tu($x,"loadDocuments"),Tu(function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=$x(e,r);if("function"!=typeof t)return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])},"loadAll$1"),Tu(Vx,"load$1");var Wx={load:Vx},qx=Object.prototype.toString,Hx=Object.prototype.hasOwnProperty,Ux=65279,Gx={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"},Xx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Jx=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Yx(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])&&Hx.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}function Zx(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 Rb("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+Ob.repeat("0",n-t.length)+t}Tu(Yx,"compileStyleMap"),Tu(Zx,"encodeHex");function Kx(e){this.schema=e.schema||Zv,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ob.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Yx(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 Qx(e,t){for(var r,n=Ob.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 eC(e,t){return"\n"+Ob.repeat(" ",e.indent*t)}function tC(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 rC(e){return 32===e||9===e}function nC(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Ux||65536<=e&&e<=1114111}function iC(e){return nC(e)&&e!==Ux&&13!==e&&10!==e}function oC(e,t,r){var n=iC(e),i=n&&!rC(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||iC(t)&&!rC(t)&&35===e||58===t&&i}function aC(e){return nC(e)&&e!==Ux&&!rC(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 sC(e){return!rC(e)&&58!==e}function lC(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 cC(e){return/^\n* /.test(e)}Tu(Kx,"State"),Tu(Qx,"indentString"),Tu(eC,"generateNextLine"),Tu(tC,"testImplicitResolving"),Tu(rC,"isWhitespace"),Tu(nC,"isPrintable"),Tu(iC,"isNsCharOrWhitespace"),Tu(oC,"isPlainSafe"),Tu(aC,"isPlainSafeFirst"),Tu(sC,"isPlainSafeLast"),Tu(lC,"codePointAt"),Tu(cC,"needIndentIndicator");function uC(e,t,r,n,i,o,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==n,g=-1,f=aC(lC(e,0))&&sC(lC(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(!nC(c=lC(e,l)))return 5;f=f&&oC(c,u,s),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(10===(c=lC(e,l)))h=!0,p&&(d=d||l-g-1>n&&" "!==e[g+1],g=l);else if(!nC(c))return 5;f=f&&oC(c,u,s),u=c}d=d||p&&l-g-1>n&&" "!==e[g+1]}return h||d?r>9&&cC(e)?5:a?2===o?5:2:d?4:3:!f||a||i(e)?2===o?5:2:1}function hC(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Xx.indexOf(t)||Jx.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 tC(e,t)}switch(Tu(l,"testAmbiguity"),uC(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"|"+dC(t,e.indent)+pC(Qx(t,o));case 4:return">"+dC(t,e.indent)+pC(Qx(gC(t,a),o));case 5:return'"'+mC(t)+'"';default:throw new Rb("impossible error: invalid scalar style")}}()}function dC(e,t){var r=cC(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function pC(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function gC(e,t){for(var r,n,i,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=e.indexOf("\n"))?r:e.length,o.lastIndex=r,fC(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")+fC(c,t),s=n}return a}function fC(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 mC(e){for(var t,r="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=lC(e,i),!(t=Gx[n])&&nC(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||Zx(n);return r}function yC(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)),(wC(e,t,o,!1,!1)||void 0===o&&wC(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}function bC(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)),(wC(e,t+1,a,!0,!0,!1,!0)||void 0===a&&wC(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=eC(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function vC(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)),wC(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),wC(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}function xC(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 Rb("sortKeys must be a boolean or a function");for(i=0,o=d.length;i<o;i+=1)c="",n&&""===u||(c+=eC(e,t)),s=r[a=d[i]],e.replacer&&(s=e.replacer.call(r,a,s)),wC(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+=eC(e,t)),wC(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 CC(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]"===qx.call(s.represent))n=s.represent(t,l);else{if(!Hx.call(s.represent,l))throw new Rb("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');n=s.represent[l](t,l)}e.dump=n}return!0}return!1}function wC(e,t,r,n,i,o,a){e.tag=null,e.dump=r,CC(e,r,!1)||CC(e,r,!0);var s,l=qx.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?(xC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(vC(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?bC(e,t-1,e.dump,i):bC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(yC(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 Rb("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&hC(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 kC(e,t){var r,n,i=[],o=[];for(SC(e,i,o),r=0,n=o.length;r<n;r+=1)t.duplicates.push(i[o[r]]);t.usedDuplicates=new Array(n)}function SC(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)SC(e[i],t,r);else for(i=0,o=(n=Object.keys(e)).length;i<o;i+=1)SC(e[n[i]],t,r)}Tu(uC,"chooseScalarStyle"),Tu(hC,"writeScalar"),Tu(dC,"blockHeader"),Tu(pC,"dropEndingNewline"),Tu(gC,"foldString"),Tu(fC,"foldLine"),Tu(mC,"escapeString"),Tu(yC,"writeFlowSequence"),Tu(bC,"writeBlockSequence"),Tu(vC,"writeFlowMapping"),Tu(xC,"writeBlockMapping"),Tu(CC,"detectType"),Tu(wC,"writeNode"),Tu(kC,"getDuplicateReferences"),Tu(SC,"inspectNode"),Tu(function(e,t){var r=new Kx(t=t||{});r.noRefs||kC(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),wC(r,0,n,!0,!0)?r.dump+"\n":""},"dump$1"),Tu(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 _C=wv,TC=Wx.load,AC={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},EC={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function PC(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=MC(e),t=MC(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}}Tu(PC,"calculateDeltaAndAngle");var MC=Tu(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),IC=Tu(e=>({x:Tu(function(t,r,n){let i=0;const o=MC(n[0]).x<MC(n[n.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(AC,e.arrowTypeStart)){const{angle:t,deltaX:r}=PC(n[0],n[1]);i=AC[e.arrowTypeStart]*Math.cos(t)*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(AC,e.arrowTypeEnd)){const{angle:t,deltaX:r}=PC(n[n.length-1],n[n.length-2]);i=AC[e.arrowTypeEnd]*Math.cos(t)*(r>=0?1:-1)}const a=Math.abs(MC(t).x-MC(n[n.length-1]).x),s=Math.abs(MC(t).y-MC(n[n.length-1]).y),l=Math.abs(MC(t).x-MC(n[0]).x),c=Math.abs(MC(t).y-MC(n[0]).y),u=AC[e.arrowTypeStart],h=AC[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 MC(t).x+i},"x"),y:Tu(function(t,r,n){let i=0;const o=MC(n[0]).y<MC(n[n.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(AC,e.arrowTypeStart)){const{angle:t,deltaY:r}=PC(n[0],n[1]);i=AC[e.arrowTypeStart]*Math.abs(Math.sin(t))*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(AC,e.arrowTypeEnd)){const{angle:t,deltaY:r}=PC(n[n.length-1],n[n.length-2]);i=AC[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(r>=0?1:-1)}const a=Math.abs(MC(t).y-MC(n[n.length-1]).y),s=Math.abs(MC(t).x-MC(n[n.length-1]).x),l=Math.abs(MC(t).y-MC(n[0]).y),c=Math.abs(MC(t).x-MC(n[0]).x),u=AC[e.arrowTypeStart],h=AC[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 MC(t).y+i},"y")}),"getLineFunctionsWithOffset"),BC=Tu(({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"),LC=Tu(e=>{const{handDrawnSeed:t}=Yp();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),jC=Tu(e=>{const t=NC([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),NC=Tu(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"),DC=Tu(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"),OC=Tu(e=>{const{stylesArray:t}=jC(e),r=[],n=[],i=[],o=[];return t.forEach(e=>{const t=e[0];DC(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"),zC=Tu((e,t)=>{var r;const{themeVariables:n,handDrawnSeed:i}=Yp(),{nodeBorder:o,mainBkg:a}=n,{stylesMap:s}=jC(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:FC(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),FC=Tu(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"),RC={},$C={};Object.defineProperty($C,"__esModule",{value:!0}),$C.BLANK_URL=$C.relativeFirstCharacters=$C.whitespaceEscapeCharsRegex=$C.urlSchemeRegex=$C.ctrlCharactersRegex=$C.htmlCtrlEntityRegex=$C.htmlEntitiesRegex=$C.invalidProtocolRegex=void 0,$C.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$C.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$C.htmlCtrlEntityRegex=/&(newline|tab);/gi,$C.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$C.urlSchemeRegex=/^.+(:|&colon;)/gim,$C.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$C.relativeFirstCharacters=[".","/"],$C.BLANK_URL="about:blank",Object.defineProperty(RC,"__esModule",{value:!0});var VC=RC.sanitizeUrl=function(e){if(!e)return WC.BLANK_URL;var t,r=HC(e.trim());do{t=(r=HC(r=qC(r).replace(WC.htmlCtrlEntityRegex,"").replace(WC.ctrlCharactersRegex,"").replace(WC.whitespaceEscapeCharsRegex,"").trim())).match(WC.ctrlCharactersRegex)||r.match(WC.htmlEntitiesRegex)||r.match(WC.htmlCtrlEntityRegex)||r.match(WC.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var n=r;if(!n)return WC.BLANK_URL;if(function(e){return WC.relativeFirstCharacters.indexOf(e[0])>-1}(n))return n;var i=n.trimStart(),o=i.match(WC.urlSchemeRegex);if(!o)return n;var a=o[0].toLowerCase().trim();if(WC.invalidProtocolRegex.test(a))return WC.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 WC.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s},WC=$C;function qC(e){return e.replace(WC.ctrlCharactersRegex,"").replace(WC.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function HC(e){try{return decodeURIComponent(e)}catch(t){return e}}var UC="object"==typeof global&&global&&global.Object===Object&&global,GC="object"==typeof self&&self&&self.Object===Object&&self,XC=UC||GC||Function("return this")(),JC=XC.Symbol,YC=Object.prototype,ZC=YC.hasOwnProperty,KC=YC.toString,QC=JC?JC.toStringTag:void 0;var ew=Object.prototype.toString;var tw=JC?JC.toStringTag:void 0;function rw(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":tw&&tw in Object(e)?function(e){var t=ZC.call(e,QC),r=e[QC];try{e[QC]=void 0;var n=!0}catch(o){}var i=KC.call(e);return n&&(t?e[QC]=r:delete e[QC]),i}(e):function(e){return ew.call(e)}(e)}function nw(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function iw(e){if(!nw(e))return!1;var t=rw(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ow,aw=XC["__core-js_shared__"],sw=(ow=/[^.]+$/.exec(aw&&aw.keys&&aw.keys.IE_PROTO||""))?"Symbol(src)_1."+ow:"";var lw=Function.prototype.toString;function cw(e){if(null!=e){try{return lw.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var uw=/^\[object .+?Constructor\]$/,hw=Function.prototype,dw=Object.prototype,pw=hw.toString,gw=dw.hasOwnProperty,fw=RegExp("^"+pw.call(gw).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mw(e){return!(!nw(e)||(t=e,sw&&sw in t))&&(iw(e)?fw:uw).test(cw(e));var t}function yw(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return mw(r)?r:void 0}var bw=yw(Object,"create");var vw=Object.prototype.hasOwnProperty;var xw=Object.prototype.hasOwnProperty;function Cw(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 ww(e,t){return e===t||e!=e&&t!=t}function kw(e,t){for(var r=e.length;r--;)if(ww(e[r][0],t))return r;return-1}Cw.prototype.clear=function(){this.__data__=bw?bw(null):{},this.size=0},Cw.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Cw.prototype.get=function(e){var t=this.__data__;if(bw){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return vw.call(t,e)?t[e]:void 0},Cw.prototype.has=function(e){var t=this.__data__;return bw?void 0!==t[e]:xw.call(t,e)},Cw.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bw&&void 0===t?"__lodash_hash_undefined__":t,this};var Sw=Array.prototype.splice;function _w(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])}}_w.prototype.clear=function(){this.__data__=[],this.size=0},_w.prototype.delete=function(e){var t=this.__data__,r=kw(t,e);return!(r<0)&&(r==t.length-1?t.pop():Sw.call(t,r,1),--this.size,!0)},_w.prototype.get=function(e){var t=this.__data__,r=kw(t,e);return r<0?void 0:t[r][1]},_w.prototype.has=function(e){return kw(this.__data__,e)>-1},_w.prototype.set=function(e,t){var r=this.__data__,n=kw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var Tw=yw(XC,"Map");function Aw(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 Ew(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])}}Ew.prototype.clear=function(){this.size=0,this.__data__={hash:new Cw,map:new(Tw||_w),string:new Cw}},Ew.prototype.delete=function(e){var t=Aw(this,e).delete(e);return this.size-=t?1:0,t},Ew.prototype.get=function(e){return Aw(this,e).get(e)},Ew.prototype.has=function(e){return Aw(this,e).has(e)},Ew.prototype.set=function(e,t){var r=Aw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Pw(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(Pw.Cache||Ew),r}Pw.Cache=Ew;function Mw(e){var t=this.__data__=new _w(e);this.size=t.size}Mw.prototype.clear=function(){this.__data__=new _w,this.size=0},Mw.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Mw.prototype.get=function(e){return this.__data__.get(e)},Mw.prototype.has=function(e){return this.__data__.has(e)},Mw.prototype.set=function(e,t){var r=this.__data__;if(r instanceof _w){var n=r.__data__;if(!Tw||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ew(n)}return r.set(e,t),this.size=r.size,this};var Iw=function(){try{var e=yw(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();function Bw(e,t,r){"__proto__"==t&&Iw?Iw(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Lw(e,t,r){(void 0!==r&&!ww(e[t],r)||void 0===r&&!(t in e))&&Bw(e,t,r)}var jw=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},Nw="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dw=Nw&&"object"==typeof module&&module&&!module.nodeType&&module,Ow=Dw&&Dw.exports===Nw?XC.Buffer:void 0,zw=Ow?Ow.allocUnsafe:void 0;function Fw(e,t){if(t)return e.slice();var r=e.length,n=zw?zw(r):new e.constructor(r);return e.copy(n),n}var Rw=XC.Uint8Array;function $w(e){var t=new e.constructor(e.byteLength);return new Rw(t).set(new Rw(e)),t}function Vw(e,t){var r=t?$w(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ww(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var qw=Object.create,Hw=function(){function e(){}return function(t){if(!nw(t))return{};if(qw)return qw(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Uw(e,t){return function(r){return e(t(r))}}var Gw=Uw(Object.getPrototypeOf,Object),Xw=Object.prototype;function Jw(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Xw)}function Yw(e){return"function"!=typeof e.constructor||Jw(e)?{}:Hw(Gw(e))}function Zw(e){return null!=e&&"object"==typeof e}function Kw(e){return Zw(e)&&"[object Arguments]"==rw(e)}var Qw=Object.prototype,ek=Qw.hasOwnProperty,tk=Qw.propertyIsEnumerable,rk=Kw(function(){return arguments}())?Kw:function(e){return Zw(e)&&ek.call(e,"callee")&&!tk.call(e,"callee")},nk=Array.isArray;function ik(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ok(e){return null!=e&&ik(e.length)&&!iw(e)}var ak="object"==typeof exports&&exports&&!exports.nodeType&&exports,sk=ak&&"object"==typeof module&&module&&!module.nodeType&&module,lk=sk&&sk.exports===ak?XC.Buffer:void 0,ck=(lk?lk.isBuffer:void 0)||function(){return!1},uk=Function.prototype,hk=Object.prototype,dk=uk.toString,pk=hk.hasOwnProperty,gk=dk.call(Object);var fk={};function mk(e){return function(t){return e(t)}}fk["[object Float32Array]"]=fk["[object Float64Array]"]=fk["[object Int8Array]"]=fk["[object Int16Array]"]=fk["[object Int32Array]"]=fk["[object Uint8Array]"]=fk["[object Uint8ClampedArray]"]=fk["[object Uint16Array]"]=fk["[object Uint32Array]"]=!0,fk["[object Arguments]"]=fk["[object Array]"]=fk["[object ArrayBuffer]"]=fk["[object Boolean]"]=fk["[object DataView]"]=fk["[object Date]"]=fk["[object Error]"]=fk["[object Function]"]=fk["[object Map]"]=fk["[object Number]"]=fk["[object Object]"]=fk["[object RegExp]"]=fk["[object Set]"]=fk["[object String]"]=fk["[object WeakMap]"]=!1;var yk="object"==typeof exports&&exports&&!exports.nodeType&&exports,bk=yk&&"object"==typeof module&&module&&!module.nodeType&&module,vk=bk&&bk.exports===yk&&UC.process,xk=function(){try{var e=bk&&bk.require&&bk.require("util").types;return e||vk&&vk.binding&&vk.binding("util")}catch(t){}}(),Ck=xk&&xk.isTypedArray,wk=Ck?mk(Ck):function(e){return Zw(e)&&ik(e.length)&&!!fk[rw(e)]};function kk(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Sk=Object.prototype.hasOwnProperty;function _k(e,t,r){var n=e[t];Sk.call(e,t)&&ww(n,r)&&(void 0!==r||t in e)||Bw(e,t,r)}function Tk(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?Bw(r,s,l):_k(r,s,l)}return r}var Ak=/^(?:0|[1-9]\d*)$/;function Ek(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ak.test(e))&&e>-1&&e%1==0&&e<t}var Pk=Object.prototype.hasOwnProperty;function Mk(e,t){var r=nk(e),n=!r&&rk(e),i=!r&&!n&&ck(e),o=!r&&!n&&!i&&wk(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&&!Pk.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ek(c,l))||s.push(c);return s}var Ik=Object.prototype.hasOwnProperty;function Bk(e){if(!nw(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Jw(e),r=[];for(var n in e)("constructor"!=n||!t&&Ik.call(e,n))&&r.push(n);return r}function Lk(e){return ok(e)?Mk(e,!0):Bk(e)}function jk(e,t,r,n,i,o,a){var s=kk(e,r),l=kk(t,r),c=a.get(l);if(c)Lw(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=nk(l),g=!p&&ck(l),f=!p&&!g&&wk(l);h=l,p||g||f?nk(s)?h=s:Zw(u=s)&&ok(u)?h=Ww(s):g?(d=!1,h=Fw(l,!0)):f?(d=!1,h=Vw(l,!0)):h=[]:function(e){if(!Zw(e)||"[object Object]"!=rw(e))return!1;var t=Gw(e);if(null===t)return!0;var r=pk.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dk.call(r)==gk}(l)||rk(l)?(h=s,rk(s)?h=function(e){return Tk(e,Lk(e))}(s):nw(s)&&!iw(s)||(h=Yw(l))):d=!1}d&&(a.set(l,h),i(h,l,n,o,a),a.delete(l)),Lw(e,r,h)}}function Nk(e,t,r,n,i){e!==t&&jw(t,function(o,a){if(i||(i=new Mw),nw(o))jk(e,t,a,r,Nk,n,i);else{var s=n?n(kk(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Lw(e,a,s)}},Lk)}function Dk(e){return e}var Ok=Math.max;var zk=Iw?function(e,t){return Iw(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Dk,Fk=Date.now;var Rk,$k,Vk,Wk=(Rk=zk,$k=0,Vk=0,function(){var e=Fk(),t=16-(e-Vk);if(Vk=e,t>0){if(++$k>=800)return arguments[0]}else $k=0;return Rk.apply(void 0,arguments)});function qk(e,t){return Wk(function(e,t,r){return t=Ok(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Ok(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,Dk),e+"")}var Hk,Uk=(Hk=function(e,t,r){Nk(e,t,r)},qk(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=Hk.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!nw(r))return!1;var n=typeof t;return!!("number"==n?ok(r)&&Ek(t,r.length):"string"==n&&t in r)&&ww(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&&Hk(e,a,r,i)}return e})),Gk={curveBasis:Gy,curveBasisClosed:function(e){return new Xy(e)},curveBasisOpen:function(e){return new Jy(e)},curveBumpX:Vy,curveBumpY:Wy,curveBundle:Zy,curveCardinalClosed:rb,curveCardinalOpen:ib,curveCardinal:eb,curveCatmullRomClosed:cb,curveCatmullRomOpen:hb,curveCatmullRom:sb,curveLinear:Oy,curveLinearClosed:function(e){return new db(e)},curveMonotoneX:xb,curveMonotoneY:Cb,curveNatural:Sb,curveStep:Tb,curveStepAfter:Eb,curveStepBefore:Ab},Xk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Jk=Tu(function(e,t){const r=Yk(e,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const e=r.map(e=>e.args);jd(e),n=fd(n,[...e])}else n=r.args;if(!n)return;let i=ud(e,t);const o="config";return void 0!==n[o]&&("flowchart-v2"===i&&(i="flowchart"),n[i]=n[o],delete n[o]),n},"detectInit"),Yk=Tu(function(e,t=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${Xk.source})(?=[}][%]{2}).*\n`,"ig");let o;e=e.trim().replace(i,"").replace(/'/gm,'"'),Pu.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:${e}`);const a=[];for(;null!==(o=ad.exec(e));)if(o.index===ad.lastIndex&&ad.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 Pu.error(`ERROR: ${i.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Zk=Tu(function(e){return e.replace(ad,"")},"removeDirectives"),Kk=Tu(function(e,t){for(const[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");function Qk(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Gk[r]??t}function eS(e,t){const r=e.trim();if(r)return"loose"!==t.securityLevel?VC(r):r}Tu(Qk,"interpolateToCurve"),Tu(eS,"formatUrl");var tS=Tu((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 Pu.error(`Function name: ${e} not found in window`);o[i](...t)},"runFunc");function rS(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function nS(e){let t,r=0;e.forEach(e=>{r+=rS(e,t),t=e});return aS(e,r/2)}function iS(e){return 1===e.length?e[0]:nS(e)}Tu(rS,"distance"),Tu(nS,"traverseEdge"),Tu(iS,"calcLabelPosition");var oS=Tu((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),aS=Tu((e,t)=>{let r,n=t;for(const i of e){if(r){const e=rS(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:oS((1-t)*r.x+t*i.x,5),y:oS((1-t)*r.y+t*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sS=Tu((e,t,r)=>{Pu.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=aS(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 lS(e,t,r){const n=structuredClone(r);Pu.info("our points",n),"start_left"!==t&&"start_right"!==t&&n.reverse();const i=aS(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 cS(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}}Tu(lS,"calcTerminalLabelPosition"),Tu(cS,"getStylesFromArray");var uS=0,hS=Tu(()=>(uS++,"id-"+Math.random().toString(36).substr(2,12)+"-"+uS),"generateId");function dS(e){let t="";const r="0123456789abcdef";for(let n=0;n<e;n++)t+=r.charAt(Math.floor(16*Math.random()));return t}Tu(dS,"makeRandomHex");var pS=Tu(e=>dS(e.length),"random"),gS=Tu(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"),fS=Tu(function(e,t){const r=t.text.replace(Ap.lineBreakRegex," "),[,n]=TS(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"),mS=Pw((e,t,r)=>{if(!e)return e;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ap.lineBreakRegex.test(e))return e;const n=e.split(" ").filter(Boolean),i=[];let o="";return n.forEach((e,a)=>{const s=vS(`${e} `,r),l=vS(o,r);if(s>t){const{hyphenatedStrings:n,remainingWord:a}=yS(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}`),yS=Pw((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(vS(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 bS(e,t){return CS(e,t).height}function vS(e,t){return CS(e,t).width}Tu(bS,"calculateTextHeight"),Tu(vS,"calculateTextWidth");var xS,CS=Pw((e,t)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,o]=TS(r),a=["sans-serif",n],s=e.split(Ap.lineBreakRegex),l=[],c=Sf("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=gS();n.text=r||"​";const a=fS(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}`),wS=(Tu(p=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),p),kS=Tu(function(e){return xS=xS||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xS.innerHTML=e,unescape(xS.textContent)},"entityDecode");function SS(e){return"str"in e}Tu(SS,"isDetailedError");var _S=Tu((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"),TS=Tu(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 AS(e,t){return Uk({},e,t)}Tu(AS,"cleanAndMerge");var ES={assignWithDepth:fd,wrapLabel:mS,calculateTextHeight:bS,calculateTextWidth:vS,calculateTextDimensions:CS,cleanAndMerge:AS,detectInit:Jk,detectDirective:Yk,isSubstringInArray:Kk,interpolateToCurve:Qk,calcLabelPosition:iS,calcCardinalityPosition:sS,calcTerminalLabelPosition:lS,formatUrl:eS,getStylesFromArray:cS,generateId:hS,random:pS,runFunc:tS,entityDecode:kS,insertTitle:_S,isLabelCoordinateInPath:LS,parseFontSize:TS,InitIDGenerator:wS},PS=Tu(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"),MS=Tu(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),IS=Tu((e,t,{counter:r=0,prefix:n,suffix:i},o)=>o||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");function BS(e){return e??null}function LS(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())}Tu(BS,"handleUndefinedAttr"),Tu(LS,"isLabelCoordinateInPath");const jS=Object.freeze({left:0,top:0,width:16,height:16}),NS=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),DS=Object.freeze({...jS,...NS}),OS=Object.freeze({...DS,body:"",hidden:!1}),zS=Object.freeze({width:null,height:null}),FS=Object.freeze({...zS,...NS}),RS=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name);function $S(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 OS)n in NS?n in e&&!(n in r)&&(r[n]=NS[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function VS(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(e){o=$S(n[e]||i[e],o)}return a(t),r.forEach(a),$S(e,o)}function WS(e,t){if(e.icons[t])return VS(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?VS(e,t,r):null}const qS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,HS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function US(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(qS);if(null===n||!n.length)return e;const i=[];let o=n.shift(),a=HS.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 GS=/\sid="(\S+)"/g,XS=new Map;function JS(e){const t=[];let r;for(;r=GS.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=XS.get(e)||0;return XS.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 YS(){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 KS(e){ZS=e}var QS={exec:()=>null};function e_(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(r_.caret,"$1"),r=r.replace(e,i),n},getRegex:()=>new RegExp(r,t)};return n}var t_=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),r_={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")},n_=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,i_=/(?:[*+-]|\d{1,9}[.)])/,o_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,a_=e_(o_).replace(/bull/g,i_).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(),s_=e_(o_).replace(/bull/g,i_).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(),l_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,c_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,u_=e_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",c_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),h_=e_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,i_).getRegex(),d_="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",p_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,g_=e_("^ {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",p_).replace("tag",d_).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f_=e_(l_).replace("hr",n_).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",d_).getRegex(),m_={blockquote:e_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:u_,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:n_,html:g_,lheading:a_,list:h_,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:f_,table:QS,text:/^[^\n]+/},y_=e_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",n_).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",d_).getRegex(),b_={...m_,lheading:s_,table:y_,paragraph:e_(l_).replace("hr",n_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",y_).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",d_).getRegex()},v_={...m_,html:e_("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",p_).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:QS,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:e_(l_).replace("hr",n_).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},x_=/^( {2,}|\\)\n(?!\s*$)/,C_=/[\p{P}\p{S}]/u,w_=/[\s\p{P}\p{S}]/u,k_=/[^\s\p{P}\p{S}]/u,S_=e_(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,w_).getRegex(),__=/(?!~)[\p{P}\p{S}]/u,T_=e_(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",t_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),A_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,E_=e_(A_,"u").replace(/punct/g,C_).getRegex(),P_=e_(A_,"u").replace(/punct/g,__).getRegex(),M_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I_=e_(M_,"gu").replace(/notPunctSpace/g,k_).replace(/punctSpace/g,w_).replace(/punct/g,C_).getRegex(),B_=e_(M_,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,__).getRegex(),L_=e_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,k_).replace(/punctSpace/g,w_).replace(/punct/g,C_).getRegex(),j_=e_(/\\(punct)/,"gu").replace(/punct/g,C_).getRegex(),N_=e_(/^<(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(),D_=e_(p_).replace("(?:--\x3e|$)","--\x3e").getRegex(),O_=e_("^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",D_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),z_=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,F_=e_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",z_).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),R_=e_(/^!?\[(label)\]\[(ref)\]/).replace("label",z_).replace("ref",c_).getRegex(),$_=e_(/^!?\[(ref)\](?:\[\])?/).replace("ref",c_).getRegex(),V_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W_={_backpedal:QS,anyPunctuation:j_,autolink:N_,blockSkip:T_,br:x_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:QS,emStrongLDelim:E_,emStrongRDelimAst:I_,emStrongRDelimUnd:L_,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:F_,nolink:$_,punctuation:S_,reflink:R_,reflinkSearch:e_("reflink|nolink(?!\\()","g").replace("reflink",R_).replace("nolink",$_).getRegex(),tag:O_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:QS},q_={...W_,link:e_(/^!?\[(label)\]\((.*?)\)/).replace("label",z_).getRegex(),reflink:e_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z_).getRegex()},H_={...W_,emStrongRDelimAst:B_,emStrongLDelim:P_,url:e_(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",V_).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:e_(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",V_).getRegex()},U_={...H_,br:e_(x_).replace("{2,}","*").getRegex(),text:e_(H_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},G_={normal:m_,gfm:b_,pedantic:v_},X_={normal:W_,gfm:H_,breaks:U_,pedantic:q_},J_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Y_=e=>J_[e];function Z_(e,t){if(t){if(r_.escapeTest.test(e))return e.replace(r_.escapeReplace,Y_)}else if(r_.escapeTestNoEncode.test(e))return e.replace(r_.escapeReplaceNoEncode,Y_);return e}function K_(e){try{e=encodeURI(e).replace(r_.percentDecode,"%")}catch{return null}return e}function Q_(e,t){var r;let n=e.replace(r_.findPipe,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(r_.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(r_.slashPipe,"|");return n}function eT(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 tT(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 rT=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:eT(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=eT(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:eT(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=eT(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=Q_(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(Q_(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=eT(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)),tT(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 tT(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}}}},nT=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 rT,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:r_,block:G_.normal,inline:X_.normal};this.options.pedantic?(t.block=G_.pedantic,t.inline=X_.pedantic):this.options.gfm&&(t.block=G_.gfm,this.options.breaks?t.inline=X_.breaks:t.inline=X_.gfm),this.tokenizer.rules=t}static get rules(){return{block:G_,inline:X_}}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(r_.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(r_.tabCharGlobal," ").replace(r_.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}},iT=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(r_.notSpaceStart))?void 0:n[0],o=e.replace(r_.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=K_(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=K_(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)}},oT=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""}},aT=class e{constructor(e){y(this,"options"),y(this,"renderer"),y(this,"textRenderer"),this.options=e||ZS,this.options.renderer=this.options.renderer||new iT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new oT}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}},sT=(g=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?nT.lex:nT.lexInline}provideParser(){return this.block?aT.parse:aT.parseInline}},y(g,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),y(g,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),g),lT=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",aT),y(this,"Renderer",iT),y(this,"TextRenderer",oT),y(this,"Lexer",nT),y(this,"Tokenizer",rT),y(this,"Hooks",sT),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 iT(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 rT(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 sT;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];sT.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async&&sT.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 nT.lex(e,t??this.defaults)}parser(e,t){return aT.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?nT.lex:nT.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?aT.parse:aT.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?nT.lex:nT.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?aT.parse:aT.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 cT(e,t){return lT.parse(e,t)}function uT(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}cT.options=cT.setOptions=function(e){return lT.setOptions(e),cT.defaults=lT.defaults,KS(cT.defaults),cT},cT.getDefaults=YS,cT.defaults=ZS,cT.use=function(...e){return lT.use(...e),cT.defaults=lT.defaults,KS(cT.defaults),cT},cT.walkTokens=function(e,t){return lT.walkTokens(e,t)},cT.parseInline=lT.parseInline,cT.Parser=aT,cT.parser=aT.parse,cT.Renderer=iT,cT.TextRenderer=oT,cT.Lexer=nT,cT.lexer=nT.lex,cT.Tokenizer=rT,cT.Hooks=sT,cT.parse=cT,cT.options,cT.setOptions,cT.use,cT.walkTokens,cT.parseInline,aT.parse,nT.lex;var hT={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},dT=new Map,pT=new Map,gT=Tu(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(Pu.debug("Registering icon pack:",t.name),"loader"in t)pT.set(t.name,t.loader);else{if(!("icons"in t))throw Pu.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');dT.set(t.name,t.icons)}}},"registerIconPacks"),fT=Tu(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 RS(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 RS(e)?e:null}if(r&&""===n){const e={provider:n,prefix:"",name:o};return RS(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=dT.get(n);if(!i){const e=pT.get(n);if(!e)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await e(),prefix:n},dT.set(n,i)}catch(a){throw Pu.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=WS(i,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),mT=Tu(async e=>{try{return await fT(e),!0}catch{return!1}},"isIconAvailable"),yT=Tu(async(e,t,r)=>{let n;try{n=await fT(e,null==t?void 0:t.fallbackPrefix)}catch(a){Pu.error(a),n=hT}const i=function(e,t){const r={...DS,...e},n={...FS,...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=US(h,l/c)):(u="auto"===a?l:a,h=null===s?US(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 g=[i.left,i.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,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>"}(JS(i.body),{...i.attributes,...r});return sp(o,Ud())},"getIconSVG");function bT(e,{markdownAutoWrap:t}){const r=uT(e.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===t?r.replace(/ /g,"&nbsp;"):r}function vT(e,t={}){const r=bT(e,t),n=cT.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(/&#39;/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 Tu(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 xT(e,{markdownAutoWrap:t}={}){const r=cT.lexer(e);function n(e){var r,i,o;return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):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:(Pu.warn(`Unsupported markdown: ${e.type}`),e.raw)}return Tu(n,"output"),r.map(n).join("")}function CT(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function wT(e,t){return kT(e,[],CT(t.content),t.type)}function kT(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}])?kT(e,a,o,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function ST(e,t){if(e.some(({content:e})=>e.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return _T(e,t)}function _T(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 _T(e,t,r,a);if(n.length>0)r.push(n),e.unshift(o);else if(o.content){const[n,i]=wT(t,o);r.push([n]),i.content&&e.unshift(i)}return _T(e,t,r)}function TT(e,t){t&&e.attr("style",t)}async function AT(e,t,r,n,i=!1,o=Ud()){const a=e.append("foreignObject");a.attr("width",10*r+"px"),a.attr("height",10*r+"px");const s=a.append("xhtml:div"),l=kp(t.label)?await Tp(t.label.replace(Ap.lineBreakRegex,"\n"),o):sp(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(l),TT(u,t.labelStyle),u.attr("class",`${c} ${n}`),TT(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 ET(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 PT(e,t,r){const n=e.append("text"),i=ET(n,1,t);BT(i,r);const o=i.node().getComputedTextLength();return n.remove(),o}function MT(e,t,r){var n;const i=e.append("text"),o=ET(i,1,t);BT(o,[{content:r,type:"normal"}]);const a=null==(n=o.node())?void 0:n.getBoundingClientRect();return a&&i.remove(),a}function IT(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=Tu(t=>PT(i,1.1,t)<=e,"checkWidth"),r=t(l)?[l]:ST(l,t);for(const e of r){BT(ET(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 BT(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 LT(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,n,i)=>(r.push((async()=>{const r=`${n}:${i}`;return await mT(r)?await yT(r,void 0,{class:"label-icon"}):`<i class='${sp(e,t).replace(":"," ")}'></i>`})()),e));const n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}Tu(bT,"preprocessMarkdown"),Tu(vT,"markdownToLines"),Tu(xT,"markdownToHTML"),Tu(CT,"splitTextToChars"),Tu(wT,"splitWordToFitWidth"),Tu(kT,"splitWordToFitWidthRecursion"),Tu(ST,"splitLineToFitWidth"),Tu(_T,"splitLineToFitWidthRecursion"),Tu(TT,"applyStyle"),Tu(AT,"addHtmlSpan"),Tu(ET,"createTspan"),Tu(PT,"computeWidthOfText"),Tu(MT,"computeDimensionOfText"),Tu(IT,"createFormattedText"),Tu(BT,"updateTextContentAndStyles"),Tu(LT,"replaceIconSubstring");var jT=Tu(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:o=!0,isNode:a=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(Pu.debug("XYZ createText",t,r,n,i,o,a,"addSvgBackground: ",l),o){const n=xT(t,c),o=await LT(MS(n),c),u=t.replace(/\\\\/g,"\\"),h={isNode:a,label:kp(t)?u:o,labelStyle:r.replace("fill:","color:")};return await AT(e,h,s,i,l,c)}{const n=IT(s,e,vT(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:");Sf(n).attr("style",e)}else{const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Sf(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:");Sf(n).select("text").attr("style",t)}return n}},"createText");function NT(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 DT(e,t){return e[0]===t[0]&&e[1]===t[1]}function OT(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)NT(c,s,i);const l=function(e,t,r){const n=[];for(const c of e){const e=[...c];DT(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)NT(e,s,-i);!function(e,t,r){const n=[];e.forEach(e=>n.push(...e)),NT(n,t,r)}(l,s,-i)}return l}(e,i,n,o||1)}class zT{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const r=OT(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 FT(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 RT extends zT{fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);const n=OT(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)FT([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 $T extends zT{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 VT{constructor(e){this.helper=e}fillPolygons(e,t){const r=OT(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=FT(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 WT{constructor(e){this.helper=e}fillPolygons(e,t){const r=OT(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=FT(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 qT{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=OT(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=FT(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 HT={};class UT{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const GT={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 XT(e,t){return e.type===t}function JT(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(;!XT(o,2);){let a=0;const s=[];if("BOD"===n){if("M"!==o.text&&"m"!==o.text)return JT("M0,0"+e);i++,a=GT[o.text],n=o.text}else XT(o,1)?a=GT[n]:(i++,a=GT[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(!XT(t,1))throw new Error("Param not a number: "+n+","+t.text);s[s.length]=+t.text}if("number"!=typeof GT[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 YT(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,g=o+2*(c-o)/3;t.push({key:"C",data:[h,d,p,g,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||(QT(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 KT(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function QT(e,t,r,n,i,o,a,s,l,c){const u=(h=a,Math.PI*h/180);var h;let d=[],p=0,g=0,f=0,m=0;if(c)[p,g,f,m]=c;else{[e,t]=KT(e,t,-u),[r,n]=KT(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,b=d*y-d*c*c-y*a*a,v=d*c*c+y*a*a,x=(s===l?-1:1)*Math.sqrt(Math.abs(b/v));f=x*i*c/o+(e+r)/2,m=x*-o*a/i+(t+n)/2,p=Math.asin(parseFloat(((t-m)/o).toFixed(9))),g=Math.asin(parseFloat(((n-m)/o).toFixed(9))),e<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){const e=g,t=r,s=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=QT(r=f+i*Math.cos(g),n=m+o*Math.sin(g),t,s,i,o,a,0,l,[g,e,f,m])}y=g-p;const b=Math.cos(p),v=Math.sin(p),x=Math.cos(g),C=Math.sin(g),w=Math.tan(y/4),k=4/3*i*w,S=4/3*o*w,_=[e,t],T=[e+k*v,t-S*b],A=[r+k*C,n-S*x],E=[r,n];if(T[0]=2*_[0]-T[0],T[1]=2*_[1]-T[1],c)return[T,A,E].concat(d);{d=[T,A,E].concat(d);const e=[];for(let t=0;t<d.length;t+=3){const r=KT(d[t][0],d[t][1],u),n=KT(d[t+1][0],d[t+1][1],u),i=KT(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 eA={randOffset:function(e,t){return pA(e,t)},randOffsetWithRange:function(e,t,r){return dA(e,t,r)},ellipse:function(e,t,r,n,i){return oA(e,t,i,iA(r,n,i)).opset},doubleLineOps:function(e,t,r,n,i){return gA(e,t,r,n,i,!0)}};function tA(e,t,r,n,i){return{type:"path",ops:gA(e,t,r,n,i)}}function rA(e,t,r){const n=(e||[]).length;if(n>2){const i=[];for(let t=0;t<n-1;t++)i.push(...gA(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&i.push(...gA(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return 2===n?tA(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function nA(e,t){if(e.length){const r="number"==typeof e[0][0]?[e]:e,n=mA(r[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:mA(r[0],1.5*(1+.22*t.roughness),uA(t));for(let e=1;e<r.length;e++){const o=r[e];if(o.length){const e=mA(o,1*(1+.2*t.roughness),t),r=t.disableMultiStroke?[]:mA(o,1.5*(1+.22*t.roughness),uA(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 iA(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+=pA(a*l,r),s+=pA(s*l,r),{increment:o,rx:a,ry:s}}function oA(e,t,r,n){const[i,o]=bA(n.increment,e,t,n.rx,n.ry,1,n.increment*dA(.1,dA(.4,1,r),r),r);let a=yA(i,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[i]=bA(n.increment,e,t,n.rx,n.ry,1.5,0,r),o=yA(i,null,r);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function aA(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+=pA(.01*h,l),d+=pA(.01*d,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(g-p)/2),y=vA(m,c,u,h,d,p,g,1,l);if(!l.disableMultiStroke){const e=vA(m,c,u,h,d,p,g,1.5,l);y.push(...e)}return a&&(s?y.push(...gA(c,u,c+h*Math.cos(p),u+d*Math.sin(p),l),...gA(c,u,c+h*Math.cos(g),u+d*Math.sin(g),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 sA(e,t){const r=ZT(YT(JT(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(...gA(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(...xA(e,r,i,a,l,c,o,t)),o=[l,c];break}case"Z":n.push(...gA(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:n}}function lA(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]+pA(e,t),n[0][1]+pA(e,t)]});for(let o=1;o<i;o++)r.push({op:"lineTo",data:[n[o][0]+pA(e,t),n[o][1]+pA(e,t)]})}}return{type:"fillPath",ops:r}}function cA(e,t){return function(e,t){let r=e.fillStyle||"hachure";if(!HT[r])switch(r){case"zigzag":HT[r]||(HT[r]=new RT(t));break;case"cross-hatch":HT[r]||(HT[r]=new $T(t));break;case"dots":HT[r]||(HT[r]=new VT(t));break;case"dashed":HT[r]||(HT[r]=new WT(t));break;case"zigzag-line":HT[r]||(HT[r]=new qT(t));break;default:r="hachure",HT[r]||(HT[r]=new zT(t))}return HT[r]}(t,eA).fillPolygons(e,t)}function uA(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function hA(e){return e.randomizer||(e.randomizer=new UT(e.seed||0)),e.randomizer.next()}function dA(e,t,r,n=1){return r.roughness*n*(hA(r)*(t-e)+e)}function pA(e,t,r=1){return dA(-e,e,t,r)}function gA(e,t,r,n,i,o=!1){const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=fA(e,t,r,n,i,!0,!1);if(a)return s;const l=fA(e,t,r,n,i,!0,!0);return s.concat(l)}function fA(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*hA(i);let p=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=pA(p,i,c),g=pA(g,i,c);const f=[],m=()=>pA(h,i,c),y=()=>pA(u,i,c),b=i.preserveVertices;return a?f.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):f.push({op:"move",data:[e+(b?0:pA(u,i,c)),t+(b?0:pA(u,i,c))]}),a?f.push({op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(n-t)*d+m(),r+(b?0:m()),n+(b?0:m())]}):f.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(n-t)*d+y(),r+(b?0:y()),n+(b?0:y())]}),f}function mA(e,t,r){if(!e.length)return[];const n=[];n.push([e[0][0]+pA(t,r),e[0][1]+pA(t,r)]),n.push([e[0][0]+pA(t,r),e[0][1]+pA(t,r)]);for(let i=1;i<e.length;i++)n.push([e[i][0]+pA(t,r),e[i][1]+pA(t,r)]),i===e.length-1&&n.push([e[i][0]+pA(t,r),e[i][1]+pA(t,r)]);return yA(n,null,r)}function yA(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(...fA(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return i}function bA(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=pA(.5,s)-Math.PI/2;c.push([pA(o,s)+t+.9*n*Math.cos(u-e),pA(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=[pA(o,s)+t+n*Math.cos(a),pA(o,s)+r+i*Math.sin(a)];l.push(e),c.push(e)}c.push([pA(o,s)+t+n*Math.cos(u+2*Math.PI+.5*a),pA(o,s)+r+i*Math.sin(u+2*Math.PI+.5*a)]),c.push([pA(o,s)+t+.98*n*Math.cos(u+a),pA(o,s)+r+.98*i*Math.sin(u+a)]),c.push([pA(o,s)+t+.9*n*Math.cos(u+.5*a),pA(o,s)+r+.9*i*Math.sin(u+.5*a)])}return[c,l]}function vA(e,t,r,n,i,o,a,s,l){const c=o+pA(.1,l),u=[];u.push([pA(s,l)+t+.9*n*Math.cos(c-e),pA(s,l)+r+.9*i*Math.sin(c-e)]);for(let h=c;h<=a;h+=e)u.push([pA(s,l)+t+n*Math.cos(h),pA(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)]),yA(u,0,l)}function xA(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:pA(c[0],s)),a[1]+(d?0:pA(c[0],s))]}),u=d?[i,o]:[i+pA(c[p],s),o+pA(c[p],s)],l.push({op:"bcurveTo",data:[e+pA(c[p],s),t+pA(c[p],s),r+pA(c[p],s),n+pA(c[p],s),u[0],u[1]]});return l}function CA(e){return[...e]}function wA(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(CA(e[0]),CA(e[1]),CA(e[2]),CA(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(CA(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 kA(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function SA(e,t,r){const n=kA(t,r);if(0===n)return kA(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)),kA(e,_A(t,r,i))}function _A(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function TA(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(kA(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=_A(o,a,n),u=_A(a,s,n),h=_A(s,l,n),d=_A(c,u,n),p=_A(u,h,n),g=_A(d,p,n);TA([o,c,d,g],0,r,i),TA([g,p,h,l],0,r,i)}var o,a;return i}function AA(e,t){return EA(e,0,e.length,t)}function EA(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=SA(e[u],a,s);t>l&&(l=t,c=u)}return Math.sqrt(l)>n?(EA(e,t,c+1,n,o),EA(e,c,r,n,o)):(o.length||o.push(a),o.push(s)),o}function PA(e,t=.15,r){const n=[],i=(e.length-1)/3;for(let o=0;o<i;o++)TA(e,3*o,t,n);return r&&r>0?EA(n,0,n.length,r):n}const MA="none";class IA{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",[tA(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 rA([[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(lA([i],o)):a.push(cA([i],o))}return o.stroke!==MA&&a.push(s),this._d("rectangle",a,o)}ellipse(e,t,r,n,i){const o=this._o(i),a=[],s=iA(r,n,o),l=oA(e,t,o,s);if(o.fill)if("solid"===o.fillStyle){const r=oA(e,t,o,s).opset;r.type="fillPath",a.push(r)}else a.push(cA([l.estimatedPoints],o));return o.stroke!==MA&&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",[rA(e,!1,r)],r)}arc(e,t,r,n,i,o,a=!1,s){const l=this._o(s),c=[],u=aA(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=aA(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+=pA(.01*c,a),u+=pA(.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,g=[];for(let f=h;f<=d;f+=p)g.push([s+c*Math.cos(f),l+u*Math.sin(f)]);return g.push([s+c*Math.cos(d),l+u*Math.sin(d)]),g.push([s,l]),cA([g],a)}(e,t,r,n,i,o,l));return l.stroke!==MA&&c.push(u),this._d("arc",c,l)}curve(e,t){const r=this._o(t),n=[],i=nA(e,r);if(r.fill&&r.fill!==MA)if("solid"===r.fillStyle){const t=nA(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(...PA(wA([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):t.push(...PA(wA(n),10,(1+r.roughness)/2))}t.length&&n.push(cA([t],r))}return r.stroke!==MA&&n.push(i),this._d("curve",n,r)}polygon(e,t){const r=this._o(t),n=[],i=rA(e,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(lA([e],r)):n.push(cA([e],r))),r.stroke!==MA&&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!==MA,o=r.stroke!==MA,a=!!(r.simplification&&r.simplification<1),s=function(e,t,r){const n=ZT(YT(JT(e))),i=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...PA(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=AA(h,r);e.length&&u.push(e)}return u}(e,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=sA(e,r);if(i)if("solid"===r.fillStyle)if(1===s.length){const t=sA(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(lA(s,r));else n.push(cA(s,r));return o&&(a?s.forEach(e=>{n.push(rA(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:MA};break;case"fillPath":e={d:this.opsToPath(i),stroke:MA,strokeWidth:0,fill:r.fill||MA};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||MA,strokeWidth:r,fill:MA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}}const BA="http://www.w3.org/2000/svg";class LA{constructor(e,t){this.svg=e,this.gen=new IA(t)}draw(e){const t=e.sets||[],r=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(BA,"g"),o=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=n.createElementNS(BA,"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(BA,"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(BA,"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 jA=(e,t)=>new LA(e,t),NA=Tu(async(e,t,r)=>{var n,i;let o;const a=t.useHtmlLabels||gp(null==(n=Yp())?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",BS(t.labelStyle));let c;c=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0];const u=await jT(l,sp(MS(c),Yp()),{useHtmlLabels:a,width:t.width||(null==(i=Yp().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=Sf(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=Yp().fontSize?Yp().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=Ld.fontSize]=TS(e),i=n*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";r(t)}Tu(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"),DA=Tu(async(e,t,r)=>{var n,i,o,a,s,l;const c=r.useHtmlLabels||gp(null==(i=null==(n=Yp())?void 0:n.flowchart)?void 0:i.htmlLabels),u=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),h=await jT(u,sp(MS(t),Yp()),{useHtmlLabels:c,width:r.width||(null==(a=null==(o=Yp())?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(gp(null==(l=null==(s=Yp())?void 0:s.flowchart)?void 0:l.htmlLabels)){const e=h.children[0],t=Sf(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"),OA=Tu((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),zA=Tu((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function FA(e){const t=e.map((e,t)=>`${0===t?"M":"L"}${e.x},${e.y}`);return t.push("Z"),t.join(" ")}function RA(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 $A(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}Tu(FA,"createPathFromPoints"),Tu(RA,"generateFullSineWavePoints"),Tu($A,"generateCirclePoints");var VA=Tu((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 WA(e,t){t&&e.attr("style",t)}async function qA(e){const t=Sf(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=Yp();let i=e.label;e.label&&kp(e.label)&&(i=await Tp(e.label.replace(Ap.lineBreakRegex,"\n"),n));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>";return r.html(sp(o,n)),WA(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()}Tu(WA,"applyStyle"),Tu(qA,"addHtmlLabel");var HA=Tu(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),gp(Yp().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),Pu.info("vertexText"+i);const e={isNode:n,label:MS(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t?t.replace("fill:","color:"):t};return await qA(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"),UA=Tu((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"),GA=Tu(async(e,t)=>{Pu.info("Creating subgraph rect for ",t.id,t);const r=Yp(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=OC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=gp(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),g=await jT(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let f=g.getBBox();if(gp(r.flowchart.htmlLabels)){const e=g.children[0],t=Sf(g);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-m/2,v=t.y-y/2;let x;if(Pu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=jA(h),r=zC(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:i}),n=e.path(UA(b,v,m,y,0),r);x=h.insert(()=>(Pu.debug("Rough node insert CXC",n),n),":first-child"),x.select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",u.join(";").replace("fill","stroke"))}else x=h.insert("rect",":first-child"),x.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",v).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=BC(r);if(p.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=x.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=f.height-t.padding/2,t.intersect=function(e){return VA(t,e)},{cluster:h,labelBBox:f}},"rect"),XA=Tu((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 VA(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),JA=Tu(async(e,t)=>{const r=Yp(),{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 HA(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(gp(r.flowchart.htmlLabels)){const e=p.children[0],t=Sf(p);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const f=0*t.padding,m=f/2,y=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+f;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,v=t.height+f-g.height-6,x=t.x-y/2,C=t.y-b/2;t.width=y;const w=t.y-t.height/2-m+g.height+2;let k;if("handDrawn"===t.look){const e=t.cssClasses.includes("statediagram-cluster-alt"),r=jA(c),n=t.rx||t.ry?r.path(UA(x,C,y,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:i}):r.rectangle(x,C,y,b,{seed:i});k=c.insert(()=>n,":first-child");const u=r.rectangle(x,w,y,v,{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",x).attr("y",C).attr("width",y).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",x).attr("y",w).attr("width",y).attr("height",v)}h.attr("transform",`translate(${t.x-g.width/2}, ${C+1-(gp(r.flowchart.htmlLabels)?0:3)})`);const S=k.node().getBBox();return t.height=S.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(e){return VA(t,e)},{cluster:c,labelBBox:g}},"roundedWithTitle"),YA=Tu(async(e,t)=>{Pu.info("Creating subgraph rect for ",t.id,t);const r=Yp(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=OC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=gp(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),g=await jT(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let f=g.getBBox();if(gp(r.flowchart.htmlLabels)){const e=g.children[0],t=Sf(g);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-m/2,v=t.y-y/2;let x;if(Pu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=jA(h),r=zC(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:i}),n=e.path(UA(b,v,m,y,t.rx),r);x=h.insert(()=>(Pu.debug("Rough node insert CXC",n),n),":first-child"),x.select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",u.join(";").replace("fill","stroke"))}else x=h.insert("rect",":first-child"),x.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",v).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=BC(r);if(p.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=x.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=f.height-t.padding/2,t.intersect=function(e){return VA(t,e)},{cluster:h,labelBBox:f}},"kanbanSection"),ZA={rect:GA,squareRect:GA,roundedWithTitle:JA,noteGroup:XA,divider:Tu((e,t)=>{const r=Yp(),{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=jA(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 g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return VA(t,e)},{cluster:a,labelBBox:{}}},"divider"),kanbanSection:YA},KA=new Map,QA=Tu(async(e,t)=>{const r=t.shape||"rect",n=await ZA[r](e,t);return KA.set(t.id,n),n},"insertCluster"),eE=Tu(()=>{KA=new Map},"clear");function tE(e,t){return e.intersect(t)}Tu(tE,"intersectNode");var rE=tE;function nE(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}}Tu(nE,"intersectEllipse");var iE=nE;function oE(e,t,r){return iE(e,t,t,r)}Tu(oE,"intersectCircle");var aE=oE;function sE(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&&lE(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,g=u*t.x+h*t.y+d;if(Math.abs(p)<c&&Math.abs(g)<c&&lE(p,g))return;const f=i*h-u*o;if(0===f)return;const m=Math.abs(f/2);let y=o*d-h*a;const b=y<0?(y-m)/f:(y+m)/f;y=u*a-i*d;return{x:b,y:y<0?(y-m)/f:(y+m)/f}}}function lE(e,t){return e*t>0}Tu(sE,"intersectLine"),Tu(lE,"sameSign");var cE=sE;function uE(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=cE(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}Tu(uE,"intersectPolygon");var hE={node:rE,circle:aE,ellipse:iE,polygon:uE,rect:VA};function dE(e,t){const{labelStyles:r}=OC(t);t.labelStyle=r;const n=zA(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=jA(o),l=zC(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",BS(a)),OA(t,u),t.intersect=function(e){return Pu.info("Circle intersect",t,1,e),hE.circle(t,1,e)},o}function pE(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),g=s+p*o*Math.sin(c)*(a?-1:1),f=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-f)/o,(e-g)/i);let y=Math.atan2((n-f)/o,(r-g)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const b=[];for(let v=0;v<20;v++){const e=m+v/19*y,t=g+i*Math.cos(e),r=f+o*Math.sin(e);b.push({x:t,y:r})}return b}async function gE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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},...pE(-a/2,-s/2,-a/2,s/2,c,l,!1),{x:a/2,y:s/2},...pE(a/2,s/2,a/2,-s/2,c,l,!0)],d=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=FA(h),f=d.path(g,p),m=i.insert(()=>f,":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)`),OA(t,m),t.intersect=function(e){return hE.polygon(t,h,e)},i}function fE(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 mE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,s,a,c);return n&&u.attr("style",n),OA(t,u),t.intersect=function(e){return hE.polygon(t,c,e)},i}function yE(e,t){const{nodeStyles:r}=OC(t);t.label="";const n=e.insert("g").attr("class",zA(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=jA(n),l=zC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=FA(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 hE.polygon(t,a,e)},n}async function bE(e,t,r){const{labelStyles:n,nodeStyles:i}=OC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,halfPadding:s}=await NA(e,t,zA(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=jA(o),r=zC(t,{}),n=e.circle(0,0,2*c,r);u=o.insert(()=>n,":first-child"),u.attr("class","basic label-container").attr("style",BS(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 OA(t,u),t.calcIntersect=function(e,t){const r=e.width/2;return hE.circle(e,r,t)},t.intersect=function(e){return Pu.info("Circle intersect",t,c,e),hE.circle(t,c,e)},o}function vE(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 xE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r,t.label="";const i=e.insert("g").attr("class",zA(t)).attr("id",t.domId??t.id),o=Math.max(30,(null==t?void 0:t.width)??0),{cssStyles:a}=t,s=jA(i),l=zC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,2*o,l),u=vE(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),OA(t,d),t.intersect=function(e){Pu.info("crossedCircle intersect",t,{radius:o,point:e});return hE.circle(t,o,e)},i}function CE(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 wE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...CE(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...CE(s/2+2*c,-c,c,20,-180,-270),...CE(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...CE(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...CE(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...CE(s/2+.1*s,-c,c,20,-180,-270),...CE(s/2+.1*s,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...CE(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=jA(i),g=zC(t,{fill:"none"});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=FA(h).replace("Z",""),m=p.path(f,g),y=FA(d),b=p.path(y,{...g}),v=i.insert("g",":first-child");return v.insert(()=>b,":first-child").attr("stroke-opacity",0),v.insert(()=>m,":first-child"),v.attr("class","text"),u&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.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))})`),OA(t,v),t.intersect=function(e){return hE.polygon(t,d,e)},i}function kE(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 SE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...kE(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...kE(s/2+2*c,-c,c,20,-180,-270),...kE(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...kE(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...kE(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...kE(s/2+2*c,-c,c,20,-180,-270),...kE(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...kE(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=jA(i),g=zC(t,{fill:"none"});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=FA(h).replace("Z",""),m=p.path(f,g),y=FA(d),b=p.path(y,{...g}),v=i.insert("g",":first-child");return v.insert(()=>b,":first-child").attr("stroke-opacity",0),v.insert(()=>m,":first-child"),v.attr("class","text"),u&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.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))})`),OA(t,v),t.intersect=function(e){return hE.polygon(t,d,e)},i}function _E(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 TE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[..._E(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},..._E(s/2+2*c,-c,c,20,-180,-270),..._E(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},..._E(s/2,l/2,c,20,0,90)],d=[..._E(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},..._E(-s/2-c/2,-c,c,20,0,90),..._E(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},..._E(-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},..._E(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},..._E(s/2+2*c,-c,c,20,-180,-270),..._E(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:l/2},..._E(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},..._E(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},..._E(-s/2-c/2,-c,c,20,0,90),..._E(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},..._E(-s/2+c+c/2,l/2,c,30,-180,-270)],g=jA(i),f=zC(t,{fill:"none"});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=FA(h).replace("Z",""),y=g.path(m,f),b=FA(d).replace("Z",""),v=g.path(b,f),x=FA(p),C=g.path(x,{...f}),w=i.insert("g",":first-child");return w.insert(()=>C,":first-child").attr("stroke-opacity",0),w.insert(()=>y,":first-child"),w.insert(()=>v,":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))})`),OA(t,w),t.intersect=function(e){return hE.polygon(t,p,e)},i}async function AE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),h=zC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=a-l,p=s/4,g=[{x:d,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:d,y:s},...$A(-d,-s/2,l,50,270,90)],f=FA(g),m=u.path(f,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})`),OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}Tu(dE,"anchor"),Tu(pE,"generateArcPoints"),Tu(gE,"bowTieRect"),Tu(fE,"insertPolygonShape"),Tu(mE,"card"),Tu(yE,"choice"),Tu(bE,"circle"),Tu(vE,"createLine"),Tu(xE,"crossedCircle"),Tu(CE,"generateCirclePoints"),Tu(wE,"curlyBraceLeft"),Tu(kE,"generateCirclePoints"),Tu(SE,"curlyBraceRight"),Tu(_E,"generateCirclePoints"),Tu(TE,"curlyBraces"),Tu(AE,"curvedTrapezoid");var EE=Tu((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"),PE=Tu((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"),ME=Tu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function IE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),r=PE(0,0,s,u,l,c),n=ME(0,c,s,u,l,c),o=e.path(r,zC(t,{})),a=e.path(n,zC(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=EE(0,0,s,u,l,c);h=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",BS(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),OA(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=hE.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 BE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),g=zC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=[{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(f.map(e=>[e.x,e.y]),g),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))})`),OA(t,y),t.intersect=function(e){return hE.rect(t,e)},i}async function LE(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=OC(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:l}=await NA(e,t,zA(t)),c=s.width/2+l+5,u=s.width/2+l;let h;const{cssStyles:d}=t;if("handDrawn"===t.look){const e=jA(a),i=zC(t,{roughness:.2,strokeWidth:2.5}),o=zC(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",BS(t.cssClasses)).attr("style",BS(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 OA(t,h),t.intersect=function(e){return Pu.info("DoubleCircle intersect",t,c,e),hE.circle(t,c,e)},a}function jE(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=OC(t);t.label="",t.labelStyle=n;const o=e.insert("g").attr("class",zA(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=jA(o),{nodeBorder:l}=r,c=zC(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),OA(t,h),t.intersect=function(e){Pu.info("filledCircle intersect",t,{radius:7,point:e});return hE.circle(t,7,e)},o}async function NE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=FA(u),f=d.path(g,p),m=i.insert(()=>f,":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,OA(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 Pu.info("Triangle intersect",t,u,e),hE.polygon(t,u,e)},i}function DE(e,t,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:o}=OC(t);t.label="";const a=e.insert("g").attr("class",zA(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=jA(a),p=zC(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(u,h,l,c,p),f=a.insert(()=>g,":first-child");s&&"handDrawn"!==t.look&&f.selectAll("path").attr("style",s),o&&"handDrawn"!==t.look&&f.selectAll("path").attr("style",o),OA(t,f);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 hE.rect(t,e)},a}async function OE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),h=zC(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},...$A(-a/2+l,0,l,50,90,270),{x:a/2-l,y:s/2},{x:-a/2,y:s/2}],p=FA(d),g=u.path(p,h),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),OA(t,f),t.intersect=function(e){Pu.info("Pill intersect",t,{radius:l,point:e});return hE.polygon(t,d,e)},i}async function zE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(t)),a=o.height+(t.padding??0),s=o.width+2.5*(t.padding??0),{cssStyles:l}=t,c=jA(i),u=zC(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,g=[{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}],f=FA(g),m=c.path(f,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,OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function FE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.label="",t.labelStyle=r;const{shapeSvg:i}=await NA(e,t,zA(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=jA(i),c=zC(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=FA(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})`),OA(t,p),t.intersect=function(e){Pu.info("Pill intersect",t,{points:u});return hE.polygon(t,u,e)},i}async function RE(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),d="t"===t.pos,p=s,g=s,{nodeBorder:f}=r,{stylesMap:m}=jC(t),y=-g/2,b=-p/2,v=t.label?8:0,x=jA(c),C=zC(t,{stroke:"none",fill:"none"});"handDrawn"!==t.look&&(C.roughness=0,C.fillStyle="solid");const w=x.rectangle(y,b,g,p,C),k=Math.max(g,u.width),S=p+u.height+v,_=x.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 yT(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+v/2-i/2-a:-u.height/2-v/2-i/2-a})`),e.attr("style",`color: ${m.get("stroke")??f};`)}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+v/2:-u.height/2-v/2})`),OA(t,A),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.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+v},{x:r+g/2,y:n-i/2+u.height+v},{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+v},{x:r-u.width/2,y:n-i/2+u.height+v}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/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-g/2,y:n-i/2+p}];return hE.polygon(t,o,e)},c}async function $E(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),d=t.label?8:0,p="t"===t.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:m}=jC(t),y=jA(c),b=zC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=m.get("fill");b.stroke=v??f;const x=c.append("g");t.icon&&x.html(`<g>${await yT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=x.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,b),E=Math.max(T,u.width),P=T+u.height+d,M=y.rectangle(-E/2,-P/2,E,P,{...b,fill:"transparent",stroke:"none"}),I=c.insert(()=>A,":first-child"),B=c.insert(()=>M);return x.attr("transform",`translate(${-w/2-S},${p?u.height/2+d/2-k/2-_:-u.height/2-d/2-k/2-_})`),x.attr("style",`color: ${m.get("stroke")??g};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-P/2:P/2-u.height})`),I.attr("transform",`translate(0,${p?u.height/2+d/2:-u.height/2-d/2})`),OA(t,B),t.intersect=function(e){Pu.info("iconSquare intersect",t,e);return hE.rect(t,e)},c}async function VE(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),p="t"===t.pos,g=s+2*h,f=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:b}=jC(t),v=-f/2,x=-g/2,C=t.label?8:0,w=jA(c),k=zC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=b.get("fill");k.stroke=S??y;const _=w.path(UA(v,x,f,g,5),k),T=Math.max(f,u.width),A=g+u.height+C,E=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),P=c.insert(()=>_,":first-child").attr("class","icon-shape2"),M=c.insert(()=>E);if(t.icon){const e=c.append("g");e.html(`<g>${await yT(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: ${b.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),P.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),OA(t,M),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.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+f/2,y:n-i/2+u.height+C},{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+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+u.width/2,y:n-i/2+g},{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+g},{x:r-f/2,y:n-i/2+g}];return hE.polygon(t,o,e)},c}async function WE(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),p="t"===t.pos,g=s+2*h,f=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:b}=jC(t),v=-f/2,x=-g/2,C=t.label?8:0,w=jA(c),k=zC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=b.get("fill");k.stroke=S??y;const _=w.path(UA(v,x,f,g,.1),k),T=Math.max(f,u.width),A=g+u.height+C,E=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),P=c.insert(()=>_,":first-child"),M=c.insert(()=>E);if(t.icon){const e=c.append("g");e.html(`<g>${await yT(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: ${b.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),P.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),OA(t,M),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.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+f/2,y:n-i/2+u.height+C},{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+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+u.width/2,y:n-i/2+g},{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+g},{x:r-f/2,y:n-i/2+g}];return hE.polygon(t,o,e)},c}async function qE(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}=OC(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 NA(e,t,"image-shape default"),g="t"===t.pos,f=-c/2,m=-u/2,y=t.label?8:0,b=jA(h),v=zC(t,{});"handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid");const x=b.rectangle(f,m,c,u,v),C=Math.max(c,d.width),w=u+d.height+y,k=b.rectangle(-C/2,-w/2,C,w,{...v,fill:"none",stroke:"none"}),S=h.insert(()=>x,":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},${g?w/2-u:-w/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-u/2-d.height/2-y/2:u/2-d.height/2+y/2})`),S.attr("transform",`translate(0,${g?d.height/2+y/2:-d.height/2-y/2})`),OA(t,_),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=g?[{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 hE.polygon(t,o,e)},h}async function HE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}async function UE(e,t,r){const{labelStyles:n,nodeStyles:i}=OC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a}=await NA(e,t,zA(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:g}=t;if((null==r?void 0:r.rx)&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===t.look){const e=jA(o),r=zC(t,{}),n=d||p?e.path(UA(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",BS(g))}else h=o.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",BS(d)).attr("ry",BS(p)).attr("x",c).attr("y",u).attr("width",s).attr("height",l);return OA(t,h),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return hE.rect(t,e)},o}async function GE(e,t){const{shapeSvg:r,bbox:n,label:i}=await NA(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))})`),OA(t,o),t.intersect=function(e){return hE.rect(t,e)},r}async function XE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}async function JE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}function YE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.label="",t.labelStyle=r;const i=e.insert("g").attr("class",zA(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=jA(i),u=zC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");const h=FA(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})`),OA(t,p),t.intersect=function(e){Pu.info("lightningBolt intersect",t,e);return hE.polygon(t,l,e)},i}Tu(IE,"cylinder"),Tu(BE,"dividedRectangle"),Tu(LE,"doublecircle"),Tu(jE,"filledCircle"),Tu(NE,"flippedTriangle"),Tu(DE,"forkJoin"),Tu(OE,"halfRoundedRectangle"),Tu(zE,"hexagon"),Tu(FE,"hourglass"),Tu(RE,"icon"),Tu($E,"iconCircle"),Tu(VE,"iconRounded"),Tu(WE,"iconSquare"),Tu(qE,"imageSquare"),Tu(HE,"inv_trapezoid"),Tu(UE,"drawRect"),Tu(GE,"labelRect"),Tu(XE,"lean_left"),Tu(JE,"lean_right"),Tu(YE,"lightningBolt");var ZE=Tu((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"),KE=Tu((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"),QE=Tu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function eP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),r=KE(0,0,s,u,l,c,h),n=QE(0,c,s,u,l,c),o=zC(t,{}),a=e.path(r,o),g=e.path(n,o);i.insert(()=>g,":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=ZE(0,0,s,u,l,c,h);d=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",BS(p)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),OA(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=hE.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 tP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:u/2},...RA(-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}],f=d.polygon(g.map(e=>[e.x,e.y]),p),m=i.insert(()=>f,":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))})`),OA(t,m),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function rP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{}),g=[{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}],f=[{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=FA(g),y=d.path(m,p),b=FA(f),v=d.path(b,{...p,fill:"none"}),x=i.insert(()=>v,":first-child");return x.insert(()=>y,":first-child"),x.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.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))})`),OA(t,x),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function nP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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,g=RA(h-5,d+u+5,h+s-5,d+u+5,c,.8),f=null==g?void 0:g[g.length-1],m=[{x:h-5,y:d+5},{x:h-5,y:d+u+5},...g,{x:h+s-5,y:f.y-5},{x:h+s,y:f.y-5},{x:h+s,y:f.y-10},{x:h+s+5,y:f.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:f.y-5},{x:h+s,y:f.y-5},{x:h+s,y:d},{x:h,y:d}],b=jA(i),v=zC(t,{});"handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid");const x=FA(m),C=b.path(x,v),w=FA(y),k=b.path(w,v),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))})`),OA(t,S),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function iP(e,t,{config:{themeVariables:r}}){var n;const{labelStyles:i,nodeStyles:o}=OC(t);t.labelStyle=i;t.useHtmlLabels||!1!==(null==(n=Ud().flowchart)?void 0:n.htmlLabels)||(t.centerLabel=!0);const{shapeSvg:a,bbox:s,label:l}=await NA(e,t,zA(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,g=jA(a),f=zC(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=g.rectangle(h,d,c,u,f),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))})`),OA(t,y),t.intersect=function(e){return hE.rect(t,e)},a}Tu(eP,"linedCylinder"),Tu(tP,"linedWaveEdgedRect"),Tu(rP,"multiRect"),Tu(nP,"multiWaveEdgedRectangle"),Tu(iP,"note");var oP=Tu((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 aP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=oP(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=fE(i,a,a,s),l.attr("transform",`translate(${-a/2+.5}, ${a/2})`);return n&&l.attr("style",n),OA(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=hE.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 sP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=FA(u),f=d.path(g,p),m=i.insert(()=>f,":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))})`),OA(t,m),t.intersect=function(e){return hE.polygon(t,u,e)},i}async function lP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=OC(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 HA(h,t.labelStyle,!0,!0));let p={width:0,height:0};if(gp(null==(n=null==(r=Yp())?void 0:r.flowchart)?void 0:n.htmlLabels)){const e=d.children[0],t=Sf(d);p=e.getBoundingClientRect(),t.attr("width",p.width),t.attr("height",p.height)}Pu.info("Text 2",u);const g=u||[],f=d.getBBox(),m=c.node().appendChild(await HA(g.join?g.join("<br/>"):g,t.labelStyle,!0,!0)),y=m.children[0],b=Sf(m);p=y.getBoundingClientRect(),b.attr("width",p.width),b.attr("height",p.height);const v=(t.padding||0)/2;Sf(m).attr("transform","translate( "+(p.width>f.width?0:(f.width-p.width)/2)+", "+(f.height+v+5)+")"),Sf(d).attr("transform","translate( "+(p.width<f.width?0:-(f.width-p.width)/2)+", 0)"),p=c.node().getBBox(),c.attr("transform","translate("+-p.width/2+", "+(-p.height/2-v+3)+")");const x=p.width+(t.padding||0),C=p.height+(t.padding||0),w=-p.width/2-v,k=-p.height/2-v;let S,_;if("handDrawn"===t.look){const e=jA(s),r=zC(t,{}),n=e.path(UA(w,k,x,C,t.rx||0),r),i=e.line(-p.width/2-v,-p.height/2-v+f.height+v,p.width/2+v,-p.height/2-v+f.height+v,r);_=s.insert(()=>(Pu.debug("Rough node insert CXC",n),i),":first-child"),S=s.insert(()=>(Pu.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-v).attr("y",-p.height/2-v).attr("width",p.width+(t.padding||0)).attr("height",p.height+(t.padding||0)),_.attr("class","divider").attr("x1",-p.width/2-v).attr("x2",p.width/2+v).attr("y1",-p.height/2-v+f.height+v).attr("y2",-p.height/2-v+f.height+v);return OA(t,S),t.intersect=function(e){return hE.rect(t,e)},s}function cP(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),g=s+p*o*Math.sin(c)*(a?-1:1),f=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-f)/o,(e-g)/i);let y=Math.atan2((n-f)/o,(r-g)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const b=[];for(let v=0;v<20;v++){const e=m+v/19*y,t=g+i*Math.cos(e),r=f+o*Math.sin(e);b.push({x:t,y:r})}return b}async function uP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),g=zC(t,{});t.stroke&&(g.stroke=t.stroke),"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...cP(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},...cP(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},...cP(-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},...cP(-l/2,-c/2+h,-l/2+h,-c/2,u,u,!0)],m=FA(f),y=p.path(m,g),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),d&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",n),OA(t,b),t.intersect=function(e){return hE.polygon(t,f,e)},i}async function hP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),g=zC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=[{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(f.map(e=>[e.x,e.y]),g),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container").attr("style",BS(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))})`),OA(t,y),t.intersect=function(e){return hE.rect(t,e)},i}async function dP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:u},{x:c,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-l/2}],f=FA(g),m=d.path(f,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))})`),OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function pP(e,t){return UE(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 gP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(t)),a=o.height+t.padding,s=o.width+a/4+t.padding,l=a/2,{cssStyles:c}=t,u=jA(i),h=zC(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},...$A(-s/2+l,0,l,50,90,270),{x:s/2-l,y:a/2},...$A(s/2-l,0,l,50,270,450)],p=FA(d),g=u.path(p,h),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),OA(t,f),t.intersect=function(e){return hE.polygon(t,d,e)},i}async function fP(e,t){return UE(e,t,{rx:5,ry:5})}function mP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=OC(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=jA(c),h=zC(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,g=u.circle(0,0,5,{...h,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=c.insert(()=>d,":first-child");return f.insert(()=>g),o&&f.selectAll("path").attr("style",o),i&&f.selectAll("path").attr("style",i),OA(t,f),t.intersect=function(e){return hE.circle(t,7,e)},c}function yP(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=jA(i).circle(0,0,14,LC(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 OA(t,o),t.intersect=function(e){return hE.circle(t,7,e)},i}async function bP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(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",BS(d)),OA(t,h)}else{const e=fE(i,s,l,h);n&&e.attr("style",n),OA(t,e)}return t.intersect=function(e){return hE.polygon(t,h,e)},i}async function vP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),g=zC(t,{}),f=[{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&&(g.roughness=0,g.fillStyle="solid");const y=FA(f),b=p.path(y,g),v=FA(m),x=p.path(v,{...g,fillStyle:"solid"}),C=i.insert(()=>x,":first-child");return C.insert(()=>b,":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),OA(t,C),t.intersect=function(e){return hE.polygon(t,f,e)},i}async function xP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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,g=jA(i),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-s/2-s/2*.1,y:d/2},...RA(-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,b=-d/2-.4*h,v=[{x:y+s-u,y:1.4*(b+l)},{x:y+s,y:b+l-h},{x:y+s,y:.9*(b+l)},...RA(y+s,1.3*(b+l),y+s-u,1.5*(b+l),.03*-l,.5)],x=FA(m),C=g.path(x,f),w=FA(v),k=g.path(w,{...f,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))})`),OA(t,S),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function CP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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),OA(t,u),t.intersect=function(e){return hE.rect(t,e)},i}Tu(aP,"question"),Tu(sP,"rect_left_inv_arrow"),Tu(lP,"rectWithTitle"),Tu(cP,"generateArcPoints"),Tu(uP,"roundedRect"),Tu(hP,"shadedProcess"),Tu(dP,"slopedRect"),Tu(pP,"squareRect"),Tu(gP,"stadium"),Tu(fP,"state"),Tu(mP,"stateEnd"),Tu(yP,"stateStart"),Tu(bP,"subroutine"),Tu(vP,"taggedRect"),Tu(xP,"taggedWaveEdgedRectangle"),Tu(CP,"text");var wP=Tu((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"),kP=Tu((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"),SP=Tu((e,t,r,n,i,o)=>[`M${e+r/2},${-n/2}`,`a${i},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function _P(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a,halfPadding:s}=await NA(e,t,zA(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 g;if("handDrawn"===t.look){const e=jA(i),r=kP(0,0,d,c,h,u),n=SP(0,0,d,c,h,u),o=e.path(r,zC(t,{})),a=e.path(n,zC(t,{fill:"none"}));g=i.insert(()=>a,":first-child"),g=i.insert(()=>o,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const e=wP(0,0,d,c,h,u);g=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",BS(p)).attr("style",n),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",h),g.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))})`),OA(t,g),t.intersect=function(e){const r=hE.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 TP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}async function AP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),u=zC(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=FA(h),p=c.path(d,u),g=i.insert(()=>p,":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",l),n&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",n),OA(t,g),t.intersect=function(e){return hE.polygon(t,h,e)},i}async function EP(e,t){var r;const{labelStyles:n,nodeStyles:i}=OC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,label:s}=await NA(e,t,zA(t)),l=gp(null==(r=Yp().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,g=jA(o),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=FA(d),y=g.path(m,f),b=o.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return p&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",p),i&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",i),t.width=c,t.height=u,OA(t,b),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 Pu.info("Triangle intersect",t,d,e),hE.polygon(t,d,e)},o}async function PP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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,g=jA(i),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-s/2-p,y:u/2},...RA(-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=FA(m),b=g.path(y,f),v=i.insert(()=>b,":first-child");return 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),v.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))})`),OA(t,v),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function MP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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,g=jA(i),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:d/2},...RA(-c/2,d/2,c/2,d/2,h,1),{x:c/2,y:-d/2},...RA(c/2,-d/2,-c/2,-d/2,h,-1)],y=FA(m),b=g.path(y,f),v=i.insert(()=>b,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),OA(t,v),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function IP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{}),g=[{x:c-5,y:u-5},{x:c-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-5}],f=`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(f,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))})`),OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function BP(e,t){var r,n,i,o;const a=t;if(a.alias&&(t.label=a.alias),"handDrawn"===t.look){const{themeVariables:r}=Ud(),{background:n}=r,i={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await BP(e,i)}const s=Ud();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}=OC(t);if(0===a.attributes.length&&t.label){const r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l};vS(t.label,s)+2*r.labelPaddingX<s.er.minEntityWidth&&(t.width=s.er.minEntityWidth);const n=await UE(e,t,r);if(!gp(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=zA(t);p||(p="node default");const g=e.insert("g").attr("class",p).attr("id",t.domId||t.id),f=await LP(g,t.label??"",s,0,0,["name"],h);f.height+=c;let m=0;const y=[],b=[];let v=0,x=0,C=0,w=0,k=!0,S=!0;for(const V of a.attributes){const e=await LP(g,V.type,s,0,m,["attribute-type"],h);v=Math.max(v,e.width+l);const t=await LP(g,V.name,s,0,m,["attribute-name"],h);x=Math.max(x,t.width+l);const r=await LP(g,V.keys.join(),s,0,m,["attribute-keys"],h);C=Math.max(C,r.width+l);const n=await LP(g,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;b.push({yOffset:m,rowHeight:i}),m+=i}let _=4;C<=l&&(k=!1,C=0,_--),w<=l&&(S=!1,w=0,_--);const T=g.node().getBBox();if(f.width+2*l-(v+x+C+w)>0){const e=f.width+2*l-(v+x+C+w);v+=e/_,x+=e/_,C>0&&(C+=e/_),w>0&&(w+=e/_)}const A=v+x+C+w,E=jA(g),P=zC(t,{});"handDrawn"!==t.look&&(P.roughness=0,P.fillStyle="solid");let M=0;b.length>0&&(M=b.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)+f.height,(null==t?void 0:t.height)||0),L=-I/2,j=-B/2;g.selectAll("g:not(:first-child)").each((e,t,r)=>{const n=Sf(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+=v:n.attr("class").includes("attribute-keys")?o+=v+x:n.attr("class").includes("attribute-comment")&&(o+=v+x+C))}n.attr("transform",`translate(${L+l/2+o}, ${a+j+f.height+c/2})`)}),g.select(".name").attr("transform","translate("+-f.width/2+", "+(j+c/2)+")");const N=E.rectangle(L,j,I,B,P),D=g.insert(()=>N,":first-child").attr("style",u.join("")),{themeVariables:O}=Ud(),{rowEven:z,rowOdd:F,nodeBorder:R}=O;y.push(0);for(const[V,W]of b.entries()){const e=(V+1)%2==0&&0!==W.yOffset,t=E.rectangle(L,f.height+j+(null==W?void 0:W.yOffset),I,null==W?void 0:W.rowHeight,{...P,fill:e?z:F,stroke:R});g.insert(()=>t,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let $=E.line(L,f.height+j,I+L,f.height+j,P);g.insert(()=>$).attr("class","divider"),$=E.line(v+L,f.height+j,v+L,B+j,P),g.insert(()=>$).attr("class","divider"),k&&($=E.line(v+x+L,f.height+j,v+x+L,B+j,P),g.insert(()=>$).attr("class","divider")),S&&($=E.line(v+x+C+L,f.height+j,v+x+C+L,B+j,P),g.insert(()=>$).attr("class","divider"));for(const V of y)$=E.line(L,f.height+j+V,I+L,f.height+j+V,P),g.insert(()=>$).attr("class","divider");if(OA(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("; ");g.selectAll("path").attr("style",t??""),g.selectAll(".row-rect-even path").attr("style",d)}return t.intersect=function(e){return hE.rect(t,e)},g}async function LP(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!==yp(t)&&(t=(t=yp(t)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await jT(s,t,{width:vS(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let e=l.children[0];for(e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(gp(r.htmlLabels)){const e=l.children[0];e.style.textAlign="start";const t=Sf(l);c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return c}async function jP(e,t,r,n,i=r.class.padding??12){const o=n?0:3,a=e.insert("g").attr("class",zA(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 NP(s,{text:`«${e}»`},0);h=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await NP(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=a.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){f+=await NP(c,b,f,[b.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 b of t.methods){m+=await NP(u,b,m,[b.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(${-g.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 NP(e,t,r,n=[]){const i=e.insert("g").attr("class","label").attr("style",n.join("; ")),o=Ud();let a="useHtmlLabels"in t?t.useHtmlLabels:gp(o.htmlLabels)??!0,s="";s="text"in t?t.text:t.label,!a&&s.startsWith("\\")&&(s=s.substring(1)),kp(s)&&(a=!0);const l=await jT(i,Qp(MS(s)),{width:vS(s,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,u=1;if(a){const e=l.children[0],t=Sf(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)}Tu(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")&&Sf(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const e=l.children[0];if(""===l.textContent||l.textContent.includes("&gt")){e.textContent=s[0]+s.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").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 DP(e,t){var r,n;const i=Yp(),o=i.class.padding??12,a=o,s=t.useHtmlLabels??gp(i.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:u}=await jP(e,t,i,s,a),{labelStyles:h,nodeStyles:d}=OC(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 g=0===l.members.length&&0===l.methods.length&&!(null==(n=i.class)?void 0:n.hideEmptyMembersBox),f=jA(c),m=zC(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");const y=u.width;let b=u.height;0===l.members.length&&0===l.methods.length?b+=a:l.members.length>0&&0===l.methods.length&&(b+=2*a);const v=-y/2,x=-b/2,C=f.rectangle(v-o,x-o-(g?o:0===l.members.length&&0===l.methods.length?-o/2:0),y+2*o,b+2*o+(g?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=Sf(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+x+o-(g?o:0===l.members.length&&0===l.methods.length?-o/2:0);s||(h-=4);let d=v;(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-(g?o/2:0)||0,_=c.select(".label-group").node().getBBox().height-(g?o/2:0)||0,T=c.select(".members-group").node().getBBox().height-(g?o/2:0)||0;if(l.members.length>0||l.methods.length>0||g){const e=f.line(k.x,S+_+x+o,k.x+k.width,S+_+x+o,m);c.insert(()=>e).attr("class","divider").attr("style",p)}if(g||l.members.length>0||l.methods.length>0){const e=f.line(k.x,S+_+T+x+2*a+o,k.x+k.width,S+_+T+x+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 OA(t,w),t.intersect=function(e){return hE.rect(t,e)},c}async function OP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=OC(t);t.labelStyle=i;const a=t,s=t,l="verifyMethod"in t,c=zA(t),u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let h;h=l?await zP(u,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):await zP(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=h;const p=await zP(u,a.name,d,t.labelStyle+"; font-weight: bold;");if(d+=p+20,l){d+=await zP(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),d,t.labelStyle);d+=await zP(u,""+(a.text?`Text: ${a.text}`:""),d,t.labelStyle);d+=await zP(u,""+(a.risk?`Risk: ${a.risk}`:""),d,t.labelStyle),await zP(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),d,t.labelStyle)}else{d+=await zP(u,""+(s.type?`Type: ${s.type}`:""),d,t.labelStyle),await zP(u,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),d,t.labelStyle)}const g=((null==(r=u.node())?void 0:r.getBBox().width)??200)+20,f=((null==(n=u.node())?void 0:n.getBBox().height)??200)+20,m=-g/2,y=-f/2,b=jA(u),v=zC(t,{});"handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid");const x=b.rectangle(m,y,g,f,v),C=u.insert(()=>x,":first-child");if(C.attr("class","basic label-container").attr("style",o),u.selectAll(".label").each((e,t,r)=>{const n=Sf(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-f/2;let l=m+10;0!==t&&1!==t||(l=o),n.attr("transform",`translate(${l}, ${s+20})`)}),d>h+p+20){const e=b.line(m,y+h+p+20,m+g,y+h+p+20,v);u.insert(()=>e).attr("style",o)}return OA(t,C),t.intersect=function(e){return hE.rect(t,e)},u}async function zP(e,t,r,n=""){if(""===t)return 0;const i=e.insert("g").attr("class","label").attr("style",n),o=Yp(),a=o.htmlLabels??!0,s=await jT(i,Qp(MS(t)),{width:vS(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:n},o);let l;if(a){const e=s.children[0],t=Sf(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("&gt;",">").replaceAll("&lt;","<"),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}Tu(_P,"tiltedCylinder"),Tu(TP,"trapezoid"),Tu(AP,"trapezoidalPentagon"),Tu(EP,"triangle"),Tu(PP,"waveEdgedRectangle"),Tu(MP,"waveRectangle"),Tu(IP,"windowPane"),Tu(BP,"erBox"),Tu(LP,"addText"),Tu(jP,"textHelper"),Tu(NP,"addText"),Tu(DP,"classBox"),Tu(OP,"requirementBox"),Tu(zP,"addText");var FP=Tu(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 RP(e,t,{config:r}){var n,i;const{labelStyles:o,nodeStyles:a}=OC(t);t.labelStyle=o||"";const s=t.width;t.width=(t.width??200)-10;const{shapeSvg:l,bbox:c,label:u}=await NA(e,t,zA(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 g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let f,m;({label:f,bbox:m}=d?await DA(d,"ticket"in t&&t.ticket||"",g):await DA(l,"ticket"in t&&t.ticket||"",g));const{label:y,bbox:b}=await DA(l,"assigned"in t&&t.assigned||"",g);t.width=s;const v=(null==t?void 0:t.width)||0,x=Math.max(m.height,b.height)/2,C=Math.max(c.height+20,(null==t?void 0:t.height)||0)+x,w=-v/2,k=-C/2;let S;u.attr("transform","translate("+(h-v/2)+", "+(-x-c.height/2)+")"),f.attr("transform","translate("+(h-v/2)+", "+(-x+c.height/2)+")"),y.attr("transform","translate("+(h+v/2-b.width-20)+", "+(-x+c.height/2)+")");const{rx:_,ry:T}=t,{cssStyles:A}=t;if("handDrawn"===t.look){const e=jA(l),r=zC(t,{}),n=_||T?e.path(UA(w,k,v,C,_||0),r):e.rectangle(w,k,v,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",v).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",FP(e))}}return OA(t,S),t.height=C,t.intersect=function(e){return hE.rect(t,e)},l}async function $P(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await NA(e,t,zA(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,g=Math.max(l,d),f=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*g},${-1*f*.1}\n a${u},${u} 1 0,0 ${.25*g},0\n a${u},${u} 1 0,0 ${.25*g},0\n a${u},${u} 1 0,0 ${.25*g},${.1*f}\n\n a${u},${u} 1 0,0 ${.15*g},${.33*f}\n a${.8*u},${.8*u} 1 0,0 0,${.34*f}\n a${u},${u} 1 0,0 ${-1*g*.15},${.33*f}\n\n a${u},${u} 1 0,0 ${-1*g*.25},${.15*f}\n a${u},${u} 1 0,0 ${-1*g*.25},0\n a${u},${u} 1 0,0 ${-1*g*.25},0\n a${u},${u} 1 0,0 ${-1*g*.25},${-1*f*.15}\n\n a${u},${u} 1 0,0 ${-1*g*.1},${-1*f*.33}\n a${.8*u},${.8*u} 1 0,0 0,${-1*f*.34}\n a${u},${u} 1 0,0 ${.1*g},${-1*f*.33}\n H0 V0 Z`;if("handDrawn"===t.look){const e=jA(i),r=zC(t,{}),n=e.path(y,r);m=i.insert(()=>n,":first-child"),m.attr("class","basic label-container").attr("style",BS(h))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return m.attr("transform",`translate(${-g/2}, ${-f/2})`),OA(t,m),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return Pu.info("Bang intersect",t,e),hE.rect(t,e)},i}async function VP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await NA(e,t,zA(t)),l=o.width+2*a,c=o.height+2*a,u=.15*l,h=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=t;let f;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=jA(i),r=zC(t,{}),n=e.path(m,r);f=i.insert(()=>n,":first-child"),f.attr("class","basic label-container").attr("style",BS(g))}else f=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})`),f.attr("transform",`translate(${-l/2}, ${-c/2})`),OA(t,f),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return Pu.info("Cloud intersect",t,e),hE.rect(t,e)},i}async function WP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await NA(e,t,zA(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()),OA(t,h),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return hE.rect(t,e)},i}async function qP(e,t){return bE(e,t,{padding:t.padding??0})}Tu(RP,"kanbanItem"),Tu($P,"bang"),Tu(VP,"cloud"),Tu(WP,"defaultMindmapNode"),Tu(qP,"mindmapCircle");var HP=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:pP},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:uP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:gP},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:bP},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:IE},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:bE},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:$P},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:VP},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:aP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:zE},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:JE},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:XE},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:TP},{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:HE},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:LE},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:CP},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:mE},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:hP},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:yP},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:mP},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:DE},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:FE},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:wE},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:SE},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:TE},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:YE},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:PP},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:OE},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:_P},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:eP},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:AE},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:BE},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:EP},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:IP},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:jE},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:AP},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:NE},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:dP},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:nP},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:rP},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:gE},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:xE},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:xP},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:vP},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:MP},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:sP},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tP}],UP=Tu(()=>{const e={state:fP,choice:yE,note:iP,rectWithTitle:lP,labelRect:GE,iconSquare:WE,iconCircle:$E,icon:RE,iconRounded:VE,imageSquare:qE,anchor:dE,kanbanItem:RP,mindmapCircle:qP,defaultMindmapNode:WP,classBox:DP,erBox:BP,requirementBox:OP},t=[...Object.entries(e),...HP.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 GP(e){return e in UP}Tu(GP,"isValidShape");var XP=new Map;async function JP(e,t,r){let n,i;"rect"===t.shape&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?UP[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),XP.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}Tu(JP,"insertNode");var YP=Tu((e,t)=>{XP.set(t.id,e)},"setNodeElem"),ZP=Tu(()=>{XP.clear()},"clear"),KP=Tu(e=>{const t=XP.get(e.id);Pu.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"),QP=Tu((e,t,r,n,i,o)=>{t.arrowTypeStart&&tM(e,"start",t.arrowTypeStart,r,n,i,o),t.arrowTypeEnd&&tM(e,"end",t.arrowTypeEnd,r,n,i,o)},"addEdgeMarkers"),eM={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}},tM=Tu((e,t,r,n,i,o,a)=>{var s;const l=eM[r];if(!l)return void Pu.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"),rM=new Map,nM=new Map,iM=Tu(()=>{rM.clear(),nM.clear()},"clear"),oM=Tu(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),aM=Tu(async(e,t)=>{let r=gp(Yp().flowchart.htmlLabels);const{labelStyles:n}=OC(t);t.labelStyle=n;const i=await jT(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Pu.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=Sf(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+")"),rM.set(t.id,o),t.width=l.width,t.height=l.height,t.startLabelLeft){const r=await HA(t.startLabelLeft,oM(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+")"),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).startLeft=n,sM(s,t.startLabelLeft)}if(t.startLabelRight){const r=await HA(t.startLabelRight,oM(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+")"),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).startRight=n,sM(s,t.startLabelRight)}if(t.endLabelLeft){const r=await HA(t.endLabelLeft,oM(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),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).endLeft=n,sM(s,t.endLabelLeft)}if(t.endLabelRight){const r=await HA(t.endLabelRight,oM(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),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).endRight=n,sM(s,t.endLabelRight)}return i},"insertEdgeLabel");function sM(e,t){Yp().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}Tu(sM,"setTerminalWidth");var lM=Tu((e,t)=>{Pu.debug("Moving label abc88 ",e.id,e.label,rM.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=Yp(),{subGraphTitleTotalMargin:i}=BC(n);if(e.label){const n=rM.get(e.id);let o=e.x,a=e.y;if(r){const n=ES.calcLabelPosition(r);Pu.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=nM.get(e.id).startLeft;let n=e.x,i=e.y;if(r){const t=ES.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=nM.get(e.id).startRight;let n=e.x,i=e.y;if(r){const t=ES.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=nM.get(e.id).endLeft;let n=e.x,i=e.y;if(r){const t=ES.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=nM.get(e.id).endRight;let n=e.x,i=e.y;if(r){const t=ES.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),cM=Tu((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"),uM=Tu((e,t,r)=>{Pu.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),Pu.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 Pu.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"),hM=Tu((e,t)=>{Pu.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(e=>{if(Pu.info("abc88 checking point",e,t),cM(t,e)||i)Pu.warn("abc88 outside",e,n),n=e,i||r.push(e);else{const o=uM(t,n,e);Pu.debug("abc88 inside",e,n,o),Pu.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)?Pu.warn("abc88 no intersect",o,r):r.push(o),i=!0}}),Pu.debug("returning points",r),r},"cutPathAtIntersect");function dM(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}}Tu(dM,"extractCornerPoints");var pM=Tu(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"),gM=Tu(function(e){const{cornerPointPositions:t}=dM(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=pM(t,o,5),s=pM(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){Pu.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 Pu.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"),fM=Tu((e,t,r)=>{const n=e-t-r,i=Math.floor(n/4);return`0 ${t} ${Array(i).fill("2 2").join(" ")} ${r}`},"generateDashArray"),mM=Tu(function(e,t,r,n,i,o,a,s=!1){var l;const{handDrawnSeed:c}=Yp();let u=t.points,h=!1;const d=i;var p=o;const g=[];for(const M in t.cssCompiledStyles)DC(M)||g.push(t.cssCompiledStyles[M]);Pu.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])),Pu.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 f=btoa(JSON.stringify(u));t.toCluster&&(Pu.info("to cluster abc88",r.get(t.toCluster)),u=hM(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(Pu.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=hM(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=u.filter(e=>!Number.isNaN(e.y));m=gM(m);let y=Gy;switch(y=Oy,t.curve){case"linear":y=Oy;break;case"basis":default:y=Gy;break;case"cardinal":y=eb;break;case"bumpX":y=Vy;break;case"bumpY":y=Wy;break;case"catmullRom":y=sb;break;case"monotoneX":y=xb;break;case"monotoneY":y=Cb;break;case"natural":y=Sb;break;case"step":y=Tb;break;case"stepAfter":y=Eb;break;case"stepBefore":y=Ab}const{x:b,y:v}=IC(t),x=Ry().x(b).y(v).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?yM(vM(m,t),5):x(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=jA(e);Object.assign([],m);C+=" transition",w=Sf(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=g.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=EC[t.arrowTypeStart]||0,u=EC[t.arrowTypeEnd]||0;if("neo"===t.look&&!T){const e=`stroke-dasharray: ${"dotted"===t.pattern||"dashed"===t.pattern?fM(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",f),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="";(Yp().flowchart.arrowMarkerAbsolute||Yp().state.arrowMarkerAbsolute)&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Pu.info("arrowTypeStart",t.arrowTypeStart),Pu.info("arrowTypeEnd",t.arrowTypeEnd),QP(w,t,A,a,n,_);const E=u[Math.floor(u.length/2)];ES.isLabelCoordinateInPath(E,w.attr("d"))||(h=!0);let P={};return h&&(P.updatedPath=u),P.originalPath=t.points,P},"insertEdge");function yM(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,g=o/h,f=c/h,m=d*g+p*f,y=Math.max(-1,Math.min(1,m)),b=Math.acos(y);if(b<i||Math.abs(Math.PI-b)<i){r+=`L${a.x},${a.y}`;continue}const v=Math.min(t/Math.sin(b/2),u/2,h/2),x=a.x-d*v,C=a.y-p*v,w=a.x+g*v,k=a.y+f*v;r+=`L${x},${C}`,r+=`Q${a.x},${a.y} ${w},${k}`}}return r}function bM(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 vM(e,t){const r=e.map(e=>({...e}));if(e.length>=2&&AC[t.arrowTypeStart]){const n=AC[t.arrowTypeStart],i=e[0],o=e[1],{angle:a}=bM(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&&AC[t.arrowTypeEnd]){const i=AC[t.arrowTypeEnd],o=e[n-1],a=e[n-2],{angle:s}=bM(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}Tu(yM,"generateRoundedPath"),Tu(bM,"calculateDeltaAndAngle"),Tu(vM,"applyMarkerOffsetsToPoints");var xM=Tu((e,t,r,n)=>{t.forEach(t=>{CM[t](e,r,n)})},"insertMarkers"),CM={extension:Tu((e,t,r)=>{Pu.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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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")},wM=xM,kM={common:Ap,getConfig:Ud,insertCluster:QA,insertEdge:mM,insertEdgeLabel:aM,insertMarkers:wM,insertNode:JP,interpolateToCurve:Qk,labelHelper:NA,log:Pu,positionEdgeLabel:lM},SM={},_M=Tu(e=>{for(const t of e)SM[t.name]=t},"registerLayoutLoaders");Tu(()=>{_M([{name:"dagre",loader:Tu(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-D6NU_G7J.cjs")),"loader")},{name:"cose-bilkent",loader:Tu(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-C6osVExR.cjs")),"loader")}])},"registerDefaultLayoutLoaders")();var TM=Tu(async(e,t)=>{if(!(e.layoutAlgorithm in SM))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=SM[e.layoutAlgorithm];return(await r.loader()).render(e,t,kM,{algorithm:r.algorithm})},"render"),AM=Tu((e="",{fallback:t="dagre"}={})=>{if(e in SM)return e;if(t in SM)return Pu.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"),EM="comm",PM="rule",MM="decl",IM=Math.abs,BM=String.fromCharCode;function LM(e){return e.trim()}function jM(e,t,r){return e.replace(t,r)}function NM(e,t,r){return e.indexOf(t,r)}function DM(e,t){return 0|e.charCodeAt(t)}function OM(e,t,r){return e.slice(t,r)}function zM(e){return e.length}function FM(e,t){return t.push(e),e}var RM=1,$M=1,VM=0,WM=0,qM=0,HM="";function UM(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:RM,column:$M,length:a,return:"",siblings:s}}function GM(){return qM=WM>0?DM(HM,--WM):0,$M--,10===qM&&($M=1,RM--),qM}function XM(){return qM=WM<VM?DM(HM,WM++):0,$M++,10===qM&&($M=1,RM++),qM}function JM(){return DM(HM,WM)}function YM(){return WM}function ZM(e,t){return OM(HM,e,t)}function KM(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 QM(e){return LM(ZM(WM-1,rI(91===e?e+2:40===e?e+1:e)))}function eI(e){for(;(qM=JM())&&qM<33;)XM();return KM(e)>2||KM(qM)>3?"":" "}function tI(e,t){for(;--t&&XM()&&!(qM<48||qM>102||qM>57&&qM<65||qM>70&&qM<97););return ZM(e,YM()+(t<6&&32==JM()&&32==XM()))}function rI(e){for(;XM();)switch(qM){case e:return WM;case 34:case 39:34!==e&&39!==e&&rI(qM);break;case 40:41===e&&rI(e);break;case 92:XM()}return WM}function nI(e,t){for(;XM()&&e+qM!==57&&(e+qM!==84||47!==JM()););return"/*"+ZM(t,WM-1)+"*"+BM(47===e?e:XM())}function iI(e){for(;!KM(JM());)XM();return ZM(e,WM)}function oI(e){return function(e){return HM="",e}(aI("",null,null,null,[""],e=function(e){return RM=$M=1,VM=zM(HM=e),WM=0,[]}(e),0,[0],e))}function aI(e,t,r,n,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,p=0,g=0,f=1,m=1,y=1,b=0,v="",x=i,C=o,w=n,k=v;m;)switch(g=b,b=XM()){case 40:if(108!=g&&58==DM(k,h-1)){-1!=NM(k+=jM(QM(b),"&","&\f"),"&\f",IM(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:k+=QM(b);break;case 9:case 10:case 13:case 32:k+=eI(g);break;case 92:k+=tI(YM()-1,7);continue;case 47:switch(JM()){case 42:case 47:FM(lI(nI(XM(),YM()),t,r,l),l),5!=KM(g||1)&&5!=KM(JM()||1)||!zM(k)||" "===OM(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*f:s[c++]=zM(k)*y;case 125*f:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==y&&(k=jM(k,/\f/g,"")),p>0&&(zM(k)-h||0===f&&47===g)&&FM(p>32?cI(k+";",n,r,h-1,l):cI(jM(k," ","")+";",n,r,h-2,l),l);break;case 59:k+=";";default:if(FM(w=sI(k,t,r,c,u,i,s,v,x=[],C=[],h,o),o),123===b)if(0===u)aI(k,t,w,w,x,o,h,s,C);else{switch(d){case 99:if(110===DM(k,3))break;case 108:if(97===DM(k,2))break;default:u=0;case 100:case 109:case 115:}u?aI(e,w,w,n&&FM(sI(e,w,w,0,0,i,s,v,i,x=[],h,C),C),i,C,h,s,n?x:C):aI(k,w,w,w,[""],C,0,s,C)}}c=u=p=0,f=y=1,v=k="",h=a;break;case 58:h=1+zM(k),p=g;default:if(f<1)if(123==b)--f;else if(125==b&&0==f++&&125==GM())continue;switch(k+=BM(b),b*f){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(zM(k)-1)*y,y=1;break;case 64:45===JM()&&(k+=QM(XM())),d=JM(),u=h=zM(v=k+=iI(YM())),b++;break;case 45:45===g&&2==zM(k)&&(f=0)}}return o}function sI(e,t,r,n,i,o,a,s,l,c,u,h){for(var d=i-1,p=0===i?o:[""],g=function(e){return e.length}(p),f=0,m=0,y=0;f<n;++f)for(var b=0,v=OM(e,d+1,d=IM(m=a[f])),x=e;b<g;++b)(x=LM(m>0?p[b]+" "+v:jM(v,/&\f/g,p[b])))&&(l[y++]=x);return UM(e,t,r,0===i?PM:s,l,c,u,h)}function lI(e,t,r,n){return UM(e,t,r,EM,BM(qM),OM(e,2,-2),0,n)}function cI(e,t,r,n,i){return UM(e,t,r,MM,OM(e,0,n),OM(e,n+1,-1),n,i)}function uI(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function hI(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case MM:return e.return=e.return||e.value;case EM:return"";case"@keyframes":return e.return=e.value+"{"+uI(e.children,n)+"}";case PM:if(!zM(e.value=e.props.join(",")))return""}return zM(r=uI(e.children,n))?e.return=e.value+"{"+r+"}":""}var dI=Uw(Object.keys,Object),pI=Object.prototype.hasOwnProperty;function gI(e){if(!Jw(e))return dI(e);var t=[];for(var r in Object(e))pI.call(e,r)&&"constructor"!=r&&t.push(r);return t}var fI=yw(XC,"DataView"),mI=yw(XC,"Promise"),yI=yw(XC,"Set"),bI=yw(XC,"WeakMap"),vI="[object Map]",xI="[object Promise]",CI="[object Set]",wI="[object WeakMap]",kI="[object DataView]",SI=cw(fI),_I=cw(Tw),TI=cw(mI),AI=cw(yI),EI=cw(bI);exports.getTag=rw,(fI&&exports.getTag(new fI(new ArrayBuffer(1)))!=kI||Tw&&exports.getTag(new Tw)!=vI||mI&&exports.getTag(mI.resolve())!=xI||yI&&exports.getTag(new yI)!=CI||bI&&exports.getTag(new bI)!=wI)&&(exports.getTag=function(e){var t=rw(e),r="[object Object]"==t?e.constructor:void 0,n=r?cw(r):"";if(n)switch(n){case SI:return kI;case _I:return vI;case TI:return xI;case AI:return CI;case EI:return wI}return t});var PI=Object.prototype.hasOwnProperty;function MI(e){if(null==e)return!0;if(ok(e)&&(nk(e)||"string"==typeof e||"function"==typeof e.splice||ck(e)||wk(e)||rk(e)))return!e.length;var t=exports.getTag(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Jw(e))return!gI(e).length;for(var r in e)if(PI.call(e,r))return!1;return!0}var II={id:"c4",detector:Tu(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-bFh-ym0I.cjs"));return{id:"c4",diagram:e}},"loader")},BI="flowchart",LI={id:BI,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-D9Ha29xd.cjs"));return{id:BI,diagram:e}},"loader")},jI="flowchart-v2",NI={id:jI,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-D9Ha29xd.cjs"));return{id:jI,diagram:e}},"loader")},DI={id:"er",detector:Tu(e=>/^\s*erDiagram/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-C0YzWGzs.cjs"));return{id:"er",diagram:e}},"loader")},OI="gitGraph",zI={id:OI,detector:Tu(e=>/^\s*gitGraph/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-V2S2FVAM-DgaiLSV0.cjs"));return{id:OI,diagram:e}},"loader")},FI="gantt",RI={id:FI,detector:Tu(e=>/^\s*gantt/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-BfA1s6s8.cjs"));return{id:FI,diagram:e}},"loader")},$I="info",VI={id:$I,detector:Tu(e=>/^\s*info/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-HS3SLOUP-CbvZczcy.cjs"));return{id:$I,diagram:e}},"loader")},WI={id:"pie",detector:Tu(e=>/^\s*pie/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-Cvyyoe7M.cjs"));return{id:"pie",diagram:e}},"loader")},qI="quadrantChart",HI={id:qI,detector:Tu(e=>/^\s*quadrantChart/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-CwDe4KwO.cjs"));return{id:qI,diagram:e}},"loader")},UI="xychart",GI={id:UI,detector:Tu(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-haWlXFUn.cjs"));return{id:UI,diagram:e}},"loader")},XI="requirement",JI={id:XI,detector:Tu(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-z39KmEdg.cjs"));return{id:XI,diagram:e}},"loader")},YI="sequence",ZI={id:YI,detector:Tu(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-ChX1PErX.cjs"));return{id:YI,diagram:e}},"loader")},KI="class",QI={id:KI,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-BPjkW57C.cjs"));return{id:KI,diagram:e}},"loader")},eB="classDiagram",tB={id:eB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-BPjkW57C.cjs"));return{id:eB,diagram:e}},"loader")},rB="state",nB={id:rB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-DNXrTtku.cjs"));return{id:rB,diagram:e}},"loader")},iB="stateDiagram",oB={id:iB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-BEegnVik.cjs"));return{id:iB,diagram:e}},"loader")},aB="journey",sB={id:aB,detector:Tu(e=>/^\s*journey/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-CEFFFkKd.cjs"));return{id:aB,diagram:e}},"loader")},lB={draw:Tu((e,t,r)=>{Pu.debug("rendering svg for syntax error\n");const n=Mb(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Mp(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")},cB=lB,uB={db:{},renderer:lB,parser:{parse:Tu(()=>{},"parse")}},hB="flowchart-elk",dB={id:hB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-D9Ha29xd.cjs"));return{id:hB,diagram:e}},"loader")},pB="timeline",gB={id:pB,detector:Tu(e=>/^\s*timeline/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-Do30fWDV.cjs"));return{id:pB,diagram:e}},"loader")},fB="mindmap",mB={id:fB,detector:Tu(e=>/^\s*mindmap/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-FjKtYkWd.cjs"));return{id:fB,diagram:e}},"loader")},yB="kanban",bB={id:yB,detector:Tu(e=>/^\s*kanban/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-DCwMWi3p.cjs"));return{id:yB,diagram:e}},"loader")},vB="sankey",xB={id:vB,detector:Tu(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-B9TuJmd0.cjs"));return{id:vB,diagram:e}},"loader")},CB="packet",wB={id:CB,detector:Tu(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-5Lk7Jvxw.cjs"));return{id:CB,diagram:e}},"loader")},kB="radar",SB={id:kB,detector:Tu(e=>/^\s*radar-beta/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-Bokx4-2m.cjs"));return{id:kB,diagram:e}},"loader")},_B="block",TB={id:_B,detector:Tu(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-3JpJsqTW.cjs"));return{id:_B,diagram:e}},"loader")},AB="architecture",EB={id:AB,detector:Tu(e=>/^\s*architecture/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-idhniCOT.cjs"));return{id:AB,diagram:e}},"loader")},PB="treemap",MB={id:PB,detector:Tu(e=>/^\s*treemap/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-BpcNw66L.cjs"));return{id:PB,diagram:e}},"loader")},IB=!1,BB=Tu(()=>{IB||(IB=!0,ng("error",uB,e=>"error"===e.toLowerCase().trim()),ng("---",{db:{clear:Tu(()=>{},"clear")},styles:{},renderer:{draw:Tu(()=>{},"draw")},parser:{parse:Tu(()=>{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:Tu(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),hd(dB,mB,EB),hd(II,bB,tB,QI,DI,RI,VI,WI,JI,ZI,NI,LI,gB,zI,oB,nB,sB,HI,xB,wB,GI,TB,SB,MB))},"addDiagrams"),LB=Tu(async()=>{Pu.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(cd).map(async([e,{detector:t,loader:r}])=>{if(r)try{ig(e)}catch{try{const{diagram:e,id:n}=await r();ng(n,e,t)}catch(n){throw Pu.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete cd[e],n}}}))).filter(e=>"rejected"===e.status);if(e.length>0){Pu.error(`Failed to load ${e.length} external diagrams`);for(const t of e)Pu.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function jB(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function NB(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)}}}Tu(jB,"setA11yDiagramInfo"),Tu(NB,"addSVGa11yTitleDescription");var DB=(Tu(f=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=Ud(),o=ud(e,i);e=PS(e)+"\n";try{ig(o)}catch{const e=pd(o);if(!e)throw new ld(`Diagram ${o} not found.`);const{id:t,diagram:r}=await e();ng(t,r)}const{db:a,parser:s,renderer:l,init:c}=ig(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 f(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"),f),OB=[],zB=Tu(()=>{OB.forEach(e=>{e()}),OB=[]},"attachFunctions"),FB=Tu(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function RB(e){const t=e.match(od);if(!t)return{text:e,metadata:{}};let r=TC(t[1],{schema:_C})??{};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}}Tu(RB,"extractFrontMatter");var $B=Tu(e=>e.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),VB=Tu(e=>{const{text:t,metadata:r}=RB(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"),WB=Tu(e=>{const t=ES.detectInit(e)??{},r=ES.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 qB(e){const t=$B(e),r=VB(t),n=WB(r.text),i=AS(r.config,n.directive);return{code:e=FB(n.text),title:r.title,config:i}}function HB(e){const t=(new TextEncoder).encode(e),r=Array.from(t,e=>String.fromCodePoint(e)).join("");return btoa(r)}Tu(qB,"preprocessDiagram"),Tu(HB,"toBase64");var UB=["foreignobject"],GB=["dominant-baseline"];function XB(e){const t=qB(e);return Jd(),Xd(t.config??{}),t}async function JB(e,t){BB();try{const{code:t,config:r}=XB(e);return{diagramType:(await aL(t)).type,config:r}}catch(r){if(null==t?void 0:t.suppressErrors)return!1;throw r}}Tu(XB,"processAndSetConfigs"),Tu(JB,"parse");var YB=Tu((e,t,r=[])=>`\n.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),ZB=Tu((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=>{MI(e.styles)||i.forEach(t=>{n+=YB(e.id,t,e.styles)}),MI(e.textStyles)||(n+=YB(e.id,"tspan",((null==e?void 0:e.textStyles)||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),KB=Tu((e,t,r,n)=>{const i=ZB(e,r);return uI(oI(`${n}{${Np(t,i,e.themeVariables)}}`),hI)},"createUserStyles"),QB=Tu((e="",t,r)=>{let n=e;return r||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=MS(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),eL=Tu((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,${HB(`<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"),tL=Tu((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 rL(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Tu(rL,"sandboxedIframe");var nL=Tu((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"),iL=Tu(async function(e,t,r){var n,i,o,a,s,l;BB();const c=XB(t);t=c.code;const u=Ud();Pu.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,g="d"+e,f="#"+g,m=Tu(()=>{const e=Sf(b?p:f).node();e&&"remove"in e&&e.remove()},"removeTempElements");let y=Sf("body");const b="sandbox"===u.securityLevel,v="loose"===u.securityLevel,x=u.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),b){const e=rL(Sf(r),d);y=Sf(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=Sf(r);tL(y,e,g,`font-family: ${x}`,"http://www.w3.org/1999/xlink")}else{if(nL(document,e,g,d),b){const e=rL(Sf("body"),d);y=Sf(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=Sf("body");tL(y,e,g)}let C,w;try{C=await DB.fromText(t,{title:c.title})}catch(I){if(u.suppressErrorRendering)throw m(),I;C=await DB.fromText("error"),w=I}const k=y.select(f).node(),S=C.type,_=k.firstChild,T=_.firstChild,A=null==(i=(n=C.renderer).getClasses)?void 0:i.call(n,t,C),E=KB(u,S,A,h),P=document.createElement("style");P.innerHTML=E,_.insertBefore(P,T);try{await C.renderer.draw(t,e,wu.version,C)}catch(B){throw u.suppressErrorRendering?m():cB.draw(t,e,wu.version),B}sL(S,y.select(`${f} 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(f).node().innerHTML;if(Pu.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),M=QB(M,b,gp(u.arrowMarkerAbsolute)),b){const e=y.select(f+" svg").node();M=eL(M,e)}else v||(M=id.sanitize(M,{ADD_TAGS:UB,ADD_ATTR:GB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(zB(),w)throw w;return m(),{diagramType:S,svg:M,bindFunctions:C.db.bindFunctions}},"render");function oL(e={}){var t;const r=fd({},e);(null==r?void 0:r.fontFamily)&&!(null==(t=r.themeVariables)?void 0:t.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Vd(r),(null==r?void 0:r.theme)&&r.theme in Ed?r.themeVariables=Ed[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Ed.default.getThemeVariables(r.themeVariables));const n="object"==typeof r?$d(r):qd();Mu(n.logLevel),BB()}Tu(oL,"initialize");var aL=Tu((e,t={})=>{const{code:r}=qB(e);return DB.fromText(r,t)},"getDiagramFromText");function sL(e,t,r,n){jB(t,e),NB(t,r,n,t.attr("id"))}Tu(sL,"addA11yInfo");var lL=Object.freeze({render:iL,parse:JB,getDiagramFromText:aL,initialize:oL,getConfig:Ud,setConfig:Hd,getSiteConfig:qd,updateSiteConfig:Wd,reset:Tu(()=>{Jd()},"reset"),globalReset:Tu(()=>{Jd(Dd)},"globalReset"),defaultConfig:Dd});Mu(Ud().logLevel),Jd(Ud());var cL=Tu((e,t,r)=>{Pu.warn(e),SS(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"),uL=Tu(async function(e={querySelector:".mermaid"}){try{await hL(e)}catch(t){if(SS(t)&&Pu.error(t.str),wL.parseError&&wL.parseError(t),!e.suppressErrors)throw Pu.error("Use the suppressErrors option to suppress these errors"),t}},"run"),hL=Tu(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const n=lL.getConfig();let i;if(Pu.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)}Pu.debug(`Found ${i.length} diagrams`),void 0!==(null==n?void 0:n.startOnLoad)&&(Pu.debug("Start On Load: "+(null==n?void 0:n.startOnLoad)),lL.updateSiteConfig({startOnLoad:null==n?void 0:n.startOnLoad}));const o=new ES.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const s=[];for(const c of Array.from(i)){if(Pu.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const t=`mermaid-${o.next()}`;a=c.innerHTML,a=uT(ES.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=ES.detectInit(a);r&&Pu.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await CL(t,a,c);c.innerHTML=r,e&&await e(t),n&&n(c)}catch(l){cL(l,s,wL.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),dL=Tu(function(e){lL.initialize(e)},"initialize"),pL=Tu(async function(e,t,r){Pu.warn("mermaid.init is deprecated. Please use run instead."),e&&dL(e);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof t?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await uL(n)},"init"),gL=Tu(async(e,{lazyLoad:t=!0}={})=>{BB(),hd(...e),!1===t&&await LB()},"registerExternalDiagrams"),fL=Tu(function(){if(wL.startOnLoad){const{startOnLoad:e}=lL.getConfig();e&&wL.run().catch(e=>Pu.error("Mermaid failed to initialize",e))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",fL,!1);var mL=Tu(function(e){wL.parseError=e},"setParseErrorHandler"),yL=[],bL=!1,vL=Tu(async()=>{if(!bL){for(bL=!0;yL.length>0;){const t=yL.shift();if(t)try{await t()}catch(e){Pu.error("Error executing queue",e)}}bL=!1}},"executeQueue"),xL=Tu(async(e,t)=>new Promise((r,n)=>{const i=Tu(()=>new Promise((i,o)=>{lL.parse(e,t).then(e=>{i(e),r(e)},e=>{var t;Pu.error("Error parsing",e),null==(t=wL.parseError)||t.call(wL,e),o(e),n(e)})}),"performCall");yL.push(i),vL().catch(n)}),"parse"),CL=Tu((e,t,r)=>new Promise((n,i)=>{const o=Tu(()=>new Promise((o,a)=>{lL.render(e,t,r).then(e=>{o(e),n(e)},e=>{var t;Pu.error("Error parsing",e),null==(t=wL.parseError)||t.call(wL,e),a(e),i(e)})}),"performCall");yL.push(o),vL().catch(i)}),"render"),wL={startOnLoad:!0,mermaidAPI:lL,parse:xL,render:CL,init:pL,run:uL,registerExternalDiagrams:gL,registerLayoutLoaders:_M,initialize:dL,parseError:void 0,contentLoaded:fL,setParseErrorHandler:mL,detectType:ud,registerIconPacks:gT,getRegisteredDiagramsMetadata:Tu(()=>Object.keys(cd).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},kL=wL;
150
+ `}})();return v.jsxs("div",{className:e.root,children:[v.jsx("div",{className:`${e.dot} ${e.dot1}`}),v.jsx("div",{className:`${e.dot} ${e.dot2}`}),v.jsx("div",{className:`${e.dot} ${e.dot3}`})]})},mu=(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}},yu=({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]=H.useState("");return H.useEffect(()=>{const t=new D({html:!1,linkify:!0,typographer:!0,breaks:!0}).render(e);i(t)},[e]),v.jsx("div",{className:`${r.markdown} ${t||""}`,dangerouslySetInnerHTML:{__html:n}})},bu=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%"}}),vu=({content:e,forceType:t,onTypeDetected:r,context:n,theme:i=xo.SharePoint,fluentTheme:o,onAdaptiveCardAction:a,className:s,debug:l=!1})=>{const c=bu(),{error:u}=Q(),[h,d]=H.useState(null);if(H.useEffect(()=>{if(H.isValidElement(e))return;if("string"!=typeof e&&"object"!=typeof e)return;const t=mt(e);d(t),r&&r(t)},[e,r]),H.isValidElement(e))return v.jsx(v.Fragment,{children:e});const p=t||(null==h?void 0:h.type),g=(null==h?void 0:h.content)||e;return v.jsxs(v.Fragment,{children:[l&&h?v.jsxs("div",{className:c.debugBadge,children:["Type: ",h.type," | Confidence: ",(100*h.confidence).toFixed(0),"%"]}):null,(()=>{switch(p){case gt.MARKDOWN:return v.jsx(yu,{content:g,className:s});case gt.HTML:return v.jsx("div",{className:` ${s||""}`,dangerouslySetInnerHTML:{__html:g}});case gt.ADAPTIVE_CARD:return v.jsx("div",{className:`${c.adaptiveCardWrapper} ${s||""}`,children:v.jsx(ru,{card:"string"==typeof g?JSON.parse(g):g,context:n,theme:o,themeType:i,onInvokeAction:a||(()=>{}),onError:e=>u("Adaptive Card Error:",e instanceof Error?e:void 0)})});case gt.PLAIN_TEXT:default:return v.jsx("div",{className:`${c.plainText} ${s||""}`,children:g})}})()]})},xu=H.forwardRef((e,t)=>{const{messages:r,context:n}=e,i=e=>{if(H.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 v.jsx("div",{ref:t,className:o,children:v.jsx($.Chat,{className:a,children:r.map((e,t)=>"User"===e.senderName?v.jsx($.ChatMyMessage,{status:e.status,author:e.senderName,children:i(e.message)},t):v.jsx($.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:v.jsx(M.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:w.tokens.colorBrandBackground}}),author:e.senderName,children:v.jsx(vu,{content:i(e.message),context:n})},t))})})});xu.displayName="ChatList";const Cu=(e,t)=>{const{getFormatRelative:r}=ht(e,t);return r(new Date)};var wu={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"}},ku={exports:{}};const Su=Nn(ku.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",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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},b={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}},v="en",x={};x[v]=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 v;if("string"==typeof t){var o=t.toLowerCase();x[o]&&(i=o),r&&(x[o]=r,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;x[s]=t,i=s}return!n&&i&&(v=i),i||!n&&v},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)},_=b;_.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(g);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)},g=function(e,t){return _.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},f=this.$W,m=this.$M,y=this.$D,b="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 v=this.$locale().weekStart||0,x=(f<v?f+7:f)-v;return p(n?y-x:y+(6-x),m);case s:case d:return g(b+"Hours",0);case a:return g(b+"Minutes",1);case o:return g(b+"Seconds",2);case i:return g(b+"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],g=l===s?this.$D+(t-this.$W):t;if(l===c||l===h){var f=this.clone().set(d,1);f.$d[p](g),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);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 g=_.p(u),f=function(e){var t=S(p);return _.w(t.date(t.date()+Math.round(e*n)),p)};if(g===c)return this.set(c,this.$M+n);if(g===h)return this.set(h,this.$y+n);if(g===s)return f(1);if(g===l)return f(7);var m=(d={},d[o]=t,d[a]=r,d[i]=e,d)[g]||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")},g=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(f,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 g(o,a,!0);case"A":return g(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 g,f=this,m=_.p(d),y=S(n),b=(y.utcOffset()-this.utcOffset())*t,v=this-y,x=function(){return _.m(f,y)};switch(m){case h:g=x()/12;break;case c:g=x();break;case u:g=x()/3;break;case l:g=(v-b)/6048e5;break;case s:g=(v-b)/864e5;break;case a:g=v/r;break;case o:g=v/t;break;case i:g=v/e;break;default:g=v}return p?g:_.a(g)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return x[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=x[v],S.Ls=x,S.p={},S}());var _u=Object.defineProperty,Tu=(e,t)=>_u(e,"name",{value:t,configurable:!0}),Au=(e,t)=>{for(var r in t)_u(e,r,{get:t[r],enumerable:!0})},Eu={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Pu={trace:Tu((...e)=>{},"trace"),debug:Tu((...e)=>{},"debug"),info:Tu((...e)=>{},"info"),warn:Tu((...e)=>{},"warn"),error:Tu((...e)=>{},"error"),fatal:Tu((...e)=>{},"fatal")},Mu=Tu(function(e="fatal"){let t=Eu.fatal;"string"==typeof e?e.toLowerCase()in Eu&&(t=Eu[e]):"number"==typeof e&&(t=e),Pu.trace=()=>{},Pu.debug=()=>{},Pu.info=()=>{},Pu.warn=()=>{},Pu.error=()=>{},Pu.fatal=()=>{},t<=Eu.fatal&&(Pu.fatal=console.error?console.error.bind(console,Iu("FATAL"),"color: orange"):console.log.bind(console,"",Iu("FATAL"))),t<=Eu.error&&(Pu.error=console.error?console.error.bind(console,Iu("ERROR"),"color: orange"):console.log.bind(console,"",Iu("ERROR"))),t<=Eu.warn&&(Pu.warn=console.warn?console.warn.bind(console,Iu("WARN"),"color: orange"):console.log.bind(console,"",Iu("WARN"))),t<=Eu.info&&(Pu.info=console.info?console.info.bind(console,Iu("INFO"),"color: lightblue"):console.log.bind(console,"",Iu("INFO"))),t<=Eu.debug&&(Pu.debug=console.debug?console.debug.bind(console,Iu("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Iu("DEBUG"))),t<=Eu.trace&&(Pu.trace=console.debug?console.debug.bind(console,Iu("TRACE"),"color: lightgreen"):console.log.bind(console,"",Iu("TRACE")))},"setLogLevel"),Iu=Tu(e=>`%c${Su().format("ss.SSS")} : ${e} : `,"format");const Bu={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*Bu.hue2rgb(o,i,e+1/3);case"g":return 255*Bu.hue2rgb(o,i,e);case"b":return 255*Bu.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}}},Lu={channel:Bu,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}`}}},ju={};for(let JL=0;JL<=255;JL++)ju[JL]=Lu.unit.dec2hex(JL);const Nu=0,Du=1,Ou=2;class zu{constructor(){this.type=Nu}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=Nu}is(e){return this.type===e}}const Fu=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new zu}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Nu,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=Lu.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=Lu.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=Lu.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=Lu.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=Lu.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=Lu.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(Ou)||void 0===t?(this._ensureHSL(),Lu.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(Ou)||void 0===t?(this._ensureHSL(),Lu.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(Ou)||void 0===t?(this._ensureHSL(),Lu.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Du)||void 0===t?(this._ensureRGB(),Lu.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Du)||void 0===t?(this._ensureRGB(),Lu.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Du)||void 0===t?(this._ensureRGB(),Lu.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Du),this.changed=!0,this.data.r=e}set g(e){this.type.set(Du),this.changed=!0,this.data.g=e}set b(e){this.type.set(Du),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ou),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ou),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ou),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"),Ru={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(35!==e.charCodeAt(0))return;const t=e.match(Ru.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 Fu.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?`#${ju[Math.round(t)]}${ju[Math.round(r)]}${ju[Math.round(n)]}${ju[Math.round(255*i)]}`:`#${ju[Math.round(t)]}${ju[Math.round(r)]}${ju[Math.round(n)]}`}},$u={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($u.hueRe);if(t){const[,e,r]=t;switch(r){case"grad":return Lu.channel.clamp.h(.9*parseFloat(e));case"rad":return Lu.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return Lu.channel.clamp.h(360*parseFloat(e))}}return Lu.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(104!==t&&72!==t)return;const r=e.match($u.re);if(!r)return;const[,n,i,o,a,s]=r;return Fu.set({h:$u._hue2deg(n),s:Lu.channel.clamp.s(parseFloat(i)),l:Lu.channel.clamp.l(parseFloat(o)),a:a?Lu.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(${Lu.lang.round(t)}, ${Lu.lang.round(r)}%, ${Lu.lang.round(n)}%, ${i})`:`hsl(${Lu.lang.round(t)}, ${Lu.lang.round(r)}%, ${Lu.lang.round(n)}%)`}},Vu={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=Vu.colors[e];if(t)return Ru.parse(t)},stringify:e=>{const t=Ru.stringify(e);for(const r in Vu.colors)if(Vu.colors[r]===t)return r}},Wu={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(Wu.re);if(!r)return;const[,n,i,o,a,s,l,c,u]=r;return Fu.set({r:Lu.channel.clamp.r(i?2.55*parseFloat(n):parseFloat(n)),g:Lu.channel.clamp.g(a?2.55*parseFloat(o):parseFloat(o)),b:Lu.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:c?Lu.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(${Lu.lang.round(t)}, ${Lu.lang.round(r)}, ${Lu.lang.round(n)}, ${Lu.lang.round(i)})`:`rgb(${Lu.lang.round(t)}, ${Lu.lang.round(r)}, ${Lu.lang.round(n)})`}},qu={format:{keyword:Vu,hex:Ru,rgb:Wu,rgba:Wu,hsl:$u,hsla:$u},parse:e=>{if("string"!=typeof e)return e;const t=Ru.parse(e)||Wu.parse(e)||$u.parse(e)||Vu.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ou)||void 0===e.data.r?$u.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Wu.stringify(e):Ru.stringify(e)},Hu=(e,t)=>{const r=qu.parse(e);for(const n in t)r[n]=Lu.channel.clamp[n](t[n]);return qu.stringify(r)},Uu=(e,t,r=0,n=1)=>{if("number"!=typeof e)return Hu(e,{a:t});const i=Fu.set({r:Lu.channel.clamp.r(e),g:Lu.channel.clamp.g(t),b:Lu.channel.clamp.b(r),a:Lu.channel.clamp.a(n)});return qu.stringify(i)},Gu=e=>(e=>{const{r:t,g:r,b:n}=qu.parse(e),i=.2126*Lu.channel.toLinear(t)+.7152*Lu.channel.toLinear(r)+.0722*Lu.channel.toLinear(n);return Lu.lang.round(i)})(e)>=.5,Xu=e=>!Gu(e),Ju=(e,t,r)=>{const n=qu.parse(e),i=n[t],o=Lu.channel.clamp[t](i+r);return i!==o&&(n[t]=o),qu.stringify(n)},Yu=(e,t)=>Ju(e,"l",t),Zu=(e,t)=>Ju(e,"l",-t),Ku=(e,t)=>{const r=qu.parse(e),n={};for(const i in t)t[i]&&(n[i]=r[i]+t[i]);return Hu(e,n)},Qu=(e,t=100)=>{const r=qu.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}=qu.parse(e),{r:s,g:l,b:c,a:u}=qu.parse(t),h=r/100,d=2*h-1,p=a-u,g=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,f=1-g;return Uu(n*g+s*f,i*g+l*f,o*g+c*f,a*h+u*(1-h))})(r,e,t)},{entries:eh,setPrototypeOf:th,isFrozen:rh,getPrototypeOf:nh,getOwnPropertyDescriptor:ih}=Object;let{freeze:oh,seal:ah,create:sh}=Object,{apply:lh,construct:ch}="undefined"!=typeof Reflect&&Reflect;oh||(oh=function(e){return e}),ah||(ah=function(e){return e}),lh||(lh=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)}),ch||(ch=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 uh=_h(Array.prototype.forEach),hh=_h(Array.prototype.lastIndexOf),dh=_h(Array.prototype.pop),ph=_h(Array.prototype.push),gh=_h(Array.prototype.splice),fh=_h(String.prototype.toLowerCase),mh=_h(String.prototype.toString),yh=_h(String.prototype.match),bh=_h(String.prototype.replace),vh=_h(String.prototype.indexOf),xh=_h(String.prototype.trim),Ch=_h(Object.prototype.hasOwnProperty),wh=_h(RegExp.prototype.test),kh=(Sh=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ch(Sh,t)});var Sh;function _h(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 lh(e,t,n)}}function Th(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fh;th&&th(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(rh(t)||(t[n]=e),i=e)}e[i]=!0}return e}function Ah(e){for(let t=0;t<e.length;t++){Ch(e,t)||(e[t]=null)}return e}function Eh(e){const t=sh(null);for(const[r,n]of eh(e)){Ch(e,r)&&(Array.isArray(n)?t[r]=Ah(n):n&&"object"==typeof n&&n.constructor===Object?t[r]=Eh(n):t[r]=n)}return t}function Ph(e,t){for(;null!==e;){const r=ih(e,t);if(r){if(r.get)return _h(r.get);if("function"==typeof r.value)return _h(r.value)}e=nh(e)}return function(){return null}}const Mh=oh(["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"]),Ih=oh(["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"]),Bh=oh(["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"]),Lh=oh(["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"]),jh=oh(["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"]),Nh=oh(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dh=oh(["#text"]),Oh=oh(["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"]),zh=oh(["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"]),Fh=oh(["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"]),Rh=oh(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$h=ah(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Vh=ah(/<%[\w\W]*|[\w\W]*%>/gm),Wh=ah(/\$\{[\w\W]*/gm),qh=ah(/^data-[\-\w.\u00B7-\uFFFF]+$/),Hh=ah(/^aria-[\-\w]+$/),Uh=ah(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gh=ah(/^(?:\w+script|data):/i),Xh=ah(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jh=ah(/^html$/i),Yh=ah(/^[a-z][.\w]*(-[.\w]+)+$/i);var Zh=Object.freeze({__proto__:null,ARIA_ATTR:Hh,ATTR_WHITESPACE:Xh,CUSTOM_ELEMENT:Yh,DATA_ATTR:qh,DOCTYPE_NAME:Jh,ERB_EXPR:Vh,IS_ALLOWED_URI:Uh,IS_SCRIPT_OR_DATA:Gh,MUSTACHE_EXPR:$h,TMPLIT_EXPR:Wh});const Kh=1,Qh=3,ed=7,td=8,rd=9;var nd,id=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!==rd||!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:g}=t,f=c.prototype,m=Ph(f,"cloneNode"),y=Ph(f,"remove"),b=Ph(f,"nextSibling"),v=Ph(f,"childNodes"),x=Ph(f,"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 E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof eh&&"function"==typeof x&&k&&void 0!==k.createHTMLDocument;const{MUSTACHE_EXPR:P,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,z=null;const F=Th({},[...Mh,...Ih,...Bh,...jh,...Dh]);let R=null;const $=Th({},[...Oh,...zh,...Fh,...Rh]);let V=Object.seal(sh(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,q=null;const H=Object.seal(sh(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=Th({},["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=Th({},["audio","video","img","source","image","track"]);let pe=null;const ge=Th({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let be=ye,ve=!1,xe=null;const Ce=Th({},[fe,me,ye],mh);let we=Th({},["mi","mo","mn","ms","mtext"]),ke=Th({},["annotation-xml"]);const Se=Th({},["title","style","font","a","script"]);let _e=null;const Te=["application/xhtml+xml","text/html"];let Ae=null,Ee=null;const Pe=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(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=Eh(e),_e=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===_e?mh:fh,z=Ch(e,"ALLOWED_TAGS")?Th({},e.ALLOWED_TAGS,Ae):F,R=Ch(e,"ALLOWED_ATTR")?Th({},e.ALLOWED_ATTR,Ae):$,xe=Ch(e,"ALLOWED_NAMESPACES")?Th({},e.ALLOWED_NAMESPACES,mh):Ce,pe=Ch(e,"ADD_URI_SAFE_ATTR")?Th(Eh(ge),e.ADD_URI_SAFE_ATTR,Ae):ge,he=Ch(e,"ADD_DATA_URI_TAGS")?Th(Eh(de),e.ADD_DATA_URI_TAGS,Ae):de,ce=Ch(e,"FORBID_CONTENTS")?Th({},e.FORBID_CONTENTS,Ae):ue,W=Ch(e,"FORBID_TAGS")?Th({},e.FORBID_TAGS,Ae):Eh({}),q=Ch(e,"FORBID_ATTR")?Th({},e.FORBID_ATTR,Ae):Eh({}),le=!!Ch(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||Uh,be=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&&(z=Th({},Dh),R=[],!0===le.html&&(Th(z,Mh),Th(R,Oh)),!0===le.svg&&(Th(z,Ih),Th(R,zh),Th(R,Rh)),!0===le.svgFilters&&(Th(z,Bh),Th(R,zh),Th(R,Rh)),!0===le.mathMl&&(Th(z,jh),Th(R,Fh),Th(R,Rh))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?H.tagCheck=e.ADD_TAGS:(z===F&&(z=Eh(z)),Th(z,e.ADD_TAGS,Ae))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?H.attributeCheck=e.ADD_ATTR:(R===$&&(R=Eh(R)),Th(R,e.ADD_ATTR,Ae))),e.ADD_URI_SAFE_ATTR&&Th(pe,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(ce===ue&&(ce=Eh(ce)),Th(ce,e.FORBID_CONTENTS,Ae)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Eh(ce)),Th(ce,e.ADD_FORBID_CONTENTS,Ae)),ae&&(z["#text"]=!0),K&&Th(z,["html","head","body"]),z.table&&(Th(z,["tbody"]),delete W.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw kh('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw kh('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}}(g,o)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));oh&&oh(e),Ee=e}},Be=Th({},[...Ih,...Bh,...Lh]),Le=Th({},[...jh,...Nh]),je=function(e){ph(r.removed,{element:e});try{x(e).removeChild(e)}catch(t){y(e)}},Ne=function(e,t){try{ph(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){ph(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=yh(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===_e&&be===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=C?C.createHTML(e):e;if(be===ye)try{t=(new p).parseFromString(i,_e)}catch(a){}if(!t||!t.documentElement){t=k.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?w:i}catch(a){}}const o=t.body||t.documentElement;return e&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),be===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)},ze=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)},Fe=function(e){return"function"==typeof l&&e instanceof l};function Re(e,t,n){uh(e,e=>{e.call(r,t,n,Ee)})}const $e=function(e){let t=null;if(Re(E.beforeSanitizeElements,e,null),ze(e))return je(e),!0;const n=Ae(e.nodeName);if(Re(E.uponSanitizeElement,e,{tagName:n,allowedTags:z}),Z&&e.hasChildNodes()&&!Fe(e.firstElementChild)&&wh(/<[/\w!]/g,e.innerHTML)&&wh(/<[/\w!]/g,e.textContent))return je(e),!0;if(e.nodeType===ed)return je(e),!0;if(Z&&e.nodeType===td&&wh(/<[/\w]/g,e.data))return je(e),!0;if(!(H.tagCheck instanceof Function&&H.tagCheck(n))&&(!z[n]||W[n])){if(!W[n]&&We(n)){if(V.tagNameCheck instanceof RegExp&&wh(V.tagNameCheck,n))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(n))return!1}if(ae&&!ce[n]){const t=x(e)||e.parentNode,r=v(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,b(e))}}}return je(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const r=fh(e.tagName),n=fh(t.tagName);return!!xe[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ye?"svg"===r:t.namespaceURI===fe?"svg"===r&&("annotation-xml"===n||we[n]):Boolean(Be[r]):e.namespaceURI===fe?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===fe&&!we[n])&&!Le[r]&&(Se[r]||!Be[r]):!("application/xhtml+xml"!==_e||!xe[e.namespaceURI]))}(e)?(je(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!wh(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Qh&&(t=e.textContent,uh([P,M,I],e=>{t=bh(t,e," ")}),e.textContent!==t&&(ph(r.removed,{element:e.cloneNode()}),e.textContent=t)),Re(E.afterSanitizeElements,e,null),!1):(je(e),!0)},Ve=function(e,t,r){if(ie&&("id"===t||"name"===t)&&(r in n||r in Pe))return!1;if(G&&!q[t]&&wh(B,t));else if(U&&wh(L,t));else if(H.attributeCheck instanceof Function&&H.attributeCheck(t,e));else if(!R[t]||q[t]){if(!(We(e)&&(V.tagNameCheck instanceof RegExp&&wh(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&wh(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t,e))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&wh(V.tagNameCheck,r)||V.tagNameCheck instanceof Function&&V.tagNameCheck(r))))return!1}else if(pe[t]);else if(wh(O,bh(r,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==vh(r,"data:")||!he[e]){if(X&&!wh(j,bh(r,N,"")));else if(r)return!1}else;return!0},We=function(e){return"annotation-xml"!==e&&yh(e,D)},qe=function(e){Re(E.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ze(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,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:xh(h);if(n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Re(E.uponSanitizeAttribute,e,n),d=n.attrValue,!oe||"id"!==u&&"name"!==u||(Ne(s,e),d="user-content-"+d),Z&&wh(/((--!?|])>)|<\/(style|title|textarea)/i,d)){Ne(s,e);continue}if("attributename"===u&&yh(d,"href")){Ne(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ne(s,e);continue}if(!J&&wh(/\/>/i,d)){Ne(s,e);continue}Y&&uh([P,M,I],e=>{d=bh(d,e," ")});const p=Ae(e.nodeName);if(Ve(p,u,d)){if(C&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.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),ze(e)?je(e):dh(r.removed)}catch(o){Ne(s,e)}}else Ne(s,e)}Re(E.afterSanitizeAttributes,e,null)},He=function e(t){let r=null;const n=Oe(t);for(Re(E.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)Re(E.uponSanitizeShadowNode,r,null),$e(r),qe(r),r.content instanceof a&&e(r.content);Re(E.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(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Fe(e)){if("function"!=typeof e.toString)throw kh("toString is not a function");if("string"!=typeof(e=e.toString()))throw kh("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(!z[t]||W[t])throw kh("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===Kh&&"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();)$e(s),qe(s),s.content instanceof a&&He(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(R.shadowroot||R.shadowrootmode)&&(c=A.call(i,c,!0)),c}let h=K?n.outerHTML:n.innerHTML;return K&&z["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&wh(Jh,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Y&&uh([P,M,I],e=>{h=bh(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(){Ee=null,Q=!1},r.isValidAttribute=function(e,t,r){Ee||Ie({});const n=Ae(e),i=Ae(t);return Ve(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&ph(E[e],t)},r.removeHook=function(e,t){if(void 0!==t){const r=hh(E[e],t);return-1===r?void 0:gh(E[e],r,1)[0]}return dh(E[e])},r.removeHooks=function(e){E[e]=[]},r.removeAllHooks=function(){E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),od=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ad=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sd=/\s*%%.*\n/gm,ld=(a=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},Tu(a,"UnknownDiagramError"),a),cd={},ud=Tu(function(e,t){e=e.replace(od,"").replace(ad,"").replace(sd,"\n");for(const[r,{detector:n}]of Object.entries(cd)){if(n(e,t))return r}throw new ld(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),hd=Tu((...e)=>{for(const{id:t,detector:r,loader:n}of e)dd(t,r,n)},"registerLazyLoadedDiagrams"),dd=Tu((e,t,r)=>{cd[e]&&Pu.warn(`Detector with key ${e} already exists. Overwriting.`),cd[e]={detector:t,loader:r},Pu.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),pd=Tu(e=>cd[e].loader,"getDiagramLoader"),gd=Tu((e,t,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>gd(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]=gd(e[i],t[i],{depth:r-1,clobber:n}))}),e)},"assignWithDepth"),fd=gd,md="#ffffff",yd="#f2f2f2",bd=Tu((e,t)=>Ku(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),vd=(Tu(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,g,f,m,y,b,v,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ku(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ku(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||bd(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||bd(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Qu(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Qu(this.tertiaryColor),this.lineColor=this.lineColor||Qu(this.background),this.arrowheadColor=this.arrowheadColor||Qu(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||Qu(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||Yu(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||Yu(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Yu(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||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(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]||Qu(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||Yu(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]||Ku(this.mainBkg,{h:180,s:-15,l:C*(5+3*w)}),this["surfacePeer"+w]=this["surfacePeer"+w]||Ku(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||Ku(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ku(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ku(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ku(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ku(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ku(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||Ku(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ku(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ku(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ku(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ku(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ku(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ku(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ku(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.xyChart)?void 0:g.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(f=this.xyChart)?void 0:f.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==(b=this.xyChart)?void 0:b.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(v=this.xyChart)?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(x=this.xyChart)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.git4||Ku(this.primaryColor,{h:-60}),this.git5=this.git5||Ku(this.primaryColor,{h:-90}),this.git6=this.git6||Ku(this.primaryColor,{h:60}),this.git7=this.git7||Ku(this.primaryColor,{h:120}),this.darkMode?(this.git0=Yu(this.git0,25),this.git1=Yu(this.git1,25),this.git2=Yu(this.git2,25),this.git3=Yu(this.git3,25),this.git4=Yu(this.git4,25),this.git5=Yu(this.git5,25),this.git6=Yu(this.git6,25),this.git7=Yu(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||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),xd=Tu(e=>{const t=new vd;return t.calculate(e),t},"getThemeVariables"),Cd=(Tu(l=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Yu(this.primaryColor,16),this.tertiaryColor=Ku(this.primaryColor,{h:-160}),this.primaryBorderColor=Qu(this.background),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.tertiaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Yu(Qu("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Uu(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=Uu(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Uu(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||Yu(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,g,f,m,y,b,v,x;this.secondBkg=Yu(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=Yu(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=Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(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||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||Qu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||Yu(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Ku(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.radar)?void 0:g.curveOpacity)||.5,curveStrokeWidth:(null==(f=this.radar)?void 0:f.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(b=this.radar)?void 0:b.graticuleOpacity)||.3,legendBoxSize:(null==(v=this.radar)?void 0:v.legendBoxSize)||12,legendFontSize:(null==(x=this.radar)?void 0:x.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=Yu(this.secondaryColor,20),this.git1=Yu(this.pie2||this.secondaryColor,20),this.git2=Yu(this.pie3||this.tertiaryColor,20),this.git3=Yu(this.pie4||Ku(this.primaryColor,{h:-30}),20),this.git4=Yu(this.pie5||Ku(this.primaryColor,{h:-60}),20),this.git5=Yu(this.pie6||Ku(this.primaryColor,{h:-90}),10),this.git6=Yu(this.pie7||Ku(this.primaryColor,{h:60}),10),this.git7=Yu(this.pie8||Ku(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Qu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Qu(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||Yu(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Yu(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),wd=Tu(e=>{const t=new Cd;return t.calculate(e),t},"getThemeVariables"),kd=(Tu(c=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ku(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ku(this.primaryColor,{h:-160}),this.primaryBorderColor=bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.tertiaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(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=Uu(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,g,f,m,y,b,v,x;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(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]||Ku(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||Ku(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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||Qu(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Qu(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=Yu(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||Yu(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Ku(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Ku(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ku(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ku(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Ku(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Ku(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Ku(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Ku(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Ku(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.xyChart)?void 0:g.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(f=this.xyChart)?void 0:f.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==(b=this.xyChart)?void 0:b.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(v=this.xyChart)?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(x=this.xyChart)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.git4||Ku(this.primaryColor,{h:-60}),this.git5=this.git5||Ku(this.primaryColor,{h:-90}),this.git6=this.git6||Ku(this.primaryColor,{h:60}),this.git7=this.git7||Ku(this.primaryColor,{h:120}),this.darkMode?(this.git0=Yu(this.git0,25),this.git1=Yu(this.git1,25),this.git2=Yu(this.git2,25),this.git3=Yu(this.git3,25),this.git4=Yu(this.git4,25),this.git5=Yu(this.git5,25),this.git6=Yu(this.git6,25),this.git7=Yu(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(Qu(this.git0),25),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Qu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),Sd=Tu(e=>{const t=new kd;return t.calculate(e),t},"getThemeVariables"),_d=(Tu(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=Yu("#cde498",10),this.primaryBorderColor=bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.primaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(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,g,f,m,y,b,v,x;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||Ku(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ku(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ku(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ku(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ku(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ku(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ku(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ku(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ku(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]||Ku(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]||Ku(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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||Yu(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(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||Ku(this.primaryColor,{l:-30}),this.pie5=this.pie5||Ku(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ku(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Ku(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ku(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ku(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ku(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Ku(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.xyChart)?void 0:g.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(f=this.xyChart)?void 0:f.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==(b=this.xyChart)?void 0:b.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(v=this.xyChart)?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(x=this.xyChart)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.git4||Ku(this.primaryColor,{h:-60}),this.git5=this.git5||Ku(this.primaryColor,{h:-90}),this.git6=this.git6||Ku(this.primaryColor,{h:60}),this.git7=this.git7||Ku(this.primaryColor,{h:120}),this.darkMode?(this.git0=Yu(this.git0,25),this.git1=Yu(this.git1,25),this.git2=Yu(this.git2,25),this.git3=Yu(this.git3,25),this.git4=Yu(this.git4,25),this.git5=Yu(this.git5,25),this.git6=Yu(this.git6,25),this.git7=Yu(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||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Qu(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),Td=Tu(e=>{const t=new _d;return t.calculate(e),t},"getThemeVariables"),Ad=(Tu(h=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Yu(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ku(this.primaryColor,{h:-160}),this.primaryBorderColor=bd(this.primaryColor,this.darkMode),this.secondaryBorderColor=bd(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=bd(this.tertiaryColor,this.darkMode),this.primaryTextColor=Qu(this.primaryColor),this.secondaryTextColor=Qu(this.secondaryColor),this.tertiaryTextColor=Qu(this.tertiaryColor),this.lineColor=Qu(this.background),this.textColor=Qu(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||Yu(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,g,f,m,y,b,v,x;this.secondBkg=Yu(this.contrast,55),this.border2=this.contrast,this.actorBorder=Yu(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]||Qu(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Yu(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]||Ku(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||Ku(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=Yu(this.contrast,30),this.sectionBkgColor2=Yu(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=Yu(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=Ku(this.primaryColor,{h:64}),this.fillType3=Ku(this.secondaryColor,{h:64}),this.fillType4=Ku(this.primaryColor,{h:-64}),this.fillType5=Ku(this.secondaryColor,{h:-64}),this.fillType6=Ku(this.primaryColor,{h:128}),this.fillType7=Ku(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||Ku(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ku(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ku(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ku(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ku(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ku(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xu(this.quadrant1Fill)?Yu(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==(g=this.radar)?void 0:g.curveOpacity)||.5,curveStrokeWidth:(null==(f=this.radar)?void 0:f.curveStrokeWidth)||2,graticuleColor:(null==(m=this.radar)?void 0:m.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(null==(y=this.radar)?void 0:y.graticuleStrokeWidth)||1,graticuleOpacity:(null==(b=this.radar)?void 0:b.graticuleOpacity)||.3,legendBoxSize:(null==(v=this.radar)?void 0:v.legendBoxSize)||12,legendFontSize:(null==(x=this.radar)?void 0:x.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||Ku(this.primaryColor,{h:-30}),this.git4=this.pie5||Ku(this.primaryColor,{h:-60}),this.git5=this.pie6||Ku(this.primaryColor,{h:-90}),this.git6=this.pie7||Ku(this.primaryColor,{h:60}),this.git7=this.pie8||Ku(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Qu(this.git0),this.gitInv1=this.gitInv1||Qu(this.git1),this.gitInv2=this.gitInv2||Qu(this.git2),this.gitInv3=this.gitInv3||Qu(this.git3),this.gitInv4=this.gitInv4||Qu(this.git4),this.gitInv5=this.gitInv5||Qu(this.git5),this.gitInv6=this.gitInv6||Qu(this.git6),this.gitInv7=this.gitInv7||Qu(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||md,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||yd}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),Ed={base:{getThemeVariables:xd},dark:{getThemeVariables:wd},default:{getThemeVariables:Sd},forest:{getThemeVariables:Td},neutral:{getThemeVariables:Tu(e=>{const t=new Ad;return t.calculate(e),t},"getThemeVariables")}},Pd={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},Md={...Pd,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ed.default.getThemeVariables(),sequence:{...Pd.sequence,messageFont:Tu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:Tu(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:Tu(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Pd.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Pd.c4,useWidth:void 0,personFont:Tu(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Pd.flowchart,inheritDir:!1},external_personFont:Tu(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:Tu(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:Tu(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:Tu(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:Tu(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:Tu(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:Tu(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:Tu(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:Tu(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:Tu(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:Tu(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:Tu(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:Tu(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:Tu(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:Tu(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:Tu(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:Tu(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:Tu(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:Tu(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:Tu(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:Tu(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Pd.pie,useWidth:984},xyChart:{...Pd.xyChart,useWidth:void 0},requirement:{...Pd.requirement,useWidth:void 0},packet:{...Pd.packet},radar:{...Pd.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Id=Tu((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:"object"==typeof e[n]&&null!==e[n]?[...r,t+n,...Id(e[n],"")]:[...r,t+n],[]),"keyify"),Bd=new Set(Id(Md,"")),Ld=Md,jd=Tu(e=>{if(Pu.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>jd(e));else{for(const t of Object.keys(e)){if(Pu.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Bd.has(t)||null==e[t]){Pu.debug("sanitize deleting key: ",t),delete e[t];continue}if("object"==typeof e[t]){Pu.debug("sanitizing object",t),jd(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)t.includes(n)&&(Pu.debug("sanitizing css option",t),e[t]=Nd(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]="")}Pu.debug("After sanitization",e)}},"sanitizeDirective"),Nd=Tu(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"),Dd=Object.freeze(Ld),Od=fd({},Dd),zd=[],Fd=fd({},Dd),Rd=Tu((e,t)=>{let r=fd({},e),n={};for(const i of t)Gd(i),n=fd(n,i);if(r=fd(r,n),n.theme&&n.theme in Ed){const e=fd({},nd),t=fd(e.themeVariables||{},n.themeVariables);r.theme&&r.theme in Ed&&(r.themeVariables=Ed[r.theme].getThemeVariables(t))}return Qd(Fd=r),Fd},"updateCurrentConfig"),$d=Tu(e=>(Od=fd({},Dd),Od=fd(Od,e),e.theme&&Ed[e.theme]&&(Od.themeVariables=Ed[e.theme].getThemeVariables(e.themeVariables)),Rd(Od,zd),Od),"setSiteConfig"),Vd=Tu(e=>{nd=fd({},e)},"saveConfigFromInitialize"),Wd=Tu(e=>(Od=fd(Od,e),Rd(Od,zd),Od),"updateSiteConfig"),qd=Tu(()=>fd({},Od),"getSiteConfig"),Hd=Tu(e=>(Qd(e),fd(Fd,e),Ud()),"setConfig"),Ud=Tu(()=>fd({},Fd),"getConfig"),Gd=Tu(e=>{e&&(["secure",...Od.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(Pu.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]&&Gd(e[t])}))},"sanitize"),Xd=Tu(e=>{var t;jd(e),e.fontFamily&&!(null==(t=e.themeVariables)?void 0:t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),zd.push(e),Rd(Od,zd)},"addDirective"),Jd=Tu((e=Od)=>{Rd(e,zd=[])},"reset"),Yd={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Zd={},Kd=Tu(e=>{Zd[e]||(Pu.warn(Yd[e]),Zd[e]=!0)},"issueWarning"),Qd=Tu(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Kd("LAZY_LOAD_DEPRECATED")},"checkConfig"),ep=Tu(()=>{let e={};nd&&(e=fd(e,nd));for(const t of zd)e=fd(e,t);return e},"getUserDefinedConfig"),tp=/<br\s*\/?>/gi,rp=Tu(e=>{if(!e)return[""];return dp(e).replace(/\\n/g,"#br#").split("#br#")},"getRows"),np=(()=>{let e=!1;return()=>{e||(ip(),e=!0)}})();function ip(){const e="data-temp-href-target";id.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),id.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"))})}Tu(ip,"setupDompurifyHooks");var op=Tu(e=>{np();return id.sanitize(e)},"removeScript"),ap=Tu((e,t)=>{var r;if(!1!==(null==(r=t.flowchart)?void 0:r.htmlLabels)){const r=t.securityLevel;"antiscript"===r||"strict"===r?e=op(e):"loose"!==r&&(e=(e=(e=dp(e)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),e=hp(e))}return e},"sanitizeMore"),sp=Tu((e,t)=>e?e=t.dompurifyConfig?id.sanitize(ap(e,t),t.dompurifyConfig).toString():id.sanitize(ap(e,t),{FORBID_TAGS:["style"]}).toString():e,"sanitizeText"),lp=Tu((e,t)=>"string"==typeof e?sp(e,t):e.flat().map(e=>sp(e,t)),"sanitizeTextOrArray"),cp=Tu(e=>tp.test(e),"hasBreaks"),up=Tu(e=>e.split(tp),"splitBreaks"),hp=Tu(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),dp=Tu(e=>e.replace(tp,"#br#"),"breakToPlaceholder"),pp=Tu(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),gp=Tu(e=>!1!==e&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),fp=Tu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.max(...t)},"getMax"),mp=Tu(function(...e){const t=e.filter(e=>!isNaN(e));return Math.min(...t)},"getMin"),yp=Tu(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];vp(i,o)&&(e=i+","+o,n++,r.pop())}r.push(xp(e))}return r.join("")},"parseGenericTypes"),bp=Tu((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),vp=Tu((e,t)=>{const r=bp(e,"~"),n=bp(t,"~");return 1===r&&1===n},"shouldCombineSets"),xp=Tu(e=>{const t=bp(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"),Cp=Tu(()=>void 0!==window.MathMLElement,"isMathMLSupported"),wp=/\$\$(.*)\$\$/g,kp=Tu(e=>{var t;return((null==(t=e.match(wp))?void 0:t.length)??0)>0},"hasKatex"),Sp=Tu(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Tp(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"),_p=Tu(async(e,t)=>{if(!kp(e))return e;if(!(Cp()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wp,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-DPu4QpBP.cjs")),n=t.forceLegacyMathML||!Cp()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(tp).map(e=>kp(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join("").replace(wp,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Tp=Tu(async(e,t)=>sp(await _p(e,t),t),"renderKatexSanitized"),Ap={getRows:rp,sanitizeText:sp,sanitizeTextOrArray:lp,hasBreaks:cp,splitBreaks:up,lineBreakRegex:tp,removeScript:op,getUrl:pp,evaluate:gp,getMax:fp,getMin:mp},Ep=Tu(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Pp=Tu(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"),Mp=Tu(function(e,t,r,n){const i=Pp(t,r,n);Ep(e,i)},"configureSvgSize"),Ip=Tu(function(e,t,r,n){const i=t.node().getBBox(),o=i.width,a=i.height;Pu.info(`SVG bounds: ${o}x${a}`,i);let s=0,l=0;Pu.info(`Graph bounds: ${s}x${l}`,e),s=o+2*r,l=a+2*r,Pu.info(`Calculated bounds: ${s}x${l}`),Mp(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"),Bp={},Lp=Tu((e,t,r)=>{let n="";return e in Bp&&Bp[e]?n=Bp[e](r):Pu.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"),jp=Tu((e,t)=>{void 0!==t&&(Bp[e]=t)},"addStylesForDiagram"),Np=Lp,Dp={};Au(Dp,{clear:()=>$p,getAccDescription:()=>Hp,getAccTitle:()=>Wp,getDiagramTitle:()=>Gp,setAccDescription:()=>qp,setAccTitle:()=>Vp,setDiagramTitle:()=>Up});var Op="",zp="",Fp="",Rp=Tu(e=>sp(e,Ud()),"sanitizeText"),$p=Tu(()=>{Op="",Fp="",zp=""},"clear"),Vp=Tu(e=>{Op=Rp(e).replace(/^\s+/g,"")},"setAccTitle"),Wp=Tu(()=>Op,"getAccTitle"),qp=Tu(e=>{Fp=Rp(e).replace(/\n\s+/g,"\n")},"setAccDescription"),Hp=Tu(()=>Fp,"getAccDescription"),Up=Tu(e=>{zp=Rp(e)},"setDiagramTitle"),Gp=Tu(()=>zp,"getDiagramTitle"),Xp=Pu,Jp=Mu,Yp=Ud,Zp=Hd,Kp=Dd,Qp=Tu(e=>sp(e,Yp()),"sanitizeText"),eg=Ip,tg=Tu(()=>Dp,"getCommonDb"),rg={},ng=Tu((e,t,r)=>{var n;rg[e]&&Xp.warn(`Diagram with id ${e} already registered. Overwriting.`),rg[e]=t,r&&dd(e,r),jp(e,t.styles),null==(n=t.injectUtils)||n.call(t,Xp,Jp,Yp,Qp,eg,tg(),()=>{})},"registerDiagram"),ig=Tu(e=>{if(e in rg)return rg[e];throw new og(e)},"getDiagram"),og=(d=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},Tu(d,"DiagramNotFoundError"),d),ag={value:()=>{}};function sg(){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 lg(n)}function lg(e){this._=e}function cg(e,t){for(var r,n=0,i=e.length;n<i;++n)if((r=e[n]).name===t)return r.value}function ug(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=ag,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=r&&e.push({name:t,value:r}),e}lg.prototype=sg.prototype={constructor:lg,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]=ug(i[r],e.name,t);else if(null==t)for(r in i)i[r]=ug(i[r],e.name,null);return this}for(;++a<s;)if((r=(e=o[a]).type)&&(r=cg(i[r],e.name)))return r},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new lg(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 hg="http://www.w3.org/1999/xhtml";const dg={svg:"http://www.w3.org/2000/svg",xhtml:hg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pg(e){var t=e+="",r=t.indexOf(":");return r>=0&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),dg.hasOwnProperty(t)?{space:dg[t],local:e}:e}function gg(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===hg&&t.documentElement.namespaceURI===hg?t.createElement(e):t.createElementNS(r,e)}}function fg(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mg(e){var t=pg(e);return(t.local?fg:gg)(t)}function yg(){}function bg(e){return null==e?yg:function(){return this.querySelector(e)}}function vg(){return[]}function xg(e){return null==e?vg:function(){return this.querySelectorAll(e)}}function Cg(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function wg(e){return function(){return this.matches(e)}}function kg(e){return function(t){return t.matches(e)}}var Sg=Array.prototype.find;function _g(){return this.firstElementChild}var Tg=Array.prototype.filter;function Ag(){return Array.from(this.children)}function Eg(e){return new Array(e.length)}function Pg(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Mg(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 Pg(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Ig(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 Pg(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(p[s])===l&&(i[s]=l)}function Bg(e){return e.__data__}function Lg(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ng(e){return function(){this.removeAttribute(e)}}function Dg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Og(e,t){return function(){this.setAttribute(e,t)}}function zg(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Fg(e,t){return function(){var r=t.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}}function Rg(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 $g(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Vg(e){return function(){this.style.removeProperty(e)}}function Wg(e,t,r){return function(){this.style.setProperty(e,t,r)}}function qg(e,t,r){return function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function Hg(e,t){return e.style.getPropertyValue(t)||$g(e).getComputedStyle(e,null).getPropertyValue(t)}function Ug(e){return function(){delete this[e]}}function Gg(e,t){return function(){this[e]=t}}function Xg(e,t){return function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}}function Jg(e){return e.trim().split(/^|\s+/)}function Yg(e){return e.classList||new Zg(e)}function Zg(e){this._node=e,this._names=Jg(e.getAttribute("class")||"")}function Kg(e,t){for(var r=Yg(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Qg(e,t){for(var r=Yg(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function ef(e){return function(){Kg(this,e)}}function tf(e){return function(){Qg(this,e)}}function rf(e,t){return function(){(t.apply(this,arguments)?Kg:Qg)(this,e)}}function nf(){this.textContent=""}function of(e){return function(){this.textContent=e}}function af(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function sf(){this.innerHTML=""}function lf(e){return function(){this.innerHTML=e}}function cf(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function uf(){this.nextSibling&&this.parentNode.appendChild(this)}function hf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function df(){return null}function pf(){var e=this.parentNode;e&&e.removeChild(this)}function gf(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ff(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mf(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 yf(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 bf(e,t,r){var n=$g(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 vf(e,t){return function(){return bf(this,e,t)}}function xf(e,t){return function(){return bf(this,e,t.apply(this,arguments))}}Pg.prototype={constructor:Pg,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)}},Zg.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 Cf=[null];function wf(e,t){this._groups=e,this._parents=t}function kf(){return new wf([[document.documentElement]],Cf)}function Sf(e){return"string"==typeof e?new wf([[document.querySelector(e)]],[document.documentElement]):new wf([[e]],Cf)}function _f(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tf(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Af(){}wf.prototype=kf.prototype={constructor:wf,select:function(e){"function"!=typeof e&&(e=bg(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 wf(n,this._parents)},selectAll:function(e){e="function"==typeof e?Cg(e):xg(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 wf(n,i)},selectChild:function(e){return this.select(null==e?_g:function(e){return function(){return Sg.call(this.children,e)}}("function"==typeof e?e:kg(e)))},selectChildren:function(e){return this.selectAll(null==e?Ag:function(e){return function(){return Tg.call(this.children,e)}}("function"==typeof e?e:kg(e)))},filter:function(e){"function"!=typeof e&&(e=wg(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 wf(n,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Bg);var r,n=t?Ig:Mg,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,g=Lg(e.call(h,h&&h.__data__,u,i)),f=g.length,m=l[u]=new Array(f),y=s[u]=new Array(f);n(h,d,m,y,c[u]=new Array(p),g,t);for(var b,v,x=0,C=0;x<f;++x)if(b=m[x]){for(x>=C&&(C=x+1);!(v=y[C])&&++C<f;);b._next=v||null}}return(s=new wf(s,i))._enter=l,s._exit=c,s},enter:function(){return new wf(this._enter||this._groups.map(Eg),this._parents)},exit:function(){return new wf(this._exit||this._groups.map(Eg),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),g=0;g<d;++g)(c=u[g]||h[g])&&(p[g]=c);for(;l<i;++l)s[l]=r[l];return new wf(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=jg);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 wf(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=pg(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?Dg:Ng:"function"==typeof t?r.local?Rg:Fg:r.local?zg:Og)(r,t))},style:function(e,t,r){return arguments.length>1?this.each((null==t?Vg:"function"==typeof t?qg:Wg)(e,t,null==r?"":r)):Hg(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ug:"function"==typeof t?Xg:Gg)(e,t)):this.node()[e]},classed:function(e,t){var r=Jg(e+"");if(arguments.length<2){for(var n=Yg(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof t?rf:t?ef:tf)(r,t))},text:function(e){return arguments.length?this.each(null==e?nf:("function"==typeof e?af:of)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?sf:("function"==typeof e?cf:lf)(e)):this.node().innerHTML},raise:function(){return this.each(uf)},lower:function(){return this.each(hf)},append:function(e){var t="function"==typeof e?e:mg(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var r="function"==typeof e?e:mg(e),n=null==t?df:"function"==typeof t?t:bg(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(pf)},clone:function(e){return this.select(e?ff:gf)},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?yf:mf,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?xf:vf)(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 Ef=.7,Pf=1/Ef,Mf="\\s*([+-]?\\d+)\\s*",If="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lf=/^#([0-9a-f]{3,8})$/,jf=new RegExp(`^rgb\\(${Mf},${Mf},${Mf}\\)$`),Nf=new RegExp(`^rgb\\(${Bf},${Bf},${Bf}\\)$`),Df=new RegExp(`^rgba\\(${Mf},${Mf},${Mf},${If}\\)$`),Of=new RegExp(`^rgba\\(${Bf},${Bf},${Bf},${If}\\)$`),zf=new RegExp(`^hsl\\(${If},${Bf},${Bf}\\)$`),Ff=new RegExp(`^hsla\\(${If},${Bf},${Bf},${If}\\)$`),Rf={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 $f(){return this.rgb().formatHex()}function Vf(){return this.rgb().formatRgb()}function Wf(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Lf.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?qf(t):3===r?new Xf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Hf(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Hf(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=jf.exec(e))?new Xf(t[1],t[2],t[3],1):(t=Nf.exec(e))?new Xf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Df.exec(e))?Hf(t[1],t[2],t[3],t[4]):(t=Of.exec(e))?Hf(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zf.exec(e))?em(t[1],t[2]/100,t[3]/100,1):(t=Ff.exec(e))?em(t[1],t[2]/100,t[3]/100,t[4]):Rf.hasOwnProperty(e)?qf(Rf[e]):"transparent"===e?new Xf(NaN,NaN,NaN,0):null}function qf(e){return new Xf(e>>16&255,e>>8&255,255&e,1)}function Hf(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xf(e,t,r,n)}function Uf(e){return e instanceof Af||(e=Wf(e)),e?new Xf((e=e.rgb()).r,e.g,e.b,e.opacity):new Xf}function Gf(e,t,r,n){return 1===arguments.length?Uf(e):new Xf(e,t,r,null==n?1:n)}function Xf(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Jf(){return`#${Qf(this.r)}${Qf(this.g)}${Qf(this.b)}`}function Yf(){const e=Zf(this.opacity);return`${1===e?"rgb(":"rgba("}${Kf(this.r)}, ${Kf(this.g)}, ${Kf(this.b)}${1===e?")":`, ${e})`}`}function Zf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qf(e){return((e=Kf(e))<16?"0":"")+e.toString(16)}function em(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new rm(e,t,r,n)}function tm(e){if(e instanceof rm)return new rm(e.h,e.s,e.l,e.opacity);if(e instanceof Af||(e=Wf(e)),!e)return new rm;if(e instanceof rm)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 rm(a,s,l,e.opacity)}function rm(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function nm(e){return(e=(e||0)%360)<0?e+360:e}function im(e){return Math.max(0,Math.min(1,e||0))}function om(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}_f(Af,Wf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$f,formatHex:$f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tm(this).formatHsl()},formatRgb:Vf,toString:Vf}),_f(Xf,Gf,Tf(Af,{brighter(e){return e=null==e?Pf:Math.pow(Pf,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ef:Math.pow(Ef,e),new Xf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xf(Kf(this.r),Kf(this.g),Kf(this.b),Zf(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:Jf,formatHex:Jf,formatHex8:function(){return`#${Qf(this.r)}${Qf(this.g)}${Qf(this.b)}${Qf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Yf,toString:Yf})),_f(rm,function(e,t,r,n){return 1===arguments.length?tm(e):new rm(e,t,r,null==n?1:n)},Tf(Af,{brighter(e){return e=null==e?Pf:Math.pow(Pf,e),new rm(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ef:Math.pow(Ef,e),new rm(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 Xf(om(e>=240?e-240:e+120,i,n),om(e,i,n),om(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new rm(nm(this.h),im(this.s),im(this.l),Zf(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=Zf(this.opacity);return`${1===e?"hsl(":"hsla("}${nm(this.h)}, ${100*im(this.s)}%, ${100*im(this.l)}%${1===e?")":`, ${e})`}`}}));const am=e=>()=>e;function sm(e,t){return function(r){return e+r*t}}function lm(e){return 1===(e=+e)?cm: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):am(isNaN(t)?r:t)}}function cm(e,t){var r=t-e;return r?sm(e,r):am(isNaN(e)?t:e)}const um=function e(t){var r=lm(t);function n(e,t){var n=r((e=Gf(e)).r,(t=Gf(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=cm(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 hm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var dm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pm=new RegExp(dm.source,"g");function gm(e,t){var r,n,i,o=dm.lastIndex=pm.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=dm.exec(e))&&(n=pm.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:hm(r,n)})),o=pm.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 fm,mm=180/Math.PI,ym={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bm(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)*mm,skewX:Math.atan(l)*mm,scaleX:a,scaleY:s}}function vm(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:hm(e,i)},{i:l-2,x:hm(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:hm(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:hm(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:hm(e,r)},{i:s-2,x:hm(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 xm,Cm,wm=vm(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ym:bm(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),km=vm(function(e){return null==e?ym:(fm||(fm=document.createElementNS("http://www.w3.org/2000/svg","g")),fm.setAttribute("transform",e),(e=fm.transform.baseVal.consolidate())?bm((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ym)},", ",")",")"),Sm=0,_m=0,Tm=0,Am=0,Em=0,Pm=0,Mm="object"==typeof performance&&performance.now?performance:Date,Im="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Bm(){return Em||(Im(Lm),Em=Mm.now()+Pm)}function Lm(){Em=0}function jm(){this._call=this._time=this._next=null}function Nm(e,t,r){var n=new jm;return n.restart(e,t,r),n}function Dm(){Em=(Am=Mm.now())+Pm,Sm=_m=0;try{!function(){Bm(),++Sm;for(var e,t=xm;t;)(e=Em-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sm}()}finally{Sm=0,function(){var e,t,r=xm,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:xm=t);Cm=e,zm(n)}(),Em=0}}function Om(){var e=Mm.now(),t=e-Am;t>1e3&&(Pm-=t,Am=e)}function zm(e){Sm||(_m&&(_m=clearTimeout(_m)),e-Em>24?(e<1/0&&(_m=setTimeout(Dm,e-Mm.now()-Pm)),Tm&&(Tm=clearInterval(Tm))):(Tm||(Am=Mm.now(),Tm=setInterval(Om,1e3)),Sm=1,Im(Dm)))}function Fm(e,t,r){var n=new jm;return t=null==t?0:+t,n.restart(r=>{n.stop(),e(r+t)},t,r),n}jm.prototype=Nm.prototype={constructor:jm,restart:function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Bm():+r)+(null==t?0:+t),this._next||Cm===this||(Cm?Cm._next=this:xm=this,Cm=this),this._call=e,this._time=r,zm()},stop:function(){this._call&&(this._call=null,this._time=1/0,zm())}};var Rm=sg("start","end","cancel","interrupt"),$m=[];function Vm(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 Fm(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(Fm(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=Nm(o,0,r.time)}(e,r,{name:t,index:n,group:i,on:Rm,tween:$m,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Wm(e,t){var r=Hm(e,t);if(r.state>0)throw new Error("too late; already scheduled");return r}function qm(e,t){var r=Hm(e,t);if(r.state>3)throw new Error("too late; already running");return r}function Hm(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Um(e,t){var r,n;return function(){var i=qm(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 Gm(e,t,r){var n,i;if("function"!=typeof r)throw new Error;return function(){var o=qm(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 Xm(e,t,r){var n=e._id;return e.each(function(){var e=qm(this,n);(e.value||(e.value={}))[t]=r.apply(this,arguments)}),function(e){return Hm(e,n).value[t]}}function Jm(e,t){var r;return("number"==typeof t?hm:t instanceof Wf?um:(r=Wf(t))?(t=r,um):gm)(e,t)}function Ym(e){return function(){this.removeAttribute(e)}}function Zm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Km(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 Qm(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 ey(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 ty(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 ry(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 ny(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 iy(e,t){return function(){Wm(this,e).delay=+t.apply(this,arguments)}}function oy(e,t){return t=+t,function(){Wm(this,e).delay=t}}function ay(e,t){return function(){qm(this,e).duration=+t.apply(this,arguments)}}function sy(e,t){return t=+t,function(){qm(this,e).duration=t}}var ly=kf.prototype.constructor;function cy(e){return function(){this.style.removeProperty(e)}}var uy=0;function hy(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function dy(){return++uy}var py=kf.prototype;hy.prototype={constructor:hy,select:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=bg(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,Vm(h[d],t,r,d,h,Hm(s,r)));return new hy(o,this._parents,t,r)},selectAll:function(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=xg(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),g=Hm(l,r),f=0,m=p.length;f<m;++f)(d=p[f])&&Vm(d,t,r,f,p,g);o.push(p),a.push(l)}return new hy(o,a,t,r)},selectChild:py.selectChild,selectChildren:py.selectChildren,filter:function(e){"function"!=typeof e&&(e=wg(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 hy(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 hy(a,this._parents,this._name,this._id)},selection:function(){return new ly(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,r=dy(),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=Hm(a,t);Vm(a,e,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new hy(n,this._parents,e,r)},call:py.call,nodes:py.nodes,node:py.node,size:py.size,empty:py.empty,each:py.each,on:function(e,t){var r=this._id;return arguments.length<2?Hm(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)?Wm:qm;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=pg(e),n="transform"===r?km:Jm;return this.attrTween(e,"function"==typeof t?(r.local?ty:ey)(r,n,Xm(this,"attr."+e,t)):null==t?(r.local?Zm:Ym)(r):(r.local?Qm:Km)(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=pg(e);return this.tween(r,(n.local?ry:ny)(n,t))},style:function(e,t,r){var n="transform"==(e+="")?wm:Jm;return null==t?this.styleTween(e,function(e,t){var r,n,i;return function(){var o=Hg(this,e),a=(this.style.removeProperty(e),Hg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}(e,n)).on("end.style."+e,cy(e)):"function"==typeof t?this.styleTween(e,function(e,t,r){var n,i,o;return function(){var a=Hg(this,e),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Hg(this,e)),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}(e,n,Xm(this,"style."+e,t))).each(function(e,t){var r,n,i,o,a="style."+t,s="end."+a;return function(){var l=qm(this,e),c=l.on,u=null==l.value[a]?o||(o=cy(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=Hg(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}}(Xm(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=Hm(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?Um:Gm)(r,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?iy:oy)(t,e)):Hm(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ay:sy)(t,e)):Hm(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(){qm(this,e).ease=t}}(t,e)):Hm(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;qm(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=qm(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]:py[Symbol.iterator]};var gy={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function fy(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}kf.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)})},kf.prototype.transition=function(e){var t,r;e instanceof hy?(t=e._id,e=e._name):(t=dy(),(r=gy).time=Bm(),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])&&Vm(a,e,t,c,s,r||fy(a,t));return new hy(n,this._parents,e,t)};const my=Math.PI,yy=2*my,by=1e-6,vy=yy-by;function xy(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class Cy{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?xy:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xy;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>by)if(Math.abs(u*s-l*c)>by&&i){let d=r-o,p=n-a,g=s*s+l*l,f=d*d+p*p,m=Math.sqrt(g),y=Math.sqrt(h),b=i*Math.tan((my-Math.acos((g+h-f)/(2*m*y)))/2),v=b/y,x=b/m;Math.abs(v-1)>by&&this._append`L${e+v*c},${t+v*u}`,this._append`A${i},${i},0,0,${+(u*d>c*p)},${this._x1=e+x*s},${this._y1=t+x*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)>by||Math.abs(this._y1-c)>by)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%yy+yy),h>vy?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>by&&this._append`A${r},${r},0,${+(h>=my)},${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 wy(e){return function(){return e}}const ky=Math.abs,Sy=Math.atan2,_y=Math.cos,Ty=Math.max,Ay=Math.min,Ey=Math.sin,Py=Math.sqrt,My=1e-12,Iy=Math.PI,By=Iy/2,Ly=2*Iy;function jy(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 Cy(t)}function Ny(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Dy(e){this._context=e}function Oy(e){return new Dy(e)}function zy(e){return e[0]}function Fy(e){return e[1]}function Ry(e,t){var r=wy(!0),n=null,i=Oy,o=null,a=jy(s);function s(s){var l,c,u,h=(s=Ny(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?zy:wy(e),t="function"==typeof t?t:void 0===t?Fy:wy(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:wy(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:wy(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:wy(!!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}Dy.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 $y{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 Vy(e){return new $y(e,!0)}function Wy(e){return new $y(e,!1)}function qy(){}function Hy(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 Uy(e){this._context=e}function Gy(e){return new Uy(e)}function Xy(e){this._context=e}function Jy(e){this._context=e}function Yy(e,t){this._basis=new Uy(e),this._beta=t}Uy.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:Hy(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:Hy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Xy.prototype={areaStart:qy,areaEnd:qy,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:Hy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Jy.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:Hy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Yy.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 Uy(e):new Yy(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function Ky(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 Qy(e,t){this._context=e,this._k=(1-t)/6}Qy.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:Ky(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:Ky(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 eb=function e(t){function r(e){return new Qy(e,t)}return r.tension=function(t){return e(+t)},r}(0);function tb(e,t){this._context=e,this._k=(1-t)/6}tb.prototype={areaStart:qy,areaEnd:qy,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:Ky(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 rb=function e(t){function r(e){return new tb(e,t)}return r.tension=function(t){return e(+t)},r}(0);function nb(e,t){this._context=e,this._k=(1-t)/6}nb.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:Ky(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 ib=function e(t){function r(e){return new nb(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ob(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>My){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>My){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 ab(e,t){this._context=e,this._alpha=t}ab.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:ob(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 sb=function e(t){function r(e){return t?new ab(e,t):new Qy(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function lb(e,t){this._context=e,this._alpha=t}lb.prototype={areaStart:qy,areaEnd:qy,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:ob(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 cb=function e(t){function r(e){return t?new lb(e,t):new tb(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ub(e,t){this._context=e,this._alpha=t}ub.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:ob(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 hb=function e(t){function r(e){return t?new ub(e,t):new nb(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function db(e){this._context=e}function pb(e){return e<0?-1:1}function gb(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(pb(o)+pb(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function fb(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function mb(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 yb(e){this._context=e}function bb(e){this._context=new vb(e)}function vb(e){this._context=e}function xb(e){return new yb(e)}function Cb(e){return new bb(e)}function wb(e){this._context=e}function kb(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 Sb(e){return new wb(e)}function _b(e,t){this._context=e,this._t=t}function Tb(e){return new _b(e,.5)}function Ab(e){return new _b(e,0)}function Eb(e){return new _b(e,1)}function Pb(e,t,r){this.k=e,this.x=t,this.y=r}db.prototype={areaStart:qy,areaEnd:qy,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))}},yb.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:mb(this,this._t0,fb(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,mb(this,fb(this,r=gb(this,e,t)),r);break;default:mb(this,this._t0,r=gb(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(bb.prototype=Object.create(yb.prototype)).point=function(e,t){yb.prototype.point.call(this,t,e)},vb.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)}},wb.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=kb(e),i=kb(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)}},_b.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}},Pb.prototype={constructor:Pb,scale:function(e){return 1===e?this:new Pb(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Pb(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+")"}},Pb.prototype;var Mb=Tu(e=>{var t;const{securityLevel:r}=Yp();let n=Sf("body");if("sandbox"===r){const r=Sf(`#i${e}`);n=Sf(((null==(t=r.node())?void 0:t.contentDocument)??document).body)}return n.select(`#${e}`)},"selectSvgElement");function Ib(e){return null==e}function Bb(e){return"object"==typeof e&&null!==e}function Lb(e){return Array.isArray(e)?e:Ib(e)?[]:[e]}function jb(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 Nb(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n}function Db(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}Tu(Ib,"isNothing"),Tu(Bb,"isObject"),Tu(Lb,"toArray"),Tu(jb,"extend"),Tu(Nb,"repeat"),Tu(Db,"isNegativeZero");var Ob={isNothing:Ib,isObject:Bb,toArray:Lb,repeat:Nb,isNegativeZero:Db,extend:jb};function zb(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 Fb(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=zb(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Tu(zb,"formatError"),Tu(Fb,"YAMLException$1"),Fb.prototype=Object.create(Error.prototype),Fb.prototype.constructor=Fb,Fb.prototype.toString=Tu(function(e){return this.name+": "+zb(this,e)},"toString");var Rb=Fb;function $b(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 Vb(e,t){return Ob.repeat(" ",t-e.length)+e}function Wb(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=$b(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),h),c=Ob.repeat(" ",t.indent)+Vb((e.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=$b(e.buffer,i[a],o[a],e.position,h),c+=Ob.repeat(" ",t.indent)+Vb((e.line+1).toString(),u)+" | "+l.str+"\n",c+=Ob.repeat("-",t.indent+u+3+l.pos)+"^\n",s=1;s<=t.linesAfter&&!(a+s>=o.length);s++)l=$b(e.buffer,i[a+s],o[a+s],e.position-(i[a]-i[a+s]),h),c+=Ob.repeat(" ",t.indent)+Vb((e.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}Tu($b,"getLine"),Tu(Vb,"padStart"),Tu(Wb,"makeSnippet");var qb=Wb,Hb=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ub=["scalar","sequence","mapping"];function Gb(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})}),t}function Xb(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===Hb.indexOf(t))throw new Rb('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=Gb(t.styleAliases||null),-1===Ub.indexOf(this.kind))throw new Rb('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Tu(Gb,"compileStyleAliases"),Tu(Xb,"Type$1");var Jb=Xb;function Yb(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 Zb(){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(Tu(n,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}function Kb(e){return this.extend(e)}Tu(Yb,"compileList"),Tu(Zb,"compileMap"),Tu(Kb,"Schema$1"),Kb.prototype.extend=Tu(function(e){var t=[],r=[];if(e instanceof Jb)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 Rb("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 Jb))throw new Rb("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Rb("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 Rb("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 Jb))throw new Rb("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Kb.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=Yb(n,"implicit"),n.compiledExplicit=Yb(n,"explicit"),n.compiledTypeMap=Zb(n.compiledImplicit,n.compiledExplicit),n},"extend");var Qb=new Kb({explicit:[new Jb("tag:yaml.org,2002:str",{kind:"scalar",construct:Tu(function(e){return null!==e?e:""},"construct")}),new Jb("tag:yaml.org,2002:seq",{kind:"sequence",construct:Tu(function(e){return null!==e?e:[]},"construct")}),new Jb("tag:yaml.org,2002:map",{kind:"mapping",construct:Tu(function(e){return null!==e?e:{}},"construct")})]});function ev(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function tv(){return null}function rv(e){return null===e}Tu(ev,"resolveYamlNull"),Tu(tv,"constructYamlNull"),Tu(rv,"isNull");var nv=new Jb("tag:yaml.org,2002:null",{kind:"scalar",resolve:ev,construct:tv,predicate:rv,represent:{canonical:Tu(function(){return"~"},"canonical"),lowercase:Tu(function(){return"null"},"lowercase"),uppercase:Tu(function(){return"NULL"},"uppercase"),camelcase:Tu(function(){return"Null"},"camelcase"),empty:Tu(function(){return""},"empty")},defaultStyle:"lowercase"});function iv(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 ov(e){return"true"===e||"True"===e||"TRUE"===e}function av(e){return"[object Boolean]"===Object.prototype.toString.call(e)}Tu(iv,"resolveYamlBoolean"),Tu(ov,"constructYamlBoolean"),Tu(av,"isBoolean");var sv=new Jb("tag:yaml.org,2002:bool",{kind:"scalar",resolve:iv,construct:ov,predicate:av,represent:{lowercase:Tu(function(e){return e?"true":"false"},"lowercase"),uppercase:Tu(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:Tu(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function lv(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function cv(e){return 48<=e&&e<=55}function uv(e){return 48<=e&&e<=57}function hv(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(!lv(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<r;n++)if("_"!==(t=e[n])){if(!cv(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<r;n++)if("_"!==(t=e[n])){if(!uv(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)}function dv(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 pv(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!Ob.isNegativeZero(e)}Tu(lv,"isHexCode"),Tu(cv,"isOctCode"),Tu(uv,"isDecCode"),Tu(hv,"resolveYamlInteger"),Tu(dv,"constructYamlInteger"),Tu(pv,"isInteger");var gv=new Jb("tag:yaml.org,2002:int",{kind:"scalar",resolve:hv,construct:dv,predicate:pv,represent:{binary:Tu(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:Tu(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:Tu(function(e){return e.toString(10)},"decimal"),hexadecimal:Tu(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"]}}),fv=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mv(e){return null!==e&&!(!fv.test(e)||"_"===e[e.length-1])}function yv(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)}Tu(mv,"resolveYamlFloat"),Tu(yv,"constructYamlFloat");var bv=/^[-+]?[0-9]+e/;function vv(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(Ob.isNegativeZero(e))return"-0.0";return r=e.toString(10),bv.test(r)?r.replace("e",".e"):r}function xv(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Ob.isNegativeZero(e))}Tu(vv,"representYamlFloat"),Tu(xv,"isFloat");var Cv=new Jb("tag:yaml.org,2002:float",{kind:"scalar",resolve:mv,construct:yv,predicate:xv,represent:vv,defaultStyle:"lowercase"}),wv=Qb.extend({implicit:[nv,sv,gv,Cv]}),kv=wv,Sv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_v=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 Tv(e){return null!==e&&(null!==Sv.exec(e)||null!==_v.exec(e))}function Av(e){var t,r,n,i,o,a,s,l,c=0,u=null;if(null===(t=Sv.exec(e))&&(t=_v.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 Ev(e){return e.toISOString()}Tu(Tv,"resolveYamlTimestamp"),Tu(Av,"constructYamlTimestamp"),Tu(Ev,"representYamlTimestamp");var Pv=new Jb("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Tv,construct:Av,instanceOf:Date,represent:Ev});function Mv(e){return"<<"===e||null===e}Tu(Mv,"resolveYamlMerge");var Iv=new Jb("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Mv}),Bv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Lv(e){if(null===e)return!1;var t,r,n=0,i=e.length,o=Bv;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 jv(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=Bv,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 Nv(e){var t,r,n="",i=0,o=e.length,a=Bv;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 Dv(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}Tu(Lv,"resolveYamlBinary"),Tu(jv,"constructYamlBinary"),Tu(Nv,"representYamlBinary"),Tu(Dv,"isBinary");var Ov=new Jb("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Lv,construct:jv,predicate:Dv,represent:Nv}),zv=Object.prototype.hasOwnProperty,Fv=Object.prototype.toString;function Rv(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]"!==Fv.call(n))return!1;for(i in n)if(zv.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 $v(e){return null!==e?e:[]}Tu(Rv,"resolveYamlOmap"),Tu($v,"constructYamlOmap");var Vv=new Jb("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Rv,construct:$v}),Wv=Object.prototype.toString;function qv(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]"!==Wv.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;o[t]=[i[0],n[i[0]]]}return!0}function Hv(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}Tu(qv,"resolveYamlPairs"),Tu(Hv,"constructYamlPairs");var Uv=new Jb("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:qv,construct:Hv}),Gv=Object.prototype.hasOwnProperty;function Xv(e){if(null===e)return!0;var t,r=e;for(t in r)if(Gv.call(r,t)&&null!==r[t])return!1;return!0}function Jv(e){return null!==e?e:{}}Tu(Xv,"resolveYamlSet"),Tu(Jv,"constructYamlSet");var Yv=new Jb("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xv,construct:Jv}),Zv=kv.extend({implicit:[Pv,Iv],explicit:[Ov,Vv,Uv,Yv]}),Kv=Object.prototype.hasOwnProperty,Qv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ex=/[\x85\u2028\u2029]/,tx=/[,\[\]\{\}]/,rx=/^(?:!|!!|![a-z\-]+!)$/i,nx=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ix(e){return Object.prototype.toString.call(e)}function ox(e){return 10===e||13===e}function ax(e){return 9===e||32===e}function sx(e){return 9===e||32===e||10===e||13===e}function lx(e){return 44===e||91===e||93===e||123===e||125===e}function cx(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ux(e){return 120===e?2:117===e?4:85===e?8:0}function hx(e){return 48<=e&&e<=57?e-48:-1}function dx(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 px(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}Tu(ix,"_class"),Tu(ox,"is_EOL"),Tu(ax,"is_WHITE_SPACE"),Tu(sx,"is_WS_OR_EOL"),Tu(lx,"is_FLOW_INDICATOR"),Tu(cx,"fromHexCode"),Tu(ux,"escapedHexLen"),Tu(hx,"fromDecimalCode"),Tu(dx,"simpleEscapeSequence"),Tu(px,"charFromCodepoint");var gx,fx=new Array(256),mx=new Array(256);for(gx=0;gx<256;gx++)fx[gx]=dx(gx)?1:0,mx[gx]=dx(gx);function yx(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zv,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 bx(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=qb(r),new Rb(t,r)}function vx(e,t){throw bx(e,t)}function xx(e,t){e.onWarning&&e.onWarning.call(null,bx(e,t))}Tu(yx,"State$1"),Tu(bx,"generateError"),Tu(vx,"throwError"),Tu(xx,"throwWarning");var Cx={YAML:Tu(function(e,t,r){var n,i,o;null!==e.version&&vx(e,"duplication of %YAML directive"),1!==r.length&&vx(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&vx(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&vx(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&xx(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Tu(function(e,t,r){var n,i;2!==r.length&&vx(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],rx.test(n)||vx(e,"ill-formed tag handle (first argument) of the TAG directive"),Kv.call(e.tagMap,n)&&vx(e,'there is a previously declared suffix for "'+n+'" tag handle'),nx.test(i)||vx(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(o){vx(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i},"handleTagDirective")};function wx(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||vx(e,"expected valid JSON character");else Qv.test(s)&&vx(e,"the stream contains non-printable characters");e.result+=s}}function kx(e,t,r,n){var i,o,a,s;for(Ob.isObject(r)||vx(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],Kv.call(t,o)||(t[o]=r[o],n[o]=!0)}function Sx(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])&&vx(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===ix(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===ix(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)kx(e,t,o[c],r);else kx(e,t,o,r);else e.json||Kv.call(r,i)||!Kv.call(t,i)||(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,vx(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 _x(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):vx(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Tx(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;ax(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(!ox(i))break;for(_x(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&&xx(e,"deficient indentation"),n}function Ax(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))&&!sx(t)))}function Ex(e,t){1===t?e.result+=" ":t>1&&(e.result+=Ob.repeat("\n",t-1))}function Px(e,t,r){var n,i,o,a,s,l,c,u,h=e.kind,d=e.result;if(sx(u=e.input.charCodeAt(e.position))||lx(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)&&(sx(n=e.input.charCodeAt(e.position+1))||r&&lx(n)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(sx(n=e.input.charCodeAt(e.position+1))||r&&lx(n))break}else if(35===u){if(sx(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Ax(e)||r&&lx(u))break;if(ox(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,Tx(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&&(wx(e,i,o,!1),Ex(e,e.line-s),i=o=e.position,a=!1),ax(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return wx(e,i,o,!1),!!e.result||(e.kind=h,e.result=d,!1)}function Mx(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(wx(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,i=e.position}else ox(r)?(wx(e,n,i,!0),Ex(e,Tx(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Ax(e)?vx(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);vx(e,"unexpected end of the stream within a single quoted scalar")}function Ix(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 wx(e,r,e.position,!0),e.position++,!0;if(92===s){if(wx(e,r,e.position,!0),ox(s=e.input.charCodeAt(++e.position)))Tx(e,!1,t);else if(s<256&&fx[s])e.result+=mx[s],e.position++;else if((a=ux(s))>0){for(i=a,o=0;i>0;i--)(a=cx(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:vx(e,"expected hexadecimal character");e.result+=px(o),e.position++}else vx(e,"unknown escape sequence");r=n=e.position}else ox(s)?(wx(e,r,n,!0),Ex(e,Tx(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Ax(e)?vx(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}vx(e,"unexpected end of the stream within a double quoted scalar")}function Bx(e,t){var r,n,i,o,a,s,l,c,u,h,d,p,g=!0,f=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(Tx(e,!0,t),(p=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=f,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=o,!0;g?44===p&&vx(e,"expected the node content, but found ','"):vx(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&sx(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,Tx(e,!0,t)),r=e.line,n=e.lineStart,i=e.position,Fx(e,t,1,!1,!0),h=e.tag,u=e.result,Tx(e,!0,t),p=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==p||(s=!0,p=e.input.charCodeAt(++e.position),Tx(e,!0,t),Fx(e,t,1,!1,!0),d=e.result),c?Sx(e,o,y,h,u,d,r,n,i):s?o.push(Sx(e,null,y,h,u,d,r,n,i)):o.push(u),Tx(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(g=!0,p=e.input.charCodeAt(++e.position)):g=!1}vx(e,"unexpected end of the stream within a flow collection")}function Lx(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:vx(e,"repeat of a chomping mode identifier");else{if(!((i=hx(o))>=0))break;0===i?vx(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?vx(e,"repeat of an indentation width identifier"):(c=t+i-1,l=!0)}if(ax(o)){do{o=e.input.charCodeAt(++e.position)}while(ax(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!ox(o)&&0!==o)}for(;0!==o;){for(_x(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),ox(o))u++;else{if(e.lineIndent<c){3===a?e.result+=Ob.repeat("\n",s?1+u:u):1===a&&s&&(e.result+="\n");break}for(n?ax(o)?(h=!0,e.result+=Ob.repeat("\n",s?1+u:u)):h?(h=!1,e.result+=Ob.repeat("\n",u+1)):0===u?s&&(e.result+=" "):e.result+=Ob.repeat("\n",u):e.result+=Ob.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=e.position;!ox(o)&&0!==o;)o=e.input.charCodeAt(++e.position);wx(e,r,e.position,!1)}}return!0}function jx(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,vx(e,"tab characters must not be used in indentation")),45===n)&&sx(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Tx(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,Fx(e,t,3,!1,!0),a.push(e.result),Tx(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)vx(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 Nx(e,t,r){var n,i,o,a,s,l,c,u=e.tag,h=e.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,b=!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,vx(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!sx(n)){if(a=e.line,s=e.lineStart,l=e.position,!Fx(e,r,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);ax(c);)c=e.input.charCodeAt(++e.position);if(58===c)sx(c=e.input.charCodeAt(++e.position))||vx(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Sx(e,d,p,g,f,null,a,s,l),g=f=m=null),b=!0,y=!1,i=!1,g=e.tag,f=e.result;else{if(!b)return e.tag=u,e.anchor=h,!0;vx(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=h,!0;vx(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Sx(e,d,p,g,f,null,a,s,l),g=f=m=null),b=!0,y=!0,i=!0):y?(y=!1,i=!0):vx(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),Fx(e,t,4,!0,i)&&(y?f=e.result:m=e.result),y||(Sx(e,d,p,g,f,m,a,s,l),g=f=m=null),Tx(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)vx(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Sx(e,d,p,g,f,null,a,s,l),b&&(e.tag=u,e.anchor=h,e.kind="mapping",e.result=d),b}function Dx(e){var t,r,n,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&vx(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)):vx(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!sx(i);)33===i&&(a?vx(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),rx.test(r)||vx(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),tx.test(n)&&vx(e,"tag suffix cannot contain flow indicator characters")}n&&!nx.test(n)&&vx(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(s){vx(e,"tag name is malformed: "+n)}return o?e.tag=n:Kv.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:vx(e,'undeclared tag handle "'+r+'"'),!0}function Ox(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&vx(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!sx(r)&&!lx(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&vx(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function zx(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&&!sx(n)&&!lx(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&vx(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Kv.call(e.anchorMap,r)||vx(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Tx(e,!0,-1),!0}function Fx(e,t,r,n,i){var o,a,s,l,c,u,h,d,p,g=1,f=!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&&Tx(e,!0,-1)&&(f=!0,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)),1===g)for(;Dx(e)||Ox(e);)Tx(e,!0,-1)?(f=!0,s=o,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)):s=!1;if(s&&(s=f||i),1!==g&&4!==r||(d=1===r||2===r?t:t+1,p=e.position-e.lineStart,1===g?s&&(jx(e,p)||Nx(e,p,d))||Bx(e,d)?m=!0:(a&&Lx(e,d)||Mx(e,d)||Ix(e,d)?m=!0:zx(e)?(m=!0,null===e.tag&&null===e.anchor||vx(e,"alias node should not have any properties")):Px(e,d,1===r)&&(m=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(m=s&&jx(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&&vx(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(Kv.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||vx(e,"unknown tag !<"+e.tag+">"),null!==e.result&&h.kind!==e.kind&&vx(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)):vx(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 Rx(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))&&(Tx(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&&!sx(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&vx(e,"directive name must not be less than one character in length");0!==i;){for(;ax(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!ox(i));break}if(ox(i))break;for(t=e.position;0!==i&&!sx(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&_x(e),Kv.call(Cx,r)?Cx[r](e,r,n):xx(e,'unknown document directive "'+r+'"')}Tx(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,Tx(e,!0,-1)):a&&vx(e,"directives end mark is expected"),Fx(e,e.lineIndent-1,4,!1,!0),Tx(e,!0,-1),e.checkLineBreaks&&ex.test(e.input.slice(o,e.position))&&xx(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ax(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Tx(e,!0,-1)):e.position<e.length-1&&vx(e,"end of the stream or a document separator is expected")}function $x(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 yx(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,vx(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;)Rx(r);return r.documents}function Vx(e,t){var r=$x(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Rb("expected a single document in the stream, but found more")}}Tu(wx,"captureSegment"),Tu(kx,"mergeMappings"),Tu(Sx,"storeMappingPair"),Tu(_x,"readLineBreak"),Tu(Tx,"skipSeparationSpace"),Tu(Ax,"testDocumentSeparator"),Tu(Ex,"writeFoldedLines"),Tu(Px,"readPlainScalar"),Tu(Mx,"readSingleQuotedScalar"),Tu(Ix,"readDoubleQuotedScalar"),Tu(Bx,"readFlowCollection"),Tu(Lx,"readBlockScalar"),Tu(jx,"readBlockSequence"),Tu(Nx,"readBlockMapping"),Tu(Dx,"readTagProperty"),Tu(Ox,"readAnchorProperty"),Tu(zx,"readAlias"),Tu(Fx,"composeNode"),Tu(Rx,"readDocument"),Tu($x,"loadDocuments"),Tu(function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=$x(e,r);if("function"!=typeof t)return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])},"loadAll$1"),Tu(Vx,"load$1");var Wx={load:Vx},qx=Object.prototype.toString,Hx=Object.prototype.hasOwnProperty,Ux=65279,Gx={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"},Xx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Jx=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Yx(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])&&Hx.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s;return r}function Zx(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 Rb("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+Ob.repeat("0",n-t.length)+t}Tu(Yx,"compileStyleMap"),Tu(Zx,"encodeHex");function Kx(e){this.schema=e.schema||Zv,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ob.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Yx(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 Qx(e,t){for(var r,n=Ob.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 eC(e,t){return"\n"+Ob.repeat(" ",e.indent*t)}function tC(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 rC(e){return 32===e||9===e}function nC(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Ux||65536<=e&&e<=1114111}function iC(e){return nC(e)&&e!==Ux&&13!==e&&10!==e}function oC(e,t,r){var n=iC(e),i=n&&!rC(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||iC(t)&&!rC(t)&&35===e||58===t&&i}function aC(e){return nC(e)&&e!==Ux&&!rC(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 sC(e){return!rC(e)&&58!==e}function lC(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 cC(e){return/^\n* /.test(e)}Tu(Kx,"State"),Tu(Qx,"indentString"),Tu(eC,"generateNextLine"),Tu(tC,"testImplicitResolving"),Tu(rC,"isWhitespace"),Tu(nC,"isPrintable"),Tu(iC,"isNsCharOrWhitespace"),Tu(oC,"isPlainSafe"),Tu(aC,"isPlainSafeFirst"),Tu(sC,"isPlainSafeLast"),Tu(lC,"codePointAt"),Tu(cC,"needIndentIndicator");function uC(e,t,r,n,i,o,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==n,g=-1,f=aC(lC(e,0))&&sC(lC(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(!nC(c=lC(e,l)))return 5;f=f&&oC(c,u,s),u=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(10===(c=lC(e,l)))h=!0,p&&(d=d||l-g-1>n&&" "!==e[g+1],g=l);else if(!nC(c))return 5;f=f&&oC(c,u,s),u=c}d=d||p&&l-g-1>n&&" "!==e[g+1]}return h||d?r>9&&cC(e)?5:a?2===o?5:2:d?4:3:!f||a||i(e)?2===o?5:2:1}function hC(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Xx.indexOf(t)||Jx.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 tC(e,t)}switch(Tu(l,"testAmbiguity"),uC(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"|"+dC(t,e.indent)+pC(Qx(t,o));case 4:return">"+dC(t,e.indent)+pC(Qx(gC(t,a),o));case 5:return'"'+mC(t)+'"';default:throw new Rb("impossible error: invalid scalar style")}}()}function dC(e,t){var r=cC(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function pC(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function gC(e,t){for(var r,n,i,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=e.indexOf("\n"))?r:e.length,o.lastIndex=r,fC(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")+fC(c,t),s=n}return a}function fC(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 mC(e){for(var t,r="",n=0,i=0;i<e.length;n>=65536?i+=2:i++)n=lC(e,i),!(t=Gx[n])&&nC(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||Zx(n);return r}function yC(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)),(wC(e,t,o,!1,!1)||void 0===o&&wC(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}function bC(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)),(wC(e,t+1,a,!0,!0,!1,!0)||void 0===a&&wC(e,t+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=eC(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function vC(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)),wC(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),wC(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}function xC(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 Rb("sortKeys must be a boolean or a function");for(i=0,o=d.length;i<o;i+=1)c="",n&&""===u||(c+=eC(e,t)),s=r[a=d[i]],e.replacer&&(s=e.replacer.call(r,a,s)),wC(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+=eC(e,t)),wC(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 CC(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]"===qx.call(s.represent))n=s.represent(t,l);else{if(!Hx.call(s.represent,l))throw new Rb("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');n=s.represent[l](t,l)}e.dump=n}return!0}return!1}function wC(e,t,r,n,i,o,a){e.tag=null,e.dump=r,CC(e,r,!1)||CC(e,r,!0);var s,l=qx.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?(xC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(vC(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?bC(e,t-1,e.dump,i):bC(e,t,e.dump,i),h&&(e.dump="&ref_"+u+e.dump)):(yC(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 Rb("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&hC(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 kC(e,t){var r,n,i=[],o=[];for(SC(e,i,o),r=0,n=o.length;r<n;r+=1)t.duplicates.push(i[o[r]]);t.usedDuplicates=new Array(n)}function SC(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)SC(e[i],t,r);else for(i=0,o=(n=Object.keys(e)).length;i<o;i+=1)SC(e[n[i]],t,r)}Tu(uC,"chooseScalarStyle"),Tu(hC,"writeScalar"),Tu(dC,"blockHeader"),Tu(pC,"dropEndingNewline"),Tu(gC,"foldString"),Tu(fC,"foldLine"),Tu(mC,"escapeString"),Tu(yC,"writeFlowSequence"),Tu(bC,"writeBlockSequence"),Tu(vC,"writeFlowMapping"),Tu(xC,"writeBlockMapping"),Tu(CC,"detectType"),Tu(wC,"writeNode"),Tu(kC,"getDuplicateReferences"),Tu(SC,"inspectNode"),Tu(function(e,t){var r=new Kx(t=t||{});r.noRefs||kC(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),wC(r,0,n,!0,!0)?r.dump+"\n":""},"dump$1"),Tu(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 _C=wv,TC=Wx.load,AC={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},EC={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function PC(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=MC(e),t=MC(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}}Tu(PC,"calculateDeltaAndAngle");var MC=Tu(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),IC=Tu(e=>({x:Tu(function(t,r,n){let i=0;const o=MC(n[0]).x<MC(n[n.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(AC,e.arrowTypeStart)){const{angle:t,deltaX:r}=PC(n[0],n[1]);i=AC[e.arrowTypeStart]*Math.cos(t)*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(AC,e.arrowTypeEnd)){const{angle:t,deltaX:r}=PC(n[n.length-1],n[n.length-2]);i=AC[e.arrowTypeEnd]*Math.cos(t)*(r>=0?1:-1)}const a=Math.abs(MC(t).x-MC(n[n.length-1]).x),s=Math.abs(MC(t).y-MC(n[n.length-1]).y),l=Math.abs(MC(t).x-MC(n[0]).x),c=Math.abs(MC(t).y-MC(n[0]).y),u=AC[e.arrowTypeStart],h=AC[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 MC(t).x+i},"x"),y:Tu(function(t,r,n){let i=0;const o=MC(n[0]).y<MC(n[n.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(AC,e.arrowTypeStart)){const{angle:t,deltaY:r}=PC(n[0],n[1]);i=AC[e.arrowTypeStart]*Math.abs(Math.sin(t))*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(AC,e.arrowTypeEnd)){const{angle:t,deltaY:r}=PC(n[n.length-1],n[n.length-2]);i=AC[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(r>=0?1:-1)}const a=Math.abs(MC(t).y-MC(n[n.length-1]).y),s=Math.abs(MC(t).x-MC(n[n.length-1]).x),l=Math.abs(MC(t).y-MC(n[0]).y),c=Math.abs(MC(t).x-MC(n[0]).x),u=AC[e.arrowTypeStart],h=AC[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 MC(t).y+i},"y")}),"getLineFunctionsWithOffset"),BC=Tu(({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"),LC=Tu(e=>{const{handDrawnSeed:t}=Yp();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),jC=Tu(e=>{const t=NC([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),NC=Tu(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"),DC=Tu(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"),OC=Tu(e=>{const{stylesArray:t}=jC(e),r=[],n=[],i=[],o=[];return t.forEach(e=>{const t=e[0];DC(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"),zC=Tu((e,t)=>{var r;const{themeVariables:n,handDrawnSeed:i}=Yp(),{nodeBorder:o,mainBkg:a}=n,{stylesMap:s}=jC(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:FC(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),FC=Tu(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"),RC={},$C={};Object.defineProperty($C,"__esModule",{value:!0}),$C.BLANK_URL=$C.relativeFirstCharacters=$C.whitespaceEscapeCharsRegex=$C.urlSchemeRegex=$C.ctrlCharactersRegex=$C.htmlCtrlEntityRegex=$C.htmlEntitiesRegex=$C.invalidProtocolRegex=void 0,$C.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$C.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$C.htmlCtrlEntityRegex=/&(newline|tab);/gi,$C.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$C.urlSchemeRegex=/^.+(:|&colon;)/gim,$C.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$C.relativeFirstCharacters=[".","/"],$C.BLANK_URL="about:blank",Object.defineProperty(RC,"__esModule",{value:!0});var VC=RC.sanitizeUrl=function(e){if(!e)return WC.BLANK_URL;var t,r=HC(e.trim());do{t=(r=HC(r=qC(r).replace(WC.htmlCtrlEntityRegex,"").replace(WC.ctrlCharactersRegex,"").replace(WC.whitespaceEscapeCharsRegex,"").trim())).match(WC.ctrlCharactersRegex)||r.match(WC.htmlEntitiesRegex)||r.match(WC.htmlCtrlEntityRegex)||r.match(WC.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var n=r;if(!n)return WC.BLANK_URL;if(function(e){return WC.relativeFirstCharacters.indexOf(e[0])>-1}(n))return n;var i=n.trimStart(),o=i.match(WC.urlSchemeRegex);if(!o)return n;var a=o[0].toLowerCase().trim();if(WC.invalidProtocolRegex.test(a))return WC.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 WC.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s},WC=$C;function qC(e){return e.replace(WC.ctrlCharactersRegex,"").replace(WC.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function HC(e){try{return decodeURIComponent(e)}catch(t){return e}}var UC="object"==typeof global&&global&&global.Object===Object&&global,GC="object"==typeof self&&self&&self.Object===Object&&self,XC=UC||GC||Function("return this")(),JC=XC.Symbol,YC=Object.prototype,ZC=YC.hasOwnProperty,KC=YC.toString,QC=JC?JC.toStringTag:void 0;var ew=Object.prototype.toString;var tw=JC?JC.toStringTag:void 0;function rw(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":tw&&tw in Object(e)?function(e){var t=ZC.call(e,QC),r=e[QC];try{e[QC]=void 0;var n=!0}catch(o){}var i=KC.call(e);return n&&(t?e[QC]=r:delete e[QC]),i}(e):function(e){return ew.call(e)}(e)}function nw(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function iw(e){if(!nw(e))return!1;var t=rw(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ow,aw=XC["__core-js_shared__"],sw=(ow=/[^.]+$/.exec(aw&&aw.keys&&aw.keys.IE_PROTO||""))?"Symbol(src)_1."+ow:"";var lw=Function.prototype.toString;function cw(e){if(null!=e){try{return lw.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var uw=/^\[object .+?Constructor\]$/,hw=Function.prototype,dw=Object.prototype,pw=hw.toString,gw=dw.hasOwnProperty,fw=RegExp("^"+pw.call(gw).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mw(e){return!(!nw(e)||(t=e,sw&&sw in t))&&(iw(e)?fw:uw).test(cw(e));var t}function yw(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return mw(r)?r:void 0}var bw=yw(Object,"create");var vw=Object.prototype.hasOwnProperty;var xw=Object.prototype.hasOwnProperty;function Cw(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 ww(e,t){return e===t||e!=e&&t!=t}function kw(e,t){for(var r=e.length;r--;)if(ww(e[r][0],t))return r;return-1}Cw.prototype.clear=function(){this.__data__=bw?bw(null):{},this.size=0},Cw.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Cw.prototype.get=function(e){var t=this.__data__;if(bw){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return vw.call(t,e)?t[e]:void 0},Cw.prototype.has=function(e){var t=this.__data__;return bw?void 0!==t[e]:xw.call(t,e)},Cw.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bw&&void 0===t?"__lodash_hash_undefined__":t,this};var Sw=Array.prototype.splice;function _w(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])}}_w.prototype.clear=function(){this.__data__=[],this.size=0},_w.prototype.delete=function(e){var t=this.__data__,r=kw(t,e);return!(r<0)&&(r==t.length-1?t.pop():Sw.call(t,r,1),--this.size,!0)},_w.prototype.get=function(e){var t=this.__data__,r=kw(t,e);return r<0?void 0:t[r][1]},_w.prototype.has=function(e){return kw(this.__data__,e)>-1},_w.prototype.set=function(e,t){var r=this.__data__,n=kw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var Tw=yw(XC,"Map");function Aw(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 Ew(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])}}Ew.prototype.clear=function(){this.size=0,this.__data__={hash:new Cw,map:new(Tw||_w),string:new Cw}},Ew.prototype.delete=function(e){var t=Aw(this,e).delete(e);return this.size-=t?1:0,t},Ew.prototype.get=function(e){return Aw(this,e).get(e)},Ew.prototype.has=function(e){return Aw(this,e).has(e)},Ew.prototype.set=function(e,t){var r=Aw(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Pw(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(Pw.Cache||Ew),r}Pw.Cache=Ew;function Mw(e){var t=this.__data__=new _w(e);this.size=t.size}Mw.prototype.clear=function(){this.__data__=new _w,this.size=0},Mw.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Mw.prototype.get=function(e){return this.__data__.get(e)},Mw.prototype.has=function(e){return this.__data__.has(e)},Mw.prototype.set=function(e,t){var r=this.__data__;if(r instanceof _w){var n=r.__data__;if(!Tw||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ew(n)}return r.set(e,t),this.size=r.size,this};var Iw=function(){try{var e=yw(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();function Bw(e,t,r){"__proto__"==t&&Iw?Iw(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Lw(e,t,r){(void 0!==r&&!ww(e[t],r)||void 0===r&&!(t in e))&&Bw(e,t,r)}var jw=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},Nw="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dw=Nw&&"object"==typeof module&&module&&!module.nodeType&&module,Ow=Dw&&Dw.exports===Nw?XC.Buffer:void 0,zw=Ow?Ow.allocUnsafe:void 0;function Fw(e,t){if(t)return e.slice();var r=e.length,n=zw?zw(r):new e.constructor(r);return e.copy(n),n}var Rw=XC.Uint8Array;function $w(e){var t=new e.constructor(e.byteLength);return new Rw(t).set(new Rw(e)),t}function Vw(e,t){var r=t?$w(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ww(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var qw=Object.create,Hw=function(){function e(){}return function(t){if(!nw(t))return{};if(qw)return qw(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Uw(e,t){return function(r){return e(t(r))}}var Gw=Uw(Object.getPrototypeOf,Object),Xw=Object.prototype;function Jw(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Xw)}function Yw(e){return"function"!=typeof e.constructor||Jw(e)?{}:Hw(Gw(e))}function Zw(e){return null!=e&&"object"==typeof e}function Kw(e){return Zw(e)&&"[object Arguments]"==rw(e)}var Qw=Object.prototype,ek=Qw.hasOwnProperty,tk=Qw.propertyIsEnumerable,rk=Kw(function(){return arguments}())?Kw:function(e){return Zw(e)&&ek.call(e,"callee")&&!tk.call(e,"callee")},nk=Array.isArray;function ik(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ok(e){return null!=e&&ik(e.length)&&!iw(e)}var ak="object"==typeof exports&&exports&&!exports.nodeType&&exports,sk=ak&&"object"==typeof module&&module&&!module.nodeType&&module,lk=sk&&sk.exports===ak?XC.Buffer:void 0,ck=(lk?lk.isBuffer:void 0)||function(){return!1},uk=Function.prototype,hk=Object.prototype,dk=uk.toString,pk=hk.hasOwnProperty,gk=dk.call(Object);var fk={};function mk(e){return function(t){return e(t)}}fk["[object Float32Array]"]=fk["[object Float64Array]"]=fk["[object Int8Array]"]=fk["[object Int16Array]"]=fk["[object Int32Array]"]=fk["[object Uint8Array]"]=fk["[object Uint8ClampedArray]"]=fk["[object Uint16Array]"]=fk["[object Uint32Array]"]=!0,fk["[object Arguments]"]=fk["[object Array]"]=fk["[object ArrayBuffer]"]=fk["[object Boolean]"]=fk["[object DataView]"]=fk["[object Date]"]=fk["[object Error]"]=fk["[object Function]"]=fk["[object Map]"]=fk["[object Number]"]=fk["[object Object]"]=fk["[object RegExp]"]=fk["[object Set]"]=fk["[object String]"]=fk["[object WeakMap]"]=!1;var yk="object"==typeof exports&&exports&&!exports.nodeType&&exports,bk=yk&&"object"==typeof module&&module&&!module.nodeType&&module,vk=bk&&bk.exports===yk&&UC.process,xk=function(){try{var e=bk&&bk.require&&bk.require("util").types;return e||vk&&vk.binding&&vk.binding("util")}catch(t){}}(),Ck=xk&&xk.isTypedArray,wk=Ck?mk(Ck):function(e){return Zw(e)&&ik(e.length)&&!!fk[rw(e)]};function kk(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Sk=Object.prototype.hasOwnProperty;function _k(e,t,r){var n=e[t];Sk.call(e,t)&&ww(n,r)&&(void 0!==r||t in e)||Bw(e,t,r)}function Tk(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?Bw(r,s,l):_k(r,s,l)}return r}var Ak=/^(?:0|[1-9]\d*)$/;function Ek(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ak.test(e))&&e>-1&&e%1==0&&e<t}var Pk=Object.prototype.hasOwnProperty;function Mk(e,t){var r=nk(e),n=!r&&rk(e),i=!r&&!n&&ck(e),o=!r&&!n&&!i&&wk(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&&!Pk.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ek(c,l))||s.push(c);return s}var Ik=Object.prototype.hasOwnProperty;function Bk(e){if(!nw(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Jw(e),r=[];for(var n in e)("constructor"!=n||!t&&Ik.call(e,n))&&r.push(n);return r}function Lk(e){return ok(e)?Mk(e,!0):Bk(e)}function jk(e,t,r,n,i,o,a){var s=kk(e,r),l=kk(t,r),c=a.get(l);if(c)Lw(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=nk(l),g=!p&&ck(l),f=!p&&!g&&wk(l);h=l,p||g||f?nk(s)?h=s:Zw(u=s)&&ok(u)?h=Ww(s):g?(d=!1,h=Fw(l,!0)):f?(d=!1,h=Vw(l,!0)):h=[]:function(e){if(!Zw(e)||"[object Object]"!=rw(e))return!1;var t=Gw(e);if(null===t)return!0;var r=pk.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dk.call(r)==gk}(l)||rk(l)?(h=s,rk(s)?h=function(e){return Tk(e,Lk(e))}(s):nw(s)&&!iw(s)||(h=Yw(l))):d=!1}d&&(a.set(l,h),i(h,l,n,o,a),a.delete(l)),Lw(e,r,h)}}function Nk(e,t,r,n,i){e!==t&&jw(t,function(o,a){if(i||(i=new Mw),nw(o))jk(e,t,a,r,Nk,n,i);else{var s=n?n(kk(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Lw(e,a,s)}},Lk)}function Dk(e){return e}var Ok=Math.max;var zk=Iw?function(e,t){return Iw(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Dk,Fk=Date.now;var Rk,$k,Vk,Wk=(Rk=zk,$k=0,Vk=0,function(){var e=Fk(),t=16-(e-Vk);if(Vk=e,t>0){if(++$k>=800)return arguments[0]}else $k=0;return Rk.apply(void 0,arguments)});function qk(e,t){return Wk(function(e,t,r){return t=Ok(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Ok(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,Dk),e+"")}var Hk,Uk=(Hk=function(e,t,r){Nk(e,t,r)},qk(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=Hk.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!nw(r))return!1;var n=typeof t;return!!("number"==n?ok(r)&&Ek(t,r.length):"string"==n&&t in r)&&ww(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&&Hk(e,a,r,i)}return e})),Gk={curveBasis:Gy,curveBasisClosed:function(e){return new Xy(e)},curveBasisOpen:function(e){return new Jy(e)},curveBumpX:Vy,curveBumpY:Wy,curveBundle:Zy,curveCardinalClosed:rb,curveCardinalOpen:ib,curveCardinal:eb,curveCatmullRomClosed:cb,curveCatmullRomOpen:hb,curveCatmullRom:sb,curveLinear:Oy,curveLinearClosed:function(e){return new db(e)},curveMonotoneX:xb,curveMonotoneY:Cb,curveNatural:Sb,curveStep:Tb,curveStepAfter:Eb,curveStepBefore:Ab},Xk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Jk=Tu(function(e,t){const r=Yk(e,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const e=r.map(e=>e.args);jd(e),n=fd(n,[...e])}else n=r.args;if(!n)return;let i=ud(e,t);const o="config";return void 0!==n[o]&&("flowchart-v2"===i&&(i="flowchart"),n[i]=n[o],delete n[o]),n},"detectInit"),Yk=Tu(function(e,t=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${Xk.source})(?=[}][%]{2}).*\n`,"ig");let o;e=e.trim().replace(i,"").replace(/'/gm,'"'),Pu.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:${e}`);const a=[];for(;null!==(o=ad.exec(e));)if(o.index===ad.lastIndex&&ad.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 Pu.error(`ERROR: ${i.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Zk=Tu(function(e){return e.replace(ad,"")},"removeDirectives"),Kk=Tu(function(e,t){for(const[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");function Qk(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Gk[r]??t}function eS(e,t){const r=e.trim();if(r)return"loose"!==t.securityLevel?VC(r):r}Tu(Qk,"interpolateToCurve"),Tu(eS,"formatUrl");var tS=Tu((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 Pu.error(`Function name: ${e} not found in window`);o[i](...t)},"runFunc");function rS(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function nS(e){let t,r=0;e.forEach(e=>{r+=rS(e,t),t=e});return aS(e,r/2)}function iS(e){return 1===e.length?e[0]:nS(e)}Tu(rS,"distance"),Tu(nS,"traverseEdge"),Tu(iS,"calcLabelPosition");var oS=Tu((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),aS=Tu((e,t)=>{let r,n=t;for(const i of e){if(r){const e=rS(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:oS((1-t)*r.x+t*i.x,5),y:oS((1-t)*r.y+t*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sS=Tu((e,t,r)=>{Pu.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=aS(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 lS(e,t,r){const n=structuredClone(r);Pu.info("our points",n),"start_left"!==t&&"start_right"!==t&&n.reverse();const i=aS(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 cS(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}}Tu(lS,"calcTerminalLabelPosition"),Tu(cS,"getStylesFromArray");var uS=0,hS=Tu(()=>(uS++,"id-"+Math.random().toString(36).substr(2,12)+"-"+uS),"generateId");function dS(e){let t="";const r="0123456789abcdef";for(let n=0;n<e;n++)t+=r.charAt(Math.floor(16*Math.random()));return t}Tu(dS,"makeRandomHex");var pS=Tu(e=>dS(e.length),"random"),gS=Tu(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"),fS=Tu(function(e,t){const r=t.text.replace(Ap.lineBreakRegex," "),[,n]=TS(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"),mS=Pw((e,t,r)=>{if(!e)return e;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ap.lineBreakRegex.test(e))return e;const n=e.split(" ").filter(Boolean),i=[];let o="";return n.forEach((e,a)=>{const s=vS(`${e} `,r),l=vS(o,r);if(s>t){const{hyphenatedStrings:n,remainingWord:a}=yS(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}`),yS=Pw((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(vS(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 bS(e,t){return CS(e,t).height}function vS(e,t){return CS(e,t).width}Tu(bS,"calculateTextHeight"),Tu(vS,"calculateTextWidth");var xS,CS=Pw((e,t)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};const[,o]=TS(r),a=["sans-serif",n],s=e.split(Ap.lineBreakRegex),l=[],c=Sf("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=gS();n.text=r||"​";const a=fS(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}`),wS=(Tu(p=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),p),kS=Tu(function(e){return xS=xS||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xS.innerHTML=e,unescape(xS.textContent)},"entityDecode");function SS(e){return"str"in e}Tu(SS,"isDetailedError");var _S=Tu((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"),TS=Tu(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 AS(e,t){return Uk({},e,t)}Tu(AS,"cleanAndMerge");var ES={assignWithDepth:fd,wrapLabel:mS,calculateTextHeight:bS,calculateTextWidth:vS,calculateTextDimensions:CS,cleanAndMerge:AS,detectInit:Jk,detectDirective:Yk,isSubstringInArray:Kk,interpolateToCurve:Qk,calcLabelPosition:iS,calcCardinalityPosition:sS,calcTerminalLabelPosition:lS,formatUrl:eS,getStylesFromArray:cS,generateId:hS,random:pS,runFunc:tS,entityDecode:kS,insertTitle:_S,isLabelCoordinateInPath:LS,parseFontSize:TS,InitIDGenerator:wS},PS=Tu(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"),MS=Tu(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),IS=Tu((e,t,{counter:r=0,prefix:n,suffix:i},o)=>o||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");function BS(e){return e??null}function LS(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())}Tu(BS,"handleUndefinedAttr"),Tu(LS,"isLabelCoordinateInPath");const jS=Object.freeze({left:0,top:0,width:16,height:16}),NS=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),DS=Object.freeze({...jS,...NS}),OS=Object.freeze({...DS,body:"",hidden:!1}),zS=Object.freeze({width:null,height:null}),FS=Object.freeze({...zS,...NS}),RS=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name);function $S(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 OS)n in NS?n in e&&!(n in r)&&(r[n]=NS[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function VS(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(e){o=$S(n[e]||i[e],o)}return a(t),r.forEach(a),$S(e,o)}function WS(e,t){if(e.icons[t])return VS(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?VS(e,t,r):null}const qS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,HS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function US(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(qS);if(null===n||!n.length)return e;const i=[];let o=n.shift(),a=HS.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 GS=/\sid="(\S+)"/g,XS=new Map;function JS(e){const t=[];let r;for(;r=GS.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=XS.get(e)||0;return XS.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 YS(){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 KS(e){ZS=e}var QS={exec:()=>null};function e_(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(r_.caret,"$1"),r=r.replace(e,i),n},getRegex:()=>new RegExp(r,t)};return n}var t_=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),r_={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")},n_=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,i_=/(?:[*+-]|\d{1,9}[.)])/,o_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,a_=e_(o_).replace(/bull/g,i_).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(),s_=e_(o_).replace(/bull/g,i_).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(),l_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,c_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,u_=e_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",c_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),h_=e_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,i_).getRegex(),d_="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",p_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,g_=e_("^ {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",p_).replace("tag",d_).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f_=e_(l_).replace("hr",n_).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",d_).getRegex(),m_={blockquote:e_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f_).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:u_,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:n_,html:g_,lheading:a_,list:h_,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:f_,table:QS,text:/^[^\n]+/},y_=e_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",n_).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",d_).getRegex(),b_={...m_,lheading:s_,table:y_,paragraph:e_(l_).replace("hr",n_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",y_).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",d_).getRegex()},v_={...m_,html:e_("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",p_).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:QS,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:e_(l_).replace("hr",n_).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},x_=/^( {2,}|\\)\n(?!\s*$)/,C_=/[\p{P}\p{S}]/u,w_=/[\s\p{P}\p{S}]/u,k_=/[^\s\p{P}\p{S}]/u,S_=e_(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,w_).getRegex(),__=/(?!~)[\p{P}\p{S}]/u,T_=e_(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",t_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),A_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,E_=e_(A_,"u").replace(/punct/g,C_).getRegex(),P_=e_(A_,"u").replace(/punct/g,__).getRegex(),M_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I_=e_(M_,"gu").replace(/notPunctSpace/g,k_).replace(/punctSpace/g,w_).replace(/punct/g,C_).getRegex(),B_=e_(M_,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,__).getRegex(),L_=e_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,k_).replace(/punctSpace/g,w_).replace(/punct/g,C_).getRegex(),j_=e_(/\\(punct)/,"gu").replace(/punct/g,C_).getRegex(),N_=e_(/^<(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(),D_=e_(p_).replace("(?:--\x3e|$)","--\x3e").getRegex(),O_=e_("^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",D_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),z_=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,F_=e_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",z_).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),R_=e_(/^!?\[(label)\]\[(ref)\]/).replace("label",z_).replace("ref",c_).getRegex(),$_=e_(/^!?\[(ref)\](?:\[\])?/).replace("ref",c_).getRegex(),V_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W_={_backpedal:QS,anyPunctuation:j_,autolink:N_,blockSkip:T_,br:x_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:QS,emStrongLDelim:E_,emStrongRDelimAst:I_,emStrongRDelimUnd:L_,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:F_,nolink:$_,punctuation:S_,reflink:R_,reflinkSearch:e_("reflink|nolink(?!\\()","g").replace("reflink",R_).replace("nolink",$_).getRegex(),tag:O_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:QS},q_={...W_,link:e_(/^!?\[(label)\]\((.*?)\)/).replace("label",z_).getRegex(),reflink:e_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z_).getRegex()},H_={...W_,emStrongRDelimAst:B_,emStrongLDelim:P_,url:e_(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",V_).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:e_(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",V_).getRegex()},U_={...H_,br:e_(x_).replace("{2,}","*").getRegex(),text:e_(H_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},G_={normal:m_,gfm:b_,pedantic:v_},X_={normal:W_,gfm:H_,breaks:U_,pedantic:q_},J_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Y_=e=>J_[e];function Z_(e,t){if(t){if(r_.escapeTest.test(e))return e.replace(r_.escapeReplace,Y_)}else if(r_.escapeTestNoEncode.test(e))return e.replace(r_.escapeReplaceNoEncode,Y_);return e}function K_(e){try{e=encodeURI(e).replace(r_.percentDecode,"%")}catch{return null}return e}function Q_(e,t){var r;let n=e.replace(r_.findPipe,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(r_.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(r_.slashPipe,"|");return n}function eT(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 tT(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 rT=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:eT(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=eT(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:eT(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=eT(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=Q_(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(Q_(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=eT(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)),tT(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 tT(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}}}},nT=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 rT,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:r_,block:G_.normal,inline:X_.normal};this.options.pedantic?(t.block=G_.pedantic,t.inline=X_.pedantic):this.options.gfm&&(t.block=G_.gfm,this.options.breaks?t.inline=X_.breaks:t.inline=X_.gfm),this.tokenizer.rules=t}static get rules(){return{block:G_,inline:X_}}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(r_.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(r_.tabCharGlobal," ").replace(r_.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}},iT=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(r_.notSpaceStart))?void 0:n[0],o=e.replace(r_.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=K_(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=K_(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)}},oT=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""}},aT=class e{constructor(e){y(this,"options"),y(this,"renderer"),y(this,"textRenderer"),this.options=e||ZS,this.options.renderer=this.options.renderer||new iT,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new oT}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}},sT=(g=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?nT.lex:nT.lexInline}provideParser(){return this.block?aT.parse:aT.parseInline}},y(g,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),y(g,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),g),lT=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",aT),y(this,"Renderer",iT),y(this,"TextRenderer",oT),y(this,"Lexer",nT),y(this,"Tokenizer",rT),y(this,"Hooks",sT),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 iT(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 rT(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 sT;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];sT.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async&&sT.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 nT.lex(e,t??this.defaults)}parser(e,t){return aT.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?nT.lex:nT.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?aT.parse:aT.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?nT.lex:nT.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?aT.parse:aT.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 cT(e,t){return lT.parse(e,t)}function uT(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}cT.options=cT.setOptions=function(e){return lT.setOptions(e),cT.defaults=lT.defaults,KS(cT.defaults),cT},cT.getDefaults=YS,cT.defaults=ZS,cT.use=function(...e){return lT.use(...e),cT.defaults=lT.defaults,KS(cT.defaults),cT},cT.walkTokens=function(e,t){return lT.walkTokens(e,t)},cT.parseInline=lT.parseInline,cT.Parser=aT,cT.parser=aT.parse,cT.Renderer=iT,cT.TextRenderer=oT,cT.Lexer=nT,cT.lexer=nT.lex,cT.Tokenizer=rT,cT.Hooks=sT,cT.parse=cT,cT.options,cT.setOptions,cT.use,cT.walkTokens,cT.parseInline,aT.parse,nT.lex;var hT={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},dT=new Map,pT=new Map,gT=Tu(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(Pu.debug("Registering icon pack:",t.name),"loader"in t)pT.set(t.name,t.loader);else{if(!("icons"in t))throw Pu.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');dT.set(t.name,t.icons)}}},"registerIconPacks"),fT=Tu(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 RS(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 RS(e)?e:null}if(r&&""===n){const e={provider:n,prefix:"",name:o};return RS(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=dT.get(n);if(!i){const e=pT.get(n);if(!e)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await e(),prefix:n},dT.set(n,i)}catch(a){throw Pu.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=WS(i,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),mT=Tu(async e=>{try{return await fT(e),!0}catch{return!1}},"isIconAvailable"),yT=Tu(async(e,t,r)=>{let n;try{n=await fT(e,null==t?void 0:t.fallbackPrefix)}catch(a){Pu.error(a),n=hT}const i=function(e,t){const r={...DS,...e},n={...FS,...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=US(h,l/c)):(u="auto"===a?l:a,h=null===s?US(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 g=[i.left,i.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,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>"}(JS(i.body),{...i.attributes,...r});return sp(o,Ud())},"getIconSVG");function bT(e,{markdownAutoWrap:t}){const r=uT(e.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===t?r.replace(/ /g,"&nbsp;"):r}function vT(e,t={}){const r=bT(e,t),n=cT.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(/&#39;/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 Tu(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 xT(e,{markdownAutoWrap:t}={}){const r=cT.lexer(e);function n(e){var r,i,o;return"text"===e.type?!1===t?e.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):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:(Pu.warn(`Unsupported markdown: ${e.type}`),e.raw)}return Tu(n,"output"),r.map(n).join("")}function CT(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function wT(e,t){return kT(e,[],CT(t.content),t.type)}function kT(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}])?kT(e,a,o,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function ST(e,t){if(e.some(({content:e})=>e.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return _T(e,t)}function _T(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 _T(e,t,r,a);if(n.length>0)r.push(n),e.unshift(o);else if(o.content){const[n,i]=wT(t,o);r.push([n]),i.content&&e.unshift(i)}return _T(e,t,r)}function TT(e,t){t&&e.attr("style",t)}async function AT(e,t,r,n,i=!1,o=Ud()){const a=e.append("foreignObject");a.attr("width",10*r+"px"),a.attr("height",10*r+"px");const s=a.append("xhtml:div"),l=kp(t.label)?await Tp(t.label.replace(Ap.lineBreakRegex,"\n"),o):sp(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(l),TT(u,t.labelStyle),u.attr("class",`${c} ${n}`),TT(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 ET(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 PT(e,t,r){const n=e.append("text"),i=ET(n,1,t);BT(i,r);const o=i.node().getComputedTextLength();return n.remove(),o}function MT(e,t,r){var n;const i=e.append("text"),o=ET(i,1,t);BT(o,[{content:r,type:"normal"}]);const a=null==(n=o.node())?void 0:n.getBoundingClientRect();return a&&i.remove(),a}function IT(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=Tu(t=>PT(i,1.1,t)<=e,"checkWidth"),r=t(l)?[l]:ST(l,t);for(const e of r){BT(ET(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 BT(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 LT(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,n,i)=>(r.push((async()=>{const r=`${n}:${i}`;return await mT(r)?await yT(r,void 0,{class:"label-icon"}):`<i class='${sp(e,t).replace(":"," ")}'></i>`})()),e));const n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}Tu(bT,"preprocessMarkdown"),Tu(vT,"markdownToLines"),Tu(xT,"markdownToHTML"),Tu(CT,"splitTextToChars"),Tu(wT,"splitWordToFitWidth"),Tu(kT,"splitWordToFitWidthRecursion"),Tu(ST,"splitLineToFitWidth"),Tu(_T,"splitLineToFitWidthRecursion"),Tu(TT,"applyStyle"),Tu(AT,"addHtmlSpan"),Tu(ET,"createTspan"),Tu(PT,"computeWidthOfText"),Tu(MT,"computeDimensionOfText"),Tu(IT,"createFormattedText"),Tu(BT,"updateTextContentAndStyles"),Tu(LT,"replaceIconSubstring");var jT=Tu(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:o=!0,isNode:a=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(Pu.debug("XYZ createText",t,r,n,i,o,a,"addSvgBackground: ",l),o){const n=xT(t,c),o=await LT(MS(n),c),u=t.replace(/\\\\/g,"\\"),h={isNode:a,label:kp(t)?u:o,labelStyle:r.replace("fill:","color:")};return await AT(e,h,s,i,l,c)}{const n=IT(s,e,vT(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:");Sf(n).attr("style",e)}else{const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Sf(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:");Sf(n).select("text").attr("style",t)}return n}},"createText");function NT(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 DT(e,t){return e[0]===t[0]&&e[1]===t[1]}function OT(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)NT(c,s,i);const l=function(e,t,r){const n=[];for(const c of e){const e=[...c];DT(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)NT(e,s,-i);!function(e,t,r){const n=[];e.forEach(e=>n.push(...e)),NT(n,t,r)}(l,s,-i)}return l}(e,i,n,o||1)}class zT{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const r=OT(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 FT(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 RT extends zT{fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);const n=OT(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)FT([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 $T extends zT{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 VT{constructor(e){this.helper=e}fillPolygons(e,t){const r=OT(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=FT(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 WT{constructor(e){this.helper=e}fillPolygons(e,t){const r=OT(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=FT(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 qT{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=OT(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=FT(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 HT={};class UT{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const GT={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 XT(e,t){return e.type===t}function JT(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(;!XT(o,2);){let a=0;const s=[];if("BOD"===n){if("M"!==o.text&&"m"!==o.text)return JT("M0,0"+e);i++,a=GT[o.text],n=o.text}else XT(o,1)?a=GT[n]:(i++,a=GT[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(!XT(t,1))throw new Error("Param not a number: "+n+","+t.text);s[s.length]=+t.text}if("number"!=typeof GT[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 YT(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,g=o+2*(c-o)/3;t.push({key:"C",data:[h,d,p,g,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||(QT(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 KT(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function QT(e,t,r,n,i,o,a,s,l,c){const u=(h=a,Math.PI*h/180);var h;let d=[],p=0,g=0,f=0,m=0;if(c)[p,g,f,m]=c;else{[e,t]=KT(e,t,-u),[r,n]=KT(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,b=d*y-d*c*c-y*a*a,v=d*c*c+y*a*a,x=(s===l?-1:1)*Math.sqrt(Math.abs(b/v));f=x*i*c/o+(e+r)/2,m=x*-o*a/i+(t+n)/2,p=Math.asin(parseFloat(((t-m)/o).toFixed(9))),g=Math.asin(parseFloat(((n-m)/o).toFixed(9))),e<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){const e=g,t=r,s=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=QT(r=f+i*Math.cos(g),n=m+o*Math.sin(g),t,s,i,o,a,0,l,[g,e,f,m])}y=g-p;const b=Math.cos(p),v=Math.sin(p),x=Math.cos(g),C=Math.sin(g),w=Math.tan(y/4),k=4/3*i*w,S=4/3*o*w,_=[e,t],T=[e+k*v,t-S*b],A=[r+k*C,n-S*x],E=[r,n];if(T[0]=2*_[0]-T[0],T[1]=2*_[1]-T[1],c)return[T,A,E].concat(d);{d=[T,A,E].concat(d);const e=[];for(let t=0;t<d.length;t+=3){const r=KT(d[t][0],d[t][1],u),n=KT(d[t+1][0],d[t+1][1],u),i=KT(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 eA={randOffset:function(e,t){return pA(e,t)},randOffsetWithRange:function(e,t,r){return dA(e,t,r)},ellipse:function(e,t,r,n,i){return oA(e,t,i,iA(r,n,i)).opset},doubleLineOps:function(e,t,r,n,i){return gA(e,t,r,n,i,!0)}};function tA(e,t,r,n,i){return{type:"path",ops:gA(e,t,r,n,i)}}function rA(e,t,r){const n=(e||[]).length;if(n>2){const i=[];for(let t=0;t<n-1;t++)i.push(...gA(e[t][0],e[t][1],e[t+1][0],e[t+1][1],r));return t&&i.push(...gA(e[n-1][0],e[n-1][1],e[0][0],e[0][1],r)),{type:"path",ops:i}}return 2===n?tA(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function nA(e,t){if(e.length){const r="number"==typeof e[0][0]?[e]:e,n=mA(r[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:mA(r[0],1.5*(1+.22*t.roughness),uA(t));for(let e=1;e<r.length;e++){const o=r[e];if(o.length){const e=mA(o,1*(1+.2*t.roughness),t),r=t.disableMultiStroke?[]:mA(o,1.5*(1+.22*t.roughness),uA(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 iA(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+=pA(a*l,r),s+=pA(s*l,r),{increment:o,rx:a,ry:s}}function oA(e,t,r,n){const[i,o]=bA(n.increment,e,t,n.rx,n.ry,1,n.increment*dA(.1,dA(.4,1,r),r),r);let a=yA(i,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[i]=bA(n.increment,e,t,n.rx,n.ry,1.5,0,r),o=yA(i,null,r);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function aA(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+=pA(.01*h,l),d+=pA(.01*d,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(g-p)/2),y=vA(m,c,u,h,d,p,g,1,l);if(!l.disableMultiStroke){const e=vA(m,c,u,h,d,p,g,1.5,l);y.push(...e)}return a&&(s?y.push(...gA(c,u,c+h*Math.cos(p),u+d*Math.sin(p),l),...gA(c,u,c+h*Math.cos(g),u+d*Math.sin(g),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 sA(e,t){const r=ZT(YT(JT(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(...gA(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(...xA(e,r,i,a,l,c,o,t)),o=[l,c];break}case"Z":n.push(...gA(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:n}}function lA(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]+pA(e,t),n[0][1]+pA(e,t)]});for(let o=1;o<i;o++)r.push({op:"lineTo",data:[n[o][0]+pA(e,t),n[o][1]+pA(e,t)]})}}return{type:"fillPath",ops:r}}function cA(e,t){return function(e,t){let r=e.fillStyle||"hachure";if(!HT[r])switch(r){case"zigzag":HT[r]||(HT[r]=new RT(t));break;case"cross-hatch":HT[r]||(HT[r]=new $T(t));break;case"dots":HT[r]||(HT[r]=new VT(t));break;case"dashed":HT[r]||(HT[r]=new WT(t));break;case"zigzag-line":HT[r]||(HT[r]=new qT(t));break;default:r="hachure",HT[r]||(HT[r]=new zT(t))}return HT[r]}(t,eA).fillPolygons(e,t)}function uA(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function hA(e){return e.randomizer||(e.randomizer=new UT(e.seed||0)),e.randomizer.next()}function dA(e,t,r,n=1){return r.roughness*n*(hA(r)*(t-e)+e)}function pA(e,t,r=1){return dA(-e,e,t,r)}function gA(e,t,r,n,i,o=!1){const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=fA(e,t,r,n,i,!0,!1);if(a)return s;const l=fA(e,t,r,n,i,!0,!0);return s.concat(l)}function fA(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*hA(i);let p=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=pA(p,i,c),g=pA(g,i,c);const f=[],m=()=>pA(h,i,c),y=()=>pA(u,i,c),b=i.preserveVertices;return a?f.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):f.push({op:"move",data:[e+(b?0:pA(u,i,c)),t+(b?0:pA(u,i,c))]}),a?f.push({op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(n-t)*d+m(),r+(b?0:m()),n+(b?0:m())]}):f.push({op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(n-t)*d+y(),r+(b?0:y()),n+(b?0:y())]}),f}function mA(e,t,r){if(!e.length)return[];const n=[];n.push([e[0][0]+pA(t,r),e[0][1]+pA(t,r)]),n.push([e[0][0]+pA(t,r),e[0][1]+pA(t,r)]);for(let i=1;i<e.length;i++)n.push([e[i][0]+pA(t,r),e[i][1]+pA(t,r)]),i===e.length-1&&n.push([e[i][0]+pA(t,r),e[i][1]+pA(t,r)]);return yA(n,null,r)}function yA(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(...fA(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return i}function bA(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=pA(.5,s)-Math.PI/2;c.push([pA(o,s)+t+.9*n*Math.cos(u-e),pA(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=[pA(o,s)+t+n*Math.cos(a),pA(o,s)+r+i*Math.sin(a)];l.push(e),c.push(e)}c.push([pA(o,s)+t+n*Math.cos(u+2*Math.PI+.5*a),pA(o,s)+r+i*Math.sin(u+2*Math.PI+.5*a)]),c.push([pA(o,s)+t+.98*n*Math.cos(u+a),pA(o,s)+r+.98*i*Math.sin(u+a)]),c.push([pA(o,s)+t+.9*n*Math.cos(u+.5*a),pA(o,s)+r+.9*i*Math.sin(u+.5*a)])}return[c,l]}function vA(e,t,r,n,i,o,a,s,l){const c=o+pA(.1,l),u=[];u.push([pA(s,l)+t+.9*n*Math.cos(c-e),pA(s,l)+r+.9*i*Math.sin(c-e)]);for(let h=c;h<=a;h+=e)u.push([pA(s,l)+t+n*Math.cos(h),pA(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)]),yA(u,0,l)}function xA(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:pA(c[0],s)),a[1]+(d?0:pA(c[0],s))]}),u=d?[i,o]:[i+pA(c[p],s),o+pA(c[p],s)],l.push({op:"bcurveTo",data:[e+pA(c[p],s),t+pA(c[p],s),r+pA(c[p],s),n+pA(c[p],s),u[0],u[1]]});return l}function CA(e){return[...e]}function wA(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(CA(e[0]),CA(e[1]),CA(e[2]),CA(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(CA(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 kA(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function SA(e,t,r){const n=kA(t,r);if(0===n)return kA(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)),kA(e,_A(t,r,i))}function _A(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function TA(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(kA(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=_A(o,a,n),u=_A(a,s,n),h=_A(s,l,n),d=_A(c,u,n),p=_A(u,h,n),g=_A(d,p,n);TA([o,c,d,g],0,r,i),TA([g,p,h,l],0,r,i)}var o,a;return i}function AA(e,t){return EA(e,0,e.length,t)}function EA(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=SA(e[u],a,s);t>l&&(l=t,c=u)}return Math.sqrt(l)>n?(EA(e,t,c+1,n,o),EA(e,c,r,n,o)):(o.length||o.push(a),o.push(s)),o}function PA(e,t=.15,r){const n=[],i=(e.length-1)/3;for(let o=0;o<i;o++)TA(e,3*o,t,n);return r&&r>0?EA(n,0,n.length,r):n}const MA="none";class IA{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",[tA(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 rA([[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(lA([i],o)):a.push(cA([i],o))}return o.stroke!==MA&&a.push(s),this._d("rectangle",a,o)}ellipse(e,t,r,n,i){const o=this._o(i),a=[],s=iA(r,n,o),l=oA(e,t,o,s);if(o.fill)if("solid"===o.fillStyle){const r=oA(e,t,o,s).opset;r.type="fillPath",a.push(r)}else a.push(cA([l.estimatedPoints],o));return o.stroke!==MA&&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",[rA(e,!1,r)],r)}arc(e,t,r,n,i,o,a=!1,s){const l=this._o(s),c=[],u=aA(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=aA(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+=pA(.01*c,a),u+=pA(.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,g=[];for(let f=h;f<=d;f+=p)g.push([s+c*Math.cos(f),l+u*Math.sin(f)]);return g.push([s+c*Math.cos(d),l+u*Math.sin(d)]),g.push([s,l]),cA([g],a)}(e,t,r,n,i,o,l));return l.stroke!==MA&&c.push(u),this._d("arc",c,l)}curve(e,t){const r=this._o(t),n=[],i=nA(e,r);if(r.fill&&r.fill!==MA)if("solid"===r.fillStyle){const t=nA(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(...PA(wA([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):t.push(...PA(wA(n),10,(1+r.roughness)/2))}t.length&&n.push(cA([t],r))}return r.stroke!==MA&&n.push(i),this._d("curve",n,r)}polygon(e,t){const r=this._o(t),n=[],i=rA(e,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(lA([e],r)):n.push(cA([e],r))),r.stroke!==MA&&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!==MA,o=r.stroke!==MA,a=!!(r.simplification&&r.simplification<1),s=function(e,t,r){const n=ZT(YT(JT(e))),i=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...PA(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=AA(h,r);e.length&&u.push(e)}return u}(e,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=sA(e,r);if(i)if("solid"===r.fillStyle)if(1===s.length){const t=sA(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(lA(s,r));else n.push(cA(s,r));return o&&(a?s.forEach(e=>{n.push(rA(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:MA};break;case"fillPath":e={d:this.opsToPath(i),stroke:MA,strokeWidth:0,fill:r.fill||MA};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||MA,strokeWidth:r,fill:MA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}}const BA="http://www.w3.org/2000/svg";class LA{constructor(e,t){this.svg=e,this.gen=new IA(t)}draw(e){const t=e.sets||[],r=e.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(BA,"g"),o=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=n.createElementNS(BA,"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(BA,"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(BA,"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 jA=(e,t)=>new LA(e,t),NA=Tu(async(e,t,r)=>{var n,i;let o;const a=t.useHtmlLabels||gp(null==(n=Yp())?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",BS(t.labelStyle));let c;c=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0];const u=await jT(l,sp(MS(c),Yp()),{useHtmlLabels:a,width:t.width||(null==(i=Yp().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=Sf(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=Yp().fontSize?Yp().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[n=Ld.fontSize]=TS(e),i=n*r+"px";t.style.minWidth=i,t.style.maxWidth=i}else t.style.width="100%";r(t)}Tu(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"),DA=Tu(async(e,t,r)=>{var n,i,o,a,s,l;const c=r.useHtmlLabels||gp(null==(i=null==(n=Yp())?void 0:n.flowchart)?void 0:i.htmlLabels),u=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),h=await jT(u,sp(MS(t),Yp()),{useHtmlLabels:c,width:r.width||(null==(a=null==(o=Yp())?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(gp(null==(l=null==(s=Yp())?void 0:s.flowchart)?void 0:l.htmlLabels)){const e=h.children[0],t=Sf(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"),OA=Tu((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),zA=Tu((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function FA(e){const t=e.map((e,t)=>`${0===t?"M":"L"}${e.x},${e.y}`);return t.push("Z"),t.join(" ")}function RA(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 $A(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}Tu(FA,"createPathFromPoints"),Tu(RA,"generateFullSineWavePoints"),Tu($A,"generateCirclePoints");var VA=Tu((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 WA(e,t){t&&e.attr("style",t)}async function qA(e){const t=Sf(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=Yp();let i=e.label;e.label&&kp(e.label)&&(i=await Tp(e.label.replace(Ap.lineBreakRegex,"\n"),n));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>";return r.html(sp(o,n)),WA(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()}Tu(WA,"applyStyle"),Tu(qA,"addHtmlLabel");var HA=Tu(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),gp(Yp().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),Pu.info("vertexText"+i);const e={isNode:n,label:MS(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`),labelStyle:t?t.replace("fill:","color:"):t};return await qA(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"),UA=Tu((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"),GA=Tu(async(e,t)=>{Pu.info("Creating subgraph rect for ",t.id,t);const r=Yp(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=OC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=gp(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),g=await jT(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let f=g.getBBox();if(gp(r.flowchart.htmlLabels)){const e=g.children[0],t=Sf(g);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-m/2,v=t.y-y/2;let x;if(Pu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=jA(h),r=zC(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:i}),n=e.path(UA(b,v,m,y,0),r);x=h.insert(()=>(Pu.debug("Rough node insert CXC",n),n),":first-child"),x.select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",u.join(";").replace("fill","stroke"))}else x=h.insert("rect",":first-child"),x.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",v).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=BC(r);if(p.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=x.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=f.height-t.padding/2,t.intersect=function(e){return VA(t,e)},{cluster:h,labelBBox:f}},"rect"),XA=Tu((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 VA(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),JA=Tu(async(e,t)=>{const r=Yp(),{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 HA(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(gp(r.flowchart.htmlLabels)){const e=p.children[0],t=Sf(p);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const f=0*t.padding,m=f/2,y=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+f;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,v=t.height+f-g.height-6,x=t.x-y/2,C=t.y-b/2;t.width=y;const w=t.y-t.height/2-m+g.height+2;let k;if("handDrawn"===t.look){const e=t.cssClasses.includes("statediagram-cluster-alt"),r=jA(c),n=t.rx||t.ry?r.path(UA(x,C,y,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:i}):r.rectangle(x,C,y,b,{seed:i});k=c.insert(()=>n,":first-child");const u=r.rectangle(x,w,y,v,{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",x).attr("y",C).attr("width",y).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",x).attr("y",w).attr("width",y).attr("height",v)}h.attr("transform",`translate(${t.x-g.width/2}, ${C+1-(gp(r.flowchart.htmlLabels)?0:3)})`);const S=k.node().getBBox();return t.height=S.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(e){return VA(t,e)},{cluster:c,labelBBox:g}},"roundedWithTitle"),YA=Tu(async(e,t)=>{Pu.info("Creating subgraph rect for ",t.id,t);const r=Yp(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:o,clusterBorder:a}=n,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:u}=OC(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=gp(r.flowchart.htmlLabels),p=h.insert("g").attr("class","cluster-label "),g=await jT(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let f=g.getBBox();if(gp(r.flowchart.htmlLabels)){const e=g.children[0],t=Sf(g);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-m/2,v=t.y-y/2;let x;if(Pu.trace("Data ",t,JSON.stringify(t)),"handDrawn"===t.look){const e=jA(h),r=zC(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:i}),n=e.path(UA(b,v,m,y,t.rx),r);x=h.insert(()=>(Pu.debug("Rough node insert CXC",n),n),":first-child"),x.select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",u.join(";").replace("fill","stroke"))}else x=h.insert("rect",":first-child"),x.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",v).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=BC(r);if(p.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+C})`),s){const e=p.select("span");e&&e.attr("style",s)}const w=x.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=f.height-t.padding/2,t.intersect=function(e){return VA(t,e)},{cluster:h,labelBBox:f}},"kanbanSection"),ZA={rect:GA,squareRect:GA,roundedWithTitle:JA,noteGroup:XA,divider:Tu((e,t)=>{const r=Yp(),{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=jA(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 g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return VA(t,e)},{cluster:a,labelBBox:{}}},"divider"),kanbanSection:YA},KA=new Map,QA=Tu(async(e,t)=>{const r=t.shape||"rect",n=await ZA[r](e,t);return KA.set(t.id,n),n},"insertCluster"),eE=Tu(()=>{KA=new Map},"clear");function tE(e,t){return e.intersect(t)}Tu(tE,"intersectNode");var rE=tE;function nE(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}}Tu(nE,"intersectEllipse");var iE=nE;function oE(e,t,r){return iE(e,t,t,r)}Tu(oE,"intersectCircle");var aE=oE;function sE(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&&lE(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,g=u*t.x+h*t.y+d;if(Math.abs(p)<c&&Math.abs(g)<c&&lE(p,g))return;const f=i*h-u*o;if(0===f)return;const m=Math.abs(f/2);let y=o*d-h*a;const b=y<0?(y-m)/f:(y+m)/f;y=u*a-i*d;return{x:b,y:y<0?(y-m)/f:(y+m)/f}}}function lE(e,t){return e*t>0}Tu(sE,"intersectLine"),Tu(lE,"sameSign");var cE=sE;function uE(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=cE(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}Tu(uE,"intersectPolygon");var hE={node:rE,circle:aE,ellipse:iE,polygon:uE,rect:VA};function dE(e,t){const{labelStyles:r}=OC(t);t.labelStyle=r;const n=zA(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=jA(o),l=zC(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",BS(a)),OA(t,u),t.intersect=function(e){return Pu.info("Circle intersect",t,1,e),hE.circle(t,1,e)},o}function pE(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),g=s+p*o*Math.sin(c)*(a?-1:1),f=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-f)/o,(e-g)/i);let y=Math.atan2((n-f)/o,(r-g)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const b=[];for(let v=0;v<20;v++){const e=m+v/19*y,t=g+i*Math.cos(e),r=f+o*Math.sin(e);b.push({x:t,y:r})}return b}async function gE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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},...pE(-a/2,-s/2,-a/2,s/2,c,l,!1),{x:a/2,y:s/2},...pE(a/2,s/2,a/2,-s/2,c,l,!0)],d=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=FA(h),f=d.path(g,p),m=i.insert(()=>f,":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)`),OA(t,m),t.intersect=function(e){return hE.polygon(t,h,e)},i}function fE(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 mE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,s,a,c);return n&&u.attr("style",n),OA(t,u),t.intersect=function(e){return hE.polygon(t,c,e)},i}function yE(e,t){const{nodeStyles:r}=OC(t);t.label="";const n=e.insert("g").attr("class",zA(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=jA(n),l=zC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=FA(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 hE.polygon(t,a,e)},n}async function bE(e,t,r){const{labelStyles:n,nodeStyles:i}=OC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,halfPadding:s}=await NA(e,t,zA(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=jA(o),r=zC(t,{}),n=e.circle(0,0,2*c,r);u=o.insert(()=>n,":first-child"),u.attr("class","basic label-container").attr("style",BS(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 OA(t,u),t.calcIntersect=function(e,t){const r=e.width/2;return hE.circle(e,r,t)},t.intersect=function(e){return Pu.info("Circle intersect",t,c,e),hE.circle(t,c,e)},o}function vE(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 xE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r,t.label="";const i=e.insert("g").attr("class",zA(t)).attr("id",t.domId??t.id),o=Math.max(30,(null==t?void 0:t.width)??0),{cssStyles:a}=t,s=jA(i),l=zC(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,2*o,l),u=vE(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),OA(t,d),t.intersect=function(e){Pu.info("crossedCircle intersect",t,{radius:o,point:e});return hE.circle(t,o,e)},i}function CE(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 wE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...CE(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...CE(s/2+2*c,-c,c,20,-180,-270),...CE(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...CE(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...CE(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...CE(s/2+.1*s,-c,c,20,-180,-270),...CE(s/2+.1*s,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...CE(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],p=jA(i),g=zC(t,{fill:"none"});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=FA(h).replace("Z",""),m=p.path(f,g),y=FA(d),b=p.path(y,{...g}),v=i.insert("g",":first-child");return v.insert(()=>b,":first-child").attr("stroke-opacity",0),v.insert(()=>m,":first-child"),v.attr("class","text"),u&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.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))})`),OA(t,v),t.intersect=function(e){return hE.polygon(t,d,e)},i}function kE(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 SE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[...kE(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...kE(s/2+2*c,-c,c,20,-180,-270),...kE(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...kE(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...kE(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...kE(s/2+2*c,-c,c,20,-180,-270),...kE(s/2+2*c,c,c,20,-90,-180),{x:s/2+c,y:l/2},...kE(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],p=jA(i),g=zC(t,{fill:"none"});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=FA(h).replace("Z",""),m=p.path(f,g),y=FA(d),b=p.path(y,{...g}),v=i.insert("g",":first-child");return v.insert(()=>b,":first-child").attr("stroke-opacity",0),v.insert(()=>m,":first-child"),v.attr("class","text"),u&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.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))})`),OA(t,v),t.intersect=function(e){return hE.polygon(t,d,e)},i}function _E(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 TE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(t)),s=o.width+(t.padding??0),l=o.height+(t.padding??0),c=Math.max(5,.1*l),{cssStyles:u}=t,h=[..._E(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},..._E(s/2+2*c,-c,c,20,-180,-270),..._E(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},..._E(s/2,l/2,c,20,0,90)],d=[..._E(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},..._E(-s/2-c/2,-c,c,20,0,90),..._E(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},..._E(-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},..._E(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},..._E(s/2+2*c,-c,c,20,-180,-270),..._E(s/2+2*c,c,c,20,-90,-180),{x:-s/2-c,y:l/2},..._E(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},..._E(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},..._E(-s/2-c/2,-c,c,20,0,90),..._E(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},..._E(-s/2+c+c/2,l/2,c,30,-180,-270)],g=jA(i),f=zC(t,{fill:"none"});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=FA(h).replace("Z",""),y=g.path(m,f),b=FA(d).replace("Z",""),v=g.path(b,f),x=FA(p),C=g.path(x,{...f}),w=i.insert("g",":first-child");return w.insert(()=>C,":first-child").attr("stroke-opacity",0),w.insert(()=>y,":first-child"),w.insert(()=>v,":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))})`),OA(t,w),t.intersect=function(e){return hE.polygon(t,p,e)},i}async function AE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),h=zC(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");const d=a-l,p=s/4,g=[{x:d,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:d,y:s},...$A(-d,-s/2,l,50,270,90)],f=FA(g),m=u.path(f,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})`),OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}Tu(dE,"anchor"),Tu(pE,"generateArcPoints"),Tu(gE,"bowTieRect"),Tu(fE,"insertPolygonShape"),Tu(mE,"card"),Tu(yE,"choice"),Tu(bE,"circle"),Tu(vE,"createLine"),Tu(xE,"crossedCircle"),Tu(CE,"generateCirclePoints"),Tu(wE,"curlyBraceLeft"),Tu(kE,"generateCirclePoints"),Tu(SE,"curlyBraceRight"),Tu(_E,"generateCirclePoints"),Tu(TE,"curlyBraces"),Tu(AE,"curvedTrapezoid");var EE=Tu((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"),PE=Tu((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"),ME=Tu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function IE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),r=PE(0,0,s,u,l,c),n=ME(0,c,s,u,l,c),o=e.path(r,zC(t,{})),a=e.path(n,zC(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=EE(0,0,s,u,l,c);h=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",BS(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),OA(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=hE.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 BE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),g=zC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=[{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(f.map(e=>[e.x,e.y]),g),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))})`),OA(t,y),t.intersect=function(e){return hE.rect(t,e)},i}async function LE(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=OC(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:l}=await NA(e,t,zA(t)),c=s.width/2+l+5,u=s.width/2+l;let h;const{cssStyles:d}=t;if("handDrawn"===t.look){const e=jA(a),i=zC(t,{roughness:.2,strokeWidth:2.5}),o=zC(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",BS(t.cssClasses)).attr("style",BS(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 OA(t,h),t.intersect=function(e){return Pu.info("DoubleCircle intersect",t,c,e),hE.circle(t,c,e)},a}function jE(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=OC(t);t.label="",t.labelStyle=n;const o=e.insert("g").attr("class",zA(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=jA(o),{nodeBorder:l}=r,c=zC(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),OA(t,h),t.intersect=function(e){Pu.info("filledCircle intersect",t,{radius:7,point:e});return hE.circle(t,7,e)},o}async function NE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=FA(u),f=d.path(g,p),m=i.insert(()=>f,":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,OA(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 Pu.info("Triangle intersect",t,u,e),hE.polygon(t,u,e)},i}function DE(e,t,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:o}=OC(t);t.label="";const a=e.insert("g").attr("class",zA(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=jA(a),p=zC(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=d.rectangle(u,h,l,c,p),f=a.insert(()=>g,":first-child");s&&"handDrawn"!==t.look&&f.selectAll("path").attr("style",s),o&&"handDrawn"!==t.look&&f.selectAll("path").attr("style",o),OA(t,f);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 hE.rect(t,e)},a}async function OE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),h=zC(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},...$A(-a/2+l,0,l,50,90,270),{x:a/2-l,y:s/2},{x:-a/2,y:s/2}],p=FA(d),g=u.path(p,h),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),OA(t,f),t.intersect=function(e){Pu.info("Pill intersect",t,{radius:l,point:e});return hE.polygon(t,d,e)},i}async function zE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(t)),a=o.height+(t.padding??0),s=o.width+2.5*(t.padding??0),{cssStyles:l}=t,c=jA(i),u=zC(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,g=[{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}],f=FA(g),m=c.path(f,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,OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function FE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.label="",t.labelStyle=r;const{shapeSvg:i}=await NA(e,t,zA(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=jA(i),c=zC(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=FA(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})`),OA(t,p),t.intersect=function(e){Pu.info("Pill intersect",t,{points:u});return hE.polygon(t,u,e)},i}async function RE(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),d="t"===t.pos,p=s,g=s,{nodeBorder:f}=r,{stylesMap:m}=jC(t),y=-g/2,b=-p/2,v=t.label?8:0,x=jA(c),C=zC(t,{stroke:"none",fill:"none"});"handDrawn"!==t.look&&(C.roughness=0,C.fillStyle="solid");const w=x.rectangle(y,b,g,p,C),k=Math.max(g,u.width),S=p+u.height+v,_=x.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 yT(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+v/2-i/2-a:-u.height/2-v/2-i/2-a})`),e.attr("style",`color: ${m.get("stroke")??f};`)}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+v/2:-u.height/2-v/2})`),OA(t,A),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.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+v},{x:r+g/2,y:n-i/2+u.height+v},{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+v},{x:r-u.width/2,y:n-i/2+u.height+v}]:[{x:r-g/2,y:n-i/2},{x:r+g/2,y:n-i/2},{x:r+g/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-g/2,y:n-i/2+p}];return hE.polygon(t,o,e)},c}async function $E(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),d=t.label?8:0,p="t"===t.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:m}=jC(t),y=jA(c),b=zC(t,{});"handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid");const v=m.get("fill");b.stroke=v??f;const x=c.append("g");t.icon&&x.html(`<g>${await yT(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=x.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,b),E=Math.max(T,u.width),P=T+u.height+d,M=y.rectangle(-E/2,-P/2,E,P,{...b,fill:"transparent",stroke:"none"}),I=c.insert(()=>A,":first-child"),B=c.insert(()=>M);return x.attr("transform",`translate(${-w/2-S},${p?u.height/2+d/2-k/2-_:-u.height/2-d/2-k/2-_})`),x.attr("style",`color: ${m.get("stroke")??g};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-P/2:P/2-u.height})`),I.attr("transform",`translate(0,${p?u.height/2+d/2:-u.height/2-d/2})`),OA(t,B),t.intersect=function(e){Pu.info("iconSquare intersect",t,e);return hE.rect(t,e)},c}async function VE(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),p="t"===t.pos,g=s+2*h,f=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:b}=jC(t),v=-f/2,x=-g/2,C=t.label?8:0,w=jA(c),k=zC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=b.get("fill");k.stroke=S??y;const _=w.path(UA(v,x,f,g,5),k),T=Math.max(f,u.width),A=g+u.height+C,E=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),P=c.insert(()=>_,":first-child").attr("class","icon-shape2"),M=c.insert(()=>E);if(t.icon){const e=c.append("g");e.html(`<g>${await yT(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: ${b.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),P.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),OA(t,M),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.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+f/2,y:n-i/2+u.height+C},{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+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+u.width/2,y:n-i/2+g},{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+g},{x:r-f/2,y:n-i/2+g}];return hE.polygon(t,o,e)},c}async function WE(e,t,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=OC(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 NA(e,t,"icon-shape default"),p="t"===t.pos,g=s+2*h,f=s+2*h,{nodeBorder:m,mainBkg:y}=r,{stylesMap:b}=jC(t),v=-f/2,x=-g/2,C=t.label?8:0,w=jA(c),k=zC(t,{});"handDrawn"!==t.look&&(k.roughness=0,k.fillStyle="solid");const S=b.get("fill");k.stroke=S??y;const _=w.path(UA(v,x,f,g,.1),k),T=Math.max(f,u.width),A=g+u.height+C,E=w.rectangle(-T/2,-A/2,T,A,{...k,fill:"transparent",stroke:"none"}),P=c.insert(()=>_,":first-child"),M=c.insert(()=>E);if(t.icon){const e=c.append("g");e.html(`<g>${await yT(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: ${b.get("stroke")??m};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-A/2:A/2-u.height})`),P.attr("transform",`translate(0,${p?u.height/2+C/2:-u.height/2-C/2})`),OA(t,M),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.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+f/2,y:n-i/2+u.height+C},{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+C},{x:r-u.width/2,y:n-i/2+u.height+C}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+u.width/2,y:n-i/2+g},{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+g},{x:r-f/2,y:n-i/2+g}];return hE.polygon(t,o,e)},c}async function qE(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}=OC(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 NA(e,t,"image-shape default"),g="t"===t.pos,f=-c/2,m=-u/2,y=t.label?8:0,b=jA(h),v=zC(t,{});"handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid");const x=b.rectangle(f,m,c,u,v),C=Math.max(c,d.width),w=u+d.height+y,k=b.rectangle(-C/2,-w/2,C,w,{...v,fill:"none",stroke:"none"}),S=h.insert(()=>x,":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},${g?w/2-u:-w/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-u/2-d.height/2-y/2:u/2-d.height/2+y/2})`),S.attr("transform",`translate(0,${g?d.height/2+y/2:-d.height/2-y/2})`),OA(t,_),t.intersect=function(e){if(Pu.info("iconSquare intersect",t,e),!t.label)return hE.rect(t,e);const r=t.x??0,n=t.y??0,i=t.height??0;let o=[];o=g?[{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 hE.polygon(t,o,e)},h}async function HE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}async function UE(e,t,r){const{labelStyles:n,nodeStyles:i}=OC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a}=await NA(e,t,zA(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:g}=t;if((null==r?void 0:r.rx)&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===t.look){const e=jA(o),r=zC(t,{}),n=d||p?e.path(UA(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",BS(g))}else h=o.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",BS(d)).attr("ry",BS(p)).attr("x",c).attr("y",u).attr("width",s).attr("height",l);return OA(t,h),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return hE.rect(t,e)},o}async function GE(e,t){const{shapeSvg:r,bbox:n,label:i}=await NA(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))})`),OA(t,o),t.intersect=function(e){return hE.rect(t,e)},r}async function XE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}async function JE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}function YE(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.label="",t.labelStyle=r;const i=e.insert("g").attr("class",zA(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=jA(i),u=zC(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");const h=FA(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})`),OA(t,p),t.intersect=function(e){Pu.info("lightningBolt intersect",t,e);return hE.polygon(t,l,e)},i}Tu(IE,"cylinder"),Tu(BE,"dividedRectangle"),Tu(LE,"doublecircle"),Tu(jE,"filledCircle"),Tu(NE,"flippedTriangle"),Tu(DE,"forkJoin"),Tu(OE,"halfRoundedRectangle"),Tu(zE,"hexagon"),Tu(FE,"hourglass"),Tu(RE,"icon"),Tu($E,"iconCircle"),Tu(VE,"iconRounded"),Tu(WE,"iconSquare"),Tu(qE,"imageSquare"),Tu(HE,"inv_trapezoid"),Tu(UE,"drawRect"),Tu(GE,"labelRect"),Tu(XE,"lean_left"),Tu(JE,"lean_right"),Tu(YE,"lightningBolt");var ZE=Tu((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"),KE=Tu((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"),QE=Tu((e,t,r,n,i,o)=>[`M${e-r/2},${-n/2}`,`a${i},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function eP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),r=KE(0,0,s,u,l,c,h),n=QE(0,c,s,u,l,c),o=zC(t,{}),a=e.path(r,o),g=e.path(n,o);i.insert(()=>g,":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=ZE(0,0,s,u,l,c,h);d=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",BS(p)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(u/2+c)})`),OA(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=hE.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 tP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:u/2},...RA(-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}],f=d.polygon(g.map(e=>[e.x,e.y]),p),m=i.insert(()=>f,":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))})`),OA(t,m),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function rP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{}),g=[{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}],f=[{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=FA(g),y=d.path(m,p),b=FA(f),v=d.path(b,{...p,fill:"none"}),x=i.insert(()=>v,":first-child");return x.insert(()=>y,":first-child"),x.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.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))})`),OA(t,x),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function nP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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,g=RA(h-5,d+u+5,h+s-5,d+u+5,c,.8),f=null==g?void 0:g[g.length-1],m=[{x:h-5,y:d+5},{x:h-5,y:d+u+5},...g,{x:h+s-5,y:f.y-5},{x:h+s,y:f.y-5},{x:h+s,y:f.y-10},{x:h+s+5,y:f.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:f.y-5},{x:h+s,y:f.y-5},{x:h+s,y:d},{x:h,y:d}],b=jA(i),v=zC(t,{});"handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid");const x=FA(m),C=b.path(x,v),w=FA(y),k=b.path(w,v),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))})`),OA(t,S),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function iP(e,t,{config:{themeVariables:r}}){var n;const{labelStyles:i,nodeStyles:o}=OC(t);t.labelStyle=i;t.useHtmlLabels||!1!==(null==(n=Ud().flowchart)?void 0:n.htmlLabels)||(t.centerLabel=!0);const{shapeSvg:a,bbox:s,label:l}=await NA(e,t,zA(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,g=jA(a),f=zC(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=g.rectangle(h,d,c,u,f),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))})`),OA(t,y),t.intersect=function(e){return hE.rect(t,e)},a}Tu(eP,"linedCylinder"),Tu(tP,"linedWaveEdgedRect"),Tu(rP,"multiRect"),Tu(nP,"multiWaveEdgedRectangle"),Tu(iP,"note");var oP=Tu((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 aP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=oP(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=fE(i,a,a,s),l.attr("transform",`translate(${-a/2+.5}, ${a/2})`);return n&&l.attr("style",n),OA(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=hE.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 sP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=FA(u),f=d.path(g,p),m=i.insert(()=>f,":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))})`),OA(t,m),t.intersect=function(e){return hE.polygon(t,u,e)},i}async function lP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=OC(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 HA(h,t.labelStyle,!0,!0));let p={width:0,height:0};if(gp(null==(n=null==(r=Yp())?void 0:r.flowchart)?void 0:n.htmlLabels)){const e=d.children[0],t=Sf(d);p=e.getBoundingClientRect(),t.attr("width",p.width),t.attr("height",p.height)}Pu.info("Text 2",u);const g=u||[],f=d.getBBox(),m=c.node().appendChild(await HA(g.join?g.join("<br/>"):g,t.labelStyle,!0,!0)),y=m.children[0],b=Sf(m);p=y.getBoundingClientRect(),b.attr("width",p.width),b.attr("height",p.height);const v=(t.padding||0)/2;Sf(m).attr("transform","translate( "+(p.width>f.width?0:(f.width-p.width)/2)+", "+(f.height+v+5)+")"),Sf(d).attr("transform","translate( "+(p.width<f.width?0:-(f.width-p.width)/2)+", 0)"),p=c.node().getBBox(),c.attr("transform","translate("+-p.width/2+", "+(-p.height/2-v+3)+")");const x=p.width+(t.padding||0),C=p.height+(t.padding||0),w=-p.width/2-v,k=-p.height/2-v;let S,_;if("handDrawn"===t.look){const e=jA(s),r=zC(t,{}),n=e.path(UA(w,k,x,C,t.rx||0),r),i=e.line(-p.width/2-v,-p.height/2-v+f.height+v,p.width/2+v,-p.height/2-v+f.height+v,r);_=s.insert(()=>(Pu.debug("Rough node insert CXC",n),i),":first-child"),S=s.insert(()=>(Pu.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-v).attr("y",-p.height/2-v).attr("width",p.width+(t.padding||0)).attr("height",p.height+(t.padding||0)),_.attr("class","divider").attr("x1",-p.width/2-v).attr("x2",p.width/2+v).attr("y1",-p.height/2-v+f.height+v).attr("y2",-p.height/2-v+f.height+v);return OA(t,S),t.intersect=function(e){return hE.rect(t,e)},s}function cP(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),g=s+p*o*Math.sin(c)*(a?-1:1),f=l-p*i*Math.cos(c)*(a?-1:1),m=Math.atan2((t-f)/o,(e-g)/i);let y=Math.atan2((n-f)/o,(r-g)/i)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const b=[];for(let v=0;v<20;v++){const e=m+v/19*y,t=g+i*Math.cos(e),r=f+o*Math.sin(e);b.push({x:t,y:r})}return b}async function uP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),g=zC(t,{});t.stroke&&(g.stroke=t.stroke),"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...cP(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},...cP(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},...cP(-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},...cP(-l/2,-c/2+h,-l/2+h,-c/2,u,u,!0)],m=FA(f),y=p.path(m,g),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),d&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",n),OA(t,b),t.intersect=function(e){return hE.polygon(t,f,e)},i}async function hP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),g=zC(t,{});"handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid");const f=[{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(f.map(e=>[e.x,e.y]),g),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container").attr("style",BS(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))})`),OA(t,y),t.intersect=function(e){return hE.rect(t,e)},i}async function dP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:u},{x:c,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-l/2}],f=FA(g),m=d.path(f,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))})`),OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function pP(e,t){return UE(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 gP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(t)),a=o.height+t.padding,s=o.width+a/4+t.padding,l=a/2,{cssStyles:c}=t,u=jA(i),h=zC(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},...$A(-s/2+l,0,l,50,90,270),{x:s/2-l,y:a/2},...$A(s/2-l,0,l,50,270,450)],p=FA(d),g=u.path(p,h),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),OA(t,f),t.intersect=function(e){return hE.polygon(t,d,e)},i}async function fP(e,t){return UE(e,t,{rx:5,ry:5})}function mP(e,t,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=OC(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=jA(c),h=zC(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,g=u.circle(0,0,5,{...h,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=c.insert(()=>d,":first-child");return f.insert(()=>g),o&&f.selectAll("path").attr("style",o),i&&f.selectAll("path").attr("style",i),OA(t,f),t.intersect=function(e){return hE.circle(t,7,e)},c}function yP(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=jA(i).circle(0,0,14,LC(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 OA(t,o),t.intersect=function(e){return hE.circle(t,7,e)},i}async function bP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(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",BS(d)),OA(t,h)}else{const e=fE(i,s,l,h);n&&e.attr("style",n),OA(t,e)}return t.intersect=function(e){return hE.polygon(t,h,e)},i}async function vP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),g=zC(t,{}),f=[{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&&(g.roughness=0,g.fillStyle="solid");const y=FA(f),b=p.path(y,g),v=FA(m),x=p.path(v,{...g,fillStyle:"solid"}),C=i.insert(()=>x,":first-child");return C.insert(()=>b,":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),OA(t,C),t.intersect=function(e){return hE.polygon(t,f,e)},i}async function xP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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,g=jA(i),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-s/2-s/2*.1,y:d/2},...RA(-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,b=-d/2-.4*h,v=[{x:y+s-u,y:1.4*(b+l)},{x:y+s,y:b+l-h},{x:y+s,y:.9*(b+l)},...RA(y+s,1.3*(b+l),y+s-u,1.5*(b+l),.03*-l,.5)],x=FA(m),C=g.path(x,f),w=FA(v),k=g.path(w,{...f,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))})`),OA(t,S),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function CP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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),OA(t,u),t.intersect=function(e){return hE.rect(t,e)},i}Tu(aP,"question"),Tu(sP,"rect_left_inv_arrow"),Tu(lP,"rectWithTitle"),Tu(cP,"generateArcPoints"),Tu(uP,"roundedRect"),Tu(hP,"shadedProcess"),Tu(dP,"slopedRect"),Tu(pP,"squareRect"),Tu(gP,"stadium"),Tu(fP,"state"),Tu(mP,"stateEnd"),Tu(yP,"stateStart"),Tu(bP,"subroutine"),Tu(vP,"taggedRect"),Tu(xP,"taggedWaveEdgedRectangle"),Tu(CP,"text");var wP=Tu((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"),kP=Tu((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"),SP=Tu((e,t,r,n,i,o)=>[`M${e+r/2},${-n/2}`,`a${i},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function _P(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a,halfPadding:s}=await NA(e,t,zA(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 g;if("handDrawn"===t.look){const e=jA(i),r=kP(0,0,d,c,h,u),n=SP(0,0,d,c,h,u),o=e.path(r,zC(t,{})),a=e.path(n,zC(t,{fill:"none"}));g=i.insert(()=>a,":first-child"),g=i.insert(()=>o,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const e=wP(0,0,d,c,h,u);g=i.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",BS(p)).attr("style",n),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",h),g.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))})`),OA(t,g),t.intersect=function(e){const r=hE.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 TP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),r=zC(t,{}),n=FA(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=fE(i,a,s,l);return n&&c.attr("style",n),t.width=a,t.height=s,OA(t,c),t.intersect=function(e){return hE.polygon(t,l,e)},i}async function AP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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=jA(i),u=zC(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=FA(h),p=c.path(d,u),g=i.insert(()=>p,":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",l),n&&"handDrawn"!==t.look&&g.selectChildren("path").attr("style",n),OA(t,g),t.intersect=function(e){return hE.polygon(t,h,e)},i}async function EP(e,t){var r;const{labelStyles:n,nodeStyles:i}=OC(t);t.labelStyle=n;const{shapeSvg:o,bbox:a,label:s}=await NA(e,t,zA(t)),l=gp(null==(r=Yp().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,g=jA(o),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=FA(d),y=g.path(m,f),b=o.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return p&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",p),i&&"handDrawn"!==t.look&&b.selectChildren("path").attr("style",i),t.width=c,t.height=u,OA(t,b),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 Pu.info("Triangle intersect",t,d,e),hE.polygon(t,d,e)},o}async function PP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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,g=jA(i),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-s/2-p,y:u/2},...RA(-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=FA(m),b=g.path(y,f),v=i.insert(()=>b,":first-child");return 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),v.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))})`),OA(t,v),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function MP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o}=await NA(e,t,zA(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,g=jA(i),f=zC(t,{});"handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:d/2},...RA(-c/2,d/2,c/2,d/2,h,1),{x:c/2,y:-d/2},...RA(c/2,-d/2,-c/2,-d/2,h,-1)],y=FA(m),b=g.path(y,f),v=i.insert(()=>b,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),OA(t,v),t.intersect=function(e){return hE.polygon(t,m,e)},i}async function IP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,label:a}=await NA(e,t,zA(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=jA(i),p=zC(t,{}),g=[{x:c-5,y:u-5},{x:c-5,y:u+l},{x:c+s,y:u+l},{x:c+s,y:u-5}],f=`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(f,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))})`),OA(t,y),t.intersect=function(e){return hE.polygon(t,g,e)},i}async function BP(e,t){var r,n,i,o;const a=t;if(a.alias&&(t.label=a.alias),"handDrawn"===t.look){const{themeVariables:r}=Ud(),{background:n}=r,i={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await BP(e,i)}const s=Ud();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}=OC(t);if(0===a.attributes.length&&t.label){const r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l};vS(t.label,s)+2*r.labelPaddingX<s.er.minEntityWidth&&(t.width=s.er.minEntityWidth);const n=await UE(e,t,r);if(!gp(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=zA(t);p||(p="node default");const g=e.insert("g").attr("class",p).attr("id",t.domId||t.id),f=await LP(g,t.label??"",s,0,0,["name"],h);f.height+=c;let m=0;const y=[],b=[];let v=0,x=0,C=0,w=0,k=!0,S=!0;for(const V of a.attributes){const e=await LP(g,V.type,s,0,m,["attribute-type"],h);v=Math.max(v,e.width+l);const t=await LP(g,V.name,s,0,m,["attribute-name"],h);x=Math.max(x,t.width+l);const r=await LP(g,V.keys.join(),s,0,m,["attribute-keys"],h);C=Math.max(C,r.width+l);const n=await LP(g,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;b.push({yOffset:m,rowHeight:i}),m+=i}let _=4;C<=l&&(k=!1,C=0,_--),w<=l&&(S=!1,w=0,_--);const T=g.node().getBBox();if(f.width+2*l-(v+x+C+w)>0){const e=f.width+2*l-(v+x+C+w);v+=e/_,x+=e/_,C>0&&(C+=e/_),w>0&&(w+=e/_)}const A=v+x+C+w,E=jA(g),P=zC(t,{});"handDrawn"!==t.look&&(P.roughness=0,P.fillStyle="solid");let M=0;b.length>0&&(M=b.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)+f.height,(null==t?void 0:t.height)||0),L=-I/2,j=-B/2;g.selectAll("g:not(:first-child)").each((e,t,r)=>{const n=Sf(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+=v:n.attr("class").includes("attribute-keys")?o+=v+x:n.attr("class").includes("attribute-comment")&&(o+=v+x+C))}n.attr("transform",`translate(${L+l/2+o}, ${a+j+f.height+c/2})`)}),g.select(".name").attr("transform","translate("+-f.width/2+", "+(j+c/2)+")");const N=E.rectangle(L,j,I,B,P),D=g.insert(()=>N,":first-child").attr("style",u.join("")),{themeVariables:O}=Ud(),{rowEven:z,rowOdd:F,nodeBorder:R}=O;y.push(0);for(const[V,W]of b.entries()){const e=(V+1)%2==0&&0!==W.yOffset,t=E.rectangle(L,f.height+j+(null==W?void 0:W.yOffset),I,null==W?void 0:W.rowHeight,{...P,fill:e?z:F,stroke:R});g.insert(()=>t,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let $=E.line(L,f.height+j,I+L,f.height+j,P);g.insert(()=>$).attr("class","divider"),$=E.line(v+L,f.height+j,v+L,B+j,P),g.insert(()=>$).attr("class","divider"),k&&($=E.line(v+x+L,f.height+j,v+x+L,B+j,P),g.insert(()=>$).attr("class","divider")),S&&($=E.line(v+x+C+L,f.height+j,v+x+C+L,B+j,P),g.insert(()=>$).attr("class","divider"));for(const V of y)$=E.line(L,f.height+j+V,I+L,f.height+j+V,P),g.insert(()=>$).attr("class","divider");if(OA(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("; ");g.selectAll("path").attr("style",t??""),g.selectAll(".row-rect-even path").attr("style",d)}return t.intersect=function(e){return hE.rect(t,e)},g}async function LP(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!==yp(t)&&(t=(t=yp(t)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=s.node().appendChild(await jT(s,t,{width:vS(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let e=l.children[0];for(e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(gp(r.htmlLabels)){const e=l.children[0];e.style.textAlign="start";const t=Sf(l);c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return c}async function jP(e,t,r,n,i=r.class.padding??12){const o=n?0:3,a=e.insert("g").attr("class",zA(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 NP(s,{text:`«${e}»`},0);h=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await NP(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=a.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){f+=await NP(c,b,f,[b.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 b of t.methods){m+=await NP(u,b,m,[b.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(${-g.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 NP(e,t,r,n=[]){const i=e.insert("g").attr("class","label").attr("style",n.join("; ")),o=Ud();let a="useHtmlLabels"in t?t.useHtmlLabels:gp(o.htmlLabels)??!0,s="";s="text"in t?t.text:t.label,!a&&s.startsWith("\\")&&(s=s.substring(1)),kp(s)&&(a=!0);const l=await jT(i,Qp(MS(s)),{width:vS(s,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,u=1;if(a){const e=l.children[0],t=Sf(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)}Tu(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")&&Sf(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const e=l.children[0];if(""===l.textContent||l.textContent.includes("&gt")){e.textContent=s[0]+s.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").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 DP(e,t){var r,n;const i=Yp(),o=i.class.padding??12,a=o,s=t.useHtmlLabels??gp(i.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:u}=await jP(e,t,i,s,a),{labelStyles:h,nodeStyles:d}=OC(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 g=0===l.members.length&&0===l.methods.length&&!(null==(n=i.class)?void 0:n.hideEmptyMembersBox),f=jA(c),m=zC(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");const y=u.width;let b=u.height;0===l.members.length&&0===l.methods.length?b+=a:l.members.length>0&&0===l.methods.length&&(b+=2*a);const v=-y/2,x=-b/2,C=f.rectangle(v-o,x-o-(g?o:0===l.members.length&&0===l.methods.length?-o/2:0),y+2*o,b+2*o+(g?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=Sf(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+x+o-(g?o:0===l.members.length&&0===l.methods.length?-o/2:0);s||(h-=4);let d=v;(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-(g?o/2:0)||0,_=c.select(".label-group").node().getBBox().height-(g?o/2:0)||0,T=c.select(".members-group").node().getBBox().height-(g?o/2:0)||0;if(l.members.length>0||l.methods.length>0||g){const e=f.line(k.x,S+_+x+o,k.x+k.width,S+_+x+o,m);c.insert(()=>e).attr("class","divider").attr("style",p)}if(g||l.members.length>0||l.methods.length>0){const e=f.line(k.x,S+_+T+x+2*a+o,k.x+k.width,S+_+T+x+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 OA(t,w),t.intersect=function(e){return hE.rect(t,e)},c}async function OP(e,t){var r,n;const{labelStyles:i,nodeStyles:o}=OC(t);t.labelStyle=i;const a=t,s=t,l="verifyMethod"in t,c=zA(t),u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let h;h=l?await zP(u,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):await zP(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=h;const p=await zP(u,a.name,d,t.labelStyle+"; font-weight: bold;");if(d+=p+20,l){d+=await zP(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),d,t.labelStyle);d+=await zP(u,""+(a.text?`Text: ${a.text}`:""),d,t.labelStyle);d+=await zP(u,""+(a.risk?`Risk: ${a.risk}`:""),d,t.labelStyle),await zP(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),d,t.labelStyle)}else{d+=await zP(u,""+(s.type?`Type: ${s.type}`:""),d,t.labelStyle),await zP(u,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),d,t.labelStyle)}const g=((null==(r=u.node())?void 0:r.getBBox().width)??200)+20,f=((null==(n=u.node())?void 0:n.getBBox().height)??200)+20,m=-g/2,y=-f/2,b=jA(u),v=zC(t,{});"handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid");const x=b.rectangle(m,y,g,f,v),C=u.insert(()=>x,":first-child");if(C.attr("class","basic label-container").attr("style",o),u.selectAll(".label").each((e,t,r)=>{const n=Sf(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-f/2;let l=m+10;0!==t&&1!==t||(l=o),n.attr("transform",`translate(${l}, ${s+20})`)}),d>h+p+20){const e=b.line(m,y+h+p+20,m+g,y+h+p+20,v);u.insert(()=>e).attr("style",o)}return OA(t,C),t.intersect=function(e){return hE.rect(t,e)},u}async function zP(e,t,r,n=""){if(""===t)return 0;const i=e.insert("g").attr("class","label").attr("style",n),o=Yp(),a=o.htmlLabels??!0,s=await jT(i,Qp(MS(t)),{width:vS(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:n},o);let l;if(a){const e=s.children[0],t=Sf(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("&gt;",">").replaceAll("&lt;","<"),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}Tu(_P,"tiltedCylinder"),Tu(TP,"trapezoid"),Tu(AP,"trapezoidalPentagon"),Tu(EP,"triangle"),Tu(PP,"waveEdgedRectangle"),Tu(MP,"waveRectangle"),Tu(IP,"windowPane"),Tu(BP,"erBox"),Tu(LP,"addText"),Tu(jP,"textHelper"),Tu(NP,"addText"),Tu(DP,"classBox"),Tu(OP,"requirementBox"),Tu(zP,"addText");var FP=Tu(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 RP(e,t,{config:r}){var n,i;const{labelStyles:o,nodeStyles:a}=OC(t);t.labelStyle=o||"";const s=t.width;t.width=(t.width??200)-10;const{shapeSvg:l,bbox:c,label:u}=await NA(e,t,zA(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 g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let f,m;({label:f,bbox:m}=d?await DA(d,"ticket"in t&&t.ticket||"",g):await DA(l,"ticket"in t&&t.ticket||"",g));const{label:y,bbox:b}=await DA(l,"assigned"in t&&t.assigned||"",g);t.width=s;const v=(null==t?void 0:t.width)||0,x=Math.max(m.height,b.height)/2,C=Math.max(c.height+20,(null==t?void 0:t.height)||0)+x,w=-v/2,k=-C/2;let S;u.attr("transform","translate("+(h-v/2)+", "+(-x-c.height/2)+")"),f.attr("transform","translate("+(h-v/2)+", "+(-x+c.height/2)+")"),y.attr("transform","translate("+(h+v/2-b.width-20)+", "+(-x+c.height/2)+")");const{rx:_,ry:T}=t,{cssStyles:A}=t;if("handDrawn"===t.look){const e=jA(l),r=zC(t,{}),n=_||T?e.path(UA(w,k,v,C,_||0),r):e.rectangle(w,k,v,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",v).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",FP(e))}}return OA(t,S),t.height=C,t.intersect=function(e){return hE.rect(t,e)},l}async function $P(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await NA(e,t,zA(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,g=Math.max(l,d),f=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*g},${-1*f*.1}\n a${u},${u} 1 0,0 ${.25*g},0\n a${u},${u} 1 0,0 ${.25*g},0\n a${u},${u} 1 0,0 ${.25*g},${.1*f}\n\n a${u},${u} 1 0,0 ${.15*g},${.33*f}\n a${.8*u},${.8*u} 1 0,0 0,${.34*f}\n a${u},${u} 1 0,0 ${-1*g*.15},${.33*f}\n\n a${u},${u} 1 0,0 ${-1*g*.25},${.15*f}\n a${u},${u} 1 0,0 ${-1*g*.25},0\n a${u},${u} 1 0,0 ${-1*g*.25},0\n a${u},${u} 1 0,0 ${-1*g*.25},${-1*f*.15}\n\n a${u},${u} 1 0,0 ${-1*g*.1},${-1*f*.33}\n a${.8*u},${.8*u} 1 0,0 0,${-1*f*.34}\n a${u},${u} 1 0,0 ${.1*g},${-1*f*.33}\n H0 V0 Z`;if("handDrawn"===t.look){const e=jA(i),r=zC(t,{}),n=e.path(y,r);m=i.insert(()=>n,":first-child"),m.attr("class","basic label-container").attr("style",BS(h))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return m.attr("transform",`translate(${-g/2}, ${-f/2})`),OA(t,m),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return Pu.info("Bang intersect",t,e),hE.rect(t,e)},i}async function VP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await NA(e,t,zA(t)),l=o.width+2*a,c=o.height+2*a,u=.15*l,h=.25*l,d=.35*l,p=.2*l,{cssStyles:g}=t;let f;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=jA(i),r=zC(t,{}),n=e.path(m,r);f=i.insert(()=>n,":first-child"),f.attr("class","basic label-container").attr("style",BS(g))}else f=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})`),f.attr("transform",`translate(${-l/2}, ${-c/2})`),OA(t,f),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return Pu.info("Cloud intersect",t,e),hE.rect(t,e)},i}async function WP(e,t){const{labelStyles:r,nodeStyles:n}=OC(t);t.labelStyle=r;const{shapeSvg:i,bbox:o,halfPadding:a,label:s}=await NA(e,t,zA(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()),OA(t,h),t.calcIntersect=function(e,t){return hE.rect(e,t)},t.intersect=function(e){return hE.rect(t,e)},i}async function qP(e,t){return bE(e,t,{padding:t.padding??0})}Tu(RP,"kanbanItem"),Tu($P,"bang"),Tu(VP,"cloud"),Tu(WP,"defaultMindmapNode"),Tu(qP,"mindmapCircle");var HP=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:pP},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:uP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:gP},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:bP},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:IE},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:bE},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:$P},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:VP},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:aP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:zE},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:JE},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:XE},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:TP},{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:HE},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:LE},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:CP},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:mE},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:hP},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:yP},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:mP},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:DE},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:FE},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:wE},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:SE},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:TE},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:YE},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:PP},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:OE},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:_P},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:eP},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:AE},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:BE},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:EP},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:IP},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:jE},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:AP},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:NE},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:dP},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:nP},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:rP},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:gE},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:xE},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:xP},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:vP},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:MP},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:sP},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tP}],UP=Tu(()=>{const e={state:fP,choice:yE,note:iP,rectWithTitle:lP,labelRect:GE,iconSquare:WE,iconCircle:$E,icon:RE,iconRounded:VE,imageSquare:qE,anchor:dE,kanbanItem:RP,mindmapCircle:qP,defaultMindmapNode:WP,classBox:DP,erBox:BP,requirementBox:OP},t=[...Object.entries(e),...HP.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 GP(e){return e in UP}Tu(GP,"isValidShape");var XP=new Map;async function JP(e,t,r){let n,i;"rect"===t.shape&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?UP[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),XP.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}Tu(JP,"insertNode");var YP=Tu((e,t)=>{XP.set(t.id,e)},"setNodeElem"),ZP=Tu(()=>{XP.clear()},"clear"),KP=Tu(e=>{const t=XP.get(e.id);Pu.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"),QP=Tu((e,t,r,n,i,o)=>{t.arrowTypeStart&&tM(e,"start",t.arrowTypeStart,r,n,i,o),t.arrowTypeEnd&&tM(e,"end",t.arrowTypeEnd,r,n,i,o)},"addEdgeMarkers"),eM={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}},tM=Tu((e,t,r,n,i,o,a)=>{var s;const l=eM[r];if(!l)return void Pu.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"),rM=new Map,nM=new Map,iM=Tu(()=>{rM.clear(),nM.clear()},"clear"),oM=Tu(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),aM=Tu(async(e,t)=>{let r=gp(Yp().flowchart.htmlLabels);const{labelStyles:n}=OC(t);t.labelStyle=n;const i=await jT(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Pu.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=Sf(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+")"),rM.set(t.id,o),t.width=l.width,t.height=l.height,t.startLabelLeft){const r=await HA(t.startLabelLeft,oM(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+")"),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).startLeft=n,sM(s,t.startLabelLeft)}if(t.startLabelRight){const r=await HA(t.startLabelRight,oM(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+")"),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).startRight=n,sM(s,t.startLabelRight)}if(t.endLabelLeft){const r=await HA(t.endLabelLeft,oM(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),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).endLeft=n,sM(s,t.endLabelLeft)}if(t.endLabelRight){const r=await HA(t.endLabelRight,oM(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),nM.get(t.id)||nM.set(t.id,{}),nM.get(t.id).endRight=n,sM(s,t.endLabelRight)}return i},"insertEdgeLabel");function sM(e,t){Yp().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}Tu(sM,"setTerminalWidth");var lM=Tu((e,t)=>{Pu.debug("Moving label abc88 ",e.id,e.label,rM.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=Yp(),{subGraphTitleTotalMargin:i}=BC(n);if(e.label){const n=rM.get(e.id);let o=e.x,a=e.y;if(r){const n=ES.calcLabelPosition(r);Pu.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=nM.get(e.id).startLeft;let n=e.x,i=e.y;if(r){const t=ES.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=nM.get(e.id).startRight;let n=e.x,i=e.y;if(r){const t=ES.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=nM.get(e.id).endLeft;let n=e.x,i=e.y;if(r){const t=ES.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=nM.get(e.id).endRight;let n=e.x,i=e.y;if(r){const t=ES.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=t.x,i=t.y}t.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),cM=Tu((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"),uM=Tu((e,t,r)=>{Pu.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),Pu.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 Pu.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"),hM=Tu((e,t)=>{Pu.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(e=>{if(Pu.info("abc88 checking point",e,t),cM(t,e)||i)Pu.warn("abc88 outside",e,n),n=e,i||r.push(e);else{const o=uM(t,n,e);Pu.debug("abc88 inside",e,n,o),Pu.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)?Pu.warn("abc88 no intersect",o,r):r.push(o),i=!0}}),Pu.debug("returning points",r),r},"cutPathAtIntersect");function dM(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}}Tu(dM,"extractCornerPoints");var pM=Tu(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"),gM=Tu(function(e){const{cornerPointPositions:t}=dM(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=pM(t,o,5),s=pM(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){Pu.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 Pu.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"),fM=Tu((e,t,r)=>{const n=e-t-r,i=Math.floor(n/4);return`0 ${t} ${Array(i).fill("2 2").join(" ")} ${r}`},"generateDashArray"),mM=Tu(function(e,t,r,n,i,o,a,s=!1){var l;const{handDrawnSeed:c}=Yp();let u=t.points,h=!1;const d=i;var p=o;const g=[];for(const M in t.cssCompiledStyles)DC(M)||g.push(t.cssCompiledStyles[M]);Pu.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])),Pu.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 f=btoa(JSON.stringify(u));t.toCluster&&(Pu.info("to cluster abc88",r.get(t.toCluster)),u=hM(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(Pu.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=hM(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=u.filter(e=>!Number.isNaN(e.y));m=gM(m);let y=Gy;switch(y=Oy,t.curve){case"linear":y=Oy;break;case"basis":default:y=Gy;break;case"cardinal":y=eb;break;case"bumpX":y=Vy;break;case"bumpY":y=Wy;break;case"catmullRom":y=sb;break;case"monotoneX":y=xb;break;case"monotoneY":y=Cb;break;case"natural":y=Sb;break;case"step":y=Tb;break;case"stepAfter":y=Eb;break;case"stepBefore":y=Ab}const{x:b,y:v}=IC(t),x=Ry().x(b).y(v).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?yM(vM(m,t),5):x(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=jA(e);Object.assign([],m);C+=" transition",w=Sf(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=g.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=EC[t.arrowTypeStart]||0,u=EC[t.arrowTypeEnd]||0;if("neo"===t.look&&!T){const e=`stroke-dasharray: ${"dotted"===t.pattern||"dashed"===t.pattern?fM(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",f),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="";(Yp().flowchart.arrowMarkerAbsolute||Yp().state.arrowMarkerAbsolute)&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Pu.info("arrowTypeStart",t.arrowTypeStart),Pu.info("arrowTypeEnd",t.arrowTypeEnd),QP(w,t,A,a,n,_);const E=u[Math.floor(u.length/2)];ES.isLabelCoordinateInPath(E,w.attr("d"))||(h=!0);let P={};return h&&(P.updatedPath=u),P.originalPath=t.points,P},"insertEdge");function yM(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,g=o/h,f=c/h,m=d*g+p*f,y=Math.max(-1,Math.min(1,m)),b=Math.acos(y);if(b<i||Math.abs(Math.PI-b)<i){r+=`L${a.x},${a.y}`;continue}const v=Math.min(t/Math.sin(b/2),u/2,h/2),x=a.x-d*v,C=a.y-p*v,w=a.x+g*v,k=a.y+f*v;r+=`L${x},${C}`,r+=`Q${a.x},${a.y} ${w},${k}`}}return r}function bM(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 vM(e,t){const r=e.map(e=>({...e}));if(e.length>=2&&AC[t.arrowTypeStart]){const n=AC[t.arrowTypeStart],i=e[0],o=e[1],{angle:a}=bM(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&&AC[t.arrowTypeEnd]){const i=AC[t.arrowTypeEnd],o=e[n-1],a=e[n-2],{angle:s}=bM(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}Tu(yM,"generateRoundedPath"),Tu(bM,"calculateDeltaAndAngle"),Tu(vM,"applyMarkerOffsetsToPoints");var xM=Tu((e,t,r,n)=>{t.forEach(t=>{CM[t](e,r,n)})},"insertMarkers"),CM={extension:Tu((e,t,r)=>{Pu.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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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:Tu((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")},wM=xM,kM={common:Ap,getConfig:Ud,insertCluster:QA,insertEdge:mM,insertEdgeLabel:aM,insertMarkers:wM,insertNode:JP,interpolateToCurve:Qk,labelHelper:NA,log:Pu,positionEdgeLabel:lM},SM={},_M=Tu(e=>{for(const t of e)SM[t.name]=t},"registerLayoutLoaders");Tu(()=>{_M([{name:"dagre",loader:Tu(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-D1BgCpg1.cjs")),"loader")},{name:"cose-bilkent",loader:Tu(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-DMeEZyLd.cjs")),"loader")}])},"registerDefaultLayoutLoaders")();var TM=Tu(async(e,t)=>{if(!(e.layoutAlgorithm in SM))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=SM[e.layoutAlgorithm];return(await r.loader()).render(e,t,kM,{algorithm:r.algorithm})},"render"),AM=Tu((e="",{fallback:t="dagre"}={})=>{if(e in SM)return e;if(t in SM)return Pu.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"),EM="comm",PM="rule",MM="decl",IM=Math.abs,BM=String.fromCharCode;function LM(e){return e.trim()}function jM(e,t,r){return e.replace(t,r)}function NM(e,t,r){return e.indexOf(t,r)}function DM(e,t){return 0|e.charCodeAt(t)}function OM(e,t,r){return e.slice(t,r)}function zM(e){return e.length}function FM(e,t){return t.push(e),e}var RM=1,$M=1,VM=0,WM=0,qM=0,HM="";function UM(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:RM,column:$M,length:a,return:"",siblings:s}}function GM(){return qM=WM>0?DM(HM,--WM):0,$M--,10===qM&&($M=1,RM--),qM}function XM(){return qM=WM<VM?DM(HM,WM++):0,$M++,10===qM&&($M=1,RM++),qM}function JM(){return DM(HM,WM)}function YM(){return WM}function ZM(e,t){return OM(HM,e,t)}function KM(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 QM(e){return LM(ZM(WM-1,rI(91===e?e+2:40===e?e+1:e)))}function eI(e){for(;(qM=JM())&&qM<33;)XM();return KM(e)>2||KM(qM)>3?"":" "}function tI(e,t){for(;--t&&XM()&&!(qM<48||qM>102||qM>57&&qM<65||qM>70&&qM<97););return ZM(e,YM()+(t<6&&32==JM()&&32==XM()))}function rI(e){for(;XM();)switch(qM){case e:return WM;case 34:case 39:34!==e&&39!==e&&rI(qM);break;case 40:41===e&&rI(e);break;case 92:XM()}return WM}function nI(e,t){for(;XM()&&e+qM!==57&&(e+qM!==84||47!==JM()););return"/*"+ZM(t,WM-1)+"*"+BM(47===e?e:XM())}function iI(e){for(;!KM(JM());)XM();return ZM(e,WM)}function oI(e){return function(e){return HM="",e}(aI("",null,null,null,[""],e=function(e){return RM=$M=1,VM=zM(HM=e),WM=0,[]}(e),0,[0],e))}function aI(e,t,r,n,i,o,a,s,l){for(var c=0,u=0,h=a,d=0,p=0,g=0,f=1,m=1,y=1,b=0,v="",x=i,C=o,w=n,k=v;m;)switch(g=b,b=XM()){case 40:if(108!=g&&58==DM(k,h-1)){-1!=NM(k+=jM(QM(b),"&","&\f"),"&\f",IM(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:k+=QM(b);break;case 9:case 10:case 13:case 32:k+=eI(g);break;case 92:k+=tI(YM()-1,7);continue;case 47:switch(JM()){case 42:case 47:FM(lI(nI(XM(),YM()),t,r,l),l),5!=KM(g||1)&&5!=KM(JM()||1)||!zM(k)||" "===OM(k,-1,void 0)||(k+=" ");break;default:k+="/"}break;case 123*f:s[c++]=zM(k)*y;case 125*f:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==y&&(k=jM(k,/\f/g,"")),p>0&&(zM(k)-h||0===f&&47===g)&&FM(p>32?cI(k+";",n,r,h-1,l):cI(jM(k," ","")+";",n,r,h-2,l),l);break;case 59:k+=";";default:if(FM(w=sI(k,t,r,c,u,i,s,v,x=[],C=[],h,o),o),123===b)if(0===u)aI(k,t,w,w,x,o,h,s,C);else{switch(d){case 99:if(110===DM(k,3))break;case 108:if(97===DM(k,2))break;default:u=0;case 100:case 109:case 115:}u?aI(e,w,w,n&&FM(sI(e,w,w,0,0,i,s,v,i,x=[],h,C),C),i,C,h,s,n?x:C):aI(k,w,w,w,[""],C,0,s,C)}}c=u=p=0,f=y=1,v=k="",h=a;break;case 58:h=1+zM(k),p=g;default:if(f<1)if(123==b)--f;else if(125==b&&0==f++&&125==GM())continue;switch(k+=BM(b),b*f){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(zM(k)-1)*y,y=1;break;case 64:45===JM()&&(k+=QM(XM())),d=JM(),u=h=zM(v=k+=iI(YM())),b++;break;case 45:45===g&&2==zM(k)&&(f=0)}}return o}function sI(e,t,r,n,i,o,a,s,l,c,u,h){for(var d=i-1,p=0===i?o:[""],g=function(e){return e.length}(p),f=0,m=0,y=0;f<n;++f)for(var b=0,v=OM(e,d+1,d=IM(m=a[f])),x=e;b<g;++b)(x=LM(m>0?p[b]+" "+v:jM(v,/&\f/g,p[b])))&&(l[y++]=x);return UM(e,t,r,0===i?PM:s,l,c,u,h)}function lI(e,t,r,n){return UM(e,t,r,EM,BM(qM),OM(e,2,-2),0,n)}function cI(e,t,r,n,i){return UM(e,t,r,MM,OM(e,0,n),OM(e,n+1,-1),n,i)}function uI(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function hI(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case MM:return e.return=e.return||e.value;case EM:return"";case"@keyframes":return e.return=e.value+"{"+uI(e.children,n)+"}";case PM:if(!zM(e.value=e.props.join(",")))return""}return zM(r=uI(e.children,n))?e.return=e.value+"{"+r+"}":""}var dI=Uw(Object.keys,Object),pI=Object.prototype.hasOwnProperty;function gI(e){if(!Jw(e))return dI(e);var t=[];for(var r in Object(e))pI.call(e,r)&&"constructor"!=r&&t.push(r);return t}var fI=yw(XC,"DataView"),mI=yw(XC,"Promise"),yI=yw(XC,"Set"),bI=yw(XC,"WeakMap"),vI="[object Map]",xI="[object Promise]",CI="[object Set]",wI="[object WeakMap]",kI="[object DataView]",SI=cw(fI),_I=cw(Tw),TI=cw(mI),AI=cw(yI),EI=cw(bI);exports.getTag=rw,(fI&&exports.getTag(new fI(new ArrayBuffer(1)))!=kI||Tw&&exports.getTag(new Tw)!=vI||mI&&exports.getTag(mI.resolve())!=xI||yI&&exports.getTag(new yI)!=CI||bI&&exports.getTag(new bI)!=wI)&&(exports.getTag=function(e){var t=rw(e),r="[object Object]"==t?e.constructor:void 0,n=r?cw(r):"";if(n)switch(n){case SI:return kI;case _I:return vI;case TI:return xI;case AI:return CI;case EI:return wI}return t});var PI=Object.prototype.hasOwnProperty;function MI(e){if(null==e)return!0;if(ok(e)&&(nk(e)||"string"==typeof e||"function"==typeof e.splice||ck(e)||wk(e)||rk(e)))return!e.length;var t=exports.getTag(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Jw(e))return!gI(e).length;for(var r in e)if(PI.call(e,r))return!1;return!0}var II={id:"c4",detector:Tu(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-dCKFkt_B.cjs"));return{id:"c4",diagram:e}},"loader")},BI="flowchart",LI={id:BI,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BkCuDgSL.cjs"));return{id:BI,diagram:e}},"loader")},jI="flowchart-v2",NI={id:jI,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BkCuDgSL.cjs"));return{id:jI,diagram:e}},"loader")},DI={id:"er",detector:Tu(e=>/^\s*erDiagram/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-DsSmT7AE.cjs"));return{id:"er",diagram:e}},"loader")},OI="gitGraph",zI={id:OI,detector:Tu(e=>/^\s*gitGraph/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-V2S2FVAM-BbqBVBDG.cjs"));return{id:OI,diagram:e}},"loader")},FI="gantt",RI={id:FI,detector:Tu(e=>/^\s*gantt/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-BX_NQ3yr.cjs"));return{id:FI,diagram:e}},"loader")},$I="info",VI={id:$I,detector:Tu(e=>/^\s*info/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-HS3SLOUP-CHXn5khx.cjs"));return{id:$I,diagram:e}},"loader")},WI={id:"pie",detector:Tu(e=>/^\s*pie/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-BsZNtR_x.cjs"));return{id:"pie",diagram:e}},"loader")},qI="quadrantChart",HI={id:qI,detector:Tu(e=>/^\s*quadrantChart/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-CZt0bGWV.cjs"));return{id:qI,diagram:e}},"loader")},UI="xychart",GI={id:UI,detector:Tu(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-DMXQ9XWO.cjs"));return{id:UI,diagram:e}},"loader")},XI="requirement",JI={id:XI,detector:Tu(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-BIjkRgKu.cjs"));return{id:XI,diagram:e}},"loader")},YI="sequence",ZI={id:YI,detector:Tu(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-CYC_z645.cjs"));return{id:YI,diagram:e}},"loader")},KI="class",QI={id:KI,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-CidWtlgi.cjs"));return{id:KI,diagram:e}},"loader")},eB="classDiagram",tB={id:eB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-CidWtlgi.cjs"));return{id:eB,diagram:e}},"loader")},rB="state",nB={id:rB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-BkTonyK9.cjs"));return{id:rB,diagram:e}},"loader")},iB="stateDiagram",oB={id:iB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-D62yBHYe.cjs"));return{id:iB,diagram:e}},"loader")},aB="journey",sB={id:aB,detector:Tu(e=>/^\s*journey/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-BSm6x_O4.cjs"));return{id:aB,diagram:e}},"loader")},lB={draw:Tu((e,t,r)=>{Pu.debug("rendering svg for syntax error\n");const n=Mb(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Mp(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")},cB=lB,uB={db:{},renderer:lB,parser:{parse:Tu(()=>{},"parse")}},hB="flowchart-elk",dB={id:hB,detector:Tu((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:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BkCuDgSL.cjs"));return{id:hB,diagram:e}},"loader")},pB="timeline",gB={id:pB,detector:Tu(e=>/^\s*timeline/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-B0LBMd3f.cjs"));return{id:pB,diagram:e}},"loader")},fB="mindmap",mB={id:fB,detector:Tu(e=>/^\s*mindmap/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-Bhox2Let.cjs"));return{id:fB,diagram:e}},"loader")},yB="kanban",bB={id:yB,detector:Tu(e=>/^\s*kanban/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-BK8dwKR3.cjs"));return{id:yB,diagram:e}},"loader")},vB="sankey",xB={id:vB,detector:Tu(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-CRicni84.cjs"));return{id:vB,diagram:e}},"loader")},CB="packet",wB={id:CB,detector:Tu(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-DJz0ptvH.cjs"));return{id:CB,diagram:e}},"loader")},kB="radar",SB={id:kB,detector:Tu(e=>/^\s*radar-beta/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-D2HiY8GI.cjs"));return{id:kB,diagram:e}},"loader")},_B="block",TB={id:_B,detector:Tu(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-DZo7FQJs.cjs"));return{id:_B,diagram:e}},"loader")},AB="architecture",EB={id:AB,detector:Tu(e=>/^\s*architecture/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-D1bN8BNZ.cjs"));return{id:AB,diagram:e}},"loader")},PB="treemap",MB={id:PB,detector:Tu(e=>/^\s*treemap/.test(e),"detector"),loader:Tu(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-U91xmAoT.cjs"));return{id:PB,diagram:e}},"loader")},IB=!1,BB=Tu(()=>{IB||(IB=!0,ng("error",uB,e=>"error"===e.toLowerCase().trim()),ng("---",{db:{clear:Tu(()=>{},"clear")},styles:{},renderer:{draw:Tu(()=>{},"draw")},parser:{parse:Tu(()=>{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:Tu(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),hd(dB,mB,EB),hd(II,bB,tB,QI,DI,RI,VI,WI,JI,ZI,NI,LI,gB,zI,oB,nB,sB,HI,xB,wB,GI,TB,SB,MB))},"addDiagrams"),LB=Tu(async()=>{Pu.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(cd).map(async([e,{detector:t,loader:r}])=>{if(r)try{ig(e)}catch{try{const{diagram:e,id:n}=await r();ng(n,e,t)}catch(n){throw Pu.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete cd[e],n}}}))).filter(e=>"rejected"===e.status);if(e.length>0){Pu.error(`Failed to load ${e.length} external diagrams`);for(const t of e)Pu.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function jB(e,t){e.attr("role","graphics-document document"),""!==t&&e.attr("aria-roledescription",t)}function NB(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)}}}Tu(jB,"setA11yDiagramInfo"),Tu(NB,"addSVGa11yTitleDescription");var DB=(Tu(f=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=Ud(),o=ud(e,i);e=PS(e)+"\n";try{ig(o)}catch{const e=pd(o);if(!e)throw new ld(`Diagram ${o} not found.`);const{id:t,diagram:r}=await e();ng(t,r)}const{db:a,parser:s,renderer:l,init:c}=ig(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 f(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"),f),OB=[],zB=Tu(()=>{OB.forEach(e=>{e()}),OB=[]},"attachFunctions"),FB=Tu(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function RB(e){const t=e.match(od);if(!t)return{text:e,metadata:{}};let r=TC(t[1],{schema:_C})??{};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}}Tu(RB,"extractFrontMatter");var $B=Tu(e=>e.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),VB=Tu(e=>{const{text:t,metadata:r}=RB(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"),WB=Tu(e=>{const t=ES.detectInit(e)??{},r=ES.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 qB(e){const t=$B(e),r=VB(t),n=WB(r.text),i=AS(r.config,n.directive);return{code:e=FB(n.text),title:r.title,config:i}}function HB(e){const t=(new TextEncoder).encode(e),r=Array.from(t,e=>String.fromCodePoint(e)).join("");return btoa(r)}Tu(qB,"preprocessDiagram"),Tu(HB,"toBase64");var UB=["foreignobject"],GB=["dominant-baseline"];function XB(e){const t=qB(e);return Jd(),Xd(t.config??{}),t}async function JB(e,t){BB();try{const{code:t,config:r}=XB(e);return{diagramType:(await aL(t)).type,config:r}}catch(r){if(null==t?void 0:t.suppressErrors)return!1;throw r}}Tu(XB,"processAndSetConfigs"),Tu(JB,"parse");var YB=Tu((e,t,r=[])=>`\n.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),ZB=Tu((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=>{MI(e.styles)||i.forEach(t=>{n+=YB(e.id,t,e.styles)}),MI(e.textStyles)||(n+=YB(e.id,"tspan",((null==e?void 0:e.textStyles)||[]).map(e=>e.replace("color","fill"))))})}return n},"createCssStyles"),KB=Tu((e,t,r,n)=>{const i=ZB(e,r);return uI(oI(`${n}{${Np(t,i,e.themeVariables)}}`),hI)},"createUserStyles"),QB=Tu((e="",t,r)=>{let n=e;return r||t||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=MS(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),eL=Tu((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,${HB(`<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"),tL=Tu((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 rL(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Tu(rL,"sandboxedIframe");var nL=Tu((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"),iL=Tu(async function(e,t,r){var n,i,o,a,s,l;BB();const c=XB(t);t=c.code;const u=Ud();Pu.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,g="d"+e,f="#"+g,m=Tu(()=>{const e=Sf(b?p:f).node();e&&"remove"in e&&e.remove()},"removeTempElements");let y=Sf("body");const b="sandbox"===u.securityLevel,v="loose"===u.securityLevel,x=u.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),b){const e=rL(Sf(r),d);y=Sf(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=Sf(r);tL(y,e,g,`font-family: ${x}`,"http://www.w3.org/1999/xlink")}else{if(nL(document,e,g,d),b){const e=rL(Sf("body"),d);y=Sf(e.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=Sf("body");tL(y,e,g)}let C,w;try{C=await DB.fromText(t,{title:c.title})}catch(I){if(u.suppressErrorRendering)throw m(),I;C=await DB.fromText("error"),w=I}const k=y.select(f).node(),S=C.type,_=k.firstChild,T=_.firstChild,A=null==(i=(n=C.renderer).getClasses)?void 0:i.call(n,t,C),E=KB(u,S,A,h),P=document.createElement("style");P.innerHTML=E,_.insertBefore(P,T);try{await C.renderer.draw(t,e,wu.version,C)}catch(B){throw u.suppressErrorRendering?m():cB.draw(t,e,wu.version),B}sL(S,y.select(`${f} 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(f).node().innerHTML;if(Pu.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),M=QB(M,b,gp(u.arrowMarkerAbsolute)),b){const e=y.select(f+" svg").node();M=eL(M,e)}else v||(M=id.sanitize(M,{ADD_TAGS:UB,ADD_ATTR:GB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(zB(),w)throw w;return m(),{diagramType:S,svg:M,bindFunctions:C.db.bindFunctions}},"render");function oL(e={}){var t;const r=fd({},e);(null==r?void 0:r.fontFamily)&&!(null==(t=r.themeVariables)?void 0:t.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Vd(r),(null==r?void 0:r.theme)&&r.theme in Ed?r.themeVariables=Ed[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=Ed.default.getThemeVariables(r.themeVariables));const n="object"==typeof r?$d(r):qd();Mu(n.logLevel),BB()}Tu(oL,"initialize");var aL=Tu((e,t={})=>{const{code:r}=qB(e);return DB.fromText(r,t)},"getDiagramFromText");function sL(e,t,r,n){jB(t,e),NB(t,r,n,t.attr("id"))}Tu(sL,"addA11yInfo");var lL=Object.freeze({render:iL,parse:JB,getDiagramFromText:aL,initialize:oL,getConfig:Ud,setConfig:Hd,getSiteConfig:qd,updateSiteConfig:Wd,reset:Tu(()=>{Jd()},"reset"),globalReset:Tu(()=>{Jd(Dd)},"globalReset"),defaultConfig:Dd});Mu(Ud().logLevel),Jd(Ud());var cL=Tu((e,t,r)=>{Pu.warn(e),SS(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"),uL=Tu(async function(e={querySelector:".mermaid"}){try{await hL(e)}catch(t){if(SS(t)&&Pu.error(t.str),wL.parseError&&wL.parseError(t),!e.suppressErrors)throw Pu.error("Use the suppressErrors option to suppress these errors"),t}},"run"),hL=Tu(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const n=lL.getConfig();let i;if(Pu.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)}Pu.debug(`Found ${i.length} diagrams`),void 0!==(null==n?void 0:n.startOnLoad)&&(Pu.debug("Start On Load: "+(null==n?void 0:n.startOnLoad)),lL.updateSiteConfig({startOnLoad:null==n?void 0:n.startOnLoad}));const o=new ES.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const s=[];for(const c of Array.from(i)){if(Pu.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const t=`mermaid-${o.next()}`;a=c.innerHTML,a=uT(ES.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=ES.detectInit(a);r&&Pu.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await CL(t,a,c);c.innerHTML=r,e&&await e(t),n&&n(c)}catch(l){cL(l,s,wL.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),dL=Tu(function(e){lL.initialize(e)},"initialize"),pL=Tu(async function(e,t,r){Pu.warn("mermaid.init is deprecated. Please use run instead."),e&&dL(e);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof t?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await uL(n)},"init"),gL=Tu(async(e,{lazyLoad:t=!0}={})=>{BB(),hd(...e),!1===t&&await LB()},"registerExternalDiagrams"),fL=Tu(function(){if(wL.startOnLoad){const{startOnLoad:e}=lL.getConfig();e&&wL.run().catch(e=>Pu.error("Mermaid failed to initialize",e))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",fL,!1);var mL=Tu(function(e){wL.parseError=e},"setParseErrorHandler"),yL=[],bL=!1,vL=Tu(async()=>{if(!bL){for(bL=!0;yL.length>0;){const t=yL.shift();if(t)try{await t()}catch(e){Pu.error("Error executing queue",e)}}bL=!1}},"executeQueue"),xL=Tu(async(e,t)=>new Promise((r,n)=>{const i=Tu(()=>new Promise((i,o)=>{lL.parse(e,t).then(e=>{i(e),r(e)},e=>{var t;Pu.error("Error parsing",e),null==(t=wL.parseError)||t.call(wL,e),o(e),n(e)})}),"performCall");yL.push(i),vL().catch(n)}),"parse"),CL=Tu((e,t,r)=>new Promise((n,i)=>{const o=Tu(()=>new Promise((o,a)=>{lL.render(e,t,r).then(e=>{o(e),n(e)},e=>{var t;Pu.error("Error parsing",e),null==(t=wL.parseError)||t.call(wL,e),a(e),i(e)})}),"performCall");yL.push(o),vL().catch(i)}),"render"),wL={startOnLoad:!0,mermaidAPI:lL,parse:xL,render:CL,init:pL,run:uL,registerExternalDiagrams:gL,registerLayoutLoaders:_M,initialize:dL,parseError:void 0,contentLoaded:fL,setParseErrorHandler:mL,detectType:ud,registerIconPacks:gT,getRegisteredDiagramsMetadata:Tu(()=>Object.keys(cd).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},kL=wL;
151
151
  /*! Check if previously processed */
152
152
  /*!
153
153
  * Wait for document loaded before starting the execution
@@ -245,7 +245,7 @@ const SL=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=x.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]),_=x.useCallback((e,t)=>{y(t.value)},[]),T=x.useCallback(()=>{var e;y(""),null==(e=v.current)||e.blur(),null==n||n("","")},[n]),A=x.useCallback(e=>{var t;"Enter"===e.key&&!g&&m.trim()?S(m).catch(e=>{c("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=v.current)||t.blur(),y(""),null==n||n("",""))},[S,g,m,n]);return di(w.SearchBox,{ref:v,css:C,className:s,style:{width:l},placeholder:h,value:m,onChange:_,onKeyDown:A,disabled:a||g,contentBefore:di("span",{css:k,children:di(lu,{size:20})}),dismiss:{onClick:T}})},exports.AISearchIcon=lu,exports.AISearchIconExample=()=>{const e=cu();return v.jsxs("div",{className:e.container,children:[v.jsx("h2",{children:"AI Search Icon Examples"}),v.jsxs("div",{className:e.section,children:[v.jsx("h3",{children:"Standard AI Search Icon"}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Small (16px):"}),v.jsx(lu,{size:16})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Medium (20px):"}),v.jsx(lu,{size:20})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Large (24px):"}),v.jsx(lu,{size:24})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Extra Large (32px):"}),v.jsx(lu,{size:32})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Custom Colors:"}),v.jsx(lu,{size:24,color:w.tokens.colorPaletteBlueForeground2,aiIndicatorColor:w.tokens.colorPaletteGreenForeground2})]})]}),v.jsxs("div",{className:e.section,children:[v.jsx("h3",{children:"Usage in Buttons"}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Primary Button:"}),v.jsx(w.Button,{appearance:"primary",icon:v.jsx(lu,{size:16}),children:"AI Search"})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Secondary Button:"}),v.jsx(w.Button,{appearance:"secondary",icon:v.jsx(lu,{size:16}),children:"Smart Search"})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Icon Only Button:"}),v.jsx(w.Button,{appearance:"subtle",icon:v.jsx(lu,{size:20}),title:"AI Search"})]})]}),v.jsxs("div",{className:e.section,children:[v.jsx("h3",{children:"Usage Example Code"}),v.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=ru,exports.AdaptiveCardHostThemeType=xo,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:g}=ee(),f=x.useCallback(e=>p(e),[p]),m=x.useCallback((e,t)=>g(e,t,43200),[g]),{getCachedData:y,setCachedData:b}=ee(),C=x.useCallback(e=>y(e),[y]),k=x.useCallback((e,t)=>b(e,t,43200),[b]),[S,_]=x.useState([]),[A,E]=x.useState({}),P=x.useRef(null),M=x.useRef(null),I=x.useRef(null);x.useEffect(()=>{(async()=>{try{let t=e;const r={};if(o){const[n,i]=await Promise.all([f(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),E(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}}),E(r)}})()},[e,o,h,d,f,C]),x.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]),x.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]),x.useEffect(()=>{t<=600&&E(()=>{const e={};return S.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,S]);const B=x.useMemo(()=>t>600,[t]),{minCardWidth:L,gridGap:j,containerPadding:N}=x.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),D=t-2*N,O=x.useMemo(()=>Math.floor((D+j)/(L+j)),[D,j,L]),z=Math.max(O,1),F=x.useCallback(()=>{if(null!==P.current&&null!==M.current&&P.current!==M.current){const e=[...S],[t]=e.splice(P.current,1);e.splice(M.current,0,t),_(e),s&&s(e)}P.current=null,M.current=null},[S,s]),R=x.useCallback((e,t)=>{const r={spanCols:Math.min(Math.max(t.spanCols,1),z),spanRows:Math.min(Math.max(t.spanRows,1),n)};E(t=>({...t,[e]:r})),l&&l(e,r)},[z,n,l]),$=x.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=x.useMemo(()=>S.map((e,t)=>{var o,a,s,l;const c=!1!==e.showZoom&&B,h=e.headerAction||(c?v.jsx(FL,{values:A[e.id]||$[e.id]||{spanCols:1,spanRows:1},maxCols:z,maxRows:n,IsOpen:!1,onChange:t=>R(e.id,t)}):void 0);return v.jsx("div",{className:u.cardWrapper,draggable:i,onDragStart:()=>i&&(P.current=t),onDragEnter:()=>i&&(M.current=t),onDragOver:e=>i&&e.preventDefault(),onDragEnd:i?F:void 0,style:{gridColumnEnd:(null==(o=A[e.id])?void 0:o.spanCols)?`span ${A[e.id].spanCols}`:`span ${(null==(a=$[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=$[e.id])?void 0:l.spanRows)||1}`,cursor:i?"grab":"default"},children:v.jsxs(w.Card,{className:`${u.cardBody} ${e.className||""}`,children:[v.jsx(w.CardHeader,{header:v.jsxs(Et,{gap:"0px",children:[v.jsx(w.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&v.jsx(w.Text,{className:u.cardDescription,size:200,children:e.cardDescription})]}),action:h}),v.jsx("div",{className:u.chartContainer,style:{height:r,...e.style},children:e.content})]})},e.id)}),[S,i,F,A,u.cardBody,u.cardDescription,u.chartContainer,u.cardWrapper,B,z,n,R,r,$]);return 0===S.length?v.jsx(zL,{}):v.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 v.jsx("div",{style:a,...o,children:v.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}=zt(),c=x.useRef(null),[u,h]=x.useState([]),[d,p]=x.useState([]);return x.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]),v.jsx("div",{ref:c,className:w.mergeClasses(s.container,a),style:{maxWidth:t,...r},children:v.jsxs(kt,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[u.map((e,t)=>v.jsxs(x.Fragment,{children:[t===o?v.jsxs(kt,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?x.cloneElement(e.icon,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}}):null,v.jsx(w.Text,{className:w.mergeClasses(s.breadcrumbItem,l(e,i),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):v.jsx(w.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:v.jsx(w.Text,{className:l(e,i),children:e.label})},e.label),t<u.length-1&&v.jsx(E.ChevronRightRegular,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}})]},e.label??`breadcrumb-${t}`)),d.length>0&&v.jsx(Ft,{items:d,theme:n})]})})},exports.ButtonMenu=Ot,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}=Gt(),h=x.useRef(null),[d,p]=x.useState(null),g=x.useRef(0),[f,m]=x.useState(new Date),[y,b]=x.useState(l??hr.Month),{getMonthCalendar:C}=sr(Intl.DateTimeFormat().resolvedOptions().timeZone),S=H.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=H.useCallback(e=>{i&&i(e),m(e)},[i]),A=H.useCallback(e=>{n&&n(e),m(e)},[n]),E=H.useCallback(e=>{o&&o(e),m(e)},[o]),P=H.useCallback(e=>{a&&a(e),b(e)},[a]),M=H.useCallback(t=>{var r;const{date:n}=t;return(null==(r=C(e,f.getFullYear(),f.getMonth())[k.format(n,"yyyy-MM-dd")])?void 0:r.flatMap(e=>e))||[]},[f,e]),I=H.useCallback(()=>{h.current&&requestAnimationFrame(()=>{if(h.current){const e=h.current.querySelector(`.${u.calendarWrapper} > div:nth-child(8)`);e&&(p(e.offsetHeight),g.current=e.offsetHeight)}})},[u.calendarWrapper]);x.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]),x.useEffect(()=>{b(l||hr.Month)},[l]);const B=H.useCallback(()=>{switch(y){case hr.Month:return v.jsx(Ar,{events:e,currentDate:f,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl});case hr.Week:return v.jsx(Er,{events:e,currentDay:f,height:t,strings:null==c?void 0:c.weekView});case hr.Day:return v.jsx(Pr,{events:e,currentDay:f,height:t,strings:null==c?void 0:c.dayView});default:return v.jsx(Ar,{events:e,currentDate:f,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl})}},[y,e,f,d,S,M,u,s,t]),L=v.jsxs(kt,{height:"100%",verticalAlign:"start",children:[v.jsx(kr,{selectedView:y,onSelectedView:P,currentDate:f,setCurrentDate:m,onWeekChange:E,onMonthChange:T,onDayChange:A,strings:null==c?void 0:c.toolbar}),v.jsx(B,{})]});return v.jsx(w.IdPrefixProvider,{value:"calendarControl-",children:r?v.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:!0,style:{width:"100%"},children:L}):v.jsx("div",{style:{width:"100%"},children:L})})},exports.CalendarMonth=mr,exports.Card=yt,exports.Carousel=e=>{const{className:t,items:r,title:n}=e,i=H.useRef(null),[o,a]=H.useState(0),[s,l]=H.useState(0),{carouselStyles:c}=(e=>{const{styles:t}=e,{getBaseStyles:r}=de();return{carouselStyles:H.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:g,embla__container:f,embla__viewport:m,embla__buttons:y}=((e,t)=>{const{getCurrentDevice:r}=de(),n=H.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=H.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:b,nextBtnDisabled:C,onPrevButtonClick:k,onNextButtonClick:S}=(e=>{const[t,r]=x.useState(!0),[n,i]=x.useState(!0),o=x.useCallback(()=>{e&&e.scrollPrev()},[e]),a=x.useCallback(()=>{e&&e.scrollNext()},[e]),s=x.useCallback(e=>{r(!e.canScrollPrev()),i(!e.canScrollNext())},[]);return x.useEffect(()=>{e&&(s(e),e.on("reInit",s),e.on("select",s))},[e,s]),{prevBtnDisabled:t,nextBtnDisabled:n,onPrevButtonClick:o,onNextButtonClick:a}})(h);return H.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()}},[]),v.jsx(v.Fragment,{children:v.jsxs("div",{id:"-carousel",className:w.mergeClasses(t,"embla"),style:{...c(o,s)},ref:i,children:[v.jsxs("div",{className:p,children:[v.jsx(w.Subtitle2,{className:d.titleStyles,children:n}),v.jsxs("div",{className:y,children:[v.jsx(w.Button,{onClick:k,disabled:b,appearance:"subtle",icon:v.jsx(E.ChevronLeftRegular,{})}),v.jsx(w.Button,{onClick:S,disabled:C,appearance:"subtle",icon:v.jsx(E.ChevronRightRegular,{})})]})]}),v.jsx("div",{className:m,ref:u,children:v.jsx("div",{className:f,children:r.map((e,t)=>v.jsx("div",{className:g,children:e},t))})})]})})},exports.Center=_t,exports.ChatInput=uu,exports.ChatInputWithMensions=gu,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:r,placeholder:n,onSend:i,theme:o,isRunning:a,onAbort:s})=>{const[l,c]=x.useState(r||""),[u,h]=x.useState(!1),d=x.useRef(null),p=b.useAIAssistantStrings(),[g,f]=x.useState({top:0,left:0}),[m,y]=x.useState([]),C=x.useRef({}),k=pu(),{warn:S,error:_}=Q();x.useEffect(()=>{var e;null==(e=d.current)||e.focus(),c(r||"")},[r]);const T=x.useCallback(pt(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()},E=x.useCallback(({users:e})=>v.jsxs("div",{className:k.listContainer,children:[0===e.length&&v.jsx(w.Caption1,{children:p.noUsersFound}),e.map(e=>v.jsx(w.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.mail),children:v.jsx(w.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[k.listContainer,A]);return v.jsxs(kt,{horizontal:!0,width:"100%",className:k.inputContainer,children:[v.jsx(uu,{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(r,n),t=r.getBoundingClientRect(),i=t.top+e.top+22,o=t.left+e.left+16;f({top:i,left:o})}}},theme:o,placeholder:n,isRunning:a,onAbort:s}),v.jsxs(Pt,{theme:o,anchorPoint:g,isOpen:u,onClose:()=>h(!1),excludeRefs:[d],children:[v.jsx(w.CardHeader,{header:v.jsx(w.Body1Strong,{className:k.sugestionsHeader,children:"Sugestions"})}),v.jsx(w.Divider,{}),v.jsx(E,{users:m})]})]})},exports.ChatList=xu,exports.Color=qu,exports.Color$1=Af,exports.Container=e=>{const{className:t,children:r,style:n,alignItems:i="center",justifyContent:o="center",flexDirection:a="row",centerContent:s=!0}=e,l=H.useRef(null),[c,u]=H.useState(0),[h,d]=H.useState(0),{containerStyles:p}=(e=>{const{maxWidth:t}=e,{getBaseStyles:r}=de();return{containerStyles:H.useCallback((n,i)=>n&&i?{...r(e,n,i),maxWidth:t}:{},[r,t,e])}})(e),g=H.useMemo(()=>S.debounce(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;u(e),d(r)}},200),[]);H.useEffect(()=>{const e=new _.ResizeObserver(e=>{g(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),g.cancel()}},[g]);const f=H.useMemo(()=>{if(!n)return;const{padding:e,margin:t,...r}=n;return r},[n]);return v.jsx("div",{id:"container",className:t,style:{...p(c,h),display:"flex",justifyContent:o,alignItems:i,flexDirection:a,...f},ref:l,children:s?v.jsx(_t,{children:r}):r})},exports.ContentRenderer=vu,exports.ContentType=gt,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=H.useCallback(e=>{r&&r(e)},[r]);return v.jsx(w.Overflow,{children:v.jsxs(w.FluentProvider,{theme:i,children:[" ",v.jsxs("div",{className:w.mergeClasses(o.container),children:[e.map(e=>{const r=e.id===t;return v.jsx(w.OverflowItem,{id:e.id,priority:r?2:1,children:n(e,r,()=>a(e.id))},e.id)}),v.jsx(Di,{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:g,dataGridBodyStyles:f,refreshData:m}=e,y=e=>t.findIndex(t=>t===e),[b,x]=H.useState(new Set(n.map(e=>y(e)))),C=H.useRef(null),{styles:k}=Ti();H.useEffect(()=>{n.length>0&&x(new Set(n.map(e=>y(e))))},[n,t]),H.useEffect(()=>{m&&x(new Set)},[m]);const S=r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>v.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>v.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})),_=H.useCallback((e,t)=>{e.stopPropagation(),"row"===o&&a&&a([t])},[o,a]),T=H.useMemo(()=>"row"===o?k.rowSelection:"",[o,k.rowSelection]),A=H.useCallback(()=>v.jsx(w.DataGridBody,{style:f??{},className:g??"",children:({item:e,rowId:t})=>v.jsx(w.DataGridRow,{className:T,onClick:t=>_(t,e),children:({renderCell:t})=>v.jsx(w.DataGridCell,{children:t(e)})},t)}),[_,T,f,g]),E=H.useMemo(()=>t.length&&!d,[t,d]),P=H.useCallback(()=>d?v.jsx(v.Fragment,{children:p??v.jsx(_i,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:v.jsx(w.Spinner,{})})}):E?v.jsx(A,{}):d||t.length?v.jsx(v.Fragment,{}):v.jsx("div",{children:h}),[E,d,t,h]);return v.jsx("div",{ref:C,children:v.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)}),x(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:b,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:c,resizableColumns:u,resizableColumnsOptions:{autoFitColumns:!1},children:[v.jsx(w.DataGridHeader,{children:v.jsx(w.DataGridRow,{children:({renderHeaderCell:e})=>v.jsx(w.DataGridHeaderCell,{children:e()})})}),v.jsx(P,{})]})})},exports.DataGridV2=Ei,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]=x.useState(""),[p,g]=x.useState(""),[f,m]=x.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`}})},b=H.useMemo(()=>f?"error":"warning"===s?"warning":"info"===s?"success":"none",[f,s]),C=H.useMemo(()=>f||a,[f,a]),k=H.useCallback(()=>{switch(b){case"error":return v.jsx(E.ErrorCircle12Filled,{});case"warning":return v.jsx(E.Warning12Filled,{});case"success":return v.jsx(E.CheckmarkCircle12Filled,{});default:return null}},[b]);return v.jsx(w.Field,{label:i,required:l,validationMessage:C,validationMessageIcon:k(),size:c,hint:u,validationState:b,children:v.jsx(w.Dropdown,{placeholder:o,onOptionSelect:(e,r)=>{const i=r.optionValue||"",o=r.optionText||"";d(i),g(o);const a=n?n(i):"";m(a),!a&&t&&t(i)},value:p,selectedOptions:h?[h]:[],className:y.tagPickerControl,children:e.map(e=>v.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=hr,exports.EGoalMetric=WL,exports.EMessageType=Y,exports.FluentUIProvider=e=>{const t=(()=>{const e=H.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,className:a,styles:s,children:l}=e;return v.jsx(w.IdPrefixProvider,{value:n,children:v.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:o,targetDocument:i,className:a,style:s,children:l})})},exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu();return o?v.jsxs(w.Menu,{children:[v.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:v.jsxs(w.MenuButton,{ref:n,children:["+",i," items"]})}),v.jsx(w.MenuPopover,{children:v.jsx(w.MenuList,{children:e.map(e=>v.jsx(Oi,{id:r(e),children:t(e)},r(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:r}=e,{gridStyles:n}=bt(e),i=H.useRef(null),[o,a]=H.useState(0),[s,l]=H.useState(0);return H.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()}},[]),v.jsx(v.Fragment,{children:v.jsx("div",{className:r,style:n(o,s),ref:i,children:t})})},exports.IconButton=Rt,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:g,max:f,step:m,contentBefore:y,contentAfter:C})=>{const[k,S]=x.useState(void 0!==e?String(e):""),[_,A]=x.useState(""),P={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=b.useInputFieldStrings(),I=void 0!==e,B=I?String(e):k,L=x.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!==g&&t<g)return M.valueMustBeAtLeast.replace("{0}",String(g));if(void 0!==f&&t>f)return M.valueMustBeAtMost.replace("{0}",String(f))}if(i){const r="number"===t&&""!==e.trim()?Number(e):e;return i(r)}return""},[c,t,i,g,f,M]),j=x.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=x.useCallback(()=>{const e=L(B);A(e)},[L,B]),D=x.useMemo(()=>_?"error":"warning"===l?"warning":"info"===l?"success":"none",[_,l]),O=x.useMemo(()=>_||s,[_,s]),z=x.useCallback(()=>{switch(D){case"error":return v.jsx(E.ErrorCircle12Filled,{});case"warning":return v.jsx(E.Warning12Filled,{});case"success":return v.jsx(E.CheckmarkCircle12Filled,{});default:return null}},[D]),F="circular"===r?P.inputRoot:void 0;return v.jsx(w.Field,{label:o,required:c,validationMessage:O,validationMessageIcon:z(),size:u,hint:h,validationState:D,children:v.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:F,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:g=300})=>{const f={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=b.useItemPickerStrings(),y=a||m.placeholder,C=h||m.noResultsFound,k=d||m.searching,S=p||m.loadingMore,[_,A]=x.useState(""),E=x.useRef(null),P=x.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=x.useCallback(e=>{A(e),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{null==n||n(e)},g)},[n,g]),D=x.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=x.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 x.useEffect(()=>()=>{E.current&&clearTimeout(E.current)},[]),v.jsx("div",{className:`${f.container} ${u||""}`,...c&&{style:{width:c}},children:v.jsxs(w.TagPicker,{onOptionSelect:O,selectedOptions:M,disabled:s,children:[v.jsxs(w.TagPickerControl,{className:f.tagPickerControl,children:[v.jsx(w.TagPickerGroup,{"aria-label":m.selectedItems,children:t.map(e=>v.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))}),v.jsx(w.TagPickerInput,{className:f.tagPickerInput,"aria-label":m.searchItems,placeholder:y,value:_,onChange:e=>N(e.target.value),disabled:s})]}),v.jsx(w.TagPickerList,{ref:P,onScroll:D,className:f.pickerList,children:I?v.jsx(w.TagPickerOption,{value:"loading",children:k}):j.length>0?v.jsxs(v.Fragment,{children:[j.map(e=>v.jsx(w.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:v.jsxs("div",{className:f.optionContent,children:[v.jsx(w.Text,{weight:"semibold",children:e.text}),e.secondaryText&&v.jsx(w.Text,{size:200,className:f.optionSecondary,children:e.secondaryText})]})},e.value)),B&&v.jsx(w.TagPickerOption,{value:"loading-more",children:S})]}):v.jsx(w.TagPickerOption,{value:"no-options",children:C})})]})})},exports.JSON_SCHEMA=_C,exports.KPICard=qL,exports.KPICardCompact=GL,exports.KPICardSkeleton=HL,exports.Kpis=e=>{const{skeletonCount:t=3,compact:r=!1}=e,n=VL(),i=XL;return H.useCallback(()=>Array.from({length:t}).map((e,t)=>v.jsx(HL,{},`kpi-skeleton-${t}`)),[t]),v.jsx(v.Fragment,{children:v.jsx(Et,{gap:"l",direction:"horizontal",padding:"l",paddingTop:"s",children:v.jsx(v.Fragment,{children:v.jsx("div",{className:n.kpiContainer,children:i.length>0?i.map(e=>r?v.jsx(GL,{dataCard:e},e.identifier):v.jsx(qL,{dataCard:e},e.identifier)):v.jsx(UL,{})})})})})},exports.Layout=e=>{const{className:t,children:r,layoutConfig:n=xt}=e,i=H.useRef(null),[o,a]=H.useState(0),[s,l]=H.useState(0),{rootStyles:c,layoutGridStyles:u}=vt({...e,layoutConfig:n}),h=((e,t)=>{let r;return H.useCallback((...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return H.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]),v.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:H.Children.map(r,(e,t)=>{var r;if(H.isValidElement(e)){const n=e;return v.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 v.jsx(v.Fragment,{children:v.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,g,f,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:x.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=b.useListItemActivityStrings(),{warn:w,error:k}=Q(),S=new Map([["access",{message:(null==i?void 0:i.access)||C.accessed||(null==(a=DL.get("access"))?void 0:a.message)||"",icon:v.jsx(E.OpenRegular,{style:jL})}],["comment",{message:(null==i?void 0:i.comment)||C.commented||(null==(s=DL.get("comment"))?void 0:s.message)||"",icon:v.jsx(E.CommentRegular,{style:jL})}],["create",{message:(null==i?void 0:i.create)||C.created||(null==(l=DL.get("create"))?void 0:l.message)||"",icon:v.jsx(E.AddRegular,{style:jL})}],["delete",{message:(null==i?void 0:i.delete)||C.deleted||(null==(c=DL.get("delete"))?void 0:c.message)||"",icon:v.jsx(E.DeleteRegular,{style:jL})}],["edit",{message:(null==i?void 0:i.edit)||C.edited||(null==(u=DL.get("edit"))?void 0:u.message)||"",icon:v.jsx(E.EditRegular,{style:jL})}],["mention",{message:(null==i?void 0:i.mention)||C.mentioned||(null==(h=DL.get("mention"))?void 0:h.message)||"",icon:v.jsx(E.MentionRegular,{style:jL})}],["move",{message:(null==i?void 0:i.move)||C.moved||(null==(d=DL.get("move"))?void 0:d.message)||"",icon:v.jsx(E.ArrowMoveRegular,{style:jL})}],["rename",{message:(null==i?void 0:i.rename)||C.renamed||(null==(p=DL.get("rename"))?void 0:p.message)||"",icon:v.jsx(E.RenameRegular,{style:jL})}],["restore",{message:(null==i?void 0:i.restore)||C.restored||(null==(g=DL.get("restore"))?void 0:g.message)||"",icon:v.jsx(E.ArrowSyncRegular,{style:jL})}],["share",{message:(null==i?void 0:i.share)||C.shared||(null==(f=DL.get("share"))?void 0:f.message)||"",icon:v.jsx(E.PeopleRegular,{style:jL})}],["version",{message:(null==i?void 0:i.version)||C.versioned||(null==(m=DL.get("version"))?void 0:m.message)||"",icon:v.jsx(E.HistoryRegular,{style:jL})}]]),[_,T]=H.useState({message:"",icon:v.jsx(v.Fragment,{})}),[A,P]=H.useState(!0),M=H.useRef(void 0),I=H.useRef(void 0),[B]=H.useState(30),L=H.useCallback(e=>e.user.email===n,[n]),j=H.useCallback(e=>{if(!e)return{message:"",icon:v.jsx(v.Fragment,{})};const{action:t,actor:r}=e,{displayName:n}=(null==r?void 0:r.user)||{displayName:""},i=NL.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:v.jsx(v.Fragment,{})}},[S,L]);return H.useEffect(()=>{var e;null==(e=I.current)||e.setPlaybackRate(B/100)},[B,A]),H.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||P(!1)}},o=setTimeout(()=>{i()},1e3);return()=>{clearTimeout(o),n=!0}},[e,t,r,y,j]),v.jsx(V.Fade,{imperativeRef:I,visible:!A,children:v.jsx("div",{children:v.jsxs(kt,{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=x.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]),_=x.useCallback((e,t)=>{y(t.value)},[]),T=x.useCallback(()=>{var e;y(""),null==(e=v.current)||e.blur(),null==n||n("","")},[n]),A=x.useCallback(e=>{var t;"Enter"===e.key&&!g&&m.trim()?S(m).catch(e=>{c("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=v.current)||t.blur(),y(""),null==n||n("",""))},[S,g,m,n]);return di(w.SearchBox,{ref:v,css:C,className:s,style:{width:l},placeholder:h,value:m,onChange:_,onKeyDown:A,disabled:a||g,contentBefore:di("span",{css:k,children:di(lu,{size:20})}),dismiss:{onClick:T}})},exports.AISearchIcon=lu,exports.AISearchIconExample=()=>{const e=cu();return v.jsxs("div",{className:e.container,children:[v.jsx("h2",{children:"AI Search Icon Examples"}),v.jsxs("div",{className:e.section,children:[v.jsx("h3",{children:"Standard AI Search Icon"}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Small (16px):"}),v.jsx(lu,{size:16})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Medium (20px):"}),v.jsx(lu,{size:20})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Large (24px):"}),v.jsx(lu,{size:24})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Extra Large (32px):"}),v.jsx(lu,{size:32})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Custom Colors:"}),v.jsx(lu,{size:24,color:w.tokens.colorPaletteBlueForeground2,aiIndicatorColor:w.tokens.colorPaletteGreenForeground2})]})]}),v.jsxs("div",{className:e.section,children:[v.jsx("h3",{children:"Usage in Buttons"}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Primary Button:"}),v.jsx(w.Button,{appearance:"primary",icon:v.jsx(lu,{size:16}),children:"AI Search"})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Secondary Button:"}),v.jsx(w.Button,{appearance:"secondary",icon:v.jsx(lu,{size:16}),children:"Smart Search"})]}),v.jsxs("div",{className:e.iconRow,children:[v.jsx("span",{className:e.label,children:"Icon Only Button:"}),v.jsx(w.Button,{appearance:"subtle",icon:v.jsx(lu,{size:20}),title:"AI Search"})]})]}),v.jsxs("div",{className:e.section,children:[v.jsx("h3",{children:"Usage Example Code"}),v.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=ru,exports.AdaptiveCardHostThemeType=xo,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:g}=ee(),f=x.useCallback(e=>p(e),[p]),m=x.useCallback((e,t)=>g(e,t,43200),[g]),{getCachedData:y,setCachedData:b}=ee(),C=x.useCallback(e=>y(e),[y]),k=x.useCallback((e,t)=>b(e,t,43200),[b]),[S,_]=x.useState([]),[A,E]=x.useState({}),P=x.useRef(null),M=x.useRef(null),I=x.useRef(null);x.useEffect(()=>{(async()=>{try{let t=e;const r={};if(o){const[n,i]=await Promise.all([f(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),E(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}}),E(r)}})()},[e,o,h,d,f,C]),x.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]),x.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]),x.useEffect(()=>{t<=600&&E(()=>{const e={};return S.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,S]);const B=x.useMemo(()=>t>600,[t]),{minCardWidth:L,gridGap:j,containerPadding:N}=x.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),D=t-2*N,O=x.useMemo(()=>Math.floor((D+j)/(L+j)),[D,j,L]),z=Math.max(O,1),F=x.useCallback(()=>{if(null!==P.current&&null!==M.current&&P.current!==M.current){const e=[...S],[t]=e.splice(P.current,1);e.splice(M.current,0,t),_(e),s&&s(e)}P.current=null,M.current=null},[S,s]),R=x.useCallback((e,t)=>{const r={spanCols:Math.min(Math.max(t.spanCols,1),z),spanRows:Math.min(Math.max(t.spanRows,1),n)};E(t=>({...t,[e]:r})),l&&l(e,r)},[z,n,l]),$=x.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=x.useMemo(()=>S.map((e,t)=>{var o,a,s,l;const c=!1!==e.showZoom&&B,h=e.headerAction||(c?v.jsx(FL,{values:A[e.id]||$[e.id]||{spanCols:1,spanRows:1},maxCols:z,maxRows:n,IsOpen:!1,onChange:t=>R(e.id,t)}):void 0);return v.jsx("div",{className:u.cardWrapper,draggable:i,onDragStart:()=>i&&(P.current=t),onDragEnter:()=>i&&(M.current=t),onDragOver:e=>i&&e.preventDefault(),onDragEnd:i?F:void 0,style:{gridColumnEnd:(null==(o=A[e.id])?void 0:o.spanCols)?`span ${A[e.id].spanCols}`:`span ${(null==(a=$[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=$[e.id])?void 0:l.spanRows)||1}`,cursor:i?"grab":"default"},children:v.jsxs(w.Card,{className:`${u.cardBody} ${e.className||""}`,children:[v.jsx(w.CardHeader,{header:v.jsxs(Et,{gap:"0px",children:[v.jsx(w.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&v.jsx(w.Text,{className:u.cardDescription,size:200,children:e.cardDescription})]}),action:h}),v.jsx("div",{className:u.chartContainer,style:{height:r,...e.style},children:e.content})]})},e.id)}),[S,i,F,A,u.cardBody,u.cardDescription,u.chartContainer,u.cardWrapper,B,z,n,R,r,$]);return 0===S.length?v.jsx(zL,{}):v.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 v.jsx("div",{style:a,...o,children:v.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}=zt(),c=x.useRef(null),[u,h]=x.useState([]),[d,p]=x.useState([]);return x.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]),v.jsx("div",{ref:c,className:w.mergeClasses(s.container,a),style:{maxWidth:t,...r},children:v.jsxs(kt,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[u.map((e,t)=>v.jsxs(x.Fragment,{children:[t===o?v.jsxs(kt,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?x.cloneElement(e.icon,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}}):null,v.jsx(w.Text,{className:w.mergeClasses(s.breadcrumbItem,l(e,i),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):v.jsx(w.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:v.jsx(w.Text,{className:l(e,i),children:e.label})},e.label),t<u.length-1&&v.jsx(E.ChevronRightRegular,{style:{fontSize:"large"===i?"20px":"medium"===i?"16px":"12px"}})]},e.label??`breadcrumb-${t}`)),d.length>0&&v.jsx(Ft,{items:d,theme:n})]})})},exports.ButtonMenu=Ot,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}=Gt(),h=x.useRef(null),[d,p]=x.useState(null),g=x.useRef(0),[f,m]=x.useState(new Date),[y,b]=x.useState(l??hr.Month),{getMonthCalendar:C}=sr(Intl.DateTimeFormat().resolvedOptions().timeZone),S=H.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=H.useCallback(e=>{i&&i(e),m(e)},[i]),A=H.useCallback(e=>{n&&n(e),m(e)},[n]),E=H.useCallback(e=>{o&&o(e),m(e)},[o]),P=H.useCallback(e=>{a&&a(e),b(e)},[a]),M=H.useCallback(t=>{var r;const{date:n}=t;return(null==(r=C(e,f.getFullYear(),f.getMonth())[k.format(n,"yyyy-MM-dd")])?void 0:r.flatMap(e=>e))||[]},[f,e]),I=H.useCallback(()=>{h.current&&requestAnimationFrame(()=>{if(h.current){const e=h.current.querySelector(`.${u.calendarWrapper} > div:nth-child(8)`);e&&(p(e.offsetHeight),g.current=e.offsetHeight)}})},[u.calendarWrapper]);x.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]),x.useEffect(()=>{b(l||hr.Month)},[l]);const B=H.useCallback(()=>{switch(y){case hr.Month:return v.jsx(Ar,{events:e,currentDate:f,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl});case hr.Week:return v.jsx(Er,{events:e,currentDay:f,height:t,strings:null==c?void 0:c.weekView});case hr.Day:return v.jsx(Pr,{events:e,currentDay:f,height:t,strings:null==c?void 0:c.dayView});default:return v.jsx(Ar,{events:e,currentDate:f,rowHeight:d,getCalendarDays:S,getEventsForDay:M,styles:u,onDaySlotClick:s,height:t,calendarRef:h,strings:null==c?void 0:c.calendarControl})}},[y,e,f,d,S,M,u,s,t]),L=v.jsxs(kt,{height:"100%",verticalAlign:"start",children:[v.jsx(kr,{selectedView:y,onSelectedView:P,currentDate:f,setCurrentDate:m,onWeekChange:E,onMonthChange:T,onDayChange:A,strings:null==c?void 0:c.toolbar}),v.jsx(B,{})]});return v.jsx(w.IdPrefixProvider,{value:"calendarControl-",children:r?v.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:!0,style:{width:"100%"},children:L}):v.jsx("div",{style:{width:"100%"},children:L})})},exports.CalendarMonth=mr,exports.Card=yt,exports.Carousel=e=>{const{className:t,items:r,title:n}=e,i=H.useRef(null),[o,a]=H.useState(0),[s,l]=H.useState(0),{carouselStyles:c}=(e=>{const{styles:t}=e,{getBaseStyles:r}=de();return{carouselStyles:H.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:g,embla__container:f,embla__viewport:m,embla__buttons:y}=((e,t)=>{const{getCurrentDevice:r}=de(),n=H.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=H.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:b,nextBtnDisabled:C,onPrevButtonClick:k,onNextButtonClick:S}=(e=>{const[t,r]=x.useState(!0),[n,i]=x.useState(!0),o=x.useCallback(()=>{e&&e.scrollPrev()},[e]),a=x.useCallback(()=>{e&&e.scrollNext()},[e]),s=x.useCallback(e=>{r(!e.canScrollPrev()),i(!e.canScrollNext())},[]);return x.useEffect(()=>{e&&(s(e),e.on("reInit",s),e.on("select",s))},[e,s]),{prevBtnDisabled:t,nextBtnDisabled:n,onPrevButtonClick:o,onNextButtonClick:a}})(h);return H.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()}},[]),v.jsx(v.Fragment,{children:v.jsxs("div",{id:"-carousel",className:w.mergeClasses(t,"embla"),style:{...c(o,s)},ref:i,children:[v.jsxs("div",{className:p,children:[v.jsx(w.Subtitle2,{className:d.titleStyles,children:n}),v.jsxs("div",{className:y,children:[v.jsx(w.Button,{onClick:k,disabled:b,appearance:"subtle",icon:v.jsx(E.ChevronLeftRegular,{})}),v.jsx(w.Button,{onClick:S,disabled:C,appearance:"subtle",icon:v.jsx(E.ChevronRightRegular,{})})]})]}),v.jsx("div",{className:m,ref:u,children:v.jsx("div",{className:f,children:r.map((e,t)=>v.jsx("div",{className:g,children:e},t))})})]})})},exports.Center=_t,exports.ChatInput=uu,exports.ChatInputWithMensions=gu,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:r,placeholder:n,onSend:i,theme:o,isRunning:a,onAbort:s})=>{const[l,c]=x.useState(r||""),[u,h]=x.useState(!1),d=x.useRef(null),p=b.useAIAssistantStrings(),[g,f]=x.useState({top:0,left:0}),[m,y]=x.useState([]),C=x.useRef({}),k=pu(),{warn:S,error:_}=Q();x.useEffect(()=>{var e;null==(e=d.current)||e.focus(),c(r||"")},[r]);const T=x.useCallback(pt(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()},E=x.useCallback(({users:e})=>v.jsxs("div",{className:k.listContainer,children:[0===e.length&&v.jsx(w.Caption1,{children:p.noUsersFound}),e.map(e=>v.jsx(w.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.mail),children:v.jsx(w.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[k.listContainer,A]);return v.jsxs(kt,{horizontal:!0,width:"100%",className:k.inputContainer,children:[v.jsx(uu,{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(r,n),t=r.getBoundingClientRect(),i=t.top+e.top+22,o=t.left+e.left+16;f({top:i,left:o})}}},theme:o,placeholder:n,isRunning:a,onAbort:s}),v.jsxs(Pt,{theme:o,anchorPoint:g,isOpen:u,onClose:()=>h(!1),excludeRefs:[d],children:[v.jsx(w.CardHeader,{header:v.jsx(w.Body1Strong,{className:k.sugestionsHeader,children:"Sugestions"})}),v.jsx(w.Divider,{}),v.jsx(E,{users:m})]})]})},exports.ChatList=xu,exports.Color=qu,exports.Color$1=Af,exports.Container=e=>{const{className:t,children:r,style:n,alignItems:i="center",justifyContent:o="center",flexDirection:a="row",centerContent:s=!0}=e,l=H.useRef(null),[c,u]=H.useState(0),[h,d]=H.useState(0),{containerStyles:p}=(e=>{const{maxWidth:t}=e,{getBaseStyles:r}=de();return{containerStyles:H.useCallback((n,i)=>n&&i?{...r(e,n,i),maxWidth:t}:{},[r,t,e])}})(e),g=H.useMemo(()=>S.debounce(e=>{for(const t of e){const{width:e,height:r}=t.contentRect;u(e),d(r)}},200),[]);H.useEffect(()=>{const e=new _.ResizeObserver(e=>{g(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),g.cancel()}},[g]);const f=H.useMemo(()=>{if(!n)return;const{padding:e,margin:t,...r}=n;return r},[n]);return v.jsx("div",{id:"container",className:t,style:{...p(c,h),display:"flex",justifyContent:o,alignItems:i,flexDirection:a,...f},ref:l,children:s?v.jsx(_t,{children:r}):r})},exports.ContentRenderer=vu,exports.ContentType=gt,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=H.useCallback(e=>{r&&r(e)},[r]);return v.jsx(w.Overflow,{children:v.jsxs(w.FluentProvider,{theme:i,children:[" ",v.jsxs("div",{className:w.mergeClasses(o.container),children:[e.map(e=>{const r=e.id===t;return v.jsx(w.OverflowItem,{id:e.id,priority:r?2:1,children:n(e,r,()=>a(e.id))},e.id)}),v.jsx(Di,{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:g,dataGridBodyStyles:f,refreshData:m}=e,y=e=>t.findIndex(t=>t===e),[b,x]=H.useState(new Set(n.map(e=>y(e)))),C=H.useRef(null),{styles:k}=Ti();H.useEffect(()=>{n.length>0&&x(new Set(n.map(e=>y(e))))},[n,t]),H.useEffect(()=>{m&&x(new Set)},[m]);const S=r.map(e=>w.createTableColumn({columnId:e.column,renderHeaderCell:()=>v.jsx(w.Body1Strong,{children:e.header}),renderCell:t=>v.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})),_=H.useCallback((e,t)=>{e.stopPropagation(),"row"===o&&a&&a([t])},[o,a]),T=H.useMemo(()=>"row"===o?k.rowSelection:"",[o,k.rowSelection]),A=H.useCallback(()=>v.jsx(w.DataGridBody,{style:f??{},className:g??"",children:({item:e,rowId:t})=>v.jsx(w.DataGridRow,{className:T,onClick:t=>_(t,e),children:({renderCell:t})=>v.jsx(w.DataGridCell,{children:t(e)})},t)}),[_,T,f,g]),E=H.useMemo(()=>t.length&&!d,[t,d]),P=H.useCallback(()=>d?v.jsx(v.Fragment,{children:p??v.jsx(_i,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:v.jsx(w.Spinner,{})})}):E?v.jsx(A,{}):d||t.length?v.jsx(v.Fragment,{}):v.jsx("div",{children:h}),[E,d,t,h]);return v.jsx("div",{ref:C,children:v.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)}),x(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:b,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:c,resizableColumns:u,resizableColumnsOptions:{autoFitColumns:!1},children:[v.jsx(w.DataGridHeader,{children:v.jsx(w.DataGridRow,{children:({renderHeaderCell:e})=>v.jsx(w.DataGridHeaderCell,{children:e()})})}),v.jsx(P,{})]})})},exports.DataGridV2=Ei,exports.DropdownField=({options:e,onChange:t,renderItem:r,validate:n,label:i,placeholder:o,defaultValue:a,message:s,messageType:l,required:c,size:u,hint:h})=>{const d=a?e.find(e=>e.value===a):void 0,[p,g]=x.useState(a||""),[f,m]=x.useState((null==d?void 0:d.text)||""),[y,b]=x.useState(""),C={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`}})},k=H.useMemo(()=>y?"error":"warning"===l?"warning":"info"===l?"success":"none",[y,l]),S=H.useMemo(()=>y||s,[y,s]),_=H.useCallback(()=>{switch(k){case"error":return v.jsx(E.ErrorCircle12Filled,{});case"warning":return v.jsx(E.Warning12Filled,{});case"success":return v.jsx(E.CheckmarkCircle12Filled,{});default:return null}},[k]);return v.jsx(w.Field,{label:i,required:c,validationMessage:S,validationMessageIcon:_(),size:u,hint:h,validationState:k,children:v.jsx(w.Dropdown,{placeholder:o,onOptionSelect:(e,r)=>{const i=r.optionValue||"",o=r.optionText||"";g(i),m(o);const a=n?n(i):"";b(a),!a&&t&&t(i)},value:f,selectedOptions:p?[p]:[],className:C.tagPickerControl,children:e.map(e=>v.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=hr,exports.EGoalMetric=WL,exports.EMessageType=Y,exports.FluentUIProvider=e=>{const t=(()=>{const e=H.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,className:a,styles:s,children:l}=e;return v.jsx(w.IdPrefixProvider,{value:n,children:v.jsx(w.FluentProvider,{theme:r,applyStylesToPortals:o,targetDocument:i,className:a,style:s,children:l})})},exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:r})=>{const{ref:n,overflowCount:i,isOverflowing:o}=w.useOverflowMenu();return o?v.jsxs(w.Menu,{children:[v.jsx(w.MenuTrigger,{disableButtonEnhancement:!0,children:v.jsxs(w.MenuButton,{ref:n,children:["+",i," items"]})}),v.jsx(w.MenuPopover,{children:v.jsx(w.MenuList,{children:e.map(e=>v.jsx(Oi,{id:r(e),children:t(e)},r(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:r}=e,{gridStyles:n}=bt(e),i=H.useRef(null),[o,a]=H.useState(0),[s,l]=H.useState(0);return H.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()}},[]),v.jsx(v.Fragment,{children:v.jsx("div",{className:r,style:n(o,s),ref:i,children:t})})},exports.IconButton=Rt,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:g,max:f,step:m,contentBefore:y,contentAfter:C})=>{const[k,S]=x.useState(void 0!==e?String(e):""),[_,A]=x.useState(""),P={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=b.useInputFieldStrings(),I=void 0!==e,B=I?String(e):k,L=x.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!==g&&t<g)return M.valueMustBeAtLeast.replace("{0}",String(g));if(void 0!==f&&t>f)return M.valueMustBeAtMost.replace("{0}",String(f))}if(i){const r="number"===t&&""!==e.trim()?Number(e):e;return i(r)}return""},[c,t,i,g,f,M]),j=x.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=x.useCallback(()=>{const e=L(B);A(e)},[L,B]),D=x.useMemo(()=>_?"error":"warning"===l?"warning":"info"===l?"success":"none",[_,l]),O=x.useMemo(()=>_||s,[_,s]),z=x.useCallback(()=>{switch(D){case"error":return v.jsx(E.ErrorCircle12Filled,{});case"warning":return v.jsx(E.Warning12Filled,{});case"success":return v.jsx(E.CheckmarkCircle12Filled,{});default:return null}},[D]),F="circular"===r?P.inputRoot:void 0;return v.jsx(w.Field,{label:o,required:c,validationMessage:O,validationMessageIcon:z(),size:u,hint:h,validationState:D,children:v.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:F,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:g=300})=>{const f={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=b.useItemPickerStrings(),y=a||m.placeholder,C=h||m.noResultsFound,k=d||m.searching,S=p||m.loadingMore,[_,A]=x.useState(""),E=x.useRef(null),P=x.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=x.useCallback(e=>{A(e),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{null==n||n(e)},g)},[n,g]),D=x.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=x.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 x.useEffect(()=>()=>{E.current&&clearTimeout(E.current)},[]),v.jsx("div",{className:`${f.container} ${u||""}`,...c&&{style:{width:c}},children:v.jsxs(w.TagPicker,{onOptionSelect:O,selectedOptions:M,disabled:s,children:[v.jsxs(w.TagPickerControl,{className:f.tagPickerControl,children:[v.jsx(w.TagPickerGroup,{"aria-label":m.selectedItems,children:t.map(e=>v.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))}),v.jsx(w.TagPickerInput,{className:f.tagPickerInput,"aria-label":m.searchItems,placeholder:y,value:_,onChange:e=>N(e.target.value),disabled:s})]}),v.jsx(w.TagPickerList,{ref:P,onScroll:D,className:f.pickerList,children:I?v.jsx(w.TagPickerOption,{value:"loading",children:k}):j.length>0?v.jsxs(v.Fragment,{children:[j.map(e=>v.jsx(w.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:v.jsxs("div",{className:f.optionContent,children:[v.jsx(w.Text,{weight:"semibold",children:e.text}),e.secondaryText&&v.jsx(w.Text,{size:200,className:f.optionSecondary,children:e.secondaryText})]})},e.value)),B&&v.jsx(w.TagPickerOption,{value:"loading-more",children:S})]}):v.jsx(w.TagPickerOption,{value:"no-options",children:C})})]})})},exports.JSON_SCHEMA=_C,exports.KPICard=qL,exports.KPICardCompact=GL,exports.KPICardSkeleton=HL,exports.Kpis=e=>{const{skeletonCount:t=3,compact:r=!1}=e,n=VL(),i=XL;return H.useCallback(()=>Array.from({length:t}).map((e,t)=>v.jsx(HL,{},`kpi-skeleton-${t}`)),[t]),v.jsx(v.Fragment,{children:v.jsx(Et,{gap:"l",direction:"horizontal",padding:"l",paddingTop:"s",children:v.jsx(v.Fragment,{children:v.jsx("div",{className:n.kpiContainer,children:i.length>0?i.map(e=>r?v.jsx(GL,{dataCard:e},e.identifier):v.jsx(qL,{dataCard:e},e.identifier)):v.jsx(UL,{})})})})})},exports.Layout=e=>{const{className:t,children:r,layoutConfig:n=xt}=e,i=H.useRef(null),[o,a]=H.useState(0),[s,l]=H.useState(0),{rootStyles:c,layoutGridStyles:u}=vt({...e,layoutConfig:n}),h=((e,t)=>{let r;return H.useCallback((...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return H.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]),v.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:H.Children.map(r,(e,t)=>{var r;if(H.isValidElement(e)){const n=e;return v.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 v.jsx(v.Fragment,{children:v.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,g,f,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:x.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=b.useListItemActivityStrings(),{warn:w,error:k}=Q(),S=new Map([["access",{message:(null==i?void 0:i.access)||C.accessed||(null==(a=DL.get("access"))?void 0:a.message)||"",icon:v.jsx(E.OpenRegular,{style:jL})}],["comment",{message:(null==i?void 0:i.comment)||C.commented||(null==(s=DL.get("comment"))?void 0:s.message)||"",icon:v.jsx(E.CommentRegular,{style:jL})}],["create",{message:(null==i?void 0:i.create)||C.created||(null==(l=DL.get("create"))?void 0:l.message)||"",icon:v.jsx(E.AddRegular,{style:jL})}],["delete",{message:(null==i?void 0:i.delete)||C.deleted||(null==(c=DL.get("delete"))?void 0:c.message)||"",icon:v.jsx(E.DeleteRegular,{style:jL})}],["edit",{message:(null==i?void 0:i.edit)||C.edited||(null==(u=DL.get("edit"))?void 0:u.message)||"",icon:v.jsx(E.EditRegular,{style:jL})}],["mention",{message:(null==i?void 0:i.mention)||C.mentioned||(null==(h=DL.get("mention"))?void 0:h.message)||"",icon:v.jsx(E.MentionRegular,{style:jL})}],["move",{message:(null==i?void 0:i.move)||C.moved||(null==(d=DL.get("move"))?void 0:d.message)||"",icon:v.jsx(E.ArrowMoveRegular,{style:jL})}],["rename",{message:(null==i?void 0:i.rename)||C.renamed||(null==(p=DL.get("rename"))?void 0:p.message)||"",icon:v.jsx(E.RenameRegular,{style:jL})}],["restore",{message:(null==i?void 0:i.restore)||C.restored||(null==(g=DL.get("restore"))?void 0:g.message)||"",icon:v.jsx(E.ArrowSyncRegular,{style:jL})}],["share",{message:(null==i?void 0:i.share)||C.shared||(null==(f=DL.get("share"))?void 0:f.message)||"",icon:v.jsx(E.PeopleRegular,{style:jL})}],["version",{message:(null==i?void 0:i.version)||C.versioned||(null==(m=DL.get("version"))?void 0:m.message)||"",icon:v.jsx(E.HistoryRegular,{style:jL})}]]),[_,T]=H.useState({message:"",icon:v.jsx(v.Fragment,{})}),[A,P]=H.useState(!0),M=H.useRef(void 0),I=H.useRef(void 0),[B]=H.useState(30),L=H.useCallback(e=>e.user.email===n,[n]),j=H.useCallback(e=>{if(!e)return{message:"",icon:v.jsx(v.Fragment,{})};const{action:t,actor:r}=e,{displayName:n}=(null==r?void 0:r.user)||{displayName:""},i=NL.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:v.jsx(v.Fragment,{})}},[S,L]);return H.useEffect(()=>{var e;null==(e=I.current)||e.setPlaybackRate(B/100)},[B,A]),H.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||P(!1)}},o=setTimeout(()=>{i()},1e3);return()=>{clearTimeout(o),n=!0}},[e,t,r,y,j]),v.jsx(V.Fade,{imperativeRef:I,visible:!A,children:v.jsx("div",{children:v.jsxs(kt,{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;
@@ -424,5 +424,5 @@ const SL=e=>{const{width:t,height:r,zoomable:n=!1}=e;return{root:T.css({position
424
424
  align-items: center;
425
425
  padding: 2px;
426
426
  margin-right: 8px;
427
- `},y=b.useSearchControlStrings(),v=e||y.placeholder,C=void 0!==s,k=C?s:h,S="circular"===l?g:f,_=x.useCallback((e,t)=>{C||d(t.value),null==r||r(t.value)},[C,r]),T=x.useCallback(()=>{var e;C||d(""),null==(e=p.current)||e.blur(),null==n||n(),null==t||t("")},[C,n,t]),A=x.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]),P=c??di("span",{css:m,children:di(E.SearchRegular,{})});return di(w.SearchBox,{ref:p,css:S,className:o,style:{width:a},placeholder:v,value:k,onChange:_,onKeyDown:A,disabled:i,size:u,contentBefore:P,dismiss:{onClick:T}})},exports.SelectDay=gr,exports.SelectMonth=yr,exports.SelectTime=ki,exports.SelectView=({onChange:e,defaultKey:t,label:r,options:n=[]})=>{const[i,o]=x.useState(()=>n.map(e=>({...e,selected:e.key===(t??"status")})));x.useEffect(()=>{const t=i.find(e=>e.selected);t&&e(t.key)},[]);const a=x.useCallback(t=>{const r=i.map(e=>({...e,selected:e.key===t.key}));o(r),e(t.key)},[i,e]);return v.jsxs(Et,{gap:"s",alignItems:"center",children:[r&&v.jsx(w.Label,{children:r}),v.jsx(Ot,{options:i,onSelected:a,styles:{width:220}})]})},exports.SelectWeek=Cr,exports.Set=yI,exports.ShareDialog=({isOpen:e,options:t,onClose:r})=>{const{log:n}=Q(),[i,o]=x.useState(void 0);n(i||"");const a=x.useRef(null),[s,l]=x.useState(400),{siteUrl:c,listId:u,itemId:h,name:d}=t,p=x.useCallback(()=>{r()},[r]),g=x.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 x.useEffect(()=>(window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}),[g]),x.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]),v.jsx(Mi,{isOpen:e,onDismiss:p,maxHeight:"fit-content",children:v.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=Bi();return v.jsx(w.Card,{className:r.container,children:v.jsxs(Et,{gap:"l",alignItems:"center",children:[v.jsx(E.ErrorCircleRegular,{className:r.icon}),v.jsxs(Et,{gap:"s",alignItems:"center",children:[v.jsx(w.Title3,{className:r.title,children:e}),v.jsx(w.Body1,{className:r.message,children:t})]})]})})},exports.ShowMessage=ji,exports.Space=e=>{const t=H.useRef(null),[r,n]=H.useState(0),{spaceStyles:i}=Ct(e);return H.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()}},[]),v.jsx(v.Fragment,{children:v.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=Tt(e),g="horizontal"===t,f=H.useRef(null),m=H.useRef(null),[y,b]=H.useState(null),[x,C]=H.useState(!1),[w,k]=H.useState(!1);H.useEffect(()=>{if(null!==y)return;if(!f.current)return;const e=f.current.getBoundingClientRect(),t=g?e.width:e.height;if("number"==typeof r)b(Math.min(Math.max(r,n),i));else if("string"==typeof r&&r.endsWith("%")){const e=parseFloat(r)/100;b(Math.min(Math.max(t*e,n),i))}else b(t/2)},[r,n,i,g,y]);const S=H.useCallback(t=>{if(!f.current)return t;const r=f.current.getBoundingClientRect(),a=(g?r.width:r.height)-(e.resizerSize??6)-o,s=Math.min(i,a);return Math.min(Math.max(t,n),s)},[g,i,n,o,e.resizerSize]),_=H.useCallback(e=>{if(!a)return;e.preventDefault(),C(!0);const t=g?e.clientX:e.clientY,r=y??0,n=e=>{const n=g?e.clientX:e.clientY,i=S(r+(n-t));b(i),null==s||s(i)},i=()=>{if(C(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),m.current){const e=g?m.current.getBoundingClientRect().width:m.current.getBoundingClientRect().height;null==l||l(e)}};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)},[a,g,y,S,s,l]),T=H.useCallback(e=>{if(!a)return;C(!0);const t=e.touches[0],r=g?t.clientX:t.clientY,n=y??0,i=e=>{const t=e.touches[0],i=g?t.clientX:t.clientY,o=S(n+(i-r));b(o),null==s||s(o)},o=()=>{if(C(!1),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",o),m.current){const e=g?m.current.getBoundingClientRect().width:m.current.getBoundingClientRect().height;null==l||l(e)}};document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",o)},[a,g,y,S,s,l]),A=H.useCallback(e=>{if(!a||null===y)return;const t=e.shiftKey?50:10;let r=0;if(g?"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);b(t),null==s||s(t),null==l||l(t)}},[a,y,g,S,s,l]);H.useEffect(()=>(x?(document.body.style.userSelect="none",document.body.style.cursor=g?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[x,g]);const E=H.useRef(null),P=[p.resizer,w||x?p.resizerActive:""].filter(Boolean).join(" ");return H.useEffect(()=>{if(!a||!E.current)return;const e=E.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]),v.jsxs(Et,{ref:f,className:[p.root,h].filter(Boolean).join(" "),style:{height:"100%",width:"100%",...d},direction:g?"horizontal":"vertical",overflow:"hidden",children:[v.jsx(Et,{ref:m,className:p.pane(y??void 0),style:{flex:"0 0 auto"},children:c}),a&&v.jsx(Et,{ref:E,className:P,alignItems:"center",justifyContent:"center",style:{flex:"0 0 auto"},children:v.jsxs(Et,{className:p.resizerGrip,direction:g?"vertical":"horizontal",alignItems:"center",justifyContent:"center",children:[v.jsx(Et,{className:p.gripDot,children:""}),v.jsx(Et,{className:p.gripDot,children:""}),v.jsx(Et,{className:p.gripDot,children:""})]})}),v.jsx(Et,{className:p.secondaryPane,style:{flex:1,minWidth:0,minHeight:0},children:u})]})},exports.Stack=Mw,exports.Stack$1=kt,exports.StackItem=e=>{const{children:t,grow:r,disableShrink:n,shrink:i,order:o,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=de(),c=H.useRef(null),[u,h]=H.useState(0),[d,p]=H.useState(0),g=l(e,u,d);H.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 f={...g,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 v.jsx(v.Fragment,{children:v.jsx("div",{ref:c,style:f,children:t})})},exports.StackV2=Et,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}=x.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),d=x.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?i?v.jsxs(Et,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${o||""}`,children:[u.map((e,t)=>v.jsx("div",{className:l.userCardWrapper,children:v.jsx(LL,{userId:e.id,avatarSize:r,showHoverCard:n??!0,context:i,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&v.jsxs(w.Popover,{withArrow:!0,children:[v.jsx(w.PopoverTrigger,{disableButtonEnhancement:!0,children:v.jsx(w.Button,{className:l.overflowButton,style:{width:`${r}px`,height:`${r}px`,fontSize:r>40?"14px":"12px"},appearance:"subtle",children:d})}),v.jsx(w.PopoverSurface,{className:l.popover,children:v.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>v.jsx("div",{className:l.popoverUserCard,children:v.jsx(LL,{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=JC,exports.TIME_RADIO_GROUP=bi,exports.TypographyControl=e=>{const{fontSize:t,fontFamily:r,fontWeight:n,numberOfLines:i,as:o,padding:a,paddingTop:s,paddingBottom:l,paddingLeft:c,paddingRight:u,margin:h,marginTop:d,marginBottom:p,marginLeft:g,marginRight:f,children:m,style:y,className:b,color:x,block:C,truncate:k,wrap:S}=e,_=T.css({color:x,padding:a&&Nt[a]?Nt[a]:a,paddingTop:s&&Nt[s]?Nt[s]:s,paddingBottom:l&&Nt[l]?Nt[l]:l,paddingLeft:c&&Nt[c]?Nt[c]:c,paddingRight:u&&Nt[u]?Nt[u]:u,margin:h&&Nt[h]?Nt[h]:h,marginTop:d&&Nt[d]?Nt[d]:d,marginBottom:p&&Nt[p]?Nt[p]:p,marginLeft:g&&Nt[g]?Nt[g]:g,marginRight:f&&Nt[f]?Nt[f]:f}),A={...y,...r?{fontFamily:r}:{},...t?{fontSize:jt[t]?jt[t]:t}:{},...n?{fontWeight:Dt[n]?Dt[n]:n}:{},...i?{display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",WebkitLineClamp:i}:{}};return v.jsx(w.Text,{as:o,className:w.mergeClasses(b,_),style:A,block:C,truncate:k,wrap:S,children:m})},exports.Uint8Array=Rw,exports.UniversalProvider=({context:e,children:t})=>v.jsx(Z.Provider,{value:e,children:t}),exports.UserCard=LL,exports.Utils=Lu,exports.VideoPlayer=e=>{const{url:t,controls:r=!0,width:n="100%",height:i="100%",loop:o=!1,muted:a=!1}=e,[s,l]=x.useState(!1),c=Fi(e);return v.jsx("div",{className:c.videoPlayerContainer,children:v.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=Au,exports.__name=Tu,exports.abs=ky,exports.acos=function(e){return e>1?0:e<-1?Iy:Math.acos(e)},exports.array=Ny,exports.arrayLikeKeys=Mk,exports.asin=function(e){return e>=1?By:e<=-1?-By:Math.asin(e)},exports.assignValue=_k,exports.assignWithDepth_default=fd,exports.atan2=Sy,exports.baseFor=jw,exports.baseGetTag=rw,exports.baseKeys=gI,exports.baseUnary=mk,exports.calculateMathMLDimensions=Sp,exports.calculateTextHeight=bS,exports.calculateTextWidth=vS,exports.cleanAndMerge=AS,exports.clear=$p,exports.clear$1=iM,exports.clear$2=eE,exports.clear2=ZP,exports.cloneArrayBuffer=$w,exports.cloneBuffer=Fw,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=Vw,exports.color=Wf,exports.commonDb_exports=Dp,exports.common_default=Ap,exports.commonjsGlobal=jn,exports.computeDimensionOfText=MT,exports.configureSvgSize=Mp,exports.constant=wy,exports.constant$1=am,exports.copyArray=Ww,exports.copyObject=Tk,exports.cos=_y,exports.createText=jT,exports.curveBasis=Gy,exports.darken=Zu,exports.dayjs2=Su,exports.debounce=pt,exports.decodeEntities=MS,exports.defaultCalendarControlStrings=Tr,exports.defaultCalendarMonthStrings=fr,exports.defaultConfig2=Kp,exports.defaultConfig_default=Ld,exports.defaultSelectWeekStrings=br,exports.define=_f,exports.detectContentType=mt,exports.epsilon=My,exports.eq=ww,exports.evaluate=gp,exports.every=function(e,t){return e.every(t)},exports.extend=Tf,exports.filter=function(e,t){return e.filter(t)},exports.formatTime=xi,exports.generateId=hS,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=Hp,exports.getAccTitle=Wp,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=Ud,exports.getConfig2=Yp,exports.getContentType=e=>mt(e).type,exports.getDefaultExportFromCjs=Nn,exports.getDiagramTitle=Gp,exports.getEdgeId=IS,exports.getIconSVG=yT,exports.getLineFunctionsWithOffset=IC,exports.getRegisteredLayoutAlgorithm=AM,exports.getStylesFromArray=cS,exports.getSubGraphTitleMargins=BC,exports.getThemeVariables3=Sd,exports.getUrl=pp,exports.getUserDefinedConfig=ep,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=By,exports.hasKatex=kp,exports.hue=function(e,t){var r=t-e;return r?sm(e,r>180||r<-180?r-360*Math.round(r/360):r):am(isNaN(e)?t:e)},exports.identity=Dk,exports.initCloneObject=Yw,exports.insertCluster=QA,exports.insertEdge=mM,exports.insertEdgeLabel=aM,exports.insertNode=JP,exports.interpolateNumber=hm,exports.interpolateRgb=um,exports.interpolateString=gm,exports.isArguments=rk,exports.isArray=nk,exports.isArrayLike=ok,exports.isBuffer=ck,exports.isDark=Xu,exports.isEmpty=MI,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=Ek,exports.isLabelStyle=DC,exports.isLength=ik,exports.isObject=nw,exports.isObjectLike=Zw,exports.isTypedArray=wk,exports.isValidShape=GP,exports.lighten=Yu,exports.line=Ry,exports.lineBreakRegex=tp,exports.load=TC,exports.log=Pu,exports.map=function(e,t){return e.map(t)},exports.markers_default=wM,exports.max=Ty,exports.memoize=Pw,exports.min=Ay,exports.nodeUtil=xk,exports.nogamma=cm,exports.package_default=wu,exports.parseFontSize=TS,exports.parseGenericTypes=yp,exports.pi=Iy,exports.positionEdgeLabel=lM,exports.positionNode=KP,exports.random=pS,exports.registerIconPacks=gT,exports.render=TM,exports.renderKatexSanitized=Tp,exports.replaceIconSubstring=LT,exports.rgbConvert=Uf,exports.rgba=Uu,exports.sanitizeText=sp,exports.sanitizeUrl_1=VC,exports.select=Sf,exports.selectSvgElement=Mb,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=qp,exports.setAccTitle=Vp,exports.setConfig2=Zp,exports.setDiagramTitle=Up,exports.setNodeElem=YP,exports.setupGraphViewbox=Ip,exports.setupGraphViewbox2=eg,exports.sin=Ey,exports.some=function(e,t){return e.some(t)},exports.sqrt=Py,exports.styles2String=OC,exports.tau=Ly,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=Ci,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=hT,exports.updateNodeBounds=OA,exports.useApplicationContext=K,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:r}=de();return{aspectRatioStyles:H.useCallback((n,i)=>({...r(e,n,i),...t}),[r,e,t])}},exports.useBrandCenterFonts=(e={})=>{var t,r;const{siteUrl:n,disabled:i,fonts:o}=e,a=K(),{warn:s,error:l}=Q(),[c,u]=x.useState(o??[]),[h,d]=x.useState(!i&&!o),[p,g]=x.useState(),[f,m]=x.useState(!1),y=x.useRef(!1),b=x.useCallback(async()=>{var e,t,r,o,c,h,p;if(i)return;const f=n??(null==(t=null==(e=null==a?void 0:a.pageContext)?void 0:e.web)?void 0:t.absoluteUrl);if(!f){const e="useBrandCenterFonts: no siteUrl provided and pageContext.web.absoluteUrl is not available.";return s(e),g(e),void d(!1)}d(!0),g(void 0);try{const e=`${f}/_api/SP.BrandCenter/Configuration`,t=async e=>{if(null==a?void 0:a.graphClient)return a.graphClient.get(e);const t={Accept:"application/json;odata=nometadata"};if(null==a?void 0:a.authProvider){const e=await a.authProvider.getAccessToken([`${new URL(f).origin}/.default`]);t.Authorization=`Bearer ${e}`}const r=await fetch(e,{credentials:(null==a?void 0:a.authProvider)?void 0:"include",headers:t});if(!r.ok)throw new Error(`SharePoint REST returned ${r.status}: ${e}`);return await r.json()},n=function(e){if(e)return e.d?e.d:e.BrandFontLibraryUrl||e.SiteUrl?e:void 0}(await t(e)),i=null==n?void 0:n.BrandFontLibraryUrl,l="string"==typeof i?i:null==i?void 0:i.DecodedUrl,g=!0===(null==n?void 0:n.IsBrandCenterSiteFeatureEnabled)||"true"===String(null==n?void 0:n.IsBrandCenterSiteFeatureEnabled).toLowerCase();if(!l||!g)return s("useBrandCenterFonts: Brand Center is not configured for this tenant — using Fluent UI 9 defaults."),m(!1),u(he),void d(!1);const y=null==n?void 0:n.SiteUrl,b="string"==typeof y?y:(null==y?void 0:y.DecodedUrl)??f,v=new URL(b).origin,x=l.startsWith("http")?new URL(l).pathname:l,C=`${b}/_api/web/GetList('${encodeURIComponent(x)}')/items?$select=Id,FileLeafRef,FileRef,${le},${ce},${ue},File/Name,File/ServerRelativeUrl&$expand=File&$top=5000`,w=await t(C),k=(null==(r=w.d)?void 0:r.results)??w.value??[],S=new Map;for(const r of k){const e=(null==(o=r.File)?void 0:o.Name)??r.FileLeafRef??"",t=(null==(c=e.split(".").pop())?void 0:c.toLowerCase())??"";if(!oe.has(t))continue;if(!1===r[ue])continue;const n=r[le]??e.replace(/\.[^.]+$/,"").split(/[-_]/)[0]??e,i=S.get(n);i?i.items.push(r):S.set(n,{items:[r]})}const _=[];for(const[r,o]of S){const e=[];for(const t of o.items){const r=(null==(h=t.File)?void 0:h.Name)??t.FileLeafRef??"",n=(null==(p=t.File)?void 0:p.ServerRelativeUrl)??t.FileRef??"";if(!n)continue;const i=t[ce],{fontWeight:o,fontStyle:a}=se(i,r),s=`${v}${n}`;e.push({url:s,fontWeight:o,fontStyle:a})}e.length>0&&_.push({id:r,name:r,isDefault:!1,fontFaces:e})}_.length>0&&!_.some(e=>e.isDefault)&&(_[0].isDefault=!0),_.forEach(ie),u(_),m(!0)}catch(y){const e=y instanceof Error?y.message:String(y);l("useBrandCenterFonts: failed to load fonts — falling back to Fluent UI 9 defaults",y instanceof Error?y:void 0),g(e),m(!1),u(he)}finally{d(!1)}},[i,n,null==(r=null==(t=null==a?void 0:a.pageContext)?void 0:t.web)?void 0:r.absoluteUrl,null==a?void 0:a.graphClient,null==a?void 0:a.authProvider]);x.useEffect(()=>{o?o.forEach(ie):y.current||i||(y.current=!0,b())},[b,o,i]);const v=c.find(e=>e.isDefault),C=c.map(e=>e.name);return{fonts:c,fontFamilyNames:C,defaultFont:v,loading:h,error:p,isBrandCenterAvailable:f,refresh:b}},exports.useCalendar=sr,exports.useCalendarStyles=Gt,exports.useCenterStyles=St,exports.useComponentUtils=de,exports.useDataGridStyles=Ti,exports.useDateUtils=(e,t,r)=>{const{getFormatRelative:n,formatDate:i}=ht(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=lr,exports.useGraphAPI=()=>{const e=K(),t=null==e?void 0:e.graphClient,{warn:r,error:n}=Q();return{getUser:x.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:x.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:x.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:x.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=bt,exports.useImageUtils=()=>{const{error:e}=Q(),t=x.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),r=x.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){dt&&e(`[ImageService.getBase64Image]: Err='${c.message}'`),o(c)}}),a.addEventListener("error",t=>{dt&&e(`[ImageService.getBase64Image]: Image load error='${t.message}'`),o(t)}),a.src=t}),[]),n=x.useCallback(e=>!S.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:x.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(dt&&e(`[getBase64ImageFromDOMImg]: Err='${r.message}'`))}},[]),isBase64Image:n,getImageBase64:r,base64FromSVGUrl:t}},exports.useIndexedDBCache=ee,exports.useLayoutStyles=vt,exports.useLogging=Q,exports.useMensionsStyles=hu,exports.useMermaidDiagramStyles=SL,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=yi,exports.usePolling=te,exports.useRenderHeaderStyles=Ii,exports.useSelectTimeStyles=mi,exports.useShowErrorStyles=Bi,exports.useShowMessageStyles=Li,exports.useSpaceStyles=Ct,exports.useSplitPaneStyles=Tt,exports.useStackStyles=wt,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=x.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=Vt,exports.useVideoStyles=Fi,exports.useWeekViewStyles=Yt,exports.utils_default=ES,exports.withPath=jy,exports.wrapLabel=mS;
428
- //# sourceMappingURL=index-DBmfYPjr.cjs.map
427
+ `},y=b.useSearchControlStrings(),v=e||y.placeholder,C=void 0!==s,k=C?s:h,S="circular"===l?g:f,_=x.useCallback((e,t)=>{C||d(t.value),null==r||r(t.value)},[C,r]),T=x.useCallback(()=>{var e;C||d(""),null==(e=p.current)||e.blur(),null==n||n(),null==t||t("")},[C,n,t]),A=x.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]),P=c??di("span",{css:m,children:di(E.SearchRegular,{})});return di(w.SearchBox,{ref:p,css:S,className:o,style:{width:a},placeholder:v,value:k,onChange:_,onKeyDown:A,disabled:i,size:u,contentBefore:P,dismiss:{onClick:T}})},exports.SelectDay=gr,exports.SelectMonth=yr,exports.SelectTime=ki,exports.SelectView=({onChange:e,defaultKey:t,label:r,options:n=[],styles:i})=>{const[o,a]=x.useState(()=>n.map(e=>({...e,selected:e.key===(t??"status")})));x.useEffect(()=>{const t=o.find(e=>e.selected);t&&e(t.key)},[]);const s=x.useCallback(t=>{const r=o.map(e=>({...e,selected:e.key===t.key}));a(r),e(t.key)},[o,e]);return v.jsxs(Et,{gap:"s",children:[r&&v.jsx(w.Label,{children:r}),v.jsx(Ot,{options:o,onSelected:s,styles:i??{}})]})},exports.SelectWeek=Cr,exports.Set=yI,exports.ShareDialog=({isOpen:e,options:t,onClose:r})=>{const{log:n}=Q(),[i,o]=x.useState(void 0);n(i||"");const a=x.useRef(null),[s,l]=x.useState(400),{siteUrl:c,listId:u,itemId:h,name:d}=t,p=x.useCallback(()=>{r()},[r]),g=x.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 x.useEffect(()=>(window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}),[g]),x.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]),v.jsx(Mi,{isOpen:e,onDismiss:p,maxHeight:"fit-content",children:v.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=Bi();return v.jsx(w.Card,{className:r.container,children:v.jsxs(Et,{gap:"l",alignItems:"center",children:[v.jsx(E.ErrorCircleRegular,{className:r.icon}),v.jsxs(Et,{gap:"s",alignItems:"center",children:[v.jsx(w.Title3,{className:r.title,children:e}),v.jsx(w.Body1,{className:r.message,children:t})]})]})})},exports.ShowMessage=ji,exports.Space=e=>{const t=H.useRef(null),[r,n]=H.useState(0),{spaceStyles:i}=Ct(e);return H.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()}},[]),v.jsx(v.Fragment,{children:v.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=Tt(e),g="horizontal"===t,f=H.useRef(null),m=H.useRef(null),[y,b]=H.useState(null),[x,C]=H.useState(!1),[w,k]=H.useState(!1);H.useEffect(()=>{if(null!==y)return;if(!f.current)return;const e=f.current.getBoundingClientRect(),t=g?e.width:e.height;if("number"==typeof r)b(Math.min(Math.max(r,n),i));else if("string"==typeof r&&r.endsWith("%")){const e=parseFloat(r)/100;b(Math.min(Math.max(t*e,n),i))}else b(t/2)},[r,n,i,g,y]);const S=H.useCallback(t=>{if(!f.current)return t;const r=f.current.getBoundingClientRect(),a=(g?r.width:r.height)-(e.resizerSize??6)-o,s=Math.min(i,a);return Math.min(Math.max(t,n),s)},[g,i,n,o,e.resizerSize]),_=H.useCallback(e=>{if(!a)return;e.preventDefault(),C(!0);const t=g?e.clientX:e.clientY,r=y??0,n=e=>{const n=g?e.clientX:e.clientY,i=S(r+(n-t));b(i),null==s||s(i)},i=()=>{if(C(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),m.current){const e=g?m.current.getBoundingClientRect().width:m.current.getBoundingClientRect().height;null==l||l(e)}};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i)},[a,g,y,S,s,l]),T=H.useCallback(e=>{if(!a)return;C(!0);const t=e.touches[0],r=g?t.clientX:t.clientY,n=y??0,i=e=>{const t=e.touches[0],i=g?t.clientX:t.clientY,o=S(n+(i-r));b(o),null==s||s(o)},o=()=>{if(C(!1),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",o),m.current){const e=g?m.current.getBoundingClientRect().width:m.current.getBoundingClientRect().height;null==l||l(e)}};document.addEventListener("touchmove",i,{passive:!1}),document.addEventListener("touchend",o)},[a,g,y,S,s,l]),A=H.useCallback(e=>{if(!a||null===y)return;const t=e.shiftKey?50:10;let r=0;if(g?"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);b(t),null==s||s(t),null==l||l(t)}},[a,y,g,S,s,l]);H.useEffect(()=>(x?(document.body.style.userSelect="none",document.body.style.cursor=g?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[x,g]);const E=H.useRef(null),P=[p.resizer,w||x?p.resizerActive:""].filter(Boolean).join(" ");return H.useEffect(()=>{if(!a||!E.current)return;const e=E.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]),v.jsxs(Et,{ref:f,className:[p.root,h].filter(Boolean).join(" "),style:{height:"100%",width:"100%",...d},direction:g?"horizontal":"vertical",overflow:"hidden",children:[v.jsx(Et,{ref:m,className:p.pane(y??void 0),style:{flex:"0 0 auto"},children:c}),a&&v.jsx(Et,{ref:E,className:P,alignItems:"center",justifyContent:"center",style:{flex:"0 0 auto"},children:v.jsxs(Et,{className:p.resizerGrip,direction:g?"vertical":"horizontal",alignItems:"center",justifyContent:"center",children:[v.jsx(Et,{className:p.gripDot,children:""}),v.jsx(Et,{className:p.gripDot,children:""}),v.jsx(Et,{className:p.gripDot,children:""})]})}),v.jsx(Et,{className:p.secondaryPane,style:{flex:1,minWidth:0,minHeight:0},children:u})]})},exports.Stack=Mw,exports.Stack$1=kt,exports.StackItem=e=>{const{children:t,grow:r,disableShrink:n,shrink:i,order:o,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=de(),c=H.useRef(null),[u,h]=H.useState(0),[d,p]=H.useState(0),g=l(e,u,d);H.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 f={...g,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 v.jsx(v.Fragment,{children:v.jsx("div",{ref:c,style:f,children:t})})},exports.StackV2=Et,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}=x.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),d=x.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?i?v.jsxs(Et,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${o||""}`,children:[u.map((e,t)=>v.jsx("div",{className:l.userCardWrapper,children:v.jsx(LL,{userId:e.id,avatarSize:r,showHoverCard:n??!0,context:i,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&v.jsxs(w.Popover,{withArrow:!0,children:[v.jsx(w.PopoverTrigger,{disableButtonEnhancement:!0,children:v.jsx(w.Button,{className:l.overflowButton,style:{width:`${r}px`,height:`${r}px`,fontSize:r>40?"14px":"12px"},appearance:"subtle",children:d})}),v.jsx(w.PopoverSurface,{className:l.popover,children:v.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>v.jsx("div",{className:l.popoverUserCard,children:v.jsx(LL,{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=JC,exports.TIME_RADIO_GROUP=bi,exports.TypographyControl=e=>{const{fontSize:t,fontFamily:r,fontWeight:n,numberOfLines:i,as:o,padding:a,paddingTop:s,paddingBottom:l,paddingLeft:c,paddingRight:u,margin:h,marginTop:d,marginBottom:p,marginLeft:g,marginRight:f,children:m,style:y,className:b,color:x,block:C,truncate:k,wrap:S}=e,_=T.css({color:x,padding:a&&Nt[a]?Nt[a]:a,paddingTop:s&&Nt[s]?Nt[s]:s,paddingBottom:l&&Nt[l]?Nt[l]:l,paddingLeft:c&&Nt[c]?Nt[c]:c,paddingRight:u&&Nt[u]?Nt[u]:u,margin:h&&Nt[h]?Nt[h]:h,marginTop:d&&Nt[d]?Nt[d]:d,marginBottom:p&&Nt[p]?Nt[p]:p,marginLeft:g&&Nt[g]?Nt[g]:g,marginRight:f&&Nt[f]?Nt[f]:f}),A={...y,...r?{fontFamily:r}:{},...t?{fontSize:jt[t]?jt[t]:t}:{},...n?{fontWeight:Dt[n]?Dt[n]:n}:{},...i?{display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",WebkitLineClamp:i}:{}};return v.jsx(w.Text,{as:o,className:w.mergeClasses(b,_),style:A,block:C,truncate:k,wrap:S,children:m})},exports.Uint8Array=Rw,exports.UniversalProvider=({context:e,children:t})=>v.jsx(Z.Provider,{value:e,children:t}),exports.UserCard=LL,exports.Utils=Lu,exports.VideoPlayer=e=>{const{url:t,controls:r=!0,width:n="100%",height:i="100%",loop:o=!1,muted:a=!1}=e,[s,l]=x.useState(!1),c=Fi(e);return v.jsx("div",{className:c.videoPlayerContainer,children:v.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=Au,exports.__name=Tu,exports.abs=ky,exports.acos=function(e){return e>1?0:e<-1?Iy:Math.acos(e)},exports.array=Ny,exports.arrayLikeKeys=Mk,exports.asin=function(e){return e>=1?By:e<=-1?-By:Math.asin(e)},exports.assignValue=_k,exports.assignWithDepth_default=fd,exports.atan2=Sy,exports.baseFor=jw,exports.baseGetTag=rw,exports.baseKeys=gI,exports.baseUnary=mk,exports.calculateMathMLDimensions=Sp,exports.calculateTextHeight=bS,exports.calculateTextWidth=vS,exports.cleanAndMerge=AS,exports.clear=$p,exports.clear$1=iM,exports.clear$2=eE,exports.clear2=ZP,exports.cloneArrayBuffer=$w,exports.cloneBuffer=Fw,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=Vw,exports.color=Wf,exports.commonDb_exports=Dp,exports.common_default=Ap,exports.commonjsGlobal=jn,exports.computeDimensionOfText=MT,exports.configureSvgSize=Mp,exports.constant=wy,exports.constant$1=am,exports.copyArray=Ww,exports.copyObject=Tk,exports.cos=_y,exports.createText=jT,exports.curveBasis=Gy,exports.darken=Zu,exports.dayjs2=Su,exports.debounce=pt,exports.decodeEntities=MS,exports.defaultCalendarControlStrings=Tr,exports.defaultCalendarMonthStrings=fr,exports.defaultConfig2=Kp,exports.defaultConfig_default=Ld,exports.defaultSelectWeekStrings=br,exports.define=_f,exports.detectContentType=mt,exports.epsilon=My,exports.eq=ww,exports.evaluate=gp,exports.every=function(e,t){return e.every(t)},exports.extend=Tf,exports.filter=function(e,t){return e.filter(t)},exports.formatTime=xi,exports.generateId=hS,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=Hp,exports.getAccTitle=Wp,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=Ud,exports.getConfig2=Yp,exports.getContentType=e=>mt(e).type,exports.getDefaultExportFromCjs=Nn,exports.getDiagramTitle=Gp,exports.getEdgeId=IS,exports.getIconSVG=yT,exports.getLineFunctionsWithOffset=IC,exports.getRegisteredLayoutAlgorithm=AM,exports.getStylesFromArray=cS,exports.getSubGraphTitleMargins=BC,exports.getThemeVariables3=Sd,exports.getUrl=pp,exports.getUserDefinedConfig=ep,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=By,exports.hasKatex=kp,exports.hue=function(e,t){var r=t-e;return r?sm(e,r>180||r<-180?r-360*Math.round(r/360):r):am(isNaN(e)?t:e)},exports.identity=Dk,exports.initCloneObject=Yw,exports.insertCluster=QA,exports.insertEdge=mM,exports.insertEdgeLabel=aM,exports.insertNode=JP,exports.interpolateNumber=hm,exports.interpolateRgb=um,exports.interpolateString=gm,exports.isArguments=rk,exports.isArray=nk,exports.isArrayLike=ok,exports.isBuffer=ck,exports.isDark=Xu,exports.isEmpty=MI,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=Ek,exports.isLabelStyle=DC,exports.isLength=ik,exports.isObject=nw,exports.isObjectLike=Zw,exports.isTypedArray=wk,exports.isValidShape=GP,exports.lighten=Yu,exports.line=Ry,exports.lineBreakRegex=tp,exports.load=TC,exports.log=Pu,exports.map=function(e,t){return e.map(t)},exports.markers_default=wM,exports.max=Ty,exports.memoize=Pw,exports.min=Ay,exports.nodeUtil=xk,exports.nogamma=cm,exports.package_default=wu,exports.parseFontSize=TS,exports.parseGenericTypes=yp,exports.pi=Iy,exports.positionEdgeLabel=lM,exports.positionNode=KP,exports.random=pS,exports.registerIconPacks=gT,exports.render=TM,exports.renderKatexSanitized=Tp,exports.replaceIconSubstring=LT,exports.rgbConvert=Uf,exports.rgba=Uu,exports.sanitizeText=sp,exports.sanitizeUrl_1=VC,exports.select=Sf,exports.selectSvgElement=Mb,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=qp,exports.setAccTitle=Vp,exports.setConfig2=Zp,exports.setDiagramTitle=Up,exports.setNodeElem=YP,exports.setupGraphViewbox=Ip,exports.setupGraphViewbox2=eg,exports.sin=Ey,exports.some=function(e,t){return e.some(t)},exports.sqrt=Py,exports.styles2String=OC,exports.tau=Ly,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=Ci,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=hT,exports.updateNodeBounds=OA,exports.useApplicationContext=K,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:r}=de();return{aspectRatioStyles:H.useCallback((n,i)=>({...r(e,n,i),...t}),[r,e,t])}},exports.useBrandCenterFonts=(e={})=>{var t,r;const{siteUrl:n,disabled:i,fonts:o}=e,a=K(),{warn:s,error:l}=Q(),[c,u]=x.useState(o??[]),[h,d]=x.useState(!i&&!o),[p,g]=x.useState(),[f,m]=x.useState(!1),y=x.useRef(!1),b=x.useCallback(async()=>{var e,t,r,o,c,h,p;if(i)return;const f=n??(null==(t=null==(e=null==a?void 0:a.pageContext)?void 0:e.web)?void 0:t.absoluteUrl);if(!f){const e="useBrandCenterFonts: no siteUrl provided and pageContext.web.absoluteUrl is not available.";return s(e),g(e),void d(!1)}d(!0),g(void 0);try{const e=`${f}/_api/SP.BrandCenter/Configuration`,t=async e=>{if(null==a?void 0:a.graphClient)return a.graphClient.get(e);const t={Accept:"application/json;odata=nometadata"};if(null==a?void 0:a.authProvider){const e=await a.authProvider.getAccessToken([`${new URL(f).origin}/.default`]);t.Authorization=`Bearer ${e}`}const r=await fetch(e,{credentials:(null==a?void 0:a.authProvider)?void 0:"include",headers:t});if(!r.ok)throw new Error(`SharePoint REST returned ${r.status}: ${e}`);return await r.json()},n=function(e){if(e)return e.d?e.d:e.BrandFontLibraryUrl||e.SiteUrl?e:void 0}(await t(e)),i=null==n?void 0:n.BrandFontLibraryUrl,l="string"==typeof i?i:null==i?void 0:i.DecodedUrl,g=!0===(null==n?void 0:n.IsBrandCenterSiteFeatureEnabled)||"true"===String(null==n?void 0:n.IsBrandCenterSiteFeatureEnabled).toLowerCase();if(!l||!g)return s("useBrandCenterFonts: Brand Center is not configured for this tenant — using Fluent UI 9 defaults."),m(!1),u(he),void d(!1);const y=null==n?void 0:n.SiteUrl,b="string"==typeof y?y:(null==y?void 0:y.DecodedUrl)??f,v=new URL(b).origin,x=l.startsWith("http")?new URL(l).pathname:l,C=`${b}/_api/web/GetList('${encodeURIComponent(x)}')/items?$select=Id,FileLeafRef,FileRef,${le},${ce},${ue},File/Name,File/ServerRelativeUrl&$expand=File&$top=5000`,w=await t(C),k=(null==(r=w.d)?void 0:r.results)??w.value??[],S=new Map;for(const r of k){const e=(null==(o=r.File)?void 0:o.Name)??r.FileLeafRef??"",t=(null==(c=e.split(".").pop())?void 0:c.toLowerCase())??"";if(!oe.has(t))continue;if(!1===r[ue])continue;const n=r[le]??e.replace(/\.[^.]+$/,"").split(/[-_]/)[0]??e,i=S.get(n);i?i.items.push(r):S.set(n,{items:[r]})}const _=[];for(const[r,o]of S){const e=[];for(const t of o.items){const r=(null==(h=t.File)?void 0:h.Name)??t.FileLeafRef??"",n=(null==(p=t.File)?void 0:p.ServerRelativeUrl)??t.FileRef??"";if(!n)continue;const i=t[ce],{fontWeight:o,fontStyle:a}=se(i,r),s=`${v}${n}`;e.push({url:s,fontWeight:o,fontStyle:a})}e.length>0&&_.push({id:r,name:r,isDefault:!1,fontFaces:e})}_.length>0&&!_.some(e=>e.isDefault)&&(_[0].isDefault=!0),_.forEach(ie),u(_),m(!0)}catch(y){const e=y instanceof Error?y.message:String(y);l("useBrandCenterFonts: failed to load fonts — falling back to Fluent UI 9 defaults",y instanceof Error?y:void 0),g(e),m(!1),u(he)}finally{d(!1)}},[i,n,null==(r=null==(t=null==a?void 0:a.pageContext)?void 0:t.web)?void 0:r.absoluteUrl,null==a?void 0:a.graphClient,null==a?void 0:a.authProvider]);x.useEffect(()=>{o?o.forEach(ie):y.current||i||(y.current=!0,b())},[b,o,i]);const v=c.find(e=>e.isDefault),C=c.map(e=>e.name);return{fonts:c,fontFamilyNames:C,defaultFont:v,loading:h,error:p,isBrandCenterAvailable:f,refresh:b}},exports.useCalendar=sr,exports.useCalendarStyles=Gt,exports.useCenterStyles=St,exports.useComponentUtils=de,exports.useDataGridStyles=Ti,exports.useDateUtils=(e,t,r)=>{const{getFormatRelative:n,formatDate:i}=ht(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=lr,exports.useGraphAPI=()=>{const e=K(),t=null==e?void 0:e.graphClient,{warn:r,error:n}=Q();return{getUser:x.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:x.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:x.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:x.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=bt,exports.useImageUtils=()=>{const{error:e}=Q(),t=x.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),r=x.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){dt&&e(`[ImageService.getBase64Image]: Err='${c.message}'`),o(c)}}),a.addEventListener("error",t=>{dt&&e(`[ImageService.getBase64Image]: Image load error='${t.message}'`),o(t)}),a.src=t}),[]),n=x.useCallback(e=>!S.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:x.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(dt&&e(`[getBase64ImageFromDOMImg]: Err='${r.message}'`))}},[]),isBase64Image:n,getImageBase64:r,base64FromSVGUrl:t}},exports.useIndexedDBCache=ee,exports.useLayoutStyles=vt,exports.useLogging=Q,exports.useMensionsStyles=hu,exports.useMermaidDiagramStyles=SL,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=yi,exports.usePolling=te,exports.useRenderHeaderStyles=Ii,exports.useSelectTimeStyles=mi,exports.useShowErrorStyles=Bi,exports.useShowMessageStyles=Li,exports.useSpaceStyles=Ct,exports.useSplitPaneStyles=Tt,exports.useStackStyles=wt,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=x.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=Vt,exports.useVideoStyles=Fi,exports.useWeekViewStyles=Yt,exports.utils_default=ES,exports.withPath=jy,exports.wrapLabel=mS;
428
+ //# sourceMappingURL=index-Drtv-A5D.cjs.map