adminizer 5.2.0-build.30 → 5.2.0-build.31

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 (95) hide show
  1. package/assets/{abnfDiagram-VCTEODGH-BhZn7BLv.js → abnfDiagram-VCTEODGH-BtJg_wq8.js} +1 -1
  2. package/assets/{add-DDfJt70P.js → add-CcMmw50d.js} +1 -1
  3. package/assets/{add-group-Cs3S9VVn.js → add-group-BI7Il1o9.js} +1 -1
  4. package/assets/{add-user-DxI_sJLw.js → add-user-CbTznIir.js} +1 -1
  5. package/assets/ai-assistant/agent.es.js +19398 -15273
  6. package/assets/app-Cg7dXJfk.js +138 -0
  7. package/assets/{arc-BRY7wCfa.js → arc-BH-jID2f.js} +1 -1
  8. package/assets/{architectureDiagram-5GKGNRK7-DfBT7jAW.js → architectureDiagram-5GKGNRK7-BmFO29Ca.js} +1 -1
  9. package/assets/{blockDiagram-I7D4REHJ-CW2mcR7Z.js → blockDiagram-I7D4REHJ-kmdi7zCh.js} +6 -6
  10. package/assets/{c4Diagram-7LVT6UL2-BGsyO-4Y.js → c4Diagram-7LVT6UL2-BqfDgZbz.js} +1 -1
  11. package/assets/{catalog-cyCZOCXs.js → catalog-BefPw8hG.js} +1 -1
  12. package/assets/channel-X5bzKz26.js +1 -0
  13. package/assets/{chunk-2Q5K7J3B-4EnjsYhG.js → chunk-2Q5K7J3B-5iRxjfuJ.js} +1 -1
  14. package/assets/{chunk-5VM5RSS4-BVzmz0IS.js → chunk-5VM5RSS4-BhQiByv7.js} +1 -1
  15. package/assets/{chunk-F27PBJKO-Bkf9Z4lt.js → chunk-F27PBJKO-IjJk4n9A.js} +1 -1
  16. package/assets/{chunk-IMKFNOWR-Dg6Y3xGC.js → chunk-IMKFNOWR-ymA9WbHJ.js} +1 -1
  17. package/assets/{chunk-JWPE2WC7-BdVNpqE2.js → chunk-JWPE2WC7-Dyix1HHX.js} +1 -1
  18. package/assets/{chunk-POPQ4Y6H-0R-etdBM.js → chunk-POPQ4Y6H-IQ0zsMJS.js} +1 -1
  19. package/assets/{chunk-SVP7TREG-CdABJwLU.js → chunk-SVP7TREG-CXCxziXD.js} +1 -1
  20. package/assets/{chunk-TICWLB2K-Da-oSw37.js → chunk-TICWLB2K-BcvDM7WB.js} +1 -1
  21. package/assets/{chunk-XXDRQBXY-Ba8BsH2Z.js → chunk-XXDRQBXY-c2W5S_dd.js} +1 -1
  22. package/assets/classDiagram-ZZMXUADV-EpRQ1LwP.js +1 -0
  23. package/assets/classDiagram-v2-VYDZK3BY-EpRQ1LwP.js +1 -0
  24. package/assets/controls/ckeditor.es.js +12237 -12061
  25. package/assets/controls/handsontable.es.js +12692 -12652
  26. package/assets/controls/jsoneditor.es.js +12652 -12557
  27. package/assets/controls/leaflet.es.js +377 -374
  28. package/assets/controls/toast-ui.es.js +16101 -15857
  29. package/assets/{cose-bilkent-JH36ORCC-BYrWDdVx.js → cose-bilkent-JH36ORCC-B5pmdKpq.js} +1 -1
  30. package/assets/{cynefin-OW5HDTMX-CwHzXvDB.js → cynefin-OW5HDTMX-HzbUuFkc.js} +1 -1
  31. package/assets/{cynefinDiagram-5FMLGOSQ-V6tH6arn.js → cynefinDiagram-5FMLGOSQ-DUOm6HTV.js} +1 -1
  32. package/assets/cytoscape.esm-BDkkwuE4.js +321 -0
  33. package/assets/{dagre-GXQ25YYZ-CaBvafdG.js → dagre-GXQ25YYZ-Cq_xhTkE.js} +1 -1
  34. package/assets/{dashboard-C27hB1GI.js → dashboard-D_XSE-mA.js} +1 -1
  35. package/assets/{diagram-S7CK7UJ4-85jkE9hd.js → diagram-S7CK7UJ4-BB0h2Ycq.js} +1 -1
  36. package/assets/{diagram-UQ7AKVKN-DHJRq1TM.js → diagram-UQ7AKVKN-UmvM898J.js} +1 -1
  37. package/assets/{diagram-VSXAHHWV-C74VLfSc.js → diagram-VSXAHHWV-C3pfgVZR.js} +1 -1
  38. package/assets/{diagram-VX7I27RA-CVJcG5hn.js → diagram-VX7I27RA-S-iQHosH.js} +1 -1
  39. package/assets/{diagram-Z3DM3KII-B8ybg5RA.js → diagram-Z3DM3KII-wkmwXnCL.js} +1 -1
  40. package/assets/{docs-CK6W0Jko.js → docs-DmiXIQku.js} +1 -1
  41. package/assets/{ebnfDiagram-PWID7BFC-D_gz_iz6.js → ebnfDiagram-PWID7BFC-TXvp9u_g.js} +1 -1
  42. package/assets/{erDiagram-RLTQ6QDP-D3W95aGH.js → erDiagram-RLTQ6QDP-D3kVz7Nb.js} +1 -1
  43. package/assets/{flowDiagram-HODETNUW-D2PTWIEg.js → flowDiagram-HODETNUW-7gxPRGUj.js} +1 -1
  44. package/assets/{ganttDiagram-EL5Y4UJY-TFBUh0C6.js → ganttDiagram-EL5Y4UJY-CPN-jcnj.js} +1 -1
  45. package/assets/{gitGraphDiagram-WWUBYQGX-BfFJzeqx.js → gitGraphDiagram-WWUBYQGX-Br1ZEaO6.js} +1 -1
  46. package/assets/{history-DX6CEQqv.js → history-Bu1mzK4I.js} +1 -1
  47. package/assets/{infoDiagram-27XIBGKW-esGmrWiw.js → infoDiagram-27XIBGKW-zYs7bQjE.js} +1 -1
  48. package/assets/{init-user-D1G_dbcZ.js → init-user-fQwp0v90.js} +1 -1
  49. package/assets/{ishikawaDiagram-5VMMS53U--aGHPnva.js → ishikawaDiagram-5VMMS53U-BjXTvzge.js} +1 -1
  50. package/assets/{journeyDiagram-3NMN7TZE-03BXeE8O.js → journeyDiagram-3NMN7TZE-CBfsgbN2.js} +1 -1
  51. package/assets/{kanban-definition-UXKFOSKX-JdDv2WHg.js → kanban-definition-UXKFOSKX-CrzhTXng.js} +1 -1
  52. package/assets/{layout-Bz6WKClu.js → layout-BUEOcJh3.js} +1 -1
  53. package/assets/{linear-Chzx_9mb.js → linear-Djausokh.js} +1 -1
  54. package/assets/{list-BuSdZ2Ic.js → list-ACmum9cV.js} +2 -2
  55. package/assets/{login-DFWfnrmE.js → login-BQuIs2j8.js} +1 -1
  56. package/assets/manifest.json +280 -280
  57. package/assets/{media-manager-CT4LZgo_.js → media-manager-CU4vMw1V.js} +1 -1
  58. package/assets/mermaid.core-Dojzw60O.js +310 -0
  59. package/assets/{mindmap-definition-YA3MSWOX-BJSEYobY.js → mindmap-definition-YA3MSWOX-s62CDc7B.js} +1 -1
  60. package/assets/{module-Cgn-q5gZ.js → module-Cb67xTGv.js} +1 -1
  61. package/assets/{notification-BrfoqVVT.js → notification-BTTSwP6c.js} +1 -1
  62. package/assets/{pegDiagram-XKGWAZYB-ccVsKwl1.js → pegDiagram-XKGWAZYB-C61Y70Sx.js} +1 -1
  63. package/assets/{pieDiagram-E7YTZNPT-B1XZVgNq.js → pieDiagram-E7YTZNPT-p2kr4IMf.js} +1 -1
  64. package/assets/{quadrantDiagram-AXDQQJYC-CdABEYmF.js → quadrantDiagram-AXDQQJYC-Bt0TmDnC.js} +1 -1
  65. package/assets/{railroadDiagram-O6MQD6OU-OX83MXuO.js → railroadDiagram-O6MQD6OU-3OLC0D_j.js} +1 -1
  66. package/assets/{register-Cxf3Pow-.js → register-BIVlQHtg.js} +1 -1
  67. package/assets/{requirementDiagram-BXWQKSXE-CD7swf9u.js → requirementDiagram-BXWQKSXE-DX_wfhH_.js} +1 -1
  68. package/assets/{ru-DxiFV21N.js → ru-CQbDDiCI.js} +1 -1
  69. package/assets/{sankeyDiagram-P5KCCOFB-Cgwq2DVJ.js → sankeyDiagram-P5KCCOFB-C5owbfFt.js} +1 -1
  70. package/assets/{sequenceDiagram-WJ2MYXX4-BgjP07Zh.js → sequenceDiagram-WJ2MYXX4-C9LP6Bzy.js} +1 -1
  71. package/assets/{sizeCapture-INFHLROL-B-jQ1aKT.js → sizeCapture-INFHLROL-B7ZoWp62.js} +1 -1
  72. package/assets/{stateDiagram-D77RDMKH-Drot14NK.js → stateDiagram-D77RDMKH-uWI0NoaS.js} +1 -1
  73. package/assets/stateDiagram-v2-MP3YSRHH-B_Bjdct-.js +1 -0
  74. package/assets/{swimlanes-42K2YHIH-lCqHhK1l.js → swimlanes-42K2YHIH-B665ttwU.js} +1 -1
  75. package/assets/swimlanesDiagram-VR7AAH4N-BDCBtik2.js +8 -0
  76. package/assets/{timeline-definition-24CTP7MA-B-QLcvwc.js → timeline-definition-24CTP7MA-BI5S9uY1.js} +1 -1
  77. package/assets/{use-appearance-B0ck1CR_.js → use-appearance-CETqIse6.js} +1 -1
  78. package/assets/{user-filters-list-ce2cmS5Z.js → user-filters-list-CyxWxLux.js} +1 -1
  79. package/assets/{vennDiagram-4TSXK5OY-2DN2uspP.js → vennDiagram-4TSXK5OY-Ba9orEWx.js} +1 -1
  80. package/assets/{wardleyDiagram-VM6X3IG4-C_GODc0p.js → wardleyDiagram-VM6X3IG4-DTWvvomz.js} +1 -1
  81. package/assets/{welcome-DaAj6jOI.js → welcome-CaSypMCF.js} +1 -1
  82. package/assets/{with-app-layout-CwAECGwY.js → with-app-layout-BNrVlaFw.js} +23 -23
  83. package/assets/{xychartDiagram-S5SC5T6Z-Cq8htGoW.js → xychartDiagram-S5SC5T6Z-d9Kf7FbS.js} +1 -1
  84. package/helpers/publicUserHelper.d.ts +10 -0
  85. package/helpers/publicUserHelper.js +15 -0
  86. package/package.json +1 -1
  87. package/system/bindInertia.js +2 -1
  88. package/assets/app-DOMFUTFw.js +0 -138
  89. package/assets/channel-Bd-bsjgh.js +0 -1
  90. package/assets/classDiagram-ZZMXUADV-BftNBmvr.js +0 -1
  91. package/assets/classDiagram-v2-VYDZK3BY-BftNBmvr.js +0 -1
  92. package/assets/cytoscape.esm-BB4DxJjf.js +0 -321
  93. package/assets/mermaid.core-Dp-0i8FJ.js +0 -310
  94. package/assets/stateDiagram-v2-MP3YSRHH-C5VLF0H1.js +0 -1
  95. package/assets/swimlanesDiagram-VR7AAH4N-4yyX1ZbA.js +0 -8
@@ -0,0 +1,310 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sizeCapture-INFHLROL-B7ZoWp62.js","./app-Cg7dXJfk.js","./app-DM8KzeFz.css","./isObject-DL-BuaBl.js","./dagre-GXQ25YYZ-Cq_xhTkE.js","./layout-BUEOcJh3.js","./toNumber-DZb-r9sy.js","./swimlanes-42K2YHIH-B665ttwU.js","./cose-bilkent-JH36ORCC-B5pmdKpq.js","./cytoscape.esm-BDkkwuE4.js","./c4Diagram-7LVT6UL2-BqfDgZbz.js","./chunk-F27PBJKO-IjJk4n9A.js","./flowDiagram-HODETNUW-7gxPRGUj.js","./chunk-5VM5RSS4-BhQiByv7.js","./chunk-XXDRQBXY-c2W5S_dd.js","./chunk-POPQ4Y6H-IQ0zsMJS.js","./channel-X5bzKz26.js","./swimlanesDiagram-VR7AAH4N-BDCBtik2.js","./erDiagram-RLTQ6QDP-D3kVz7Nb.js","./gitGraphDiagram-WWUBYQGX-Br1ZEaO6.js","./chunk-2Q5K7J3B-5iRxjfuJ.js","./chunk-JWPE2WC7-Dyix1HHX.js","./cynefin-OW5HDTMX-HzbUuFkc.js","./ganttDiagram-EL5Y4UJY-CPN-jcnj.js","./linear-Djausokh.js","./init-Gi6I4Gst.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-27XIBGKW-zYs7bQjE.js","./pieDiagram-E7YTZNPT-p2kr4IMf.js","./arc-BH-jID2f.js","./ordinal-Cboi1Yqb.js","./quadrantDiagram-AXDQQJYC-Bt0TmDnC.js","./xychartDiagram-S5SC5T6Z-d9Kf7FbS.js","./requirementDiagram-BXWQKSXE-DX_wfhH_.js","./sequenceDiagram-WJ2MYXX4-C9LP6Bzy.js","./classDiagram-ZZMXUADV-EpRQ1LwP.js","./chunk-TICWLB2K-BcvDM7WB.js","./classDiagram-v2-VYDZK3BY-EpRQ1LwP.js","./stateDiagram-D77RDMKH-uWI0NoaS.js","./chunk-IMKFNOWR-ymA9WbHJ.js","./stateDiagram-v2-MP3YSRHH-B_Bjdct-.js","./journeyDiagram-3NMN7TZE-CBfsgbN2.js","./timeline-definition-24CTP7MA-BI5S9uY1.js","./mindmap-definition-YA3MSWOX-s62CDc7B.js","./kanban-definition-UXKFOSKX-CrzhTXng.js","./sankeyDiagram-P5KCCOFB-C5owbfFt.js","./diagram-Z3DM3KII-wkmwXnCL.js","./diagram-UQ7AKVKN-UmvM898J.js","./blockDiagram-I7D4REHJ-kmdi7zCh.js","./diagram-S7CK7UJ4-BB0h2Ycq.js","./architectureDiagram-5GKGNRK7-BmFO29Ca.js","./diagram-VSXAHHWV-C3pfgVZR.js","./ishikawaDiagram-5VMMS53U-BjXTvzge.js","./vennDiagram-4TSXK5OY-Ba9orEWx.js","./diagram-VX7I27RA-S-iQHosH.js","./wardleyDiagram-VM6X3IG4-DTWvvomz.js","./cynefinDiagram-5FMLGOSQ-DUOm6HTV.js","./railroadDiagram-O6MQD6OU-3OLC0D_j.js","./chunk-SVP7TREG-CXCxziXD.js","./ebnfDiagram-PWID7BFC-TXvp9u_g.js","./abnfDiagram-VCTEODGH-BtJg_wq8.js","./pegDiagram-XKGWAZYB-C61Y70Sx.js"])))=>i.map(i=>d[i]);
2
+ import{cY as mC,cZ as yC,a2 as CC,c_ as xC,aA as Pl,bM as $t,c$ as bC}from"./app-Cg7dXJfk.js";import{a as Rl,S as Gi,i as Nl,c as Ko,r as Ur,b as Xi,f as kC}from"./isObject-DL-BuaBl.js";function wC(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Qo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);const a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(Qo.Cache||Map),r}Qo.Cache=Map;function _c(e){if(e==null)return!0;if(mC(e))return typeof e.splice!="function"&&typeof e!="string"&&!yC(e)&&!CC(e)&&!xC(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return wC(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}function df(e,t){for(var r=-1,i=e==null?0:e.length,o=Array(i);++r<i;)o[r]=t(e[r],r,e);return o}var Ee=Array.isArray,Sc=Gi?Gi.prototype:void 0,vc=Sc?Sc.toString:void 0;function ff(e){if(typeof e=="string")return e;if(Ee(e))return df(e,ff)+"";if(Rl(e))return vc?vc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ua(e){return e}var TC="[object AsyncFunction]",_C="[object Function]",SC="[object GeneratorFunction]",vC="[object Proxy]";function Rs(e){if(!Nl(e))return!1;var t=Ko(e);return t==_C||t==SC||t==TC||t==vC}var Za=Ur["__core-js_shared__"],Bc=(function(){var e=/[^.]+$/.exec(Za&&Za.keys&&Za.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function BC(e){return!!Bc&&Bc in e}var LC=Function.prototype,FC=LC.toString;function ci(e){if(e!=null){try{return FC.call(e)}catch{}try{return e+""}catch{}}return""}var EC=/[\\^$.*+?()[\]{}|]/g,AC=/^\[object .+?Constructor\]$/,MC=Function.prototype,$C=Object.prototype,OC=MC.toString,DC=$C.hasOwnProperty,IC=RegExp("^"+OC.call(DC).replace(EC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PC(e){if(!Nl(e)||BC(e))return!1;var t=Rs(e)?IC:AC;return t.test(ci(e))}function RC(e,t){return e?.[t]}function ui(e,t){var r=RC(e,t);return PC(r)?r:void 0}var Vn=ui(Ur,"WeakMap");function NC(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)}function qC(){}var zC=800,WC=16,HC=Date.now;function YC(e){var t=0,r=0;return function(){var i=HC(),o=WC-(i-r);if(r=i,o>0){if(++t>=zC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function To(e){return function(){return e}}var Lc=(function(){try{var e=ui(Object,"defineProperty");return e({},"",{}),e}catch{}})(),UC=Lc?function(e,t){return Lc(e,"toString",{configurable:!0,enumerable:!1,value:To(t),writable:!0})}:ua,jC=YC(UC);function GC(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function XC(e,t,r,i){for(var o=e.length,s=r+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function VC(e){return e!==e}function ZC(e,t,r){for(var i=r-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function KC(e,t,r){return t===t?ZC(e,t,r):XC(e,VC,r)}function QC(e,t){var r=e==null?0:e.length;return!!r&&KC(e,t,0)>-1}var JC=9007199254740991,tx=/^(?:0|[1-9]\d*)$/;function pf(e,t){var r=typeof e;return t=t??JC,!!t&&(r=="number"||r!="symbol"&&tx.test(e))&&e>-1&&e%1==0&&e<t}function gf(e,t){return e===t||e!==e&&t!==t}var Fc=Math.max;function ex(e,t,r){return t=Fc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=Fc(i.length-t,0),a=Array(s);++o<s;)a[o]=i[t+o];o=-1;for(var n=Array(t+1);++o<t;)n[o]=i[o];return n[t]=r(a),NC(e,this,n)}}function rx(e,t){return jC(ex(e,t,ua),e+"")}var ix=9007199254740991;function ql(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ix}function da(e){return e!=null&&ql(e.length)&&!Rs(e)}var ox=Object.prototype;function mf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ox;return e===r}function sx(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var ax="[object Arguments]";function Ec(e){return Xi(e)&&Ko(e)==ax}var yf=Object.prototype,nx=yf.hasOwnProperty,lx=yf.propertyIsEnumerable,fa=Ec((function(){return arguments})())?Ec:function(e){return Xi(e)&&nx.call(e,"callee")&&!lx.call(e,"callee")};function hx(){return!1}var Cf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ac=Cf&&typeof module=="object"&&module&&!module.nodeType&&module,cx=Ac&&Ac.exports===Cf,Mc=cx?Ur.Buffer:void 0,ux=Mc?Mc.isBuffer:void 0,Ns=ux||hx,dx="[object Arguments]",fx="[object Array]",px="[object Boolean]",gx="[object Date]",mx="[object Error]",yx="[object Function]",Cx="[object Map]",xx="[object Number]",bx="[object Object]",kx="[object RegExp]",wx="[object Set]",Tx="[object String]",_x="[object WeakMap]",Sx="[object ArrayBuffer]",vx="[object DataView]",Bx="[object Float32Array]",Lx="[object Float64Array]",Fx="[object Int8Array]",Ex="[object Int16Array]",Ax="[object Int32Array]",Mx="[object Uint8Array]",$x="[object Uint8ClampedArray]",Ox="[object Uint16Array]",Dx="[object Uint32Array]",Gt={};Gt[Bx]=Gt[Lx]=Gt[Fx]=Gt[Ex]=Gt[Ax]=Gt[Mx]=Gt[$x]=Gt[Ox]=Gt[Dx]=!0;Gt[dx]=Gt[fx]=Gt[Sx]=Gt[px]=Gt[vx]=Gt[gx]=Gt[mx]=Gt[yx]=Gt[Cx]=Gt[xx]=Gt[bx]=Gt[kx]=Gt[wx]=Gt[Tx]=Gt[_x]=!1;function Ix(e){return Xi(e)&&ql(e.length)&&!!Gt[Ko(e)]}function Px(e){return function(t){return e(t)}}var xf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$o=xf&&typeof module=="object"&&module&&!module.nodeType&&module,Rx=$o&&$o.exports===xf,Ka=Rx&&kC.process,$c=(function(){try{var e=$o&&$o.require&&$o.require("util").types;return e||Ka&&Ka.binding&&Ka.binding("util")}catch{}})(),Oc=$c&&$c.isTypedArray,zl=Oc?Px(Oc):Ix,Nx=Object.prototype,qx=Nx.hasOwnProperty;function zx(e,t){var r=Ee(e),i=!r&&fa(e),o=!r&&!i&&Ns(e),s=!r&&!i&&!o&&zl(e),a=r||i||o||s,n=a?sx(e.length,String):[],l=n.length;for(var c in e)(t||qx.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||pf(c,l)))&&n.push(c);return n}function Wx(e,t){return function(r){return e(t(r))}}var Hx=Wx(Object.keys,Object),Yx=Object.prototype,Ux=Yx.hasOwnProperty;function bf(e){if(!mf(e))return Hx(e);var t=[];for(var r in Object(e))Ux.call(e,r)&&r!="constructor"&&t.push(r);return t}function er(e){return da(e)?zx(e):bf(e)}var jx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gx=/^\w*$/;function Wl(e,t){if(Ee(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Rl(e)?!0:Gx.test(e)||!jx.test(e)||t!=null&&e in Object(t)}var qo=ui(Object,"create");function Xx(){this.__data__=qo?qo(null):{},this.size=0}function Vx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Zx="__lodash_hash_undefined__",Kx=Object.prototype,Qx=Kx.hasOwnProperty;function Jx(e){var t=this.__data__;if(qo){var r=t[e];return r===Zx?void 0:r}return Qx.call(t,e)?t[e]:void 0}var tb=Object.prototype,eb=tb.hasOwnProperty;function rb(e){var t=this.__data__;return qo?t[e]!==void 0:eb.call(t,e)}var ib="__lodash_hash_undefined__";function ob(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qo&&t===void 0?ib:t,this}function ii(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ii.prototype.clear=Xx;ii.prototype.delete=Vx;ii.prototype.get=Jx;ii.prototype.has=rb;ii.prototype.set=ob;function sb(){this.__data__=[],this.size=0}function pa(e,t){for(var r=e.length;r--;)if(gf(e[r][0],t))return r;return-1}var ab=Array.prototype,nb=ab.splice;function lb(e){var t=this.__data__,r=pa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():nb.call(t,r,1),--this.size,!0}function hb(e){var t=this.__data__,r=pa(t,e);return r<0?void 0:t[r][1]}function cb(e){return pa(this.__data__,e)>-1}function ub(e,t){var r=this.__data__,i=pa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Sr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Sr.prototype.clear=sb;Sr.prototype.delete=lb;Sr.prototype.get=hb;Sr.prototype.has=cb;Sr.prototype.set=ub;var zo=ui(Ur,"Map");function db(){this.size=0,this.__data__={hash:new ii,map:new(zo||Sr),string:new ii}}function fb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e,t){var r=e.__data__;return fb(t)?r[typeof t=="string"?"string":"hash"]:r.map}function pb(e){var t=ga(this,e).delete(e);return this.size-=t?1:0,t}function gb(e){return ga(this,e).get(e)}function mb(e){return ga(this,e).has(e)}function yb(e,t){var r=ga(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function vr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}vr.prototype.clear=db;vr.prototype.delete=pb;vr.prototype.get=gb;vr.prototype.has=mb;vr.prototype.set=yb;var Cb="Expected a function";function Hl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Cb);var r=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,i);return r.cache=s.set(o,a)||s,a};return r.cache=new(Hl.Cache||vr),r}Hl.Cache=vr;var xb=500;function bb(e){var t=Hl(e,function(i){return r.size===xb&&r.clear(),i}),r=t.cache;return t}var kb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wb=/\\(\\)?/g,Tb=bb(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(kb,function(r,i,o,s){t.push(o?s.replace(wb,"$1"):i||r)}),t});function _b(e){return e==null?"":ff(e)}function kf(e,t){return Ee(e)?e:Wl(e,t)?[e]:Tb(_b(e))}function ma(e){if(typeof e=="string"||Rl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wf(e,t){t=kf(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[ma(t[r++])];return r&&r==i?e:void 0}function Sb(e,t,r){var i=e==null?void 0:wf(e,t);return i===void 0?r:i}function Tf(e,t){for(var r=-1,i=t.length,o=e.length;++r<i;)e[o+r]=t[r];return e}var Dc=Gi?Gi.isConcatSpreadable:void 0;function vb(e){return Ee(e)||fa(e)||!!(Dc&&e&&e[Dc])}function Bb(e,t,r,i,o){var s=-1,a=e.length;for(r||(r=vb),o||(o=[]);++s<a;){var n=e[s];r(n)?Tf(o,n):i||(o[o.length]=n)}return o}function Lb(e,t,r,i){var o=-1,s=e==null?0:e.length;for(i&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}function Fb(){this.__data__=new Sr,this.size=0}function Eb(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Ab(e){return this.__data__.get(e)}function Mb(e){return this.__data__.has(e)}var $b=200;function Ob(e,t){var r=this.__data__;if(r instanceof Sr){var i=r.__data__;if(!zo||i.length<$b-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new vr(i)}return r.set(e,t),this.size=r.size,this}function br(e){var t=this.__data__=new Sr(e);this.size=t.size}br.prototype.clear=Fb;br.prototype.delete=Eb;br.prototype.get=Ab;br.prototype.has=Mb;br.prototype.set=Ob;function _f(e,t){for(var r=-1,i=e==null?0:e.length,o=0,s=[];++r<i;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function Db(){return[]}var Ib=Object.prototype,Pb=Ib.propertyIsEnumerable,Ic=Object.getOwnPropertySymbols,Rb=Ic?function(e){return e==null?[]:(e=Object(e),_f(Ic(e),function(t){return Pb.call(e,t)}))}:Db;function Nb(e,t,r){var i=t(e);return Ee(e)?i:Tf(i,r(e))}function Pc(e){return Nb(e,er,Rb)}var Zn=ui(Ur,"DataView"),Kn=ui(Ur,"Promise"),Bi=ui(Ur,"Set"),Rc="[object Map]",qb="[object Object]",Nc="[object Promise]",qc="[object Set]",zc="[object WeakMap]",Wc="[object DataView]",zb=ci(Zn),Wb=ci(zo),Hb=ci(Kn),Yb=ci(Bi),Ub=ci(Vn),xr=Ko;(Zn&&xr(new Zn(new ArrayBuffer(1)))!=Wc||zo&&xr(new zo)!=Rc||Kn&&xr(Kn.resolve())!=Nc||Bi&&xr(new Bi)!=qc||Vn&&xr(new Vn)!=zc)&&(xr=function(e){var t=Ko(e),r=t==qb?e.constructor:void 0,i=r?ci(r):"";if(i)switch(i){case zb:return Wc;case Wb:return Rc;case Hb:return Nc;case Yb:return qc;case Ub:return zc}return t});var Hc=Ur.Uint8Array,jb="__lodash_hash_undefined__";function Gb(e){return this.__data__.set(e,jb),this}function Xb(e){return this.__data__.has(e)}function Wo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new vr;++t<r;)this.add(e[t])}Wo.prototype.add=Wo.prototype.push=Gb;Wo.prototype.has=Xb;function Vb(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function Sf(e,t){return e.has(t)}var Zb=1,Kb=2;function vf(e,t,r,i,o,s){var a=r&Zb,n=e.length,l=t.length;if(n!=l&&!(a&&l>n))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var u=-1,d=!0,f=r&Kb?new Wo:void 0;for(s.set(e,t),s.set(t,e);++u<n;){var m=e[u],y=t[u];if(i)var C=a?i(y,m,u,t,e,s):i(m,y,u,e,t,s);if(C!==void 0){if(C)continue;d=!1;break}if(f){if(!Vb(t,function(x,k){if(!Sf(f,k)&&(m===x||o(m,x,r,i,s)))return f.push(k)})){d=!1;break}}else if(!(m===y||o(m,y,r,i,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function Qb(e){var t=-1,r=Array(e.size);return e.forEach(function(i,o){r[++t]=[o,i]}),r}function Yl(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var Jb=1,t1=2,e1="[object Boolean]",r1="[object Date]",i1="[object Error]",o1="[object Map]",s1="[object Number]",a1="[object RegExp]",n1="[object Set]",l1="[object String]",h1="[object Symbol]",c1="[object ArrayBuffer]",u1="[object DataView]",Yc=Gi?Gi.prototype:void 0,Qa=Yc?Yc.valueOf:void 0;function d1(e,t,r,i,o,s,a){switch(r){case u1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case c1:return!(e.byteLength!=t.byteLength||!s(new Hc(e),new Hc(t)));case e1:case r1:case s1:return gf(+e,+t);case i1:return e.name==t.name&&e.message==t.message;case a1:case l1:return e==t+"";case o1:var n=Qb;case n1:var l=i&Jb;if(n||(n=Yl),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=t1,a.set(e,t);var h=vf(n(e),n(t),i,o,s,a);return a.delete(e),h;case h1:if(Qa)return Qa.call(e)==Qa.call(t)}return!1}var f1=1,p1=Object.prototype,g1=p1.hasOwnProperty;function m1(e,t,r,i,o,s){var a=r&f1,n=Pc(e),l=n.length,c=Pc(t),h=c.length;if(l!=h&&!a)return!1;for(var u=l;u--;){var d=n[u];if(!(a?d in t:g1.call(t,d)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var y=!0;s.set(e,t),s.set(t,e);for(var C=a;++u<l;){d=n[u];var x=e[d],k=t[d];if(i)var T=a?i(k,x,d,t,e,s):i(x,k,d,e,t,s);if(!(T===void 0?x===k||o(x,k,r,i,s):T)){y=!1;break}C||(C=d=="constructor")}if(y&&!C){var S=e.constructor,v=t.constructor;S!=v&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof v=="function"&&v instanceof v)&&(y=!1)}return s.delete(e),s.delete(t),y}var y1=1,Uc="[object Arguments]",jc="[object Array]",ds="[object Object]",C1=Object.prototype,Gc=C1.hasOwnProperty;function x1(e,t,r,i,o,s){var a=Ee(e),n=Ee(t),l=a?jc:xr(e),c=n?jc:xr(t);l=l==Uc?ds:l,c=c==Uc?ds:c;var h=l==ds,u=c==ds,d=l==c;if(d&&Ns(e)){if(!Ns(t))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new br),a||zl(e)?vf(e,t,r,i,o,s):d1(e,t,l,r,i,o,s);if(!(r&y1)){var f=h&&Gc.call(e,"__wrapped__"),m=u&&Gc.call(t,"__wrapped__");if(f||m){var y=f?e.value():e,C=m?t.value():t;return s||(s=new br),o(y,C,r,i,s)}}return d?(s||(s=new br),m1(e,t,r,i,o,s)):!1}function Ul(e,t,r,i,o){return e===t?!0:e==null||t==null||!Xi(e)&&!Xi(t)?e!==e&&t!==t:x1(e,t,r,i,Ul,o)}var b1=1,k1=2;function w1(e,t,r,i){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var n=a[0],l=e[n],c=a[1];if(a[2]){if(l===void 0&&!(n in e))return!1}else{var h=new br,u;if(!(u===void 0?Ul(c,l,b1|k1,i,h):u))return!1}}return!0}function Bf(e){return e===e&&!Nl(e)}function T1(e){for(var t=er(e),r=t.length;r--;){var i=t[r],o=e[i];t[r]=[i,o,Bf(o)]}return t}function Lf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function _1(e){var t=T1(e);return t.length==1&&t[0][2]?Lf(t[0][0],t[0][1]):function(r){return r===e||w1(r,e,t)}}function S1(e,t){return e!=null&&t in Object(e)}function v1(e,t,r){t=kf(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var a=ma(t[i]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&ql(o)&&pf(a,o)&&(Ee(e)||fa(e)))}function B1(e,t){return e!=null&&v1(e,t,S1)}var L1=1,F1=2;function E1(e,t){return Wl(e)&&Bf(t)?Lf(ma(e),t):function(r){var i=Sb(r,e);return i===void 0&&i===t?B1(r,e):Ul(t,i,L1|F1)}}function A1(e){return function(t){return t?.[e]}}function M1(e){return function(t){return wf(t,e)}}function $1(e){return Wl(e)?A1(ma(e)):M1(e)}function Ff(e){return typeof e=="function"?e:e==null?ua:typeof e=="object"?Ee(e)?E1(e[0],e[1]):_1(e):$1(e)}function O1(e){return function(t,r,i){for(var o=-1,s=Object(t),a=i(t),n=a.length;n--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var D1=O1();function I1(e,t){return e&&D1(e,t,er)}function P1(e,t){return function(r,i){if(r==null)return r;if(!da(r))return e(r,i);for(var o=r.length,s=-1,a=Object(r);++s<o&&i(a[s],s,a)!==!1;);return r}}var jl=P1(I1);function R1(e){return Xi(e)&&da(e)}function N1(e){return typeof e=="function"?e:ua}function jr(e,t){var r=Ee(e)?GC:jl;return r(e,N1(t))}function q1(e,t){var r=[];return jl(e,function(i,o,s){t(i,o,s)&&r.push(i)}),r}function fs(e,t){var r=Ee(e)?_f:q1;return r(e,Ff(t))}function z1(e,t){return df(t,function(r){return e[r]})}function Ja(e){return e==null?[]:z1(e,er(e))}var W1="[object Map]",H1="[object Set]",Y1=Object.prototype,U1=Y1.hasOwnProperty;function Xc(e){if(e==null)return!0;if(da(e)&&(Ee(e)||typeof e=="string"||typeof e.splice=="function"||Ns(e)||zl(e)||fa(e)))return!e.length;var t=xr(e);if(t==W1||t==H1)return!e.size;if(mf(e))return!bf(e).length;for(var r in e)if(U1.call(e,r))return!1;return!0}function Ti(e){return e===void 0}function j1(e,t,r,i,o){return o(e,function(s,a,n){r=i?(i=!1,s):t(r,s,a,n)}),r}function G1(e,t,r){var i=Ee(e)?Lb:j1,o=arguments.length<3;return i(e,Ff(t),r,o,jl)}var X1=1/0,V1=Bi&&1/Yl(new Bi([,-0]))[1]==X1?function(e){return new Bi(e)}:qC,Z1=200;function K1(e,t,r){var i=-1,o=QC,s=e.length,a=!0,n=[],l=n;if(s>=Z1){var c=V1(e);if(c)return Yl(c);a=!1,o=Sf,l=new Wo}else l=n;t:for(;++i<s;){var h=e[i],u=h;if(h=h!==0?h:0,a&&u===u){for(var d=l.length;d--;)if(l[d]===u)continue t;n.push(h)}else o(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var Q1=rx(function(e){return K1(Bb(e,1,R1,!0))}),Ef=Object.defineProperty,p=(e,t)=>Ef(e,"name",{value:t,configurable:!0}),J1=(e,t)=>{for(var r in t)Ef(e,r,{get:t[r],enumerable:!0})},Bs={exports:{}},tk=Bs.exports,Vc;function ek(){return Vc||(Vc=1,(function(e,t){(function(r,i){e.exports=i()})(tk,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",m="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|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,k={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(O){var D=["th","st","nd","rd"],B=O%100;return"["+O+(D[(B-20)%10]||D[B]||D[0])+"]"}},T=function(O,D,B){var q=String(O);return!q||q.length>=D?O:""+Array(D+1-q.length).join(B)+O},S={s:T,z:function(O){var D=-O.utcOffset(),B=Math.abs(D),q=Math.floor(B/60),R=B%60;return(D<=0?"+":"-")+T(q,2,"0")+":"+T(R,2,"0")},m:function O(D,B){if(D.date()<B.date())return-O(B,D);var q=12*(B.year()-D.year())+(B.month()-D.month()),R=D.clone().add(q,u),at=B-R<0,J=D.clone().add(q+(at?-1:1),u);return+(-(q+(B-R)/(at?R-J:J-R))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:u,y:f,w:h,d:c,D:m,h:l,m:n,s:a,ms:s,Q:d}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},v="en",A={};A[v]=k;var L="$isDayjsObject",E=function(O){return O instanceof st||!(!O||!O[L])},Z=function O(D,B,q){var R;if(!D)return v;if(typeof D=="string"){var at=D.toLowerCase();A[at]&&(R=at),B&&(A[at]=B,R=at);var J=D.split("-");if(!R&&J.length>1)return O(J[0])}else{var mt=D.name;A[mt]=D,R=mt}return!q&&R&&(v=R),R||!q&&v},Y=function(O,D){if(E(O))return O.clone();var B=typeof D=="object"?D:{};return B.date=O,B.args=arguments,new st(B)},P=S;P.l=Z,P.i=E,P.w=function(O,D){return Y(O,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var st=(function(){function O(B){this.$L=Z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[L]=!0}var D=O.prototype;return D.parse=function(B){this.$d=(function(q){var R=q.date,at=q.utc;if(R===null)return new Date(NaN);if(P.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var J=R.match(C);if(J){var mt=J[2]-1||0,wt=(J[7]||"0").substring(0,3);return at?new Date(Date.UTC(J[1],mt,J[3]||1,J[4]||0,J[5]||0,J[6]||0,wt)):new Date(J[1],mt,J[3]||1,J[4]||0,J[5]||0,J[6]||0,wt)}}return new Date(R)})(B),this.init()},D.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},D.$utils=function(){return P},D.isValid=function(){return this.$d.toString()!==y},D.isSame=function(B,q){var R=Y(B);return this.startOf(q)<=R&&R<=this.endOf(q)},D.isAfter=function(B,q){return Y(B)<this.startOf(q)},D.isBefore=function(B,q){return this.endOf(q)<Y(B)},D.$g=function(B,q,R){return P.u(B)?this[q]:this.set(R,B)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(B,q){var R=this,at=!!P.u(q)||q,J=P.p(B),mt=function(vt,Nt){var Wt=P.w(R.$u?Date.UTC(R.$y,Nt,vt):new Date(R.$y,Nt,vt),R);return at?Wt:Wt.endOf(c)},wt=function(vt,Nt){return P.w(R.toDate()[vt].apply(R.toDate("s"),(at?[0,0,0,0]:[23,59,59,999]).slice(Nt)),R)},Tt=this.$W,Et=this.$M,Lt=this.$D,nt="set"+(this.$u?"UTC":"");switch(J){case f:return at?mt(1,0):mt(31,11);case u:return at?mt(1,Et):mt(0,Et+1);case h:var kt=this.$locale().weekStart||0,Ot=(Tt<kt?Tt+7:Tt)-kt;return mt(at?Lt-Ot:Lt+(6-Ot),Et);case c:case m:return wt(nt+"Hours",0);case l:return wt(nt+"Minutes",1);case n:return wt(nt+"Seconds",2);case a:return wt(nt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(B){return this.startOf(B,!1)},D.$set=function(B,q){var R,at=P.p(B),J="set"+(this.$u?"UTC":""),mt=(R={},R[c]=J+"Date",R[m]=J+"Date",R[u]=J+"Month",R[f]=J+"FullYear",R[l]=J+"Hours",R[n]=J+"Minutes",R[a]=J+"Seconds",R[s]=J+"Milliseconds",R)[at],wt=at===c?this.$D+(q-this.$W):q;if(at===u||at===f){var Tt=this.clone().set(m,1);Tt.$d[mt](wt),Tt.init(),this.$d=Tt.set(m,Math.min(this.$D,Tt.daysInMonth())).$d}else mt&&this.$d[mt](wt);return this.init(),this},D.set=function(B,q){return this.clone().$set(B,q)},D.get=function(B){return this[P.p(B)]()},D.add=function(B,q){var R,at=this;B=Number(B);var J=P.p(q),mt=function(Et){var Lt=Y(at);return P.w(Lt.date(Lt.date()+Math.round(Et*B)),at)};if(J===u)return this.set(u,this.$M+B);if(J===f)return this.set(f,this.$y+B);if(J===c)return mt(1);if(J===h)return mt(7);var wt=(R={},R[n]=i,R[l]=o,R[a]=r,R)[J]||1,Tt=this.$d.getTime()+B*wt;return P.w(Tt,this)},D.subtract=function(B,q){return this.add(-1*B,q)},D.format=function(B){var q=this,R=this.$locale();if(!this.isValid())return R.invalidDate||y;var at=B||"YYYY-MM-DDTHH:mm:ssZ",J=P.z(this),mt=this.$H,wt=this.$m,Tt=this.$M,Et=R.weekdays,Lt=R.months,nt=R.meridiem,kt=function(Nt,Wt,le,we){return Nt&&(Nt[Wt]||Nt(q,at))||le[Wt].slice(0,we)},Ot=function(Nt){return P.s(mt%12||12,Nt,"0")},vt=nt||function(Nt,Wt,le){var we=Nt<12?"AM":"PM";return le?we.toLowerCase():we};return at.replace(x,(function(Nt,Wt){return Wt||(function(le){switch(le){case"YY":return String(q.$y).slice(-2);case"YYYY":return P.s(q.$y,4,"0");case"M":return Tt+1;case"MM":return P.s(Tt+1,2,"0");case"MMM":return kt(R.monthsShort,Tt,Lt,3);case"MMMM":return kt(Lt,Tt);case"D":return q.$D;case"DD":return P.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return kt(R.weekdaysMin,q.$W,Et,2);case"ddd":return kt(R.weekdaysShort,q.$W,Et,3);case"dddd":return Et[q.$W];case"H":return String(mt);case"HH":return P.s(mt,2,"0");case"h":return Ot(1);case"hh":return Ot(2);case"a":return vt(mt,wt,!0);case"A":return vt(mt,wt,!1);case"m":return String(wt);case"mm":return P.s(wt,2,"0");case"s":return String(q.$s);case"ss":return P.s(q.$s,2,"0");case"SSS":return P.s(q.$ms,3,"0");case"Z":return J}return null})(Nt)||J.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(B,q,R){var at,J=this,mt=P.p(q),wt=Y(B),Tt=(wt.utcOffset()-this.utcOffset())*i,Et=this-wt,Lt=function(){return P.m(J,wt)};switch(mt){case f:at=Lt()/12;break;case u:at=Lt();break;case d:at=Lt()/3;break;case h:at=(Et-Tt)/6048e5;break;case c:at=(Et-Tt)/864e5;break;case l:at=Et/o;break;case n:at=Et/i;break;case a:at=Et/r;break;default:at=Et}return R?at:P.a(at)},D.daysInMonth=function(){return this.endOf(u).$D},D.$locale=function(){return A[this.$L]},D.locale=function(B,q){if(!B)return this.$L;var R=this.clone(),at=Z(B,q,!0);return at&&(R.$L=at),R},D.clone=function(){return P.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},O})(),U=st.prototype;return Y.prototype=U,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",u],["$y",f],["$D",m]].forEach((function(O){U[O[1]]=function(D){return this.$g(D,O[0],O[1])}})),Y.extend=function(O,D){return O.$i||(O(D,st,Y),O.$i=!0),Y},Y.locale=Z,Y.isDayjs=E,Y.unix=function(O){return Y(1e3*O)},Y.en=A[v],Y.Ls=A,Y.p={},Y}))})(Bs)),Bs.exports}var rk=ek();const ik=Pl(rk);var fr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},N={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Gl=p(function(e="fatal"){let t=fr.fatal;typeof e=="string"?e.toLowerCase()in fr&&(t=fr[e]):typeof e=="number"&&(t=e),N.trace=()=>{},N.debug=()=>{},N.info=()=>{},N.warn=()=>{},N.error=()=>{},N.fatal=()=>{},t<=fr.fatal&&(N.fatal=console.error?console.error.bind(console,Ie("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ie("FATAL"))),t<=fr.error&&(N.error=console.error?console.error.bind(console,Ie("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ie("ERROR"))),t<=fr.warn&&(N.warn=console.warn?console.warn.bind(console,Ie("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ie("WARN"))),t<=fr.info&&(N.info=console.info?console.info.bind(console,Ie("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ie("INFO"))),t<=fr.debug&&(N.debug=console.debug?console.debug.bind(console,Ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("DEBUG"))),t<=fr.trace&&(N.trace=console.debug?console.debug.bind(console,Ie("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("TRACE")))},"setLogLevel"),Ie=p(e=>`%c${ik().format("ss.SSS")} : ${e} : `,"format");const Ls={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+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return Ls.hue2rgb(s,o,e+1/3)*255;case"g":return Ls.hue2rgb(s,o,e)*255;case"b":return Ls.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},ok={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},sk={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Ft={channel:Ls,lang:ok,unit:sk},Ir={};for(let e=0;e<=255;e++)Ir[e]=Ft.unit.dec2hex(e);const ge={ALL:0,RGB:1,HSL:2};let ak=class{constructor(){this.type=ge.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ge.ALL}is(t){return this.type===t}};class nk{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new ak}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ge.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=Ft.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Ft.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=Ft.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=Ft.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Ft.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=Ft.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ge.HSL)&&r!==void 0?r:(this._ensureHSL(),Ft.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ge.HSL)&&r!==void 0?r:(this._ensureHSL(),Ft.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ge.HSL)&&r!==void 0?r:(this._ensureHSL(),Ft.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ge.RGB)&&r!==void 0?r:(this._ensureRGB(),Ft.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ge.RGB)&&r!==void 0?r:(this._ensureRGB(),Ft.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ge.RGB)&&r!==void 0?r:(this._ensureRGB(),Ft.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ge.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ge.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ge.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ge.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ge.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ge.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ya=new nk({r:0,g:0,b:0,a:0},"transparent"),Li={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Li.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return ya.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Ir[Math.round(t)]}${Ir[Math.round(r)]}${Ir[Math.round(i)]}${Ir[Math.round(o*255)]}`:`#${Ir[Math.round(t)]}${Ir[Math.round(r)]}${Ir[Math.round(i)]}`}},Qr={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(Qr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Ft.channel.clamp.h(parseFloat(r)*.9);case"rad":return Ft.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Ft.channel.clamp.h(parseFloat(r)*360)}}return Ft.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Qr.re);if(!r)return;const[,i,o,s,a,n]=r;return ya.set({h:Qr._hue2deg(i),s:Ft.channel.clamp.s(parseFloat(o)),l:Ft.channel.clamp.l(parseFloat(s)),a:a?Ft.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${Ft.lang.round(t)}, ${Ft.lang.round(r)}%, ${Ft.lang.round(i)}%, ${o})`:`hsl(${Ft.lang.round(t)}, ${Ft.lang.round(r)}%, ${Ft.lang.round(i)}%)`}},Oo={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=Oo.colors[e];if(t)return Li.parse(t)},stringify:e=>{const t=Li.stringify(e);for(const r in Oo.colors)if(Oo.colors[r]===t)return r}},_o={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(_o.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return ya.set({r:Ft.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:Ft.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:Ft.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Ft.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${Ft.lang.round(t)}, ${Ft.lang.round(r)}, ${Ft.lang.round(i)}, ${Ft.lang.round(o)})`:`rgb(${Ft.lang.round(t)}, ${Ft.lang.round(r)}, ${Ft.lang.round(i)})`}},or={format:{keyword:Oo,hex:Li,rgb:_o,rgba:_o,hsl:Qr,hsla:Qr},parse:e=>{if(typeof e!="string")return e;const t=Li.parse(e)||_o.parse(e)||Qr.parse(e)||Oo.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ge.HSL)||e.data.r===void 0?Qr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?_o.stringify(e):Li.stringify(e)},Af=(e,t)=>{const r=or.parse(e);for(const i in t)r[i]=Ft.channel.clamp[i](t[i]);return or.stringify(r)},qr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Af(e,{a:t});const o=ya.set({r:Ft.channel.clamp.r(e),g:Ft.channel.clamp.g(t),b:Ft.channel.clamp.b(r),a:Ft.channel.clamp.a(i)});return or.stringify(o)},lk=e=>{const{r:t,g:r,b:i}=or.parse(e),o=.2126*Ft.channel.toLinear(t)+.7152*Ft.channel.toLinear(r)+.0722*Ft.channel.toLinear(i);return Ft.lang.round(o)},hk=e=>lk(e)>=.5,je=e=>!hk(e),Mf=(e,t,r)=>{const i=or.parse(e),o=i[t],s=Ft.channel.clamp[t](o+r);return o!==s&&(i[t]=s),or.stringify(i)},z=(e,t)=>Mf(e,"l",t),W=(e,t)=>Mf(e,"l",-t),b=(e,t)=>{const r=or.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Af(e,i)},ck=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=or.parse(e),{r:n,g:l,b:c,a:h}=or.parse(t),u=r/100,d=u*2-1,f=a-h,y=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,C=1-y,x=i*y+n*C,k=o*y+l*C,T=s*y+c*C,S=a*u+h*(1-u);return qr(x,k,T,S)},M=(e,t=100)=>{const r=or.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ck(r,e,t)};function Zc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function uk(e){if(Array.isArray(e))return e}function dk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function fk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pk(e,t){return uk(e)||dk(e,t)||gk(e,t)||fk()}function gk(e,t){if(e){if(typeof e=="string")return Zc(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zc(e,t):void 0}}const $f=Object.entries,Kc=Object.setPrototypeOf,mk=Object.isFrozen,Of=Object.getPrototypeOf,Df=Object.getOwnPropertyDescriptor;let ne=Object.freeze,fe=Object.seal,_i=Object.create,If=typeof Reflect<"u"&&Reflect,Qn=If.apply,Jn=If.construct;ne||(ne=function(t){return t});fe||(fe=function(t){return t});Qn||(Qn=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});Jn||(Jn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const pr=Zt(Array.prototype.forEach),yk=Zt(Array.prototype.lastIndexOf),Qc=Zt(Array.prototype.pop),uo=Zt(Array.prototype.push),Ck=Zt(Array.prototype.slice),xk=Zt(Array.prototype.splice),Fi=Array.isArray,tn=Pf(Set),en=Zt(Set.prototype.add),fo=Zt(Set.prototype.has),Vr=Zt(String.prototype.toLowerCase),rn=Zt(String.prototype.toString),Jc=Zt(String.prototype.match),po=Zt(String.prototype.replace),tu=Zt(String.prototype.indexOf),bk=Zt(String.prototype.trim),kk=Zt(Number.prototype.toString),wk=Zt(Boolean.prototype.toString),eu=typeof BigInt>"u"?null:Zt(BigInt.prototype.toString),ru=typeof Symbol>"u"?null:Zt(Symbol.prototype.toString),Be=Zt(Object.prototype.hasOwnProperty),go=Zt(Object.prototype.toString),ue=Zt(RegExp.prototype.test),gr=Pf(TypeError);function Zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return Qn(e,t,i)}}function Pf(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Jn(e,r)}}function qt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vr;if(Kc&&Kc(e,null),!Fi(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&(mk(t)||(t[i]=s),o=s)}e[o]=!0}return e}function Tk(e){for(let t=0;t<e.length;t++)Be(e,t)||(e[t]=null);return e}function Me(e){const t=_i(null);for(const i of $f(e)){var r=pk(i,2);const o=r[0],s=r[1];Be(e,o)&&(Fi(s)?t[o]=Tk(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Me(s):t[o]=s)}return t}function _k(e){switch(typeof e){case"string":return e;case"number":return kk(e);case"boolean":return wk(e);case"bigint":return eu?eu(e):"0";case"symbol":return ru?ru(e):"Symbol()";case"undefined":return go(e);case"function":case"object":{if(e===null)return go(e);const t=e,r=Pe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:go(i)}return go(e)}default:return go(e)}}function Pe(e,t){for(;e!==null;){const i=Df(e,t);if(i){if(i.get)return Zt(i.get);if(typeof i.value=="function")return Zt(i.value)}e=Of(e)}function r(){return null}return r}function Sk(e,t){for(;e!==null;){const r=Df(e,t);if(r)return r.get?Zt(r.get):null;e=Of(e)}return null}function vk(e){try{return ue(e,""),!0}catch{return!1}}const iu=ne(["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"]),on=ne(["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"]),sn=ne(["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"]),Bk=ne(["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"]),an=ne(["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"]),Lk=ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ou=ne(["#text"]),su=ne(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),nn=ne(["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","dominant-baseline","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","pointer-events","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-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),au=ne(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),ps=ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fk=fe(/{{[\w\W]*|^[\w\W]*}}/g),Ek=fe(/<%[\w\W]*|^[\w\W]*%>/g),Ak=fe(/\${[\w\W]*/g),Mk=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),$k=fe(/^aria-[\-\w]+$/),nu=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ok=fe(/^(?:\w+script|data):/i),Dk=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ik=fe(/^html$/i),Pk=fe(/^[a-z][.\w]*(-[.\w]+)+$/i),ln=fe(/<[/\w!]/g),lu=fe(/<[/\w]/g),Rk=fe(/<\/no(script|embed|frames)/i),hu=fe(/\/>/i),ee={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Nk=ne(qt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),qk=function(){return typeof window>"u"?null:window},zk=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},cu=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Or=function(t,r,i,o){return Be(t,r)&&Fi(t[r])?qt(o.base?Me(o.base):{},t[r],o.transform):i},hn=function(t,r,i){const o=Be(t,r)?t[r]:void 0;return o&&typeof o=="object"?Me(o):i()};function Rf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qk();const t=rt=>Rf(rt);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==ee.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,h=e.trustedTypes,u=n.prototype,d=Pe(u,"cloneNode"),f=Pe(u,"remove"),m=Pe(u,"removeAttributeNode"),y=Pe(u,"nextSibling"),C=Pe(u,"childNodes"),x=Pe(u,"parentNode"),k=Pe(u,"shadowRoot"),T=Pe(u,"attributes"),S=a&&a.prototype?Pe(a.prototype,"nodeType"):null,v=a&&a.prototype?Pe(a.prototype,"nodeName"):null,A=a&&a.prototype?Pe(a.prototype,"ownerDocument"):null,L=function(_){return S?S(_):_.nodeType},E=function(_){return v?v(_):_.nodeName},Z=Sk(u,"namespaceURI"),Y=function(_){return Z?Z(_):_.namespaceURI};if(typeof s=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let P,st="",U,O=!1,D=0;const B=function(){if(D>0)throw gr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(_){B(),D++;try{return P.createHTML(_)}finally{D--}},R=function(_){B(),D++;try{return P.createScriptURL(_)}finally{D--}},at=function(){return O||(U=zk(h,o),O=!0),U},J=r,mt=J.implementation,wt=J.createNodeIterator,Tt=J.createDocumentFragment,Et=J.getElementsByTagName,Lt=i.importNode;let nt=cu();t.isSupported=typeof $f=="function"&&typeof x=="function"&&mt&&mt.createHTMLDocument!==void 0;const kt=Fk,Ot=Ek,vt=Ak,Nt=Mk,Wt=$k,le=Ok,we=Dk,Oe=Pk;let Br=nu,Yt=null;const Te=qt({},[...iu,...on,...sn,...an,...ou]);let Ht=null;const cr=qt({},[...su,...nn,...au,...ps]);let he=Object.seal(_i(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}})),De=null,Lr=null;const te=Object.seal(_i(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fr=!0,Ve=!0,ur=!1,dr=!0,g=!1,$=!0,j=!1,X=!1,H=null,ot=null,w=!1,I=!1,tt=!1,G=!1,V=!0,it=!1;const et="user-content-";let dt=!0,ht=!1,gt=null,yt={},Mt=null;const jt=qt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let no=null;const Er=qt({},["audio","video","img","source","image","track"]);let Ar=null;const nc=qt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ns="http://www.w3.org/1998/Math/MathML",ls="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let pi=Ze,Ia=!1,Pa=null;const Z0=qt({},[ns,ls,Ze],rn),lc=ne(["mi","mo","mn","ms","mtext"]);let Ra=qt({},lc);const hc=ne(["annotation-xml"]);let Na=qt({},hc);const K0=qt({},["title","style","font","a","script"]);let lo=null;const Q0=["application/xhtml+xml","text/html"],J0="text/html";let Qt=null,gi=null;const tC=r.createElement("form"),cc=function(_){return _ instanceof RegExp||_ instanceof Function},qa=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gi&&gi===_)return;(!_||typeof _!="object")&&(_={}),_=Me(_),lo=Q0.indexOf(_.PARSER_MEDIA_TYPE)===-1?J0:_.PARSER_MEDIA_TYPE,Qt=lo==="application/xhtml+xml"?rn:Vr,Yt=Or(_,"ALLOWED_TAGS",Te,{transform:Qt}),Ht=Or(_,"ALLOWED_ATTR",cr,{transform:Qt}),Pa=Or(_,"ALLOWED_NAMESPACES",Z0,{transform:rn}),Ar=Or(_,"ADD_URI_SAFE_ATTR",nc,{transform:Qt,base:nc}),no=Or(_,"ADD_DATA_URI_TAGS",Er,{transform:Qt,base:Er}),Mt=Or(_,"FORBID_CONTENTS",jt,{transform:Qt}),De=Or(_,"FORBID_TAGS",Me({}),{transform:Qt}),Lr=Or(_,"FORBID_ATTR",Me({}),{transform:Qt}),yt=Be(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?Me(_.USE_PROFILES):_.USE_PROFILES:!1,Fr=_.ALLOW_ARIA_ATTR!==!1,Ve=_.ALLOW_DATA_ATTR!==!1,ur=_.ALLOW_UNKNOWN_PROTOCOLS||!1,dr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,g=_.SAFE_FOR_TEMPLATES||!1,$=_.SAFE_FOR_XML!==!1,j=_.WHOLE_DOCUMENT||!1,I=_.RETURN_DOM||!1,tt=_.RETURN_DOM_FRAGMENT||!1,G=_.RETURN_TRUSTED_TYPE||!1,w=_.FORCE_BODY||!1,V=_.SANITIZE_DOM!==!1,it=_.SANITIZE_NAMED_PROPS||!1,dt=_.KEEP_CONTENT!==!1,ht=_.IN_PLACE||!1,Br=vk(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:nu,pi=typeof _.NAMESPACE=="string"?_.NAMESPACE:Ze,Ra=hn(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>qt({},lc)),Na=hn(_,"HTML_INTEGRATION_POINTS",()=>qt({},hc));const F=hn(_,"CUSTOM_ELEMENT_HANDLING",()=>_i(null));if(he=_i(null),Be(F,"tagNameCheck")&&cc(F.tagNameCheck)&&(he.tagNameCheck=F.tagNameCheck),Be(F,"attributeNameCheck")&&cc(F.attributeNameCheck)&&(he.attributeNameCheck=F.attributeNameCheck),Be(F,"allowCustomizedBuiltInElements")&&typeof F.allowCustomizedBuiltInElements=="boolean"&&(he.allowCustomizedBuiltInElements=F.allowCustomizedBuiltInElements),fe(he),g&&(Ve=!1),tt&&(I=!0),yt&&(Yt=qt({},ou),Ht=_i(null),yt.html===!0&&(qt(Yt,iu),qt(Ht,su)),yt.svg===!0&&(qt(Yt,on),qt(Ht,nn),qt(Ht,ps)),yt.svgFilters===!0&&(qt(Yt,sn),qt(Ht,nn),qt(Ht,ps)),yt.mathMl===!0&&(qt(Yt,an),qt(Ht,au),qt(Ht,ps))),te.tagCheck=null,te.attributeCheck=null,Be(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?te.tagCheck=_.ADD_TAGS:Fi(_.ADD_TAGS)&&(Yt===Te&&(Yt=Me(Yt)),qt(Yt,_.ADD_TAGS,Qt))),Be(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?te.attributeCheck=_.ADD_ATTR:Fi(_.ADD_ATTR)&&(Ht===cr&&(Ht=Me(Ht)),qt(Ht,_.ADD_ATTR,Qt))),Be(_,"ADD_FORBID_CONTENTS")&&Fi(_.ADD_FORBID_CONTENTS)&&(Mt===jt&&(Mt=Me(Mt)),qt(Mt,_.ADD_FORBID_CONTENTS,Qt)),dt&&(Yt["#text"]=!0),j&&qt(Yt,["html","head","body"]),Yt.table&&(qt(Yt,["tbody"]),delete De.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw gr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw gr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const K=P;P=_.TRUSTED_TYPES_POLICY;try{st=q("")}catch(Q){throw P=K,Q}}else _.TRUSTED_TYPES_POLICY===null?(P=void 0,st=""):(P===void 0&&(P=at()),P&&typeof st=="string"&&(st=q("")));ne&&ne(_),gi=_},uc=qt({},[...on,...sn,...Bk]),dc=qt({},[...an,...Lk]),eC=function(_,F,K){return F.namespaceURI===Ze?_==="svg":F.namespaceURI===ns?_==="svg"&&(K==="annotation-xml"||Ra[K]):!!uc[_]},rC=function(_,F,K){return F.namespaceURI===Ze?_==="math":F.namespaceURI===ls?_==="math"&&Na[K]:!!dc[_]},iC=function(_,F,K){return F.namespaceURI===ls&&!Na[K]||F.namespaceURI===ns&&!Ra[K]?!1:!dc[_]&&(K0[_]||!uc[_])},oC=function(_){const F=Y(_),K=Vr(E(_)),Q=x(_);let bt,Bt;return Q&&L(Q)===ee.element?(bt={namespaceURI:Y(Q)},Bt=Vr(E(Q))):(bt={namespaceURI:pi},Bt="template"),Pa[F]?F===ls?eC(K,bt,Bt):F===ns?rC(K,bt,Bt):F===Ze?iC(K,bt,Bt):!!(lo==="application/xhtml+xml"&&Pa[F]):!1},Mr=function(_){uo(t.removed,{element:_});try{x(_).removeChild(_)}catch{if(f(_),!x(_))throw gr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},fc=function(_,F,K){try{m(_,F)}catch{try{_.removeAttribute(K)}catch{}}},za=function(_){Ha(_);const F=C(_);F&&pr(Ck(F),Q=>{try{f(Q)}catch{}});const K=L(_)===ee.element?T(_):null;if(K)for(let Q=K.length-1;Q>=0;--Q){const bt=K[Q],Bt=bt&&bt.name;typeof Bt=="string"&&fc(_,bt,Bt)}},mi=function(_,F,K){if(!K)try{K=F.getAttributeNode(_)}catch{K=null}uo(t.removed,{attribute:K||null,from:F});try{K?m(F,K):F.removeAttribute(_)}catch{try{F.removeAttribute(_)}catch{}}if(_==="is")if(I||tt)try{Mr(F)}catch{}else try{F.setAttribute(_,"")}catch{}},pc=function(_){const F=T(_);if(F)for(let K=F.length-1;K>=0;--K){const Q=F[K],bt=Q&&Q.name;typeof bt!="string"||Ht[Qt(bt)]||fc(_,Q,bt)}},Wa=function(_,F){let K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const Q=[_];for(;Q.length>0;){const bt=Q.pop();if(F(bt)===!1)continue;if(K&&L(bt)===ee.element){const Dt=k(bt);$r(Dt)&&Q.push(Dt)}const Bt=C(bt);if(Bt)for(let Dt=Bt.length-1;Dt>=0;--Dt)Q.push(Bt[Dt])}},Ha=function(_){Wa(_,F=>{L(F)===ee.element&&pc(F)})},Ya=function(_){const F=[];return Wa(_,K=>{F.push(K)},!0),F},sC=function(_,F){const K=tn();pr(Ya(_),Q=>{L(Q)===ee.element&&en(K,Q)}),pr(F,Q=>{L(Q)===ee.element&&!fo(K,Q)&&pc(Q)})},gc=function(_,F){let K=!1;return pr(t.removed,Q=>{Q.element&&(K=K||Q.element===_,Ha(Q.element))}),sC(_,F),K},aC=8,nC=function(_,F){const K=gt;let Q=null;const bt=()=>(Q||(Q=tn(),pr(F,Bt=>{en(Q,Bt)})),Q);for(let Bt=0;;Bt++){const Dt=Ya(_),oe=[_];let Ke=!1;if(pr(Dt,be=>{L(be)===ee.documentFragment?uo(oe,be):!Ke&&!fo(K,be)&&(Ke=fo(bt(),be))}),!Ke)return;if(Bt>=aC)throw gr("the tree kept changing during in-place sanitization; refusing to return it");pr(oe,(be,_e)=>{lC(be,_e>0,_,bt())})}},lC=function(_,F,K,Q){const bt=Ua(_);let Bt;for(;Bt=bt.nextNode();)!fo(Q,Bt)||fo(gt,Bt)||(F&&ze(nt.uponSanitizeShadowNode,Bt,null),Ga(Bt,K),Xa(Bt,K),$r(Bt.content)&&co(Bt.content))},hC=function(_){gt&&en(gt,_)},mc=function(_,F){return $?_==="patchsrc"?!0:_==="for"&&F!=="label"&&F!=="output":!1},cC=function(_){$&&Wa(_,F=>{const K=L(F);if(K===ee.processingInstruction||K===ee.comment&&ue(lu,F.data)){try{f(F)}catch{}return!1}if(K===ee.element){const Q=F,bt=Qt(E(F));try{Q.hasAttribute&&Q.hasAttribute("patchsrc")&&Q.removeAttribute("patchsrc"),Q.hasAttribute&&Q.hasAttribute("for")&&mc("for",bt)&&Q.removeAttribute("for")}catch{}}return!0})},yc=function(_){let F=null,K=null;if(w)_="<remove></remove>"+_;else{const Bt=Jc(_,/^[\r\n\t ]+/);K=Bt&&Bt[0]}lo==="application/xhtml+xml"&&pi===Ze&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const Q=P?q(_):_;if(pi===Ze)try{F=new c().parseFromString(Q,lo)}catch{}if(!F||!F.documentElement){F=mt.createDocument(pi,"template",null);try{F.documentElement.innerHTML=Ia?st:Q}catch{}}const bt=F.body||F.documentElement;return _&&K&&bt.insertBefore(r.createTextNode(K),bt.childNodes[0]||null),pi===Ze?Et.call(F,j?"html":"body")[0]:j?F.documentElement:bt},Ua=function(_){const F=A?A(_):_.ownerDocument;return wt.call(F||_,_,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},hs=function(_){return _=po(_,kt," "),_=po(_,Ot," "),_=po(_,vt," "),_},ja=function(_){var F;Cc(_);const K=(F=_.querySelectorAll)===null||F===void 0?void 0:F.call(_,"template");K&&pr(K,Q=>{$r(Q.content)&&ja(Q.content)})},Cc=function(_){_.normalize();const F=A?A(_):_.ownerDocument,K=wt.call(F||_,_,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Q=K.nextNode();for(;Q;)Q.data=hs(Q.data),Q=K.nextNode()},cs=function(_){const F=v?v(_):null;return typeof F!="string"||Qt(F)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==T(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==S(_)||_.childNodes!==C(_)},$r=function(_){if(!S||typeof _!="object"||_===null)return!1;try{return S(_)===ee.documentFragment}catch{return!1}},ho=function(_){if(!S||typeof _!="object"||_===null)return!1;try{return typeof S(_)=="number"}catch{return!1}};function ze(rt,_,F){rt.length!==0&&pr(rt,K=>{K.call(t,_,F,gi)})}const uC=function(_,F){return!!($&&_.hasChildNodes()&&!ho(_.firstElementChild)&&ue(ln,_.textContent)&&ue(ln,_.innerHTML)||$&&Nk[F]&&L(_)===ee.element&&Y(_)===Ze&&(ho(_.firstElementChild)||typeof _.textContent=="string"&&ue(ln,_.textContent))||_.nodeType===ee.processingInstruction||$&&_.nodeType===ee.comment&&ue(lu,_.data))},us=function(_,F){if(_ instanceof RegExp)return ue(_,F);if(_ instanceof Function){for(var K=arguments.length,Q=new Array(K>2?K-2:0),bt=2;bt<K;bt++)Q[bt-2]=arguments[bt];return!!_(F,...Q)}return!1},dC=function(_,F,K){if(!De[F]&&kc(F)&&us(he.tagNameCheck,F))return!1;if(dt&&!Mt[F]&&!Mt[Vr(F)]){const Q=x(_),bt=C(_);if(bt&&Q){const Bt=bt.length;for(let Dt=Bt-1;Dt>=0;--Dt){const oe=_===K?d(bt[Dt],!0):bt[Dt];Q.insertBefore(oe,y(_))}}}return Mr(_),!0},xc=function(_,F,K,Q){return _.length===0?F:F===K||F===Q?Me(F):F},yi=function(_,F){return _===F||x(_)!==null?!1:(ht&&Ha(_),!0)},Ga=function(_,F){if(hC(_),ze(nt.beforeSanitizeElements,_,null),yi(_,F))return!0;if(cs(_))return Mr(_),!0;const K=Qt(E(_));if(Yt=xc(nt.uponSanitizeElement,Yt,Te,H),ze(nt.uponSanitizeElement,_,{tagName:K,allowedTags:Yt}),yi(_,F))return!0;if(uC(_,K))return Mr(_),!0;if(De[K]||!(te.tagCheck instanceof Function&&te.tagCheck(K))&&!Yt[K]){const Q=dC(_,K,F);return Q===!1&&(ze(nt.afterSanitizeElements,_,null),yi(_,F))?!0:Q}if(L(_)===ee.element&&!oC(_)||(K==="noscript"||K==="noembed"||K==="noframes")&&ue(Rk,_.innerHTML))return Mr(_),!0;if(g&&_.nodeType===ee.text){const Q=hs(_.textContent);_.textContent!==Q&&(uo(t.removed,{element:_.cloneNode()}),_.textContent=Q)}return ze(nt.afterSanitizeElements,_,null),yi(_,F)},bc=function(_,F,K){if(Lr[F]||mc(F,_)||V&&(F==="id"||F==="name")&&(K in r||K in tC))return!1;const Q=Ht[F]||te.attributeCheck instanceof Function&&te.attributeCheck(F,_);return Ve&&ue(Nt,F)||Fr&&ue(Wt,F)?!0:Q?Ar[F]||ue(Br,po(K,we,""))||(F==="src"||F==="xlink:href"||F==="href")&&_!=="script"&&tu(K,"data:")===0&&no[_]||ur&&!ue(le,po(K,we,""))?!0:!K:kc(_)&&us(he.tagNameCheck,_)&&us(he.attributeNameCheck,F,_)||F==="is"&&he.allowCustomizedBuiltInElements&&us(he.tagNameCheck,K)},fC=qt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),kc=function(_){return!fC[Vr(_)]&&ue(Oe,_)},pC=function(_,F,K,Q){if(P&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!K)switch(h.getAttributeType(_,F)){case"TrustedHTML":return q(Q);case"TrustedScriptURL":return R(Q)}return Q},gC=function(_,F,K,Q){try{return K?_.setAttributeNS(K,F,Q):_.setAttribute(F,Q),cs(_)?(Mr(_),!1):!0}catch{return mi(F,_),!1}},wc=function(_,F){return $&&ue(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,F)?!0:Vr(_)==="attributename"&&Jc(F,"href")!==null},Xa=function(_,F){if(ze(nt.beforeSanitizeAttributes,_,null),yi(_,F))return;const K=_.attributes;if(!K||cs(_))return;Ht=xc(nt.uponSanitizeAttribute,Ht,cr,ot);const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let bt=K.length;const Bt=Qt(_.nodeName);for(;bt--;){const Dt=K[bt],oe=Dt.name,Ke=Dt.namespaceURI,be=Dt.value,_e=Qt(oe),Ci=be;let Se=oe==="value"?Ci:bk(Ci),Tc=!1;if(Q.attrName=_e,Q.attrValue=Se,Q.keepAttr=!0,Q.forceKeepAttr=void 0,ze(nt.uponSanitizeAttribute,_,Q),Se=Q.attrValue,it&&(_e==="id"||_e==="name")&&tu(Se,et)!==0&&(mi(oe,_,Dt),Se=et+Se,Tc=!0),wc(oe,Se)){mi(oe,_,Dt);continue}if(!Q.forceKeepAttr){if(!Q.keepAttr){mi(oe,_,Dt);continue}if(!dr&&ue(hu,Se)){mi(oe,_,Dt);continue}if(g&&(Se=hs(Se)),!bc(Bt,_e,Se)){mi(oe,_,Dt);continue}Se=pC(Bt,_e,Ke,Se),Se!==Ci&&gC(_,oe,Ke,Se)&&Tc&&Qc(t.removed)}}ze(nt.afterSanitizeAttributes,_,null),yi(_,F)},co=function(_){let F=null;const K=Ua(_);for(ze(nt.beforeSanitizeShadowDOM,_,null);F=K.nextNode();)if(ze(nt.uponSanitizeShadowNode,F,null),Ga(F,_),Xa(F,_),$r(F.content)&&co(F.content),L(F)===ee.element){const Q=k(F);$r(Q)&&(Va(Q),co(Q))}g&&Cc(_),ze(nt.afterSanitizeShadowDOM,_,null)},Va=function(_){const F=[{node:_,shadow:null}];for(;F.length>0;){const K=F.pop();if(K.shadow){co(K.shadow);continue}const Q=K.node,bt=L(Q)===ee.element,Bt=C(Q);if(Bt)for(let Dt=Bt.length-1;Dt>=0;--Dt)F.push({node:Bt[Dt],shadow:null});if(bt){const Dt=v?v(Q):null;if(typeof Dt=="string"&&Qt(Dt)==="template"){const oe=Q.content;$r(oe)&&F.push({node:oe,shadow:null})}}if(bt){const Dt=k(Q);$r(Dt)&&F.push({node:null,shadow:Dt},{node:Dt,shadow:null})}}};return t.sanitize=function(rt){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,K=null,Q=null,bt=null;if(Ia=!rt,Ia&&(rt="<!-->"),typeof rt!="string"&&!ho(rt)&&(rt=_k(rt),typeof rt!="string"))throw gr("dirty is not a string, aborting");if(!t.isSupported)return rt;X?(Yt=H,Ht=ot):qa(_),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(Yt=Me(Yt)),nt.uponSanitizeAttribute.length>0&&(Ht=Me(Ht)),t.removed=[];const Bt=ht&&typeof rt!="string"&&ho(rt);let Dt=[];const oe=gt;if(Bt){cC(rt);const _e=E(rt);if(typeof _e=="string"){const Ci=Qt(_e);if(!Yt[Ci]||De[Ci])throw za(rt),gr("root node is forbidden and cannot be sanitized in-place")}if(cs(rt))throw za(rt),gr("root node is clobbered and cannot be sanitized in-place");Dt=Ya(rt),gt=tn()}else if(ho(rt))F=yc("<!---->"),K=F.ownerDocument.importNode(rt,!0),K.nodeType===ee.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?F=K:F.appendChild(K),Va(F);else{if(!I&&!g&&!j&&rt.indexOf("<")===-1)return P&&G?q(rt):rt;if(F=yc(rt),!F)return I?null:G?st:""}F&&w&&Mr(F.firstChild);const Ke=Bt?rt:F;try{Bt&&Va(rt);const _e=Ua(Ke);for(;Q=_e.nextNode();)Ga(Q,Ke),Xa(Q,Ke),$r(Q.content)&&co(Q.content);Bt&&nC(rt,Dt)}catch(_e){throw Bt&&(za(rt),gc(rt,Dt)),_e}finally{gt=oe}if(Bt){if(gc(rt,Dt))throw gr("a node selected for removal could not be safely returned; refusing to sanitize in place");return g&&ja(rt),rt}if(I){if(g&&ja(F),tt)for(bt=Tt.call(F.ownerDocument);F.firstChild;)bt.appendChild(F.firstChild);else bt=F;return(Ht.shadowroot||Ht.shadowrootmode)&&(bt=Lt.call(i,bt,!0)),bt}let be=j?F.outerHTML:F.innerHTML;return j&&Yt["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&ue(Ik,F.ownerDocument.doctype.name)&&(be="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
4
+ `+be),g&&(be=hs(be)),P&&G?q(be):be},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qa(rt),X=!0,H=Yt,ot=Ht},t.clearConfig=function(){gi=null,X=!1,H=null,ot=null,P=U,st=""},t.isValidAttribute=function(rt,_,F){gi||qa({});const K=Qt(rt),Q=Qt(_);return typeof F=="string"&&(wc(_,F)||!dr&&ue(hu,F))?!1:bc(K,Q,F)},t.addHook=function(rt,_){typeof _=="function"&&Be(nt,rt)&&uo(nt[rt],_)},t.removeHook=function(rt,_){if(Be(nt,rt)){if(_!==void 0){const F=yk(nt[rt],_);return F===-1?void 0:xk(nt[rt],F,1)[0]}return Qc(nt[rt])}},t.removeHooks=function(rt){Be(nt,rt)&&(nt[rt]=[])},t.removeAllHooks=function(){nt=cu()},t}var Vi=Rf(),tl=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(o=>tl(e,o,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(o=>{e.includes(o)||e.push(o)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const o=e;Object.entries(t).forEach(([s,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),o[s]===void 0&&(o[s]=Array.isArray(a)?[]:{}),typeof o[s]=="object"&&(o[s]=tl(o[s],a,{depth:r-1}))}else typeof o[s]!="object"&&(Object.hasOwn(e,s)?o[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ae=tl,sr="#ffffff",ar="#f2f2f2",St=p((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Mi,Wk=(Mi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=W(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=W(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||M(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||W(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Mi,"Theme"),Mi),Hk=p(e=>{const t=new Wk;return t.calculate(e),t},"getThemeVariables"),$i,Yk=($i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=qr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=W("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=W(this.sectionBkgColor,10),this.taskBorderColor=qr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=qr(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=z(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=z(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=z(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=M(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||M(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??z(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||z("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||z("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||z("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||z("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||z(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||z(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p($i,"Theme"),$i),Uk=p(e=>{const t=new Yk;return t.calculate(e),t},"getThemeVariables"),Oi,jk=(Oi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=qr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||W(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||W(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||W(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Oi,"Theme"),Oi),Gk=p(e=>{const t=new jk;return t.calculate(e),t},"getThemeVariables"),Di,Xk=(Di=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=z("#cde498",10),this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=W(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||W(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||W(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=W(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});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||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Di,"Theme"),Di),Vk=p(e=>{const t=new Xk;return t.calculate(e),t},"getThemeVariables"),Ii,Zk=(Ii=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||M(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{l:-(8+t*5)});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=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=W(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=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=W(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=W(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ii,"Theme"),Ii),Kk=p(e=>{const t=new Zk;return t.calculate(e),t},"getThemeVariables"),Pi,Qk=(Pi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||z(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||M(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||W(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Pi,"Theme"),Pi),Jk=p(e=>{const t=new Qk;return t.calculate(e),t},"getThemeVariables"),Ri,t2=(Ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=qr(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=W(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=W(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||M(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||W(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ri,"Theme"),Ri),e2=p(e=>{const t=new t2;return t.calculate(e),t},"getThemeVariables"),Ni,r2=(Ni=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=St("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?W(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||z(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=W(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||M(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||W(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ni,"Theme"),Ni),i2=p(e=>{const t=new r2;return t.calculate(e),t},"getThemeVariables"),qi,o2=(qi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=qr(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=W(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=W(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||M(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||W(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(qi,"Theme"),qi),s2=p(e=>{const t=new o2;return t.calculate(e),t},"getThemeVariables"),zi,a2=(zi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=St(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?W(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||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||z(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||M(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||W(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||b(this.mainBkg,{h:180,s:-15,l:o*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(zi,"Theme"),zi),n2=p(e=>{const t=new a2;return t.calculate(e),t},"getThemeVariables"),Wi,l2=(Wi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=St(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=qr(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||St(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||St(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||St(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||St(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?W(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||W(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||M(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||W(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=W(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||je(this.quadrant1Fill)?z(this.quadrant1Fill):W(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?W(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Wi,"Theme"),Wi),h2=p(e=>{const t=new l2;return t.calculate(e),t},"getThemeVariables"),kr={base:{getThemeVariables:Hk},dark:{getThemeVariables:Uk},default:{getThemeVariables:Gk},forest:{getThemeVariables:Vk},neutral:{getThemeVariables:Kk},neo:{getThemeVariables:Jk},"neo-dark":{getThemeVariables:e2},redux:{getThemeVariables:i2},"redux-dark":{getThemeVariables:s2},"redux-color":{getThemeVariables:n2},"redux-dark-color":{getThemeVariables:h2}},ce={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,hierarchicalNamespaces:!0},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,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},Nf={...ce,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:kr.default.getThemeVariables(),sequence:{...ce.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ce.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ce.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ce.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ce.pie,useWidth:984},xyChart:{...ce.xyChart,useWidth:void 0},requirement:{...ce.requirement,useWidth:void 0},packet:{...ce.packet},eventmodeling:{...ce.eventmodeling},treeView:{...ce.treeView,useWidth:void 0},radar:{...ce.radar},railroad:{...ce.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...ce.ishikawa},sankey:{...ce.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ce.venn},cynefin:{...ce.cynefin}},qf=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...qf(e[i],"")]:[...r,t+i],[]),"keyify"),c2=new Set(qf(Nf,"")),zf=Nf,u2={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},d2=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(N.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),qs=p(e=>{if(N.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>qs(t));return}for(const t of Object.keys(e)){if(N.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!c2.has(t)||e[t]==null){N.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=u2[t];i?d2(e[t],i):(N.debug("sanitizing object",t),qs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(N.debug("sanitizing css option",t),e[t]=Wf(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}N.debug("After sanitization",e)}},"sanitizeDirective"),Wf=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Zi=Object.freeze(zf),nr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Le=ae({},Zi),zs,oi=[],Do=ae({},Zi),Jo=p((e,t)=>{let r=ae({},e),i={};for(const o of t)Uf(o),i=ae(i,o);if(r=ae(r,i),i.theme&&i.theme in kr){const o=ae({},zs),s=ae(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in kr&&(r.themeVariables=kr[r.theme].getThemeVariables(s))}return Do=r,C2(Do),Do},"updateCurrentConfig"),f2=p(e=>(Le=ae({},Zi),Le=ae(Le,e),e.theme&&kr[e.theme]&&(Le.themeVariables=kr[e.theme].getThemeVariables(e.themeVariables)),Jo(Le,oi),Le),"setSiteConfig"),p2=p(e=>{zs=ae({},e)},"saveConfigFromInitialize"),g2=p(e=>(Le=ae(Le,e),Jo(Le,oi),Le),"updateSiteConfig"),Hf=p(()=>ae({},Le),"getSiteConfig"),Yf=p(e=>(Jo(Do,[e]),Vt()),"setConfig"),Vt=p(()=>ae({},Do),"getConfig"),Uf=p(e=>{e&&(["secure",...Le.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(N.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Uf(e[t])}))},"sanitize"),m2=p(e=>{qs(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),oi.push(e),Jo(Le,oi)},"addDirective"),Ws=p((e=Le)=>{oi=[],Jo(e,oi)},"reset"),y2={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},uu={},jf=p(e=>{uu[e]||(N.warn(y2[e]),uu[e]=!0)},"issueWarning"),C2=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&jf("LAZY_LOAD_DEPRECATED")},"checkConfig"),KM=p(()=>{let e={};zs&&(e=ae(e,zs));for(const t of oi)e=ae(e,t);return e},"getUserDefinedConfig"),Ce=p(e=>(e.flowchart?.htmlLabels!=null&&jf("FLOWCHART_HTML_LABELS_DEPRECATED"),nr(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Gf=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Io=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,x2=/\s*%%.*\n/gm,Hi,Xf=(Hi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Hi,"UnknownDiagramError"),Hi),si={},Xl=p(function(e,t){e=e.replace(Gf,"").replace(Io,"").replace(x2,`
5
+ `);for(const[r,{detector:i}]of Object.entries(si))if(i(e,t))return r;throw new Xf(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),el=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Vf(t,r,i)},"registerLazyLoadedDiagrams"),Vf=p((e,t,r)=>{si[e]&&N.warn(`Detector with key ${e} already exists. Overwriting.`),si[e]={detector:t,loader:r},N.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),b2=p(e=>si[e].loader,"getDiagramLoader"),ts=/<br\s*\/?>/gi,k2=p(e=>e?Qf(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),w2=(()=>{let e=!1;return()=>{e||(Zf(),e=!0)}})();function Zf(){const e="data-temp-href-target";Vi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Vi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Zf,"setupDompurifyHooks");var Kf=p(e=>(w2(),Vi.sanitize(e)),"removeScript"),du=p((e,t)=>{if(Ce(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Kf(e):r!=="loose"&&(e=Qf(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=v2(e))}return e},"sanitizeMore"),Re=p((e,t)=>e&&(t.dompurifyConfig?e=Vi.sanitize(du(e,t),t.dompurifyConfig).toString():e=Vi.sanitize(du(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),T2=p((e,t)=>typeof e=="string"?Re(e,t):e.flat().map(r=>Re(r,t)),"sanitizeTextOrArray"),_2=p(e=>ts.test(e),"hasBreaks"),S2=p(e=>e.split(ts),"splitBreaks"),v2=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Qf=p(e=>e.replace(ts,"#br#"),"breakToPlaceholder"),B2=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),L2=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),F2=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),fu=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];E2(s,a)&&(o=s+","+a,i++,r.pop())}r.push(A2(o))}return r.join("")},"parseGenericTypes"),rl=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),E2=p((e,t)=>{const r=rl(e,"~"),i=rl(t,"~");return r===1&&i===1},"shouldCombineSets"),A2=p(e=>{const t=rl(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),pu=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),il=/\$\$(.*?)\$\$/g,Ho=p(e=>(e.match(il)?.length??0)>0,"hasKatex"),QM=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Jf(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),M2=p(async(e,t)=>{if(!Ho(e))return e;if(!(pu()||t.legacyMathML||t.forceLegacyMathML))return e.replace(il,"MathML is unsupported in this environment.");{const{default:r}=await $t(async()=>{const{default:o}=await import("./katex-HP8lGamR.js");return{default:o}},[],import.meta.url),i=t.forceLegacyMathML||!pu()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ts).map(o=>Ho(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(il,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Jf=p(async(e,t)=>Re(await M2(e,t),t),"renderKatexSanitized"),es={getRows:k2,sanitizeText:Re,sanitizeTextOrArray:T2,hasBreaks:_2,splitBreaks:S2,lineBreakRegex:ts,removeScript:Kf,getUrl:B2,evaluate:nr,getMax:L2,getMin:F2},$2=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),O2=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),tp=p(function(e,t,r,i){const o=O2(t,r,i);$2(e,o)},"configureSvgSize"),D2=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;N.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;N.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,N.info(`Calculated bounds: ${n}x${l}`),tp(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Fs={};function ol(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}p(ol,"cssStyleSheetToString");var I2=p((e,t,r,i)=>{let o="";return e in Fs&&Fs[e]?o=Fs[e]({...r,svgId:i}):N.warn(`No theme found for ${e}`),`& {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${o}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
+ }
88
+ [data-look="neo"].swimlane.cluster rect {
89
+ filter: none;
90
+ }
91
+
92
+
93
+ [data-look="neo"].node path {
94
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
+ stroke-width: ${r.strokeWidth??1}px;
96
+ }
97
+
98
+ [data-look="neo"].node .outer-path {
99
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
+ }
101
+
102
+ [data-look="neo"].node .neo-line path {
103
+ stroke: ${r.nodeBorder};
104
+ filter: none;
105
+ }
106
+
107
+ [data-look="neo"].node circle{
108
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
110
+ }
111
+
112
+ [data-look="neo"].node circle .state-start{
113
+ fill: #000000;
114
+ }
115
+
116
+ [data-look="neo"].icon-shape .icon {
117
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
+ }
120
+
121
+ [data-look="neo"].icon-shape .icon-neo path {
122
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
+ }
125
+
126
+ ${t}
127
+ `},"getStyles"),P2=p((e,t)=>{t!==void 0&&(Fs[e]=t)},"addStylesForDiagram"),R2=I2,ep={};J1(ep,{clear:()=>N2,getAccDescription:()=>H2,getAccTitle:()=>z2,getDiagramTitle:()=>U2,setAccDescription:()=>W2,setAccTitle:()=>q2,setDiagramTitle:()=>Y2});var Vl="",Zl="",Kl="",Ql=p(e=>Re(e,Vt()),"sanitizeText"),N2=p(()=>{Vl="",Kl="",Zl=""},"clear"),q2=p(e=>{Vl=Ql(e).replace(/^\s+/g,"")},"setAccTitle"),z2=p(()=>Vl,"getAccTitle"),W2=p(e=>{Kl=Ql(e).replace(/\n\s+/g,`
128
+ `)},"setAccDescription"),H2=p(()=>Kl,"getAccDescription"),Y2=p(e=>{Zl=Ql(e)},"setDiagramTitle"),U2=p(()=>Zl,"getDiagramTitle"),gu=N,j2=Gl,It=Vt,JM=Yf,t5=Zi,Jl=p(e=>Re(e,It()),"sanitizeText"),G2=D2,X2=p(()=>ep,"getCommonDb"),Hs={},Ys=p((e,t,r)=>{Hs[e]&&gu.warn(`Diagram with id ${e} already registered. Overwriting.`),Hs[e]=t,r&&Vf(e,r),P2(e,t.styles),t.injectUtils?.(gu,j2,It,Jl,G2,X2(),()=>{})},"registerDiagram"),sl=p(e=>{if(e in Hs)return Hs[e];throw new V2(e)},"getDiagram"),Yi,V2=(Yi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Yi,"DiagramNotFoundError"),Yi),Z2={value:()=>{}};function rp(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Es(r)}function Es(e){this._=e}function K2(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Es.prototype=rp.prototype={constructor:Es,on:function(e,t){var r=this._,i=K2(e+"",r),o,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((o=(e=i[s]).type)&&(o=Q2(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(o=(e=i[s]).type)r[o]=mu(r[o],e.name,t);else if(t==null)for(o in r)r[o]=mu(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Es(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,s;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,s=i.length;o<s;++o)i[o].value.apply(t,r)}};function Q2(e,t){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===t)return o.value}function mu(e,t,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Z2,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var al="http://www.w3.org/1999/xhtml";const yu={svg:"http://www.w3.org/2000/svg",xhtml:al,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ca(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),yu.hasOwnProperty(t)?{space:yu[t],local:e}:e}function J2(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===al&&t.documentElement.namespaceURI===al?t.createElement(e):t.createElementNS(r,e)}}function tw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ip(e){var t=Ca(e);return(t.local?tw:J2)(t)}function ew(){}function th(e){return e==null?ew:function(){return this.querySelector(e)}}function rw(e){typeof e!="function"&&(e=th(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=new Array(a),l,c,h=0;h<a;++h)(l=s[h])&&(c=e.call(l,l.__data__,h,s))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new $e(i,this._parents)}function iw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ow(){return[]}function op(e){return e==null?ow:function(){return this.querySelectorAll(e)}}function sw(e){return function(){return iw(e.apply(this,arguments))}}function aw(e){typeof e=="function"?e=sw(e):e=op(e);for(var t=this._groups,r=t.length,i=[],o=[],s=0;s<r;++s)for(var a=t[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),o.push(l));return new $e(i,o)}function sp(e){return function(){return this.matches(e)}}function ap(e){return function(t){return t.matches(e)}}var nw=Array.prototype.find;function lw(e){return function(){return nw.call(this.children,e)}}function hw(){return this.firstElementChild}function cw(e){return this.select(e==null?hw:lw(typeof e=="function"?e:ap(e)))}var uw=Array.prototype.filter;function dw(){return Array.from(this.children)}function fw(e){return function(){return uw.call(this.children,e)}}function pw(e){return this.selectAll(e==null?dw:fw(typeof e=="function"?e:ap(e)))}function gw(e){typeof e!="function"&&(e=sp(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new $e(i,this._parents)}function np(e){return new Array(e.length)}function mw(){return new $e(this._enter||this._groups.map(np),this._parents)}function Us(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Us.prototype={constructor:Us,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)}};function yw(e){return function(){return e}}function Cw(e,t,r,i,o,s){for(var a=0,n,l=t.length,c=s.length;a<c;++a)(n=t[a])?(n.__data__=s[a],i[a]=n):r[a]=new Us(e,s[a]);for(;a<l;++a)(n=t[a])&&(o[a]=n)}function xw(e,t,r,i,o,s,a){var n,l,c=new Map,h=t.length,u=s.length,d=new Array(h),f;for(n=0;n<h;++n)(l=t[n])&&(d[n]=f=a.call(l,l.__data__,n,t)+"",c.has(f)?o[n]=l:c.set(f,l));for(n=0;n<u;++n)f=a.call(e,s[n],n,s)+"",(l=c.get(f))?(i[n]=l,l.__data__=s[n],c.delete(f)):r[n]=new Us(e,s[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(d[n])===l&&(o[n]=l)}function bw(e){return e.__data__}function kw(e,t){if(!arguments.length)return Array.from(this,bw);var r=t?xw:Cw,i=this._parents,o=this._groups;typeof e!="function"&&(e=yw(e));for(var s=o.length,a=new Array(s),n=new Array(s),l=new Array(s),c=0;c<s;++c){var h=i[c],u=o[c],d=u.length,f=ww(e.call(h,h&&h.__data__,c,i)),m=f.length,y=n[c]=new Array(m),C=a[c]=new Array(m),x=l[c]=new Array(d);r(h,u,y,C,x,f,t);for(var k=0,T=0,S,v;k<m;++k)if(S=y[k]){for(k>=T&&(T=k+1);!(v=C[T])&&++T<m;);S._next=v||null}}return a=new $e(a,i),a._enter=n,a._exit=l,a}function ww(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tw(){return new $e(this._exit||this._groups.map(np),this._parents)}function _w(e,t,r){var i=this.enter(),o=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?s.remove():r(s),i&&o?i.merge(o).order():o}function Sw(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,o=r.length,s=i.length,a=Math.min(o,s),n=new Array(o),l=0;l<a;++l)for(var c=r[l],h=i[l],u=c.length,d=n[l]=new Array(u),f,m=0;m<u;++m)(f=c[m]||h[m])&&(d[m]=f);for(;l<o;++l)n[l]=r[l];return new $e(n,this._parents)}function vw(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],o=i.length-1,s=i[o],a;--o>=0;)(a=i[o])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Bw(e){e||(e=Lw);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s){for(var a=r[s],n=a.length,l=o[s]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new $e(o,this._parents).order()}function Lw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Fw(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ew(){return Array.from(this)}function Aw(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length;o<s;++o){var a=i[o];if(a)return a}return null}function Mw(){let e=0;for(const t of this)++e;return e}function $w(){return!this.node()}function Ow(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var o=t[r],s=0,a=o.length,n;s<a;++s)(n=o[s])&&e.call(n,n.__data__,s,o);return this}function Dw(e){return function(){this.removeAttribute(e)}}function Iw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pw(e,t){return function(){this.setAttribute(e,t)}}function Rw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Nw(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function qw(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function zw(e,t){var r=Ca(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Iw:Dw:typeof t=="function"?r.local?qw:Nw:r.local?Rw:Pw)(r,t))}function lp(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ww(e){return function(){this.style.removeProperty(e)}}function Hw(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Yw(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Uw(e,t,r){return arguments.length>1?this.each((t==null?Ww:typeof t=="function"?Yw:Hw)(e,t,r??"")):Ki(this.node(),e)}function Ki(e,t){return e.style.getPropertyValue(t)||lp(e).getComputedStyle(e,null).getPropertyValue(t)}function jw(e){return function(){delete this[e]}}function Gw(e,t){return function(){this[e]=t}}function Xw(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Vw(e,t){return arguments.length>1?this.each((t==null?jw:typeof t=="function"?Xw:Gw)(e,t)):this.node()[e]}function hp(e){return e.trim().split(/^|\s+/)}function eh(e){return e.classList||new cp(e)}function cp(e){this._node=e,this._names=hp(e.getAttribute("class")||"")}cp.prototype={add:function(e){var t=this._names.indexOf(e);t<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}};function up(e,t){for(var r=eh(e),i=-1,o=t.length;++i<o;)r.add(t[i])}function dp(e,t){for(var r=eh(e),i=-1,o=t.length;++i<o;)r.remove(t[i])}function Zw(e){return function(){up(this,e)}}function Kw(e){return function(){dp(this,e)}}function Qw(e,t){return function(){(t.apply(this,arguments)?up:dp)(this,e)}}function Jw(e,t){var r=hp(e+"");if(arguments.length<2){for(var i=eh(this.node()),o=-1,s=r.length;++o<s;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?Qw:t?Zw:Kw)(r,t))}function tT(){this.textContent=""}function eT(e){return function(){this.textContent=e}}function rT(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function iT(e){return arguments.length?this.each(e==null?tT:(typeof e=="function"?rT:eT)(e)):this.node().textContent}function oT(){this.innerHTML=""}function sT(e){return function(){this.innerHTML=e}}function aT(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function nT(e){return arguments.length?this.each(e==null?oT:(typeof e=="function"?aT:sT)(e)):this.node().innerHTML}function lT(){this.nextSibling&&this.parentNode.appendChild(this)}function hT(){return this.each(lT)}function cT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uT(){return this.each(cT)}function dT(e){var t=typeof e=="function"?e:ip(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fT(){return null}function pT(e,t){var r=typeof e=="function"?e:ip(e),i=t==null?fT:typeof t=="function"?t:th(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function gT(){var e=this.parentNode;e&&e.removeChild(this)}function mT(){return this.each(gT)}function yT(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function CT(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xT(e){return this.select(e?CT:yT)}function bT(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kT(e){return function(t){e.call(this,t,this.__data__)}}function wT(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function TT(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,o=t.length,s;r<o;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function _T(e,t,r){return function(){var i=this.__on,o,s=kT(t);if(i){for(var a=0,n=i.length;a<n;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=t;return}}this.addEventListener(e.type,s,r),o={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(o):this.__on=[o]}}function ST(e,t,r){var i=wT(e+""),o,s=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(o=0,h=n[l];o<s;++o)if((a=i[o]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?_T:TT,o=0;o<s;++o)this.each(n(i[o],t,r));return this}function fp(e,t,r){var i=lp(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,r):(o=i.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function vT(e,t){return function(){return fp(this,e,t)}}function BT(e,t){return function(){return fp(this,e,t.apply(this,arguments))}}function LT(e,t){return this.each((typeof t=="function"?BT:vT)(e,t))}function*FT(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],o=0,s=i.length,a;o<s;++o)(a=i[o])&&(yield a)}var pp=[null];function $e(e,t){this._groups=e,this._parents=t}function rs(){return new $e([[document.documentElement]],pp)}function ET(){return this}$e.prototype=rs.prototype={constructor:$e,select:rw,selectAll:aw,selectChild:cw,selectChildren:pw,filter:gw,data:kw,enter:mw,exit:Tw,join:_w,merge:Sw,selection:ET,order:vw,sort:Bw,call:Fw,nodes:Ew,node:Aw,size:Mw,empty:$w,each:Ow,attr:zw,style:Uw,property:Vw,classed:Jw,text:iT,html:nT,raise:hT,lower:uT,append:dT,insert:pT,remove:mT,clone:xT,datum:bT,on:ST,dispatch:LT,[Symbol.iterator]:FT};function At(e){return typeof e=="string"?new $e([[document.querySelector(e)]],[document.documentElement]):new $e([[e]],pp)}function rh(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function gp(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function is(){}var Yo=.7,js=1/Yo,Ei="\\s*([+-]?\\d+)\\s*",Uo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",AT=/^#([0-9a-f]{3,8})$/,MT=new RegExp(`^rgb\\(${Ei},${Ei},${Ei}\\)$`),$T=new RegExp(`^rgb\\(${ir},${ir},${ir}\\)$`),OT=new RegExp(`^rgba\\(${Ei},${Ei},${Ei},${Uo}\\)$`),DT=new RegExp(`^rgba\\(${ir},${ir},${ir},${Uo}\\)$`),IT=new RegExp(`^hsl\\(${Uo},${ir},${ir}\\)$`),PT=new RegExp(`^hsla\\(${Uo},${ir},${ir},${Uo}\\)$`),Cu={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};rh(is,jo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xu,formatHex:xu,formatHex8:RT,formatHsl:NT,formatRgb:bu,toString:bu});function xu(){return this.rgb().formatHex()}function RT(){return this.rgb().formatHex8()}function NT(){return mp(this).formatHsl()}function bu(){return this.rgb().formatRgb()}function jo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=AT.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ku(t):r===3?new Fe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?gs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?gs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=MT.exec(e))?new Fe(t[1],t[2],t[3],1):(t=$T.exec(e))?new Fe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=OT.exec(e))?gs(t[1],t[2],t[3],t[4]):(t=DT.exec(e))?gs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=IT.exec(e))?_u(t[1],t[2]/100,t[3]/100,1):(t=PT.exec(e))?_u(t[1],t[2]/100,t[3]/100,t[4]):Cu.hasOwnProperty(e)?ku(Cu[e]):e==="transparent"?new Fe(NaN,NaN,NaN,0):null}function ku(e){return new Fe(e>>16&255,e>>8&255,e&255,1)}function gs(e,t,r,i){return i<=0&&(e=t=r=NaN),new Fe(e,t,r,i)}function qT(e){return e instanceof is||(e=jo(e)),e?(e=e.rgb(),new Fe(e.r,e.g,e.b,e.opacity)):new Fe}function nl(e,t,r,i){return arguments.length===1?qT(e):new Fe(e,t,r,i??1)}function Fe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}rh(Fe,nl,gp(is,{brighter(e){return e=e==null?js:Math.pow(js,e),new Fe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Fe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fe(ei(this.r),ei(this.g),ei(this.b),Gs(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:wu,formatHex:wu,formatHex8:zT,formatRgb:Tu,toString:Tu}));function wu(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}`}function zT(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}${Jr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Tu(){const e=Gs(this.opacity);return`${e===1?"rgb(":"rgba("}${ei(this.r)}, ${ei(this.g)}, ${ei(this.b)}${e===1?")":`, ${e})`}`}function Gs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ei(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jr(e){return e=ei(e),(e<16?"0":"")+e.toString(16)}function _u(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ye(e,t,r,i)}function mp(e){if(e instanceof Ye)return new Ye(e.h,e.s,e.l,e.opacity);if(e instanceof is||(e=jo(e)),!e)return new Ye;if(e instanceof Ye)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,n=s-o,l=(s+o)/2;return n?(t===s?a=(r-i)/n+(r<i)*6:r===s?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?s+o:2-s-o,a*=60):n=l>0&&l<1?0:a,new Ye(a,n,l,e.opacity)}function WT(e,t,r,i){return arguments.length===1?mp(e):new Ye(e,t,r,i??1)}function Ye(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}rh(Ye,WT,gp(is,{brighter(e){return e=e==null?js:Math.pow(js,e),new Ye(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Ye(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,o=2*r-i;return new Fe(cn(e>=240?e-240:e+120,o,i),cn(e,o,i),cn(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new Ye(Su(this.h),ms(this.s),ms(this.l),Gs(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=Gs(this.opacity);return`${e===1?"hsl(":"hsla("}${Su(this.h)}, ${ms(this.s)*100}%, ${ms(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Su(e){return e=(e||0)%360,e<0?e+360:e}function ms(e){return Math.max(0,Math.min(1,e||0))}function cn(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ih=e=>()=>e;function yp(e,t){return function(r){return e+r*t}}function HT(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function e5(e,t){var r=t-e;return r?yp(e,r>180||r<-180?r-360*Math.round(r/360):r):ih(isNaN(e)?t:e)}function YT(e){return(e=+e)==1?Cp:function(t,r){return r-t?HT(t,r,e):ih(isNaN(t)?r:t)}}function Cp(e,t){var r=t-e;return r?yp(e,r):ih(isNaN(e)?t:e)}const vu=(function e(t){var r=YT(t);function i(o,s){var a=r((o=nl(o)).r,(s=nl(s)).r),n=r(o.g,s.g),l=r(o.b,s.b),c=Cp(o.opacity,s.opacity);return function(h){return o.r=a(h),o.g=n(h),o.b=l(h),o.opacity=c(h),o+""}}return i.gamma=e,i})(1);function Pr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,un=new RegExp(ll.source,"g");function UT(e){return function(){return e}}function jT(e){return function(t){return e(t)+""}}function GT(e,t){var r=ll.lastIndex=un.lastIndex=0,i,o,s,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=ll.exec(e))&&(o=un.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),n[a]?n[a]+=s:n[++a]=s),(i=i[0])===(o=o[0])?n[a]?n[a]+=o:n[++a]=o:(n[++a]=null,l.push({i:a,x:Pr(i,o)})),r=un.lastIndex;return r<t.length&&(s=t.slice(r),n[a]?n[a]+=s:n[++a]=s),n.length<2?l[0]?jT(l[0].x):UT(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)n[(u=l[h]).i]=u.x(c);return n.join("")})}var Bu=180/Math.PI,hl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xp(e,t,r,i,o,s){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*Bu,skewX:Math.atan(l)*Bu,scaleX:a,scaleY:n}}var ys;function XT(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?hl:xp(t.a,t.b,t.c,t.d,t.e,t.f)}function VT(e){return e==null||(ys||(ys=document.createElementNS("http://www.w3.org/2000/svg","g")),ys.setAttribute("transform",e),!(e=ys.transform.baseVal.consolidate()))?hl:(e=e.matrix,xp(e.a,e.b,e.c,e.d,e.e,e.f))}function bp(e,t,r,i){function o(c){return c.length?c.pop()+" ":""}function s(c,h,u,d,f,m){if(c!==u||h!==d){var y=f.push("translate(",null,t,null,r);m.push({i:y-4,x:Pr(c,u)},{i:y-2,x:Pr(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function a(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(o(u)+"rotate(",null,i)-2,x:Pr(c,h)})):h&&u.push(o(u)+"rotate("+h+i)}function n(c,h,u,d){c!==h?d.push({i:u.push(o(u)+"skewX(",null,i)-2,x:Pr(c,h)}):h&&u.push(o(u)+"skewX("+h+i)}function l(c,h,u,d,f,m){if(c!==u||h!==d){var y=f.push(o(f)+"scale(",null,",",null,")");m.push({i:y-4,x:Pr(c,u)},{i:y-2,x:Pr(h,d)})}else(u!==1||d!==1)&&f.push(o(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,d),a(c.rotate,h.rotate,u,d),n(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var m=-1,y=d.length,C;++m<y;)u[(C=d[m]).i]=C.x(f);return u.join("")}}}var ZT=bp(XT,"px, ","px)","deg)"),KT=bp(VT,", ",")",")"),Qi=0,So=0,mo=0,kp=1e3,Xs,vo,Vs=0,ai=0,xa=0,Go=typeof performance=="object"&&performance.now?performance:Date,wp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oh(){return ai||(wp(QT),ai=Go.now()+xa)}function QT(){ai=0}function Zs(){this._call=this._time=this._next=null}Zs.prototype=Tp.prototype={constructor:Zs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?oh():+r)+(t==null?0:+t),!this._next&&vo!==this&&(vo?vo._next=this:Xs=this,vo=this),this._call=e,this._time=r,cl()},stop:function(){this._call&&(this._call=null,this._time=1/0,cl())}};function Tp(e,t,r){var i=new Zs;return i.restart(e,t,r),i}function JT(){oh(),++Qi;for(var e=Xs,t;e;)(t=ai-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qi}function Lu(){ai=(Vs=Go.now())+xa,Qi=So=0;try{JT()}finally{Qi=0,e_(),ai=0}}function t_(){var e=Go.now(),t=e-Vs;t>kp&&(xa-=t,Vs=e)}function e_(){for(var e,t=Xs,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Xs=r);vo=e,cl(i)}function cl(e){if(!Qi){So&&(So=clearTimeout(So));var t=e-ai;t>24?(e<1/0&&(So=setTimeout(Lu,e-Go.now()-xa)),mo&&(mo=clearInterval(mo))):(mo||(Vs=Go.now(),mo=setInterval(t_,kp)),Qi=1,wp(Lu))}}function Fu(e,t,r){var i=new Zs;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,r),i}var r_=rp("start","end","cancel","interrupt"),i_=[],_p=0,Eu=1,ul=2,As=3,Au=4,dl=5,Ms=6;function ba(e,t,r,i,o,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;o_(e,r,{name:t,index:i,group:o,on:r_,tween:i_,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:_p})}function sh(e,t){var r=Ge(e,t);if(r.state>_p)throw new Error("too late; already scheduled");return r}function lr(e,t){var r=Ge(e,t);if(r.state>As)throw new Error("too late; already running");return r}function Ge(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function o_(e,t,r){var i=e.__transition,o;i[t]=r,r.timer=Tp(s,0,r.time);function s(c){r.state=Eu,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,u,d,f;if(r.state!==Eu)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===As)return Fu(a);f.state===Au?(f.state=Ms,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=Ms,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(Fu(function(){r.state===As&&(r.state=Au,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=ul,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ul){for(r.state=As,o=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++u]=f);o.length=u+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=dl,1),u=-1,d=o.length;++u<d;)o[u].call(e,h);r.state===dl&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ms,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function s_(e,t){var r=e.__transition,i,o,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){s=!1;continue}o=i.state>ul&&i.state<dl,i.state=Ms,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function a_(e){return this.each(function(){s_(this,e)})}function n_(e,t){var r,i;return function(){var o=lr(this,e),s=o.tween;if(s!==r){i=r=s;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function l_(e,t,r){var i,o;if(typeof r!="function")throw new Error;return function(){var s=lr(this,e),a=s.tween;if(a!==i){o=(i=a).slice();for(var n={name:t,value:r},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=n;break}l===c&&o.push(n)}s.tween=o}}function h_(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ge(this.node(),r).tween,o=0,s=i.length,a;o<s;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?n_:l_)(r,e,t))}function ah(e,t,r){var i=e._id;return e.each(function(){var o=lr(this,i);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return Ge(o,i).value[t]}}function Sp(e,t){var r;return(typeof t=="number"?Pr:t instanceof jo?vu:(r=jo(t))?(t=r,vu):GT)(e,t)}function c_(e){return function(){this.removeAttribute(e)}}function u_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function d_(e,t,r){var i,o=r+"",s;return function(){var a=this.getAttribute(e);return a===o?null:a===i?s:s=t(i=a,r)}}function f_(e,t,r){var i,o=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?s:s=t(i=a,r)}}function p_(e,t,r){var i,o,s;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n)))}}function g_(e,t,r){var i,o,s;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n)))}}function m_(e,t){var r=Ca(e),i=r==="transform"?KT:Sp;return this.attrTween(e,typeof t=="function"?(r.local?g_:p_)(r,i,ah(this,"attr."+e,t)):t==null?(r.local?u_:c_)(r):(r.local?f_:d_)(r,i,t))}function y_(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function C_(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function x_(e,t){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&C_(e,s)),r}return o._value=t,o}function b_(e,t){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&y_(e,s)),r}return o._value=t,o}function k_(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ca(e);return this.tween(r,(i.local?x_:b_)(i,t))}function w_(e,t){return function(){sh(this,e).delay=+t.apply(this,arguments)}}function T_(e,t){return t=+t,function(){sh(this,e).delay=t}}function __(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?w_:T_)(t,e)):Ge(this.node(),t).delay}function S_(e,t){return function(){lr(this,e).duration=+t.apply(this,arguments)}}function v_(e,t){return t=+t,function(){lr(this,e).duration=t}}function B_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?S_:v_)(t,e)):Ge(this.node(),t).duration}function L_(e,t){if(typeof t!="function")throw new Error;return function(){lr(this,e).ease=t}}function F_(e){var t=this._id;return arguments.length?this.each(L_(t,e)):Ge(this.node(),t).ease}function E_(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;lr(this,e).ease=r}}function A_(e){if(typeof e!="function")throw new Error;return this.each(E_(this._id,e))}function M_(e){typeof e!="function"&&(e=sp(e));for(var t=this._groups,r=t.length,i=new Array(r),o=0;o<r;++o)for(var s=t[o],a=s.length,n=i[o]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&n.push(l);return new wr(i,this._parents,this._name,this._id)}function $_(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,o=r.length,s=Math.min(i,o),a=new Array(i),n=0;n<s;++n)for(var l=t[n],c=r[n],h=l.length,u=a[n]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;n<i;++n)a[n]=t[n];return new wr(a,this._parents,this._name,this._id)}function O_(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function D_(e,t,r){var i,o,s=O_(t)?sh:lr;return function(){var a=s(this,e),n=a.on;n!==i&&(o=(i=n).copy()).on(t,r),a.on=o}}function I_(e,t){var r=this._id;return arguments.length<2?Ge(this.node(),r).on.on(e):this.each(D_(r,e,t))}function P_(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function R_(){return this.on("end.remove",P_(this._id))}function N_(e){var t=this._name,r=this._id;typeof e!="function"&&(e=th(e));for(var i=this._groups,o=i.length,s=new Array(o),a=0;a<o;++a)for(var n=i[a],l=n.length,c=s[a]=new Array(l),h,u,d=0;d<l;++d)(h=n[d])&&(u=e.call(h,h.__data__,d,n))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ba(c[d],t,r,d,c,Ge(h,r)));return new wr(s,this._parents,t,r)}function q_(e){var t=this._name,r=this._id;typeof e!="function"&&(e=op(e));for(var i=this._groups,o=i.length,s=[],a=[],n=0;n<o;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,m=Ge(h,r),y=0,C=d.length;y<C;++y)(f=d[y])&&ba(f,t,r,y,d,m);s.push(d),a.push(h)}return new wr(s,a,t,r)}var z_=rs.prototype.constructor;function W_(){return new z_(this._groups,this._parents)}function H_(e,t){var r,i,o;return function(){var s=Ki(this,e),a=(this.style.removeProperty(e),Ki(this,e));return s===a?null:s===r&&a===i?o:o=t(r=s,i=a)}}function vp(e){return function(){this.style.removeProperty(e)}}function Y_(e,t,r){var i,o=r+"",s;return function(){var a=Ki(this,e);return a===o?null:a===i?s:s=t(i=a,r)}}function U_(e,t,r){var i,o,s;return function(){var a=Ki(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Ki(this,e))),a===l?null:a===i&&l===o?s:(o=l,s=t(i=a,n))}}function j_(e,t){var r,i,o,s="style."+t,a="end."+s,n;return function(){var l=lr(this,e),c=l.on,h=l.value[s]==null?n||(n=vp(t)):void 0;(c!==r||o!==h)&&(i=(r=c).copy()).on(a,o=h),l.on=i}}function G_(e,t,r){var i=(e+="")=="transform"?ZT:Sp;return t==null?this.styleTween(e,H_(e,i)).on("end.style."+e,vp(e)):typeof t=="function"?this.styleTween(e,U_(e,i,ah(this,"style."+e,t))).each(j_(this._id,e)):this.styleTween(e,Y_(e,i,t),r).on("end.style."+e,null)}function X_(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function V_(e,t,r){var i,o;function s(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&X_(e,a,r)),i}return s._value=t,s}function Z_(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,V_(e,t,r??""))}function K_(e){return function(){this.textContent=e}}function Q_(e){return function(){var t=e(this);this.textContent=t??""}}function J_(e){return this.tween("text",typeof e=="function"?Q_(ah(this,"text",e)):K_(e==null?"":e+""))}function tS(e){return function(t){this.textContent=e.call(this,t)}}function eS(e){var t,r;function i(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&tS(o)),t}return i._value=e,i}function rS(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,eS(e))}function iS(){for(var e=this._name,t=this._id,r=Bp(),i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=Ge(l,t);ba(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new wr(i,this._parents,e,r)}function oS(){var e,t,r=this,i=r._id,o=r.size();return new Promise(function(s,a){var n={value:a},l={value:function(){--o===0&&s()}};r.each(function(){var c=lr(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),o===0&&s()})}var sS=0;function wr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Bp(){return++sS}var mr=rs.prototype;wr.prototype={constructor:wr,select:N_,selectAll:q_,selectChild:mr.selectChild,selectChildren:mr.selectChildren,filter:M_,merge:$_,selection:W_,transition:iS,call:mr.call,nodes:mr.nodes,node:mr.node,size:mr.size,empty:mr.empty,each:mr.each,on:I_,attr:m_,attrTween:k_,style:G_,styleTween:Z_,text:J_,textTween:rS,remove:R_,tween:h_,delay:__,duration:B_,ease:F_,easeVarying:A_,end:oS,[Symbol.iterator]:mr[Symbol.iterator]};function aS(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nS={time:null,delay:0,duration:250,ease:aS};function lS(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function hS(e){var t,r;e instanceof wr?(t=e._id,e=e._name):(t=Bp(),(r=nS).time=oh(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var a=i[s],n=a.length,l,c=0;c<n;++c)(l=a[c])&&ba(l,e,t,c,a,r||lS(l,t));return new wr(i,this._parents,e,t)}rs.prototype.interrupt=a_;rs.prototype.transition=hS;const fl=Math.PI,pl=2*fl,Zr=1e-6,cS=pl-Zr;function Lp(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function uS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Lp;const r=10**t;return function(i){this._+=i[0];for(let o=1,s=i.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}class dS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Lp:uS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,s,a){this._append`C${+t},${+r},${+i},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,o,s){if(t=+t,r=+r,i=+i,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,n=this._y1,l=i-t,c=o-r,h=a-t,u=n-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Zr)if(!(Math.abs(u*l-c*h)>Zr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-a,m=o-n,y=l*l+c*c,C=f*f+m*m,x=Math.sqrt(y),k=Math.sqrt(d),T=s*Math.tan((fl-Math.acos((y+d-C)/(2*x*k)))/2),S=T/k,v=T/x;Math.abs(S-1)>Zr&&this._append`L${t+S*h},${r+S*u}`,this._append`A${s},${s},0,0,${+(u*f>h*m)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,o,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(o),l=i*Math.sin(o),c=t+n,h=r+l,u=1^a,d=a?o-s:s-o;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Zr||Math.abs(this._y1-h)>Zr)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%pl+pl),d>cS?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>Zr&&this._append`A${i},${i},0,${+(d>=fl)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function xi(e){return function(){return e}}const r5=Math.abs,i5=Math.atan2,o5=Math.cos,s5=Math.max,a5=Math.min,n5=Math.sin,l5=Math.sqrt,Mu=1e-12,nh=Math.PI,$u=nh/2,h5=2*nh;function c5(e){return e>1?0:e<-1?nh:Math.acos(e)}function u5(e){return e>=1?$u:e<=-1?-$u:Math.asin(e)}function fS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new dS(t)}function pS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fp(e){this._context=e}Fp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Po(e){return new Fp(e)}function gS(e){return e[0]}function mS(e){return e[1]}function yS(e,t){var r=xi(!0),i=null,o=Po,s=null,a=fS(n);e=typeof e=="function"?e:e===void 0?gS:xi(e),t=typeof t=="function"?t:t===void 0?mS:xi(t);function n(l){var c,h=(l=pS(l)).length,u,d=!1,f;for(i==null&&(s=o(f=a())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(u,c,l),+t(u,c,l));if(f)return s=null,f+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:xi(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:xi(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:xi(!!l),n):r},n.curve=function(l){return arguments.length?(o=l,i!=null&&(s=o(i)),n):o},n.context=function(l){return arguments.length?(l==null?i=s=null:s=o(i=l),n):i},n}class Ep{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Ap(e){return new Ep(e,!0)}function Mp(e){return new Ep(e,!1)}function zr(){}function Ks(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 ka(e){this._context=e}ka.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:Ks(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Ks(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gl(e){return new ka(e)}function $p(e){this._context=e}$p.prototype={areaStart:zr,areaEnd:zr,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);break}}},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:Ks(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CS(e){return new $p(e)}function Op(e){this._context=e}Op.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||this._line!==0&&this._point===3)&&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,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Ks(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xS(e){return new Op(e)}function Dp(e,t){this._basis=new ka(e),this._beta=t}Dp.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 i=e[0],o=t[0],s=e[r]-i,a=t[r]-o,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const bS=(function e(t){function r(i){return t===1?new ka(i):new Dp(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Qs(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 lh(e,t){this._context=e,this._k=(1-t)/6}lh.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:Qs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:Qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ip=(function e(t){function r(i){return new lh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function hh(e,t){this._context=e,this._k=(1-t)/6}hh.prototype={areaStart:zr,areaEnd:zr,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);break}}},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:Qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const kS=(function e(t){function r(i){return new hh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ch(e,t){this._context=e,this._k=(1-t)/6}ch.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||this._line!==0&&this._point===3)&&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:Qs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wS=(function e(t){function r(i){return new ch(i,t)}return r.tension=function(i){return e(+i)},r})(0);function uh(e,t,r){var i=e._x1,o=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Mu){var n=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);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Mu){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,o,s,a,e._x2,e._y2)}function Pp(e,t){this._context=e,this._alpha=t}Pp.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:uh(this,e,t);break}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 Rp=(function e(t){function r(i){return t?new Pp(i,t):new lh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Np(e,t){this._context=e,this._alpha=t}Np.prototype={areaStart:zr,areaEnd:zr,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);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=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:uh(this,e,t);break}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 TS=(function e(t){function r(i){return t?new Np(i,t):new hh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qp(e,t){this._context=e,this._alpha=t}qp.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:uh(this,e,t);break}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 _S=(function e(t){function r(i){return t?new qp(i,t):new ch(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function zp(e){this._context=e}zp.prototype={areaStart:zr,areaEnd:zr,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))}};function SS(e){return new zp(e)}function Ou(e){return e<0?-1:1}function Du(e,t,r){var i=e._x1-e._x0,o=t-e._x1,s=(e._y1-e._y0)/(i||o<0&&-0),a=(r-e._y1)/(o||i<0&&-0),n=(s*o+a*i)/(i+o);return(Ou(s)+Ou(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(n))||0}function Iu(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function dn(e,t,r){var i=e._x0,o=e._y0,s=e._x1,a=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,o+n*t,s-n,a-n*r,s,a)}function Js(e){this._context=e}Js.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:dn(this,this._t0,Iu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(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,dn(this,Iu(this,r=Du(this,e,t)),r);break;default:dn(this,this._t0,r=Du(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Wp(e){this._context=new Hp(e)}(Wp.prototype=Object.create(Js.prototype)).point=function(e,t){Js.prototype.point.call(this,t,e)};function Hp(e){this._context=e}Hp.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,i,o,s){this._context.bezierCurveTo(t,e,i,r,s,o)}};function Yp(e){return new Js(e)}function Up(e){return new Wp(e)}function jp(e){this._context=e}jp.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]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Pu(e),o=Pu(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],o[0][s],i[1][s],o[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&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)}};function Pu(e){var t,r=e.length-1,i,o=new Array(r),s=new Array(r),a=new Array(r);for(o[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=o[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(o[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/s[t];for(s[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-o[t+1];return[o,s]}function Gp(e){return new jp(e)}function wa(e,t){this._context=e,this._t=t}wa.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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)}break}}this._x=e,this._y=t}};function Xp(e){return new wa(e,.5)}function Vp(e){return new wa(e,0)}function Zp(e){return new wa(e,1)}function Bo(e,t,r){this.k=e,this.x=t,this.y=r}Bo.prototype={constructor:Bo,scale:function(e){return e===1?this:new Bo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Bo(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+")"}};Bo.prototype;var vS=p(e=>{const{securityLevel:t}=It();let r=At("body");if(t==="sandbox"){const s=At(`#i${e}`).node()?.contentDocument??document;r=At(s.body)}return r.select(`#${e}`)},"selectSvgElement"),BS=p(e=>{const{handDrawnSeed:t}=It();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),LS=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),ro=p(e=>{const t=FS([...e.cssCompiledStyles||[],...e.cssStyles||[],...LS(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),FS=p(e=>{const t=new Map;return e.forEach(r=>{const[i,o]=r.split(":");t.set(i.trim(),o?.trim())}),t},"styles2Map"),Kp=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),pt=p(e=>{const{stylesArray:t}=ro(e),r=[],i=[],o=[],s=[];return t.forEach(a=>{const n=a[0];Kp(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&o.push(a.join(":")+" !important"),n==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:s}},"styles2String"),ct=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=It(),{nodeBorder:o,mainBkg:s}=r,{stylesMap:a}=ro(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||o,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:ES(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),ES=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const AS=Object.freeze({left:0,top:0,width:16,height:16}),ta=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qp=Object.freeze({...AS,...ta}),MS=Object.freeze({...Qp,body:"",hidden:!1}),$S=Object.freeze({width:null,height:null}),OS=Object.freeze({...$S,...ta}),DS=(e,t,r,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const n=o.pop(),l=o.pop(),c={provider:o.length>0?o[0]:i,prefix:l,name:n};return fn(c)?c:null}const s=o[0],a=s.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return fn(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return fn(n,r)?n:null}return null},fn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function IS(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Ru(e,t){const r=IS(e,t);for(const i in MS)i in ta?i in e&&!(i in r)&&(r[i]=ta[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function PS(e,t){const r=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const n=i[a]&&i[a].parent,l=n&&s(n);l&&(o[a]=[n].concat(l))}return o[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),o}function Nu(e,t,r){const i=e.icons,o=e.aliases||Object.create(null);let s={};function a(n){s=Ru(i[n]||o[n],s)}return a(t),r.forEach(a),Ru(e,s)}function RS(e,t){if(e.icons[t])return Nu(e,t,[]);const r=PS(e,[t])[t];return r?Nu(e,t,r):null}const NS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function qu(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(NS);if(i===null||!i.length)return e;const o=[];let s=i.shift(),a=qS.test(s);for(;;){if(a){const n=parseFloat(s);isNaN(n)?o.push(s):o.push(Math.ceil(n*t*r)/r)}else o.push(s);if(s=i.shift(),s===void 0)return o.join("");a=!a}}function zS(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const o=e.indexOf(">",i),s=e.indexOf("</"+t);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(o+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function WS(e,t){return e?"<defs>"+e+"</defs>"+t:t}function HS(e,t,r){const i=zS(e);return WS(i.defs,t+i.content+r)}const YS=e=>e==="unset"||e==="undefined"||e==="none";function US(e,t){const r={...Qp,...e},i={...OS,...t},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,k=y.vFlip;let T=y.rotate;x?k?T+=2:(C.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),C.push("scale(-1 1)"),o.top=o.left=0):k&&(C.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),C.push("scale(1 -1)"),o.top=o.left=0);let S;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:S=o.height/2+o.top,C.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:C.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,C.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")")}T%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),C.length&&(s=HS(s,'<g transform="'+C.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=o.width,c=o.height;let h,u;a===null?(u=n===null?"1em":n==="auto"?c:n,h=qu(u,l/c)):(h=a==="auto"?l:a,u=n===null?qu(h,c/l):n==="auto"?c:n);const d={},f=(y,C)=>{YS(C)||(d[y]=C.toString())};f("width",h),f("height",u);const m=[o.left,o.top,l,c];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:s}}const jS=/\sid="(\S+)"/g,zu=new Map;function GS(e){e=e.replace(/[0-9]+$/,"")||"a";const t=zu.get(e)||0;return zu.set(e,t+1),t?`${e}${t}`:e}function XS(e){const t=[];let r;for(;r=jS.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const s=GS(o),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function VS(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var ZS={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},ml=new Map,Jp=new Map,KS=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(N.debug("Registering icon pack:",t.name),"loader"in t)Jp.set(t.name,t.loader);else if("icons"in t)ml.set(t.name,t.icons);else throw N.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),tg=p(async(e,t)=>{const r=DS(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let o=ml.get(i);if(!o){const a=Jp.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await a(),prefix:i},ml.set(i,o)}catch(n){throw N.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=RS(o,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),QS=p(async e=>{try{return await tg(e),!0}catch{return!1}},"isIconAvailable"),os=p(async(e,t,r)=>{let i;try{i=await tg(e,t?.fallbackPrefix)}catch(a){N.error(a),i=ZS}const o=US(i,t),s=VS(XS(o.body),{...o.attributes,...r});return Re(s,Vt())},"getIconSVG"),Cs={},se={},Wu;function JS(){return Wu||(Wu=1,Object.defineProperty(se,"__esModule",{value:!0}),se.BLANK_URL=se.relativeFirstCharacters=se.whitespaceEscapeCharsRegex=se.urlSchemeRegex=se.ctrlCharactersRegex=se.htmlCtrlEntityRegex=se.htmlEntitiesRegex=se.invalidProtocolRegex=void 0,se.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,se.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,se.htmlCtrlEntityRegex=/&(newline|tab);/gi,se.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,se.urlSchemeRegex=/^.+(:|&colon;)/gim,se.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,se.relativeFirstCharacters=[".","/"],se.BLANK_URL="about:blank"),se}var Hu;function tv(){if(Hu)return Cs;Hu=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.sanitizeUrl=s;var e=JS();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var n,l=o(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return Cs}var ev=tv(),rv="​",iv={curveBasis:gl,curveBasisClosed:CS,curveBasisOpen:xS,curveBumpX:Ap,curveBumpY:Mp,curveBundle:bS,curveCardinalClosed:kS,curveCardinalOpen:wS,curveCardinal:Ip,curveCatmullRomClosed:TS,curveCatmullRomOpen:_S,curveCatmullRom:Rp,curveLinear:Po,curveLinearClosed:SS,curveMonotoneX:Yp,curveMonotoneY:Up,curveNatural:Gp,curveStep:Xp,curveStepAfter:Zp,curveStepBefore:Vp},ov=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sv=p(function(e,t){const r=eg(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);qs(a),i=ae(i,[...a])}else i=r.args;if(!i)return;let o=Xl(e,t);const s="config";return i[s]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),i[o]=i[s],delete i[s]),i},"detectInit"),eg=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${ov.source})(?=[}][%]{2}).*
129
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),N.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const o=[];for(;(i=Io.exec(e))!==null;)if(i.index===Io.lastIndex&&Io.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:s,args:a})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return N.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),av=p(function(e){return e.replace(Io,"")},"removeDirectives"),nv=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function dh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return iv[r]??t}p(dh,"interpolateToCurve");function rg(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?ev.sanitizeUrl(r):r}p(rg,"formatUrl");var lv=p((e,...t)=>{const r=e.split("."),i=r.length-1,o=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){N.error(`Function name: ${e} not found in window`);return}s[o](...t)},"runFunc");function fh(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(fh,"distance");function ig(e){let t,r=0;e.forEach(o=>{r+=fh(o,t),t=o});const i=r/2;return ph(e,i)}p(ig,"traverseEdge");function og(e){return e.length===1?e[0]:ig(e)}p(og,"calcLabelPosition");var Yu=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),ph=p((e,t)=>{let r,i=t;for(const o of e){if(r){const s=fh(o,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:o.x,y:o.y};if(a>0&&a<1)return{x:Yu((1-a)*r.x+a*o.x,5),y:Yu((1-a)*r.y+a*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),hv=p((e,t,r)=>{N.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const o=ph(t,25),s=e?10:5,a=Math.atan2(t[0].y-o.y,t[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(a)*s+(t[0].x+o.x)/2,n.y=-Math.cos(a)*s+(t[0].y+o.y)/2,n},"calcCardinalityPosition");function sg(e,t,r){const i=structuredClone(r);N.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const o=25+e,s=ph(i,o),a=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+s.x)/2,l.y=-Math.cos(n)*a+(i[0].y+s.y)/2),l}p(sg,"calcTerminalLabelPosition");function ag(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(ag,"getStylesFromArray");var Uu=0,cv=p(()=>(Uu++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Uu),"generateId");function ng(e){let t="";const r="0123456789abcdef",i=r.length;for(let o=0;o<e;o++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(ng,"makeRandomHex");var uv=p(e=>ng(e.length),"random"),dv=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),fv=p(function(e,t){const r=t.text.replace(es.lineBreakRegex," "),[,i]=Ta(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",i),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const s=o.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),o},"drawSimpleText"),pv=Qo((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),es.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),o=[];let s="";return i.forEach((a,n)=>{const l=Tr(`${a} `,r),c=Tr(s,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=gv(a,t,"-",r);o.push(s,...d),s=f}else c+l>=t?(o.push(s),s=a):s=[s,a].filter(Boolean).join(" ");n+1===i.length&&o.push(s)}),o.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),gv=Qo((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...e],s=[];let a="";return o.forEach((n,l)=>{const c=`${a}${n}`;if(Tr(c,i)>=t){const u=l+1,d=o.length===u,f=`${c}${r}`;s.push(d?c:f),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function lg(e,t){return gh(e,t).height}p(lg,"calculateTextHeight");function Tr(e,t){return gh(e,t).width}p(Tr,"calculateTextWidth");var gh=Qo((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,s]=Ta(r),a=["sans-serif",i],n=e.split(es.lineBreakRegex),l=[],c=At("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of a){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=dv();C.text=y||rv;const x=fv(h,C).style("font-size",s).style("font-weight",o).style("font-family",d),k=(x._groups||x)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),f=Math.round(k.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}l.push(m)}h.remove();const u=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;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ui,mv=(Ui=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Ui,"InitIDGenerator"),Ui),xs,yv=p(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 mh(e){return"str"in e}p(mh,"isDetailedError");var Cv=p((e,t,r,i)=>{if(!i)return;const o=e.node()?.getBBox();o&&e.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ta=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function yh(e,t){return bC({},e,t)}p(yh,"cleanAndMerge");var ye={assignWithDepth:ae,wrapLabel:pv,calculateTextHeight:lg,calculateTextWidth:Tr,calculateTextDimensions:gh,cleanAndMerge:yh,detectInit:sv,detectDirective:eg,isSubstringInArray:nv,interpolateToCurve:dh,calcLabelPosition:og,calcCardinalityPosition:hv,calcTerminalLabelPosition:sg,formatUrl:rg,getStylesFromArray:ag,generateId:cv,random:uv,runFunc:lv,entityDecode:yv,insertTitle:Cv,isLabelCoordinateInPath:hg,parseFontSize:Ta,InitIDGenerator:mv},xv=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Wr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),d5=p((e,t,{counter:r=0,prefix:i,suffix:o},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${o?`_${o}`:""}`,"getEdgeId");function ie(e){return e??null}p(ie,"handleUndefinedAttr");function hg(e,t){const r=Math.round(e.x),i=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return o.includes(r.toString())||o.includes(i.toString())}p(hg,"isLabelCoordinateInPath");var $s={exports:{}},ju=$s.exports,Gu;function bv(){return Gu||(Gu=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function o(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}o.prototype={constructor:o,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var d=u?h.bind(u):h;return this.reads.push(d),s(this),d},mutate:function(h,u){var d=u?h.bind(u):h;return this.writes.push(d),s(this),d},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var u=h.writes,d=h.reads,f;try{r("flushing reads",d.length),h.runTasks(d),r("flushing writes",u.length),h.runTasks(u)}catch(m){f=m}if(h.scheduled=!1,(d.length||u.length)&&s(h),f)if(r("task errored",f.message),h.catch)h.catch(f);else throw f}function n(h,u){var d=h.indexOf(u);return!!~d&&!!h.splice(d,1)}function l(h,u){for(var d in u)u.hasOwnProperty(d)&&(h[d]=u[d])}var c=t.fastdom=t.fastdom||new o;e.exports=c})(typeof window<"u"?window:typeof ju<"u"?ju:globalThis)})($s)),$s.exports}var kv=bv();const wv=Pl(kv);var pn={exports:{}},Xu;function Tv(){return Xu||(Xu=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,o){return r(this,"mutate",i,o)},measure:function(i,o){return r(this,"measure",i,o)},clear:function(i){var o=this._tasks,s=o.get(i);this.fastdom.clear(s),o.delete(i)}};function r(i,o,s,a){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(u,d){c=l[o](function(){n.delete(h);try{u(a?s.call(a):s())}catch(f){d(f)}},a)});return n.set(h,c),h}e.exports=t})()})(pn)),pn.exports}var _v=Tv();const Sv=Pl(_v);function Ch(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var di=Ch();function cg(e){di=e}var Ro={exec:()=>null};function zt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(o,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(ke.caret,"$1"),r=r.replace(o,a),i},getRegex:()=>new RegExp(r,t)};return i}var vv=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ke={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+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Bv=/^(?:[ \t]*(?:\n|$))+/,Lv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ss=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ev=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xh=/(?:[*+-]|\d{1,9}[.)])/,ug=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dg=zt(ug).replace(/bull/g,xh).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(),Av=zt(ug).replace(/bull/g,xh).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(),bh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mv=/^[^\n]+/,kh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$v=zt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ov=zt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xh).getRegex(),_a="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",wh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dv=zt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wh).replace("tag",_a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fg=zt(bh).replace("hr",ss).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",_a).getRegex(),Iv=zt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fg).getRegex(),Th={blockquote:Iv,code:Lv,def:$v,fences:Fv,heading:Ev,hr:ss,html:Dv,lheading:dg,list:Ov,newline:Bv,paragraph:fg,table:Ro,text:Mv},Vu=zt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_a).getRegex(),Pv={...Th,lheading:Av,table:Vu,paragraph:zt(bh).replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vu).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",_a).getRegex()},Rv={...Th,html:zt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wh).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:Ro,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:zt(bh).replace("hr",ss).replace("heading",` *#{1,6} *[^
130
+ ]`).replace("lheading",dg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Nv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pg=/^( {2,}|\\)\n(?!\s*$)/,zv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sa=/[\p{P}\p{S}]/u,_h=/[\s\p{P}\p{S}]/u,gg=/[^\s\p{P}\p{S}]/u,Wv=zt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_h).getRegex(),mg=/(?!~)[\p{P}\p{S}]/u,Hv=/(?!~)[\s\p{P}\p{S}]/u,Yv=/(?:[^\s\p{P}\p{S}]|~)/u,Uv=zt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vv?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,jv=zt(yg,"u").replace(/punct/g,Sa).getRegex(),Gv=zt(yg,"u").replace(/punct/g,mg).getRegex(),Cg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xv=zt(Cg,"gu").replace(/notPunctSpace/g,gg).replace(/punctSpace/g,_h).replace(/punct/g,Sa).getRegex(),Vv=zt(Cg,"gu").replace(/notPunctSpace/g,Yv).replace(/punctSpace/g,Hv).replace(/punct/g,mg).getRegex(),Zv=zt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gg).replace(/punctSpace/g,_h).replace(/punct/g,Sa).getRegex(),Kv=zt(/\\(punct)/,"gu").replace(/punct/g,Sa).getRegex(),Qv=zt(/^<(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(),Jv=zt(wh).replace("(?:-->|$)","-->").getRegex(),tB=zt("^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",Jv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ea=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,eB=zt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ea).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xg=zt(/^!?\[(label)\]\[(ref)\]/).replace("label",ea).replace("ref",kh).getRegex(),bg=zt(/^!?\[(ref)\](?:\[\])?/).replace("ref",kh).getRegex(),rB=zt("reflink|nolink(?!\\()","g").replace("reflink",xg).replace("nolink",bg).getRegex(),Zu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Sh={_backpedal:Ro,anyPunctuation:Kv,autolink:Qv,blockSkip:Uv,br:pg,code:qv,del:Ro,emStrongLDelim:jv,emStrongRDelimAst:Xv,emStrongRDelimUnd:Zv,escape:Nv,link:eB,nolink:bg,punctuation:Wv,reflink:xg,reflinkSearch:rB,tag:tB,text:zv,url:Ro},iB={...Sh,link:zt(/^!?\[(label)\]\((.*?)\)/).replace("label",ea).getRegex(),reflink:zt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ea).getRegex()},yl={...Sh,emStrongRDelimAst:Vv,emStrongLDelim:Gv,url:zt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Zu).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:zt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Zu).getRegex()},oB={...yl,br:zt(pg).replace("{2,}","*").getRegex(),text:zt(yl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bs={normal:Th,gfm:Pv,pedantic:Rv},yo={normal:Sh,gfm:yl,breaks:oB,pedantic:iB},sB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ku=e=>sB[e];function Qe(e,t){if(t){if(ke.escapeTest.test(e))return e.replace(ke.escapeReplace,Ku)}else if(ke.escapeTestNoEncode.test(e))return e.replace(ke.escapeReplaceNoEncode,Ku);return e}function Qu(e){try{e=encodeURI(e).replace(ke.percentDecode,"%")}catch{return null}return e}function Ju(e,t){let r=e.replace(ke.findPipe,(s,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(ke.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(ke.slashPipe,"|");return i}function Co(e,t,r){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function aB(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function td(e,t,r,i,o){let s=t.href,a=t.title||null,n=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function nB(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
131
+ `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[n]=a;return n.length>=o.length?s.slice(o.length):s}).join(`
132
+ `)}var ra=class{options;rules;lexer;constructor(t){this.options=t||di}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Co(i,`
133
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],o=nB(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let o=Co(i,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(i=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Co(r[0],`
134
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Co(r[0],`
135
+ `).split(`
136
+ `),o="",s="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
137
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
138
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
139
+ ${h}`:h,s=s?`${s}
140
+ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=d,i.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,y=m.raw+`
141
+ `+i.join(`
142
+ `),C=this.blockquote(y);a[a.length-1]=C,o=o.substring(0,o.length-m.raw.length)+C.raw,s=s.substring(0,s.length-m.text.length)+C.text;break}else if(f?.type==="list"){let m=f,y=m.raw+`
143
+ `+i.join(`
144
+ `),C=this.list(y);a[a.length-1]=C,o=o.substring(0,o.length-f.raw.length)+C.raw,s=s.substring(0,s.length-m.raw.length)+C.raw,i=y.substring(a.at(-1).raw.length).split(`
145
+ `);continue}}return{type:"blockquote",raw:o,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),o=i.length>1,s={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
146
+ `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=t.split(`
147
+ `,1)[0],m=!d.trim(),y=0;if(this.options.pedantic?(y=2,u=d.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=d.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(h+=f+`
148
+ `,t=t.substring(f.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),T=this.rules.other.hrRegex(y),S=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),A=this.rules.other.htmlBeginRegex(y);for(;t;){let L=t.split(`
149
+ `,1)[0],E;if(f=L,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),E=f):E=f.replace(this.rules.other.tabCharGlobal," "),S.test(f)||v.test(f)||A.test(f)||k.test(f)||T.test(f))break;if(E.search(this.rules.other.nonSpaceChar)>=y||!f.trim())u+=`
150
+ `+E.slice(y);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(d)||v.test(d)||T.test(d))break;u+=`
151
+ `+f}!m&&!f.trim()&&(m=!0),h+=L+`
152
+ `,t=t.substring(L.length+1),d=E.slice(y)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let h=s.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=u}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:o,title:s}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Ju(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
153
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===o.length){for(let n of o)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of s)a.rows.push(Ju(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
154
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Co(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=aB(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(o);a&&(o=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?o=o.slice(1):o=o.slice(1,-1)),td(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let o=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return td(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...o[0]].length-1,a,n,l=s,c=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(o=h.exec(r))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(n=[...a].length,o[3]||o[4]){l+=n;continue}else if((o[5]||o[6])&&s%3&&!((s+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...o[0]][0].length,d=t.slice(0,s+o.index+u+n);if(Math.min(s,n)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return o&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=r[1],o="mailto:"+i):(i=r[1],o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=r[0],o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);i=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},We=class Cl{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||di,this.options.tokenizer=this.options.tokenizer||new ra,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:ke,block:bs.normal,inline:yo.normal};this.options.pedantic?(r.block=bs.pedantic,r.inline=yo.pedantic):this.options.gfm&&(r.block=bs.gfm,this.options.breaks?r.inline=yo.breaks:r.inline=yo.gfm),this.tokenizer.rules=r}static get rules(){return{block:bs,inline:yo}}static lex(t,r){return new Cl(r).lex(t)}static lexInline(t,r){return new Cl(r).inlineTokens(t)}lex(t){t=t.replace(ke.carriageReturn,`
155
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(ke.tabCharGlobal," ").replace(ke.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(a=>(o=a.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let a=r.at(-1);o.raw.length===1&&a!==void 0?a.raw+=`
156
+ `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
157
+ `)?"":`
158
+ `)+o.raw,a.text+=`
159
+ `+o.text,this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
160
+ `)?"":`
161
+ `)+o.raw,a.text+=`
162
+ `+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let s=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
163
+ `)?"":`
164
+ `)+o.raw,a.text+=`
165
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o),i=s.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
166
+ `)?"":`
167
+ `)+o.raw,a.text+=`
168
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(o);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,o=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=o[2]?o[2].length:0,i=i.slice(0,o.index+s)+"["+"a".repeat(o[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},ia=class{options;parser;constructor(t){this.options=t||di}space(t){return""}code({text:t,lang:r,escaped:i}){let o=(r||"").match(ke.notSpaceStart)?.[0],s=t.replace(ke.endingNewline,"")+`
169
+ `;return o?'<pre><code class="language-'+Qe(o)+'">'+(i?s:Qe(s,!0))+`</code></pre>
170
+ `:"<pre><code>"+(i?s:Qe(s,!0))+`</code></pre>
171
+ `}blockquote({tokens:t}){return`<blockquote>
172
+ ${this.parser.parse(t)}</blockquote>
173
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
174
+ `}hr(t){return`<hr>
175
+ `}list(t){let r=t.ordered,i=t.start,o="";for(let n=0;n<t.items.length;n++){let l=t.items[n];o+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
176
+ `+o+"</"+s+`>
177
+ `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Qe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
178
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
179
+ `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let o="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);o+=this.tablerow({text:i})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
180
+ <thead>
181
+ `+r+`</thead>
182
+ `+o+`</table>
183
+ `}tablerow({text:t}){return`<tr>
184
+ ${t}</tr>
185
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
186
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Qe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let o=this.parser.parseInline(i),s=Qu(t);if(s===null)return o;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Qe(r)+'"'),a+=">"+o+"</a>",a}image({href:t,title:r,text:i,tokens:o}){o&&(i=this.parser.parseInline(o,this.parser.textRenderer));let s=Qu(t);if(s===null)return Qe(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Qe(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Qe(t.text)}},vh=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},He=class xl{options;renderer;textRenderer;constructor(t){this.options=t||di,this.options.renderer=this.options.renderer||new ia,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vh}static parse(t,r){return new xl(r).parse(t)}static parseInline(t,r){return new xl(r).parseInline(t)}parse(t,r=!0){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=s,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;o+1<t.length&&t[o+1].type==="text";)n=t[++o],l+=`
187
+ `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let o=0;o<t.length;o++){let s=t[o];if(this.options.extensions?.renderers?.[s.type]){let n=this.options.extensions.renderers[s.type].call({parser:this},s);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=n||"";continue}}let a=s;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Lo=class{options;block;constructor(t){this.options=t||di}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?We.lex:We.lexInline}provideParser(){return this.block?He.parse:He.parseInline}},lB=class{defaults=Ch();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=He;Renderer=ia;TextRenderer=vh;Lexer=We;Tokenizer=ra;Hooks=Lo;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let s=o;for(let a of s.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of s.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let s=o;i=i.concat(this.walkTokens(s.items,r));break}default:{let s=o;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let n=s[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let o={...i};if(o.async=this.defaults.async||o.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),o.extensions=r),i.renderer){let s=this.defaults.renderer||new ia(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=s[n];s[n]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u||""}}o.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new ra(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=s[n];s[n]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}o.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Lo;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=s[n];Lo.passThroughHooks.has(a)?s[n]=h=>{if(this.defaults.async&&Lo.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await l.call(s,h);return c.call(s,d)})();let u=l.call(s,h);return c.call(s,u)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(s,h);return d===!1&&(d=await c.apply(s,h)),d})();let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}o.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;o.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return We.lex(t,r??this.defaults)}parser(t,r){return He.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?We.lex:We.lexInline)(n,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?He.parse:He.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?We.lex:We.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?He.parse:He.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
188
+ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Qe(i.message+"",!0)+"</pre>";return r?Promise.resolve(o):o}if(r)return Promise.reject(i);throw i}}},ni=new lB;function Ut(e,t){return ni.parse(e,t)}Ut.options=Ut.setOptions=function(e){return ni.setOptions(e),Ut.defaults=ni.defaults,cg(Ut.defaults),Ut};Ut.getDefaults=Ch;Ut.defaults=di;Ut.use=function(...e){return ni.use(...e),Ut.defaults=ni.defaults,cg(Ut.defaults),Ut};Ut.walkTokens=function(e,t){return ni.walkTokens(e,t)};Ut.parseInline=ni.parseInline;Ut.Parser=He;Ut.parser=He.parse;Ut.Renderer=ia;Ut.TextRenderer=vh;Ut.Lexer=We;Ut.lexer=We.lex;Ut.Tokenizer=ra;Ut.Hooks=Lo;Ut.parse=Ut;Ut.options;Ut.setOptions;Ut.use;Ut.walkTokens;Ut.parseInline;He.parse;We.lex;function kg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):n},[]);if(o.length){var s=new RegExp(`
189
+ [ ]{`.concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(n){return n.replace(s,`
190
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
191
+ `)&&(u=String(n).split(`
192
+ `).map(function(d,f){return f===0?d:"".concat(h).concat(d)}).join(`
193
+ `)),a+=u+i[l+1]}),a}var bl=typeof performance<"u"&&typeof performance.now=="function",bi=p(()=>bl?performance.now():0,"now"),gn="🧜 ",hB="Mermaid render",cB="Mermaid",uB={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},ji;ji=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=bi();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(bi()-i)}}async tick(t,r){if(!this.enabled)return r();const i=bi();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(bi()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??t?.name;return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:bi(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),bl&&typeof performance.mark=="function")try{performance.mark(`${gn}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=bi();if(t.duration=r-t.start,bl&&typeof performance.measure=="function")try{performance.measure(`${gn}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:hB,trackGroup:cB,color:uB[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,o=r&&r!==t.name?`${t.name} [${r}]`:t.name,s=["ms % phase"],a=p((l,c)=>{const h=" ".repeat(c),u=l.duration.toFixed(1).padStart(8),d=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";s.push(`${u} ${d} ${h}${l.name}`);for(const f of l.children)a(f,c+1);if(l.children.length>0){const f=l.children.reduce((y,C)=>y+C.duration,0),m=l.duration-f;if(m>.5){const y=m.toFixed(1).padStart(8);s.push(`${y} ${h} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){s.push("—— buckets (summed) ——");for(const l of n)s.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${gn}mermaid render profile · ${o}
194
+ ${s.join(`
195
+ `)}`)}},p(ji,"Profiler");globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var dB=wv.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(Sv),li=dB;function wg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
196
+ `).replace(/\n{2,}/g,`
197
+ `);return kg(i)}p(wg,"preprocessMarkdown");function Tg(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(Tg,"nonMarkdownToLines");function _g(e,t={}){const r=wg(e,t),i=Ut.lexer(r),o=[[]];let s=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
198
+ `).forEach((h,u)=>{u!==0&&(s++,o.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&o[s].push({content:d,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&o[s].push({content:n.text,type:"normal"})}return p(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?o[s].push({content:n.text,type:"normal"}):o[s].push({content:n.raw,type:"normal"})}),o}p(_g,"markdownToLines");function Sg(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Sg,"nonMarkdownToHTML");function vg(e,{markdownAutoWrap:t}={}){const r=Ut.lexer(e);function i(o){return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${o.tokens?.map(i).join("")}</strong>`:o.type==="em"?`<em>${o.tokens?.map(i).join("")}</em>`:o.type==="paragraph"?`<p>${o.tokens?.map(i).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(N.warn(`Unsupported markdown: ${o.type}`),o.raw)}return p(i,"output"),r.map(i).join("")}p(vg,"markdownToHTML");function Bg(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Bg,"splitTextToChars");function Lg(e,t){const r=Bg(t.content);return Bh(e,[],r,t.type)}p(Lg,"splitWordToFitWidth");function Bh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[o,...s]=r,a=[...t,o];return e([{content:a.join(""),type:i}])?Bh(e,a,s,i):(t.length===0&&o&&(t.push(o),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Bh,"splitWordToFitWidthRecursion");function Fg(e,t){if(e.some(({content:r})=>r.includes(`
199
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return oa(e,t)}p(Fg,"splitLineToFitWidth");function oa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let o="";e[0].content===" "&&(o=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(o!==""&&a.push({content:o,type:"normal"}),a.push(s),t(a))return oa(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=Lg(t,s);r.push([n]),l.content&&e.unshift(l)}return oa(e,t,r)}p(oa,"splitLineToFitWidthRecursion");function kl(e,t){t&&e.attr("style",t)}p(kl,"applyStyle");var ed=16384;async function Eg(e,t,r,i,o=!1,s=Vt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,ed)}px`),a.attr("height",`${Math.min(10*r,ed)}px`);const n=a.append("xhtml:div"),l=Ho(t.label)?await Jf(t.label.replace(es.lineBreakRegex,`
200
+ `),s):Re(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),kl(h,t.labelStyle),h.attr("class",`${c} ${i}`),kl(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&n.attr("class","labelBkg"),(await li.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}p(Eg,"addHtmlSpan");function va(e,t,r,i=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}p(va,"createTspan");function Ag(e,t,r){const i=e.append("text"),o=va(i,1,t);Ba(o,r);const s=o.node().getComputedTextLength();return i.remove(),s}p(Ag,"computeWidthOfText");function fB(e,t,r){const i=e.append("text"),o=va(i,1,t);Ba(o,[{content:r,type:"normal"}]);const s=o.node()?.getBoundingClientRect();return s&&i.remove(),s}p(fB,"computeDimensionOfText");function Mg(e,t,r,i=!1,o=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(f=>Ag(a,1.1,f)<=e,"checkWidth"),d=u(h)?[h]:Fg(h,u);for(const f of d){const m=va(l,c,1.1,o);Ba(m,f),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),a.node()}else return l.node()}p(Mg,"createFormattedText");function wl(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(wl,"decodeHTMLEntities");function Ba(e,t){e.text(""),t.forEach((r,i)=>{const o=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?o.text(wl(r.content)):o.text(" "+wl(r.content))})}p(Ba,"updateTextContentAndStyles");async function $g(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,s,a)=>(r.push((async()=>{const n=`${s}:${a}`;return await QS(n)?await os(n,void 0,{class:"label-icon"}):`<i class='${Re(o,t).replace(":"," ")}'></i>`})()),o));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p($g,"replaceIconSubstring");var Xe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:s=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(N.debug("XYZ createText",t,r,i,o,s,n,"addSvgBackground: ",c),s){const u=a?vg(t,h):Sg(t),d=await $g(Wr(u),h),f=t.replace(/\\\\/g,"\\"),m={isNode:n,label:Ho(t)?f:d,labelStyle:r.replace("fill:","color:")};return await Eg(e,m,l,o,c,h)}else{const u=Wr(t.replace(/<br\s*\/?>/g,"<br/>")),d=a?_g(u.replace("<br>","<br/>"),h):Tg(u),f=Mg(l,e,d,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");At(f).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");At(f).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");At(f).select("text").attr("style",y)}return i?At(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):At(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function mn(e,t,r){if(e&&e.length){const[i,o]=t,s=Math.PI/180*r,a=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-o)*n+i,l[1]=(c-i)*n+(h-o)*a+o}}}function pB(e,t){return e[0]===t[0]&&e[1]===t[1]}function gB(e,t,r,i=1){const o=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(o)for(const c of a)mn(c,n,o);const l=(function(c,h,u){const d=[];for(const k of c){const T=[...k];pB(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&d.push(T)}const f=[];h=Math.max(h,.1);const m=[];for(const k of d)for(let T=0;T<k.length-1;T++){const S=k[T],v=k[T+1];if(S[1]!==v[1]){const A=Math.min(S[1],v[1]);m.push({ymin:A,ymax:Math.max(S[1],v[1]),x:A===S[1]?S[0]:v[0],islope:(v[0]-S[0])/(v[1]-S[1])})}}if(m.sort(((k,T)=>k.ymin<T.ymin?-1:k.ymin>T.ymin?1:k.x<T.x?-1:k.x>T.x?1:k.ymax===T.ymax?0:(k.ymax-T.ymax)/Math.abs(k.ymax-T.ymax))),!m.length)return f;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let T=0;T<m.length&&!(m[T].ymin>C);T++)k=T;m.splice(0,k+1).forEach((T=>{y.push({s:C,edge:T})}))}if(y=y.filter((k=>!(k.edge.ymax<=C))),y.sort(((k,T)=>k.edge.x===T.edge.x?0:(k.edge.x-T.edge.x)/Math.abs(k.edge.x-T.edge.x))),(u!==1||x%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const T=k+1;if(T>=y.length)break;const S=y[k].edge,v=y[T].edge;f.push([[Math.round(S.x),C],[Math.round(v.x),C]])}C+=u,y.forEach((k=>{k.edge.x=k.edge.x+u*k.edge.islope})),x++}return f})(a,s,i);if(o){for(const c of a)mn(c,n,-o);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),mn(d,h,u)})(l,n,-o)}return l}function as(e,t){var r;const i=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=o),gB(e,o,i,s||1)}class Lh{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=as(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const o of t)i.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],r));return i}}function La(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 mB extends Lh{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const o=as(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of o)La([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class yB extends Lh{fillPolygons(t,r){const i=this._fillPolygons(t,r),o=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,o);return i.ops=i.ops.concat(s.ops),i}}class CB{constructor(t){this.helper=t}fillPolygons(t,r){const i=as(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let o=r.hachureGap;o<0&&(o=4*r.strokeWidth),o=Math.max(o,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=o/4;for(const n of t){const l=La(n),c=l/o,h=Math.ceil(c)-1,u=l-h*o,d=(n[0][0]+n[1][0])/2-o/4,f=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=f+u+m*o,C=d-a+2*Math.random()*a,x=y-a+2*Math.random()*a,k=this.helper.ellipse(C,x,s,s,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class xB{constructor(t){this.helper=t}fillPolygons(t,r){const i=as(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,o=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const n=La(a),l=Math.floor(n/(i+o)),c=(n+o-l*(i+o))/2;let h=a[0],u=a[1];h[0]>u[0]&&(h=a[1],u=a[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const m=f*(i+o),y=m+i,C=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)],x=[h[0]+y*Math.cos(d)+c*Math.cos(d),h[1]+y*Math.sin(d)+c*Math.sin(d)];s.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),s}}class bB{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,o=r.zigzagOffset<0?i:r.zigzagOffset,s=as(t,r=Object.assign({},r,{hachureGap:i+o}));return{type:"fillSketch",ops:this.zigzagLines(s,o,r)}}zigzagLines(t,r,i){const o=[];return t.forEach((s=>{const a=La(s),n=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const d=2*u*r,f=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),o}}const ve={};class kB{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const wB=0,yn=1,rd=2,ks={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 Cn(e,t){return e.type===t}function Fh(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:wB,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:yn,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:rd,text:""},n})(e);let i="BOD",o=0,s=r[o];for(;!Cn(s,rd);){let a=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Fh("M0,0"+e);o++,a=ks[s.text],i=s.text}else Cn(s,yn)?a=ks[i]:(o++,a=ks[s.text],i=s.text);if(!(o+a<r.length))throw new Error("Path data ended short");for(let l=o;l<o+a;l++){const c=r[l];if(!Cn(c,yn))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof ks[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),o+=a,s=r[o],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Og(e){let t=0,r=0,i=0,o=0;const s=[];for(const{key:a,data:n}of e)switch(a){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,o]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,o=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=o}return s}function Dg(e){const t=[];let r="",i=0,o=0,s=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,o]=h,[s,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],o=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,o]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,o]});break;case"V":o=h[0],t.push({key:"L",data:[i,o]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=o+(o-l)):(u=i,d=o),t.push({key:"C",data:[u,d,...h]}),n=h[0],l=h[1],i=h[2],o=h[3];break}case"T":{const[u,d]=h;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-n),m=o+(o-l)):(f=i,m=o);const y=i+2*(f-i)/3,C=o+2*(m-o)/3,x=u+2*(f-u)/3,k=d+2*(m-d)/3;t.push({key:"C",data:[y,C,x,k,u,d]}),n=f,l=m,i=u,o=d;break}case"Q":{const[u,d,f,m]=h,y=i+2*(u-i)/3,C=o+2*(d-o)/3,x=f+2*(u-f)/3,k=m+2*(d-m)/3;t.push({key:"C",data:[y,C,x,k,f,m]}),n=u,l=d,i=f,o=m;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],m=h[3],y=h[4],C=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,o,C,x,C,x]}),i=C,o=x):(i!==C||o!==x)&&(Ig(i,o,C,x,u,d,f,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=C,o=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,o=a}r=c}return t}function xo(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Ig(e,t,r,i,o,s,a,n,l,c){const h=(u=a,Math.PI*u/180);var u;let d=[],f=0,m=0,y=0,C=0;if(c)[f,m,y,C]=c;else{[e,t]=xo(e,t,-h),[r,i]=xo(r,i,-h);const U=(e-r)/2,O=(t-i)/2;let D=U*U/(o*o)+O*O/(s*s);D>1&&(D=Math.sqrt(D),o*=D,s*=D);const B=o*o,q=s*s,R=B*q-B*O*O-q*U*U,at=B*O*O+q*U*U,J=(n===l?-1:1)*Math.sqrt(Math.abs(R/at));y=J*o*O/s+(e+r)/2,C=J*-s*U/o+(t+i)/2,f=Math.asin(parseFloat(((t-C)/s).toFixed(9))),m=Math.asin(parseFloat(((i-C)/s).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),l&&f>m&&(f-=2*Math.PI),!l&&m>f&&(m-=2*Math.PI)}let x=m-f;if(Math.abs(x)>120*Math.PI/180){const U=m,O=r,D=i;m=l&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Ig(r=y+o*Math.cos(m),i=C+s*Math.sin(m),O,D,o,s,a,0,l,[m,U,y,C])}x=m-f;const k=Math.cos(f),T=Math.sin(f),S=Math.cos(m),v=Math.sin(m),A=Math.tan(x/4),L=4/3*o*A,E=4/3*s*A,Z=[e,t],Y=[e+L*T,t-E*k],P=[r+L*v,i-E*S],st=[r,i];if(Y[0]=2*Z[0]-Y[0],Y[1]=2*Z[1]-Y[1],c)return[Y,P,st].concat(d);{d=[Y,P,st].concat(d);const U=[];for(let O=0;O<d.length;O+=3){const D=xo(d[O][0],d[O][1],h),B=xo(d[O+1][0],d[O+1][1],h),q=xo(d[O+2][0],d[O+2][1],h);U.push([D[0],D[1],B[0],B[1],q[0],q[1]])}return U}}const TB={randOffset:function(e,t){return _t(e,t)},randOffsetWithRange:function(e,t,r){return sa(e,t,r)},ellipse:function(e,t,r,i,o){const s=Rg(r,i,o);return Tl(e,t,o,s).opset},doubleLineOps:function(e,t,r,i,o){return Hr(e,t,r,i,o,!0)}};function Pg(e,t,r,i,o){return{type:"path",ops:Hr(e,t,r,i,o)}}function Os(e,t,r){const i=(e||[]).length;if(i>2){const o=[];for(let s=0;s<i-1;s++)o.push(...Hr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&o.push(...Hr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:o}}return i===2?Pg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function _B(e,t,r,i,o){return(function(s,a){return Os(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],o)}function id(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ws(r[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:ws(r[0],1.5*(1+.22*t.roughness),ad(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const n=ws(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ws(a,1.5*(1+.22*t.roughness),ad(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&o.push(c)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Rg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/o;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=_t(a*l,r),n+=_t(n*l,r),{increment:s,rx:a,ry:n}}function Tl(e,t,r,i){const[o,s]=nd(i.increment,e,t,i.rx,i.ry,1,i.increment*sa(.1,sa(.4,1,r),r),r);let a=aa(o,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=nd(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=aa(n,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function od(e,t,r,i,o,s,a,n,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=_t(.01*u,l),d+=_t(.01*d,l);let f=o,m=s;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,C=Math.min(y/2,(m-f)/2),x=ld(C,c,h,u,d,f,m,1,l);if(!l.disableMultiStroke){const k=ld(C,c,h,u,d,f,m,1.5,l);x.push(...k)}return a&&(n?x.push(...Hr(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Hr(c,h,c+u*Math.cos(m),h+d*Math.sin(m),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function sd(e,t){const r=Dg(Og(Fh(e))),i=[];let o=[0,0],s=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":s=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...Hr(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,u,d,f]=n;i.push(...SB(l,c,h,u,d,f,s,t)),s=[d,f];break}case"Z":i.push(...Hr(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]]}return{type:"path",ops:i}}function xn(e,t){const r=[];for(const i of e)if(i.length){const o=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+_t(o,t),i[0][1]+_t(o,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+_t(o,t),i[a][1]+_t(o,t)]})}}return{type:"fillPath",ops:r}}function ki(e,t){return(function(r,i){let o=r.fillStyle||"hachure";if(!ve[o])switch(o){case"zigzag":ve[o]||(ve[o]=new mB(i));break;case"cross-hatch":ve[o]||(ve[o]=new yB(i));break;case"dots":ve[o]||(ve[o]=new CB(i));break;case"dashed":ve[o]||(ve[o]=new xB(i));break;case"zigzag-line":ve[o]||(ve[o]=new bB(i));break;default:o="hachure",ve[o]||(ve[o]=new Lh(i))}return ve[o]})(t,TB).fillPolygons(e,t)}function ad(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ng(e){return e.randomizer||(e.randomizer=new kB(e.seed||0)),e.randomizer.next()}function sa(e,t,r,i=1){return r.roughness*i*(Ng(r)*(t-e)+e)}function _t(e,t,r=1){return sa(-e,e,t,r)}function Hr(e,t,r,i,o,s=!1){const a=s?o.disableMultiStrokeFill:o.disableMultiStroke,n=_l(e,t,r,i,o,!0,!1);if(a)return n;const l=_l(e,t,r,i,o,!0,!0);return n.concat(l)}function _l(e,t,r,i,o,s,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=o.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,d=.2+.2*Ng(o);let f=o.bowing*o.maxRandomnessOffset*(i-t)/200,m=o.bowing*o.maxRandomnessOffset*(e-r)/200;f=_t(f,o,c),m=_t(m,o,c);const y=[],C=()=>_t(u,o,c),x=()=>_t(h,o,c),k=o.preserveVertices;return a?y.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):y.push({op:"move",data:[e+(k?0:_t(h,o,c)),t+(k?0:_t(h,o,c))]}),a?y.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),m+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),m+t+2*(i-t)*d+C(),r+(k?0:C()),i+(k?0:C())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),m+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),m+t+2*(i-t)*d+x(),r+(k?0:x()),i+(k?0:x())]}),y}function ws(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+_t(t,r),e[0][1]+_t(t,r)]),i.push([e[0][0]+_t(t,r),e[0][1]+_t(t,r)]);for(let o=1;o<e.length;o++)i.push([e[o][0]+_t(t,r),e[o][1]+_t(t,r)]),o===e.length-1&&i.push([e[o][0]+_t(t,r),e[o][1]+_t(t,r)]);return aa(i,null,r)}function aa(e,t,r){const i=e.length,o=[];if(i>3){const s=[],a=1-r.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],s[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],o.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&o.push(..._l(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return o}function nd(e,t,r,i,o,s,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+o*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+o*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+o*Math.sin(0)]),c.push([t+i*Math.cos(e),r+o*Math.sin(e)])}else{const h=_t(.5,n)-Math.PI/2;c.push([_t(s,n)+t+.9*i*Math.cos(h-e),_t(s,n)+r+.9*o*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[_t(s,n)+t+i*Math.cos(d),_t(s,n)+r+o*Math.sin(d)];l.push(f),c.push(f)}c.push([_t(s,n)+t+i*Math.cos(h+2*Math.PI+.5*a),_t(s,n)+r+o*Math.sin(h+2*Math.PI+.5*a)]),c.push([_t(s,n)+t+.98*i*Math.cos(h+a),_t(s,n)+r+.98*o*Math.sin(h+a)]),c.push([_t(s,n)+t+.9*i*Math.cos(h+.5*a),_t(s,n)+r+.9*o*Math.sin(h+.5*a)])}return[c,l]}function ld(e,t,r,i,o,s,a,n,l){const c=s+_t(.1,l),h=[];h.push([_t(n,l)+t+.9*i*Math.cos(c-e),_t(n,l)+r+.9*o*Math.sin(c-e)]);for(let u=c;u<=a;u+=e)h.push([_t(n,l)+t+i*Math.cos(u),_t(n,l)+r+o*Math.sin(u)]);return h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),h.push([t+i*Math.cos(a),r+o*Math.sin(a)]),aa(h,null,l)}function SB(e,t,r,i,o,s,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(d?0:_t(c[0],n)),a[1]+(d?0:_t(c[0],n))]}),h=d?[o,s]:[o+_t(c[f],n),s+_t(c[f],n)],l.push({op:"bcurveTo",data:[e+_t(c[f],n),t+_t(c[f],n),r+_t(c[f],n),i+_t(c[f],n),h[0],h[1]]});return l}function bo(e){return[...e]}function hd(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(bo(e[0]),bo(e[1]),bo(e[2]),bo(e[2]));else{const o=[];o.push(e[0],e[0]);for(let n=1;n<e.length;n++)o.push(e[n]),n===e.length-1&&o.push(e[n]);const s=[],a=1-t;i.push(bo(o[0]));for(let n=1;n+2<o.length;n++){const l=o[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*o[n+1][0]-a*o[n-1][0])/6,l[1]+(a*o[n+1][1]-a*o[n-1][1])/6],s[2]=[o[n+1][0]+(a*o[n][0]-a*o[n+2][0])/6,o[n+1][1]+(a*o[n][1]-a*o[n+2][1])/6],s[3]=[o[n+1][0],o[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function Ds(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function vB(e,t,r){const i=Ds(t,r);if(i===0)return Ds(e,t);let o=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return o=Math.max(0,Math.min(1,o)),Ds(e,Kr(t,r,o))}function Kr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Sl(e,t,r,i){const o=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],d=n[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let m=3*h[1]-2*c[1]-d[1];m*=m;let y=3*u[0]-2*d[0]-c[0];y*=y;let C=3*u[1]-2*d[1]-c[1];return C*=C,f<y&&(f=y),m<C&&(m=C),f+m})(e,t)<r){const n=e[t+0];o.length?(s=o[o.length-1],a=n,Math.sqrt(Ds(s,a))>1&&o.push(n)):o.push(n),o.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=Kr(l,c,.5),f=Kr(c,h,.5),m=Kr(h,u,.5),y=Kr(d,f,.5),C=Kr(f,m,.5),x=Kr(y,C,.5);Sl([l,d,y,x],0,r,o),Sl([x,C,m,u],0,r,o)}var s,a;return o}function BB(e,t){return na(e,0,e.length,t)}function na(e,t,r,i,o){const s=o||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=vB(e[h],a,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(na(e,t,c+1,i,s),na(e,c,r,i,s)):(s.length||s.push(a),s.push(n)),s}function bn(e,t=.15,r){const i=[],o=(e.length-1)/3;for(let s=0;s<o;s++)Sl(e,3*s,t,i);return r&&r>0?na(i,0,i.length,r):i}const Ae="none";class la{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,o,s){const a=this._o(s);return this._d("line",[Pg(t,r,i,o,a)],a)}rectangle(t,r,i,o,s){const a=this._o(s),n=[],l=_B(t,r,i,o,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+o],[t,r+o]];a.fillStyle==="solid"?n.push(xn([c],a)):n.push(ki([c],a))}return a.stroke!==Ae&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,o,s){const a=this._o(s),n=[],l=Rg(i,o,a),c=Tl(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Tl(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(ki([c.estimatedPoints],a));return a.stroke!==Ae&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,o){const s=this.ellipse(t,r,i,i,o);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Os(t,!1,i)],i)}arc(t,r,i,o,s,a,n=!1,l){const c=this._o(l),h=[],u=od(t,r,i,o,s,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=od(t,r,i,o,s,a,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,m,y,C,x,k){const T=d,S=f;let v=Math.abs(m/2),A=Math.abs(y/2);v+=_t(.01*v,k),A+=_t(.01*A,k);let L=C,E=x;for(;L<0;)L+=2*Math.PI,E+=2*Math.PI;E-L>2*Math.PI&&(L=0,E=2*Math.PI);const Z=(E-L)/k.curveStepCount,Y=[];for(let P=L;P<=E;P+=Z)Y.push([T+v*Math.cos(P),S+A*Math.sin(P)]);return Y.push([T+v*Math.cos(E),S+A*Math.sin(E)]),Y.push([T,S]),ki([Y],k)})(t,r,i,o,s,a,c));return c.stroke!==Ae&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),o=[],s=id(t,i);if(i.fill&&i.fill!==Ae)if(i.fillStyle==="solid"){const a=id(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...bn(hd([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...bn(hd(c),10,(1+i.roughness)/2))}a.length&&o.push(ki([a],i))}return i.stroke!==Ae&&o.push(s),this._d("curve",o,i)}polygon(t,r){const i=this._o(r),o=[],s=Os(t,!0,i);return i.fill&&(i.fillStyle==="solid"?o.push(xn([t],i)):o.push(ki([t],i))),i.stroke!==Ae&&o.push(s),this._d("polygon",o,i)}path(t,r){const i=this._o(r),o=[];if(!t)return this._d("path",o,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ae,a=i.stroke!==Ae,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=Dg(Og(Fh(h))),m=[];let y=[],C=[0,0],x=[];const k=()=>{x.length>=4&&y.push(...bn(x,u)),x=[]},T=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:v,data:A}of f)switch(v){case"M":T(),C=[A[0],A[1]],y.push(C);break;case"L":k(),y.push([A[0],A[1]]);break;case"C":if(!x.length){const L=y.length?y[y.length-1]:C;x.push([L[0],L[1]])}x.push([A[0],A[1]]),x.push([A[2],A[3]]),x.push([A[4],A[5]]);break;case"Z":k(),y.push([C[0],C[1]])}if(T(),!d)return m;const S=[];for(const v of m){const A=BB(v,d);A.length&&S.push(A)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=sd(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=sd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else o.push(xn(l,i));else o.push(ki(l,i));return a&&(n?l.forEach((h=>{o.push(Os(h,!1,i))})):o.push(c)),this._d("path",o,i)}opsToPath(t,r){let i="";for(const o of t.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,o=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ae};break;case"fillPath":a={d:this.opsToPath(s),stroke:Ae,strokeWidth:0,fill:i.fill||Ae};break;case"fillSketch":a=this.fillSketch(s,i)}a&&o.push(a)}return o}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ae,strokeWidth:i,fill:Ae}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class LB{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new la(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":o.save(),o.strokeStyle=i.stroke==="none"?"transparent":i.stroke,o.lineWidth=i.strokeWidth,i.strokeLineDash&&o.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(o.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(o,a,s),o.restore();break;case"fillPath":{o.save(),o.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,s,n),o.restore();break}case"fillSketch":this.fillSketch(o,a,i)}}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=o,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,o="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a),a}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a),a}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a),a}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Ts="http://www.w3.org/2000/svg";class FB{constructor(t,r){this.svg=t,this.gen=new la(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,s=o.createElementNS(Ts,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=o.createElementNS(Ts,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=o.createElementNS(Ts,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(o,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let o=i.fillWeight;o<0&&(o=i.strokeWidth/2);const s=t.createElementNS(Ts,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",o+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,o,s){const a=this.gen.line(t,r,i,o,s);return this.draw(a)}rectangle(t,r,i,o,s){const a=this.gen.rectangle(t,r,i,o,s);return this.draw(a)}ellipse(t,r,i,o,s){const a=this.gen.ellipse(t,r,i,o,s);return this.draw(a)}circle(t,r,i,o){const s=this.gen.circle(t,r,i,o);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,o,s,a,n=!1,l){const c=this.gen.arc(t,r,i,o,s,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var ut={canvas:(e,t)=>new LB(e,t),svg:(e,t)=>new FB(e,t),generator:e=>new la(e),newSeed:()=>la.newSeed()},EB=1,AB=3;async function Eh(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Ah(e);await Promise.all([...t].map(i=>new Promise(o=>{function s(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=It().fontSize?It().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=zf.fontSize]=Ta(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";o(i)}p(s,"setupImage"),setTimeout(()=>{i.complete&&s()}),i.addEventListener("error",s),i.addEventListener("load",s)})))}p(Eh,"configureLabelImages");function Ah(e){return e.nodeType===AB?e.textContent?.trim()!=="":e.nodeType!==EB||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Ah)}p(Ah,"hasTextBesidesImages");var cd=3,MB=32,$B=p(async(e,t,r)=>{const i=It(),o=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",ie(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),l=t.width?Math.max(t.width-2*(t.padding??0),MB):It().flowchart?.wrappingWidth??200,h=i.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async x=>{const k=s.append("g").attr("class",x.cssClass),T=await Xe(k,Re(Wr(x.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return At(T).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),At(T).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:k,box:k.node().getBBox()}})),d=Math.max(...u.map(({box:x})=>x.width),0);let f=0;for(const{el:x,box:k}of u)x.attr("transform",`translate(${d/2-k.x-k.width/2}, ${f-k.y})`),f+=k.height+cd;const m=u.length>0?f-cd:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-d/2}, ${-m/2})`);const y=s.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:o,bbox:y,halfPadding:C,label:s}},"c4LabelHelper"),Ct=p(async(e,t,r)=>{if(t.stereotype!==void 0)return $B(e,t,r);let i;const o=t.useHtmlLabels||nr(It()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",ie(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Xe(a,Re(Wr(n),It()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||It().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},It()),u=(t?.padding??0)/2;let d;if(o){const f=h.children[0],m=At(h);await Eh(f),d=await li.measure(()=>f.getBoundingClientRect()),m.attr("width",d.width),m.attr("height",d.height)}else d=await li.measure(()=>h.getBBox());return o?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:u,label:a}},"labelHelper"),kn=p(async(e,t,r)=>{const i=r.useHtmlLabels??Ce(It()),o=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Xe(o,Re(Wr(t),It()),{useHtmlLabels:i,width:r.width||It()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(Ce(It())){const l=s.children[0],c=At(s);n=await li.measure(()=>l.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await li.measure(()=>s.getBBox());return i?o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):o.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:o}},"insertLabel"),ft=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),xt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Rt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Rt,"createPathFromPoints");function Yr(e,t,r,i,o,s){const a=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*l,C=d+o*Math.sin(u*(y-e));a.push({x:y,y:C})}return a}p(Yr,"generateFullSineWavePoints");function rr(e,t,r,i,o,s){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(rr,"generateCirclePoints");function vl(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const o=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=p((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(o){const l={fill:a(o,"fill"),"fill-opacity":a(o,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(vl,"mergePaths");var OB=p((e,t)=>{var r=e.x,i=e.y,o=t.x-r,s=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(s)*a>Math.abs(o)*n?(s<0&&(n=-n),l=s===0?0:n*o/s,c=n):(o<0&&(a=-a),l=a,c=o===0?0:a*s/o),{x:r+l,y:i+c}},"intersectRect"),fi=OB,qe=p((e,t,r,i,o)=>["M",e+o,t,"H",e+r-o,"A",o,o,0,0,1,e+r,t+o,"V",t+i-o,"A",o,o,0,0,1,e+r-o,t+i,"H",e+o,"A",o,o,0,0,1,e,t+i-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),DB=p(async(e,t,r,i=!1,o=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=It(),n=Ce(a);return await Xe(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Rr=DB;function qg(e,t){return e.intersect(t)}p(qg,"intersectNode");var IB=qg;function zg(e,t,r,i){var o=e.x,s=e.y,a=o-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<o&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:o+c,y:s+h}}p(zg,"intersectEllipse");var Wg=zg;function Hg(e,t,r){return Wg(e,t,t,r)}p(Hg,"intersectCircle");var PB=Hg;function Yg(e,t,r,i){{const o=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,n=o*r.x+s*r.y+a,l=o*i.x+s*i.y+a,c=1e-6;if(n!==0&&l!==0&&Bl(n,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,m=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(m)<c&&Bl(f,m))return;const y=o*u-h*s;if(y===0)return;const C=Math.abs(y/2);let x=s*d-u*a;const k=x<0?(x-C)/y:(x+C)/y;x=h*a-o*d;const T=x<0?(x-C)/y:(x+C)/y;return{x:k,y:T}}}p(Yg,"intersectLine");function Bl(e,t){return e*t>0}p(Bl,"sameSign");var RB=Yg;function Ug(e,t,r){let i=e.x,o=e.y,s=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=o-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=RB(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&s.push(f)}return s.length?(s.length>1&&s.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,m=Math.sqrt(d*d+f*f),y=u.x-r.x,C=u.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),s[0]):e}p(Ug,"intersectPolygon");var NB=Ug,lt={node:IB,circle:PB,ellipse:Wg,polygon:NB,rect:fi};function jg(e,t){const{labelStyles:r}=pt(t);t.labelStyle=r;const i=xt(t);let o=i;i||(o="anchor");const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=ut.svg(s),c=ct(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",ie(n)),ft(t,u),t.intersect=function(d){return N.info("Circle intersect",t,a,d),lt.circle(t,a,d)},s}p(jg,"anchor");function Ll(e,t,r,i,o,s,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/o,m=d/s,y=Math.sqrt(f**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=l+C*s*Math.sin(h)*(a?-1:1),k=c-C*o*Math.cos(h)*(a?-1:1),T=Math.atan2((t-k)/s,(e-x)/o);let v=Math.atan2((i-k)/s,(r-x)/o)-T;a&&v<0&&(v+=2*Math.PI),!a&&v>0&&(v-=2*Math.PI);const A=[];for(let L=0;L<20;L++){const E=L/19,Z=T+E*v,Y=x+o*Math.cos(Z),P=k+s*Math.sin(Z);A.push({x:Y,y:P})}return A}p(Ll,"generateArcPoints");function Gg(e,t,r){const[i,o]=[t,r].sort((s,a)=>a-s);return o*(1-Math.sqrt(1-(e/i/2)**2))}p(Gg,"calculateArcSagitta");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=p(Z=>Z+a,"calcTotalHeight"),l=p(Z=>{const Y=Z/2;return[Y/(2.5+Z/50),Y]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await Ct(e,t,xt(t)),u=n(t?.height?t?.height:h.height),[d,f]=l(u),m=Gg(u,d,f),C=(t?.width?t?.width:h.width)+s*2+m-m,x=u,{cssStyles:k}=t,T=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...Ll(-C/2,-x/2,-C/2,x/2,d,f,!1),{x:C/2,y:x/2},...Ll(C/2,x/2,C/2,-x/2,d,f,!0)],S=ut.svg(c),v=ct(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const A=Rt(T),L=S.path(A,v),E=c.insert(()=>L,":first-child");return E.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${d/2}, 0)`),ft(t,E),t.intersect=function(Z){return lt.polygon(t,T,Z)},c}p(Xg,"bowTieRect");async function Vg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await Ct(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),d=Math.max(a.height+c*2+u,t.height??0),f=-d/2+u,m=d/2,y=h*.72,C=[`M${-h/2},${f}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${h/2},${f}`,`A${h/2},${u} 0 0 0 ${-h/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,k=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const E=ut.svg(s).path(C,ct(t,{}));k.node()?.appendChild(E),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",o);k.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),ft(t,k);const T=f+(m-f)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${T-a.height/2-(a.y-(a.top??0))})`);const S=12,v=p((L,E,Z)=>Array.from({length:S+1},(Y,P)=>{const st=Math.PI-P*Math.PI/S;return{x:L*Math.cos(st),y:E+Z*u*Math.sin(st)}}),"arc"),A=[...v(h/2,f,-1),...v(y/2,m,1).reverse()];return t.intersect=function(L){return lt.polygon(t,A,L)},s}p(Vg,"bucket");var ud=20,dd=8,qB=80,wn=8;async function Zg(e,t){const{themeVariables:r}=It(),i=r.clusterBkg,o=r.clusterBorder,{nodeStyles:s}=pt(t),{shapeSvg:a,bbox:n}=await Ct(e,t,xt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,qB,t?.width??0),u=Math.max(c+dd+ud+l*2,t?.height??0),d=-h/2,f=-u/2,m=-28/2,y=a.select(".label");y&&(t.useHtmlLabels??Ce(It())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let C;if(t.look==="handDrawn"){const v=ut.svg(a),A=ct(t,{fill:i,stroke:o,fillStyle:"solid"}),L=v.path(qe(d,f,h,u,wn),A);C=a.insert(()=>L,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",ie(t.cssStyles))}else C=a.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",s).attr("rx",wn).attr("ry",wn).attr("x",d).attr("y",f).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",o);const x=f+l+c+dd;a.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",x).attr("x2",d+h-8).attr("y2",x).attr("stroke",o).attr("stroke-dasharray","3, 3");const k=x+ud/2,T=2.5,S=10;for(let v=-1;v<=1;v++)a.append("circle").attr("class","collapsed-indicator").attr("cx",v*S).attr("cy",k).attr("r",T).attr("fill",o);return ft(t,C),t.calcIntersect=function(v,A){return lt.rect(v,A)},t.intersect=function(v){return lt.rect(t,v)},a}p(Zg,"collapsedGroup");function hr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(hr,"insertPolygonShape");var zB=["right","left","up","down"],Mh="point",WB=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),HB=p(e=>zB.filter(t=>e.has(t)).join("|")||Mh,"getDirectionKey"),fd={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[Mh]:()=>[{x:0,y:0}]},YB=p((e,t,r,i)=>{const o=WB(e),s=(r.padding??0)/2,a=t.height+4*s,n=a/2,l=i??t.width+2*n+2*s,c=HB(o);return(fd[c]??fd[Mh])({height:a,midpoint:n,padding:s,width:l})},"getArrowPoints");async function Kg(e,t){const r=t,{shapeSvg:i,bbox:o}=await Ct(e,r,xt(r)),s=r.padding??0,a=o.height+2*s,n=a/2,l=o.width+2*n+s,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,d=YB(r.directions??[],o,r,u),f=hr(i,u,a,d);return f.attr("style",r.style??null),ft(r,f),r.intersect=function(m){return lt.polygon(r,d,m)},i}p(Kg,"block_arrow");async function Qg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await Ct(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=18,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=ut.svg(s).path(qe(-d/2,m,d,f,u),ct(t,{}));C.node()?.appendChild(T),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",o);C.append("line").attr("x1",-d/2).attr("y1",m+h).attr("x2",d/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)C.append("circle").attr("cx",-d/2+12+k*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",m+4).attr("width",Math.max(d-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),ft(t,C);const x=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return lt.rect(t,k)},s}p(Qg,"browser");var _s=12;async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?28:o,a=t.look==="neo"?24:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.width??l.width)+(t.look==="neo"?s*2:s+_s),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),u=0,d=c,f=-h,m=0,y=[{x:u+_s,y:f},{x:d,y:f},{x:d,y:m},{x:u,y:m},{x:u,y:f+_s},{x:u+_s,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=ut.svg(n),T=ct(t,{}),S=Rt(y),v=k.path(S,T);C=n.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=hr(n,c,h,y);return i&&C.attr("style",i),ft(t,C),t.intersect=function(k){return lt.polygon(t,y,k)},n}p(Jg,"card");function tm(e,t){const{nodeStyles:r}=pt(t);t.label="";const i=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=ut.svg(i),l=ct(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Rt(a),h=n.path(c,l),u=i.insert(()=>h,":first-child");return o&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",o),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return lt.polygon(t,a,d)},i}p(tm,"choice");async function $h(e,t,r){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:n}=await Ct(e,t,xt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=ut.svg(s),m=ct(t,{}),y=f.circle(0,0,h*2,m);u=s.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",ie(d))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return ft(t,u),t.calcIntersect=function(f,m){const y=f.width/2;return lt.circle(f,y,m)},t.intersect=function(f){return N.info("Circle intersect",t,h,f),lt.circle(t,h,f)},s}p($h,"circle");async function em(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:s,halfPadding:a}=await Ct(e,r,i),n=o.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:s.width+l,h=r.positioned?r.height??0:s.height+l,u=r.positioned?-c/2:-s.width/2-a,d=r.positioned?-h/2:-s.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",c).attr("height",h),ft(r,n),r.intersect=function(f){return lt.rect(r,f)},o}p(em,"composite");async function rm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:n}=await Ct(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=20,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,C=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=ut.svg(s).path(qe(-d/2,m,d,f,u),ct(t,{}));C.node()?.appendChild(T),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",o);C.append("text").attr("x",-d/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),ft(t,C);const x=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return lt.rect(t,k)},s}p(rm,"consoleWindow");function im(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,o={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
201
+ M ${o.x},${o.y} L ${a.x},${a.y}`}p(im,"createLine");function om(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r,t.label="";const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:a}=t,n=ut.svg(o),l=ct(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=im(s),u=n.path(h,l),d=o.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),ft(t,d),t.intersect=function(f){return N.info("crossedCircle intersect",t,{radius:s,point:f}),lt.circle(t,s,f)},o}p(om,"crossedCircle");function yr(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(yr,"generateCirclePoints");async function sm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+n,h=s.height+l,u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...yr(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...yr(c/2+u*2,-u,u,20,-180,-270),...yr(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...yr(c/2,h/2,u,20,0,90)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...yr(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...yr(c/2+c*.1,-u,u,20,-180,-270),...yr(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...yr(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=ut.svg(o),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Rt(f).replace("Z",""),T=y.path(k,C),S=Rt(m),v=y.path(S,{...C}),A=o.insert("g",":first-child");return A.insert(()=>v,":first-child").attr("stroke-opacity",0),A.insert(()=>T,":first-child"),A.attr("class","text"),d&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-c/2+u-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ft(t,A),t.intersect=function(L){return lt.polygon(t,m,L)},o}p(sm,"curlyBraceLeft");function Cr(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:f,y:m})}return a}p(Cr,"generateCirclePoints");async function am(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...Cr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...Cr(c/2+u*2,-u,u,20,-180,-270),...Cr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...Cr(c/2,h/2,u,20,0,90)],m=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...Cr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...Cr(c/2+u*2,-u,u,20,-180,-270),...Cr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...Cr(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=ut.svg(o),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Rt(f).replace("Z",""),T=y.path(k,C),S=Rt(m),v=y.path(S,{...C}),A=o.insert("g",":first-child");return A.insert(()=>v,":first-child").attr("stroke-opacity",0),A.insert(()=>T,":first-child"),A.attr("class","text"),d&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ft(t,A),t.intersect=function(L){return lt.polygon(t,m,L)},o}p(am,"curlyBraceRight");function de(e,t,r,i=100,o=0,s=180){const a=[],n=o*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}p(de,"generateCirclePoints");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?n*2:n),h=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...de(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...de(c/2+u*2,-u,u,20,-180,-270),...de(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...de(c/2,h/2,u,20,0,90)],m=[...de(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...de(-c/2-u/2,-u,u,20,0,90),...de(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...de(-c/2+u+u/2,h/2,u,30,-180,-270)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...de(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...de(c/2+u*2,-u,u,20,-180,-270),...de(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...de(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...de(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...de(-c/2-u/2,-u,u,20,0,90),...de(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...de(-c/2+u+u/2,h/2,u,30,-180,-270)],C=ut.svg(o),x=ct(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=Rt(f).replace("Z",""),S=C.path(T,x),A=Rt(m).replace("Z",""),L=C.path(A,x),E=Rt(y),Z=C.path(E,{...x}),Y=o.insert("g",":first-child");return Y.insert(()=>Z,":first-child").attr("stroke-opacity",0),Y.insert(()=>S,":first-child"),Y.insert(()=>L,":first-child"),Y.attr("class","text"),d&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-h/2+(t.padding??0)/2-(s.y-(s.top??0))})`),ft(t,Y),t.intersect=function(P){return lt.polygon(t,y,P)},o}p(nm,"curlyBraces");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=20,l=5,{shapeSvg:c,bbox:h}=await Ct(e,t,xt(t)),u=Math.max(n,(h.width+s*2)*1.25,t?.width??0),d=Math.max(l,h.height+a*2,t?.height??0),f=d/2,{cssStyles:m}=t,y=ut.svg(c),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=u,k=d,T=x-f,S=k/4,v=[{x:T,y:0},{x:S,y:0},{x:0,y:k/2},{x:S,y:k},{x:T,y:k},...rr(-T,-k/2,f,50,270,90)],A=Rt(v),L=y.path(A,C),E=c.insert(()=>L,":first-child");return E.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),E.attr("transform",`translate(${-u/2}, ${-d/2})`),ft(t,E),t.intersect=function(Z){return lt.polygon(t,v,Z)},c}p(lm,"curvedTrapezoid");async function hm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.padding??20,l=Math.max(s.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(s.height+n*2,t.height?t.height-(2*c-h):0),d=Math.min(l*.177,u*.45),f=u+2*c-h,m=-f/2,y=m+2*c-h,C=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const E=ut.svg(o),Z=ct(t,{}),Y=E.path(qe(-l/2,y,l,u,d),Z),P=E.circle(0,m+c,c*2,Z);C.insert(()=>P,":first-child"),C.insert(()=>Y,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);ft(t,C);const k=y+u/2;a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${k-s.height/2-(s.y-(s.top??0))})`);const T=m+c,S=Math.asin(Math.min(1,(y-T)/c))*180/Math.PI,L=[...rr(0,-T,c,24,180+S,-S),...rr(-(-l/2+d),-(y+d),d,12,90,0),...rr(-(-l/2+d),-(f/2-d),d,12,360,270),...rr(-(l/2-d),-(f/2-d),d,12,270,180),...rr(-(l/2-d),-(y+d),d,12,180,90)];return t.intersect=function(E){return lt.polygon(t,L,E)},o}p(hm,"person");var UB=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),jB=p((e,t,r,i,o,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),GB=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),pd=8,gd=8;async function cm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?24:o,a=t.look==="neo"?24:o,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<gd&&(t.width=gd)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-s-k*3,t.height<pd&&(t.height=pd)}const{shapeSvg:l,bbox:c,label:h}=await Ct(e,t,xt(t)),u=Math.max(t.width??0,c.width)+a,d=u/2,f=d/(2.5+u/50),m=Math.max(t.height??0,c.height)+s+f;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=ut.svg(l),k=jB(0,0,u,m,d,f),T=GB(0,f,u,m,d,f),S=ct(t,{}),v=x.path(k,S),A=x.path(T,ct(t,{fill:"none"}));y=l.insert(()=>A,":first-child"),y=l.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=UB(0,0,u,m,d,f);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ie(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-u/2}, ${-(m/2+f)})`),ft(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=lt.rect(t,x),T=k.x-(t.x??0);if(d!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let S=f*f*(1-T*T/(d*d));S>0&&(S=Math.sqrt(S)),S=f-S,x.y-(t.y??0)>0&&(S=-S),k.y+=S}return k},l}p(cm,"cylinder");async function io(e,t,r){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await Ct(e,t,xt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const y=ut.svg(s),C=ct(t,{}),x=d||f?y.path(qe(c,h,n,l,d||0),C):y.rectangle(c,h,n,l,C);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",ie(m))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",o).attr("rx",ie(d)).attr("ry",ie(f)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return ft(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,C){return lt.rect(y,C)},t.intersect=function(y){return lt.rect(t,y)},s}p(io,"drawRect");async function um(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:s,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:o??s??0},c=await io(e,t,l);if(t.look==="handDrawn"){const f=ut.svg(c),m=ct(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||a)??0,d=(Number(h.attr("height"))||n)??0;return u>0&&d>0&&h.attr("stroke-dasharray",`${u} ${d}`),c}p(um,"datastore");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=n.width+o,h=n.height+s,u=h*.2,d=-c/2,f=-h/2-u/2,{cssStyles:m}=t,y=ut.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],k=y.polygon(x.map(S=>[S.x,S.y]),C),T=a.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+u+(t.padding??0)/2-(n.y-(n.top??0))})`),ft(t,T),t.intersect=function(S){return lt.rect(t,S)},a}p(dm,"dividedRectangle");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),o=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-o;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=ut.svg(n),m=ct(t,{roughness:.2,strokeWidth:2.5}),y=ct(t,{roughness:.2,strokeWidth:1.5}),C=f.circle(0,0,c*2,m),x=f.circle(0,0,h*2,y);u=n.insert("g",":first-child"),u.attr("class",ie(t.cssClasses)).attr("style",ie(d)),u.node()?.appendChild(C),u.node()?.appendChild(x)}else{u=n.insert("g",":first-child");const f=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return ft(t,u),t.intersect=function(f){return N.info("DoubleCircle intersect",t,c,f),lt.circle(t,c,f)},n}p(fm,"doublecircle");function pm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=ut.svg(s),{nodeBorder:c}=r,h=ct(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,a*2,h),d=s.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),ft(t,d),t.intersect=function(f){return N.info("filledCircle intersect",t,{radius:a,point:f}),lt.circle(t,a,f)},s}p(pm,"filledCircle");var md=10,yd=10;async function gm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=t?.height??0,t.height<md&&(t.height=md),t.width=(t?.width??0)-s-s/2,t.width<yd&&(t.width=yd));const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:n.width)+(s??0),h=t?.height?t?.height:c+n.height,u=h,d=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:f}=t,m=ut.svg(a),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Rt(d),x=m.path(C,y),k=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,ft(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(T){return N.info("Triangle intersect",t,d,T),lt.polygon(t,d,T)},a}p(gm,"flippedTriangle");async function mm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.padding??12,l=Math.max(s.width+n*2,t.width??0,90),c=s.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),d=u-h,f=Math.max(l*.38,28),m=-u/2,y=[{x:-l/2,y:m},{x:-l/2+f,y:m},{x:-l/2+f,y:m+h},{x:l/2,y:m+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(S=>`L${S.x},${S.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const v=ut.svg(o).path(C,ct(t,{}));k=o.insert(()=>v,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?ft(t,k):ft(t,k,{width:l,height:u});const T=m+h+d/2;return a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${T-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(S){return lt.polygon(t,y,S)},o}p(mm,"folder");function ym(e,t,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:s}=pt(t);t.label="";const a=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,d=ut.svg(a),f=ct(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=d.rectangle(h,u,l,c,f),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),ft(t,y);const C=i?.padding??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return lt.rect(t,x)},a}p(ym,"forkJoin");async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=15,s=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<s&&(t.height=s),t.width=(t?.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:l,bbox:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:Math.max(o,c.width))+a*2,u=(t?.height?t?.height:Math.max(s,c.height))+n*2,d=u/2,{cssStyles:f}=t,m=ut.svg(l),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:-u/2},{x:h/2-d,y:-u/2},...rr(-h/2+d,0,d,50,90,270),{x:h/2-d,y:u/2},{x:-h/2,y:u/2}],x=Rt(C),k=m.path(x,y),T=l.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),ft(t,T),t.intersect=function(S){return N.info("Pill intersect",t,{radius:d,point:S}),lt.polygon(t,C,S)},l}p(Cm,"halfRoundedRectangle");var XB=p((e,t,r,i,o)=>[`M${e+o},${t}`,`L${e+r-o},${t}`,`L${e+r},${t-i/2}`,`L${e+r-o},${t-i}`,`L${e+o},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function xm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),o=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,n=32,l=t.look==="neo"?a:s,c=t.look==="neo"?n:s;if(t.width||t.height){const T=(t.height??0)/o;t.width=(t?.width??0)-2*T-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await Ct(e,t,xt(t)),d=(t?.height?t?.height:u.height)+l,f=d/o,m=(t?.width?t?.width:u.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-d/2},{x:m-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=ut.svg(h),T=ct(t,{}),S=XB(0,0,m,d,f),v=k.path(S,T);C=h.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),x&&C.attr("style",x)}else C=hr(h,m,d,y);return i&&C.attr("style",i),t.width=m,t.height=d,ft(t,C),t.intersect=function(k){return lt.polygon(t,y,k)},h}p(xm,"hexagon");async function bm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const{shapeSvg:o}=await Ct(e,t,xt(t)),s=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=ut.svg(o),c=ct(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],u=Rt(h),d=l.path(u,c),f=o.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-s/2}, ${-a/2})`),ft(t,f),t.intersect=function(m){return N.info("Pill intersect",t,{points:h}),lt.polygon(t,h,m)},o}p(bm,"hourglass");async function km(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await Ct(e,t,"icon-shape default"),d=t.pos==="t",f=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=ro(t),x=-m/2,k=-f/2,T=t.label?8:0,S=ut.svg(c),v=ct(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const A=S.rectangle(x,k,m,f,v),L=Math.max(m,h.width),E=f+h.height+T,Z=S.rectangle(-L/2,-E/2,L,E,{...v,fill:"transparent",stroke:"none"}),Y=c.insert(()=>A,":first-child"),P=c.insert(()=>Z);if(t.icon){const st=c.append("g");st.html(`<g>${await os(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const U=st.node().getBBox(),O=U.width,D=U.height,B=U.x,q=U.y;st.attr("transform",`translate(${-O/2-B},${d?h.height/2+T/2-D/2-q:-h.height/2-T/2-D/2-q})`),st.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),Y.attr("transform",`translate(0,${d?h.height/2+T/2:-h.height/2-T/2})`),ft(t,P),t.intersect=function(st){if(N.info("iconSquare intersect",t,st),!t.label)return lt.rect(t,st);const U=t.x??0,O=t.y??0,D=t.height??0;let B=[];return d?B=[{x:U-h.width/2,y:O-D/2},{x:U+h.width/2,y:O-D/2},{x:U+h.width/2,y:O-D/2+h.height+T},{x:U+m/2,y:O-D/2+h.height+T},{x:U+m/2,y:O+D/2},{x:U-m/2,y:O+D/2},{x:U-m/2,y:O-D/2+h.height+T},{x:U-h.width/2,y:O-D/2+h.height+T}]:B=[{x:U-m/2,y:O-D/2},{x:U+m/2,y:O-D/2},{x:U+m/2,y:O-D/2+f},{x:U+h.width/2,y:O-D/2+f},{x:U+h.width/2/2,y:O+D/2},{x:U-h.width/2,y:O+D/2},{x:U-h.width/2,y:O-D/2+f},{x:U-m/2,y:O-D/2+f}],lt.polygon(t,B,st)},c}p(km,"icon");async function wm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await Ct(e,t,"icon-shape default"),d=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=ro(t),k=ut.svg(c),T=ct(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const S=x.get("fill");T.stroke=S??C;const v=c.append("g");t.icon&&v.html(`<g>${await os(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=v.node().getBBox(),L=A.width,E=A.height,Z=A.x,Y=A.y,P=Math.max(L,E)*Math.SQRT2+d*2,st=k.circle(0,0,P,T),U=Math.max(P,h.width),O=P+h.height+f,D=k.rectangle(-U/2,-O/2,U,O,{...T,fill:"transparent",stroke:"none"}),B=c.insert(()=>st,":first-child"),q=c.insert(()=>D);return v.attr("transform",`translate(${-L/2-Z},${m?h.height/2+f/2-E/2-Y:-h.height/2-f/2-E/2-Y})`),v.attr("style",`color: ${x.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-O/2:O/2-h.height})`),B.attr("transform",`translate(0,${m?h.height/2+f/2:-h.height/2-f/2})`),ft(t,q),t.intersect=function(R){return N.info("iconSquare intersect",t,R),lt.rect(t,R)},c}p(wm,"iconCircle");async function Tm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=ro(t),T=-y/2,S=-m/2,v=t.label?8:0,A=ut.svg(c),L=ct(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const E=k.get("fill");L.stroke=E??x;const Z=A.path(qe(T,S,y,m,5),L),Y=Math.max(y,h.width),P=m+h.height+v,st=A.rectangle(-Y/2,-P/2,Y,P,{...L,fill:"transparent",stroke:"none"}),U=c.insert(()=>Z,":first-child").attr("class","icon-shape2"),O=c.insert(()=>st);if(t.icon){const D=c.append("g");D.html(`<g>${await os(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=D.node().getBBox(),q=B.width,R=B.height,at=B.x,J=B.y;D.attr("transform",`translate(${-q/2-at},${f?h.height/2+v/2-R/2-J:-h.height/2-v/2-R/2-J})`),D.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-P/2:P/2-h.height})`),U.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),ft(t,O),t.intersect=function(D){if(N.info("iconSquare intersect",t,D),!t.label)return lt.rect(t,D);const B=t.x??0,q=t.y??0,R=t.height??0;let at=[];return f?at=[{x:B-h.width/2,y:q-R/2},{x:B+h.width/2,y:q-R/2},{x:B+h.width/2,y:q-R/2+h.height+v},{x:B+y/2,y:q-R/2+h.height+v},{x:B+y/2,y:q+R/2},{x:B-y/2,y:q+R/2},{x:B-y/2,y:q-R/2+h.height+v},{x:B-h.width/2,y:q-R/2+h.height+v}]:at=[{x:B-y/2,y:q-R/2},{x:B+y/2,y:q-R/2},{x:B+y/2,y:q-R/2+m},{x:B+h.width/2,y:q-R/2+m},{x:B+h.width/2/2,y:q+R/2},{x:B-h.width/2,y:q+R/2},{x:B-h.width/2,y:q-R/2+m},{x:B-y/2,y:q-R/2+m}],lt.polygon(t,at,D)},c}p(Tm,"iconRounded");async function _m(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=pt(t);t.labelStyle=o;const s=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(s,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=ro(t),T=-y/2,S=-m/2,v=t.label?8:0,A=ut.svg(c),L=ct(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const E=k.get("fill");L.stroke=E??x;const Z=A.path(qe(T,S,y,m,.1),L),Y=Math.max(y,h.width),P=m+h.height+v,st=A.rectangle(-Y/2,-P/2,Y,P,{...L,fill:"transparent",stroke:"none"}),U=c.insert(()=>Z,":first-child"),O=c.insert(()=>st);if(t.icon){const D=c.append("g");D.html(`<g>${await os(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=D.node().getBBox(),q=B.width,R=B.height,at=B.x,J=B.y;D.attr("transform",`translate(${-q/2-at},${f?h.height/2+v/2-R/2-J:-h.height/2-v/2-R/2-J})`),D.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-P/2:P/2-h.height})`),U.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),ft(t,O),t.intersect=function(D){if(N.info("iconSquare intersect",t,D),!t.label)return lt.rect(t,D);const B=t.x??0,q=t.y??0,R=t.height??0;let at=[];return f?at=[{x:B-h.width/2,y:q-R/2},{x:B+h.width/2,y:q-R/2},{x:B+h.width/2,y:q-R/2+h.height+v},{x:B+y/2,y:q-R/2+h.height+v},{x:B+y/2,y:q+R/2},{x:B-y/2,y:q+R/2},{x:B-y/2,y:q-R/2+h.height+v},{x:B-h.width/2,y:q-R/2+h.height+v}]:at=[{x:B-y/2,y:q-R/2},{x:B+y/2,y:q-R/2},{x:B+y/2,y:q-R/2+m},{x:B+h.width/2,y:q-R/2+m},{x:B+h.width/2/2,y:q+R/2},{x:B-h.width/2,y:q+R/2},{x:B-h.width/2,y:q-R/2+m},{x:B-y/2,y:q-R/2+m}],lt.polygon(t,at,D)},c}p(_m,"iconSquare");async function Sm(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/s;const{labelStyles:a}=pt(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??o),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:f}=await Ct(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-h/2,x=t.label?8:0,k=ut.svg(u),T=ct(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const S=k.rectangle(y,C,c,h,T),v=Math.max(c,d.width),A=h+d.height+x,L=k.rectangle(-v/2,-A/2,v,A,{...T,fill:"none",stroke:"none"}),E=u.insert(()=>S,":first-child"),Z=u.insert(()=>L);if(t.img){const Y=u.append("image");Y.attr("href",t.img),Y.attr("width",c),Y.attr("height",h),Y.attr("preserveAspectRatio","none"),Y.attr("transform",`translate(${-c/2},${m?A/2-h:-A/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),E.attr("transform",`translate(0,${m?d.height/2+x/2:-d.height/2-x/2})`),ft(t,Z),t.intersect=function(Y){if(N.info("iconSquare intersect",t,Y),!t.label)return lt.rect(t,Y);const P=t.x??0,st=t.y??0,U=t.height??0;let O=[];return m?O=[{x:P-d.width/2,y:st-U/2},{x:P+d.width/2,y:st-U/2},{x:P+d.width/2,y:st-U/2+d.height+x},{x:P+c/2,y:st-U/2+d.height+x},{x:P+c/2,y:st+U/2},{x:P-c/2,y:st+U/2},{x:P-c/2,y:st-U/2+d.height+x},{x:P-d.width/2,y:st-U/2+d.height+x}]:O=[{x:P-c/2,y:st-U/2},{x:P+c/2,y:st-U/2},{x:P+c/2,y:st-U/2+h},{x:P+d.width/2,y:st-U/2+h},{x:P+d.width/2/2,y:st+U/2},{x:P-d.width/2,y:st+U/2},{x:P-d.width/2,y:st-U/2+h},{x:P-c/2,y:st-U/2+h}],lt.polygon(t,O,Y)},u}p(Sm,"imageSquare");async function vm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+s*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Rt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=hr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(vm,"inv_trapezoid");async function Bm(e,t){const{shapeSvg:r,bbox:i,label:o}=await Ct(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ft(t,s),t.intersect=function(l){return lt.rect(t,l)},r}p(Bm,"labelRect");async function Lm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Rt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=hr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(Lm,"lean_left");async function Fm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=o,a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Rt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=hr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(Fm,"lean_right");function Em(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=ut.svg(o),u=ct(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Rt(c),f=h.path(d,u),m=o.insert(()=>f,":first-child");return m.attr("class","outer-path"),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),ft(t,m),t.intersect=function(y){return N.info("lightningBolt intersect",t,y),lt.polygon(t,c,y)},o}p(Em,"lightningBolt");var VB=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`a${o},${s} 0,0,0 ${r},0`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ZB=p((e,t,r,i,o,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${o},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),KB=p((e,t,r,i,o,s)=>[`M${e-r/2},${-i/2}`,`a${o},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Cd=10,xd=10;async function Am(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?24:o;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-s,t.width<xd&&(t.width=xd);const T=x/2/(2.5+x/50);t.height=(t.height??0)-a-T*3,t.height<Cd&&(t.height=Cd)}const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:l.width)+s*2,u=h/2,d=u/(2.5+h/50),f=(t?.height?t?.height:l.height)+d+a*2,m=f*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=ut.svg(n),k=ZB(0,0,h,f,u,d,m),T=KB(0,d,h,f,u,d),S=ct(t,{}),v=x.path(k,S),A=x.path(T,S);n.insert(()=>A,":first-child").attr("class","line"),y=n.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=VB(0,0,h,f,u,d,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ie(C)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-h/2}, ${-(f/2+d)})`),ft(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(x){const k=lt.rect(t,x),T=k.x-(t.x??0);if(u!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let S=d*d*(1-T*T/(u*u));S>0&&(S=Math.sqrt(S)),S=d-S,x.y-(t.y??0)>0&&(S=-S),k.y+=S}return k},n}p(Am,"linedCylinder");async function Mm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:l.width)+(s??0)*2,u=(t?.height?t?.height:l.height)+(a??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:m}=t,y=ut.svg(n),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:f/2},...Yr(-h/2-h/2*.1,f/2,h/2+h/2*.1,f/2,d,.8),{x:h/2+h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:-f/2},{x:-h/2,y:-f/2},{x:-h/2,y:f/2*1.1},{x:-h/2,y:-f/2}],k=y.polygon(x.map(S=>[S.x,S.y]),C),T=n.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),ft(t,T),t.intersect=function(S){return lt.polygon(t,x,S)},n}p(Mm,"linedWaveEdgedRect");async function $m(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await Ct(e,t,xt(t)),u=(t?.width?t?.width:c.width)+s*2+2*n,d=(t?.height?t?.height:c.height)+a*2+2*n,f=u-2*n,m=d-2*n,y=-f/2,C=-m/2,{cssStyles:x}=t,k=ut.svg(l),T=ct(t,{}),S=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+f-n,y:C+m+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C+m-n},{x:y+f+n,y:C+m-n},{x:y+f+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],v=[{x:y,y:C+n},{x:y+f-n,y:C+n},{x:y+f-n,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=Rt(S);let L=k.path(A,T);const E=Rt(v);let Z=k.path(E,T);t.look!=="handDrawn"&&(L=vl(L),Z=vl(Z));const Y=l.insert("g",":first-child");return Y.insert(()=>L),Y.insert(()=>Z),Y.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),ft(t,Y),t.intersect=function(P){return lt.polygon(t,S,P)},l}p($m,"multiRect");async function Om(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const u=Math.max(s.width,t?.width??0)+l*2,d=Math.max(s.height,t?.height??0)+c*3,f=t.look==="neo"?d/4:d/8,m=d+(h?f/2:-f/2),y=-u/2,C=-m/2,x=10,{cssStyles:k}=t,T=Yr(y-x,C+m+x,y+u-x,C+m+x,f,.8),S=T?.[T.length-1],v=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...T,{x:y+u-x,y:S.y-x},{x:y+u,y:S.y-x},{x:y+u,y:S.y-2*x},{x:y+u+x,y:S.y-2*x},{x:y+u+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],A=[{x:y,y:C+x},{x:y+u-x,y:C+x},{x:y+u-x,y:S.y-x},{x:y+u,y:S.y-x},{x:y+u,y:C},{x:y,y:C}],L=ut.svg(o),E=ct(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const Z=Rt(v),Y=L.path(Z,E),P=Rt(A),st=L.path(P,E),U=o.insert(()=>Y,":first-child");return U.insert(()=>st),U.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&U.selectAll("path").attr("style",i),U.attr("transform",`translate(0,${-f/2})`),a.attr("transform",`translate(${-(s.width/2)-x-(s.x-(s.left??0))}, ${-(s.height/2)+x-f/2-(s.y-(s.top??0))})`),ft(t,U),t.intersect=function(O){return lt.polygon(t,v,O)},o}p(Om,"multiWaveEdgedRectangle");async function Dm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i,t.useHtmlLabels||Ce(Vt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,m=ut.svg(a),y=ct(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(u,d,c,h,y),x=a.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ft(t,x),t.intersect=function(k){return lt.rect(t,k)},a}p(Dm,"note");var QB=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Im(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await Ct(e,t,xt(t)),a=s.width+(t.padding??0),n=s.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=ut.svg(o),m=ct(t,{}),y=QB(0,0,l),C=f.path(y,m);u=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=hr(o,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),ft(t,u),t.calcIntersect=function(f,m){const y=f.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=lt.polygon(f,C,m);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},o}p(Im,"question");async function Pm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?21:o??0,a=t.look==="neo"?12:o??0,{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=l.width+(t.look==="neo"?s*2:s),u=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),d=u/4,m=-Math.max(h,(t.width??0)-d)/2,y=-u/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,T=ut.svg(n),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=Rt(x),A=T.path(v,S),L=n.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ft(t,L),t.intersect=function(E){return lt.polygon(t,x,E)},n}p(Pm,"rect_left_inv_arrow");async function Rm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const s=e.insert("g").attr("class",o).attr("id",t.domId||t.id),a=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Rr(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(Ce(It())){const E=h.children[0],Z=At(h);u=E.getBoundingClientRect(),Z.attr("width",u.width),Z.attr("height",u.height)}N.info("Text 2",l);const d=l||[],f=h.getBBox(),m=await Rr(n,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),y=m.children[0],C=At(m);u=y.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;At(m).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),At(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const k=u.width+(t.padding||0),T=u.height+(t.padding||0),S=-u.width/2-x,v=-u.height/2-x;let A,L;if(t.look==="handDrawn"){const E=ut.svg(s),Z=ct(t,{}),Y=E.path(qe(S,v,k,T,t.rx||0),Z),P=E.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,Z);L=s.insert(()=>(N.debug("Rough node insert CXC",Y),P),":first-child"),A=s.insert(()=>(N.debug("Rough node insert CXC",Y),Y),":first-child")}else A=a.insert("rect",":first-child"),L=a.insert("line"),A.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),L.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return ft(t,A),t.intersect=function(E){return lt.rect(t,E)},s}p(Rm,"rectWithTitle");async function Nm(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,o={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return io(e,t,o)}p(Nm,"roundedRect");var Gr=8;async function qm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=(t?.width??n.width)+o*2+(t.look==="neo"?Gr:Gr*2),h=(t?.height??n.height)+s*2,u=c-Gr,d=h,f=Gr-c/2,m=-h/2,{cssStyles:y}=t,C=ut.svg(a),x=ct(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:f,y:m},{x:f+u,y:m},{x:f+u,y:m+d},{x:f-Gr,y:m+d},{x:f-Gr,y:m},{x:f,y:m},{x:f,y:m+d}],T=C.polygon(k.map(v=>[v.x,v.y]),x),S=a.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path").attr("style",ie(y)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${Gr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ft(t,S),t.intersect=function(v){return lt.rect(t,v)},a}p(qm,"shadedProcess");async function zm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=(t?.width?t?.width:l.width)+s*2,u=((t?.height?t?.height:l.height)+a*2)*1.5,d=h,f=u/1.5,m=-d/2,y=-f/2,{cssStyles:C}=t,x=ut.svg(n),k=ct(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x:m,y},{x:m,y:y+f},{x:m+d,y:y+f},{x:m+d,y:y-f/2}],S=Rt(T),v=x.path(S,k),A=n.insert(()=>v,":first-child");return A.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),ft(t,A),t.intersect=function(L){return lt.polygon(t,T,L)},n}p(zm,"slopedRect");async function Wm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,o=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:o};return io(e,t,s)}p(Wm,"squareRect");async function Hm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?20:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?s*2:s),u=c/2,{cssStyles:d}=t,f=ut.svg(n),m=ct(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...rr(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...rr(h/2-u,0,u,50,270,450)],C=Rt(y),x=f.path(C,m),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),ft(t,k),t.intersect=function(T){return lt.polygon(t,y,T)},n}p(Hm,"stadium");async function Ym(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return io(e,t,r)}p(Ym,"state");function Um(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=ut.svg(h),d=ct(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,C=u.circle(0,0,y,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),s&&x.selectAll("path").attr("style",s),o&&x.selectAll("path").attr("style",o),t.width<25&&c&&t.look!=="handDrawn"){const k=e.node()?.ownerSVGElement?.id??"",T=k?`${k}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${T})`)}return ft(t,x),t.intersect=function(k){return lt.circle(t,(t.width??0)/2,k)},h}p(Um,"stateEnd");function jm(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=ut.svg(s).circle(0,0,t.width,BS(i));a=s.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&o&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return ft(t,a),t.intersect=function(n){return lt.circle(t,(t.width??7)/2,n)},s}p(jm,"stateStart");var wi=8;async function Gm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t?.padding??8,s=t.look==="neo"?28:o,a=t.look==="neo"?12:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.width+2*wi+s,t.width??0),h=Math.max(l.height+a,t.height??0),u=c-2*wi,d=h,f=-c/2,m=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){const C=ut.svg(n),x=ct(t,{}),k=C.rectangle(f,m,u+16,d,x),T=C.line(f+wi,m,f+wi,m+d,x),S=C.line(f+wi+u,m,f+wi+u,m+d,x);n.insert(()=>T,":first-child"),n.insert(()=>S,":first-child");const v=n.insert(()=>k,":first-child"),{cssStyles:A}=t;v.attr("class","basic label-container").attr("style",ie(A)),ft(t,v)}else{const C=hr(n,u,d,y);i&&C.attr("style",i),ft(t,C)}return t.intersect=function(C){return lt.polygon(t,y,C)},n}p(Gm,"subroutine");var Tn=.2;async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-s*2-Tn*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.height?t?.height:l.height)+a*2,h=Tn*c,u=Tn*c,f=(t?.width?t?.width:l.width)+s*2+h-h,m=c,y=-f/2,C=-m/2,{cssStyles:x}=t,k=ut.svg(n),T=ct(t,{}),S=[{x:y-h/2,y:C},{x:y+f+h/2,y:C},{x:y+f+h/2,y:C+m},{x:y-h/2,y:C+m}],v=[{x:y+f-h/2,y:C+m},{x:y+f+h/2,y:C+m},{x:y+f+h/2,y:C+m-u}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=Rt(S),L=k.path(A,T),E=Rt(v),Z=k.path(E,{...T,fillStyle:"solid"}),Y=n.insert(()=>Z,":first-child");return Y.insert(()=>L,":first-child"),Y.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),ft(t,Y),t.intersect=function(P){return lt.polygon(t,S,P)},n}p(Xm,"taggedRect");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,label:a}=await Ct(e,t,xt(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,u=.2*l,d=l+c,{cssStyles:f}=t,m=ut.svg(o),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:d/2},...Yr(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,k=-d/2-u*.4,T=[{x:x+n-h,y:(k+l)*1.3},{x:x+n,y:k+l-u},{x:x+n,y:(k+l)*.9},...Yr(x+n,(k+l)*1.25,x+n-h,(k+l)*1.3,-l*.02,.5)],S=Rt(C),v=m.path(S,y),A=Rt(T),L=m.path(A,{...y,fillStyle:"solid"}),E=o.insert(()=>L,":first-child");return E.insert(()=>v,":first-child"),E.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),ft(t,E),t.intersect=function(Z){return lt.polygon(t,C,Z)},o}p(Vm,"taggedWaveEdgedRectangle");async function Zm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s}=await Ct(e,t,xt(t)),a=Math.max(s.width+(t.padding??0),t?.width||0),n=Math.max(s.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=o.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),ft(t,h),t.intersect=function(u){return lt.rect(t,u)},o}p(Zm,"text");var JB=p((e,t,r,i,o,s)=>`M${e},${t}
202
+ a${o},${s} 0,0,1 0,${-i}
203
+ l${r},0
204
+ a${o},${s} 0,0,1 0,${i}
205
+ M${r},${-i}
206
+ a${o},${s} 0,0,0 0,${i}
207
+ l${-r},0`,"createCylinderPathD"),tL=p((e,t,r,i,o,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${o},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),eL=p((e,t,r,i,o,s)=>[`M${e+r/2},${-i/2}`,`a${o},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),bd=5,kd=10;async function Km(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?12:o/2,a=t.height??0;if(t.height&&(t.height=t.height-s,t.height<bd&&(t.height=bd)),t.width){const x=a/2/(2.5+a/50);t.width=t.width-s-x*3,t.width<kd&&(t.width=kd)}const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=Math.max(t.height??0,l.height)+s,u=h/2,d=u/(2.5+h/50),f=Math.max(t.width??0,l.width)+d+s,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=ut.svg(n),x=tL(0,0,f,h,d,u),k=eL(0,0,f,h,d,u),T=C.path(x,ct(t,{})),S=C.path(k,ct(t,{fill:"none"}));y=n.insert(()=>S,":first-child"),y=n.insert(()=>T,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=JB(0,0,f,h,d,u);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ie(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-f/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ft(t,y),t.intersect=function(C){const x=lt.rect(t,C),k=x.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let T=d*d*(1-k*k/(u*u));T!=0&&(T=Math.sqrt(Math.abs(T))),T=d-T,C.x-(t.x??0)>0&&(T=-T),x.x+=T}return x},n}p(Km,"tiltedCylinder");async function Qm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=(t.look==="neo",o),a=t.look==="neo"?o*2:o,{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=Math.max(l.height+s,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(n),y=ct(t,{}),C=Rt(u),x=m.path(C,y);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=hr(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ft(t,d),t.intersect=function(m){return lt.polygon(t,u,m)},n}p(Qm,"trapezoid");async function Jm(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await Ct(e,t,xt(t)),u=(t?.width?t?.width:h.width)+s*2,d=(t?.height?t?.height:h.height)+a*2,{cssStyles:f}=t,m=ut.svg(c),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],x=Rt(C),k=m.path(x,y),T=c.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),ft(t,T),t.intersect=function(S){return lt.polygon(t,C,S)},c}p(Jm,"trapezoidalPentagon");var wd=10,Td=10;async function ty(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<Td&&(t.width=Td),t.height=t?.height??0,t.height<wd&&(t.height=wd));const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=nr(It().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+s,u=t?.height?t?.height:h+n.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:m}=t,y=ut.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Rt(f),k=y.path(x,C),T=a.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=h,t.height=u,ft(t,T),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return N.info("Triangle intersect",t,f,S),lt.polygon(t,f,S)},a}p(ty,"triangle");async function ey(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?12:o;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await Ct(e,t,xt(t)),u=(t?.width?t?.width:c.width)+(s??0)*2,d=(t?.height?t?.height:c.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,m=d+(n?f:-f),{cssStyles:y}=t,x=14-u,k=x>0?x/2:0,T=ut.svg(l),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=[{x:-u/2-k,y:m/2},...Yr(-u/2-k,m/2,u/2+k,m/2,f,.8),{x:u/2+k,y:-m/2},{x:-u/2-k,y:-m/2}],A=Rt(v),L=T.path(A,S),E=l.insert(()=>L,":first-child");return E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),ft(t,E),t.intersect=function(Z){return lt.polygon(t,v,Z)},l}p(ey,"waveEdgedRectangle");async function ry(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.padding??0,s=t.look==="neo"?16:o,a=t.look==="neo"?20:o;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-S*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:l.width)+s*2,h=(t?.height?t?.height:l.height)+a,u=h/8,d=h+u*2,{cssStyles:f}=t,m=ut.svg(n),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:d/2},...Yr(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...Yr(c/2,-d/2,-c/2,-d/2,u,-1)],x=Rt(C),k=m.path(x,y),T=n.insert(()=>k,":first-child");return T.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),ft(t,T),t.intersect=function(S){return lt.polygon(t,C,S)},n}p(ry,"waveRectangle");var Kt=10;async function iy(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-Kt,10),t.height=Math.max((t?.height??0)-s*2-Kt,10));const{shapeSvg:a,bbox:n,label:l}=await Ct(e,t,xt(t)),c=(t?.width?t?.width:n.width)+o*2+Kt,h=(t?.height?t?.height:n.height)+s*2+Kt,u=c-Kt,d=h-Kt,f=-u/2,m=-d/2,{cssStyles:y}=t,C=ut.svg(a),x=ct(t,{}),k=[{x:f-Kt,y:m-Kt},{x:f-Kt,y:m+d},{x:f+u,y:m+d},{x:f+u,y:m-Kt}],T=`M${f-Kt},${m-Kt} L${f+u},${m-Kt} L${f+u},${m+d} L${f-Kt},${m+d} L${f-Kt},${m-Kt}
208
+ M${f-Kt},${m} L${f+u},${m}
209
+ M${f},${m-Kt} L${f},${m+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=C.path(T,x),v=a.insert(()=>S,":first-child");return v.attr("transform",`translate(${Kt/2}, ${Kt/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Kt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Kt/2-(n.y-(n.top??0))})`),ft(t,v),t.intersect=function(A){return lt.polygon(t,k,A)},a}p(iy,"windowPane");var _d=new Set(["redux-color","redux-dark-color"]),rL=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Oh(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:o}=Vt(),{rowEven:s,rowOdd:a,nodeBorder:n,borderColorArray:l}=o;if(t.look==="handDrawn"){const{themeVariables:nt}=Vt(),{background:kt}=nt,Ot={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${kt}`]};await Oh(e,Ot)}const c=Vt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,u=c.er?.entityPadding??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:m}=pt(t);if(r.attributes.length===0&&t.label){const nt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Tr(t.label,c)+nt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const kt=await io(e,t,nt);if(i!=null&&_d.has(i)){const Ot=r.colorIndex??0;kt.attr("data-color-id",`color-${Ot%l.length}`)}if(!nr(c.htmlLabels)){const Ot=kt.select("text"),vt=Ot.node()?.getBBox();Ot.attr("transform",`translate(${-vt.width/2}, 0)`)}return kt}c.htmlLabels||(h*=1.25,u*=1.25);let y=xt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await Si(C,t.label??"",c,0,0,["name"],f);x.height+=u;let k=0;const T=[],S=[];let v=0,A=0,L=0,E=0,Z=!0,Y=!0;for(const nt of r.attributes){const kt=await Si(C,nt.type,c,0,k,["attribute-type"],f);v=Math.max(v,kt.width+h);const Ot=await Si(C,nt.name,c,0,k,["attribute-name"],f);A=Math.max(A,Ot.width+h);const vt=await Si(C,nt.keys.join(),c,0,k,["attribute-keys"],f);L=Math.max(L,vt.width+h);const Nt=await Si(C,nt.comment,c,0,k,["attribute-comment"],f);E=Math.max(E,Nt.width+h);const Wt=Math.max(kt.height,Ot.height,vt.height,Nt.height)+u;S.push({yOffset:k,rowHeight:Wt}),k+=Wt}let P=4;L<=h&&(Z=!1,L=0,P--),E<=h&&(Y=!1,E=0,P--);const st=C.node().getBBox();if(x.width+h*2-(v+A+L+E)>0){const nt=x.width+h*2-(v+A+L+E);v+=nt/P,A+=nt/P,L>0&&(L+=nt/P),E>0&&(E+=nt/P)}const U=v+A+L+E,O=ut.svg(C),D=ct(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let B=0;S.length>0&&(B=S.reduce((nt,kt)=>nt+(kt?.rowHeight??0),0));const q=Math.max(st.width+h*2,t?.width||0,U),R=Math.max((B??0)+x.height,t?.height||0),at=-q/2,J=-R/2;if(C.selectAll("g:not(:first-child)").each((nt,kt,Ot)=>{const vt=At(Ot[kt]),Nt=vt.attr("transform");let Wt=0,le=0;if(Nt){const Oe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Nt);Oe&&(Wt=parseFloat(Oe[1]),le=parseFloat(Oe[2]),vt.attr("class").includes("attribute-name")?Wt+=v:vt.attr("class").includes("attribute-keys")?Wt+=v+A:vt.attr("class").includes("attribute-comment")&&(Wt+=v+A+L))}vt.attr("transform",`translate(${at+h/2+Wt}, ${le+J+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(J+u/2)+")"),i!=null&&_d.has(i)){const nt=r.colorIndex??0;C.attr("data-color-id",`color-${nt%l.length}`)}const mt=O.rectangle(at,J,q,R,D),wt=C.insert(()=>mt,":first-child").attr("class","outer-path").attr("style",d.join(""));T.push(0);for(const[nt,kt]of S.entries()){const vt=(nt+1)%2===0&&kt.yOffset!==0,Nt=O.rectangle(at,x.height+J+kt?.yOffset,q,kt?.rowHeight,{...D,fill:vt?s:a,stroke:n});C.insert(()=>Nt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${vt?"even":"odd"}`)}const Tt=1e-4;let Et=vi(at,x.height+J,q+at,x.height+J,Tt),Lt=O.polygon(Et.map(nt=>[nt.x,nt.y]),D);if(C.insert(()=>Lt).attr("class","divider"),Et=vi(v+at,x.height+J,v+at,R+J,Tt),Lt=O.polygon(Et.map(nt=>[nt.x,nt.y]),D),C.insert(()=>Lt).attr("class","divider"),Z){const nt=v+A+at;Et=vi(nt,x.height+J,nt,R+J,Tt),Lt=O.polygon(Et.map(kt=>[kt.x,kt.y]),D),C.insert(()=>Lt).attr("class","divider")}if(Y){const nt=v+A+L+at;Et=vi(nt,x.height+J,nt,R+J,Tt),Lt=O.polygon(Et.map(kt=>[kt.x,kt.y]),D),C.insert(()=>Lt).attr("class","divider")}for(const nt of T){const kt=x.height+J+nt;Et=vi(at,kt,q+at,kt,Tt),Lt=O.polygon(Et.map(Ot=>[Ot.x,Ot.y]),D),C.insert(()=>Lt).attr("class","divider")}if(ft(t,wt),m&&t.look!=="handDrawn")if(i!=null&&rL.has(i))C.selectAll("path").attr("style",m);else{const kt=m.split(";")?.filter(Ot=>Ot.includes("stroke"))?.map(Ot=>`${Ot}`).join("; ");C.selectAll("path").attr("style",kt??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(nt){return lt.rect(t,nt)},C}p(Oh,"erBox");async function Si(e,t,r,i=0,o=0,s=[],a=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",a);t!==fu(t)&&(t=fu(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Xe(n,t,{width:Tr(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(nr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=At(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Si,"addText");function vi(e,t,r,i,o){return e===r?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}p(vi,"lineToPolygon");async function oy(e,t,r,i,o=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",xt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,d=0,f=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Fo(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Fo(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();d=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const T=await Fo(c,k,y,[k.parseClassifier()]);y+=T+s}f=c.node().getBBox().height,f<=0&&(f=o/2),h=a.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const T=await Fo(h,k,C,[k.parseClassifier()]);C+=T+s}let x=a.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${u+d+o*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+o*4:o*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}p(oy,"textHelper");async function Fo(e,t,r,i=[]){const o=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Vt();let a="useHtmlLabels"in t?t.useHtmlLabels:nr(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Ho(n)&&(a=!0);const l=await Xe(o,Jl(Wr(n)),{width:Tr(n,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const u=l.children[0],d=At(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await Eh(u),c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&At(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return o.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Fo,"addText");async function sy(e,t){const r=It(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,a=s,n=t.useHtmlLabels??nr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await oy(e,t,r,n,a),{labelStyles:u,nodeStyles:d}=pt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const f=l.styles?.join(";")||d||"";t.cssStyles||(t.cssStyles=f.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,y=ut.svg(c),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const T=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=a:l.members.length>0&&l.methods.length===0&&(k+=a*2);const S=-x/2,v=-k/2;let A=m?s*2:l.members.length===0&&l.methods.length===0?-s:0;T&&(A=s*2);const L=y.rectangle(S-s,v-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0),x+2*s,k+2*s+A,C),E=c.insert(()=>L,":first-child");E.attr("class","basic label-container outer-path");const Z=E.node().getBBox(),Y=c.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,P=c.select(".label-group").node().getBBox().height-(m?s/2:0)||0,st=c.select(".members-group").node().getBBox().height-(m?s/2:0)||0,U=(Y+P+v+s-(v-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((O,D,B)=>{const q=At(B[D]),R=q.attr("transform");let at=0;if(R){const Tt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);Tt&&(at=parseFloat(Tt[2]))}let J=at+v+s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(q.attr("class").includes("methods-group")){const wt=Math.max(st,a/2);T?J=Math.max(U,Y+P+wt+v+a*2+s)+a*2:J=Y+P+wt+v+a*4+s}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?J=at-a:J=at),n||(J-=4);let mt=S;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(mt=-q.node()?.getBBox().width/2||0,c.selectAll("text").each(function(wt,Tt,Et){window.getComputedStyle(Et[Tt]).textAnchor==="middle"&&(mt=0)})),q.attr("transform",`translate(${mt}, ${J})`)}),l.members.length>0||l.methods.length>0||m){const O=Y+P+v+s,D=y.line(Z.x,O,Z.x+Z.width,O+.001,C);c.insert(()=>D).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",f)}if(m||l.members.length>0||l.methods.length>0){const O=Y+P+st+v+a*2+s,D=y.line(Z.x,T?Math.max(U,O):O,Z.x+Z.width,(T?Math.max(U,O):O)+.001,C);c.insert(()=>D).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",f)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",f),E.select(":nth-child(2)").attr("style",f),c.selectAll(".divider").select("path").attr("style",f),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",f),!n){const O=RegExp(/color\s*:\s*([^;]*)/),D=O.exec(f);if(D){const B=D[0].replace("color","fill");c.selectAll("tspan").attr("style",B)}else if(u){const B=O.exec(u);if(B){const q=B[0].replace("color","fill");c.selectAll("tspan").attr("style",q)}}}return ft(t,E),t.intersect=function(O){return lt.rect(t,O)},c}p(sy,"classBox");async function ay(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const o=t,s=t,a=20,n=20,l="verifyMethod"in t,c=xt(t),h=It(),{themeVariables:u}=h,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await Je(y,`&lt;&lt;${o.type}&gt;&gt;`,0,t.labelStyle):C=await Je(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const k=await Je(y,o.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,l){const P=await Je(y,`${o.requirementId?`ID: ${o.requirementId}`:""}`,x,t.labelStyle,m);x+=P;const st=await Je(y,`${o.text?`Text: ${o.text}`:""}`,x,t.labelStyle,m);x+=st;const U=await Je(y,`${o.risk?`Risk: ${o.risk}`:""}`,x,t.labelStyle,m);x+=U,await Je(y,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const P=await Je(y,`${s.type?`Type: ${s.type}`:""}`,x,t.labelStyle,m);x+=P,await Je(y,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,x,t.labelStyle,m)}const T=(y.node()?.getBBox().width??200)+a,S=(y.node()?.getBBox().height??200)+a,v=-T/2,A=-S/2,L=ut.svg(y),E=ct(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const Z=L.rectangle(v,A,T,S,E),Y=y.insert(()=>Z,":first-child");if(Y.attr("class","basic label-container outer-path").attr("style",i),d?.length){const P=t.colorIndex??0;y.attr("data-color-id",`color-${P%d.length}`)}if(y.selectAll(".label").each((P,st,U)=>{const O=At(U[st]),D=O.attr("transform");let B=0,q=0;if(D){const mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);mt&&(B=parseFloat(mt[1]),q=parseFloat(mt[2]))}const R=q-S/2;let at=v+a/2;(st===0||st===1)&&(at=B),O.attr("transform",`translate(${at}, ${R+a})`)}),x>C+k+n){const P=A+C+k+n;let st;if(t.look==="neo"){const D=[[v,P],[v+T,P],[v+T,P+.001],[v,P+.001]];st=L.polygon(D,E)}else st=L.line(v,P,v+T,P,E);y.insert(()=>st).attr("class","divider")}return ft(t,Y),t.intersect=function(P){return lt.rect(t,P)},i&&t.look!=="handDrawn"&&(f||d?.length)&&y.selectAll("path").attr("style",i),y}p(ay,"requirementBox");async function Je(e,t,r,i="",o="center"){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=It(),n=a.htmlLabels??!0,l=await Xe(s,Jl(Wr(t)),{width:Tr(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],u=At(l);o==="start"&&At(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(o==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return s.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(Je,"addText");var iL=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ny(e,t,{config:r}){const{labelStyles:i,nodeStyles:o}=pt(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await Ct(e,t,xt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;d?{label:m,bbox:y}=await kn(d,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await kn(n,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await kn(n,"assigned"in t&&t.assigned||"",f);t.width=a;const k=10,T=t?.width||0,S=Math.max(y.height,x.height)/2,v=Math.max(l.height+k*2,t?.height||0)+S,A=-T/2,L=-v/2;c.attr("transform","translate("+(h-T/2)+", "+(-S-l.height/2)+")"),m.attr("transform","translate("+(h-T/2)+", "+(-S+l.height/2)+")"),C.attr("transform","translate("+(h+T/2-x.width-2*s)+", "+(-S+l.height/2)+")");let E;const{rx:Z,ry:Y}=t,{cssStyles:P}=t;if(t.look==="handDrawn"){const st=ut.svg(n),U=ct(t,{}),O=Z||Y?st.path(qe(A,L,T,v,Z||0),U):st.rectangle(A,L,T,v,U);E=n.insert(()=>O,":first-child"),E.attr("class","basic label-container").attr("style",P||null)}else{E=n.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",o).attr("rx",Z??5).attr("ry",Y??5).attr("x",A).attr("y",L).attr("width",T).attr("height",v);const st="priority"in t&&t.priority;if(st){const U=n.append("line"),O=A+2,D=L+Math.floor((Z??0)/2),B=L+v-Math.floor((Z??0)/2);U.attr("x1",O).attr("y1",D).attr("x2",O).attr("y2",B).attr("stroke-width","4").attr("stroke",iL(st))}}return ft(t,E),t.height=v,t.intersect=function(st){return lt.rect(t,st)},n}p(ny,"kanbanItem");async function ly(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await Ct(e,t,xt(t)),l=s.width+10*a,c=s.height+8*a,h=.15*l,{cssStyles:u}=t,d=s.width+20,f=s.height+20,m=Math.max(l,d),y=Math.max(c,f);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let C;const x=`M0 0
210
+ a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
211
+ a${h},${h} 1 0,0 ${m*.25},0
212
+ a${h},${h} 1 0,0 ${m*.25},0
213
+ a${h},${h} 1 0,0 ${m*.25},${y*.1}
214
+
215
+ a${h},${h} 1 0,0 ${m*.15},${y*.33}
216
+ a${h*.8},${h*.8} 1 0,0 0,${y*.34}
217
+ a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
218
+
219
+ a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
220
+ a${h},${h} 1 0,0 ${-1*m*.25},0
221
+ a${h},${h} 1 0,0 ${-1*m*.25},0
222
+ a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
223
+
224
+ a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
225
+ a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
226
+ a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const k=ut.svg(o),T=ct(t,{}),S=k.path(x,T);C=o.insert(()=>S,":first-child"),C.attr("class","basic label-container").attr("style",ie(u))}else C=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),ft(t,C),t.calcIntersect=function(k,T){return lt.rect(k,T)},t.intersect=function(k){return N.info("Bang intersect",t,k),lt.rect(t,k)},o}p(ly,"bang");async function hy(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await Ct(e,t,xt(t)),l=s.width+2*a,c=s.height+2*a,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:m}=t;let y;const C=`M0 0
228
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
229
+ a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
230
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
231
+
232
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
233
+ a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
234
+
235
+ a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
236
+ a${d},${d} 1 0,1 ${-1*l*.5},0
237
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
238
+
239
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
240
+ a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
241
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=ut.svg(o),k=ct(t,{}),T=x.path(C,k);y=o.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",ie(m))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),ft(t,y),t.calcIntersect=function(x,k){return lt.rect(x,k)},t.intersect=function(x){return N.info("Cloud intersect",t,x),lt.rect(t,x)},o}p(hy,"cloud");async function cy(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:a,label:n}=await Ct(e,t,xt(t)),l=s.width+8*a,c=s.height+2*a,h=5,u=t.look==="neo"?`
242
+ M${-l/2} ${c/2-h}
243
+ v${-c+2*h}
244
+ q0,-${h} ${h},-${h}
245
+ h${l-2*h}
246
+ q${h},0 ${h},${h}
247
+ v${c-h}
248
+ H${-l/2}
249
+ Z
250
+ `:`
251
+ M${-l/2} ${c/2-h}
252
+ v${-c+2*h}
253
+ q0,-${h} ${h},-${h}
254
+ h${l-2*h}
255
+ q${h},0 ${h},${h}
256
+ v${c-2*h}
257
+ q0,${h} ${-h},${h}
258
+ h${-(l-2*h)}
259
+ q${-h},0 ${-h},${-h}
260
+ Z
261
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),o.append(()=>n.node()),ft(t,d),t.calcIntersect=function(f,m){return lt.rect(f,m)},t.intersect=function(f){return lt.rect(t,f)},o}p(cy,"defaultMindmapNode");async function uy(e,t){const r={padding:t.padding??0};return $h(e,t,r)}p(uy,"mindmapCircle");var oL=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Nm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Hm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:cm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:um},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:mm},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Vg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:rm},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Qg},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:hm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:$h},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ly},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hy},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Im},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:xm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Qm},{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:vm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Jg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:qm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:jm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Um},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ym},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:sm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:am},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:nm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Em},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ey},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Cm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Km},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Am},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:lm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:dm},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ty},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:iy},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:pm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:gm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Om},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$m},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Xg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:om},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ry},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Pm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Mm}],sL=p(()=>{const t=[...Object.entries({state:Ym,choice:tm,note:Dm,composite:em,rectWithTitle:Rm,labelRect:Bm,block_arrow:Kg,collapsedGroup:Zg,iconSquare:_m,iconCircle:wm,icon:km,iconRounded:Tm,imageSquare:Sm,anchor:jg,kanbanItem:ny,mindmapCircle:uy,defaultMindmapNode:cy,classBox:sy,erBox:Oh,requirementBox:ay}),...oL.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(o=>[o,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),dy=sL();function aL(e){return e in dy}p(aL,"isValidShape");var Fa=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Ea=new Map;async function Dh(e,t,r){let i,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?dy[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),o=await s(i,t,r)}else o=await s(e,t,r),i=o;return i.attr("data-look",ie(t.look)),t.tooltip&&o.attr("title",t.tooltip),Ea.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Dh,"insertNode");var C5=p((e,t)=>{Ea.set(t.id,e)},"setNodeElem"),nL=p(()=>{Ea.clear()},"clear"),Sd=p(e=>{const t=Ea.get(e.id);N.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),lL=p(async(e,t)=>{const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=pt(t),d=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),f=nr(r.flowchart.htmlLabels),m=t.direction==="LR",y=d.insert("g").attr("class","cluster-label swimlane-label"),C=await Xe(y,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let x=C.getBBox();if(f){const U=C.children[0],O=At(C);x=U.getBoundingClientRect(),O.attr("width",x.width),O.attr("height",x.height)}const k=t.padding??0,T=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(T-t.width)/2-k:t.diff=-k;const S=t.height,v=t.y-S/2,A=t.y+S/2,L=t.x-T/2,E=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:v+S/3,Z=m?4:0,Y=x.height+2*Z;let P,st;if(m){const U=Math.max(Y,x.height+2*Z),O=L+U,D=Math.max(0,T-U);if(t.look==="handDrawn"){const R=ut.svg(d),at=ct(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),J=ct(t,{roughness:.7,fill:"none",stroke:n,seed:o}),mt=R.rectangle(L,v,U,S,at);P=d.insert(()=>mt,":first-child");const wt=R.rectangle(O,v,D,S,J);st=d.insert(()=>wt,":first-child"),P.select("path:nth-child(2)").attr("style",h.join(";")),P.select("path").attr("style",u.join(";").replace("fill","stroke"))}else P=d.insert("rect",":first-child"),st=d.insert("rect",":first-child"),P.attr("class","swimlane-title").attr("style",c).attr("x",L).attr("y",v).attr("width",U).attr("height",S).attr("fill",s).attr("stroke",n),st.attr("class","swimlane-body").attr("style",c).attr("x",O).attr("y",v).attr("width",D).attr("height",S).attr("fill","none").attr("stroke",n);const B=L+U/2,q=t.y;y.attr("transform",`translate(${B}, ${q}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const U=Math.max(0,E-v),O=Math.min(Y,U),D=v+O,B=Math.max(0,A-D),q=t.x-T/2;if(t.look==="handDrawn"){const J=ut.svg(d),mt=ct(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:o}),wt=ct(t,{roughness:.7,fill:"none",stroke:n,seed:o}),Tt=J.rectangle(q,v,T,O,mt);P=d.insert(()=>Tt,":first-child");const Et=J.rectangle(q,D,T,B,wt);st=d.insert(()=>Et,":first-child"),P.select("path:nth-child(2)").attr("style",h.join(";")),P.select("path").attr("style",u.join(";").replace("fill","stroke"))}else P=d.insert("rect",":first-child"),st=d.insert("rect",":first-child"),P.attr("class","swimlane-title").attr("style",c).attr("x",q).attr("y",v).attr("width",T).attr("height",O).attr("fill",s).attr("stroke",n),st.attr("class","swimlane-body").attr("style",c).attr("x",q).attr("y",D).attr("width",T).attr("height",B).attr("fill","none").attr("stroke",n);const R=t.x-x.width/2,at=v+(O-x.height)/2;y.attr("transform",`translate(${R}, ${at})`)}if(N.trace("Swimlane data ",t,JSON.stringify(t)),l){const U=y.select("span");U&&U.attr("style",l)}return t.offsetX=0,t.width=T,t.height=S,t.offsetY=x.height-k/2,t.intersect=function(U){return fi(t,U)},{cluster:d,labelBBox:x}},"swimlane"),fy=p(async(e,t)=>{N.info("Creating subgraph rect for ",t.id,t);const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=pt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=Ce(r),f=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Xe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):m=await Rr(f,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(Ce(r)){const L=m.children[0],E=At(m);y=L.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,T=t.y-x/2;N.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const L=ut.svg(u),E=ct(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:o}),Z=L.path(qe(k,T,C,x,0),E);S=u.insert(()=>(N.debug("Rough node insert CXC",Z),Z),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",T).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=Fa(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const L=f.select("span");L&&L.attr("style",n)}const A=S.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return fi(t,L)},{cluster:u,labelBBox:y}},"rect"),hL=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),o=0*t.padding,s=o/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+o).attr("height",t.height+o).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return fi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),cL=p(async(e,t)=>{const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=await Rr(u,t.label,t.labelStyle,void 0,!0);let m=f.getBBox();if(Ce(r)){const Z=f.children[0],Y=At(f);m=Z.getBoundingClientRect(),Y.attr("width",m.width),Y.attr("height",m.height)}const y=0*t.padding,C=y/2,x=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,T=t.height+y-m.height-6,S=t.x-x/2,v=t.y-k/2;t.width=x;const A=t.y-t.height/2-C+m.height+2;let L;if(t.look==="handDrawn"){const Z=t.cssClasses.includes("statediagram-cluster-alt"),Y=ut.svg(c),P=t.rx||t.ry?Y.path(qe(S,v,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):Y.rectangle(S,v,x,k,{seed:o});L=c.insert(()=>P,":first-child");const st=Y.rectangle(S,A,x,T,{fill:Z?s:a,fillStyle:Z?"hachure":"solid",stroke:l,seed:o});L=c.insert(()=>P,":first-child"),d=c.insert(()=>st)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",S).attr("y",v).attr("width",x).attr("height",k).attr("data-look",t.look),d.attr("class","inner").attr("x",S).attr("y",A).attr("width",x).attr("height",T);u.attr("transform",`translate(${t.x-m.width/2}, ${v+1-(Ce(r)?0:3)})`);const E=L.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(Z){return fi(t,Z)},{cluster:c,labelBBox:m}},"roundedWithTitle"),uL=p(async(e,t)=>{N.info("Creating subgraph rect for ",t.id,t);const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=pt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=Ce(r),f=u.insert("g").attr("class","cluster-label "),m=await Xe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let y=m.getBBox();if(Ce(r)){const L=m.children[0],E=At(m);y=L.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,T=t.y-x/2;N.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const L=ut.svg(u),E=ct(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:o}),Z=L.path(qe(k,T,C,x,t.rx),E);S=u.insert(()=>(N.debug("Rough node insert CXC",Z),Z),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",T).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=Fa(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const L=f.select("span");L&&L.attr("style",n)}const A=S.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return fi(t,L)},{cluster:u,labelBBox:y}},"kanbanSection"),dL=p((e,t)=>{const r=It(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const C=ut.svg(a).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:o});f=a.insert(()=>C,":first-child")}else{f=n.insert("rect",":first-child");let y="outer";t.look,y="divider",f.attr("class",y).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=f.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return fi(t,y)},{cluster:a,labelBBox:{}}},"divider"),fL=fy,pL={rect:fy,squareRect:fL,roundedWithTitle:cL,noteGroup:hL,divider:dL,kanbanSection:uL,swimlane:lL},py=new Map,gy=p(async(e,t)=>{const r=t.shape||"rect",i=await pL[r](e,t);return py.set(t.id,i),i},"insertCluster"),gL=p(()=>{py=new Map},"clear"),ko=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),me={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},vd={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Eo(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Xt(e),t=Xt(t);const[r,i]=[e.x,e.y],[o,s]=[t.x,t.y],a=o-r,n=s-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}p(Eo,"calculateDeltaAndAngle");var Xt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),mL=p(e=>({x:p(function(t,r,i){let o=0;const s=Xt(i[0]).x<Xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(me,e.arrowTypeStart)){const{angle:f,deltaX:m}=Eo(i[0],i[1]);o=me[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(me,e.arrowTypeEnd)){const{angle:f,deltaX:m}=Eo(i[i.length-1],i[i.length-2]);o=me[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const a=Math.abs(Xt(t).x-Xt(i[i.length-1]).x),n=Math.abs(Xt(t).y-Xt(i[i.length-1]).y),l=Math.abs(Xt(t).x-Xt(i[0]).x),c=Math.abs(Xt(t).y-Xt(i[0]).y),h=me[e.arrowTypeStart],u=me[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=s==="right"?-1:1,o-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=s==="right"?-1:1,o+=f}return Xt(t).x+o},"x"),y:p(function(t,r,i){let o=0;const s=Xt(i[0]).y<Xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(me,e.arrowTypeStart)){const{angle:f,deltaY:m}=Eo(i[0],i[1]);o=me[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(me,e.arrowTypeEnd)){const{angle:f,deltaY:m}=Eo(i[i.length-1],i[i.length-2]);o=me[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const a=Math.abs(Xt(t).y-Xt(i[i.length-1]).y),n=Math.abs(Xt(t).x-Xt(i[i.length-1]).x),l=Math.abs(Xt(t).y-Xt(i[0]).y),c=Math.abs(Xt(t).x-Xt(i[0]).x),h=me[e.arrowTypeStart],u=me[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=s==="up"?-1:1,o-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=s==="up"?-1:1,o+=f}return Xt(t).y+o},"y")}),"getLineFunctionsWithOffset"),yL=p((e,t,r,i,o,s=!1,a)=>{t.arrowTypeStart&&Bd(e,"start",t.arrowTypeStart,r,i,o,s,a),t.arrowTypeEnd&&Bd(e,"end",t.arrowTypeEnd,r,i,o,s,a)},"addEdgeMarkers"),CL={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},xL=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Bd=p((e,t,r,i,o,s,a=!1,n)=>{if(!r||r==="none")return;const l=CL[r],c=l&&xL.includes(l.type);if(!l){N.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${o}_${s}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(f);if(C){const x=C.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",n),l.fill&&T.setAttribute("fill",n)}),C.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),bL=p(e=>typeof e=="string"?e:It()?.flowchart?.curve,"resolveEdgeCurveType"),Ji=new Map,Jt=new Map,kL=p(()=>{Ji.clear(),Jt.clear()},"clear"),my=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),wo=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Ih=p(async(e,t)=>{const r=It();let i=Ce(r);const{labelStyles:o}=pt(t);t.labelStyle=o;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Xe(e,t.label,{style:wo(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),N.info("abc82",t,t.labelType);let h,u;if(i){const f=c.children[0],m=At(c);h=await li.measure(()=>f.getBoundingClientRect()),u=h,m.attr("width",h.width),m.attr("height",h.height)}else{const f=At(c).select("text").node();await li.measure(()=>{h=c.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=h})}a.attr("transform",ko(u,i)),Ji.set(t.id,s),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Rr(m,t.startLabelLeft,wo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=At(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",ko(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).startLeft=f,Ao(d,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Rr(m,t.startLabelRight,wo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=At(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",ko(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).startRight=f,Ao(d,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Rr(f,t.endLabelLeft,wo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=At(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",ko(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).endLeft=f,Ao(d,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Rr(f,t.endLabelRight,wo(t.labelStyle)||"",!1,!1);d=y;let C=y.getBBox();if(i){const x=y.children[0],k=At(y);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}m.attr("transform",ko(C,i)),Jt.get(t.id)||Jt.set(t.id,{}),Jt.get(t.id).endRight=f,Ao(d,t.endLabelRight)}return c},"insertEdgeLabel");function Ao(e,t){Ce(It())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Ao,"setTerminalWidth");var wL=p((e,t)=>{N.debug("Moving label abc88 ",e.id,e.label,Ji.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=It(),{subGraphTitleTotalMargin:o}=Fa(i);if(e.label){const s=Ji.get(e.id);let a=e.x,n=e.y;if(r){const l=ye.calcLabelPosition(r);N.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e.startLabelLeft){const s=Jt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),TL=p((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,o=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return o<.001||s<.001?t:s>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),_L=p((e,t)=>{const r=e.x,i=e.y,o=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return o>=a||s>=n},"outsideNode"),SL=p((e,t,r)=>{N.debug(`intersection calc abc89:
262
+ outsidePoint: ${JSON.stringify(t)}
263
+ insidePoint : ${JSON.stringify(r)}
264
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,s=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(o-t.y)*a>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-o:o-l-t.y;n=h*u/c;const d={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),N.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,d),d}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let u=c*n/h,d=r.x<t.x?r.x+h-n:r.x-h+n,f=r.y<t.y?r.y+u:r.y-u;return N.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:d,_y:f}),n===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),Ld=p((e,t)=>{N.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],o=!1;return e.forEach(s=>{if(N.info("abc88 checking point",s,t),!_L(t,s)&&!o){const a=SL(t,i,s);N.debug("abc88 inside",s,i,a),N.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?N.warn("abc88 no intersect",a,r):r.push(a),o=!0}else N.warn("abc88 outside",s,i),i=s,o||r.push(s)}),N.debug("returning points",r),r},"cutPathAtIntersect");function yy(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const o=e[i-1],s=e[i],a=e[i+1];(o.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===a.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(yy,"extractCornerPoints");var Fd=p(function(e,t,r){const i=t.x-e.x,o=t.y-e.y,s=Math.sqrt(i*i+o*o),a=r/s;return{x:t.x-a*i,y:t.y-a*o}},"findAdjacentPoint"),vL=p(function(e){const{cornerPointPositions:t}=yy(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const o=e[i-1],s=e[i+1],a=e[i],n=Fd(o,a,5),l=Fd(s,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:a.x,y:a.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){N.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));const f=5;a.x===n.x?d={x:c<0?n.x-f+u:n.x+f-u,y:h<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:h<0?n.y-f+u:n.y+f-u}}else N.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),BL=p((e,t,r)=>{const i=e-t-r,o=2,s=2,a=o+s,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${o} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),Cy=p(function(e,t,r,i,o,s,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=It();let h=t.points,u=!1;const d=o;var f=s;const m=[];for(const R in t.cssCompiledStyles)Kp(R)||m.push(t.cssCompiledStyles[R]);if(c==="swimlane"){if(f.intersect&&d.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[d.intersect(h[0]),f.intersect(h[1])];else{const R=h.slice(1,-1),at=R[0],J=R[R.length-1],mt=.5,wt=Math.abs(h[h.length-1].x-J.x)<mt&&Math.abs(h[h.length-1].y-J.y)<mt,Tt=d.intersect(at),Et=wt?J:f.intersect(J),Lt=Math.abs(Et.x-J.x)<mt&&Math.abs(Et.y-J.y)<mt,kt=Math.abs(Tt.x-at.x)<mt&&Math.abs(Tt.y-at.y)<mt?[]:[Tt],Ot=Lt?[]:[Et];h=[...kt,...R,...Ot]}h=TL(t,h)}else f.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),h.push(f.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(N.info("to cluster abc88",r.get(t.toCluster)),h=Ld(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(N.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Ld(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=h.filter(R=>!Number.isNaN(R.y));const x=bL(t.curve);x!=="rounded"&&(C=vL(C));let k=Po;switch(x){case"linear":k=Po;break;case"basis":k=gl;break;case"cardinal":k=Ip;break;case"bumpX":k=Ap;break;case"bumpY":k=Mp;break;case"catmullRom":k=Rp;break;case"monotoneX":k=Yp;break;case"monotoneY":k=Up;break;case"natural":k=Gp;break;case"step":k=Xp;break;case"stepAfter":k=Zp;break;case"stepBefore":k=Vp;break;case"rounded":k=Po;break;default:k=gl}const{x:T,y:S}=mL(t),v=yS().x(T).y(S).curve(k);let A;switch(t.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(t.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let L,E=x==="rounded"?xy(by(C,t),5):v(C);const Z=Array.isArray(t.style)?t.style:[t.style];let Y=Z.find(R=>R?.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let st=!1;if(t.look==="handDrawn"){const R=ut.svg(e);Object.assign([],C);const at=R.path(E,{roughness:.3,seed:l});A+=" transition",L=At(at).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+A+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",Z?Z.reduce((mt,wt)=>mt+";"+wt,""):"");let J=L.attr("d");L.attr("d",J),e.node().appendChild(L.node())}else{const R=m.join(";"),at=Z?Z.reduce((Lt,nt)=>Lt+nt+";",""):"",J=(R?R+";"+at+";":at)+";"+(Z?Z.reduce((Lt,nt)=>Lt+";"+nt,""):"");L=e.append("path").attr("d",E).attr("id",`${a}-${t.id}`).attr("class"," "+A+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",J),Y=J.match(/stroke:([^;]+)/)?.[1],st=t.animate===!0||!!t.animation||R.includes("animation");const mt=L.node(),wt=typeof mt.getTotalLength=="function"?mt.getTotalLength():0,Tt=vd[t.arrowTypeStart]||0,Et=vd[t.arrowTypeEnd]||0;if(t.look==="neo"&&!st){const nt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?BL(wt,Tt,Et):`0 ${Tt} ${wt-Tt-Et} ${Et}`}; stroke-dashoffset: 0;`;L.attr("style",nt+L.attr("style"))}}L.attr("data-edge",!0),L.attr("data-et","edge"),L.attr("data-id",t.id),L.attr("data-points",y),L.attr("data-look",ie(t.look)),t.showPoints&&C.forEach(R=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",R.x).attr("cy",R.y)});let U="";(It().flowchart.arrowMarkerAbsolute||It().state.arrowMarkerAbsolute)&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),N.info("arrowTypeStart",t.arrowTypeStart),N.info("arrowTypeEnd",t.arrowTypeEnd);const O=!st&&t?.look==="neo";yL(L,t,U,a,i,O,Y);const D=Math.floor(h.length/2),B=h[D];ye.isLabelCoordinateInPath(B,L.attr("d"))||(u=!0);let q={};return u&&(q.updatedPath=h),q.originalPath=t.points,q},"insertEdge");function xy(e,t){if(e.length<2)return"";let r="";const i=e.length,o=1e-5;for(let s=0;s<i;s++){const a=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,u=l.x-a.x,d=l.y-a.y,f=Math.hypot(c,h),m=Math.hypot(u,d);if(f<o||m<o){r+=`L${a.x},${a.y}`;continue}const y=c/f,C=h/f,x=u/m,k=d/m,T=y*x+C*k,S=Math.max(-1,Math.min(1,T)),v=Math.acos(S);if(v<o||Math.abs(Math.PI-v)<o){r+=`L${a.x},${a.y}`;continue}const A=Math.min(t/Math.sin(v/2),f/2,m/2),L=a.x-y*A,E=a.y-C*A,Z=a.x+x*A,Y=a.y+k*A;r+=`L${L},${E}`,r+=`Q${a.x},${a.y} ${Z},${Y}`}}return r}p(xy,"generateRoundedPath");function Fl(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Fl,"calculateDeltaAndAngle");function by(e,t){const r=e.map(o=>({...o}));if(e.length>=2&&me[t.arrowTypeStart]){const o=me[t.arrowTypeStart],s=e[0],a=e[1],{angle:n}=Fl(s,a),l=o*Math.cos(n),c=o*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&me[t.arrowTypeEnd]){const o=me[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:n}=Fl(a,s),l=o*Math.cos(n),c=o*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}p(by,"applyMarkerOffsetsToPoints");var LL=p((e,t,r,i)=>{t.forEach(o=>{KL[o](e,r,i)})},"insertMarkers"),FL=p((e,t,r)=>{N.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",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),EL=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),AL=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ML=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$L=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").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").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),OL=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),DL=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),IL=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),PL=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),RL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{transitionColor:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),NL=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),qL=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),zL=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),WL=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),HL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),YL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,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").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=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("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),UL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),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("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),jL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s,mainBkg:a}=o,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("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=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").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),GL=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
265
+ L20,10
266
+ M20,10
267
+ L0,20`)},"requirement_arrow"),XL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o;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").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
268
+ L20,10
269
+ M20,10
270
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),VL=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),ZL=p((e,t,r)=>{const i=Vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=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").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),KL={extension:FL,composition:EL,aggregation:AL,dependency:ML,lollipop:$L,point:OL,circle:DL,cross:IL,barb:PL,barbNeo:RL,only_one:NL,zero_or_one:qL,one_or_more:zL,zero_or_more:WL,only_one_neo:HL,zero_or_one_neo:YL,one_or_more_neo:UL,zero_or_more_neo:jL,requirement_arrow:GL,requirement_contains:VL,requirement_arrow_neo:XL,requirement_contains_neo:ZL},ky=LL,QL="\0",Xr="\0",Ed="";class Aa{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=To(void 0),this._defaultEdgeLabelFn=To(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Xr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Rs(t)||(t=To(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return er(this._nodes)}sources(){var t=this;return fs(this.nodes(),function(r){return Xc(t._in[r])})}sinks(){var t=this;return fs(this.nodes(),function(r){return Xc(t._out[r])})}setNodes(t,r){var i=arguments,o=this;return jr(t,function(s){i.length>1?o.setNode(s,r):o.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Xr,this._children[t]={},this._children[Xr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],jr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),jr(er(this._in[t]),r),delete this._in[t],delete this._preds[t],jr(er(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ti(r))r=Xr;else{r+="";for(var i=r;!Ti(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Xr)return r}}children(t){if(Ti(t)&&(t=Xr),this._isCompound){var r=this._children[t];if(r)return er(r)}else{if(t===Xr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return er(r)}successors(t){var r=this._sucs[t];if(r)return er(r)}neighbors(t){var r=this.predecessors(t);if(r)return Q1(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;jr(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),jr(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var o={};function s(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(o[a]=n,n):n in o?o[n]:s(n)}return this._isCompound&&jr(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return Rs(t)||(t=To(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Ja(this._edgeObjs)}setPath(t,r){var i=this,o=arguments;return G1(t,function(s,a){return o.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var t,r,i,o,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(o=arguments[1],s=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(o=arguments[2],s=!0)),t=""+t,r=""+r,Ti(i)||(i=""+i);var n=Mo(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return s&&(this._edgeLabels[n]=o),this;if(!Ti(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=s?o:this._defaultEdgeLabelFn(t,r,i);var l=JL(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Ad(this._preds[r],t),Ad(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var o=arguments.length===1?_n(this._isDirected,arguments[0]):Mo(this._isDirected,t,r,i);return this._edgeLabels[o]}hasEdge(t,r,i){var o=arguments.length===1?_n(this._isDirected,arguments[0]):Mo(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,r,i){var o=arguments.length===1?_n(this._isDirected,arguments[0]):Mo(this._isDirected,t,r,i),s=this._edgeObjs[o];return s&&(t=s.v,r=s.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Md(this._preds[r],t),Md(this._sucs[t],r),delete this._in[r][o],delete this._out[t][o],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var o=Ja(i);return r?fs(o,function(s){return s.v===r}):o}}outEdges(t,r){var i=this._out[t];if(i){var o=Ja(i);return r?fs(o,function(s){return s.w===r}):o}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Aa.prototype._nodeCount=0;Aa.prototype._edgeCount=0;function Ad(e,t){e[t]?e[t]++:e[t]=1}function Md(e,t){--e[t]||delete e[t]}function Mo(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}return o+Ed+s+Ed+(Ti(i)?QL:i)}function JL(e,t,r,i){var o=""+t,s=""+r;if(!e&&o>s){var a=o;o=s,s=a}var n={v:o,w:s};return i&&(n.name=i),n}function _n(e,t){return Mo(e,t.v,t.w,t.name)}function wy(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),o=r.insert("g").attr("class",t),s=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:o,edgeLabels:s,nodes:a,rootGroups:r}}p(wy,"createLayoutElementGroups");async function Ty(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await Ct(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}p(Ty,"measureGroupLabel");async function _y(e,t,r){const i=await Dh(e,t,r),o=i.node()?.getBBox()??{width:0,height:0};return t.width=o.width,t.height=o.height,i}p(_y,"insertMeasuredNode");async function Sy(e,t){const r=new Aa({multigraph:!0,compound:!0}),i=[...t.edges],o=It(),s=wy(e),{edgeLabels:a,nodes:n}=s,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Ty(n,h),r.setNode(h.id,{...h});else{if(c){const u=await _y(n,h,{config:o,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&my(h)&&await Ih(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(d=>d.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await $t(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-B7ZoWp62.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3]),import.meta.url);h(e,t)}return{graph:r,groups:s,nodeElements:l}}p(Sy,"createGraphWithElements");var Pt=new Map,ti=new Map,vy=new Map,tF=p(()=>{ti.clear(),vy.clear(),Pt.clear()},"clear"),Xo=p((e,t)=>{const r=ti.get(t)||[];return N.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),eF=p((e,t)=>{const r=ti.get(t)||[];return N.info("Descendants of ",t," is ",r),N.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Xo(e.v,t)||Xo(e.w,t)||r.includes(e.w):(N.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),By=p((e,t,r,i)=>{N.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const o=t.children(e)||[];e!==i&&o.push(e),N.debug("Copying (nodes) clusterId",e,"nodes",o),o.forEach(s=>{if(t.children(s).length>0)By(s,t,r,i);else{const a=t.node(s);N.info("cp ",s," to ",i," with parent ",e),r.setNode(s,a),i!==t.parent(s)&&(N.debug("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==i&&s!==e?(N.debug("Setting parent",s,e),r.setParent(s,e)):(N.info("In copy ",e,"root",i,"data",t.node(e),i),N.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==i,"node!==clusterId",s!==e));const n=t.edges(s);N.debug("Copying Edges",n),n.forEach(l=>{N.info("Edge",l);const c=t.edge(l.v,l.w,l.name);N.info("Edge data",c,i);try{eF(l,i)?(N.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),N.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):N.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){N.error(h)}})}N.debug("Removing node",s),t.removeNode(s)})},"copy"),Ly=p((e,t)=>{const r=t.children(e);let i=[...r];for(const o of r)vy.set(o,e),i=[...i,...Ly(o,t)];return i},"extractDescendants"),rF=p((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),o=e.edges().filter(l=>l.v===r||l.w===r),s=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=o.map(l=>({v:l.v,w:l.w}));return s.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),ha=p((e,t,r)=>{const i=t.children(e);if(N.trace("Searching children of id ",e,i),i.length<1)return e;let o;for(const s of i){const a=ha(s,t,r),n=rF(t,r,a);if(a)if(n.length>0)o=a;else return a}return o},"findNonClusterChild"),$d=p(e=>!Pt.has(e)||!Pt.get(e).externalConnections?e:Pt.has(e)?Pt.get(e).id:e,"getAnchorId"),x5=p((e,t)=>{if(!e||t>10){N.debug("Opting out, no graph ");return}else N.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(N.debug("Cluster identified",r," Replacement id in edges: ",ha(r,e,r)),ti.set(r,Ly(r,e)),Pt.set(r,{id:ha(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){const i=e.children(r),o=e.edges();i.length>0?(N.debug("Cluster identified",r,ti),o.forEach(s=>{const a=Xo(s.v,r),n=Xo(s.w,r);a^n&&(N.debug("Edge: ",s," leaves cluster ",r),N.debug("Descendants of XXX ",r,": ",ti.get(r)),Pt.get(r).externalConnections=!0)})):N.debug("Not a cluster ",r,ti)});for(let r of Pt.keys()){const i=Pt.get(r).id,o=e.parent(i);o!==r&&Pt.has(o)&&!Pt.get(o).externalConnections&&(Pt.get(r).id=o);const s=e.edges().some(a=>a.v===r);if(i&&Pt.get(r)?.externalConnections&&s&&Ay(e,i,r)){const a=iF(e,r,e.parent(i));a&&(Pt.get(r).id=a)}}e.edges().forEach(function(r){const i=e.edge(r);N.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),N.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let o=r.v,s=r.w;if(N.debug("Fix XXX",Pt,"ids:",r.v,r.w,"Translating: ",Pt.get(r.v)," --- ",Pt.get(r.w)),Pt.get(r.v)||Pt.get(r.w)){if(N.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),o=$d(r.v),s=$d(r.w),e.removeEdge(r.v,r.w,r.name),o!==r.v){const a=e.parent(o);Pt.get(a).externalConnections=!0,i.fromCluster=r.v}if(s!==r.w){const a=e.parent(s);Pt.get(a).externalConnections=!0,i.toCluster=r.w}N.debug("Fix Replacing with XXX",o,s,r.name),e.setEdge(o,s,i,r.name)}}),Fy(e,0),N.trace(Pt)},"adjustClustersAndEdges"),Fy=p((e,t)=>{if(t>10){N.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const s=e.children(o);i=i||s.length>0}if(!i){N.debug("Done, no node has children",e.nodes());return}N.debug("Nodes = ",r,t);for(const o of r)if(N.debug("Extracting node",o,Pt,Pt.has(o)&&!Pt.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Pt.has(o))N.debug("Not a cluster",o,t);else if(!Pt.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){N.debug("Cluster without external connections, without a parent and with children",o,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Pt.get(o)?.clusterData?.dir&&(a=Pt.get(o).clusterData.dir,N.debug("Fixing dir",Pt.get(o).clusterData.dir,a));const n=new Aa({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});By(o,e,n,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Pt.get(o).clusterData,label:Pt.get(o).label,graph:n})}else N.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Pt.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),N.debug(Pt);r=e.nodes(),N.debug("New list of nodes",r);for(const o of r){const s=e.node(o);N.debug(" Now next level",o,s),s?.clusterNode&&Fy(s.graph,t+1)}},"extractor"),Ey=p((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const o=e.children(i),s=Ey(e,o);r=[...r,...s]}),r},"sorter"),b5=p(e=>Ey(e,e.children()),"sortNodesByHierarchy"),Ay=p((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const o=Pt.get(i);if(o&&!o.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),iF=p((e,t,r)=>{const i=e.children(t)??[];for(const o of i){if(o===r||Xo(o,r))continue;const s=ha(o,e,t);if(s&&!Ay(e,s,t))return s}return null},"findSafeAnchorNode");function My({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:o,paintOptions:s}){const a=t??Rh;return p(async function(l,c,h,u){const d=c.select("g");(h?.insertMarkers??ky)(d,l.markers,l.type,l.diagramId),Ph();const f={element:d,helpers:h,options:u};f.preparedLayout=await e?.(l,f);const m=await a(l,f),y=await r(l,f),C={...f,measure:m};i?await i(l,C,y):await Nh(l,C,s),await o?.(l,C,y)},"render")}p(My,"createCommonLayoutRenderer");function Ph(){nL(),kL(),gL(),tF()}p(Ph,"clearLayoutRenderState");async function Rh(e,{element:t}){return await Sy(t,e)}p(Rh,"defaultMeasureLayout");async function Nh(e,t,r={}){const{measure:i}=t,{groups:o}=i;for(const a of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(a,t)||await $y(o,a,t,r);const s=Dy(e.nodes);for(const a of e.edges)Iy(a,r)||await Py(o,a,s,e,r,t)}p(Nh,"paintLayoutData");async function $y(e,t,r,i){t.clusterNode?Sd(t):Oy(t,r,i)?await gy(e.clusters,t):Sd(t)}p($y,"paintLayoutNode");function Oy(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}p(Oy,"shouldPaintAsCluster");function Dy(e){const t=new Map;for(const r of e)r?.id&&t.set(r.id,r);return t}p(Dy,"buildNodeLookup");function Iy(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}p(Iy,"shouldSkipPaintEdge");async function Py(e,t,r,i,o,s){const a=Cy(e.edgePaths,{...t},o.clusterDb??new Map,i.type,El(t.start,t,r,s,o),El(t.end,t,r,s,o),i.diagramId,Ry(t,o));my(t)&&(Ji.has(t.id)||await Ih(e.edgeLabels,t),Ny(t,a))}p(Py,"paintLayoutEdge");function El(e,t,r,i,o){return o.getEdgeNode?.(e,t,i)??(e?r.get(e)??{}:{})}p(El,"getRenderedNode");function Ry(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}p(Ry,"shouldSkipIntersect");function Ny(e,t){const r=t?.updatedPath??t?.originalPath,i=Vt(),{subGraphTitleTotalMargin:o}=Fa({flowchart:i.flowchart??{}});if(e.label){const s=Ji.get(e.id);let a=e.x,n=e.y;if(r){const l=ye.calcLabelPosition(r);N.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t?.updatedPath&&(a=l.x,n=l.y)}s.attr("transform",`translate(${a}, ${n+o/2})`)}if(e?.startLabelLeft){const s=Jt.get(e.id).startLeft;let a=e?.x,n=e?.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const s=Jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const s=Jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const s=Jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}s.attr("transform",`translate(${a}, ${n})`)}}p(Ny,"positionRenderedEdgeLabel");function qy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(qy,"getDefaultExportFromCjs");var pe={},Ss={},Dr={},Od;function oo(){if(Od)return Dr;Od=1;function e(a){return typeof a>"u"||a===null}p(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}p(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}p(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];a[u]=n[u]}}return a}p(i,"extend");function o(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}p(o,"repeat");function s(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return p(s,"isNegativeZero"),Dr.isNothing=e,Dr.isObject=t,Dr.toArray=r,Dr.repeat=o,Dr.isNegativeZero=s,Dr.extend=i,Dr}p(oo,"requireCommon");var Sn,Dd;function so(){if(Dd)return Sn;Dd=1;function e(r,i){let o="";const s=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(o+=`
271
+
272
+ `+r.mark.snippet),s+" "+o):s}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Sn=t,Sn}p(so,"requireException");var vn,Id;function zy(){if(Id)return vn;Id=1;const e=oo();function t(o,s,a,n,l){let c="",h="";const u=Math.floor(l/2)-1;return n-s>u&&(c=" ... ",s=n-u+c.length),a-n>u&&(h=" ...",a=n+u-h.length),{str:c+o.slice(s,a).replace(/\t/g,"→")+h,pos:n-s+c.length}}p(t,"getLine");function r(o,s){return e.repeat(" ",s-o.length)+o}p(r,"padStart");function i(o,s){if(s=Object.create(s||null),!o.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(o.buffer);)l.push(c.index),n.push(c.index+c[0].length),o.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let u="";const d=Math.min(o.line+s.linesAfter,l.length).toString().length,f=s.maxLength-(s.indent+d+3);for(let y=1;y<=s.linesBefore&&!(h-y<0);y++){const C=t(o.buffer,n[h-y],l[h-y],o.position-(n[h]-n[h-y]),f);u=e.repeat(" ",s.indent)+r((o.line-y+1).toString(),d)+" | "+C.str+`
273
+ `+u}const m=t(o.buffer,n[h],l[h],o.position,f);u+=e.repeat(" ",s.indent)+r((o.line+1).toString(),d)+" | "+m.str+`
274
+ `,u+=e.repeat("-",s.indent+d+3+m.pos)+`^
275
+ `;for(let y=1;y<=s.linesAfter&&!(h+y>=l.length);y++){const C=t(o.buffer,n[h+y],l[h+y],o.position-(n[h]-n[h+y]),f);u+=e.repeat(" ",s.indent)+r((o.line+y+1).toString(),d)+" | "+C.str+`
276
+ `}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),vn=i,vn}p(zy,"requireSnippet");var Bn,Pd;function xe(){if(Pd)return Bn;Pd=1;const e=so(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(s){const a={};return s!==null&&Object.keys(s).forEach(function(n){s[n].forEach(function(l){a[String(l)]=n})}),a}p(i,"compileStyleAliases");function o(s,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+s+'" YAML type.')}),this.options=a,this.tag=s,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return p(o,"Type2"),Bn=o,Bn}p(xe,"requireType");var Ln,Rd;function qh(){if(Rd)return Ln;Rd=1;const e=so(),t=xe();function r(s,a){const n=[];return s[a].forEach(function(l){let c=n.length;n.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),n[c]=l}),n}p(r,"compileList");function i(){const s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(s.multi[n.kind].push(n),s.multi.fallback.push(n)):s[n.kind][n.tag]=s.fallback[n.tag]=n}p(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return s}p(i,"compileMap");function o(s){return this.extend(s)}return p(o,"Schema2"),o.prototype.extend=p(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(o.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Ln=o,Ln}p(qh,"requireSchema");var Fn,Nd;function zh(){if(Nd)return Fn;Nd=1;const e=xe();return Fn=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Fn}p(zh,"requireStr");var En,qd;function Wh(){if(qd)return En;qd=1;const e=xe();return En=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),En}p(Wh,"requireSeq");var An,zd;function Hh(){if(zd)return An;zd=1;const e=xe();return An=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),An}p(Hh,"requireMap");var Mn,Wd;function Yh(){if(Wd)return Mn;Wd=1;const e=qh();return Mn=new e({explicit:[zh(),Wh(),Hh()]}),Mn}p(Yh,"requireFailsafe");var $n,Hd;function Uh(){if(Hd)return $n;Hd=1;const e=xe();function t(o){if(o===null)return!0;const s=o.length;return s===1&&o==="~"||s===4&&(o==="null"||o==="Null"||o==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(o){return o===null}return p(i,"isNull"),$n=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),$n}p(Uh,"require_null");var On,Yd;function jh(){if(Yd)return On;Yd=1;const e=xe();function t(o){if(o===null)return!1;const s=o.length;return s===4&&(o==="true"||o==="True"||o==="TRUE")||s===5&&(o==="false"||o==="False"||o==="FALSE")}p(t,"resolveYamlBoolean");function r(o){return o==="true"||o==="True"||o==="TRUE"}p(r,"constructYamlBoolean");function i(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return p(i,"isBoolean"),On=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(o){return o?"true":"false"},"lowercase"),uppercase:p(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),On}p(jh,"requireBool");var Dn,Ud;function Gh(){if(Ud)return Dn;Ud=1;const e=oo(),t=xe();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}p(r,"isHexCode");function i(c){return c>=48&&c<=55}p(i,"isOctCode");function o(c){return c>=48&&c<=57}p(o,"isDecCode");function s(c){if(c===null)return!1;const h=c.length;let u=0,d=!1;if(!h)return!1;let f=c[u];if((f==="-"||f==="+")&&(f=c[++u]),f==="0"){if(u+1===h)return!0;if(f=c[++u],f==="b"){for(u++;u<h;u++){if(f=c[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(a(c))}if(f==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}if(f==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}}for(;u<h;u++){if(!o(c.charCodeAt(u)))return!1;d=!0}return d?isFinite(a(c)):!1}p(s,"resolveYamlInteger");function a(c){let h=c,u=1,d=h[0];if((d==="-"||d==="+")&&(d==="-"&&(u=-1),h=h.slice(1),d=h[0]),h==="0")return 0;if(d==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}p(a,"parseYamlInteger");function n(c){return a(c)}p(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return p(l,"isInteger"),Dn=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:n,predicate:l,represent:{binary:p(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:p(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:p(function(c){return c.toString(10)},"decimal"),hexadecimal:p(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Dn}p(Gh,"requireInt");var In,jd;function Xh(){if(jd)return In;jd=1;const e=oo(),t=xe(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}p(o,"resolveYamlFloat");function s(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}p(s,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return a.test(u)?u.replace("e",".e"):u}p(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return p(l,"isFloat"),In=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:s,predicate:l,represent:n,defaultStyle:"lowercase"}),In}p(Xh,"requireFloat");var Pn,Gd;function Vh(){return Gd||(Gd=1,Pn=Yh().extend({implicit:[Uh(),jh(),Gh(),Xh()]})),Pn}p(Vh,"requireJson");var Rn,Xd;function Zh(){return Xd||(Xd=1,Rn=Vh()),Rn}p(Zh,"requireCore");var Nn,Vd;function Kh(){if(Vd)return Nn;Vd=1;const e=xe(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}p(i,"resolveYamlTimestamp");function o(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,d=+c[3];if(!c[4])return new Date(Date.UTC(h,u,d));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],k=+(c[11]||0);l=(x*60+k)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,u,d,f,m,y,n));return l&&C.setTime(C.getTime()-l),C}p(o,"constructYamlTimestamp");function s(a){return a.toISOString()}return p(s,"representYamlTimestamp"),Nn=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:o,instanceOf:Date,represent:s}),Nn}p(Kh,"requireTimestamp");var qn,Zd;function Qh(){if(Zd)return qn;Zd=1;const e=xe();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),qn=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),qn}p(Qh,"requireMerge");var zn,Kd;function Jh(){if(Kd)return zn;Kd=1;const e=xe(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
277
+ \r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(a.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}p(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let f=0;f<l;f++)f%4===0&&f&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(f));const d=l%4*6;return d===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):d===18?(u.push(h>>10&255),u.push(h>>2&255)):d===12&&u.push(h>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function o(a){let n="",l=0;const c=a.length,h=t;for(let d=0;d<c;d++)d%3===0&&d&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[d];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}p(o,"representYamlBinary");function s(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return p(s,"isBinary"),zn=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:o}),zn}p(Jh,"requireBinary");var Wn,Qd;function tc(){if(Qd)return Wn;Qd=1;const e=xe(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(s){if(s===null)return!0;const a=[],n=s;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let d;for(d in h)if(t.call(h,d))if(!u)u=!0;else return!1;if(!u)return!1;if(a.indexOf(d)===-1)a.push(d);else return!1}return!0}p(i,"resolveYamlOmap");function o(s){return s!==null?s:[]}return p(o,"constructYamlOmap"),Wn=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o}),Wn}p(tc,"requireOmap");var Hn,Jd;function ec(){if(Jd)return Hn;Jd=1;const e=xe(),t=Object.prototype.toString;function r(o){if(o===null)return!0;const s=o,a=new Array(s.length);for(let n=0,l=s.length;n<l;n+=1){const c=s[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}p(r,"resolveYamlPairs");function i(o){if(o===null)return[];const s=o,a=new Array(s.length);for(let n=0,l=s.length;n<l;n+=1){const c=s[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return p(i,"constructYamlPairs"),Hn=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Hn}p(ec,"requirePairs");var Yn,tf;function rc(){if(tf)return Yn;tf=1;const e=xe(),t=Object.prototype.hasOwnProperty;function r(o){if(o===null)return!0;const s=o;for(const a in s)if(t.call(s,a)&&s[a]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(o){return o!==null?o:{}}return p(i,"constructYamlSet"),Yn=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Yn}p(rc,"requireSet");var Un,ef;function Ma(){return ef||(ef=1,Un=Zh().extend({implicit:[Kh(),Qh()],explicit:[Jh(),tc(),ec(),rc()]})),Un}p(Ma,"require_default");var rf;function Wy(){if(rf)return Ss;rf=1;const e=oo(),t=so(),r=zy(),i=Ma(),o=Object.prototype.hasOwnProperty,s=1,a=2,n=3,l=4,c=1,h=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(g){return Object.prototype.toString.call(g)}p(x,"_class");function k(g){return g===10||g===13}p(k,"isEol");function T(g){return g===9||g===32}p(T,"isWhiteSpace");function S(g){return g===9||g===32||g===10||g===13}p(S,"isWsOrEol");function v(g){return g===44||g===91||g===93||g===123||g===125}p(v,"isFlowIndicator");function A(g){if(g>=48&&g<=57)return g-48;const $=g|32;return $>=97&&$<=102?$-97+10:-1}p(A,"fromHexCode");function L(g){return g===120?2:g===117?4:g===85?8:0}p(L,"escapedHexLen");function E(g){return g>=48&&g<=57?g-48:-1}p(E,"fromDecimalCode");function Z(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
278
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(Z,"simpleEscapeSequence");function Y(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(Y,"charFromCodepoint");function P(g,$,j){$==="__proto__"?Object.defineProperty(g,$,{configurable:!0,enumerable:!0,writable:!0,value:j}):g[$]=j}p(P,"setProperty");const st=new Array(256),U=new Array(256);for(let g=0;g<256;g++)st[g]=Z(g)?1:0,U[g]=Z(g);function O(g,$){this.input=g,this.filename=$.filename||null,this.schema=$.schema||i,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth=="number"?$.maxDepth:100,this.maxTotalMergeKeys=typeof $.maxTotalMergeKeys=="number"?$.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(O,"State");function D(g,$){const j={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return j.snippet=r(j),new t($,j)}p(D,"generateError");function B(g,$){throw D(g,$)}p(B,"throwError");function q(g,$){g.onWarning&&g.onWarning.call(null,D(g,$))}p(q,"throwWarning");function R(g,$,j){const X=g.anchorMapTransactions;if(X.length!==0){const H=X[X.length-1];o.call(H,$)||(H[$]={existed:o.call(g.anchorMap,$),value:g.anchorMap[$]})}g.anchorMap[$]=j}p(R,"storeAnchor");function at(g){g.anchorMapTransactions.push(Object.create(null))}p(at,"beginAnchorTransaction");function J(g){const $=g.anchorMapTransactions.pop(),j=g.anchorMapTransactions;if(j.length===0)return;const X=j[j.length-1],H=Object.keys($);for(let ot=0,w=H.length;ot<w;ot+=1){const I=H[ot];o.call(X,I)||(X[I]=$[I])}}p(J,"commitAnchorTransaction");function mt(g){const $=g.anchorMapTransactions.pop(),j=Object.keys($);for(let X=j.length-1;X>=0;X-=1){const H=$[j[X]];H.existed?g.anchorMap[j[X]]=H.value:delete g.anchorMap[j[X]]}}p(mt,"rollbackAnchorTransaction");function wt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}p(wt,"snapshotState");function Tt(g,$){g.position=$.position,g.line=$.line,g.lineStart=$.lineStart,g.lineIndent=$.lineIndent,g.firstTabInLine=$.firstTabInLine,g.tag=$.tag,g.anchor=$.anchor,g.kind=$.kind,g.result=$.result}p(Tt,"restoreState");const Et={YAML:p(function($,j,X){$.version!==null&&B($,"duplication of %YAML directive"),X.length!==1&&B($,"YAML directive accepts exactly one argument");const H=/^([0-9]+)\.([0-9]+)$/.exec(X[0]);H===null&&B($,"ill-formed argument of the YAML directive");const ot=parseInt(H[1],10),w=parseInt(H[2],10);ot!==1&&B($,"unacceptable YAML version of the document"),$.version=X[0],$.checkLineBreaks=w<2,w!==1&&w!==2&&q($,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function($,j,X){let H;X.length!==2&&B($,"TAG directive accepts exactly two arguments");const ot=X[0];H=X[1],y.test(ot)||B($,"ill-formed tag handle (first argument) of the TAG directive"),o.call($.tagMap,ot)&&B($,'there is a previously declared suffix for "'+ot+'" tag handle'),C.test(H)||B($,"ill-formed tag prefix (second argument) of the TAG directive");try{H=decodeURIComponent(H)}catch{B($,"tag prefix is malformed: "+H)}$.tagMap[ot]=H},"handleTagDirective")};function Lt(g,$,j,X){if($<j){const H=g.input.slice($,j);if(X)for(let ot=0,w=H.length;ot<w;ot+=1){const I=H.charCodeAt(ot);I===9||I>=32&&I<=1114111||B(g,"expected valid JSON character")}else d.test(H)&&B(g,"the stream contains non-printable characters");g.result+=H}}p(Lt,"captureSegment");function nt(g,$,j,X){e.isObject(j)||B(g,"cannot merge mappings; the provided source object is unacceptable");const H=Object.keys(j);for(let ot=0,w=H.length;ot<w;ot+=1){const I=H[ot];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&B(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),o.call($,I)||(P($,I,j[I]),X[I]=!0)}}p(nt,"mergeMappings");function kt(g,$,j,X,H,ot,w,I,tt){if(Array.isArray(H)){H=Array.prototype.slice.call(H);for(let G=0,V=H.length;G<V;G+=1)Array.isArray(H[G])&&B(g,"nested arrays are not supported inside keys"),typeof H=="object"&&x(H[G])==="[object Object]"&&(H[G]="[object Object]")}if(typeof H=="object"&&x(H)==="[object Object]"&&(H="[object Object]"),H=String(H),$===null&&($={}),X==="tag:yaml.org,2002:merge")if(Array.isArray(ot))for(let G=0,V=ot.length;G<V;G+=1)nt(g,$,ot[G],j);else nt(g,$,ot,j);else!g.json&&!o.call(j,H)&&o.call($,H)&&(g.line=w||g.line,g.lineStart=I||g.lineStart,g.position=tt||g.position,B(g,"duplicated mapping key")),P($,H,ot),delete j[H];return $}p(kt,"storeMappingPair");function Ot(g){const $=g.input.charCodeAt(g.position);$===10?g.position++:$===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):B(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(Ot,"readLineBreak");function vt(g,$,j){let X=0,H=g.input.charCodeAt(g.position);for(;H!==0;){for(;T(H);)H===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),H=g.input.charCodeAt(++g.position);if($&&H===35)do H=g.input.charCodeAt(++g.position);while(H!==10&&H!==13&&H!==0);if(k(H))for(Ot(g),H=g.input.charCodeAt(g.position),X++,g.lineIndent=0;H===32;)g.lineIndent++,H=g.input.charCodeAt(++g.position);else break}return j!==-1&&X!==0&&g.lineIndent<j&&q(g,"deficient indentation"),X}p(vt,"skipSeparationSpace");function Nt(g){let $=g.position,j=g.input.charCodeAt($);return!!((j===45||j===46)&&j===g.input.charCodeAt($+1)&&j===g.input.charCodeAt($+2)&&($+=3,j=g.input.charCodeAt($),j===0||S(j)))}p(Nt,"testDocumentSeparator");function Wt(g,$){$===1?g.result+=" ":$>1&&(g.result+=e.repeat(`
279
+ `,$-1))}p(Wt,"writeFoldedLines");function le(g,$,j){let X,H,ot,w,I,tt;const G=g.kind,V=g.result;let it=g.input.charCodeAt(g.position);if(S(it)||v(it)||it===35||it===38||it===42||it===33||it===124||it===62||it===39||it===34||it===37||it===64||it===96)return!1;if(it===63||it===45){const et=g.input.charCodeAt(g.position+1);if(S(et)||j&&v(et))return!1}for(g.kind="scalar",g.result="",X=H=g.position,ot=!1;it!==0;){if(it===58){const et=g.input.charCodeAt(g.position+1);if(S(et)||j&&v(et))break}else if(it===35){const et=g.input.charCodeAt(g.position-1);if(S(et))break}else{if(g.position===g.lineStart&&Nt(g)||j&&v(it))break;if(k(it))if(w=g.line,I=g.lineStart,tt=g.lineIndent,vt(g,!1,-1),g.lineIndent>=$){ot=!0,it=g.input.charCodeAt(g.position);continue}else{g.position=H,g.line=w,g.lineStart=I,g.lineIndent=tt;break}}ot&&(Lt(g,X,H,!1),Wt(g,g.line-w),X=H=g.position,ot=!1),T(it)||(H=g.position+1),it=g.input.charCodeAt(++g.position)}return Lt(g,X,H,!1),g.result?!0:(g.kind=G,g.result=V,!1)}p(le,"readPlainScalar");function we(g,$){let j,X,H=g.input.charCodeAt(g.position);if(H!==39)return!1;for(g.kind="scalar",g.result="",g.position++,j=X=g.position;(H=g.input.charCodeAt(g.position))!==0;)if(H===39)if(Lt(g,j,g.position,!0),H=g.input.charCodeAt(++g.position),H===39)j=g.position,g.position++,X=g.position;else return!0;else k(H)?(Lt(g,j,X,!0),Wt(g,vt(g,!1,$)),j=X=g.position):g.position===g.lineStart&&Nt(g)?B(g,"unexpected end of the document within a single quoted scalar"):(g.position++,T(H)||(X=g.position));B(g,"unexpected end of the stream within a single quoted scalar")}p(we,"readSingleQuotedScalar");function Oe(g,$){let j,X,H,ot=g.input.charCodeAt(g.position);if(ot!==34)return!1;for(g.kind="scalar",g.result="",g.position++,j=X=g.position;(ot=g.input.charCodeAt(g.position))!==0;){if(ot===34)return Lt(g,j,g.position,!0),g.position++,!0;if(ot===92){if(Lt(g,j,g.position,!0),ot=g.input.charCodeAt(++g.position),k(ot))vt(g,!1,$);else if(ot<256&&st[ot])g.result+=U[ot],g.position++;else if((H=L(ot))>0){let w=H,I=0;for(;w>0;w--)ot=g.input.charCodeAt(++g.position),(H=A(ot))>=0?I=(I<<4)+H:B(g,"expected hexadecimal character");g.result+=Y(I),g.position++}else B(g,"unknown escape sequence");j=X=g.position}else k(ot)?(Lt(g,j,X,!0),Wt(g,vt(g,!1,$)),j=X=g.position):g.position===g.lineStart&&Nt(g)?B(g,"unexpected end of the document within a double quoted scalar"):(g.position++,T(ot)||(X=g.position))}B(g,"unexpected end of the stream within a double quoted scalar")}p(Oe,"readDoubleQuotedScalar");function Br(g,$){let j=!0,X,H,ot;const w=g.tag;let I;const tt=g.anchor;let G,V,it,et;const dt=Object.create(null);let ht,gt,yt,Mt=g.input.charCodeAt(g.position);if(Mt===91)G=93,et=!1,I=[];else if(Mt===123)G=125,et=!0,I={};else return!1;for(g.anchor!==null&&R(g,g.anchor,I),Mt=g.input.charCodeAt(++g.position);Mt!==0;){if(vt(g,!0,$),Mt=g.input.charCodeAt(g.position),Mt===G)return g.position++,g.tag=w,g.anchor=tt,g.kind=et?"mapping":"sequence",g.result=I,!0;if(j?Mt===44&&B(g,"expected the node content, but found ','"):B(g,"missed comma between flow collection entries"),gt=ht=yt=null,V=it=!1,Mt===63){const jt=g.input.charCodeAt(g.position+1);S(jt)&&(V=it=!0,g.position++,vt(g,!0,$))}X=g.line,H=g.lineStart,ot=g.position,te(g,$,s,!1,!0),gt=g.tag,ht=g.result,vt(g,!0,$),Mt=g.input.charCodeAt(g.position),(it||g.line===X)&&Mt===58&&(V=!0,Mt=g.input.charCodeAt(++g.position),vt(g,!0,$),te(g,$,s,!1,!0),yt=g.result),et?kt(g,I,dt,gt,ht,yt,X,H,ot):V?I.push(kt(g,null,dt,gt,ht,yt,X,H,ot)):I.push(ht),vt(g,!0,$),Mt=g.input.charCodeAt(g.position),Mt===44?(j=!0,Mt=g.input.charCodeAt(++g.position)):j=!1}B(g,"unexpected end of the stream within a flow collection")}p(Br,"readFlowCollection");function Yt(g,$){let j,X=c,H=!1,ot=!1,w=$,I=0,tt=!1,G,V=g.input.charCodeAt(g.position);if(V===124)j=!1;else if(V===62)j=!0;else return!1;for(g.kind="scalar",g.result="";V!==0;)if(V=g.input.charCodeAt(++g.position),V===43||V===45)c===X?X=V===43?u:h:B(g,"repeat of a chomping mode identifier");else if((G=E(V))>=0)G===0?B(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):ot?B(g,"repeat of an indentation width identifier"):(w=$+G-1,ot=!0);else break;if(T(V)){do V=g.input.charCodeAt(++g.position);while(T(V));if(V===35)do V=g.input.charCodeAt(++g.position);while(!k(V)&&V!==0)}for(;V!==0;){for(Ot(g),g.lineIndent=0,V=g.input.charCodeAt(g.position);(!ot||g.lineIndent<w)&&V===32;)g.lineIndent++,V=g.input.charCodeAt(++g.position);if(!ot&&g.lineIndent>w&&(w=g.lineIndent),k(V)){I++;continue}if(!ot&&w===0&&B(g,"missing indentation for block scalar"),g.lineIndent<w){X===u?g.result+=e.repeat(`
280
+ `,H?1+I:I):X===c&&H&&(g.result+=`
281
+ `);break}j?T(V)?(tt=!0,g.result+=e.repeat(`
282
+ `,H?1+I:I)):tt?(tt=!1,g.result+=e.repeat(`
283
+ `,I+1)):I===0?H&&(g.result+=" "):g.result+=e.repeat(`
284
+ `,I):g.result+=e.repeat(`
285
+ `,H?1+I:I),H=!0,ot=!0,I=0;const it=g.position;for(;!k(V)&&V!==0;)V=g.input.charCodeAt(++g.position);Lt(g,it,g.position,!1)}return!0}p(Yt,"readBlockScalar");function Te(g,$){const j=g.tag,X=g.anchor,H=[];let ot=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&R(g,g.anchor,H);let w=g.input.charCodeAt(g.position);for(;w!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,B(g,"tab characters must not be used in indentation")),w===45);){const I=g.input.charCodeAt(g.position+1);if(!S(I))break;if(ot=!0,g.position++,vt(g,!0,-1)&&g.lineIndent<=$){H.push(null),w=g.input.charCodeAt(g.position);continue}const tt=g.line;if(te(g,$,n,!1,!0),H.push(g.result),vt(g,!0,-1),w=g.input.charCodeAt(g.position),(g.line===tt||g.lineIndent>$)&&w!==0)B(g,"bad indentation of a sequence entry");else if(g.lineIndent<$)break}return ot?(g.tag=j,g.anchor=X,g.kind="sequence",g.result=H,!0):!1}p(Te,"readBlockSequence");function Ht(g,$,j){let X,H,ot,w;const I=g.tag,tt=g.anchor,G={},V=Object.create(null);let it=null,et=null,dt=null,ht=!1,gt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&R(g,g.anchor,G);let yt=g.input.charCodeAt(g.position);for(;yt!==0;){!ht&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,B(g,"tab characters must not be used in indentation"));const Mt=g.input.charCodeAt(g.position+1),jt=g.line;if((yt===63||yt===58)&&S(Mt))yt===63?(ht&&(kt(g,G,V,it,et,null,H,ot,w),it=et=dt=null),gt=!0,ht=!0,X=!0):ht?(ht=!1,X=!0):B(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,yt=Mt;else{if(H=g.line,ot=g.lineStart,w=g.position,!te(g,j,a,!1,!0))break;if(g.line===jt){for(yt=g.input.charCodeAt(g.position);T(yt);)yt=g.input.charCodeAt(++g.position);if(yt===58)yt=g.input.charCodeAt(++g.position),S(yt)||B(g,"a whitespace character is expected after the key-value separator within a block mapping"),ht&&(kt(g,G,V,it,et,null,H,ot,w),it=et=dt=null),gt=!0,ht=!1,X=!1,it=g.tag,et=g.result;else if(gt)B(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=I,g.anchor=tt,!0}else if(gt)B(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=I,g.anchor=tt,!0}if((g.line===jt||g.lineIndent>$)&&(ht&&(H=g.line,ot=g.lineStart,w=g.position),te(g,$,l,!0,X)&&(ht?et=g.result:dt=g.result),ht||(kt(g,G,V,it,et,dt,H,ot,w),it=et=dt=null),vt(g,!0,-1),yt=g.input.charCodeAt(g.position)),(g.line===jt||g.lineIndent>$)&&yt!==0)B(g,"bad indentation of a mapping entry");else if(g.lineIndent<$)break}return ht&&kt(g,G,V,it,et,null,H,ot,w),gt&&(g.tag=I,g.anchor=tt,g.kind="mapping",g.result=G),gt}p(Ht,"readBlockMapping");function cr(g){let $=!1,j=!1,X,H,ot=g.input.charCodeAt(g.position);if(ot!==33)return!1;g.tag!==null&&B(g,"duplication of a tag property"),ot=g.input.charCodeAt(++g.position),ot===60?($=!0,ot=g.input.charCodeAt(++g.position)):ot===33?(j=!0,X="!!",ot=g.input.charCodeAt(++g.position)):X="!";let w=g.position;if($){do ot=g.input.charCodeAt(++g.position);while(ot!==0&&ot!==62);g.position<g.length?(H=g.input.slice(w,g.position),ot=g.input.charCodeAt(++g.position)):B(g,"unexpected end of the stream within a verbatim tag")}else{for(;ot!==0&&!S(ot);)ot===33&&(j?B(g,"tag suffix cannot contain exclamation marks"):(X=g.input.slice(w-1,g.position+1),y.test(X)||B(g,"named tag handle cannot contain such characters"),j=!0,w=g.position+1)),ot=g.input.charCodeAt(++g.position);H=g.input.slice(w,g.position),m.test(H)&&B(g,"tag suffix cannot contain flow indicator characters")}H&&!C.test(H)&&B(g,"tag name cannot contain such characters: "+H);try{H=decodeURIComponent(H)}catch{B(g,"tag name is malformed: "+H)}return $?g.tag=H:o.call(g.tagMap,X)?g.tag=g.tagMap[X]+H:X==="!"?g.tag="!"+H:X==="!!"?g.tag="tag:yaml.org,2002:"+H:B(g,'undeclared tag handle "'+X+'"'),!0}p(cr,"readTagProperty");function he(g){let $=g.input.charCodeAt(g.position);if($!==38)return!1;g.anchor!==null&&B(g,"duplication of an anchor property"),$=g.input.charCodeAt(++g.position);const j=g.position;for(;$!==0&&!S($)&&!v($);)$=g.input.charCodeAt(++g.position);return g.position===j&&B(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(j,g.position),!0}p(he,"readAnchorProperty");function De(g){let $=g.input.charCodeAt(g.position);if($!==42)return!1;$=g.input.charCodeAt(++g.position);const j=g.position;for(;$!==0&&!S($)&&!v($);)$=g.input.charCodeAt(++g.position);g.position===j&&B(g,"name of an alias node must contain at least one character");const X=g.input.slice(j,g.position);return o.call(g.anchorMap,X)||B(g,'unidentified alias "'+X+'"'),g.result=g.anchorMap[X],vt(g,!0,-1),!0}p(De,"readAlias");function Lr(g,$,j,X){const H=wt(g);return at(g),Tt(g,$),g.tag=null,g.anchor=null,g.kind=null,g.result=null,Ht(g,j,X)&&g.kind==="mapping"?(J(g),!0):(mt(g),Tt(g,H),!1)}p(Lr,"tryReadBlockMappingFromProperty");function te(g,$,j,X,H){let ot,w,I=1,tt=!1,G=!1,V=null,it,et,dt;g.depth>=g.maxDepth&&B(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const ht=ot=w=l===j||n===j;if(X&&vt(g,!0,-1)&&(tt=!0,g.lineIndent>$?I=1:g.lineIndent===$?I=0:g.lineIndent<$&&(I=-1)),I===1)for(;;){const gt=g.input.charCodeAt(g.position),yt=wt(g);if(tt&&(gt===33&&g.tag!==null||gt===38&&g.anchor!==null)||!cr(g)&&!he(g))break;V===null&&(V=yt),vt(g,!0,-1)?(tt=!0,w=ht,g.lineIndent>$?I=1:g.lineIndent===$?I=0:g.lineIndent<$&&(I=-1)):w=!1}if(w&&(w=tt||H),I===1||l===j)if(s===j||a===j?et=$:et=$+1,dt=g.position-g.lineStart,I===1)if(w&&(Te(g,dt)||Ht(g,dt,et))||Br(g,et))G=!0;else{const gt=g.input.charCodeAt(g.position);V!==null&&ht&&!w&&gt!==124&&gt!==62&&Lr(g,V,V.position-V.lineStart,et)||ot&&Yt(g,et)||we(g,et)||Oe(g,et)?G=!0:De(g)?(G=!0,(g.tag!==null||g.anchor!==null)&&B(g,"alias node should not have any properties")):le(g,et,s===j)&&(G=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&R(g,g.anchor,g.result)}else I===0&&(G=w&&Te(g,dt));if(g.tag===null)g.anchor!==null&&R(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&B(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let gt=0,yt=g.implicitTypes.length;gt<yt;gt+=1)if(it=g.implicitTypes[gt],it.resolve(g.result)){g.result=it.construct(g.result),g.tag=it.tag,g.anchor!==null&&R(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(o.call(g.typeMap[g.kind||"fallback"],g.tag))it=g.typeMap[g.kind||"fallback"][g.tag];else{it=null;const gt=g.typeMap.multi[g.kind||"fallback"];for(let yt=0,Mt=gt.length;yt<Mt;yt+=1)if(g.tag.slice(0,gt[yt].tag.length)===gt[yt].tag){it=gt[yt];break}}it||B(g,"unknown tag !<"+g.tag+">"),g.result!==null&&it.kind!==g.kind&&B(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+it.kind+'", not "'+g.kind+'"'),it.resolve(g.result,g.tag)?(g.result=it.construct(g.result,g.tag),g.anchor!==null&&R(g,g.anchor,g.result)):B(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||G}p(te,"composeNode");function Fr(g){const $=g.position;let j=!1,X;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(X=g.input.charCodeAt(g.position))!==0&&(vt(g,!0,-1),X=g.input.charCodeAt(g.position),!(g.lineIndent>0||X!==37));){j=!0,X=g.input.charCodeAt(++g.position);let H=g.position;for(;X!==0&&!S(X);)X=g.input.charCodeAt(++g.position);const ot=g.input.slice(H,g.position),w=[];for(ot.length<1&&B(g,"directive name must not be less than one character in length");X!==0;){for(;T(X);)X=g.input.charCodeAt(++g.position);if(X===35){do X=g.input.charCodeAt(++g.position);while(X!==0&&!k(X));break}if(k(X))break;for(H=g.position;X!==0&&!S(X);)X=g.input.charCodeAt(++g.position);w.push(g.input.slice(H,g.position))}X!==0&&Ot(g),o.call(Et,ot)?Et[ot](g,ot,w):q(g,'unknown document directive "'+ot+'"')}if(vt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,vt(g,!0,-1)):j&&B(g,"directives end mark is expected"),te(g,g.lineIndent-1,l,!1,!0),vt(g,!0,-1),g.checkLineBreaks&&f.test(g.input.slice($,g.position))&&q(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&Nt(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,vt(g,!0,-1));return}g.position<g.length-1&&B(g,"end of the stream or a document separator is expected")}p(Fr,"readDocument");function Ve(g,$){g=String(g),$=$||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
286
+ `),g.charCodeAt(0)===65279&&(g=g.slice(1)));const j=new O(g,$),X=g.indexOf("\0");for(X!==-1&&(j.position=X,B(j,"null byte is not allowed in input")),j.input+="\0";j.input.charCodeAt(j.position)===32;)j.lineIndent+=1,j.position+=1;for(;j.position<j.length-1;)Fr(j);return j.documents}p(Ve,"loadDocuments");function ur(g,$,j){$!==null&&typeof $=="object"&&typeof j>"u"&&(j=$,$=null);const X=Ve(g,j);if(typeof $!="function")return X;for(let H=0,ot=X.length;H<ot;H+=1)$(X[H])}p(ur,"loadAll2");function dr(g,$){const j=Ve(g,$);if(j.length!==0){if(j.length===1)return j[0];throw new t("expected a single document in the stream, but found more")}}return p(dr,"load2"),Ss.loadAll=ur,Ss.load=dr,Ss}p(Wy,"requireLoader");var jn={},of;function Hy(){if(of)return jn;of=1;const e=oo(),t=so(),r=Ma(),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=65279,a=9,n=10,l=13,c=32,h=33,u=34,d=35,f=37,m=38,y=39,C=42,x=44,k=45,T=58,S=61,v=62,A=63,L=64,E=91,Z=93,Y=96,P=123,st=124,U=125,O={};O[0]="\\0",O[7]="\\a",O[8]="\\b",O[9]="\\t",O[10]="\\n",O[11]="\\v",O[12]="\\f",O[13]="\\r",O[27]="\\e",O[34]='\\"',O[92]="\\\\",O[133]="\\N",O[160]="\\_",O[8232]="\\L",O[8233]="\\P";const D=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function q(w,I){if(I===null)return{};const tt={},G=Object.keys(I);for(let V=0,it=G.length;V<it;V+=1){let et=G[V],dt=String(I[et]);et.slice(0,2)==="!!"&&(et="tag:yaml.org,2002:"+et.slice(2));const ht=w.compiledTypeMap.fallback[et];ht&&o.call(ht.styleAliases,dt)&&(dt=ht.styleAliases[dt]),tt[et]=dt}return tt}p(q,"compileStyleMap");function R(w){let I,tt;const G=w.toString(16).toUpperCase();if(w<=255)I="x",tt=2;else if(w<=65535)I="u",tt=4;else if(w<=4294967295)I="U",tt=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+I+e.repeat("0",tt-G.length)+G}p(R,"encodeHex");const at=1,J=2;function mt(w){this.schema=w.schema||r,this.indent=Math.max(1,w.indent||2),this.noArrayIndent=w.noArrayIndent||!1,this.skipInvalid=w.skipInvalid||!1,this.flowLevel=e.isNothing(w.flowLevel)?-1:w.flowLevel,this.styleMap=q(this.schema,w.styles||null),this.sortKeys=w.sortKeys||!1,this.lineWidth=w.lineWidth||80,this.noRefs=w.noRefs||!1,this.noCompatMode=w.noCompatMode||!1,this.condenseFlow=w.condenseFlow||!1,this.quotingType=w.quotingType==='"'?J:at,this.forceQuotes=w.forceQuotes||!1,this.replacer=typeof w.replacer=="function"?w.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(mt,"State");function wt(w,I){const tt=e.repeat(" ",I);let G=0,V="";const it=w.length;for(;G<it;){let et;const dt=w.indexOf(`
287
+ `,G);dt===-1?(et=w.slice(G),G=it):(et=w.slice(G,dt+1),G=dt+1),et.length&&et!==`
288
+ `&&(V+=tt),V+=et}return V}p(wt,"indentString");function Tt(w,I){return`
289
+ `+e.repeat(" ",w.indent*I)}p(Tt,"generateNextLine");function Et(w,I){for(let tt=0,G=w.implicitTypes.length;tt<G;tt+=1)if(w.implicitTypes[tt].resolve(I))return!0;return!1}p(Et,"testImplicitResolving");function Lt(w){return w===c||w===a}p(Lt,"isWhitespace");function nt(w){return w>=32&&w<=126||w>=161&&w<=55295&&w!==8232&&w!==8233||w>=57344&&w<=65533&&w!==s||w>=65536&&w<=1114111}p(nt,"isPrintable");function kt(w){return nt(w)&&w!==s&&w!==l&&w!==n}p(kt,"isNsCharOrWhitespace");function Ot(w,I,tt){const G=kt(w),V=G&&!Lt(w);return(tt?G:G&&w!==x&&w!==E&&w!==Z&&w!==P&&w!==U)&&w!==d&&!(I===T&&!V)||kt(I)&&!Lt(I)&&w===d||I===T&&V}p(Ot,"isPlainSafe");function vt(w){return nt(w)&&w!==s&&!Lt(w)&&w!==k&&w!==A&&w!==T&&w!==x&&w!==E&&w!==Z&&w!==P&&w!==U&&w!==d&&w!==m&&w!==C&&w!==h&&w!==st&&w!==S&&w!==v&&w!==y&&w!==u&&w!==f&&w!==L&&w!==Y}p(vt,"isPlainSafeFirst");function Nt(w){return!Lt(w)&&w!==T}p(Nt,"isPlainSafeLast");function Wt(w,I){const tt=w.charCodeAt(I);let G;return tt>=55296&&tt<=56319&&I+1<w.length&&(G=w.charCodeAt(I+1),G>=56320&&G<=57343)?(tt-55296)*1024+G-56320+65536:tt}p(Wt,"codePointAt");function le(w){return/^\n* /.test(w)}p(le,"needIndentIndicator");const we=1,Oe=2,Br=3,Yt=4,Te=5;function Ht(w,I,tt,G,V,it,et,dt){let ht,gt=0,yt=null,Mt=!1,jt=!1;const no=G!==-1;let Er=-1,Ar=vt(Wt(w,0))&&Nt(Wt(w,w.length-1));if(I||et)for(ht=0;ht<w.length;gt>=65536?ht+=2:ht++){if(gt=Wt(w,ht),!nt(gt))return Te;Ar=Ar&&Ot(gt,yt,dt),yt=gt}else{for(ht=0;ht<w.length;gt>=65536?ht+=2:ht++){if(gt=Wt(w,ht),gt===n)Mt=!0,no&&(jt=jt||ht-Er-1>G&&w[Er+1]!==" ",Er=ht);else if(!nt(gt))return Te;Ar=Ar&&Ot(gt,yt,dt),yt=gt}jt=jt||no&&ht-Er-1>G&&w[Er+1]!==" "}return!Mt&&!jt?Ar&&!et&&!V(w)?we:it===J?Te:Oe:tt>9&&le(w)?Te:et?it===J?Te:Oe:jt?Yt:Br}p(Ht,"chooseScalarStyle");function cr(w,I,tt,G,V){w.dump=(function(){if(I.length===0)return w.quotingType===J?'""':"''";if(!w.noCompatMode&&(D.indexOf(I)!==-1||B.test(I)))return w.quotingType===J?'"'+I+'"':"'"+I+"'";const it=w.indent*Math.max(1,tt),et=w.lineWidth===-1?-1:Math.max(Math.min(w.lineWidth,40),w.lineWidth-it),dt=G||w.flowLevel>-1&&tt>=w.flowLevel;function ht(gt){return Et(w,gt)}switch(p(ht,"testAmbiguity"),Ht(I,dt,w.indent,et,ht,w.quotingType,w.forceQuotes&&!G,V)){case we:return I;case Oe:return"'"+I.replace(/'/g,"''")+"'";case Br:return"|"+he(I,w.indent)+De(wt(I,it));case Yt:return">"+he(I,w.indent)+De(wt(Lr(I,et),it));case Te:return'"'+Fr(I)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(cr,"writeScalar");function he(w,I){const tt=le(w)?String(I):"",G=w[w.length-1]===`
290
+ `,it=G&&(w[w.length-2]===`
291
+ `||w===`
292
+ `)?"+":G?"":"-";return tt+it+`
293
+ `}p(he,"blockHeader");function De(w){return w[w.length-1]===`
294
+ `?w.slice(0,-1):w}p(De,"dropEndingNewline");function Lr(w,I){const tt=/(\n+)([^\n]*)/g;let G=(function(){let dt=w.indexOf(`
295
+ `);return dt=dt!==-1?dt:w.length,tt.lastIndex=dt,te(w.slice(0,dt),I)})(),V=w[0]===`
296
+ `||w[0]===" ",it,et;for(;et=tt.exec(w);){const dt=et[1],ht=et[2];it=ht[0]===" ",G+=dt+(!V&&!it&&ht!==""?`
297
+ `:"")+te(ht,I),V=it}return G}p(Lr,"foldString");function te(w,I){if(w===""||w[0]===" ")return w;const tt=/ [^ ]/g;let G,V=0,it,et=0,dt=0,ht="";for(;G=tt.exec(w);)dt=G.index,dt-V>I&&(it=et>V?et:dt,ht+=`
298
+ `+w.slice(V,it),V=it+1),et=dt;return ht+=`
299
+ `,w.length-V>I&&et>V?ht+=w.slice(V,et)+`
300
+ `+w.slice(et+1):ht+=w.slice(V),ht.slice(1)}p(te,"foldLine");function Fr(w){let I="",tt=0;for(let G=0;G<w.length;tt>=65536?G+=2:G++){tt=Wt(w,G);const V=O[tt];!V&&nt(tt)?(I+=w[G],tt>=65536&&(I+=w[G+1])):I+=V||R(tt)}return I}p(Fr,"escapeString");function Ve(w,I,tt){let G="";const V=w.tag;for(let it=0,et=tt.length;it<et;it+=1){let dt=tt[it];w.replacer&&(dt=w.replacer.call(tt,String(it),dt)),(j(w,I,dt,!1,!1)||typeof dt>"u"&&j(w,I,null,!1,!1))&&(G!==""&&(G+=","+(w.condenseFlow?"":" ")),G+=w.dump)}w.tag=V,w.dump="["+G+"]"}p(Ve,"writeFlowSequence");function ur(w,I,tt,G){let V="";const it=w.tag;for(let et=0,dt=tt.length;et<dt;et+=1){let ht=tt[et];w.replacer&&(ht=w.replacer.call(tt,String(et),ht)),(j(w,I+1,ht,!0,!0,!1,!0)||typeof ht>"u"&&j(w,I+1,null,!0,!0,!1,!0))&&((!G||V!=="")&&(V+=Tt(w,I)),w.dump&&n===w.dump.charCodeAt(0)?V+="-":V+="- ",V+=w.dump)}w.tag=it,w.dump=V||"[]"}p(ur,"writeBlockSequence");function dr(w,I,tt){let G="";const V=w.tag,it=Object.keys(tt);for(let et=0,dt=it.length;et<dt;et+=1){let ht="";G!==""&&(ht+=", "),w.condenseFlow&&(ht+='"');const gt=it[et];let yt=tt[gt];w.replacer&&(yt=w.replacer.call(tt,gt,yt)),j(w,I,gt,!1,!1)&&(w.dump.length>1024&&(ht+="? "),ht+=w.dump+(w.condenseFlow?'"':"")+":"+(w.condenseFlow?"":" "),j(w,I,yt,!1,!1)&&(ht+=w.dump,G+=ht))}w.tag=V,w.dump="{"+G+"}"}p(dr,"writeFlowMapping");function g(w,I,tt,G){let V="";const it=w.tag,et=Object.keys(tt);if(w.sortKeys===!0)et.sort();else if(typeof w.sortKeys=="function")et.sort(w.sortKeys);else if(w.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let dt=0,ht=et.length;dt<ht;dt+=1){let gt="";(!G||V!=="")&&(gt+=Tt(w,I));const yt=et[dt];let Mt=tt[yt];if(w.replacer&&(Mt=w.replacer.call(tt,yt,Mt)),!j(w,I+1,yt,!0,!0,!0))continue;const jt=w.tag!==null&&w.tag!=="?"||w.dump&&w.dump.length>1024;jt&&(w.dump&&n===w.dump.charCodeAt(0)?gt+="?":gt+="? "),gt+=w.dump,jt&&(gt+=Tt(w,I)),j(w,I+1,Mt,!0,jt)&&(w.dump&&n===w.dump.charCodeAt(0)?gt+=":":gt+=": ",gt+=w.dump,V+=gt)}w.tag=it,w.dump=V||"{}"}p(g,"writeBlockMapping");function $(w,I,tt){const G=tt?w.explicitTypes:w.implicitTypes;for(let V=0,it=G.length;V<it;V+=1){const et=G[V];if((et.instanceOf||et.predicate)&&(!et.instanceOf||typeof I=="object"&&I instanceof et.instanceOf)&&(!et.predicate||et.predicate(I))){if(tt?et.multi&&et.representName?w.tag=et.representName(I):w.tag=et.tag:w.tag="?",et.represent){const dt=w.styleMap[et.tag]||et.defaultStyle;let ht;if(i.call(et.represent)==="[object Function]")ht=et.represent(I,dt);else if(o.call(et.represent,dt))ht=et.represent[dt](I,dt);else throw new t("!<"+et.tag+'> tag resolver accepts not "'+dt+'" style');w.dump=ht}return!0}}return!1}p($,"detectType");function j(w,I,tt,G,V,it,et){w.tag=null,w.dump=tt,$(w,tt,!1)||$(w,tt,!0);const dt=i.call(w.dump),ht=G;G&&(G=w.flowLevel<0||w.flowLevel>I);const gt=dt==="[object Object]"||dt==="[object Array]";let yt,Mt;if(gt&&(yt=w.duplicates.indexOf(tt),Mt=yt!==-1),(w.tag!==null&&w.tag!=="?"||Mt||w.indent!==2&&I>0)&&(V=!1),Mt&&w.usedDuplicates[yt])w.dump="*ref_"+yt;else{if(gt&&Mt&&!w.usedDuplicates[yt]&&(w.usedDuplicates[yt]=!0),dt==="[object Object]")G&&Object.keys(w.dump).length!==0?(g(w,I,w.dump,V),Mt&&(w.dump="&ref_"+yt+w.dump)):(dr(w,I,w.dump),Mt&&(w.dump="&ref_"+yt+" "+w.dump));else if(dt==="[object Array]")G&&w.dump.length!==0?(w.noArrayIndent&&!et&&I>0?ur(w,I-1,w.dump,V):ur(w,I,w.dump,V),Mt&&(w.dump="&ref_"+yt+w.dump)):(Ve(w,I,w.dump),Mt&&(w.dump="&ref_"+yt+" "+w.dump));else if(dt==="[object String]")w.tag!=="?"&&cr(w,w.dump,I,it,ht);else{if(dt==="[object Undefined]")return!1;if(w.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+dt)}if(w.tag!==null&&w.tag!=="?"){let jt=encodeURI(w.tag[0]==="!"?w.tag.slice(1):w.tag).replace(/!/g,"%21");w.tag[0]==="!"?jt="!"+jt:jt.slice(0,18)==="tag:yaml.org,2002:"?jt="!!"+jt.slice(18):jt="!<"+jt+">",w.dump=jt+" "+w.dump}}return!0}p(j,"writeNode");function X(w,I){const tt=[],G=[];H(w,tt,G);const V=G.length;for(let it=0;it<V;it+=1)I.duplicates.push(tt[G[it]]);I.usedDuplicates=new Array(V)}p(X,"getDuplicateReferences");function H(w,I,tt){if(w!==null&&typeof w=="object"){const G=I.indexOf(w);if(G!==-1)tt.indexOf(G)===-1&&tt.push(G);else if(I.push(w),Array.isArray(w))for(let V=0,it=w.length;V<it;V+=1)H(w[V],I,tt);else{const V=Object.keys(w);for(let it=0,et=V.length;it<et;it+=1)H(w[V[it]],I,tt)}}}p(H,"inspectNode");function ot(w,I){I=I||{};const tt=new mt(I);tt.noRefs||X(w,tt);let G=w;return tt.replacer&&(G=tt.replacer.call({"":G},"",G)),j(tt,0,G,!0,!0)?tt.dump+`
301
+ `:""}return p(ot,"dump2"),jn.dump=ot,jn}p(Hy,"requireDumper");var sf;function Yy(){if(sf)return pe;sf=1;const e=Wy(),t=Hy();function r(i,o){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return p(r,"renamed"),pe.Type=xe(),pe.Schema=qh(),pe.FAILSAFE_SCHEMA=Yh(),pe.JSON_SCHEMA=Vh(),pe.CORE_SCHEMA=Zh(),pe.DEFAULT_SCHEMA=Ma(),pe.load=e.load,pe.loadAll=e.loadAll,pe.dump=t.dump,pe.YAMLException=so(),pe.types={binary:Jh(),float:Xh(),map:Hh(),null:Uh(),pairs:ec(),set:rc(),timestamp:Kh(),bool:jh(),int:Gh(),merge:Qh(),omap:tc(),seq:Wh(),str:zh()},pe.safeLoad=r("safeLoad","load"),pe.safeLoadAll=r("safeLoadAll","loadAll"),pe.safeDump=r("safeDump","dump"),pe}p(Yy,"requireJsYaml");var oF=Yy(),sF=qy(oF),{Type:k5,Schema:w5,FAILSAFE_SCHEMA:T5,JSON_SCHEMA:aF,CORE_SCHEMA:_5,DEFAULT_SCHEMA:S5,load:nF,loadAll:v5,dump:B5,YAMLException:L5,types:F5,safeLoad:E5,safeLoadAll:A5,safeDump:M5}=sF,lF={common:es,getConfig:Vt,insertCluster:gy,insertEdge:Cy,insertEdgeLabel:Ih,insertMarkers:ky,insertNode:Dh,interpolateToCurve:dh,labelHelper:Ct,log:N,positionEdgeLabel:wL},Vo={},Uy=p(e=>{for(const t of e)Vo[t.name]=t},"registerLayoutLoaders"),hF=p(()=>{Uy([{name:"dagre",loader:p(async()=>await $t(()=>import("./dagre-GXQ25YYZ-Cq_xhTkE.js"),__vite__mapDeps([4,5,3,6,1,2]),import.meta.url),"loader")},{name:"swimlane",loader:p(async()=>await $t(()=>import("./swimlanes-42K2YHIH-B665ttwU.js"),__vite__mapDeps([7,1,2,3]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await $t(()=>import("./cose-bilkent-JH36ORCC-B5pmdKpq.js"),__vite__mapDeps([8,9,1,2,3]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");hF();var $5=p(async(e,t)=>{if(!(e.layoutAlgorithm in Vo))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=Vo[e.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:s}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,lF,{algorithm:r.algorithm})},"render"),O5=p((e="",{fallback:t="dagre"}={})=>{if(e in Vo)return e;if(t in Vo)return N.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"),ic="comm",jy="rule",Gy="decl",cF="@media",uF="@import",dF="@supports",fF="@namespace",Al="@keyframes",Xy="@layer",pF="@scope",gF=Math.abs,No=String.fromCharCode;function Vy(e){return e.trim()}function Ml(e,t,r){return e.replace(t,r)}function Ai(e,t){return e.charCodeAt(t)|0}function to(e,t,r){return e.slice(t,r)}function tr(e){return e.length}function Zy(e){return e.length}function vs(e,t){return t.push(e),e}var $a=1,eo=1,Ky=0,Ne=0,re=0,ao="";function oc(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:$a,column:eo,length:a,return:"",siblings:n}}function mF(){return re}function yF(){return re=Ne>0?Ai(ao,--Ne):0,eo--,re===10&&(eo=1,$a--),re}function Ue(){return re=Ne<Ky?Ai(ao,Ne++):0,eo++,re===10&&(eo=1,$a++),re}function Nr(){return Ai(ao,Ne)}function Is(){return Ne}function Oa(e,t){return to(ao,e,t)}function Zo(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 CF(e){return $a=eo=1,Ky=tr(ao=e),Ne=0,[]}function xF(e){return ao="",e}function Gn(e){return Vy(Oa(Ne-1,$l(e===91?e+2:e===40?e+1:e)))}function bF(e){for(;(re=Nr())&&re<33;)Ue();return Zo(e)>2||Zo(re)>3?"":" "}function kF(e,t){for(;--t&&Ue()&&!(re<48||re>102||re>57&&re<65||re>70&&re<97););return Oa(e,Is()+(t<6&&Nr()==32&&Ue()==32))}function $l(e){for(;Ue();)switch(re){case e:return Ne;case 34:case 39:e!==34&&e!==39&&$l(re);break;case 40:e===41&&$l(e);break;case 92:Ue();break}return Ne}function wF(e,t){for(;Ue()&&e+re!==57;)if(e+re===84&&Nr()===47)break;return"/*"+Oa(t,Ne-1)+"*"+No(e===47?e:Ue())}function TF(e){for(;!Zo(Nr());)Ue();return Oa(e,Ne)}function _F(e){return xF(Ps("",null,null,null,[""],e=CF(e),0,[0],e))}function Ps(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,u=a,d=0,f=0,m=0,y=1,C=1,x=1,k=0,T=0,S="",v=o,A=s,L=i,E=S;C;)switch(m=T,T=Ue()){case 40:m!=108&&Ai(E,u-1)==58?(k++,E+="("):E+=Gn(T);break;case 41:k--,E+=")";break;case 34:case 39:case 91:E+=Gn(T);break;case 9:case 10:case 13:case 32:if(k>0){E+=No(T);break}E+=bF(m);break;case 92:E+=kF(Is()-1,7);continue;case 47:switch(Nr()){case 42:case 47:vs(SF(wF(Ue(),Is()),t,r,l),l),(Zo(m||1)==5||Zo(Nr()||1)==5)&&tr(E)&&to(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*y:n[c++]=tr(E)*x;case 125*y:case 59:case 0:if(k>0&&T){E+=No(T);break}switch(T){case 0:case 125:C=0;case 59+h:x==-1&&(E=Ml(E,/\f/g,"")),f>0&&(tr(E)-u||y===0)&&vs(f>32?nf(E+";",i,r,u-1,l):nf(Ml(E," ","")+";",i,r,u-2,l),l);break;case 59:E+=";";default:if(vs(L=af(E,t,r,c,h,o,n,S,v=[],A=[],u,s),s),T===123)if(h===0)Ps(E,t,L,L,v,s,u,n,A);else{switch(d){case 99:if(Ai(E,3)===110)break;case 108:if(Ai(E,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ps(e,L,L,i&&vs(af(e,L,L,0,0,o,n,S,o,v=[],u,A),A),o,A,u,n,i?v:A):Ps(E,L,L,L,[""],A,0,n,A)}}c=h=f=0,y=x=1,S=E="",u=a;break;case 58:u=1+tr(E),f=m;default:if(y<1){if(T==123)--y;else if(T==125&&y++==0&&yF()==125)continue}switch(E+=No(T),T*y){case 38:x=h>0?1:(E+="\f",-1);break;case 44:if(k>0)break;n[c++]=(tr(E)-1)*x,x=1;break;case 64:Nr()===45&&(E+=Gn(Ue())),d=Nr(),h=u=tr(S=E+=TF(Is())),T++;break;case 45:m===45&&tr(E)==2&&(y=0)}}return s}function af(e,t,r,i,o,s,a,n,l,c,h,u){for(var d=o-1,f=o===0?s:[""],m=Zy(f),y=0,C=0,x=0;y<i;++y)for(var k=0,T=to(e,d+1,d=gF(C=a[y])),S=e;k<m;++k)(S=Vy(C>0?f[k]+" "+T:Ml(T,/&\f/g,f[k])))&&(l[x++]=S);return oc(e,t,r,o===0?jy:n,l,c,h,u)}function SF(e,t,r,i){return oc(e,t,r,ic,No(mF()),to(e,2,-2),0,i)}function nf(e,t,r,i,o){return oc(e,t,r,Gy,to(e,0,i),to(e,i+1,-1),i,o)}function Ol(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function vF(e,t,r,i){switch(e.type){case Xy:if(e.children.length)break;case uF:case fF:case Gy:return e.return=e.return||e.value;case ic:return"";case Al:return e.return=e.value+"{"+Ol(e.children,i)+"}";case jy:if(!tr(e.value=e.props.join(",")))return""}return tr(r=Ol(e.children,i))?e.return=e.value+"{"+r+"}":""}function BF(e){var t=Zy(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var Qy="c4",LF=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),FF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-BqfDgZbz.js");return{diagram:t}},__vite__mapDeps([10,11,1,2,3]),import.meta.url);return{id:Qy,diagram:e}},"loader"),EF={id:Qy,detector:LF,loader:FF},AF=EF,Jy="flowchart",MF=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),$F=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-7gxPRGUj.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]),import.meta.url);return{id:Jy,diagram:e}},"loader"),OF={id:Jy,detector:MF,loader:$F},DF=OF,t0="flowchart-v2",IF=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),PF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-7gxPRGUj.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]),import.meta.url);return{id:t0,diagram:e}},"loader"),RF={id:t0,detector:IF,loader:PF},NF=RF,e0="swimlane",qF=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),zF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-BDCBtik2.js");return{diagram:t}},__vite__mapDeps([17,12,13,14,15,11,16,1,2,3]),import.meta.url);return{id:e0,diagram:e}},"loader"),WF={id:e0,detector:qF,loader:zF},HF=WF,r0="er",YF=p(e=>/^\s*erDiagram/.test(e),"detector"),UF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-D3kVz7Nb.js");return{diagram:t}},__vite__mapDeps([18,14,15,16,1,2,3]),import.meta.url);return{id:r0,diagram:e}},"loader"),jF={id:r0,detector:YF,loader:UF},GF=jF,i0="gitGraph",XF=p(e=>/^\s*gitGraph/.test(e),"detector"),VF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-Br1ZEaO6.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,1,2,3]),import.meta.url);return{id:i0,diagram:e}},"loader"),ZF={id:i0,detector:XF,loader:VF},KF=ZF,o0="gantt",QF=p(e=>/^\s*gantt/.test(e),"detector"),JF=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-CPN-jcnj.js");return{diagram:t}},__vite__mapDeps([23,1,2,24,25,26,3]),import.meta.url);return{id:o0,diagram:e}},"loader"),tE={id:o0,detector:QF,loader:JF},eE=tE,s0="info",rE=p(e=>/^\s*info/.test(e),"detector"),iE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-zYs7bQjE.js");return{diagram:t}},__vite__mapDeps([27,22,1,2,3]),import.meta.url);return{id:s0,diagram:e}},"loader"),oE={id:s0,detector:rE,loader:iE},a0="pie",sE=p(e=>/^\s*pie/.test(e),"detector"),aE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-p2kr4IMf.js");return{diagram:t}},__vite__mapDeps([28,21,22,1,2,29,30,25,3]),import.meta.url);return{id:a0,diagram:e}},"loader"),nE={id:a0,detector:sE,loader:aE},n0="quadrantChart",lE=p(e=>/^\s*quadrantChart/.test(e),"detector"),hE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-Bt0TmDnC.js");return{diagram:t}},__vite__mapDeps([31,24,25,26,1,2,3]),import.meta.url);return{id:n0,diagram:e}},"loader"),cE={id:n0,detector:lE,loader:hE},uE=cE,l0="xychart",dE=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),fE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-d9Kf7FbS.js");return{diagram:t}},__vite__mapDeps([32,25,30,24,26,1,2,3]),import.meta.url);return{id:l0,diagram:e}},"loader"),pE={id:l0,detector:dE,loader:fE},gE=pE,h0="requirement",mE=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),yE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-DX_wfhH_.js");return{diagram:t}},__vite__mapDeps([33,14,15,1,2,3]),import.meta.url);return{id:h0,diagram:e}},"loader"),CE={id:h0,detector:mE,loader:yE},xE=CE,c0="sequence",bE=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),kE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-C9LP6Bzy.js");return{diagram:t}},__vite__mapDeps([34,20,11,1,2,3]),import.meta.url);return{id:c0,diagram:e}},"loader"),wE={id:c0,detector:bE,loader:kE},TE=wE,u0="class",_E=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),SE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-EpRQ1LwP.js");return{diagram:t}},__vite__mapDeps([35,36,13,14,15,11,1,2,3]),import.meta.url);return{id:u0,diagram:e}},"loader"),vE={id:u0,detector:_E,loader:SE},BE=vE,d0="classDiagram",LE=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),FE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-EpRQ1LwP.js");return{diagram:t}},__vite__mapDeps([37,36,13,14,15,11,1,2,3]),import.meta.url);return{id:d0,diagram:e}},"loader"),EE={id:d0,detector:LE,loader:FE},AE=EE,f0="state",ME=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),$E=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-uWI0NoaS.js");return{diagram:t}},__vite__mapDeps([38,39,14,15,11,5,3,6,1,2]),import.meta.url);return{id:f0,diagram:e}},"loader"),OE={id:f0,detector:ME,loader:$E},DE=OE,p0="stateDiagram",IE=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),PE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-B_Bjdct-.js");return{diagram:t}},__vite__mapDeps([40,39,14,15,11,1,2,3]),import.meta.url);return{id:p0,diagram:e}},"loader"),RE={id:p0,detector:IE,loader:PE},NE=RE,g0="journey",qE=p(e=>/^\s*journey/.test(e),"detector"),zE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-CBfsgbN2.js");return{diagram:t}},__vite__mapDeps([41,13,11,29,1,2,3]),import.meta.url);return{id:g0,diagram:e}},"loader"),WE={id:g0,detector:qE,loader:zE},HE=WE,YE=p((e,t,r)=>{N.debug(`rendering svg for syntax error
302
+ `);const i=vS(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),tp(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),m0={draw:YE},UE=m0,jE={db:{},renderer:m0,parser:{parse:p(()=>{},"parse")}},GE=jE,y0="flowchart-elk",XE=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),VE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-7gxPRGUj.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]),import.meta.url);return{id:y0,diagram:e}},"loader"),ZE={id:y0,detector:XE,loader:VE},KE=ZE,C0="timeline",QE=p(e=>/^\s*timeline/.test(e),"detector"),JE=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-BI5S9uY1.js");return{diagram:t}},__vite__mapDeps([42,29,1,2,3]),import.meta.url);return{id:C0,diagram:e}},"loader"),tA={id:C0,detector:QE,loader:JE},eA=tA,x0="mindmap",rA=p(e=>/^\s*mindmap/.test(e),"detector"),iA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-s62CDc7B.js");return{diagram:t}},__vite__mapDeps([43,14,15,1,2,3]),import.meta.url);return{id:x0,diagram:e}},"loader"),oA={id:x0,detector:rA,loader:iA},sA=oA,b0="kanban",aA=p(e=>/^\s*kanban/.test(e),"detector"),nA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-CrzhTXng.js");return{diagram:t}},__vite__mapDeps([44,13,1,2,3]),import.meta.url);return{id:b0,diagram:e}},"loader"),lA={id:b0,detector:aA,loader:nA},hA=lA,k0="sankey",cA=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),uA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-C5owbfFt.js");return{diagram:t}},__vite__mapDeps([45,30,25,1,2,3]),import.meta.url);return{id:k0,diagram:e}},"loader"),dA={id:k0,detector:cA,loader:uA},fA=dA,w0="packet",pA=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),gA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-wkmwXnCL.js");return{diagram:t}},__vite__mapDeps([46,21,22,1,2,3]),import.meta.url);return{id:w0,diagram:e}},"loader"),mA={id:w0,detector:pA,loader:gA},T0="radar",yA=p(e=>/^\s*radar-beta/.test(e),"detector"),CA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-UmvM898J.js");return{diagram:t}},__vite__mapDeps([47,21,22,1,2,3]),import.meta.url);return{id:T0,diagram:e}},"loader"),xA={id:T0,detector:yA,loader:CA},_0="block",bA=p(e=>/^\s*block(-beta)?/.test(e),"detector"),kA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-kmdi7zCh.js");return{diagram:t}},__vite__mapDeps([48,13,1,2,16,3]),import.meta.url);return{id:_0,diagram:e}},"loader"),wA={id:_0,detector:bA,loader:kA},TA=wA,S0="treeView",_A=p(e=>/^\s*treeView-beta/.test(e),"detector"),SA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-BB0h2Ycq.js");return{diagram:t}},__vite__mapDeps([49,20,21,22,1,2,3]),import.meta.url);return{id:S0,diagram:e}},"loader"),vA={id:S0,detector:_A,loader:SA},BA=vA,v0="architecture",LA=p(e=>/^\s*architecture/.test(e),"detector"),FA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-BmFO29Ca.js");return{diagram:t}},__vite__mapDeps([50,21,22,1,2,9,3]),import.meta.url);return{id:v0,diagram:e}},"loader"),EA={id:v0,detector:LA,loader:FA},AA=EA,B0="eventmodeling",MA=p(e=>/^\s*eventmodeling/.test(e),"detector"),$A=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-C3pfgVZR.js");return{diagram:t}},__vite__mapDeps([51,21,22,1,2,3]),import.meta.url);return{id:B0,diagram:e}},"loader"),OA={id:B0,detector:MA,loader:$A},DA=OA,L0="ishikawa",IA=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),PA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-BjXTvzge.js");return{diagram:t}},__vite__mapDeps([52,1,2,3]),import.meta.url);return{id:L0,diagram:e}},"loader"),RA={id:L0,detector:IA,loader:PA},F0="venn",NA=p(e=>/^\s*venn-beta/.test(e),"detector"),qA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-Ba9orEWx.js");return{diagram:t}},__vite__mapDeps([53,1,2,3]),import.meta.url);return{id:F0,diagram:e}},"loader"),zA={id:F0,detector:NA,loader:qA},WA=zA,E0="treemap",HA=p(e=>/^\s*treemap/.test(e),"detector"),YA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-S-iQHosH.js");return{diagram:t}},__vite__mapDeps([54,21,15,22,1,2,26,30,25,3]),import.meta.url);return{id:E0,diagram:e}},"loader"),UA={id:E0,detector:HA,loader:YA},A0="wardley",jA=p(e=>/^\s*wardley-beta/i.test(e),"detector"),GA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-DTWvvomz.js");return{diagram:t}},__vite__mapDeps([55,21,22,1,2,3]),import.meta.url);return{id:A0,diagram:e}},"loader"),XA={id:A0,detector:jA,loader:GA},VA=XA,M0="cynefin",ZA=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),KA=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-DUOm6HTV.js");return{diagram:t}},__vite__mapDeps([56,21,22,1,2,3]),import.meta.url);return{id:M0,diagram:e}},"loader"),QA={id:M0,detector:ZA,loader:KA},$0="railroad",JA=p(e=>/^\s*railroad-beta/i.test(e),"detector"),tM=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-3OLC0D_j.js");return{diagram:t}},__vite__mapDeps([57,58,21,22,1,2,3]),import.meta.url);return{id:$0,diagram:e}},"loader"),eM={id:$0,detector:JA,loader:tM},O0="railroadEbnf",rM=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),iM=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-TXvp9u_g.js");return{diagram:t}},__vite__mapDeps([59,58,21,22,1,2,3]),import.meta.url);return{id:O0,diagram:e}},"loader"),oM={id:O0,detector:rM,loader:iM},D0="railroadAbnf",sM=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),aM=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-BtJg_wq8.js");return{diagram:t}},__vite__mapDeps([60,58,21,22,1,2,3]),import.meta.url);return{id:D0,diagram:e}},"loader"),nM={id:D0,detector:sM,loader:aM},I0="railroadPeg",lM=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),hM=p(async()=>{const{diagram:e}=await $t(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-C61Y70Sx.js");return{diagram:t}},__vite__mapDeps([61,58,21,22,1,2,3]),import.meta.url);return{id:I0,diagram:e}},"loader"),cM={id:I0,detector:lM,loader:hM},lf=!1,Da=p(()=>{lf||(lf=!0,Ys("error",GE,e=>e.toLowerCase().trim()==="error"),Ys("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),el(KE,sA,AA),el(AF,hA,AE,BE,GF,eE,oE,nE,xE,TE,HF,NF,DF,eA,KF,NE,DE,HE,uE,fA,mA,gE,TA,DA,BA,xA,RA,UA,eM,oM,nM,cM,WA,VA,QA))},"addDiagrams"),uM=p(async()=>{N.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(si).map(async([r,{detector:i,loader:o}])=>{if(o)try{sl(r)}catch{try{const{diagram:s,id:a}=await o();Ys(a,s,i)}catch(s){throw N.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete si[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){N.error(`Failed to load ${t.length} external diagrams`);for(const r of t)N.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),dM="graphics-document document";function P0(e,t){e.attr("role",dM),t!==""&&e.attr("aria-roledescription",t)}p(P0,"setA11yDiagramInfo");function R0(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(R0,"addSVGa11yTitleDescription");var ri,Dl=(ri=class{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static async fromText(t,r={}){const i=Vt(),o=Xl(t,i);t=xv(t)+`
303
+ `;try{sl(o)}catch{const c=b2(o);if(!c)throw new Xf(`Diagram ${o} not found.`);const{id:h,diagram:u}=await c();Ys(h,u)}const{db:s,parser:a,renderer:n,init:l}=sl(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new ri(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ri,"Diagram"),ri),hf=[],fM=p(()=>{hf.forEach(e=>{e()}),hf=[]},"attachFunctions"),pM=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function N0(e){const t=e.match(Gf);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
304
+ `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
305
+ `):t[2];let o=nF(i,{schema:aF})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(N0,"extractFrontMatter");var gM=p(e=>e.replace(/\r\n?/g,`
306
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),mM=p(e=>{const{text:t,metadata:r}=N0(e),{displayMode:i,title:o,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:o,config:s,text:t}},"processFrontmatter"),yM=p(e=>{const t=ye.detectInit(e)??{},r=ye.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:av(e),directive:t}},"processDirectives");function sc(e){const t=gM(e),r=mM(t),i=yM(r.text),o=yh(r.config,i.directive);return e=pM(i.text),{code:e,title:r.title,config:o}}p(sc,"preprocessDiagram");function q0(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(q0,"toBase64");var CM=5e4,xM="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",bM="sandbox",kM="loose",wM="http://www.w3.org/2000/svg",TM="http://www.w3.org/1999/xlink",_M="http://www.w3.org/1999/xhtml",SM="100%",vM="100%",BM="border:0;margin:0;",LM="margin:0",FM="allow-top-navigation-by-user-activation allow-popups",EM='The "iframe" tag is not supported by your browser.',AM=["foreignobject"],MM=["dominant-baseline"];function ac(e){const t=sc(e);return Ws(),m2(t.config??{}),t}p(ac,"processAndSetConfigs");async function z0(e,t){Da();try{const{code:r,config:i}=ac(e);return{diagramType:(await H0(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(z0,"parse");var cf=p((e,t,r=[])=>{const i=Wf(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),$M=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Ce(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{_c(l.styles)||n.forEach(c=>{r.insertRule(cf(l.id,c,l.styles),r.cssRules.length)}),_c(l.textStyles)||r.insertRule(cf(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),i=ol(o)+`
307
+ `}else i+=`${e.themeCSS}
308
+ `;return i+ol(r)},"createCssStyles"),OM=p((e,t)=>Ol(_F(`${e}{${t}}`),BF([p(function(i,o,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Al)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[cF,dF,Xy,pF,"@container","@starting-style"],Al].includes(i.type)||(N.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=ic))},"addNamespace"),vF])),"compileCSS"),DM=p((e,t,r,i)=>{const o=$M(e,r),s=R2(t,o,{...e.themeVariables,theme:e.theme,look:e.look},i);return OM(i,s)},"createUserStyles"),IM=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Wr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),PM=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":vM,i=q0(`<body style="${LM}">${e}</body>`);return`<iframe style="width:${SM};height:${r};${BM}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${FM}">
309
+ ${EM}
310
+ </iframe>`},"putIntoIFrame"),uf=p((e,t,r,i,o)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",wM);return o&&a.attr("xmlns:xlink",o),a.append("g"),e},"appendDivSvgG");function Il(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Il,"sandboxedIframe");var RM=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),NM=p(async function(e,t,r){Da();const i=ac(t);t=i.code;const o=Vt();N.debug(o),t.length>(o?.maxTextSize??CM)&&(t=xM);const s=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=p(()=>{const O=At(d?n:c).node();O&&"remove"in O&&O.remove()},"removeTempElements");let u=At(document.body);const d=o.securityLevel===bM,f=o.securityLevel===kM,m=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const U=Il(At(r),a);u=At(U.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=At(r);uf(u,e,l,`font-family: ${m}`,TM)}else{if(RM(document,e,l,a),d){const U=Il(At(document.body),a);u=At(U.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=At("body");uf(u,e,l)}let y,C;try{y=await Dl.fromText(t,{title:i.title})}catch(U){if(o.suppressErrorRendering)throw h(),U;y=await Dl.fromText("error"),C=U}const x=u.select(c).node(),k=y.type,T=x.firstChild,S=T.firstChild,v=y.renderer.getClasses?.(t,y),A=DM(o,k,v,s),L=document.createElement("style");L.innerHTML=A,T.insertBefore(L,S);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(U){throw o.suppressErrorRendering?h():UE.draw(t,e,"11.17.2"),U}const E=u.select(`${c} svg`),Z=y.db.getAccTitle?.(),Y=y.db.getAccDescription?.();Y0(k,E,Z,Y);const st=p(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",_M);let U=u.select(c).node().innerHTML;if(N.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),U=IM(U,d,nr(o.arrowMarkerAbsolute)),d){const O=u.select(c+" svg").node();U=PM(U,O)}else f||(U=Vi.sanitize(U,{ADD_TAGS:AM,ADD_ATTR:MM,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return fM(),U},"serializeSvg")();if(C)throw C;return h(),{diagramType:k,svg:st,bindFunctions:y.db.bindFunctions}},"render");function W0(e={}){const t=ae({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),p2(t),t?.theme&&t.theme in kr?t.themeVariables=kr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=kr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?f2(t):Hf();Gl(r.logLevel),Da()}p(W0,"initialize");var H0=p((e,t={})=>{const{code:r}=sc(e);return Dl.fromText(r,t)},"getDiagramFromText");function Y0(e,t,r,i){P0(t,e),R0(t,r,i,t.attr("id"))}p(Y0,"addA11yInfo");var hi=Object.freeze({render:NM,parse:z0,getDiagramFromText:H0,initialize:W0,getConfig:Vt,setConfig:Yf,getSiteConfig:Hf,updateSiteConfig:g2,reset:p(()=>{Ws()},"reset"),globalReset:p(()=>{Ws(Zi)},"globalReset"),defaultConfig:Zi});Gl(Vt().logLevel);Ws(Vt());var qM=p((e,t,r)=>{N.warn(e),mh(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"),U0=p(async function(e={querySelector:".mermaid"}){try{await zM(e)}catch(t){if(mh(t)&&N.error(t.str),_r.parseError&&_r.parseError(t),!e.suppressErrors)throw N.error("Use the suppressErrors option to suppress these errors"),t}},"run"),zM=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=hi.getConfig();N.debug(`${e?"":"No "}Callback function found`);let o;if(r)o=r;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");N.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(N.debug("Start On Load: "+i?.startOnLoad),hi.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new ye.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(o)){if(N.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=kg(ye.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ye.detectInit(a);h&&N.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await V0(c,a,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){qM(u,n,_r.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),j0=p(function(e){hi.initialize(e)},"initialize"),WM=p(async function(e,t,r){N.warn("mermaid.init is deprecated. Please use run instead."),e&&j0(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await U0(i)},"init"),HM=p(async(e,{lazyLoad:t=!0}={})=>{Da(),el(...e),t===!1&&await uM()},"registerExternalDiagrams"),G0=p(function(){if(_r.startOnLoad){const{startOnLoad:e}=hi.getConfig();e&&_r.run().catch(t=>N.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",G0,!1);var YM=p(function(e){_r.parseError=e},"setParseErrorHandler"),ca=[],Xn=!1,X0=p(async()=>{if(!Xn){for(Xn=!0;ca.length>0;){const e=ca.shift();if(e)try{await e()}catch(t){N.error("Error executing queue",t)}}Xn=!1}},"executeQueue"),UM=p(async(e,t)=>new Promise((r,i)=>{const o=p(()=>new Promise((s,a)=>{hi.parse(e,t).then(n=>{s(n),r(n)},n=>{N.error("Error parsing",n),_r.parseError?.(n),a(n),i(n)})}),"performCall");ca.push(o),X0().catch(i)}),"parse"),V0=p((e,t,r)=>new Promise((i,o)=>{const s=p(()=>new Promise((a,n)=>{hi.render(e,t,r).then(l=>{a(l),i(l)},l=>{N.error("Error parsing",l),_r.parseError?.(l),n(l),o(l)})}),"performCall");ca.push(s),X0().catch(o)}),"render"),jM=p(()=>Object.keys(si).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),_r={startOnLoad:!0,mermaidAPI:hi,parse:UM,render:V0,init:WM,run:U0,registerExternalDiagrams:HM,registerLayoutLoaders:Uy,initialize:j0,parseError:void 0,contentLoaded:G0,setParseErrorHandler:YM,detectType:Xl,registerIconPacks:KS,getRegisteredDiagramsMetadata:jM},GM=_r;const D5=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:Ph,createCommonLayoutRenderer:My,default:GM,defaultMeasureLayout:Rh,paintLayoutData:Nh},Symbol.toStringTag,{value:"Module"}));export{nh as $,yh as A,zf as B,uv as C,vS as D,Gk as E,JM as F,ev as G,nF as H,Ho as I,aF as J,QM as K,Ta as L,B2 as M,Jf as N,ts as O,or as P,fS as Q,$u as R,Mu as S,h5 as T,Ft as U,o5 as V,n5 as W,a5 as X,r5 as Y,rv as Z,p as _,z2 as a,gf as a$,l5 as a0,i5 as a1,xi as a2,u5 as a3,c5 as a4,s5 as a5,Vi as a6,fu as a7,Aa as a8,yS as a9,wL as aA,me as aB,fB as aC,ky as aD,ag as aE,Mf as aF,pS as aG,KM as aH,Xe as aI,ZS as aJ,t5 as aK,ih as aL,Pr as aM,jo as aN,vu as aO,GT as aP,pt as aQ,Kp as aR,Fe as aS,qT as aT,rh as aU,gp as aV,is as aW,Cp as aX,e5 as aY,ik as aZ,Lc as a_,gl as aa,cv as ab,je as ac,z as ad,W as ae,D2 as af,ep as ag,gy as ah,Dh as ai,Sd as aj,os as ak,KS as al,gh as am,ut as an,b5 as ao,x5 as ap,My as aq,Pt as ar,wy as as,ft as at,C5 as au,ha as av,_y as aw,Fa as ax,Ih as ay,Cy as az,q2 as b,da as b0,pf as b1,rx as b2,mf as b3,zx as b4,Bb as b5,jC as b6,ex as b7,Wx as b8,Hc as b9,_b as bA,jr as bB,To as bC,Ti as bD,fs as bE,Ja as bF,G1 as bG,aL as bH,D5 as bI,xr as ba,Px as bb,$c as bc,Ns as bd,br as be,GC as bf,Ee as bg,Pc as bh,zl as bi,R1 as bj,fa as bk,Rs as bl,D1 as bm,Ff as bn,er as bo,XC as bp,jl as bq,df as br,N1 as bs,I1 as bt,v1 as bu,ua as bv,kf as bw,ma as bx,wf as by,B1 as bz,It as c,tp as d,ae as e,Tr as f,H2 as g,dy as h,Re as i,At as j,es as k,N as l,lg as m,Y2 as n,U2 as o,N2 as p,d5 as q,qr as r,W2 as s,J1 as t,O5 as u,$5 as v,pv as w,ye as x,Vt as y,G2 as z};