syntaur 0.56.0 → 0.58.0

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 (83) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dashboard/dist/assets/_basePickBy-BSxL8bBc.js +1 -0
  3. package/dashboard/dist/assets/{_baseUniq-C6ARYdEJ.js → _baseUniq-1f9ohhNp.js} +1 -1
  4. package/dashboard/dist/assets/arc-DlPK9j9g.js +1 -0
  5. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-eoW8_dbN.js → architectureDiagram-2XIMDMQ5-CcV5llaa.js} +3 -3
  6. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ--XxaNbBK.js → blockDiagram-WCTKOSBZ-DGkYzINJ.js} +1 -1
  7. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-D2B-NJq6.js → c4Diagram-IC4MRINW-CI4Z5c6N.js} +1 -1
  8. package/dashboard/dist/assets/channel-Qr2eMXkR.js +1 -0
  9. package/dashboard/dist/assets/{chunk-4BX2VUAB-CY34rkdT.js → chunk-4BX2VUAB-C8KasqJp.js} +1 -1
  10. package/dashboard/dist/assets/chunk-55IACEB6-CgAEilyk.js +1 -0
  11. package/dashboard/dist/assets/{chunk-FMBD7UC4-D00VtmIk.js → chunk-FMBD7UC4-DsNiby6p.js} +1 -1
  12. package/dashboard/dist/assets/chunk-JSJVCQXG-4eCDFRIx.js +1 -0
  13. package/dashboard/dist/assets/chunk-KX2RTZJC-DHia_zig.js +1 -0
  14. package/dashboard/dist/assets/{chunk-NQ4KR5QH-DnYhUmZY.js → chunk-NQ4KR5QH-V-IiQwer.js} +2 -2
  15. package/dashboard/dist/assets/{chunk-QZHKN3VN-CqCcFoFI.js → chunk-QZHKN3VN-BXTS8E6J.js} +1 -1
  16. package/dashboard/dist/assets/{chunk-WL4C6EOR-Bwx5h46l.js → chunk-WL4C6EOR-BuLlUWn0.js} +4 -4
  17. package/dashboard/dist/assets/classDiagram-VBA2DB6C-DHkm1twH.js +1 -0
  18. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-DHkm1twH.js +1 -0
  19. package/dashboard/dist/assets/clone-ChZeNkMI.js +1 -0
  20. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-QUZroYuH.js → cose-bilkent-S5V4N54A-B1M1ENTo.js} +1 -1
  21. package/dashboard/dist/assets/{dagre-KLK3FWXG-D8hYiZ7i.js → dagre-KLK3FWXG-3pyNBzWY.js} +2 -2
  22. package/dashboard/dist/assets/diagram-E7M64L7V-B5-5pbKh.js +24 -0
  23. package/dashboard/dist/assets/diagram-IFDJBPK2-CTx5NFFi.js +43 -0
  24. package/dashboard/dist/assets/{diagram-P4PSJMXO-GcqkAPB2.js → diagram-P4PSJMXO-B5KRvZqb.js} +2 -2
  25. package/dashboard/dist/assets/{erDiagram-INFDFZHY-DQnXbhhn.js → erDiagram-INFDFZHY-BhVWsRrc.js} +3 -3
  26. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-DSmXtiZK.js → flowDiagram-PKNHOUZH-CuoB0thO.js} +1 -1
  27. package/dashboard/dist/assets/ganttDiagram-A5KZAMGK-yNNalQY9.js +292 -0
  28. package/dashboard/dist/assets/gitGraphDiagram-K3NZZRJ6-DfEhHzOH.js +65 -0
  29. package/dashboard/dist/assets/{graph-Czw8ZNXY.js → graph-NaP7lLuY.js} +1 -1
  30. package/dashboard/dist/assets/index-BG_Ed2-k.js +644 -0
  31. package/dashboard/dist/assets/index-BeL-DOH-.css +1 -0
  32. package/dashboard/dist/assets/infoDiagram-LFFYTUFH-CDAMAxDE.js +2 -0
  33. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-39XaFufR.js → ishikawaDiagram-PHBUUO56-DMRl5xeW.js} +5 -5
  34. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-DCMzi84v.js → journeyDiagram-4ABVD52K-DtuQQjW_.js} +1 -1
  35. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-RSNF4GmM.js → kanban-definition-K7BYSVSG-DYGt44vU.js} +7 -7
  36. package/dashboard/dist/assets/{layout-AOYFASCy.js → layout-B9sS0Gu9.js} +1 -1
  37. package/dashboard/dist/assets/linear-DQcNFWB2.js +1 -0
  38. package/dashboard/dist/assets/mermaid.core-CzhsZ1QZ.js +255 -0
  39. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-Ck4L1K7y.js → mindmap-definition-YRQLILUH-CL8mKZYJ.js} +3 -3
  40. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-BHEH_9Yh.js → pieDiagram-SKSYHLDU-BULUJrhI.js} +3 -3
  41. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-DScQHhsU.js → quadrantDiagram-337W2JSQ-CWQC3mf-.js} +4 -4
  42. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-DLmxwUdt.js → requirementDiagram-Z7DCOOCP-CYadvMn7.js} +3 -3
  43. package/dashboard/dist/assets/sankeyDiagram-WA2Y5GQK-e2AhGJiF.js +10 -0
  44. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-woFPqQIY.js → sequenceDiagram-2WXFIKYE-CeWKKFdg.js} +3 -3
  45. package/dashboard/dist/assets/stateDiagram-RAJIS63D-BvN-wCps.js +1 -0
  46. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-BV7kxiIj.js +1 -0
  47. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-CGVOTXAD.js → timeline-definition-YZTLITO2-DOLRfgbL.js} +4 -4
  48. package/dashboard/dist/assets/{treemap-KZPCXAKY-CGmqtjaL.js → treemap-KZPCXAKY-VqhsqWzF.js} +1 -1
  49. package/dashboard/dist/assets/vennDiagram-LZ73GAT5-Dt-knC6b.js +34 -0
  50. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW--uOFgr6-.js → xychartDiagram-JWTSCODW-A3enOtVP.js} +3 -3
  51. package/dashboard/dist/index.html +2 -2
  52. package/dist/dashboard/server.js +208 -131
  53. package/dist/dashboard/server.js.map +1 -1
  54. package/dist/index.js +584 -591
  55. package/dist/index.js.map +1 -1
  56. package/dist/launch/index.js.map +1 -1
  57. package/package.json +1 -1
  58. package/platforms/claude-code/.claude-plugin/plugin.json +1 -1
  59. package/platforms/codex/.codex-plugin/plugin.json +1 -1
  60. package/platforms/hermes/plugins/syntaur/__pycache__/__init__.cpython-312.pyc +0 -0
  61. package/platforms/hermes/plugins/syntaur/__pycache__/boundary.cpython-312.pyc +0 -0
  62. package/dashboard/dist/assets/_basePickBy-BboQhTYn.js +0 -1
  63. package/dashboard/dist/assets/arc-D76wUYJ-.js +0 -1
  64. package/dashboard/dist/assets/channel-BPykMjmL.js +0 -1
  65. package/dashboard/dist/assets/chunk-55IACEB6-CLXE1Ejn.js +0 -1
  66. package/dashboard/dist/assets/chunk-JSJVCQXG-_EITJTaI.js +0 -1
  67. package/dashboard/dist/assets/chunk-KX2RTZJC-DrqZI_kX.js +0 -1
  68. package/dashboard/dist/assets/classDiagram-VBA2DB6C-z8L393gl.js +0 -1
  69. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-z8L393gl.js +0 -1
  70. package/dashboard/dist/assets/clone--rMJOGpf.js +0 -1
  71. package/dashboard/dist/assets/diagram-E7M64L7V-Cl_n980P.js +0 -24
  72. package/dashboard/dist/assets/diagram-IFDJBPK2-01DdmzmS.js +0 -43
  73. package/dashboard/dist/assets/ganttDiagram-A5KZAMGK-BLyt9LDp.js +0 -292
  74. package/dashboard/dist/assets/gitGraphDiagram-K3NZZRJ6-FWlr0I_j.js +0 -65
  75. package/dashboard/dist/assets/index-EntCfH3I.css +0 -1
  76. package/dashboard/dist/assets/index-zHNBGpC7.js +0 -602
  77. package/dashboard/dist/assets/infoDiagram-LFFYTUFH-CygGWMzd.js +0 -2
  78. package/dashboard/dist/assets/linear-Bf-cRRMe.js +0 -1
  79. package/dashboard/dist/assets/mermaid.core-7QJzPWTu.js +0 -255
  80. package/dashboard/dist/assets/sankeyDiagram-WA2Y5GQK-B6OZtKmg.js +0 -10
  81. package/dashboard/dist/assets/stateDiagram-RAJIS63D-Db9HV_HG.js +0 -1
  82. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DZsj07hg.js +0 -1
  83. package/dashboard/dist/assets/vennDiagram-LZ73GAT5-DAuyqqKn.js +0 -34
@@ -0,0 +1,255 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KLK3FWXG-3pyNBzWY.js","assets/graph-NaP7lLuY.js","assets/_baseUniq-1f9ohhNp.js","assets/layout-B9sS0Gu9.js","assets/_basePickBy-BSxL8bBc.js","assets/clone-ChZeNkMI.js","assets/index-BG_Ed2-k.js","assets/index-BeL-DOH-.css","assets/cose-bilkent-S5V4N54A-B1M1ENTo.js","assets/cytoscape.esm-BQaXIfA_.js","assets/c4Diagram-IC4MRINW-CI4Z5c6N.js","assets/chunk-JSJVCQXG-4eCDFRIx.js","assets/flowDiagram-PKNHOUZH-CuoB0thO.js","assets/chunk-FMBD7UC4-DsNiby6p.js","assets/chunk-55IACEB6-CgAEilyk.js","assets/chunk-KX2RTZJC-DHia_zig.js","assets/channel-Qr2eMXkR.js","assets/erDiagram-INFDFZHY-BhVWsRrc.js","assets/gitGraphDiagram-K3NZZRJ6-DfEhHzOH.js","assets/chunk-4BX2VUAB-C8KasqJp.js","assets/chunk-QZHKN3VN-BXTS8E6J.js","assets/treemap-KZPCXAKY-VqhsqWzF.js","assets/ganttDiagram-A5KZAMGK-yNNalQY9.js","assets/linear-DQcNFWB2.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-LFFYTUFH-CDAMAxDE.js","assets/pieDiagram-SKSYHLDU-BULUJrhI.js","assets/arc-DlPK9j9g.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-337W2JSQ-CWQC3mf-.js","assets/xychartDiagram-JWTSCODW-A3enOtVP.js","assets/requirementDiagram-Z7DCOOCP-CYadvMn7.js","assets/sequenceDiagram-2WXFIKYE-CeWKKFdg.js","assets/classDiagram-VBA2DB6C-DHkm1twH.js","assets/chunk-WL4C6EOR-BuLlUWn0.js","assets/classDiagram-v2-RAHNMMFH-DHkm1twH.js","assets/stateDiagram-RAJIS63D-BvN-wCps.js","assets/chunk-NQ4KR5QH-V-IiQwer.js","assets/stateDiagram-v2-FVOUBMTO-BV7kxiIj.js","assets/journeyDiagram-4ABVD52K-DtuQQjW_.js","assets/timeline-definition-YZTLITO2-DOLRfgbL.js","assets/mindmap-definition-YRQLILUH-CL8mKZYJ.js","assets/kanban-definition-K7BYSVSG-DYGt44vU.js","assets/sankeyDiagram-WA2Y5GQK-e2AhGJiF.js","assets/diagram-P4PSJMXO-B5KRvZqb.js","assets/diagram-IFDJBPK2-CTx5NFFi.js","assets/blockDiagram-WCTKOSBZ-DGkYzINJ.js","assets/architectureDiagram-2XIMDMQ5-CcV5llaa.js","assets/ishikawaDiagram-PHBUUO56-DMRl5xeW.js","assets/vennDiagram-LZ73GAT5-Dt-knC6b.js","assets/diagram-E7M64L7V-B5-5pbKh.js"])))=>i.map(i=>d[i]);
2
+ var mg=Object.defineProperty;var yg=(e,t,r)=>t in e?mg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var yt=(e,t,r)=>yg(e,typeof t!="symbol"?t+"":t,r);import{g as xg,_ as dt,s as ot}from"./index-BG_Ed2-k.js";var Ji={exports:{}},bg=Ji.exports,jo;function Cg(){return jo||(jo=1,(function(e,t){(function(r,i){e.exports=i()})(bg,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",c="hour",l="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={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(A){var M=["th","st","nd","rd"],B=A%100;return"["+A+(M[(B-20)%10]||M[B]||M[0])+"]"}},_=function(A,M,B){var E=String(A);return!E||E.length>=M?A:""+Array(M+1-E.length).join(B)+A},v={s:_,z:function(A){var M=-A.utcOffset(),B=Math.abs(M),E=Math.floor(B/60),L=B%60;return(M<=0?"+":"-")+_(E,2,"0")+":"+_(L,2,"0")},m:function A(M,B){if(M.date()<B.date())return-A(B,M);var E=12*(B.year()-M.year())+(B.month()-M.month()),L=M.clone().add(E,u),W=B-L<0,Y=M.clone().add(E+(W?-1:1),u);return+(-(E+(B-L)/(W?L-Y:Y-L))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:d,w:h,d:l,D:g,h:c,m:n,s:o,ms:s,Q:f}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},S="en",C={};C[S]=b;var T="$isDayjsObject",F=function(A){return A instanceof z||!(!A||!A[T])},P=function A(M,B,E){var L;if(!M)return S;if(typeof M=="string"){var W=M.toLowerCase();C[W]&&(L=W),B&&(C[W]=B,L=W);var Y=M.split("-");if(!L&&Y.length>1)return A(Y[0])}else{var H=M.name;C[H]=M,L=H}return!E&&L&&(S=L),L||!E&&S},R=function(A,M){if(F(A))return A.clone();var B=typeof M=="object"?M:{};return B.date=A,B.args=arguments,new z(B)},$=v;$.l=P,$.i=F,$.w=function(A,M){return R(A,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var z=(function(){function A(B){this.$L=P(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[T]=!0}var M=A.prototype;return M.parse=function(B){this.$d=(function(E){var L=E.date,W=E.utc;if(L===null)return new Date(NaN);if($.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var Y=L.match(y);if(Y){var H=Y[2]-1||0,ut=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],H,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ut)):new Date(Y[1],H,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ut)}}return new Date(L)})(B),this.init()},M.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()},M.$utils=function(){return $},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(B,E){var L=R(B);return this.startOf(E)<=L&&L<=this.endOf(E)},M.isAfter=function(B,E){return R(B)<this.startOf(E)},M.isBefore=function(B,E){return this.endOf(E)<R(B)},M.$g=function(B,E,L){return $.u(B)?this[E]:this.set(L,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,E){var L=this,W=!!$.u(E)||E,Y=$.p(B),H=function(_t,bt){var vt=$.w(L.$u?Date.UTC(L.$y,bt,_t):new Date(L.$y,bt,_t),L);return W?vt:vt.endOf(l)},ut=function(_t,bt){return $.w(L.toDate()[_t].apply(L.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(bt)),L)},at=this.$W,xt=this.$M,st=this.$D,nt="set"+(this.$u?"UTC":"");switch(Y){case d:return W?H(1,0):H(31,11);case u:return W?H(1,xt):H(0,xt+1);case h:var ct=this.$locale().weekStart||0,mt=(at<ct?at+7:at)-ct;return H(W?st-mt:st+(6-mt),xt);case l:case g:return ut(nt+"Hours",0);case c:return ut(nt+"Minutes",1);case n:return ut(nt+"Seconds",2);case o:return ut(nt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,E){var L,W=$.p(B),Y="set"+(this.$u?"UTC":""),H=(L={},L[l]=Y+"Date",L[g]=Y+"Date",L[u]=Y+"Month",L[d]=Y+"FullYear",L[c]=Y+"Hours",L[n]=Y+"Minutes",L[o]=Y+"Seconds",L[s]=Y+"Milliseconds",L)[W],ut=W===l?this.$D+(E-this.$W):E;if(W===u||W===d){var at=this.clone().set(g,1);at.$d[H](ut),at.init(),this.$d=at.set(g,Math.min(this.$D,at.daysInMonth())).$d}else H&&this.$d[H](ut);return this.init(),this},M.set=function(B,E){return this.clone().$set(B,E)},M.get=function(B){return this[$.p(B)]()},M.add=function(B,E){var L,W=this;B=Number(B);var Y=$.p(E),H=function(xt){var st=R(W);return $.w(st.date(st.date()+Math.round(xt*B)),W)};if(Y===u)return this.set(u,this.$M+B);if(Y===d)return this.set(d,this.$y+B);if(Y===l)return H(1);if(Y===h)return H(7);var ut=(L={},L[n]=i,L[c]=a,L[o]=r,L)[Y]||1,at=this.$d.getTime()+B*ut;return $.w(at,this)},M.subtract=function(B,E){return this.add(-1*B,E)},M.format=function(B){var E=this,L=this.$locale();if(!this.isValid())return L.invalidDate||m;var W=B||"YYYY-MM-DDTHH:mm:ssZ",Y=$.z(this),H=this.$H,ut=this.$m,at=this.$M,xt=L.weekdays,st=L.months,nt=L.meridiem,ct=function(bt,vt,oe,re){return bt&&(bt[vt]||bt(E,W))||oe[vt].slice(0,re)},mt=function(bt){return $.s(H%12||12,bt,"0")},_t=nt||function(bt,vt,oe){var re=bt<12?"AM":"PM";return oe?re.toLowerCase():re};return W.replace(x,(function(bt,vt){return vt||(function(oe){switch(oe){case"YY":return String(E.$y).slice(-2);case"YYYY":return $.s(E.$y,4,"0");case"M":return at+1;case"MM":return $.s(at+1,2,"0");case"MMM":return ct(L.monthsShort,at,st,3);case"MMMM":return ct(st,at);case"D":return E.$D;case"DD":return $.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ct(L.weekdaysMin,E.$W,xt,2);case"ddd":return ct(L.weekdaysShort,E.$W,xt,3);case"dddd":return xt[E.$W];case"H":return String(H);case"HH":return $.s(H,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return _t(H,ut,!0);case"A":return _t(H,ut,!1);case"m":return String(ut);case"mm":return $.s(ut,2,"0");case"s":return String(E.$s);case"ss":return $.s(E.$s,2,"0");case"SSS":return $.s(E.$ms,3,"0");case"Z":return Y}return null})(bt)||Y.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,E,L){var W,Y=this,H=$.p(E),ut=R(B),at=(ut.utcOffset()-this.utcOffset())*i,xt=this-ut,st=function(){return $.m(Y,ut)};switch(H){case d:W=st()/12;break;case u:W=st();break;case f:W=st()/3;break;case h:W=(xt-at)/6048e5;break;case l:W=(xt-at)/864e5;break;case c:W=xt/a;break;case n:W=xt/i;break;case o:W=xt/r;break;default:W=xt}return L?W:$.a(W)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return C[this.$L]},M.locale=function(B,E){if(!B)return this.$L;var L=this.clone(),W=P(B,E,!0);return W&&(L.$L=W),L},M.clone=function(){return $.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},A})(),O=z.prototype;return R.prototype=O,[["$ms",s],["$s",o],["$m",n],["$H",c],["$W",l],["$M",u],["$y",d],["$D",g]].forEach((function(A){O[A[1]]=function(M){return this.$g(M,A[0],A[1])}})),R.extend=function(A,M){return A.$i||(A(M,z,R),A.$i=!0),R},R.locale=P,R.isDayjs=F,R.unix=function(A){return R(1e3*A)},R.en=C[S],R.Ls=C,R.p={},R}))})(Ji)),Ji.exports}var _g=Cg();const kg=xg(_g);var hc=Object.defineProperty,p=(e,t)=>hc(e,"name",{value:t,configurable:!0}),wg=(e,t)=>{for(var r in t)hc(e,r,{get:t[r],enumerable:!0})},Te={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},En=p(function(e="fatal"){let t=Te.fatal;typeof e=="string"?e.toLowerCase()in Te&&(t=Te[e]):typeof e=="number"&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=Te.fatal&&(D.fatal=console.error?console.error.bind(console,ie("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ie("FATAL"))),t<=Te.error&&(D.error=console.error?console.error.bind(console,ie("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ie("ERROR"))),t<=Te.warn&&(D.warn=console.warn?console.warn.bind(console,ie("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ie("WARN"))),t<=Te.info&&(D.info=console.info?console.info.bind(console,ie("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ie("INFO"))),t<=Te.debug&&(D.debug=console.debug?console.debug.bind(console,ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ie("DEBUG"))),t<=Te.trace&&(D.trace=console.debug?console.debug.bind(console,ie("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ie("TRACE")))},"setLogLevel"),ie=p(e=>`%c${kg().format("ss.SSS")} : ${e} : `,"format");const ta={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 a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return ta.hue2rgb(s,a,e+1/3)*255;case"g":return ta.hue2rgb(s,a,e)*255;case"b":return ta.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,c=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return c*100;switch(a){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}}},Sg={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},vg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},it={channel:ta,lang:Sg,unit:vg},Re={};for(let e=0;e<=255;e++)Re[e]=it.unit.dec2hex(e);const Rt={ALL:0,RGB:1,HSL:2};class Tg{constructor(){this.type=Rt.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=Rt.ALL}is(t){return this.type===t}}class Bg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Tg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Rt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=it.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=it.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=it.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=it.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=it.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=it.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Rt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Rt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Rt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Rt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Rt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Rt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Rt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Rt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Rt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Rt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Rt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Rt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const za=new Bg({r:0,g:0,b:0,a:0},"transparent"),wr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(wr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,c=o?8:4,l=s?0:-1,h=o?255:15;return za.set({r:(i>>c*(l+3)&h)*n,g:(i>>c*(l+2)&h)*n,b:(i>>c*(l+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${Re[Math.round(t)]}${Re[Math.round(r)]}${Re[Math.round(i)]}${Re[Math.round(a*255)]}`:`#${Re[Math.round(t)]}${Re[Math.round(r)]}${Re[Math.round(i)]}`}},Je={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(Je.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return it.channel.clamp.h(parseFloat(r)*.9);case"rad":return it.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return it.channel.clamp.h(parseFloat(r)*360)}}return it.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Je.re);if(!r)return;const[,i,a,s,o,n]=r;return za.set({h:Je._hue2deg(i),s:it.channel.clamp.s(parseFloat(a)),l:it.channel.clamp.l(parseFloat(s)),a:o?it.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%, ${a})`:`hsl(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%)`}},hi={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=hi.colors[e];if(t)return wr.parse(t)},stringify:e=>{const t=wr.stringify(e);for(const r in hi.colors)if(hi.colors[r]===t)return r}},si={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(si.re);if(!r)return;const[,i,a,s,o,n,c,l,h]=r;return za.set({r:it.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:it.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:it.channel.clamp.b(c?parseFloat(n)*2.55:parseFloat(n)),a:l?it.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)}, ${it.lang.round(a)})`:`rgb(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)})`}},Ce={format:{keyword:hi,hex:wr,rgb:si,rgba:si,hsl:Je,hsla:Je},parse:e=>{if(typeof e!="string")return e;const t=wr.parse(e)||si.parse(e)||Je.parse(e)||hi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Rt.HSL)||e.data.r===void 0?Je.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?si.stringify(e):wr.stringify(e)},uc=(e,t)=>{const r=Ce.parse(e);for(const i in t)r[i]=it.channel.clamp[i](t[i]);return Ce.stringify(r)},ui=(e,t,r=0,i=1)=>{if(typeof e!="number")return uc(e,{a:t});const a=za.set({r:it.channel.clamp.r(e),g:it.channel.clamp.g(t),b:it.channel.clamp.b(r),a:it.channel.clamp.a(i)});return Ce.stringify(a)},Lg=e=>{const{r:t,g:r,b:i}=Ce.parse(e),a=.2126*it.channel.toLinear(t)+.7152*it.channel.toLinear(r)+.0722*it.channel.toLinear(i);return it.lang.round(a)},Ag=e=>Lg(e)>=.5,Bi=e=>!Ag(e),dc=(e,t,r)=>{const i=Ce.parse(e),a=i[t],s=it.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ce.stringify(i)},j=(e,t)=>dc(e,"l",t),J=(e,t)=>dc(e,"l",-t),w=(e,t)=>{const r=Ce.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return uc(e,i)},Mg=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Ce.parse(e),{r:n,g:c,b:l,a:h}=Ce.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+n*y,b=a*m+c*y,_=s*m+l*y,v=o*u+h*(1-u);return ui(x,b,_,v)},N=(e,t=100)=>{const r=Ce.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Mg(r,e,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:fc,setPrototypeOf:Yo,isFrozen:Eg,getPrototypeOf:$g,getOwnPropertyDescriptor:Fg}=Object;let{freeze:Gt,seal:se,create:ea}=Object,{apply:Ps,construct:Ns}=typeof Reflect<"u"&&Reflect;Gt||(Gt=function(t){return t});se||(se=function(t){return t});Ps||(Ps=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});Ns||(Ns=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const Hi=Vt(Array.prototype.forEach),Dg=Vt(Array.prototype.lastIndexOf),Uo=Vt(Array.prototype.pop),Gr=Vt(Array.prototype.push),Og=Vt(Array.prototype.splice),ra=Vt(String.prototype.toLowerCase),bs=Vt(String.prototype.toString),Cs=Vt(String.prototype.match),Vr=Vt(String.prototype.replace),Rg=Vt(String.prototype.indexOf),Ig=Vt(String.prototype.trim),te=Vt(Object.prototype.hasOwnProperty),Ht=Vt(RegExp.prototype.test),Xr=Pg(TypeError);function Vt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Ps(e,t,i)}}function Pg(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ns(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ra;Yo&&Yo(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(Eg(t)||(t[i]=s),a=s)}e[a]=!0}return e}function Ng(e){for(let t=0;t<e.length;t++)te(e,t)||(e[t]=null);return e}function me(e){const t=ea(null);for(const[r,i]of fc(e))te(e,r)&&(Array.isArray(i)?t[r]=Ng(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=me(i):t[r]=i);return t}function Zr(e,t){for(;e!==null;){const i=Fg(e,t);if(i){if(i.get)return Vt(i.get);if(typeof i.value=="function")return Vt(i.value)}e=$g(e)}function r(){return null}return r}const Go=Gt(["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"]),_s=Gt(["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"]),ks=Gt(["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"]),zg=Gt(["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"]),ws=Gt(["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"]),Wg=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vo=Gt(["#text"]),Xo=Gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ss=Gt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Zo=Gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ji=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qg=se(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Hg=se(/<%[\w\W]*|[\w\W]*%>/gm),jg=se(/\$\{[\w\W]*/gm),Yg=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ug=se(/^aria-[\-\w]+$/),pc=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gg=se(/^(?:\w+script|data):/i),Vg=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gc=se(/^html$/i),Xg=se(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ko=Object.freeze({__proto__:null,ARIA_ATTR:Ug,ATTR_WHITESPACE:Vg,CUSTOM_ELEMENT:Xg,DATA_ATTR:Yg,DOCTYPE_NAME:gc,ERB_EXPR:Hg,IS_ALLOWED_URI:pc,IS_SCRIPT_OR_DATA:Gg,MUSTACHE_EXPR:qg,TMPLIT_EXPR:jg});const Kr={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zg=function(){return typeof window>"u"?null:window},Kg=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Qo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function mc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zg();const t=Q=>mc(Q);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Kr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:n,Element:c,NodeFilter:l,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=c.prototype,m=Zr(g,"cloneNode"),y=Zr(g,"remove"),x=Zr(g,"nextSibling"),b=Zr(g,"childNodes"),_=Zr(g,"parentNode");if(typeof o=="function"){const Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let v,S="";const{implementation:C,createNodeIterator:T,createDocumentFragment:F,getElementsByTagName:P}=r,{importNode:R}=i;let $=Qo();t.isSupported=typeof fc=="function"&&typeof _=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:O,TMPLIT_EXPR:A,DATA_ATTR:M,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:E,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:W}=Ko;let{IS_ALLOWED_URI:Y}=Ko,H=null;const ut=lt({},[...Go,..._s,...ks,...ws,...Vo]);let at=null;const xt=lt({},[...Xo,...Ss,...Zo,...ji]);let st=Object.seal(ea(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),nt=null,ct=null;const mt=Object.seal(ea(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _t=!0,bt=!0,vt=!1,oe=!0,re=!1,Oe=!0,Ge=!1,cs=!1,hs=!1,fr=!1,Ii=!1,Pi=!1,Bo=!0,Lo=!1;const lg="user-content-";let us=!0,Yr=!1,pr={},pe=null;const ds=lt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ao=null;const Mo=lt({},["audio","video","img","source","image","track"]);let fs=null;const Eo=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ni="http://www.w3.org/1998/Math/MathML",zi="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let gr=we,ps=!1,gs=null;const cg=lt({},[Ni,zi,we],bs);let Wi=lt({},["mi","mo","mn","ms","mtext"]),qi=lt({},["annotation-xml"]);const hg=lt({},["title","style","font","a","script"]);let Ur=null;const ug=["application/xhtml+xml","text/html"],dg="text/html";let Lt=null,mr=null;const fg=r.createElement("form"),$o=function(k){return k instanceof RegExp||k instanceof Function},ms=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mr&&mr===k)){if((!k||typeof k!="object")&&(k={}),k=me(k),Ur=ug.indexOf(k.PARSER_MEDIA_TYPE)===-1?dg:k.PARSER_MEDIA_TYPE,Lt=Ur==="application/xhtml+xml"?bs:ra,H=te(k,"ALLOWED_TAGS")?lt({},k.ALLOWED_TAGS,Lt):ut,at=te(k,"ALLOWED_ATTR")?lt({},k.ALLOWED_ATTR,Lt):xt,gs=te(k,"ALLOWED_NAMESPACES")?lt({},k.ALLOWED_NAMESPACES,bs):cg,fs=te(k,"ADD_URI_SAFE_ATTR")?lt(me(Eo),k.ADD_URI_SAFE_ATTR,Lt):Eo,Ao=te(k,"ADD_DATA_URI_TAGS")?lt(me(Mo),k.ADD_DATA_URI_TAGS,Lt):Mo,pe=te(k,"FORBID_CONTENTS")?lt({},k.FORBID_CONTENTS,Lt):ds,nt=te(k,"FORBID_TAGS")?lt({},k.FORBID_TAGS,Lt):me({}),ct=te(k,"FORBID_ATTR")?lt({},k.FORBID_ATTR,Lt):me({}),pr=te(k,"USE_PROFILES")?k.USE_PROFILES:!1,_t=k.ALLOW_ARIA_ATTR!==!1,bt=k.ALLOW_DATA_ATTR!==!1,vt=k.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,re=k.SAFE_FOR_TEMPLATES||!1,Oe=k.SAFE_FOR_XML!==!1,Ge=k.WHOLE_DOCUMENT||!1,fr=k.RETURN_DOM||!1,Ii=k.RETURN_DOM_FRAGMENT||!1,Pi=k.RETURN_TRUSTED_TYPE||!1,hs=k.FORCE_BODY||!1,Bo=k.SANITIZE_DOM!==!1,Lo=k.SANITIZE_NAMED_PROPS||!1,us=k.KEEP_CONTENT!==!1,Yr=k.IN_PLACE||!1,Y=k.ALLOWED_URI_REGEXP||pc,gr=k.NAMESPACE||we,Wi=k.MATHML_TEXT_INTEGRATION_POINTS||Wi,qi=k.HTML_INTEGRATION_POINTS||qi,st=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&$o(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&$o(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),re&&(bt=!1),Ii&&(fr=!0),pr&&(H=lt({},Vo),at=ea(null),pr.html===!0&&(lt(H,Go),lt(at,Xo)),pr.svg===!0&&(lt(H,_s),lt(at,Ss),lt(at,ji)),pr.svgFilters===!0&&(lt(H,ks),lt(at,Ss),lt(at,ji)),pr.mathMl===!0&&(lt(H,ws),lt(at,Zo),lt(at,ji))),te(k,"ADD_TAGS")||(mt.tagCheck=null),te(k,"ADD_ATTR")||(mt.attributeCheck=null),k.ADD_TAGS&&(typeof k.ADD_TAGS=="function"?mt.tagCheck=k.ADD_TAGS:(H===ut&&(H=me(H)),lt(H,k.ADD_TAGS,Lt))),k.ADD_ATTR&&(typeof k.ADD_ATTR=="function"?mt.attributeCheck=k.ADD_ATTR:(at===xt&&(at=me(at)),lt(at,k.ADD_ATTR,Lt))),k.ADD_URI_SAFE_ATTR&&lt(fs,k.ADD_URI_SAFE_ATTR,Lt),k.FORBID_CONTENTS&&(pe===ds&&(pe=me(pe)),lt(pe,k.FORBID_CONTENTS,Lt)),k.ADD_FORBID_CONTENTS&&(pe===ds&&(pe=me(pe)),lt(pe,k.ADD_FORBID_CONTENTS,Lt)),us&&(H["#text"]=!0),Ge&&lt(H,["html","head","body"]),H.table&&(lt(H,["tbody"]),delete nt.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,S=v.createHTML("")}else v===void 0&&(v=Kg(d,a)),v!==null&&typeof S=="string"&&(S=v.createHTML(""));Gt&&Gt(k),mr=k}},Fo=lt({},[..._s,...ks,...zg]),Do=lt({},[...ws,...Wg]),pg=function(k){let I=_(k);(!I||!I.tagName)&&(I={namespaceURI:gr,tagName:"template"});const X=ra(k.tagName),kt=ra(I.tagName);return gs[k.namespaceURI]?k.namespaceURI===zi?I.namespaceURI===we?X==="svg":I.namespaceURI===Ni?X==="svg"&&(kt==="annotation-xml"||Wi[kt]):!!Fo[X]:k.namespaceURI===Ni?I.namespaceURI===we?X==="math":I.namespaceURI===zi?X==="math"&&qi[kt]:!!Do[X]:k.namespaceURI===we?I.namespaceURI===zi&&!qi[kt]||I.namespaceURI===Ni&&!Wi[kt]?!1:!Do[X]&&(hg[X]||!Fo[X]):!!(Ur==="application/xhtml+xml"&&gs[k.namespaceURI]):!1},ge=function(k){Gr(t.removed,{element:k});try{_(k).removeChild(k)}catch{y(k)}},Ve=function(k,I){try{Gr(t.removed,{attribute:I.getAttributeNode(k),from:I})}catch{Gr(t.removed,{attribute:null,from:I})}if(I.removeAttribute(k),k==="is")if(fr||Ii)try{ge(I)}catch{}else try{I.setAttribute(k,"")}catch{}},Oo=function(k){let I=null,X=null;if(hs)k="<remove></remove>"+k;else{const Tt=Cs(k,/^[\r\n\t ]+/);X=Tt&&Tt[0]}Ur==="application/xhtml+xml"&&gr===we&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const kt=v?v.createHTML(k):k;if(gr===we)try{I=new f().parseFromString(kt,Ur)}catch{}if(!I||!I.documentElement){I=C.createDocument(gr,"template",null);try{I.documentElement.innerHTML=ps?S:kt}catch{}}const Ot=I.body||I.documentElement;return k&&X&&Ot.insertBefore(r.createTextNode(X),Ot.childNodes[0]||null),gr===we?P.call(I,Ge?"html":"body")[0]:Ge?I.documentElement:Ot},Ro=function(k){return T.call(k.ownerDocument||k,k,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ys=function(k){return k instanceof u&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof h)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Io=function(k){return typeof n=="function"&&k instanceof n};function Se(Q,k,I){Hi(Q,X=>{X.call(t,k,I,mr)})}const Po=function(k){let I=null;if(Se($.beforeSanitizeElements,k,null),ys(k))return ge(k),!0;const X=Lt(k.nodeName);if(Se($.uponSanitizeElement,k,{tagName:X,allowedTags:H}),Oe&&k.hasChildNodes()&&!Io(k.firstElementChild)&&Ht(/<[/\w!]/g,k.innerHTML)&&Ht(/<[/\w!]/g,k.textContent)||k.nodeType===Kr.progressingInstruction||Oe&&k.nodeType===Kr.comment&&Ht(/<[/\w]/g,k.data))return ge(k),!0;if(!(mt.tagCheck instanceof Function&&mt.tagCheck(X))&&(!H[X]||nt[X])){if(!nt[X]&&zo(X)&&(st.tagNameCheck instanceof RegExp&&Ht(st.tagNameCheck,X)||st.tagNameCheck instanceof Function&&st.tagNameCheck(X)))return!1;if(us&&!pe[X]){const kt=_(k)||k.parentNode,Ot=b(k)||k.childNodes;if(Ot&&kt){const Tt=Ot.length;for(let Xt=Tt-1;Xt>=0;--Xt){const ve=m(Ot[Xt],!0);ve.__removalCount=(k.__removalCount||0)+1,kt.insertBefore(ve,x(k))}}}return ge(k),!0}return k instanceof c&&!pg(k)||(X==="noscript"||X==="noembed"||X==="noframes")&&Ht(/<\/no(script|embed|frames)/i,k.innerHTML)?(ge(k),!0):(re&&k.nodeType===Kr.text&&(I=k.textContent,Hi([z,O,A],kt=>{I=Vr(I,kt," ")}),k.textContent!==I&&(Gr(t.removed,{element:k.cloneNode()}),k.textContent=I)),Se($.afterSanitizeElements,k,null),!1)},No=function(k,I,X){if(ct[I]||Bo&&(I==="id"||I==="name")&&(X in r||X in fg))return!1;if(!(bt&&!ct[I]&&Ht(M,I))){if(!(_t&&Ht(B,I))){if(!(mt.attributeCheck instanceof Function&&mt.attributeCheck(I,k))){if(!at[I]||ct[I]){if(!(zo(k)&&(st.tagNameCheck instanceof RegExp&&Ht(st.tagNameCheck,k)||st.tagNameCheck instanceof Function&&st.tagNameCheck(k))&&(st.attributeNameCheck instanceof RegExp&&Ht(st.attributeNameCheck,I)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(I,k))||I==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&Ht(st.tagNameCheck,X)||st.tagNameCheck instanceof Function&&st.tagNameCheck(X))))return!1}else if(!fs[I]){if(!Ht(Y,Vr(X,L,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&k!=="script"&&Rg(X,"data:")===0&&Ao[k])){if(!(vt&&!Ht(E,Vr(X,L,"")))){if(X)return!1}}}}}}}return!0},zo=function(k){return k!=="annotation-xml"&&Cs(k,W)},Wo=function(k){Se($.beforeSanitizeAttributes,k,null);const{attributes:I}=k;if(!I||ys(k))return;const X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let kt=I.length;for(;kt--;){const Ot=I[kt],{name:Tt,namespaceURI:Xt,value:ve}=Ot,yr=Lt(Tt),xs=ve;let $t=Tt==="value"?xs:Ig(xs);if(X.attrName=yr,X.attrValue=$t,X.keepAttr=!0,X.forceKeepAttr=void 0,Se($.uponSanitizeAttribute,k,X),$t=X.attrValue,Lo&&(yr==="id"||yr==="name")&&(Ve(Tt,k),$t=lg+$t),Oe&&Ht(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$t)){Ve(Tt,k);continue}if(yr==="attributename"&&Cs($t,"href")){Ve(Tt,k);continue}if(X.forceKeepAttr)continue;if(!X.keepAttr){Ve(Tt,k);continue}if(!oe&&Ht(/\/>/i,$t)){Ve(Tt,k);continue}re&&Hi([z,O,A],Ho=>{$t=Vr($t,Ho," ")});const qo=Lt(k.nodeName);if(!No(qo,yr,$t)){Ve(Tt,k);continue}if(v&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Xt)switch(d.getAttributeType(qo,yr)){case"TrustedHTML":{$t=v.createHTML($t);break}case"TrustedScriptURL":{$t=v.createScriptURL($t);break}}if($t!==xs)try{Xt?k.setAttributeNS(Xt,Tt,$t):k.setAttribute(Tt,$t),ys(k)?ge(k):Uo(t.removed)}catch{Ve(Tt,k)}}Se($.afterSanitizeAttributes,k,null)},gg=function Q(k){let I=null;const X=Ro(k);for(Se($.beforeSanitizeShadowDOM,k,null);I=X.nextNode();)Se($.uponSanitizeShadowNode,I,null),Po(I),Wo(I),I.content instanceof s&&Q(I.content);Se($.afterSanitizeShadowDOM,k,null)};return t.sanitize=function(Q){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,X=null,kt=null,Ot=null;if(ps=!Q,ps&&(Q="<!-->"),typeof Q!="string"&&!Io(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw Xr("dirty is not a string, aborting")}else throw Xr("toString is not a function");if(!t.isSupported)return Q;if(cs||ms(k),t.removed=[],typeof Q=="string"&&(Yr=!1),Yr){if(Q.nodeName){const ve=Lt(Q.nodeName);if(!H[ve]||nt[ve])throw Xr("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof n)I=Oo("<!---->"),X=I.ownerDocument.importNode(Q,!0),X.nodeType===Kr.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?I=X:I.appendChild(X);else{if(!fr&&!re&&!Ge&&Q.indexOf("<")===-1)return v&&Pi?v.createHTML(Q):Q;if(I=Oo(Q),!I)return fr?null:Pi?S:""}I&&hs&&ge(I.firstChild);const Tt=Ro(Yr?Q:I);for(;kt=Tt.nextNode();)Po(kt),Wo(kt),kt.content instanceof s&&gg(kt.content);if(Yr)return Q;if(fr){if(Ii)for(Ot=F.call(I.ownerDocument);I.firstChild;)Ot.appendChild(I.firstChild);else Ot=I;return(at.shadowroot||at.shadowrootmode)&&(Ot=R.call(i,Ot,!0)),Ot}let Xt=Ge?I.outerHTML:I.innerHTML;return Ge&&H["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ht(gc,I.ownerDocument.doctype.name)&&(Xt="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
3
+ `+Xt),re&&Hi([z,O,A],ve=>{Xt=Vr(Xt,ve," ")}),v&&Pi?v.createHTML(Xt):Xt},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ms(Q),cs=!0},t.clearConfig=function(){mr=null,cs=!1},t.isValidAttribute=function(Q,k,I){mr||ms({});const X=Lt(Q),kt=Lt(k);return No(X,kt,I)},t.addHook=function(Q,k){typeof k=="function"&&Gr($[Q],k)},t.removeHook=function(Q,k){if(k!==void 0){const I=Dg($[Q],k);return I===-1?void 0:Og($[Q],I,1)[0]}return Uo($[Q])},t.removeHooks=function(Q){$[Q]=[]},t.removeAllHooks=function(){$=Qo()},t}var Fr=mc(),yc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,di=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qg=/\s*%%.*\n/gm,vr,xc=(vr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(vr,"UnknownDiagramError"),vr),ir={},$n=p(function(e,t){e=e.replace(yc,"").replace(di,"").replace(Qg,`
4
+ `);for(const[r,{detector:i}]of Object.entries(ir))if(i(e,t))return r;throw new xc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),zs=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)bc(t,r,i)},"registerLazyLoadedDiagrams"),bc=p((e,t,r)=>{ir[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),ir[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Jg=p(e=>ir[e].loader,"getDiagramLoader"),Ws=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Ws(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Ws(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Mt=Ws,Wa="#ffffff",qa="#f2f2f2",jt=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),Tr,tm=(Tr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,s,o,n,c,l,h,u,f,d,g,m,y,x,b,_,v,S,C;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?J(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||J(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||j(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||J(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10)):(this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=J(this["cScale"+T],75);else for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=J(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||N(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||j(this["cScale"+T],10):this["cScalePeer"+T]=this["cScalePeer"+T]||J(this["cScale"+T],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||w(this.mainBkg,{h:180,s:-15,l:t*(5+T*3)}),this["surfacePeer"+T]=this["surfacePeer"+T]||w(this.mainBkg,{h:180,s:-15,l:t*(8+T*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?j(this.quadrant1Fill):J(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:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((x=this.xyChart)==null?void 0:x.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((v=this.xyChart)==null?void 0:v.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((S=this.xyChart)==null?void 0:S.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||Wa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qa}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(Tr,"Theme"),Tr),em=p(e=>{const t=new tm;return t.calculate(e),t},"getThemeVariables"),Br,rm=(Br=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=j(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=j(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ui(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=J("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=J(this.sectionBkgColor,10),this.taskBorderColor=ui(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ui(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||j(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||J(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,s,o,n,c,l,h,u,f,d,g,m,y,x,b,_,v,S;this.secondBkg=j(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=j(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=j(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=N(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:30,s:-30,l:-(-10+C*4)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:30,s:-30,l:-(-7+C*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.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 C=0;C<8;C++)this["venn"+(C+1)]=this["venn"+(C+1)]??j(this["cScale"+C],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?J(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=j(this.secondaryColor,20),this.git1=j(this.pie2||this.secondaryColor,20),this.git2=j(this.pie3||this.tertiaryColor,20),this.git3=j(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=j(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=j(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=j(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=j(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||j(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||j(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(Br,"Theme"),Br),im=p(e=>{const t=new rm;return t.calculate(e),t},"getThemeVariables"),Lr,am=(Lr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ui(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,s,o,n,c,l,h,u,f,d,g,m,y,x,b,_,v,S;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=J(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||w(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:30,l:-(7+C*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=j(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||j(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||j(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||J(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Wa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qa}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(Lr,"Theme"),Lr),sm=p(e=>{const t=new am;return t.calculate(e),t},"getThemeVariables"),Ar,nm=(Ar=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=j("#cde498",10),this.primaryBorderColor=jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,s,o,n,c,l,h,u,f,d,g,m,y,x,b,_,v,S;this.actorBorder=J(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||J(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||J(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=J(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||w(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:30,s:-30,l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:30,s:-30,l:-(8+C*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||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||j(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((d=this.xyChart)==null?void 0:d.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((b=this.xyChart)==null?void 0:b.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)):(this.git0=J(this.git0,25),this.git1=J(this.git1,25),this.git2=J(this.git2,25),this.git3=J(this.git3,25),this.git4=J(this.git4,25),this.git5=J(this.git5,25),this.git6=J(this.git6,25),this.git7=J(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Wa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qa}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(Ar,"Theme"),Ar),om=p(e=>{const t=new nm;return t.calculate(e),t},"getThemeVariables"),Mr,lm=(Mr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=j(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=jt(this.primaryColor,this.darkMode),this.secondaryBorderColor=jt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jt(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||j(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,s,o,n,c,l,h,u,f,d,g,m,y,x,b,_,v,S;this.secondBkg=j(this.contrast,55),this.border2=this.contrast,this.actorBorder=j(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||J(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{l:-(5+C*5)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{l:-(8+C*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=j(this.contrast,30),this.sectionBkgColor2=j(this.contrast,30),this.taskBorderColor=J(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=j(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=J(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let C=0;C<8;C++)this["venn"+(C+1)]=this["venn"+(C+1)]??this["cScale"+C];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Bi(this.quadrant1Fill)?j(this.quadrant1Fill):J(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((s=this.xyChart)==null?void 0:s.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((u=this.xyChart)==null?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((f=this.radar)==null?void 0:f.axisColor)||this.lineColor,axisStrokeWidth:((d=this.radar)==null?void 0:d.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((x=this.radar)==null?void 0:x.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((b=this.radar)==null?void 0:b.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((S=this.radar)==null?void 0:S.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=J(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Wa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qa}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(Mr,"Theme"),Mr),cm=p(e=>{const t=new lm;return t.calculate(e),t},"getThemeVariables"),Ae={base:{getThemeVariables:em},dark:{getThemeVariables:im},default:{getThemeVariables:sm},forest:{getThemeVariables:om},neutral:{getThemeVariables:cm}},ae={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Cc={...ae,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ae.default.getThemeVariables(),sequence:{...ae.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:{hideEmptyMembersBox:!1},gantt:{...ae.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ae.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ae.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:{...ae.pie,useWidth:984},xyChart:{...ae.xyChart,useWidth:void 0},requirement:{...ae.requirement,useWidth:void 0},packet:{...ae.packet},radar:{...ae.radar},ishikawa:{...ae.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ae.venn}},_c=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,..._c(e[i],"")]:[...r,t+i],[]),"keyify"),hm=new Set(_c(Cc,"")),kc=Cc,ua=p(e=>{if(D.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ua(t));return}for(const t of Object.keys(e)){if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!hm.has(t)||e[t]==null){D.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){D.debug("sanitizing object",t),ua(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(D.debug("sanitizing css option",t),e[t]=um(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),um=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"),Dr=Object.freeze(kc),je=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Kt=Mt({},Dr),da,ar=[],fi=Mt({},Dr),Ha=p((e,t)=>{let r=Mt({},e),i={};for(const a of t)vc(a),i=Mt(i,a);if(r=Mt(r,i),i.theme&&i.theme in Ae){const a=Mt({},da),s=Mt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ae&&(r.themeVariables=Ae[r.theme].getThemeVariables(s))}return fi=r,Bc(fi),fi},"updateCurrentConfig"),dm=p(e=>(Kt=Mt({},Dr),Kt=Mt(Kt,e),e.theme&&Ae[e.theme]&&(Kt.themeVariables=Ae[e.theme].getThemeVariables(e.themeVariables)),Ha(Kt,ar),Kt),"setSiteConfig"),fm=p(e=>{da=Mt({},e)},"saveConfigFromInitialize"),pm=p(e=>(Kt=Mt(Kt,e),Ha(Kt,ar),Kt),"updateSiteConfig"),wc=p(()=>Mt({},Kt),"getSiteConfig"),Sc=p(e=>(Bc(e),Mt(fi,e),Pt()),"setConfig"),Pt=p(()=>Mt({},fi),"getConfig"),vc=p(e=>{e&&(["secure",...Kt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.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"&&vc(e[t])}))},"sanitize"),gm=p(e=>{var t;ua(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),ar.push(e),Ha(Kt,ar)},"addDirective"),fa=p((e=Kt)=>{ar=[],Ha(e,ar)},"reset"),mm={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."},Jo={},Tc=p(e=>{Jo[e]||(D.warn(mm[e]),Jo[e]=!0)},"issueWarning"),Bc=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Tc("LAZY_LOAD_DEPRECATED")},"checkConfig"),lS=p(()=>{let e={};da&&(e=Mt(e,da));for(const t of ar)e=Mt(e,t);return e},"getUserDefinedConfig"),Wt=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Tc("FLOWCHART_HTML_LABELS_DEPRECATED"),je(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Li=/<br\s*\/?>/gi,ym=p(e=>e?Mc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),xm=(()=>{let e=!1;return()=>{e||(Lc(),e=!0)}})();function Lc(){const e="data-temp-href-target";Fr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Fr.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(Lc,"setupDompurifyHooks");var Ac=p(e=>(xm(),Fr.sanitize(e)),"removeScript"),tl=p((e,t)=>{if(Wt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Ac(e):r!=="loose"&&(e=Mc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=km(e))}return e},"sanitizeMore"),fe=p((e,t)=>e&&(t.dompurifyConfig?e=Fr.sanitize(tl(e,t),t.dompurifyConfig).toString():e=Fr.sanitize(tl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),bm=p((e,t)=>typeof e=="string"?fe(e,t):e.flat().map(r=>fe(r,t)),"sanitizeTextOrArray"),Cm=p(e=>Li.test(e),"hasBreaks"),_m=p(e=>e.split(Li),"splitBreaks"),km=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Mc=p(e=>e.replace(Li,"#br#"),"breakToPlaceholder"),wm=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"),Sm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),vm=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),el=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];Tm(s,o)&&(a=s+","+o,i++,r.pop())}r.push(Bm(a))}return r.join("")},"parseGenericTypes"),qs=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Tm=p((e,t)=>{const r=qs(e,"~"),i=qs(t,"~");return r===1&&i===1},"shouldCombineSets"),Bm=p(e=>{const t=qs(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),rl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Hs=/\$\$(.*)\$\$/g,yi=p(e=>{var t;return(((t=e.match(Hs))==null?void 0:t.length)??0)>0},"hasKatex"),cS=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ec(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),Lm=p(async(e,t)=>{if(!yi(e))return e;if(!(rl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Hs,"MathML is unsupported in this environment.");{const{default:r}=await dt(async()=>{const{default:a}=await import("./katex-B1X10hvy.js");return{default:a}},[]),i=t.forceLegacyMathML||!rl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Li).map(a=>yi(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Hs,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ec=p(async(e,t)=>fe(await Lm(e,t),t),"renderKatexSanitized"),Ai={getRows:ym,sanitizeText:fe,sanitizeTextOrArray:bm,hasBreaks:Cm,splitBreaks:_m,lineBreakRegex:Li,removeScript:Ac,getUrl:wm,evaluate:je,getMax:Sm,getMin:vm},Am=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Mm=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"),$c=p(function(e,t,r,i){const a=Mm(t,r,i);Am(e,a)},"configureSvgSize"),Em=p(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;D.info(`SVG bounds: ${s}x${o}`,a);let n=0,c=0;D.info(`Graph bounds: ${n}x${c}`,e),n=s+r*2,c=o+r*2,D.info(`Calculated bounds: ${n}x${c}`),$c(t,c,n,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),ia={},$m=p((e,t,r)=>{let i="";return e in ia&&ia[e]?i=ia[e](r):D.warn(`No theme found for ${e}`),` & {
5
+ font-family: ${r.fontFamily};
6
+ font-size: ${r.fontSize};
7
+ fill: ${r.textColor}
8
+ }
9
+ @keyframes edge-animation-frame {
10
+ from {
11
+ stroke-dashoffset: 0;
12
+ }
13
+ }
14
+ @keyframes dash {
15
+ to {
16
+ stroke-dashoffset: 0;
17
+ }
18
+ }
19
+ & .edge-animation-slow {
20
+ stroke-dasharray: 9,5 !important;
21
+ stroke-dashoffset: 900;
22
+ animation: dash 50s linear infinite;
23
+ stroke-linecap: round;
24
+ }
25
+ & .edge-animation-fast {
26
+ stroke-dasharray: 9,5 !important;
27
+ stroke-dashoffset: 900;
28
+ animation: dash 20s linear infinite;
29
+ stroke-linecap: round;
30
+ }
31
+ /* Classes common for multiple diagrams */
32
+
33
+ & .error-icon {
34
+ fill: ${r.errorBkgColor};
35
+ }
36
+ & .error-text {
37
+ fill: ${r.errorTextColor};
38
+ stroke: ${r.errorTextColor};
39
+ }
40
+
41
+ & .edge-thickness-normal {
42
+ stroke-width: 1px;
43
+ }
44
+ & .edge-thickness-thick {
45
+ stroke-width: 3.5px
46
+ }
47
+ & .edge-pattern-solid {
48
+ stroke-dasharray: 0;
49
+ }
50
+ & .edge-thickness-invisible {
51
+ stroke-width: 0;
52
+ fill: none;
53
+ }
54
+ & .edge-pattern-dashed{
55
+ stroke-dasharray: 3;
56
+ }
57
+ .edge-pattern-dotted {
58
+ stroke-dasharray: 2;
59
+ }
60
+
61
+ & .marker {
62
+ fill: ${r.lineColor};
63
+ stroke: ${r.lineColor};
64
+ }
65
+ & .marker.cross {
66
+ stroke: ${r.lineColor};
67
+ }
68
+
69
+ & svg {
70
+ font-family: ${r.fontFamily};
71
+ font-size: ${r.fontSize};
72
+ }
73
+ & p {
74
+ margin: 0
75
+ }
76
+
77
+ ${i}
78
+
79
+ ${t}
80
+ `},"getStyles"),Fm=p((e,t)=>{t!==void 0&&(ia[e]=t)},"addStylesForDiagram"),Dm=$m,Fc={};wg(Fc,{clear:()=>Om,getAccDescription:()=>Nm,getAccTitle:()=>Im,getDiagramTitle:()=>Wm,setAccDescription:()=>Pm,setAccTitle:()=>Rm,setDiagramTitle:()=>zm});var Fn="",Dn="",On="",Rn=p(e=>fe(e,Pt()),"sanitizeText"),Om=p(()=>{Fn="",On="",Dn=""},"clear"),Rm=p(e=>{Fn=Rn(e).replace(/^\s+/g,"")},"setAccTitle"),Im=p(()=>Fn,"getAccTitle"),Pm=p(e=>{On=Rn(e).replace(/\n\s+/g,`
81
+ `)},"setAccDescription"),Nm=p(()=>On,"getAccDescription"),zm=p(e=>{Dn=Rn(e)},"setDiagramTitle"),Wm=p(()=>Dn,"getDiagramTitle"),il=D,qm=En,pt=Pt,hS=Sc,uS=Dr,In=p(e=>fe(e,pt()),"sanitizeText"),Hm=Em,jm=p(()=>Fc,"getCommonDb"),pa={},ga=p((e,t,r)=>{var i;pa[e]&&il.warn(`Diagram with id ${e} already registered. Overwriting.`),pa[e]=t,r&&bc(e,r),Fm(e,t.styles),(i=t.injectUtils)==null||i.call(t,il,qm,pt,In,Hm,jm(),()=>{})},"registerDiagram"),js=p(e=>{if(e in pa)return pa[e];throw new Ym(e)},"getDiagram"),Er,Ym=(Er=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Er,"DiagramNotFoundError"),Er);const Ys=Math.PI,Us=2*Ys,Ze=1e-6,Um=Us-Ze;function Dc(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Gm(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Dc;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class Vm{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Dc:Gm(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,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,c=i-t,l=a-r,h=o-t,u=n-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Ze)if(!(Math.abs(u*c-l*h)>Ze)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=a-n,m=c*c+l*l,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=s*Math.tan((Ys-Math.acos((m+f-y)/(2*x*b)))/2),v=_/b,S=_/x;Math.abs(v-1)>Ze&&this._append`L${t+v*h},${r+v*u}`,this._append`A${s},${s},0,0,${+(u*d>h*g)},${this._x1=t+S*c},${this._y1=r+S*l}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),c=i*Math.sin(a),l=t+n,h=r+c,u=1^o,f=o?a-s:s-a;this._x1===null?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Ze||Math.abs(this._y1-h)>Ze)&&this._append`L${l},${h}`,i&&(f<0&&(f=f%Us+Us),f>Um?this._append`A${i},${i},0,1,${u},${t-n},${r-c}A${i},${i},0,1,${u},${this._x1=l},${this._y1=h}`:f>Ze&&this._append`A${i},${i},0,${+(f>=Ys)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function xr(e){return function(){return e}}const dS=Math.abs,fS=Math.atan2,pS=Math.cos,gS=Math.max,mS=Math.min,yS=Math.sin,xS=Math.sqrt,al=1e-12,Pn=Math.PI,sl=Pn/2,bS=2*Pn;function CS(e){return e>1?0:e<-1?Pn:Math.acos(e)}function _S(e){return e>=1?sl:e<=-1?-sl:Math.asin(e)}function Xm(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 Vm(t)}function Zm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Oc(e){this._context=e}Oc.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 pi(e){return new Oc(e)}function Km(e){return e[0]}function Qm(e){return e[1]}function Jm(e,t){var r=xr(!0),i=null,a=pi,s=null,o=Xm(n);e=typeof e=="function"?e:e===void 0?Km:xr(e),t=typeof t=="function"?t:t===void 0?Qm:xr(t);function n(c){var l,h=(c=Zm(c)).length,u,f=!1,d;for(i==null&&(s=a(d=o())),l=0;l<=h;++l)!(l<h&&r(u=c[l],l,c))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,l,c),+t(u,l,c));if(d)return s=null,d+""||null}return n.x=function(c){return arguments.length?(e=typeof c=="function"?c:xr(+c),n):e},n.y=function(c){return arguments.length?(t=typeof c=="function"?c:xr(+c),n):t},n.defined=function(c){return arguments.length?(r=typeof c=="function"?c:xr(!!c),n):r},n.curve=function(c){return arguments.length?(a=c,i!=null&&(s=a(i)),n):a},n.context=function(c){return arguments.length?(c==null?i=s=null:s=a(i=c),n):i},n}class Rc{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 Ic(e){return new Rc(e,!0)}function Pc(e){return new Rc(e,!1)}function ze(){}function ma(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 ja(e){this._context=e}ja.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:ma(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:ma(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gs(e){return new ja(e)}function Nc(e){this._context=e}Nc.prototype={areaStart:ze,areaEnd:ze,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:ma(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ty(e){return new Nc(e)}function zc(e){this._context=e}zc.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:ma(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ey(e){return new zc(e)}function Wc(e,t){this._basis=new ja(e),this._beta=t}Wc.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],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,c;++n<=r;)c=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+c*s),this._beta*t[n]+(1-this._beta)*(a+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const ry=(function e(t){function r(i){return t===1?new ja(i):new Wc(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ya(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 Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.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:ya(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:ya(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 qc=(function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function zn(e,t){this._context=e,this._k=(1-t)/6}zn.prototype={areaStart:ze,areaEnd:ze,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:ya(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 iy=(function e(t){function r(i){return new zn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Wn(e,t){this._context=e,this._k=(1-t)/6}Wn.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:ya(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 ay=(function e(t){function r(i){return new Wn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qn(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>al){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>al){var l=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*l+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function Hc(e,t){this._context=e,this._alpha=t}Hc.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:qn(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 jc=(function e(t){function r(i){return t?new Hc(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Yc(e,t){this._context=e,this._alpha=t}Yc.prototype={areaStart:ze,areaEnd:ze,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:qn(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 sy=(function e(t){function r(i){return t?new Yc(i,t):new zn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Uc(e,t){this._context=e,this._alpha=t}Uc.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:qn(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 ny=(function e(t){function r(i){return t?new Uc(i,t):new Wn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Gc(e){this._context=e}Gc.prototype={areaStart:ze,areaEnd:ze,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 oy(e){return new Gc(e)}function nl(e){return e<0?-1:1}function ol(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(nl(s)+nl(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function ll(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function vs(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function xa(e){this._context=e}xa.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:vs(this,this._t0,ll(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,vs(this,ll(this,r=ol(this,e,t)),r);break;default:vs(this,this._t0,r=ol(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Vc(e){this._context=new Xc(e)}(Vc.prototype=Object.create(xa.prototype)).point=function(e,t){xa.prototype.point.call(this,t,e)};function Xc(e){this._context=e}Xc.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,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function Zc(e){return new xa(e)}function Kc(e){return new Vc(e)}function Qc(e){this._context=e}Qc.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=cl(e),a=cl(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(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 cl(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function Jc(e){return new Qc(e)}function Ya(e,t){this._context=e,this._t=t}Ya.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 th(e){return new Ya(e,.5)}function eh(e){return new Ya(e,0)}function rh(e){return new Ya(e,1)}var ly=p(e=>{var a;const{securityLevel:t}=pt();let r=ot("body");if(t==="sandbox"){const o=((a=ot(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ot(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Hn(e){return typeof e>"u"||e===null}p(Hn,"isNothing");function ih(e){return typeof e=="object"&&e!==null}p(ih,"isObject");function ah(e){return Array.isArray(e)?e:Hn(e)?[]:[e]}p(ah,"toArray");function sh(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}p(sh,"extend");function nh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(nh,"repeat");function oh(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(oh,"isNegativeZero");var cy=Hn,hy=ih,uy=ah,dy=nh,fy=oh,py=sh,Et={isNothing:cy,isObject:hy,toArray:uy,repeat:dy,isNegativeZero:fy,extend:py};function jn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
82
+
83
+ `+e.mark.snippet),i+" "+r):i}p(jn,"formatError");function Or(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=jn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Or,"YAMLException$1");Or.prototype=Object.create(Error.prototype);Or.prototype.constructor=Or;Or.prototype.toString=p(function(t){return this.name+": "+jn(this,t)},"toString");var Qt=Or;function aa(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}p(aa,"getLine");function sa(e,t){return Et.repeat(" ",t-e.length)+e}p(sa,"padStart");function lh(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",c,l,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=aa(e.buffer,i[o-c],a[o-c],e.position-(i[o]-i[o-c]),u),n=Et.repeat(" ",t.indent)+sa((e.line-c+1).toString(),h)+" | "+l.str+`
84
+ `+n;for(l=aa(e.buffer,i[o],a[o],e.position,u),n+=Et.repeat(" ",t.indent)+sa((e.line+1).toString(),h)+" | "+l.str+`
85
+ `,n+=Et.repeat("-",t.indent+h+3+l.pos)+`^
86
+ `,c=1;c<=t.linesAfter&&!(o+c>=a.length);c++)l=aa(e.buffer,i[o+c],a[o+c],e.position-(i[o]-i[o+c]),u),n+=Et.repeat(" ",t.indent)+sa((e.line+c+1).toString(),h)+" | "+l.str+`
87
+ `;return n.replace(/\n$/,"")}p(lh,"makeSnippet");var gy=lh,my=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],yy=["scalar","sequence","mapping"];function ch(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(ch,"compileStyleAliases");function hh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(my.indexOf(r)===-1)throw new Qt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=ch(t.styleAliases||null),yy.indexOf(this.kind)===-1)throw new Qt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(hh,"Type$1");var Nt=hh;function Vs(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}p(Vs,"compileList");function uh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(uh,"compileMap");function ba(e){return this.extend(e)}p(ba,"Schema$1");ba.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Nt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Qt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Nt))throw new Qt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Qt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Qt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Nt))throw new Qt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ba.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=Vs(a,"implicit"),a.compiledExplicit=Vs(a,"explicit"),a.compiledTypeMap=uh(a.compiledImplicit,a.compiledExplicit),a},"extend");var xy=ba,by=new Nt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),Cy=new Nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),_y=new Nt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),ky=new xy({explicit:[by,Cy,_y]});function dh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(dh,"resolveYamlNull");function fh(){return null}p(fh,"constructYamlNull");function ph(e){return e===null}p(ph,"isNull");var wy=new Nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:dh,construct:fh,predicate:ph,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"});function gh(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(gh,"resolveYamlBoolean");function mh(e){return e==="true"||e==="True"||e==="TRUE"}p(mh,"constructYamlBoolean");function yh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(yh,"isBoolean");var Sy=new Nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:gh,construct:mh,predicate:yh,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function xh(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(xh,"isHexCode");function bh(e){return 48<=e&&e<=55}p(bh,"isOctCode");function Ch(e){return 48<=e&&e<=57}p(Ch,"isDecCode");function _h(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!xh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!bh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Ch(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}p(_h,"resolveYamlInteger");function kh(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(kh,"constructYamlInteger");function wh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Et.isNegativeZero(e)}p(wh,"isInteger");var vy=new Nt("tag:yaml.org,2002:int",{kind:"scalar",resolve:_h,construct:kh,predicate:wh,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ty=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Sh(e){return!(e===null||!Ty.test(e)||e[e.length-1]==="_")}p(Sh,"resolveYamlFloat");function vh(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(vh,"constructYamlFloat");var By=/^[-+]?[0-9]+e/;function Th(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Et.isNegativeZero(e))return"-0.0";return r=e.toString(10),By.test(r)?r.replace("e",".e"):r}p(Th,"representYamlFloat");function Bh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Et.isNegativeZero(e))}p(Bh,"isFloat");var Ly=new Nt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Sh,construct:vh,predicate:Bh,represent:Th,defaultStyle:"lowercase"}),Lh=ky.extend({implicit:[wy,Sy,vy,Ly]}),Ay=Lh,Ah=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Mh=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 Eh(e){return e===null?!1:Ah.exec(e)!==null||Mh.exec(e)!==null}p(Eh,"resolveYamlTimestamp");function $h(e){var t,r,i,a,s,o,n,c=0,l=null,h,u,f;if(t=Ah.exec(e),t===null&&(t=Mh.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],o=+t[5],n=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],u=+(t[11]||0),l=(h*60+u)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,a,s,o,n,c)),l&&f.setTime(f.getTime()-l),f}p($h,"constructYamlTimestamp");function Fh(e){return e.toISOString()}p(Fh,"representYamlTimestamp");var My=new Nt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Eh,construct:$h,instanceOf:Date,represent:Fh});function Dh(e){return e==="<<"||e===null}p(Dh,"resolveYamlMerge");var Ey=new Nt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Dh}),Yn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function Oh(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=Yn;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Oh,"resolveYamlBinary");function Rh(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=Yn,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}p(Rh,"constructYamlBinary");function Ih(e){var t="",r=0,i,a,s=e.length,o=Yn;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Ih,"representYamlBinary");function Ph(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Ph,"isBinary");var $y=new Nt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Oh,construct:Rh,predicate:Ph,represent:Ih}),Fy=Object.prototype.hasOwnProperty,Dy=Object.prototype.toString;function Nh(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,Dy.call(a)!=="[object Object]")return!1;for(s in a)if(Fy.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}p(Nh,"resolveYamlOmap");function zh(e){return e!==null?e:[]}p(zh,"constructYamlOmap");var Oy=new Nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Nh,construct:zh}),Ry=Object.prototype.toString;function Wh(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Ry.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}p(Wh,"resolveYamlPairs");function qh(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}p(qh,"constructYamlPairs");var Iy=new Nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Wh,construct:qh}),Py=Object.prototype.hasOwnProperty;function Hh(e){if(e===null)return!0;var t,r=e;for(t in r)if(Py.call(r,t)&&r[t]!==null)return!1;return!0}p(Hh,"resolveYamlSet");function jh(e){return e!==null?e:{}}p(jh,"constructYamlSet");var Ny=new Nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Hh,construct:jh}),Yh=Ay.extend({implicit:[My,Ey],explicit:[$y,Oy,Iy,Ny]}),We=Object.prototype.hasOwnProperty,Ca=1,Uh=2,Gh=3,_a=4,Ts=1,zy=2,hl=3,Wy=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qy=/[\x85\u2028\u2029]/,Hy=/[,\[\]\{\}]/,Vh=/^(?:!|!!|![a-z\-]+!)$/i,Xh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Xs(e){return Object.prototype.toString.call(e)}p(Xs,"_class");function ue(e){return e===10||e===13}p(ue,"is_EOL");function Ne(e){return e===9||e===32}p(Ne,"is_WHITE_SPACE");function Yt(e){return e===9||e===32||e===10||e===13}p(Yt,"is_WS_OR_EOL");function tr(e){return e===44||e===91||e===93||e===123||e===125}p(tr,"is_FLOW_INDICATOR");function Zh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Zh,"fromHexCode");function Kh(e){return e===120?2:e===117?4:e===85?8:0}p(Kh,"escapedHexLen");function Qh(e){return 48<=e&&e<=57?e-48:-1}p(Qh,"fromDecimalCode");function Zs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Zs,"simpleEscapeSequence");function Jh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Jh,"charFromCodepoint");function Un(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(Un,"setProperty");var tu=new Array(256),eu=new Array(256);for(Xe=0;Xe<256;Xe++)tu[Xe]=Zs(Xe)?1:0,eu[Xe]=Zs(Xe);var Xe;function ru(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Yh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(ru,"State$1");function Gn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=gy(r),new Qt(t,r)}p(Gn,"generateError");function K(e,t){throw Gn(e,t)}p(K,"throwError");function xi(e,t){e.onWarning&&e.onWarning.call(null,Gn(e,t))}p(xi,"throwWarning");var ul={YAML:p(function(t,r,i){var a,s,o;t.version!==null&&K(t,"duplication of %YAML directive"),i.length!==1&&K(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&K(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&K(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&xi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var a,s;i.length!==2&&K(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Vh.test(a)||K(t,"ill-formed tag handle (first argument) of the TAG directive"),We.call(t.tagMap,a)&&K(t,'there is a previously declared suffix for "'+a+'" tag handle'),Xh.test(s)||K(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{K(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function Me(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||K(e,"expected valid JSON character");else Wy.test(n)&&K(e,"the stream contains non-printable characters");e.result+=n}}p(Me,"captureSegment");function Ks(e,t,r,i){var a,s,o,n;for(Et.isObject(r)||K(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],We.call(t,s)||(Un(t,s,r[s]),i[s]=!0)}p(Ks,"mergeMappings");function er(e,t,r,i,a,s,o,n,c){var l,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),l=0,h=a.length;l<h;l+=1)Array.isArray(a[l])&&K(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Xs(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&Xs(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,h=s.length;l<h;l+=1)Ks(e,t,s[l],r);else Ks(e,t,s,r);else!e.json&&!We.call(r,a)&&We.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=c||e.position,K(e,"duplicated mapping key")),Un(t,a,s),delete r[a];return t}p(er,"storeMappingPair");function Ua(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):K(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(Ua,"readLineBreak");function St(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Ne(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(ue(a))for(Ua(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&xi(e,"deficient indentation"),i}p(St,"skipSeparationSpace");function Mi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Yt(r)))}p(Mi,"testDocumentSeparator");function Ga(e,t){t===1?e.result+=" ":t>1&&(e.result+=Et.repeat(`
90
+ `,t-1))}p(Ga,"writeFoldedLines");function iu(e,t,r){var i,a,s,o,n,c,l,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),Yt(d)||tr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),Yt(a)||r&&tr(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),Yt(a)||r&&tr(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Yt(i))break}else{if(e.position===e.lineStart&&Mi(e)||r&&tr(d))break;if(ue(d))if(c=e.line,l=e.lineStart,h=e.lineIndent,St(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=h;break}}n&&(Me(e,s,o,!1),Ga(e,e.line-c),s=o=e.position,n=!1),Ne(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return Me(e,s,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(iu,"readPlainScalar");function au(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Me(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else ue(r)?(Me(e,i,a,!0),Ga(e,St(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Mi(e)?K(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);K(e,"unexpected end of the stream within a single quoted scalar")}p(au,"readSingleQuotedScalar");function su(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Me(e,r,e.position,!0),e.position++,!0;if(n===92){if(Me(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ue(n))St(e,!1,t);else if(n<256&&tu[n])e.result+=eu[n],e.position++;else if((o=Kh(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=Zh(n))>=0?s=(s<<4)+o:K(e,"expected hexadecimal character");e.result+=Jh(s),e.position++}else K(e,"unknown escape sequence");r=i=e.position}else ue(n)?(Me(e,r,i,!0),Ga(e,St(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Mi(e)?K(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}K(e,"unexpected end of the stream within a double quoted scalar")}p(su,"readDoubleQuotedScalar");function nu(e,t){var r=!0,i,a,s,o=e.tag,n,c=e.anchor,l,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,n=[];else if(b===123)h=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(St(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=c,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&K(e,"expected the node content, but found ','"):K(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(l=e.input.charCodeAt(e.position+1),Yt(l)&&(u=f=!0,e.position++,St(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,sr(e,t,Ca,!1,!0),y=e.tag,m=e.result,St(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),St(e,!0,t),sr(e,t,Ca,!1,!0),x=e.result),d?er(e,n,g,y,m,x,i,a,s):u?n.push(er(e,null,g,y,m,x,i,a,s)):n.push(m),St(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}K(e,"unexpected end of the stream within a flow collection")}p(nu,"readFlowCollection");function ou(e,t){var r,i,a=Ts,s=!1,o=!1,n=t,c=0,l=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Ts===a?a=u===43?hl:zy:K(e,"repeat of a chomping mode identifier");else if((h=Qh(u))>=0)h===0?K(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?K(e,"repeat of an indentation width identifier"):(n=t+h-1,o=!0);else break;if(Ne(u)){do u=e.input.charCodeAt(++e.position);while(Ne(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ue(u)&&u!==0)}for(;u!==0;){for(Ua(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),ue(u)){c++;continue}if(e.lineIndent<n){a===hl?e.result+=Et.repeat(`
91
+ `,s?1+c:c):a===Ts&&s&&(e.result+=`
92
+ `);break}for(i?Ne(u)?(l=!0,e.result+=Et.repeat(`
93
+ `,s?1+c:c)):l?(l=!1,e.result+=Et.repeat(`
94
+ `,c+1)):c===0?s&&(e.result+=" "):e.result+=Et.repeat(`
95
+ `,c):e.result+=Et.repeat(`
96
+ `,s?1+c:c),s=!0,o=!0,c=0,r=e.position;!ue(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Me(e,r,e.position,!1)}return!0}p(ou,"readBlockScalar");function Qs(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!Yt(o))));){if(n=!0,e.position++,St(e,!0,-1)&&e.lineIndent<=t){s.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,sr(e,t,Gh,!1,!0),s.push(e.result),St(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)K(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}p(Qs,"readBlockSequence");function lu(e,t,r){var i,a,s,o,n,c,l=e.tag,h=e.anchor,u={},f=Object.create(null),d=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,K(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Yt(i))b===63?(y&&(er(e,u,f,d,g,null,o,n,c),d=g=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):K(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,c=e.position,!sr(e,r,Uh,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);Ne(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Yt(b)||K(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(er(e,u,f,d,g,null,o,n,c),d=g=m=null),x=!0,y=!1,a=!1,d=e.tag,g=e.result;else if(x)K(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=h,!0}else if(x)K(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(y&&(o=e.line,n=e.lineStart,c=e.position),sr(e,t,_a,!0,a)&&(y?g=e.result:m=e.result),y||(er(e,u,f,d,g,m,o,n,c),d=g=m=null),St(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)K(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&er(e,u,f,d,g,null,o,n,c),x&&(e.tag=l,e.anchor=h,e.kind="mapping",e.result=u),x}p(lu,"readBlockMapping");function cu(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&K(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):K(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Yt(o);)o===33&&(i?K(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Vh.test(a)||K(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Hy.test(s)&&K(e,"tag suffix cannot contain flow indicator characters")}s&&!Xh.test(s)&&K(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{K(e,"tag name is malformed: "+s)}return r?e.tag=s:We.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:K(e,'undeclared tag handle "'+a+'"'),!0}p(cu,"readTagProperty");function hu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&K(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Yt(r)&&!tr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(hu,"readAnchorProperty");function uu(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Yt(i)&&!tr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&K(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),We.call(e.anchorMap,r)||K(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],St(e,!0,-1),!0}p(uu,"readAlias");function sr(e,t,r,i,a){var s,o,n,c=1,l=!1,h=!1,u,f,d,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=_a===r||Gh===r,i&&St(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;cu(e)||hu(e);)St(e,!0,-1)?(l=!0,n=s,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):n=!1;if(n&&(n=l||a),(c===1||_a===r)&&(Ca===r||Uh===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?n&&(Qs(e,y)||lu(e,y,m))||nu(e,m)?h=!0:(o&&ou(e,m)||au(e,m)||su(e,m)?h=!0:uu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&K(e,"alias node should not have any properties")):iu(e,m,Ca===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=n&&Qs(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&K(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(We.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||K(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&K(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):K(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(sr,"composeNode");function du(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(St(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Yt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&K(e,"directive name must not be less than one character in length");o!==0;){for(;Ne(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ue(o));break}if(ue(o))break;for(r=e.position;o!==0&&!Yt(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&Ua(e),We.call(ul,i)?ul[i](e,i,a):xi(e,'unknown document directive "'+i+'"')}if(St(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,St(e,!0,-1)):s&&K(e,"directives end mark is expected"),sr(e,e.lineIndent-1,_a,!1,!0),St(e,!0,-1),e.checkLineBreaks&&qy.test(e.input.slice(t,e.position))&&xi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Mi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,St(e,!0,-1));return}if(e.position<e.length-1)K(e,"end of the stream or a document separator is expected");else return}p(du,"readDocument");function Vn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new ru(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,K(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)du(r);return r.documents}p(Vn,"loadDocuments");function jy(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Vn(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}p(jy,"loadAll$1");function fu(e,t){var r=Vn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Qt("expected a single document in the stream, but found more")}}p(fu,"load$1");var Yy=fu,Uy={load:Yy},pu=Object.prototype.toString,gu=Object.prototype.hasOwnProperty,Xn=65279,Gy=9,bi=10,Vy=13,Xy=32,Zy=33,Ky=34,Js=35,Qy=37,Jy=38,t0=39,e0=42,mu=44,r0=45,ka=58,i0=61,a0=62,s0=63,n0=64,yu=91,xu=93,o0=96,bu=123,l0=124,Cu=125,qt={};qt[0]="\\0";qt[7]="\\a";qt[8]="\\b";qt[9]="\\t";qt[10]="\\n";qt[11]="\\v";qt[12]="\\f";qt[13]="\\r";qt[27]="\\e";qt[34]='\\"';qt[92]="\\\\";qt[133]="\\N";qt[160]="\\_";qt[8232]="\\L";qt[8233]="\\P";var c0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],h0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function _u(e,t){var r,i,a,s,o,n,c;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&gu.call(c.styleAliases,n)&&(n=c.styleAliases[n]),r[o]=n;return r}p(_u,"compileStyleMap");function ku(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Qt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Et.repeat("0",i-t.length)+t}p(ku,"encodeHex");var u0=1,Ci=2;function wu(e){this.schema=e.schema||Yh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Et.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=_u(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ci:u0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(wu,"State");function tn(e,t){for(var r=Et.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
98
+ `,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
99
+ `&&(s+=r),s+=o;return s}p(tn,"indentString");function wa(e,t){return`
100
+ `+Et.repeat(" ",e.indent*t)}p(wa,"generateNextLine");function Su(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}p(Su,"testImplicitResolving");function _i(e){return e===Xy||e===Gy}p(_i,"isWhitespace");function Rr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Xn||65536<=e&&e<=1114111}p(Rr,"isPrintable");function en(e){return Rr(e)&&e!==Xn&&e!==Vy&&e!==bi}p(en,"isNsCharOrWhitespace");function rn(e,t,r){var i=en(e),a=i&&!_i(e);return(r?i:i&&e!==mu&&e!==yu&&e!==xu&&e!==bu&&e!==Cu)&&e!==Js&&!(t===ka&&!a)||en(t)&&!_i(t)&&e===Js||t===ka&&a}p(rn,"isPlainSafe");function vu(e){return Rr(e)&&e!==Xn&&!_i(e)&&e!==r0&&e!==s0&&e!==ka&&e!==mu&&e!==yu&&e!==xu&&e!==bu&&e!==Cu&&e!==Js&&e!==Jy&&e!==e0&&e!==Zy&&e!==l0&&e!==i0&&e!==a0&&e!==t0&&e!==Ky&&e!==Qy&&e!==n0&&e!==o0}p(vu,"isPlainSafeFirst");function Tu(e){return!_i(e)&&e!==ka}p(Tu,"isPlainSafeLast");function kr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(kr,"codePointAt");function Zn(e){var t=/^\n* /;return t.test(e)}p(Zn,"needIndentIndicator");var Bu=1,an=2,Lu=3,Au=4,Cr=5;function Mu(e,t,r,i,a,s,o,n){var c,l=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=vu(kr(e,0))&&Tu(kr(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=kr(e,c),!Rr(l))return Cr;m=m&&rn(l,h,n),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=kr(e,c),l===bi)u=!0,d&&(f=f||c-g-1>i&&e[g+1]!==" ",g=c);else if(!Rr(l))return Cr;m=m&&rn(l,h,n),h=l}f=f||d&&c-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!a(e)?Bu:s===Ci?Cr:an:r>9&&Zn(e)?Cr:o?s===Ci?Cr:an:f?Au:Lu}p(Mu,"chooseScalarStyle");function Eu(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===Ci?'""':"''";if(!e.noCompatMode&&(c0.indexOf(t)!==-1||h0.test(t)))return e.quotingType===Ci?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return Su(e,l)}switch(p(c,"testAmbiguity"),Mu(t,n,e.indent,o,c,e.quotingType,e.forceQuotes&&!i,a)){case Bu:return t;case an:return"'"+t.replace(/'/g,"''")+"'";case Lu:return"|"+sn(t,e.indent)+nn(tn(t,s));case Au:return">"+sn(t,e.indent)+nn(tn($u(t,o),s));case Cr:return'"'+Fu(t)+'"';default:throw new Qt("impossible error: invalid scalar style")}})()}p(Eu,"writeScalar");function sn(e,t){var r=Zn(e)?String(t):"",i=e[e.length-1]===`
101
+ `,a=i&&(e[e.length-2]===`
102
+ `||e===`
103
+ `),s=a?"+":i?"":"-";return r+s+`
104
+ `}p(sn,"blockHeader");function nn(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}p(nn,"dropEndingNewline");function $u(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var l=e.indexOf(`
106
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,on(e.slice(0,l),t)})(),a=e[0]===`
107
+ `||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],c=o[2];s=c[0]===" ",i+=n+(!a&&!s&&c!==""?`
108
+ `:"")+on(c,t),a=s}return i}p($u,"foldString");function on(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,c="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,c+=`
109
+ `+e.slice(a,s),a=s+1),o=n;return c+=`
110
+ `,e.length-a>t&&o>a?c+=e.slice(a,o)+`
111
+ `+e.slice(o+1):c+=e.slice(a),c.slice(1)}p(on,"foldLine");function Fu(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=kr(e,a),i=qt[r],!i&&Rr(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||ku(r);return t}p(Fu,"escapeString");function Du(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(_e(e,t,n,!1,!1)||typeof n>"u"&&_e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}p(Du,"writeFlowSequence");function ln(e,t,r,i){var a="",s=e.tag,o,n,c;for(o=0,n=r.length;o<n;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(_e(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&_e(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=wa(e,t)),e.dump&&bi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}p(ln,"writeBlockSequence");function Ou(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,c,l,h;for(o=0,n=s.length;o<n;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=s[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),_e(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),_e(e,t,l,!1,!1)&&(h+=e.dump,i+=h));e.tag=a,e.dump="{"+i+"}"}p(Ou,"writeFlowMapping");function Ru(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,c,l,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Qt("sortKeys must be a boolean or a function");for(n=0,c=o.length;n<c;n+=1)f="",(!i||a!=="")&&(f+=wa(e,t)),l=o[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),_e(e,t+1,l,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&bi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=wa(e,t)),_e(e,t+1,h,!0,u)&&(e.dump&&bi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=s,e.dump=a||"{}"}p(Ru,"writeBlockMapping");function cn(e,t,r){var i,a,s,o,n,c;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(c=e.styleMap[n.tag]||n.defaultStyle,pu.call(n.represent)==="[object Function]")i=n.represent(t,c);else if(gu.call(n.represent,c))i=n.represent[c](t,c);else throw new Qt("!<"+n.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}p(cn,"detectType");function _e(e,t,r,i,a,s,o){e.tag=null,e.dump=r,cn(e,r,!1)||cn(e,r,!0);var n=pu.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Ru(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(Ou(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?ln(e,t-1,e.dump,a):ln(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(Du(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Eu(e,e.dump,t,s,c);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Qt("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}p(_e,"writeNode");function Iu(e,t){var r=[],i=[],a,s;for(Sa(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}p(Iu,"getDuplicateReferences");function Sa(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Sa(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)Sa(e[i[a]],t,r)}p(Sa,"inspectNode");function d0(e,t){t=t||{};var r=new wu(t);r.noRefs||Iu(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),_e(r,0,i,!0,!0)?r.dump+`
112
+ `:""}p(d0,"dump$1");function f0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(f0,"renamed");var p0=Lh,g0=Uy.load;/*! Bundled license information:
113
+
114
+ js-yaml/dist/js-yaml.mjs:
115
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
116
+ */var Qr=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"),It={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},dl={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function ni(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=wt(e),t=wt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(ni,"calculateDeltaAndAngle");var wt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),m0=p(e=>({x:p(function(t,r,i){let a=0;const s=wt(i[0]).x<wt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(It,e.arrowTypeStart)){const{angle:d,deltaX:g}=ni(i[0],i[1]);a=It[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(It,e.arrowTypeEnd)){const{angle:d,deltaX:g}=ni(i[i.length-1],i[i.length-2]);a=It[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(wt(t).x-wt(i[i.length-1]).x),n=Math.abs(wt(t).y-wt(i[i.length-1]).y),c=Math.abs(wt(t).x-wt(i[0]).x),l=Math.abs(wt(t).y-wt(i[0]).y),h=It[e.arrowTypeStart],u=It[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=s==="right"?-1:1,a-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=s==="right"?-1:1,a+=d}return wt(t).x+a},"x"),y:p(function(t,r,i){let a=0;const s=wt(i[0]).y<wt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(It,e.arrowTypeStart)){const{angle:d,deltaY:g}=ni(i[0],i[1]);a=It[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(It,e.arrowTypeEnd)){const{angle:d,deltaY:g}=ni(i[i.length-1],i[i.length-2]);a=It[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(wt(t).y-wt(i[i.length-1]).y),n=Math.abs(wt(t).x-wt(i[i.length-1]).x),c=Math.abs(wt(t).y-wt(i[0]).y),l=Math.abs(wt(t).x-wt(i[0]).x),h=It[e.arrowTypeStart],u=It[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=s==="up"?-1:1,a-=d}if(c<h&&c>0&&l<h){let d=h+f-c;d*=s==="up"?-1:1,a+=d}return wt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Yi={},At={},fl;function y0(){return fl||(fl=1,Object.defineProperty(At,"__esModule",{value:!0}),At.BLANK_URL=At.relativeFirstCharacters=At.whitespaceEscapeCharsRegex=At.urlSchemeRegex=At.ctrlCharactersRegex=At.htmlCtrlEntityRegex=At.htmlEntitiesRegex=At.invalidProtocolRegex=void 0,At.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,At.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,At.htmlCtrlEntityRegex=/&(newline|tab);/gi,At.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,At.urlSchemeRegex=/^.+(:|&colon;)/gim,At.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,At.relativeFirstCharacters=[".","/"],At.BLANK_URL="about:blank"),At}var pl;function x0(){if(pl)return Yi;pl=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.sanitizeUrl=s;var e=y0();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(c,l){return String.fromCharCode(l)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,c=a(o.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=a(c),n=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var l=c;if(!l)return e.BLANK_URL;if(t(l))return l;var h=l.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return l;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return Yi}var b0=x0(),Pu=typeof global=="object"&&global&&global.Object===Object&&global,C0=typeof self=="object"&&self&&self.Object===Object&&self,ke=Pu||C0||Function("return this")(),va=ke.Symbol,Nu=Object.prototype,_0=Nu.hasOwnProperty,k0=Nu.toString,Jr=va?va.toStringTag:void 0;function w0(e){var t=_0.call(e,Jr),r=e[Jr];try{e[Jr]=void 0;var i=!0}catch{}var a=k0.call(e);return i&&(t?e[Jr]=r:delete e[Jr]),a}var S0=Object.prototype,v0=S0.toString;function T0(e){return v0.call(e)}var B0="[object Null]",L0="[object Undefined]",gl=va?va.toStringTag:void 0;function Nr(e){return e==null?e===void 0?L0:B0:gl&&gl in Object(e)?w0(e):T0(e)}function cr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var A0="[object AsyncFunction]",M0="[object Function]",E0="[object GeneratorFunction]",$0="[object Proxy]";function Kn(e){if(!cr(e))return!1;var t=Nr(e);return t==M0||t==E0||t==A0||t==$0}var Bs=ke["__core-js_shared__"],ml=(function(){var e=/[^.]+$/.exec(Bs&&Bs.keys&&Bs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function F0(e){return!!ml&&ml in e}var D0=Function.prototype,O0=D0.toString;function hr(e){if(e!=null){try{return O0.call(e)}catch{}try{return e+""}catch{}}return""}var R0=/[\\^$.*+?()[\]{}|]/g,I0=/^\[object .+?Constructor\]$/,P0=Function.prototype,N0=Object.prototype,z0=P0.toString,W0=N0.hasOwnProperty,q0=RegExp("^"+z0.call(W0).replace(R0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function H0(e){if(!cr(e)||F0(e))return!1;var t=Kn(e)?q0:I0;return t.test(hr(e))}function j0(e,t){return e==null?void 0:e[t]}function ur(e,t){var r=j0(e,t);return H0(r)?r:void 0}var ki=ur(Object,"create");function Y0(){this.__data__=ki?ki(null):{},this.size=0}function U0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var G0="__lodash_hash_undefined__",V0=Object.prototype,X0=V0.hasOwnProperty;function Z0(e){var t=this.__data__;if(ki){var r=t[e];return r===G0?void 0:r}return X0.call(t,e)?t[e]:void 0}var K0=Object.prototype,Q0=K0.hasOwnProperty;function J0(e){var t=this.__data__;return ki?t[e]!==void 0:Q0.call(t,e)}var tx="__lodash_hash_undefined__";function ex(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ki&&t===void 0?tx:t,this}function nr(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])}}nr.prototype.clear=Y0;nr.prototype.delete=U0;nr.prototype.get=Z0;nr.prototype.has=J0;nr.prototype.set=ex;function rx(){this.__data__=[],this.size=0}function Va(e,t){return e===t||e!==e&&t!==t}function Xa(e,t){for(var r=e.length;r--;)if(Va(e[r][0],t))return r;return-1}var ix=Array.prototype,ax=ix.splice;function sx(e){var t=this.__data__,r=Xa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ax.call(t,r,1),--this.size,!0}function nx(e){var t=this.__data__,r=Xa(t,e);return r<0?void 0:t[r][1]}function ox(e){return Xa(this.__data__,e)>-1}function lx(e,t){var r=this.__data__,i=Xa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function $e(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])}}$e.prototype.clear=rx;$e.prototype.delete=sx;$e.prototype.get=nx;$e.prototype.has=ox;$e.prototype.set=lx;var wi=ur(ke,"Map");function cx(){this.size=0,this.__data__={hash:new nr,map:new(wi||$e),string:new nr}}function hx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Za(e,t){var r=e.__data__;return hx(t)?r[typeof t=="string"?"string":"hash"]:r.map}function ux(e){var t=Za(this,e).delete(e);return this.size-=t?1:0,t}function dx(e){return Za(this,e).get(e)}function fx(e){return Za(this,e).has(e)}function px(e,t){var r=Za(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Ye(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])}}Ye.prototype.clear=cx;Ye.prototype.delete=ux;Ye.prototype.get=dx;Ye.prototype.has=fx;Ye.prototype.set=px;var gx="Expected a function";function Ei(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gx);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(Ei.Cache||Ye),r}Ei.Cache=Ye;function mx(){this.__data__=new $e,this.size=0}function yx(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function xx(e){return this.__data__.get(e)}function bx(e){return this.__data__.has(e)}var Cx=200;function _x(e,t){var r=this.__data__;if(r instanceof $e){var i=r.__data__;if(!wi||i.length<Cx-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ye(i)}return r.set(e,t),this.size=r.size,this}function zr(e){var t=this.__data__=new $e(e);this.size=t.size}zr.prototype.clear=mx;zr.prototype.delete=yx;zr.prototype.get=xx;zr.prototype.has=bx;zr.prototype.set=_x;var Ta=(function(){try{var e=ur(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Qn(e,t,r){t=="__proto__"&&Ta?Ta(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function hn(e,t,r){(r!==void 0&&!Va(e[t],r)||r===void 0&&!(t in e))&&Qn(e,t,r)}function kx(e){return function(t,r,i){for(var a=-1,s=Object(t),o=i(t),n=o.length;n--;){var c=o[++a];if(r(s[c],c,s)===!1)break}return t}}var wx=kx(),zu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yl=zu&&typeof module=="object"&&module&&!module.nodeType&&module,Sx=yl&&yl.exports===zu,xl=Sx?ke.Buffer:void 0,bl=xl?xl.allocUnsafe:void 0;function vx(e,t){if(t)return e.slice();var r=e.length,i=bl?bl(r):new e.constructor(r);return e.copy(i),i}var Cl=ke.Uint8Array;function Tx(e){var t=new e.constructor(e.byteLength);return new Cl(t).set(new Cl(e)),t}function Bx(e,t){var r=t?Tx(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Lx(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var _l=Object.create,Ax=(function(){function e(){}return function(t){if(!cr(t))return{};if(_l)return _l(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Wu(e,t){return function(r){return e(t(r))}}var qu=Wu(Object.getPrototypeOf,Object),Mx=Object.prototype;function Ka(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Mx;return e===r}function Ex(e){return typeof e.constructor=="function"&&!Ka(e)?Ax(qu(e)):{}}function $i(e){return e!=null&&typeof e=="object"}var $x="[object Arguments]";function kl(e){return $i(e)&&Nr(e)==$x}var Hu=Object.prototype,Fx=Hu.hasOwnProperty,Dx=Hu.propertyIsEnumerable,Ba=kl((function(){return arguments})())?kl:function(e){return $i(e)&&Fx.call(e,"callee")&&!Dx.call(e,"callee")},La=Array.isArray,Ox=9007199254740991;function ju(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ox}function Qa(e){return e!=null&&ju(e.length)&&!Kn(e)}function Rx(e){return $i(e)&&Qa(e)}function Ix(){return!1}var Yu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wl=Yu&&typeof module=="object"&&module&&!module.nodeType&&module,Px=wl&&wl.exports===Yu,Sl=Px?ke.Buffer:void 0,Nx=Sl?Sl.isBuffer:void 0,Jn=Nx||Ix,zx="[object Object]",Wx=Function.prototype,qx=Object.prototype,Uu=Wx.toString,Hx=qx.hasOwnProperty,jx=Uu.call(Object);function Yx(e){if(!$i(e)||Nr(e)!=zx)return!1;var t=qu(e);if(t===null)return!0;var r=Hx.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Uu.call(r)==jx}var Ux="[object Arguments]",Gx="[object Array]",Vx="[object Boolean]",Xx="[object Date]",Zx="[object Error]",Kx="[object Function]",Qx="[object Map]",Jx="[object Number]",tb="[object Object]",eb="[object RegExp]",rb="[object Set]",ib="[object String]",ab="[object WeakMap]",sb="[object ArrayBuffer]",nb="[object DataView]",ob="[object Float32Array]",lb="[object Float64Array]",cb="[object Int8Array]",hb="[object Int16Array]",ub="[object Int32Array]",db="[object Uint8Array]",fb="[object Uint8ClampedArray]",pb="[object Uint16Array]",gb="[object Uint32Array]",Ct={};Ct[ob]=Ct[lb]=Ct[cb]=Ct[hb]=Ct[ub]=Ct[db]=Ct[fb]=Ct[pb]=Ct[gb]=!0;Ct[Ux]=Ct[Gx]=Ct[sb]=Ct[Vx]=Ct[nb]=Ct[Xx]=Ct[Zx]=Ct[Kx]=Ct[Qx]=Ct[Jx]=Ct[tb]=Ct[eb]=Ct[rb]=Ct[ib]=Ct[ab]=!1;function mb(e){return $i(e)&&ju(e.length)&&!!Ct[Nr(e)]}function yb(e){return function(t){return e(t)}}var Gu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,gi=Gu&&typeof module=="object"&&module&&!module.nodeType&&module,xb=gi&&gi.exports===Gu,Ls=xb&&Pu.process,vl=(function(){try{var e=gi&&gi.require&&gi.require("util").types;return e||Ls&&Ls.binding&&Ls.binding("util")}catch{}})(),Tl=vl&&vl.isTypedArray,to=Tl?yb(Tl):mb;function un(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var bb=Object.prototype,Cb=bb.hasOwnProperty;function _b(e,t,r){var i=e[t];(!(Cb.call(e,t)&&Va(i,r))||r===void 0&&!(t in e))&&Qn(e,t,r)}function kb(e,t,r,i){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var n=t[s],c=void 0;c===void 0&&(c=e[n]),a?Qn(r,n,c):_b(r,n,c)}return r}function wb(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Sb=9007199254740991,vb=/^(?:0|[1-9]\d*)$/;function Vu(e,t){var r=typeof e;return t=t??Sb,!!t&&(r=="number"||r!="symbol"&&vb.test(e))&&e>-1&&e%1==0&&e<t}var Tb=Object.prototype,Bb=Tb.hasOwnProperty;function Lb(e,t){var r=La(e),i=!r&&Ba(e),a=!r&&!i&&Jn(e),s=!r&&!i&&!a&&to(e),o=r||i||a||s,n=o?wb(e.length,String):[],c=n.length;for(var l in e)(t||Bb.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Vu(l,c)))&&n.push(l);return n}function Ab(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Mb=Object.prototype,Eb=Mb.hasOwnProperty;function $b(e){if(!cr(e))return Ab(e);var t=Ka(e),r=[];for(var i in e)i=="constructor"&&(t||!Eb.call(e,i))||r.push(i);return r}function Xu(e){return Qa(e)?Lb(e,!0):$b(e)}function Fb(e){return kb(e,Xu(e))}function Db(e,t,r,i,a,s,o){var n=un(e,r),c=un(t,r),l=o.get(c);if(l){hn(e,r,l);return}var h=s?s(n,c,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=La(c),d=!f&&Jn(c),g=!f&&!d&&to(c);h=c,f||d||g?La(n)?h=n:Rx(n)?h=Lx(n):d?(u=!1,h=vx(c,!0)):g?(u=!1,h=Bx(c,!0)):h=[]:Yx(c)||Ba(c)?(h=n,Ba(n)?h=Fb(n):(!cr(n)||Kn(n))&&(h=Ex(c))):u=!1}u&&(o.set(c,h),a(h,c,i,s,o),o.delete(c)),hn(e,r,h)}function Zu(e,t,r,i,a){e!==t&&wx(t,function(s,o){if(a||(a=new zr),cr(s))Db(e,t,o,r,Zu,i,a);else{var n=i?i(un(e,o),s,o+"",e,t,a):void 0;n===void 0&&(n=s),hn(e,o,n)}},Xu)}function Ku(e){return e}function Ob(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)}var Bl=Math.max;function Rb(e,t,r){return t=Bl(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=Bl(i.length-t,0),o=Array(s);++a<s;)o[a]=i[t+a];a=-1;for(var n=Array(t+1);++a<t;)n[a]=i[a];return n[t]=r(o),Ob(e,this,n)}}function Ib(e){return function(){return e}}var Pb=Ta?function(e,t){return Ta(e,"toString",{configurable:!0,enumerable:!1,value:Ib(t),writable:!0})}:Ku,Nb=800,zb=16,Wb=Date.now;function qb(e){var t=0,r=0;return function(){var i=Wb(),a=zb-(i-r);if(r=i,a>0){if(++t>=Nb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Hb=qb(Pb);function jb(e,t){return Hb(Rb(e,t,Ku),e+"")}function Yb(e,t,r){if(!cr(r))return!1;var i=typeof t;return(i=="number"?Qa(r)&&Vu(t,r.length):i=="string"&&t in r)?Va(r[t],e):!1}function Ub(e){return jb(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&Yb(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var n=r[i];n&&e(t,n,i,s)}return t})}var Gb=Ub(function(e,t,r){Zu(e,t,r)}),Vb="​",Xb={curveBasis:Gs,curveBasisClosed:ty,curveBasisOpen:ey,curveBumpX:Ic,curveBumpY:Pc,curveBundle:ry,curveCardinalClosed:iy,curveCardinalOpen:ay,curveCardinal:qc,curveCatmullRomClosed:sy,curveCatmullRomOpen:ny,curveCatmullRom:jc,curveLinear:pi,curveLinearClosed:oy,curveMonotoneX:Zc,curveMonotoneY:Kc,curveNatural:Jc,curveStep:th,curveStepAfter:rh,curveStepBefore:eh},Zb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Kb=p(function(e,t){const r=Qu(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);ua(o),i=Mt(i,[...o])}else i=r.args;if(!i)return;let a=$n(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Qu=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Zb.source})(?=[}][%]{2}).*
117
+ `,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const o=[];for(;(s=di.exec(e))!==null;)if(s.index===di.lastIndex&&di.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const n=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return D.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Qb=p(function(e){return e.replace(di,"")},"removeDirectives"),Jb=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function eo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Xb[r]??t}p(eo,"interpolateToCurve");function Ju(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?b0.sanitizeUrl(r):r}p(Ju,"formatUrl");var t1=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){D.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function ro(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(ro,"distance");function td(e){let t,r=0;e.forEach(a=>{r+=ro(a,t),t=a});const i=r/2;return io(e,i)}p(td,"traverseEdge");function ed(e){return e.length===1?e[0]:td(e)}p(ed,"calcLabelPosition");var Ll=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),io=p((e,t)=>{let r,i=t;for(const a of e){if(r){const s=ro(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Ll((1-o)*r.x+o*a.x,5),y:Ll((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),e1=p((e,t,r)=>{D.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=io(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function rd(e,t,r){const i=structuredClone(r);D.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=io(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,c.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(c.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,c.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(c.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,c.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(c.x=Math.sin(n)*o+(i[0].x+s.x)/2,c.y=-Math.cos(n)*o+(i[0].y+s.y)/2),c}p(rd,"calcTerminalLabelPosition");function id(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(id,"getStylesFromArray");var Al=0,r1=p(()=>(Al++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Al),"generateId");function ad(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(ad,"makeRandomHex");var i1=p(e=>ad(e.length),"random"),a1=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"),s1=p(function(e,t){const r=t.text.replace(Ai.lineBreakRegex," "),[,i]=Ja(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),n1=Ei((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ai.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const c=Ee(`${o} `,r),l=Ee(s,r);if(c>t){const{hyphenatedStrings:f,remainingWord:d}=o1(o,t,"-",r);a.push(s,...f),s=d}else l+c>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),o1=Ei((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,c)=>{const l=`${o}${n}`;if(Ee(l,i)>=t){const u=c+1,f=a.length===u,d=`${l}${r}`;s.push(f?l:d),o=""}else o=l}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function sd(e,t){return ao(e,t).height}p(sd,"calculateTextHeight");function Ee(e,t){return ao(e,t).width}p(Ee,"calculateTextWidth");var ao=Ei((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Ja(r),o=["sans-serif",i],n=e.split(Ai.lineBreakRegex),c=[],l=ot("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=a1();y.text=m||Vb;const x=s1(h,y).style("font-size",s).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}c.push(g)}h.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),$r,l1=($r=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p($r,"InitIDGenerator"),$r),Ui,c1=p(function(e){return Ui=Ui||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ui.innerHTML=e,unescape(Ui.textContent)},"entityDecode");function so(e){return"str"in e}p(so,"isDetailedError");var h1=p((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ja=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 no(e,t){return Gb({},e,t)}p(no,"cleanAndMerge");var he={assignWithDepth:Mt,wrapLabel:n1,calculateTextHeight:sd,calculateTextWidth:Ee,calculateTextDimensions:ao,cleanAndMerge:no,detectInit:Kb,detectDirective:Qu,isSubstringInArray:Jb,interpolateToCurve:eo,calcLabelPosition:ed,calcCardinalityPosition:e1,calcTerminalLabelPosition:rd,formatUrl:Ju,getStylesFromArray:id,generateId:r1,random:i1,runFunc:t1,entityDecode:c1,insertTitle:h1,isLabelCoordinateInPath:nd,parseFontSize:Ja,InitIDGenerator:l1},u1=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"),kS=p((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function zt(e){return e??null}p(zt,"handleUndefinedAttr");function nd(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(nd,"isLabelCoordinateInPath");var oo=p(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function od(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const n=pt().fontSize?pt().fontSize:window.getComputedStyle(document.body).fontSize,c=5,[l=kc.fontSize]=Ja(n),h=l*c+"px";a.style.minWidth=h,a.style.maxWidth=h}else a.style.width="100%";s(a)}p(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}p(od,"configureLabelImages");var d1=p(e=>{const{handDrawnSeed:t}=pt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),qr=p(e=>{const t=f1([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),f1=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),ld=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"),V=p(e=>{const{stylesArray:t}=qr(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];ld(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),G=p((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=pt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=qr(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((c=o.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:p1(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),p1=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const g1=Object.freeze({left:0,top:0,width:16,height:16}),Aa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),cd=Object.freeze({...g1,...Aa}),m1=Object.freeze({...cd,body:"",hidden:!1}),y1=Object.freeze({width:null,height:null}),x1=Object.freeze({...y1,...Aa}),b1=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),c=a.pop(),l={provider:a.length>0?a[0]:i,prefix:c,name:n};return As(l)?l:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return As(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return As(n,r)?n:null}return null},As=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function C1(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 Ml(e,t){const r=C1(e,t);for(const i in m1)i in Aa?i in e&&!(i in r)&&(r[i]=Aa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function _1(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,c=n&&s(n);c&&(a[o]=[n].concat(c))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function El(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=Ml(i[n]||a[n],s)}return o(t),r.forEach(o),Ml(e,s)}function k1(e,t){if(e.icons[t])return El(e,t,[]);const r=_1(e,[t])[t];return r?El(e,t,r):null}const w1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,S1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $l(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(w1);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=S1.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function v1(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function T1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function B1(e,t,r){const i=v1(e);return T1(i.defs,t+i.content+r)}const L1=e=>e==="unset"||e==="undefined"||e==="none";function A1(e,t){const r={...cd,...e},i={...x1,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let v;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:v=a.height/2+a.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:v=a.width/2+a.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}_%2===1&&(a.left!==a.top&&(v=a.left,a.left=a.top,a.top=v),a.width!==a.height&&(v=a.width,a.width=a.height,a.height=v)),y.length&&(s=B1(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,c=a.width,l=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?l:n,h=$l(u,c/l)):(h=o==="auto"?c:o,u=n===null?$l(h,l/c):n==="auto"?l:n);const f={},d=(m,y)=>{L1(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,c,l];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const M1=/\sid="(\S+)"/g,Fl=new Map;function E1(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Fl.get(e)||0;return Fl.set(e,t+1),t?`${e}${t}`:e}function $1(e){const t=[];let r;for(;r=M1.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=E1(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function F1(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>"}function lo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var dr=lo();function hd(e){dr=e}var mi={exec:()=>null};function ft(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Ut.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var D1=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ut={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")},O1=/^(?:[ \t]*(?:\n|$))+/,R1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,I1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,P1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,co=/(?:[*+-]|\d{1,9}[.)])/,ud=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dd=ft(ud).replace(/bull/g,co).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(),N1=ft(ud).replace(/bull/g,co).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(),ho=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,z1=/^[^\n]+/,uo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,W1=ft(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",uo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),q1=ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,co).getRegex(),ts="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",fo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,H1=ft("^ {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",fo).replace("tag",ts).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fd=ft(ho).replace("hr",Fi).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",ts).getRegex(),j1=ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fd).getRegex(),po={blockquote:j1,code:R1,def:W1,fences:I1,heading:P1,hr:Fi,html:H1,lheading:dd,list:q1,newline:O1,paragraph:fd,table:mi,text:z1},Dl=ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fi).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",ts).getRegex(),Y1={...po,lheading:N1,table:Dl,paragraph:ft(ho).replace("hr",Fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dl).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",ts).getRegex()},U1={...po,html:ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fo).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:mi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ft(ho).replace("hr",Fi).replace("heading",` *#{1,6} *[^
118
+ ]`).replace("lheading",dd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},G1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,V1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pd=/^( {2,}|\\)\n(?!\s*$)/,X1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,es=/[\p{P}\p{S}]/u,go=/[\s\p{P}\p{S}]/u,gd=/[^\s\p{P}\p{S}]/u,Z1=ft(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,go).getRegex(),md=/(?!~)[\p{P}\p{S}]/u,K1=/(?!~)[\s\p{P}\p{S}]/u,Q1=/(?:[^\s\p{P}\p{S}]|~)/u,J1=ft(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",D1?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,t2=ft(yd,"u").replace(/punct/g,es).getRegex(),e2=ft(yd,"u").replace(/punct/g,md).getRegex(),xd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",r2=ft(xd,"gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,go).replace(/punct/g,es).getRegex(),i2=ft(xd,"gu").replace(/notPunctSpace/g,Q1).replace(/punctSpace/g,K1).replace(/punct/g,md).getRegex(),a2=ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,go).replace(/punct/g,es).getRegex(),s2=ft(/\\(punct)/,"gu").replace(/punct/g,es).getRegex(),n2=ft(/^<(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(),o2=ft(fo).replace("(?:-->|$)","-->").getRegex(),l2=ft("^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",o2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ma=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,c2=ft(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ma).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bd=ft(/^!?\[(label)\]\[(ref)\]/).replace("label",Ma).replace("ref",uo).getRegex(),Cd=ft(/^!?\[(ref)\](?:\[\])?/).replace("ref",uo).getRegex(),h2=ft("reflink|nolink(?!\\()","g").replace("reflink",bd).replace("nolink",Cd).getRegex(),Ol=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mo={_backpedal:mi,anyPunctuation:s2,autolink:n2,blockSkip:J1,br:pd,code:V1,del:mi,emStrongLDelim:t2,emStrongRDelimAst:r2,emStrongRDelimUnd:a2,escape:G1,link:c2,nolink:Cd,punctuation:Z1,reflink:bd,reflinkSearch:h2,tag:l2,text:X1,url:mi},u2={...mo,link:ft(/^!?\[(label)\]\((.*?)\)/).replace("label",Ma).getRegex(),reflink:ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ma).getRegex()},dn={...mo,emStrongRDelimAst:i2,emStrongLDelim:e2,url:ft(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ol).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:ft(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ol).getRegex()},d2={...dn,br:ft(pd).replace("{2,}","*").getRegex(),text:ft(dn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Gi={normal:po,gfm:Y1,pedantic:U1},ti={normal:mo,gfm:dn,breaks:d2,pedantic:u2},f2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Rl=e=>f2[e];function ye(e,t){if(t){if(Ut.escapeTest.test(e))return e.replace(Ut.escapeReplace,Rl)}else if(Ut.escapeTestNoEncode.test(e))return e.replace(Ut.escapeReplaceNoEncode,Rl);return e}function Il(e){try{e=encodeURI(e).replace(Ut.percentDecode,"%")}catch{return null}return e}function Pl(e,t){var s;let r=e.replace(Ut.findPipe,(o,n,c)=>{let l=!1,h=n;for(;--h>=0&&c[h]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Ut.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Ut.slashPipe,"|");return i}function ei(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function p2(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 Nl(e,t,r,i,a){let s=t.href,o=t.title||null,n=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,c}function g2(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
119
+ `).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[n]=o;return n.length>=a.length?s.slice(a.length):s}).join(`
120
+ `)}var Ea=class{constructor(t){yt(this,"options");yt(this,"rules");yt(this,"lexer");this.options=t||dr}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:ei(i,`
121
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=g2(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:a}}}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 a=ei(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.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:ei(r[0],`
122
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ei(r[0],`
123
+ `).split(`
124
+ `),a="",s="",o=[];for(;i.length>0;){let n=!1,c=[],l;for(l=0;l<i.length;l++)if(this.rules.other.blockquoteStart.test(i[l]))c.push(i[l]),n=!0;else if(!n)c.push(i[l]);else break;i=i.slice(l);let h=c.join(`
125
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
126
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
127
+ ${h}`:h,s=s?`${s}
128
+ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,m=g.raw+`
129
+ `+i.join(`
130
+ `),y=this.blockquote(m);o[o.length-1]=y,a=a.substring(0,a.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,m=g.raw+`
131
+ `+i.join(`
132
+ `),y=this.list(m);o[o.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
133
+ `);continue}}return{type:"blockquote",raw:a,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let l=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
134
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
135
+ `,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+`
136
+ `,t=t.substring(d.length+1),l=!0),!l){let b=this.rules.other.nextBulletRegex(m),_=this.rules.other.hrRegex(m),v=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;t;){let T=t.split(`
137
+ `,1)[0],F;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),F=d):F=d.replace(this.rules.other.tabCharGlobal," "),v.test(d)||S.test(d)||C.test(d)||b.test(d)||_.test(d))break;if(F.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=`
138
+ `+F.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||S.test(f)||_.test(f))break;u+=`
139
+ `+d}!g&&!d.trim()&&(g=!0),h+=T+`
140
+ `,t=t.substring(T.length+1),f=F.slice(m)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),s.raw+=h}let c=s.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l=0;l<s.items.length;l++)if(this.lexer.state.top=!1,s.items[l].tokens=this.lexer.blockTokens(s.items[l].text,[]),!s.loose){let h=s.items[l].tokens.filter(f=>f.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=u}if(s.loose)for(let l=0;l<s.items.length;l++)s.items[l].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," "),a=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:a,title:s}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Pl(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
141
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let c of a)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<i.length;c++)o.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:o.align[c]});for(let c of s)o.rows.push(Pl(c,o.header.length).map((l,h)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[h]})));return o}}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)===`
142
+ `?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 o=ei(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=p2(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Nl(r,{href:a&&a.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 a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Nl(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,o,n,c=s,l=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+s);(a=h.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(n=[...o].length,a[3]||a[4]){c+=n;continue}else if((a[5]||a[6])&&s%3&&!((s+n)%3)){l+=n;continue}if(c-=n,c>0)continue;n=Math.min(n,n+c+l);let u=[...a[0]][0].length,f=t.slice(0,s+a.index+u+n);if(Math.min(s,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&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,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,s;if(r[2]==="@")a=r[0],s="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}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}}}},le=class fn{constructor(t){yt(this,"tokens");yt(this,"options");yt(this,"state");yt(this,"tokenizer");yt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||dr,this.options.tokenizer=this.options.tokenizer||new Ea,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:Ut,block:Gi.normal,inline:ti.normal};this.options.pedantic?(r.block=Gi.pedantic,r.inline=ti.pedantic):this.options.gfm&&(r.block=Gi.gfm,this.options.breaks?r.inline=ti.breaks:r.inline=ti.gfm),this.tokenizer.rules=r}static get rules(){return{block:Gi,inline:ti}}static lex(t,r){return new fn(r).lex(t)}static lexInline(t,r){return new fn(r).inlineTokens(t)}lex(t){t=t.replace(Ut.carriageReturn,`
143
+ `),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){var a,s,o;for(this.options.pedantic&&(t=t.replace(Ut.tabCharGlobal," ").replace(Ut.spaceLine,""));t;){let n;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(l=>(n=l.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let l=r.at(-1);n.raw.length===1&&l!==void 0?l.raw+=`
144
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
145
+ `)?"":`
146
+ `)+n.raw,l.text+=`
147
+ `+n.text,this.inlineQueue.at(-1).src=l.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
148
+ `)?"":`
149
+ `)+n.raw,l.text+=`
150
+ `+n.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let c=t;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(c))){let l=r.at(-1);i&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
151
+ `)?"":`
152
+ `)+n.raw,l.text+=`
153
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(n),i=c.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let l=r.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
154
+ `)?"":`
155
+ `)+n.raw,l.text+=`
156
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(n);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,l,h,u,f;let i=t,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((l=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:l.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(m=>(d=m.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let m=r.at(-1);d.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=d.raw,m.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let g=t;if((f=this.options.extensions)!=null&&f.startInline){let m=1/0,y=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},y),typeof x=="number"&&x>=0&&(m=Math.min(m,x))}),m<1/0&&m>=0&&(g=t.substring(0,m+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=d.raw,m.text+=d.text):r.push(d);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},$a=class{constructor(t){yt(this,"options");yt(this,"parser");this.options=t||dr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(Ut.notSpaceStart))==null?void 0:o[0],s=t.replace(Ut.endingNewline,"")+`
157
+ `;return a?'<pre><code class="language-'+ye(a)+'">'+(i?s:ye(s,!0))+`</code></pre>
158
+ `:"<pre><code>"+(i?s:ye(s,!0))+`</code></pre>
159
+ `}blockquote({tokens:t}){return`<blockquote>
160
+ ${this.parser.parse(t)}</blockquote>
161
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
162
+ `}hr(t){return`<hr>
163
+ `}list(t){let r=t.ordered,i=t.start,a="";for(let n=0;n<t.items.length;n++){let c=t.items[n];a+=this.listitem(c)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
164
+ `+a+"</"+s+`>
165
+ `}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+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=a+" "+ye(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
166
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
167
+ `}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 a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
168
+ <thead>
169
+ `+r+`</thead>
170
+ `+a+`</table>
171
+ `}tablerow({text:t}){return`<tr>
172
+ ${t}</tr>
173
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
174
+ `}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>${ye(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 a=this.parser.parseInline(i),s=Il(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+ye(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=Il(t);if(s===null)return ye(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ye(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ye(t.text)}},yo=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""}},ce=class pn{constructor(t){yt(this,"options");yt(this,"renderer");yt(this,"textRenderer");this.options=t||dr,this.options.renderer=this.options.renderer||new $a,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yo}static parse(t,r){return new pn(r).parse(t)}static parseInline(t,r){return new pn(r).parseInline(t)}parse(t,r=!0){var a,s;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[n.type]){let l=n,h=this.options.extensions.renderers[l.type].call({parser:this},l);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){i+=h||"";continue}}let c=n;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"def":{i+=this.renderer.def(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let l=c,h=this.renderer.text(l);for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],h+=`
175
+ `+this.renderer.text(l);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}parseInline(t,r=this.renderer){var a,s;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[n.type]){let l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=l||"";continue}}let c=n;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{let l='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},Qi,oi=(Qi=class{constructor(t){yt(this,"options");yt(this,"block");this.options=t||dr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?le.lex:le.lexInline}provideParser(){return this.block?ce.parse:ce.parseInline}},yt(Qi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),yt(Qi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Qi),m2=class{constructor(...t){yt(this,"defaults",lo());yt(this,"options",this.setOptions);yt(this,"parse",this.parseMarkdown(!0));yt(this,"parseInline",this.parseMarkdown(!1));yt(this,"Parser",ce);yt(this,"Renderer",$a);yt(this,"TextRenderer",yo);yt(this,"Lexer",le);yt(this,"Tokenizer",Ea);yt(this,"Hooks",oi);this.use(...t)}walkTokens(t,r){var a,s;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let c of n.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of n.rows)for(let l of c)i=i.concat(this.walkTokens(l.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[n.type]?this.defaults.extensions.childTokens[n.type].forEach(c=>{let l=n[c].flat(1/0);i=i.concat(this.walkTokens(l,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...n){let c=s.renderer.apply(this,n);return c===!1&&(c=o.apply(this,n)),c}: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 o=r[s.level];o?o.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)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new $a(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,c=i.renderer[n],l=s[n];s[n]=(...h)=>{let u=c.apply(s,h);return u===!1&&(u=l.apply(s,h)),u||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ea(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,c=i.tokenizer[n],l=s[n];s[n]=(...h)=>{let u=c.apply(s,h);return u===!1&&(u=l.apply(s,h)),u}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new oi;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,c=i.hooks[n],l=s[n];oi.passThroughHooks.has(o)?s[n]=h=>{if(this.defaults.async&&oi.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await c.call(s,h);return l.call(s,f)})();let u=c.call(s,h);return l.call(s,u)}:s[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(s,h);return f===!1&&(f=await l.apply(s,h)),f})();let u=c.apply(s,h);return u===!1&&(u=l.apply(s,h)),u}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(n){let c=[];return c.push(o.call(this,n)),s&&(c=c.concat(s.call(this,n))),c}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return le.lex(t,r??this.defaults)}parser(t,r){return ce.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(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,c=await(s.hooks?await s.hooks.provideLexer():t?le.lex:le.lexInline)(n,s),l=s.hooks?await s.hooks.processAllTokens(c):c;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():t?ce.parse:ce.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?le.lex:le.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let c=(s.hooks?s.hooks.provideParser():t?ce.parse:ce.parseInline)(n,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
176
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+ye(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},or=new m2;function gt(e,t){return or.parse(e,t)}gt.options=gt.setOptions=function(e){return or.setOptions(e),gt.defaults=or.defaults,hd(gt.defaults),gt};gt.getDefaults=lo;gt.defaults=dr;gt.use=function(...e){return or.use(...e),gt.defaults=or.defaults,hd(gt.defaults),gt};gt.walkTokens=function(e,t){return or.walkTokens(e,t)};gt.parseInline=or.parseInline;gt.Parser=ce;gt.parser=ce.parse;gt.Renderer=$a;gt.TextRenderer=yo;gt.Lexer=le;gt.lexer=le.lex;gt.Tokenizer=Ea;gt.Hooks=oi;gt.parse=gt;gt.options;gt.setOptions;gt.use;gt.walkTokens;gt.parseInline;ce.parse;le.lex;function _d(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?n.concat(l.map(function(h){var u,f;return(f=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(a.length){var s=new RegExp(`
177
+ [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
178
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,c){var l=o.match(/(?:^|\n)( *)$/),h=l?l[1]:"",u=n;typeof n=="string"&&n.includes(`
179
+ `)&&(u=String(n).split(`
180
+ `).map(function(f,d){return d===0?f:""+h+f}).join(`
181
+ `)),o+=u+i[c+1]}),o}var y2={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},gn=new Map,kd=new Map,x2=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(D.debug("Registering icon pack:",t.name),"loader"in t)kd.set(t.name,t.loader);else if("icons"in t)gn.set(t.name,t.icons);else throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),wd=p(async(e,t)=>{const r=b1(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=gn.get(i);if(!a){const o=kd.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},gn.set(i,a)}catch(n){throw D.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=k1(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),b2=p(async e=>{try{return await wd(e),!0}catch{return!1}},"isIconAvailable"),Di=p(async(e,t,r)=>{let i;try{i=await wd(e,t==null?void 0:t.fallbackPrefix)}catch(o){D.error(o),i=y2}const a=A1(i,t),s=F1($1(a.body),{...a.attributes,...r});return fe(s,Pt())},"getIconSVG");function Sd(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
182
+ `).replace(/\n{2,}/g,`
183
+ `);return _d(i)}p(Sd,"preprocessMarkdown");function vd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(vd,"nonMarkdownToLines");function Td(e,t={}){const r=Sd(e,t),i=gt.lexer(r),a=[[]];let s=0;function o(n,c="normal"){n.type==="text"?n.text.split(`
184
+ `).forEach((h,u)=>{u!==0&&(s++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&a[s].push({content:f,type:c})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(l=>{o(l,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var c;n.type==="paragraph"?(c=n.tokens)==null||c.forEach(l=>{o(l)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}p(Td,"markdownToLines");function Bd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Bd,"nonMarkdownToHTML");function Ld(e,{markdownAutoWrap:t}={}){const r=gt.lexer(e);function i(a){var s,o,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(D.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(Ld,"markdownToHTML");function Ad(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Ad,"splitTextToChars");function Md(e,t){const r=Ad(t.content);return xo(e,[],r,t.type)}p(Md,"splitWordToFitWidth");function xo(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?xo(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(xo,"splitWordToFitWidthRecursion");function Ed(e,t){if(e.some(({content:r})=>r.includes(`
185
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Fa(e,t)}p(Ed,"splitLineToFitWidth");function Fa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Fa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,c]=Md(t,s);r.push([n]),c.content&&e.unshift(c)}return Fa(e,t,r)}p(Fa,"splitLineToFitWidthRecursion");function mn(e,t){t&&e.attr("style",t)}p(mn,"applyStyle");var zl=16384;async function $d(e,t,r,i,a=!1,s=Pt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,zl)}px`),o.attr("height",`${Math.min(10*r,zl)}px`);const n=o.append("xhtml:div"),c=yi(t.label)?await Ec(t.label.replace(Ai.lineBreakRegex,`
186
+ `),s):fe(t.label,s),l=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(c),mn(h,t.labelStyle),h.attr("class",`${l} ${i}`),mn(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"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}p($d,"addHtmlSpan");function rs(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}p(rs,"createTspan");function Fd(e,t,r){const i=e.append("text"),a=rs(i,1,t);is(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}p(Fd,"computeWidthOfText");function C2(e,t,r){var o;const i=e.append("text"),a=rs(i,1,t);is(a,[{content:r,type:"normal"}]);const s=(o=a.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}p(C2,"computeDimensionOfText");function Dd(e,t,r,i=!1,a=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),c=o.append("text").attr("y","-10.1");a&&c.attr("text-anchor","middle");let l=0;for(const h of r){const u=p(d=>Fd(o,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:Ed(h,u);for(const d of f){const g=rs(c,l,1.1,a);is(g,d),l++}}if(i){const h=c.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),o.node()}else return c.node()}p(Dd,"createFormattedText");function is(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}p(is,"updateTextContentAndStyles");async function Od(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await b2(n)?await Di(n,void 0,{class:"label-icon"}):`<i class='${fe(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Od,"replaceIconSubstring");var Fe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:n=!0,width:c=200,addSvgBackground:l=!1}={},h)=>{if(D.debug("XYZ createText",t,r,i,a,s,n,"addSvgBackground: ",l),s){const u=o?Ld(t,h):Bd(t),f=await Od(Wr(u),h),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:yi(t)?d:f,labelStyle:r.replace("fill:","color:")};return await $d(e,g,c,a,l,h)}else{const u=t.replace(/<br\s*\/?>/g,"<br/>"),f=o?Td(u.replace("<br>","<br/>"),h):vd(u),d=Dd(c,e,f,t?l:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ot(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ot(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ot(d).select("text").attr("style",m)}return i?ot(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ot(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Ms(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const c of e){const[l,h]=c;c[0]=(l-i)*o-(h-a)*n+i,c[1]=(l-i)*n+(h-a)*o+a}}}function _2(e,t){return e[0]===t[0]&&e[1]===t[1]}function k2(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const l of o)Ms(l,n,a);const c=(function(l,h,u){const f=[];for(const b of l){const _=[...b];_2(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_<b.length-1;_++){const v=b[_],S=b[_+1];if(v[1]!==S[1]){const C=Math.min(v[1],S[1]);g.push({ymin:C,ymax:Math.max(v[1],S[1]),x:C===v[1]?v[0]:S[0],islope:(S[0]-v[0])/(S[1]-v[1])})}}if(g.sort(((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_<g.length&&!(g[_].ymin>y);_++)b=_;g.splice(0,b+1).forEach((_=>{m.push({s:y,edge:_})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const _=b+1;if(_>=m.length)break;const v=m[b].edge,S=m[_].edge;d.push([[Math.round(v.x),y],[Math.round(S.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(o,s,i);if(a){for(const l of o)Ms(l,n,-a);(function(l,h,u){const f=[];l.forEach((d=>f.push(...d))),Ms(f,h,u)})(c,n,-a)}return c}function Oi(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),k2(e,a,i,s||1)}class bo{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Oi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function as(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 w2 extends bo{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Oi(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),c=.5*i*Math.sin(s);for(const[l,h]of a)as([l,h])&&o.push([[l[0]-n,l[1]+c],[...h]],[[l[0]+n,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class S2 extends bo{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class v2{constructor(t){this.helper=t}fillPolygons(t,r){const i=Oi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const c=as(n),l=c/a,h=Math.ceil(l)-1,u=c-h*a,f=(n[0][0]+n[1][0])/2-a/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class T2{constructor(t){this.helper=t}fillPolygons(t,r){const i=Oi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const n=as(o),c=Math.floor(n/(i+a)),l=(n+a-c*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<c;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+l*Math.cos(f),h[1]+g*Math.sin(f)+l*Math.sin(f)],x=[h[0]+m*Math.cos(f)+l*Math.cos(f),h[1]+m*Math.sin(f)+l*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),s}}class B2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Oi(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=as(s),n=Math.round(o/(2*r));let c=s[0],l=s[1];c[0]>l[0]&&(c=s[1],l=s[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+f*Math.cos(h),c[1]+f*Math.sin(h)],y=[c[0]+d*Math.cos(h),c[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),a}}const Zt={};class L2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const A2=0,Es=1,Wl=2,Vi={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 $s(e,t){return e.type===t}function Co(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:A2,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Es,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Wl,text:""},n})(e);let i="BOD",a=0,s=r[a];for(;!$s(s,Wl);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Co("M0,0"+e);a++,o=Vi[s.text],i=s.text}else $s(s,Es)?o=Vi[i]:(a++,o=Vi[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let c=a;c<a+o;c++){const l=r[c];if(!$s(l,Es))throw new Error("Param not a number: "+i+","+l.text);n[n.length]=+l.text}if(typeof Vi[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:n};t.push(c),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Rd(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=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 c=n.map(((l,h)=>h%2?l+r:l+t));s.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const c=n.map(((l,h)=>h%2?l+r:l+t));s.push({key:"Q",data:c}),t=c[2],r=c[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 c=n.map(((l,h)=>h%2?l+r:l+t));s.push({key:"S",data:c}),t=c[2],r=c[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=a}return s}function Id(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=a+(a-c)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),n=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=a+(a-c)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),n=d,c=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),n=u,c=f,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(Pd(i,a,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=l}return t}function ri(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Pd(e,t,r,i,a,s,o,n,c,l){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(l)[d,g,m,y]=l;else{[e,t]=ri(e,t,-h),[r,i]=ri(r,i,-h);const O=(e-r)/2,A=(t-i)/2;let M=O*O/(a*a)+A*A/(s*s);M>1&&(M=Math.sqrt(M),a*=M,s*=M);const B=a*a,E=s*s,L=B*E-B*A*A-E*O*O,W=B*A*A+E*O*O,Y=(n===c?-1:1)*Math.sqrt(Math.abs(L/W));m=Y*a*A/s+(e+r)/2,y=Y*-s*O/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),c&&d>g&&(d-=2*Math.PI),!c&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,A=r,M=i;g=c&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Pd(r=m+a*Math.cos(g),i=y+s*Math.sin(g),A,M,a,s,o,0,c,[g,O,m,y])}x=g-d;const b=Math.cos(d),_=Math.sin(d),v=Math.cos(g),S=Math.sin(g),C=Math.tan(x/4),T=4/3*a*C,F=4/3*s*C,P=[e,t],R=[e+T*_,t-F*b],$=[r+T*S,i-F*v],z=[r,i];if(R[0]=2*P[0]-R[0],R[1]=2*P[1]-R[1],l)return[R,$,z].concat(f);{f=[R,$,z].concat(f);const O=[];for(let A=0;A<f.length;A+=3){const M=ri(f[A][0],f[A][1],h),B=ri(f[A+1][0],f[A+1][1],h),E=ri(f[A+2][0],f[A+2][1],h);O.push([M[0],M[1],B[0],B[1],E[0],E[1]])}return O}}const M2={randOffset:function(e,t){return rt(e,t)},randOffsetWithRange:function(e,t,r){return Da(e,t,r)},ellipse:function(e,t,r,i,a){const s=zd(r,i,a);return yn(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return qe(e,t,r,i,a,!0)}};function Nd(e,t,r,i,a){return{type:"path",ops:qe(e,t,r,i,a)}}function na(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...qe(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...qe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?Nd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function E2(e,t,r,i,a){return(function(s,o){return na(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function ql(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Xi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Xi(r[0],1.5*(1+.22*t.roughness),Yl(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=Xi(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Xi(o,1.5*(1+.22*t.roughness),Yl(t));for(const l of n)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function zd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const c=1-r.curveFitting;return o+=rt(o*c,r),n+=rt(n*c,r),{increment:s,rx:o,ry:n}}function yn(e,t,r,i){const[a,s]=Ul(i.increment,e,t,i.rx,i.ry,1,i.increment*Da(.1,Da(.4,1,r),r),r);let o=Oa(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Ul(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=Oa(n,null,r);o=o.concat(c)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Hl(e,t,r,i,a,s,o,n,c){const l=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=rt(.01*u,c),f+=rt(.01*f,c);let d=a,g=s;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/c.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Gl(y,l,h,u,f,d,g,1,c);if(!c.disableMultiStroke){const b=Gl(y,l,h,u,f,d,g,1.5,c);x.push(...b)}return o&&(n?x.push(...qe(l,h,l+u*Math.cos(d),h+f*Math.sin(d),c),...qe(l,h,l+u*Math.cos(g),h+f*Math.sin(g),c)):x.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function jl(e,t){const r=Id(Rd(Co(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...qe(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[c,l,h,u,f,d]=n;i.push(...$2(c,l,h,u,f,d,s,t)),s=[f,d];break}case"Z":i.push(...qe(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Fs(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+rt(a,t),i[0][1]+rt(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+rt(a,t),i[o][1]+rt(a,t)]})}}return{type:"fillPath",ops:r}}function br(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Zt[a])switch(a){case"zigzag":Zt[a]||(Zt[a]=new w2(i));break;case"cross-hatch":Zt[a]||(Zt[a]=new S2(i));break;case"dots":Zt[a]||(Zt[a]=new v2(i));break;case"dashed":Zt[a]||(Zt[a]=new T2(i));break;case"zigzag-line":Zt[a]||(Zt[a]=new B2(i));break;default:a="hachure",Zt[a]||(Zt[a]=new bo(i))}return Zt[a]})(t,M2).fillPolygons(e,t)}function Yl(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Wd(e){return e.randomizer||(e.randomizer=new L2(e.seed||0)),e.randomizer.next()}function Da(e,t,r,i=1){return r.roughness*i*(Wd(r)*(t-e)+e)}function rt(e,t,r=1){return Da(-e,e,t,r)}function qe(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=xn(e,t,r,i,a,!0,!1);if(o)return n;const c=xn(e,t,r,i,a,!0,!0);return n.concat(c)}function xn(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(n);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=c/10);const u=h/2,f=.2+.2*Wd(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=rt(d,a,l),g=rt(g,a,l);const m=[],y=()=>rt(u,a,l),x=()=>rt(h,a,l),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:rt(h,a,l)),t+(b?0:rt(h,a,l))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Xi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]),i.push([e[0][0]+rt(t,r),e[0][1]+rt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]),a===e.length-1&&i.push([e[a][0]+rt(t,r),e[a][1]+rt(t,r)]);return Oa(i,null,r)}function Oa(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const c=e[n];s[0]=[c[0],c[1]],s[1]=[c[0]+(o*e[n+1][0]-o*e[n-1][0])/6,c[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.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?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...xn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Ul(e,t,r,i,a,s,o,n){const c=[],l=[];if(n.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];c.push(u),l.push(u)}l.push([t+i*Math.cos(0),r+a*Math.sin(0)]),l.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=rt(.5,n)-Math.PI/2;l.push([rt(s,n)+t+.9*i*Math.cos(h-e),rt(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[rt(s,n)+t+i*Math.cos(f),rt(s,n)+r+a*Math.sin(f)];c.push(d),l.push(d)}l.push([rt(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),rt(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),l.push([rt(s,n)+t+.98*i*Math.cos(h+o),rt(s,n)+r+.98*a*Math.sin(h+o)]),l.push([rt(s,n)+t+.9*i*Math.cos(h+.5*o),rt(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[l,c]}function Gl(e,t,r,i,a,s,o,n,c){const l=s+rt(.1,c),h=[];h.push([rt(n,c)+t+.9*i*Math.cos(l-e),rt(n,c)+r+.9*a*Math.sin(l-e)]);for(let u=l;u<=o;u+=e)h.push([rt(n,c)+t+i*Math.cos(u),rt(n,c)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Oa(h,null,c)}function $2(e,t,r,i,a,s,o,n){const c=[],l=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:rt(l[0],n)),o[1]+(f?0:rt(l[0],n))]}),h=f?[a,s]:[a+rt(l[d],n),s+rt(l[d],n)],c.push({op:"bcurveTo",data:[e+rt(l[d],n),t+rt(l[d],n),r+rt(l[d],n),i+rt(l[d],n),h[0],h[1]]});return c}function ii(e){return[...e]}function Vl(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(ii(e[0]),ii(e[1]),ii(e[2]),ii(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(ii(a[0]));for(let n=1;n+2<a.length;n++){const c=a[n];s[0]=[c[0],c[1]],s[1]=[c[0]+(o*a[n+1][0]-o*a[n-1][0])/6,c[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function oa(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function F2(e,t,r){const i=oa(t,r);if(i===0)return oa(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),oa(e,Ke(t,r,a))}function Ke(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function bn(e,t,r,i){const a=i||[];if((function(n,c){const l=n[c+0],h=n[c+1],u=n[c+2],f=n[c+3];let d=3*h[0]-2*l[0]-f[0];d*=d;let g=3*h[1]-2*l[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-l[0];m*=m;let y=3*u[1]-2*f[1]-l[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(oa(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],u=e[t+3],f=Ke(c,l,.5),d=Ke(l,h,.5),g=Ke(h,u,.5),m=Ke(f,d,.5),y=Ke(d,g,.5),x=Ke(m,y,.5);bn([c,f,m,x],0,r,a),bn([x,y,g,u],0,r,a)}var s,o;return a}function D2(e,t){return Ra(e,0,e.length,t)}function Ra(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const u=F2(e[h],o,n);u>c&&(c=u,l=h)}return Math.sqrt(c)>i?(Ra(e,t,l+1,i,s),Ra(e,l,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Ds(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)bn(e,3*s,t,i);return r&&r>0?Ra(i,0,i.length,r):i}const Jt="none";class Ia{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[Nd(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],c=E2(t,r,i,a,o);if(o.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(Fs([l],o)):n.push(br([l],o))}return o.stroke!==Jt&&n.push(c),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],c=zd(i,a,o),l=yn(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const h=yn(t,r,o,c).opset;h.type="fillPath",n.push(h)}else n.push(br([l.estimatedPoints],o));return o.stroke!==Jt&&n.push(l.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[na(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,c){const l=this._o(c),h=[],u=Hl(t,r,i,a,s,o,n,!0,l);if(n&&l.fill)if(l.fillStyle==="solid"){const f=Object.assign({},l);f.disableMultiStroke=!0;const d=Hl(t,r,i,a,s,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const _=f,v=d;let S=Math.abs(g/2),C=Math.abs(m/2);S+=rt(.01*S,b),C+=rt(.01*C,b);let T=y,F=x;for(;T<0;)T+=2*Math.PI,F+=2*Math.PI;F-T>2*Math.PI&&(T=0,F=2*Math.PI);const P=(F-T)/b.curveStepCount,R=[];for(let $=T;$<=F;$+=P)R.push([_+S*Math.cos($),v+C*Math.sin($)]);return R.push([_+S*Math.cos(F),v+C*Math.sin(F)]),R.push([_,v]),br([R],b)})(t,r,i,a,s,o,l));return l.stroke!==Jt&&h.push(u),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],s=ql(t,i);if(i.fill&&i.fill!==Jt)if(i.fillStyle==="solid"){const o=ql(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const c=typeof n[0][0]=="number"?[n]:n;for(const l of c)l.length<3?o.push(...l):l.length===3?o.push(...Ds(Vl([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):o.push(...Ds(Vl(l),10,(1+i.roughness)/2))}o.length&&a.push(br([o],i))}return i.stroke!==Jt&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=na(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Fs([t],i)):a.push(br([t],i))),i.stroke!==Jt&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Jt,o=i.stroke!==Jt,n=!!(i.simplification&&i.simplification<1),c=(function(h,u,f){const d=Id(Rd(Co(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ds(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:S,data:C}of d)switch(S){case"M":_(),y=[C[0],C[1]],m.push(y);break;case"L":b(),m.push([C[0],C[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([C[0],C[1]]),x.push([C[2],C[3]]),x.push([C[4],C[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const v=[];for(const S of g){const C=D2(S,f);C.length&&v.push(C)}return v})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),l=jl(t,i);if(s)if(i.fillStyle==="solid")if(c.length===1){const h=jl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(Fs(c,i));else a.push(br(c,i));return o&&(n?c.forEach((h=>{a.push(na(h,!1,i))})):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.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,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Jt};break;case"fillPath":o={d:this.opsToPath(s),stroke:Jt,strokeWidth:0,fill:i.fill||Jt};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Jt,strokeWidth:i,fill:Jt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class O2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ia(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);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,a,s,o,n=!1,c){const l=this.gen.arc(t,r,i,a,s,o,n,c);return this.draw(l),l}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 Zi="http://www.w3.org/2000/svg";class R2{constructor(t,r){this.svg=t,this.gen=new Ia(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Zi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let c=null;switch(n.type){case"path":c=a.createElementNS(Zi,"path"),c.setAttribute("d",this.opsToPath(n,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(Zi,"path"),c.setAttribute("d",this.opsToPath(n,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,n,i)}c&&s.appendChild(c)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Zi,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),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,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);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,a,s,o,n=!1,c){const l=this.gen.arc(t,r,i,a,s,o,n,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var U={canvas:(e,t)=>new O2(e,t),svg:(e,t)=>new R2(e,t),generator:e=>new Ia(e),newSeed:()=>Ia.newSeed()},et=p(async(e,t,r)=>{var d,g;let i;const a=t.useHtmlLabels||je((d=pt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",zt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,l=t.labelType==="markdown",h=await Fe(o,fe(Wr(n),pt()),{useHtmlLabels:a,width:t.width||((g=pt().flowchart)==null?void 0:g.wrappingWidth),cssClasses:l?"markdown-node-label":void 0,style:t.labelStyle,addSvgBackground:c,markdown:l},pt());let u=h.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(a){const m=h.children[0],y=ot(h);await od(m,n),u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return a?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:f,label:o}},"labelHelper"),Os=p(async(e,t,r)=>{var c,l;const i=r.useHtmlLabels??Wt(pt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Fe(a,fe(Wr(t),pt()),{useHtmlLabels:i,width:r.width||((l=(c=pt())==null?void 0:c.flowchart)==null?void 0:l.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Wt(pt())){const h=s.children[0],u=ot(s);o=h.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),Z=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),tt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ht,"createPathFromPoints");function He(e,t,r,i,a,s){const o=[],c=r-e,l=i-t,h=c/s,u=2*Math.PI/h,f=t+l/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*c,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(He,"generateFullSineWavePoints");function Si(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Si,"generateCirclePoints");var I2=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,c,l;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),c=s===0?0:n*a/s,l=n):(a<0&&(o=-o),c=o,l=a===0?0:o*s/a),{x:r+c,y:i+l}},"intersectRect"),Hr=I2,P2=p(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=pt(),n=Wt(o);return await Fe(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ie=P2,Ue=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),qd=p(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Wt(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await Fe(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await Ie(d,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Wt(r)){const T=g.children[0],F=ot(g);m=T.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const T=U.svg(u),F=G(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),P=T.path(Ue(b,_,y,x,0),F);v=u.insert(()=>(D.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",l.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=oo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const T=d.select("span");T&&T.attr("style",n)}const C=v.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return Hr(t,T)},{cluster:u,labelBBox:m}},"rect"),N2=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/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+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Hr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),z2=p(async(e,t)=>{const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),u=l.insert("g").attr("class","cluster-label");let f=l.append("rect");const d=await Ie(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Wt(r)){const P=d.children[0],R=ot(d);g=P.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,v=t.x-x/2,S=t.y-b/2;t.width=x;const C=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),R=U.svg(l),$=t.rx||t.ry?R.path(Ue(v,S,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:c,seed:a}):R.rectangle(v,S,x,b,{seed:a});T=l.insert(()=>$,":first-child");const z=R.rectangle(v,C,x,_,{fill:P?s:o,fillStyle:P?"hachure":"solid",stroke:c,seed:a});T=l.insert(()=>$,":first-child"),f=l.insert(()=>z)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",v).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",C).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(Wt(r)?0:3)})`);const F=T.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return Hr(t,P)},{cluster:l,labelBBox:g}},"roundedWithTitle"),W2=p(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Wt(r),d=u.insert("g").attr("class","cluster-label "),g=await Fe(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Wt(r)){const T=g.children[0],F=ot(g);m=T.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;D.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const T=U.svg(u),F=G(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),P=T.path(Ue(b,_,y,x,t.rx),F);v=u.insert(()=>(D.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",l.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=oo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const T=d.select("span");T&&T.attr("style",n)}const C=v.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return Hr(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),q2=p((e,t)=>{const r=pt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=o.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,u=t.x-l/2,f=t.y-h/2;t.width=l;let d;if(t.look==="handDrawn"){const y=U.svg(o).rectangle(u,f,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=o.insert(()=>y,":first-child")}else d=n.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",l).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Hr(t,m)},{cluster:o,labelBBox:{}}},"divider"),H2=qd,j2={rect:qd,squareRect:H2,roundedWithTitle:z2,noteGroup:N2,divider:q2,kanbanSection:W2},Hd=new Map,Y2=p(async(e,t)=>{const r=t.shape||"rect",i=await j2[r](e,t);return Hd.set(t.id,i),i},"insertCluster"),LS=p(()=>{Hd=new Map},"clear");function jd(e,t){return e.intersect(t)}p(jd,"intersectNode");var U2=jd;function Yd(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,c=Math.sqrt(t*t*n*n+r*r*o*o),l=Math.abs(t*r*o/c);i.x<a&&(l=-l);var h=Math.abs(t*r*n/c);return i.y<s&&(h=-h),{x:a+l,y:s+h}}p(Yd,"intersectEllipse");var Ud=Yd;function Gd(e,t,r){return Ud(e,t,t,r)}p(Gd,"intersectCircle");var G2=Gd;function Vd(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,c=a*i.x+s*i.y+o,l=1e-6;if(n!==0&&c!==0&&Cn(n,c))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<l&&Math.abs(g)<l&&Cn(d,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const _=x<0?(x-y)/m:(x+y)/m;return{x:b,y:_}}}p(Vd,"intersectLine");function Cn(e,t){return e*t>0}p(Cn,"sameSign");var V2=Vd;function Xd(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let c=i-e.width/2-o,l=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=V2(e,r,{x:c+u.x,y:l+u.y},{x:c+f.x,y:l+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),s[0]):e}p(Xd,"intersectPolygon");var X2=Xd,q={node:U2,circle:G2,ellipse:Ud,polygon:X2,rect:Hr};function Zd(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=tt(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,c=U.svg(s),l=G(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=c.circle(0,0,o*2,l),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",zt(n)),Z(t,u),t.intersect=function(f){return D.info("Circle intersect",t,o,f),q.circle(t,o,f)},s}p(Zd,"anchor");function _n(e,t,r,i,a,s,o){const c=(e+r)/2,l=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/s,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=c+y*s*Math.sin(h)*(o?-1:1),b=l-y*a*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/s,(e-x)/a);let S=Math.atan2((i-b)/s,(r-x)/a)-_;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const C=[];for(let T=0;T<20;T++){const F=T/19,P=_+F*S,R=x+a*Math.cos(P),$=b+s*Math.sin(P);C.push({x:R,y:$})}return C}p(_n,"generateArcPoints");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding+20,n=s.height+t.padding,c=n/2,l=c/(2.5+n/50),{cssStyles:h}=t,u=[{x:o/2,y:-n/2},{x:-o/2,y:-n/2},..._n(-o/2,-n/2,-o/2,n/2,l,c,!1),{x:o/2,y:n/2},..._n(o/2,n/2,o/2,-n/2,l,c,!0)],f=U.svg(a),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=ht(u),m=f.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${l/2}, 0)`),Z(t,y),t.intersect=function(x){return q.polygon(t,u,x)},a}p(Kd,"bowTieRect");function De(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(De,"insertPolygonShape");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+t.padding,n=12,c=s.width+t.padding+n,l=0,h=c,u=-o,f=0,d=[{x:l+n,y:u},{x:h,y:u},{x:h,y:f},{x:l,y:f},{x:l,y:u+n},{x:l+n,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=U.svg(a),x=G(t,{}),b=ht(d),_=y.path(b,x);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),m&&g.attr("style",m)}else g=De(a,c,o,d);return i&&g.attr("style",i),Z(t,g),t.intersect=function(y){return q.polygon(t,d,y)},a}p(Qd,"card");function Jd(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=U.svg(i),c=G(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=ht(o),h=n.path(l,c),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return q.polygon(t,o,f)},i}p(Jd,"choice");async function _o(e,t,r){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await et(e,t,tt(t)),c=(r==null?void 0:r.padding)??n,l=o.width/2+c;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=U.svg(s),d=G(t,{}),g=f.circle(0,0,l*2,d);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",zt(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",l).attr("cx",0).attr("cy",0);return Z(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return q.circle(f,g,d)},t.intersect=function(f){return D.info("Circle intersect",t,l,f),q.circle(t,l,f)},s}p(_o,"circle");function tf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={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}
187
+ M ${a.x},${a.y} L ${o.x},${o.y}`}p(tf,"createLine");function ef(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=U.svg(a),c=G(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=n.circle(0,0,s*2,c),h=tf(s),u=n.path(h,c),f=a.insert(()=>l,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Z(t,f),t.intersect=function(d){return D.info("crossedCircle intersect",t,{radius:s,point:d}),q.circle(t,s,d)},a}p(ef,"crossedCircle");function Be(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Be,"generateCirclePoints");async function rf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=s.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Be(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...Be(n/2+l*2,-l,l,20,-180,-270),...Be(n/2+l*2,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...Be(n/2,c/2,l,20,0,90)],f=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...Be(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...Be(n/2+n*.1,-l,l,20,-180,-270),...Be(n/2+n*.1,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...Be(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2,y:c/2+l}],d=U.svg(a),g=G(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=d.path(y,g),b=ht(f),_=d.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${l}, 0)`),o.attr("transform",`translate(${-n/2+l-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,v),t.intersect=function(S){return q.polygon(t,f,S)},a}p(rf,"curlyBraceLeft");function Le(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(Le,"generateCirclePoints");async function af(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=s.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Le(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...Le(n/2+l*2,-l,l,20,-180,-270),...Le(n/2+l*2,l,l,20,-90,-180),{x:n/2+l,y:c/2},...Le(n/2,c/2,l,20,0,90)],f=[{x:-n/2,y:-c/2-l},{x:n/2,y:-c/2-l},...Le(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...Le(n/2+l*2,-l,l,20,-180,-270),...Le(n/2+l*2,l,l,20,-90,-180),{x:n/2+l,y:c/2},...Le(n/2,c/2,l,20,0,90),{x:n/2,y:c/2+l},{x:-n/2,y:c/2+l}],d=U.svg(a),g=G(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=d.path(y,g),b=ht(f),_=d.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-l}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,v),t.intersect=function(S){return q.polygon(t,f,S)},a}p(af,"curlyBraceRight");function Ft(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Ft,"generateCirclePoints");async function sf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=s.height+(t.padding??0),l=Math.max(5,c*.1),{cssStyles:h}=t,u=[...Ft(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...Ft(n/2+l*2,-l,l,20,-180,-270),...Ft(n/2+l*2,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...Ft(n/2,c/2,l,20,0,90)],f=[...Ft(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},...Ft(-n/2-l/2,-l,l,20,0,90),...Ft(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...Ft(-n/2+l+l/2,c/2,l,30,-180,-270)],d=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...Ft(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...Ft(n/2+l*2,-l,l,20,-180,-270),...Ft(n/2+l*2,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...Ft(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2-l-l/2,y:c/2+l},...Ft(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},...Ft(-n/2-l/2,-l,l,20,0,90),...Ft(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},...Ft(-n/2+l+l/2,c/2,l,30,-180,-270)],g=U.svg(a),m=G(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ht(u).replace("Z",""),b=g.path(x,m),v=ht(f).replace("Z",""),S=g.path(v,m),C=ht(d),T=g.path(C,{...m}),F=a.insert("g",":first-child");return F.insert(()=>T,":first-child").attr("stroke-opacity",0),F.insert(()=>b,":first-child"),F.insert(()=>S,":first-child"),F.attr("class","text"),h&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${l-l/4}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,F),t.intersect=function(P){return q.polygon(t,d,P)},a}p(sf,"curlyBraces");async function nf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=80,n=20,c=Math.max(o,(s.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),l=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=U.svg(a),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=c,m=l,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Si(-y,-m/2,h,50,270,90)],_=ht(b),v=f.path(_,d),S=a.insert(()=>v,":first-child");return S.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(${-c/2}, ${-l/2})`),Z(t,S),t.intersect=function(C){return q.polygon(t,b,C)},a}p(nf,"curvedTrapezoid");var Z2=p((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),K2=p((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Q2=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function of(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+t.padding,t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(s.height+l+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=U.svg(a),g=K2(0,0,n,h,c,l),m=Q2(0,l,n,h,c,l),y=d.path(g,G(t,{})),x=d.path(m,G(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=Z2(0,0,n,h,c,l);u=a.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",zt(f)).attr("style",i)}return u.attr("label-offset-y",l),u.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),Z(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(d){const g=q.rect(t,d),m=g.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-m*m/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}p(of,"cylinder");async function lf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+t.padding,c=s.height+t.padding,l=c*.2,h=-n/2,u=-c/2-l/2,{cssStyles:f}=t,d=U.svg(a),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+l},{x:-h,y:u+l},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+l+(t.padding??0)/2-(s.y-(s.top??0))})`),Z(t,x),t.intersect=function(b){return q.rect(t,b)},a}p(lf,"dividedRectangle");async function cf(e,t){var f,d;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o}=await et(e,t,tt(t)),c=s.width/2+o+5,l=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=U.svg(a),m=G(t,{roughness:.2,strokeWidth:2.5}),y=G(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,c*2,m),b=g.circle(0,0,l*2,y);h=a.insert("g",":first-child"),h.attr("class",zt(t.cssClasses)).attr("style",zt(u)),(f=h.node())==null||f.appendChild(x),(d=h.node())==null||d.appendChild(b)}else{h=a.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.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",l).attr("cx",0).attr("cy",0)}return Z(t,h),t.intersect=function(g){return D.info("DoubleCircle intersect",t,c,g),q.circle(t,c,g)},a}p(cf,"doublecircle");function hf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,c=U.svg(s),{nodeBorder:l}=r,h=G(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=c.circle(0,0,o*2,h),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${l} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),Z(t,f),t.intersect=function(d){return D.info("filledCircle intersect",t,{radius:o,point:d}),q.circle(t,o,d)},s}p(hf,"filledCircle");async function uf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=s.width+(t.padding??0),c=n+s.height,l=n+s.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:u}=t,f=U.svg(a),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=ht(h),m=f.path(g,d),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=n,t.height=c,Z(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-c/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(x){return D.info("Triangle intersect",t,h,x),q.polygon(t,h,x)},a}p(uf,"flippedTriangle");function df(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=V(t);t.label="";const o=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,u=-1*l/2,f=U.svg(o),d=G(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,c,l,d),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),Z(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return q.rect(t,x)},o}p(df,"forkJoin");async function ff(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=80,s=50,{shapeSvg:o,bbox:n}=await et(e,t,tt(t)),c=Math.max(a,n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s,n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/2,{cssStyles:u}=t,f=U.svg(o),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-c/2,y:-l/2},{x:c/2-h,y:-l/2},...Si(-c/2+h,0,h,50,90,270),{x:c/2-h,y:l/2},{x:-c/2,y:l/2}],m=ht(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Z(t,x),t.intersect=function(b){return D.info("Pill intersect",t,{radius:h,point:b}),q.polygon(t,g,b)},o}p(ff,"halfRoundedRectangle");var J2=p((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=4,n=s.height+t.padding,c=n/o,l=s.width+2*c+t.padding,h=[{x:c,y:0},{x:l-c,y:0},{x:l,y:-n/2},{x:l-c,y:-n},{x:c,y:-n},{x:0,y:-n/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=U.svg(a),g=G(t,{}),m=J2(0,0,l,n,c),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${n/2})`),f&&u.attr("style",f)}else u=De(a,l,n,h);return i&&u.attr("style",i),t.width=l,t.height=n,Z(t,u),t.intersect=function(d){return q.polygon(t,h,d)},a}p(pf,"hexagon");async function gf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await et(e,t,tt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,c=U.svg(a),l=G(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=ht(h),f=c.path(u,l),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-o/2})`),Z(t,d),t.intersect=function(g){return D.info("Pill intersect",t,{points:h}),q.polygon(t,h,g)},a}p(gf,"hourglass");async function mf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=t.pos==="t",d=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=qr(t),x=-g/2,b=-d/2,_=t.label?8:0,v=U.svg(l),S=G(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const C=v.rectangle(x,b,g,d,S),T=Math.max(g,h.width),F=d+h.height+_,P=v.rectangle(-T/2,-F/2,T,F,{...S,fill:"transparent",stroke:"none"}),R=l.insert(()=>C,":first-child"),$=l.insert(()=>P);if(t.icon){const z=l.append("g");z.html(`<g>${await Di(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const O=z.node().getBBox(),A=O.width,M=O.height,B=O.x,E=O.y;z.attr("transform",`translate(${-A/2-B},${f?h.height/2+_/2-M/2-E:-h.height/2-_/2-M/2-E})`),z.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-F/2:F/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),Z(t,$),t.intersect=function(z){if(D.info("iconSquare intersect",t,z),!t.label)return q.rect(t,z);const O=t.x??0,A=t.y??0,M=t.height??0;let B=[];return f?B=[{x:O-h.width/2,y:A-M/2},{x:O+h.width/2,y:A-M/2},{x:O+h.width/2,y:A-M/2+h.height+_},{x:O+g/2,y:A-M/2+h.height+_},{x:O+g/2,y:A+M/2},{x:O-g/2,y:A+M/2},{x:O-g/2,y:A-M/2+h.height+_},{x:O-h.width/2,y:A-M/2+h.height+_}]:B=[{x:O-g/2,y:A-M/2},{x:O+g/2,y:A-M/2},{x:O+g/2,y:A-M/2+d},{x:O+h.width/2,y:A-M/2+d},{x:O+h.width/2/2,y:A+M/2},{x:O-h.width/2,y:A+M/2},{x:O-h.width/2,y:A-M/2+d},{x:O-g/2,y:A-M/2+d}],q.polygon(t,B,z)},l}p(mf,"icon");async function yf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:u}=await et(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=qr(t),b=U.svg(l),_=G(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=x.get("fill");_.stroke=v??y;const S=l.append("g");t.icon&&S.html(`<g>${await Di(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const C=S.node().getBBox(),T=C.width,F=C.height,P=C.x,R=C.y,$=Math.max(T,F)*Math.SQRT2+f*2,z=b.circle(0,0,$,_),O=Math.max($,h.width),A=$+h.height+d,M=b.rectangle(-O/2,-A/2,O,A,{..._,fill:"transparent",stroke:"none"}),B=l.insert(()=>z,":first-child"),E=l.insert(()=>M);return S.attr("transform",`translate(${-T/2-P},${g?h.height/2+d/2-F/2-R:-h.height/2-d/2-F/2-R})`),S.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-A/2:A/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),Z(t,E),t.intersect=function(L){return D.info("iconSquare intersect",t,L),q.rect(t,L)},l}p(yf,"iconCircle");async function xf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=qr(t),_=-m/2,v=-g/2,S=t.label?8:0,C=U.svg(l),T=G(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const F=b.get("fill");T.stroke=F??x;const P=C.path(Ue(_,v,m,g,5),T),R=Math.max(m,h.width),$=g+h.height+S,z=C.rectangle(-R/2,-$/2,R,$,{...T,fill:"transparent",stroke:"none"}),O=l.insert(()=>P,":first-child").attr("class","icon-shape2"),A=l.insert(()=>z);if(t.icon){const M=l.append("g");M.html(`<g>${await Di(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),E=B.width,L=B.height,W=B.x,Y=B.y;M.attr("transform",`translate(${-E/2-W},${d?h.height/2+S/2-L/2-Y:-h.height/2-S/2-L/2-Y})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-$/2:$/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),Z(t,A),t.intersect=function(M){if(D.info("iconSquare intersect",t,M),!t.label)return q.rect(t,M);const B=t.x??0,E=t.y??0,L=t.height??0;let W=[];return d?W=[{x:B-h.width/2,y:E-L/2},{x:B+h.width/2,y:E-L/2},{x:B+h.width/2,y:E-L/2+h.height+S},{x:B+m/2,y:E-L/2+h.height+S},{x:B+m/2,y:E+L/2},{x:B-m/2,y:E+L/2},{x:B-m/2,y:E-L/2+h.height+S},{x:B-h.width/2,y:E-L/2+h.height+S}]:W=[{x:B-m/2,y:E-L/2},{x:B+m/2,y:E-L/2},{x:B+m/2,y:E-L/2+g},{x:B+h.width/2,y:E-L/2+g},{x:B+h.width/2/2,y:E+L/2},{x:B-h.width/2,y:E+L/2},{x:B-h.width/2,y:E-L/2+g},{x:B-m/2,y:E-L/2+g}],q.polygon(t,W,M)},l}p(xf,"iconRounded");async function bf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:u,label:f}=await et(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=qr(t),_=-m/2,v=-g/2,S=t.label?8:0,C=U.svg(l),T=G(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const F=b.get("fill");T.stroke=F??x;const P=C.path(Ue(_,v,m,g,.1),T),R=Math.max(m,h.width),$=g+h.height+S,z=C.rectangle(-R/2,-$/2,R,$,{...T,fill:"transparent",stroke:"none"}),O=l.insert(()=>P,":first-child"),A=l.insert(()=>z);if(t.icon){const M=l.append("g");M.html(`<g>${await Di(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),E=B.width,L=B.height,W=B.x,Y=B.y;M.attr("transform",`translate(${-E/2-W},${d?h.height/2+S/2-L/2-Y:-h.height/2-S/2-L/2-Y})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-$/2:$/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+S/2:-h.height/2-S/2})`),Z(t,A),t.intersect=function(M){if(D.info("iconSquare intersect",t,M),!t.label)return q.rect(t,M);const B=t.x??0,E=t.y??0,L=t.height??0;let W=[];return d?W=[{x:B-h.width/2,y:E-L/2},{x:B+h.width/2,y:E-L/2},{x:B+h.width/2,y:E-L/2+h.height+S},{x:B+m/2,y:E-L/2+h.height+S},{x:B+m/2,y:E+L/2},{x:B-m/2,y:E+L/2},{x:B-m/2,y:E-L/2+h.height+S},{x:B-h.width/2,y:E-L/2+h.height+S}]:W=[{x:B-m/2,y:E-L/2},{x:B+m/2,y:E-L/2},{x:B+m/2,y:E-L/2+g},{x:B+h.width/2,y:E-L/2+g},{x:B+h.width/2/2,y:E+L/2},{x:B-h.width/2,y:E+L/2},{x:B-h.width/2,y:E-L/2+g},{x:B-m/2,y:E-L/2+g}],q.polygon(t,W,M)},l}p(bf,"iconSquare");async function Cf(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=V(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??a),l=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(l,n??0);const{shapeSvg:u,bbox:f,label:d}=await et(e,t,"image-shape default"),g=t.pos==="t",m=-l/2,y=-h/2,x=t.label?8:0,b=U.svg(u),_=G(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(m,y,l,h,_),S=Math.max(l,f.width),C=h+f.height+x,T=b.rectangle(-S/2,-C/2,S,C,{..._,fill:"none",stroke:"none"}),F=u.insert(()=>v,":first-child"),P=u.insert(()=>T);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",l),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-l/2},${g?C/2-h:-C/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),F.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),Z(t,P),t.intersect=function(R){if(D.info("iconSquare intersect",t,R),!t.label)return q.rect(t,R);const $=t.x??0,z=t.y??0,O=t.height??0;let A=[];return g?A=[{x:$-f.width/2,y:z-O/2},{x:$+f.width/2,y:z-O/2},{x:$+f.width/2,y:z-O/2+f.height+x},{x:$+l/2,y:z-O/2+f.height+x},{x:$+l/2,y:z+O/2},{x:$-l/2,y:z+O/2},{x:$-l/2,y:z-O/2+f.height+x},{x:$-f.width/2,y:z-O/2+f.height+x}]:A=[{x:$-l/2,y:z-O/2},{x:$+l/2,y:z-O/2},{x:$+l/2,y:z-O/2+h},{x:$+f.width/2,y:z-O/2+h},{x:$+f.width/2/2,y:z+O/2},{x:$-f.width/2,y:z+O/2},{x:$-f.width/2,y:z-O/2+h},{x:$-l/2,y:z-O/2+h}],q.polygon(t,A,R)},u}p(Cf,"imageSquare");async function _f(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=U.svg(a),f=G(t,{}),d=ht(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=De(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,Z(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}p(_f,"inv_trapezoid");async function Ri(e,t,r){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await et(e,t,tt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),l=-n/2,h=-c/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=U.svg(s),y=G(t,{}),x=f||d?m.path(Ue(l,h,n,c,f||0),y):m.rectangle(l,h,n,c,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",zt(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",zt(f)).attr("ry",zt(d)).attr("x",l).attr("y",h).attr("width",n).attr("height",c);return Z(t,u),t.calcIntersect=function(m,y){return q.rect(m,y)},t.intersect=function(m){return q.rect(t,m)},s}p(Ri,"drawRect");async function kf(e,t){const{shapeSvg:r,bbox:i,label:a}=await et(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Z(t,s),t.intersect=function(c){return q.rect(t,c)},r}p(kf,"labelRect");async function wf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:-(3*n)/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=U.svg(a),f=G(t,{}),d=ht(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=De(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,Z(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}p(wf,"lean_left");async function Sf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*n/6,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=U.svg(a),f=G(t,{}),d=ht(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=De(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,Z(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}p(Sf,"lean_right");function vf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),c=7,l=[{x:o,y:0},{x:0,y:n+c/2},{x:o-2*c,y:n+c/2},{x:0,y:2*n},{x:o,y:n-c/2},{x:2*c,y:n-c/2}],h=U.svg(a),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ht(l),d=h.path(f,u),g=a.insert(()=>d,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),Z(t,g),t.intersect=function(m){return D.info("lightningBolt intersect",t,m),q.polygon(t,l,m)},a}p(vf,"lightningBolt");var tC=p((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),eC=p((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),rC=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0),t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(s.height+l+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=U.svg(a),m=eC(0,0,n,h,c,l,u),y=rC(0,l,n,h,c,l),x=G(t,{}),b=g.path(m,x),_=g.path(y,x);a.insert(()=>_,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=tC(0,0,n,h,c,l,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",zt(d)).attr("style",i)}return f.attr("label-offset-y",l),f.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),Z(t,f),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+l-(s.y-(s.top??0))})`),t.intersect=function(g){const m=q.rect(t,g),y=m.x-(t.x??0);if(c!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let x=l*l*(1-y*y/(c*c));x>0&&(x=Math.sqrt(x)),x=l-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}p(Tf,"linedCylinder");async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:u}=t,f=U.svg(a),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...He(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,l,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)-l/2-(s.y-(s.top??0))})`),Z(t,y),t.intersect=function(x){return q.polygon(t,g,x)},a}p(Bf,"linedWaveEdgedRect");async function Lf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-n/2,u=-c/2,{cssStyles:f}=t,d=U.svg(a),g=G(t,{}),m=[{x:h-l,y:u+l},{x:h-l,y:u+c+l},{x:h+n-l,y:u+c+l},{x:h+n-l,y:u+c},{x:h+n,y:u+c},{x:h+n,y:u+c-l},{x:h+n+l,y:u+c-l},{x:h+n+l,y:u-l},{x:h+l,y:u-l},{x:h+l,y:u},{x:h,y:u},{x:h,y:u+l}],y=[{x:h,y:u+l},{x:h+n-l,y:u+l},{x:h+n-l,y:u+c},{x:h+n,y:u+c},{x:h+n,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ht(m),b=d.path(x,g),_=ht(y),v=d.path(_,{...g,fill:"none"}),S=a.insert(()=>v,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-l-(s.x-(s.left??0))}, ${-(s.height/2)+l-(s.y-(s.top??0))})`),Z(t,S),t.intersect=function(C){return q.polygon(t,m,C)},a}p(Lf,"multiRect");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=c+l,u=-n/2,f=-h/2,d=5,{cssStyles:g}=t,m=He(u-d,f+h+d,u+n-d,f+h+d,l,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+n-d,y:y.y-d},{x:u+n,y:y.y-d},{x:u+n,y:y.y-2*d},{x:u+n+d,y:y.y-2*d},{x:u+n+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+n-d,y:f+d},{x:u+n-d,y:y.y-d},{x:u+n,y:y.y-d},{x:u+n,y:f},{x:u,y:f}],_=U.svg(a),v=G(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=ht(x),C=_.path(S,v),T=ht(b),F=_.path(T,v),P=a.insert(()=>C,":first-child");return P.insert(()=>F),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)+d-l/2-(s.y-(s.top??0))})`),Z(t,P),t.intersect=function(R){return q.polygon(t,x,R)},a}p(Af,"multiWaveEdgedRectangle");async function Mf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i,t.useHtmlLabels||Wt(Pt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:c}=await et(e,t,tt(t)),l=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-l/2,f=-h/2,{cssStyles:d}=t,g=U.svg(o),m=G(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,l,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,x),t.intersect=function(b){return q.rect(t,b)},o}p(Mf,"note");var iC=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 Ef(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding,n=s.height+t.padding,c=o+n,l=.5,h=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=U.svg(a),g=G(t,{}),m=iC(0,0,c),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2+l}, ${c/2})`),f&&u.attr("style",f)}else u=De(a,c,c,h),u.attr("transform",`translate(${-c/2+l}, ${c/2})`);return i&&u.attr("style",i),Z(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=q.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}p(Ef,"question");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,u=h/2,f=[{x:l+u,y:h},{x:l,y:0},{x:l+u,y:-h},{x:-l,y:-h},{x:-l,y:h}],{cssStyles:d}=t,g=U.svg(a),m=G(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ht(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Z(t,b),t.intersect=function(_){return q.polygon(t,f,_)},a}p($f,"rect_left_inv_arrow");async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=await Ie(n,l,t.labelStyle,!0,!0);let u={width:0,height:0};if(Wt(pt())){const F=h.children[0],P=ot(h);u=F.getBoundingClientRect(),P.attr("width",u.width),P.attr("height",u.height)}D.info("Text 2",c);const f=c||[],d=h.getBBox(),g=await Ie(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=g.children[0],y=ot(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ot(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),ot(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),_=u.height+(t.padding||0),v=-u.width/2-x,S=-u.height/2-x;let C,T;if(t.look==="handDrawn"){const F=U.svg(s),P=G(t,{}),R=F.path(Ue(v,S,b,_,t.rx||0),P),$=F.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,P);T=s.insert(()=>(D.debug("Rough node insert CXC",R),$),":first-child"),C=s.insert(()=>(D.debug("Rough node insert CXC",R),R),":first-child")}else C=o.insert("rect",":first-child"),T=o.insert("line"),C.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)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Z(t,C),t.intersect=function(F){return q.rect(t,F)},s}p(Ff,"rectWithTitle");async function Df(e,t){const r={rx:5,ry:5,labelPaddingX:((t==null?void 0:t.padding)||0)*1,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ri(e,t,r)}p(Df,"roundedRect");async function Of(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=(t==null?void 0:t.padding)??0,c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-s.width/2-n,u=-s.height/2-n,{cssStyles:f}=t,d=U.svg(a),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+c+8,y:u},{x:h+c+8,y:u+l},{x:h-8,y:u+l},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+l}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",zt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-c/2+4+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-(s.y-(s.top??0))})`),Z(t,x),t.intersect=function(b){return q.rect(t,b)},a}p(Of,"shadedProcess");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:u}=t,f=U.svg(a),d=G(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:l,y:h},{x:l,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-c/2}],m=ht(g),y=f.path(m,d),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))}, ${-c/4+(t.padding??0)-(s.y-(s.top??0))})`),Z(t,x),t.intersect=function(b){return q.polygon(t,g,b)},a}p(Rf,"slopedRect");async function If(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ri(e,t,r)}p(If,"squareRect");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.height+t.padding,n=s.width+o/4+t.padding,c=o/2,{cssStyles:l}=t,h=U.svg(a),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-n/2+c,y:-o/2},{x:n/2-c,y:-o/2},...Si(-n/2+c,0,c,50,90,270),{x:n/2-c,y:o/2},...Si(n/2-c,0,c,50,270,450)],d=ht(f),g=h.path(d,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Z(t,m),t.intersect=function(y){return q.polygon(t,f,y)},a}p(Pf,"stadium");async function Nf(e,t){return Ri(e,t,{rx:5,ry:5})}p(Nf,"state");function zf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=U.svg(l),u=G(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=n??c,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>f,":first-child");return m.insert(()=>g),s&&m.selectAll("path").attr("style",s),a&&m.selectAll("path").attr("style",a),Z(t,m),t.intersect=function(y){return q.circle(t,7,y)},l}p(zf,"stateEnd");function Wf(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const n=U.svg(a).circle(0,0,14,d1(i));s=a.insert(()=>n),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Z(t,s),t.intersect=function(o){return q.circle(t,7,o)},a}p(Wf,"stateStart");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=((t==null?void 0:t.padding)||0)/2,n=s.width+t.padding,c=s.height+t.padding,l=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:n,y:0},{x:n,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const f=U.svg(a),d=G(t,{}),g=f.rectangle(l-8,h,n+16,c,d),m=f.line(l,h,l,h+c,d),y=f.line(l+n,h,l+n,h+c,d);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",zt(b)),Z(t,x)}else{const f=De(a,n,c,u);i&&f.attr("style",i),Z(t,f)}return t.intersect=function(f){return q.polygon(t,u,f)},a}p(qf,"subroutine");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),n=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-o/2,l=-n/2,h=.2*n,u=.2*n,{cssStyles:f}=t,d=U.svg(a),g=G(t,{}),m=[{x:c-h/2,y:l},{x:c+o+h/2,y:l},{x:c+o+h/2,y:l+n},{x:c-h/2,y:l+n}],y=[{x:c+o-h/2,y:l+n},{x:c+o+h/2,y:l+n},{x:c+o+h/2,y:l+n-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ht(m),b=d.path(x,g),_=ht(y),v=d.path(_,{...g,fillStyle:"solid"}),S=a.insert(()=>v,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),Z(t,S),t.intersect=function(C){return q.polygon(t,m,C)},a}p(Hf,"taggedRect");async function jf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/4,h=.2*n,u=.2*c,f=c+l,{cssStyles:d}=t,g=U.svg(a),m=G(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...He(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,l,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-u*.4,_=[{x:x+n-h,y:(b+c)*1.4},{x:x+n,y:b+c-u},{x:x+n,y:(b+c)*.9},...He(x+n,(b+c)*1.3,x+n-h,(b+c)*1.5,-c*.03,.5)],v=ht(y),S=g.path(v,m),C=ht(_),T=g.path(C,{...m,fillStyle:"solid"}),F=a.insert(()=>T,":first-child");return F.insert(()=>S,":first-child"),F.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-l/2-(s.y-(s.top??0))})`),Z(t,F),t.intersect=function(P){return q.polygon(t,y,P)},a}p(jf,"taggedWaveEdgedRectangle");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=Math.max(s.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(s.height+t.padding,(t==null?void 0:t.height)||0),c=-o/2,l=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",o).attr("height",n),Z(t,h),t.intersect=function(u){return q.rect(t,u)},a}p(Yf,"text");var aC=p((e,t,r,i,a,s)=>`M${e},${t}
188
+ a${a},${s} 0,0,1 0,${-i}
189
+ l${r},0
190
+ a${a},${s} 0,0,1 0,${i}
191
+ M${r},${-i}
192
+ a${a},${s} 0,0,0 0,${i}
193
+ l${-r},0`,"createCylinderPathD"),sC=p((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),nC=p((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o,halfPadding:n}=await et(e,t,tt(t)),c=t.look==="neo"?n*2:n,l=s.height+c,h=l/2,u=h/(2.5+l/50),f=s.width+u+c,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=U.svg(a),y=sC(0,0,f,l,u,h),x=nC(0,0,f,l,u,h),b=m.path(y,G(t,{})),_=m.path(x,G(t,{fill:"none"}));g=a.insert(()=>_,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=aC(0,0,f,l,u,h);g=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",zt(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${l/2} )`),o.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Z(t,g),t.intersect=function(m){const y=q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}p(Uf,"tiltedCylinder");async function Gf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=s.width+t.padding,n=s.height+t.padding,c=[{x:-3*n/6,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=U.svg(a),f=G(t,{}),d=ht(c),g=u.path(d,f);l=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&l.attr("style",h)}else l=De(a,o,n,c);return i&&l.attr("style",i),t.width=o,t.height=n,Z(t,l),t.intersect=function(u){return q.polygon(t,c,u)},a}p(Gf,"trapezoid");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=60,n=20,c=Math.max(o,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=U.svg(a),f=G(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-c/2*.8,y:-l/2},{x:c/2*.8,y:-l/2},{x:c/2,y:-l/2*.6},{x:c/2,y:l/2},{x:-c/2,y:l/2},{x:-c/2,y:-l/2*.6}],g=ht(d),m=u.path(g,f),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Z(t,y),t.intersect=function(x){return q.polygon(t,d,x)},a}p(Vf,"trapezoidalPentagon");async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=t.useHtmlLabels||Wt(pt()),c=s.width+(t.padding??0),l=c+s.height,h=c+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:f}=t,d=U.svg(a),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ht(u),y=d.path(m,g),x=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=c,t.height=l,Z(t,x),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${l/2-(s.height+(t.padding??0)/(n?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(b){return D.info("Triangle intersect",t,u,b),q.polygon(t,u,b)},a}p(Xf,"triangle");async function Zf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:u}=t,d=70-n,g=d>0?d/2:0,m=U.svg(a),y=G(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-g,y:h/2},...He(-n/2-g,h/2,n/2+g,h/2,l,.8),{x:n/2+g,y:-h/2},{x:-n/2-g,y:-h/2}],b=ht(x),_=m.path(b,y),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-l-(s.y-(s.top??0))})`),Z(t,v),t.intersect=function(S){return q.polygon(t,x,S)},a}p(Zf,"waveEdgedRectangle");async function Kf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await et(e,t,tt(t)),o=100,n=50,c=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/l;let u=c,f=l;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,n);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=U.svg(a),x=G(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...He(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...He(u/2,-g/2,-u/2,-g/2,d,-1)],_=ht(b),v=y.path(_,x),S=a.insert(()=>v,":first-child");return S.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),Z(t,S),t.intersect=function(C){return q.polygon(t,b,C)},a}p(Kf,"waveRectangle");async function Qf(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await et(e,t,tt(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=5,h=-n/2,u=-c/2,{cssStyles:f}=t,d=U.svg(a),g=G(t,{}),m=[{x:h-l,y:u-l},{x:h-l,y:u+c},{x:h+n,y:u+c},{x:h+n,y:u-l}],y=`M${h-l},${u-l} L${h+n},${u-l} L${h+n},${u+c} L${h-l},${u+c} L${h-l},${u-l}
194
+ M${h-l},${u} L${h+n},${u}
195
+ M${h},${u-l} L${h},${u+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${l/2}, ${l/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)+l/2-(s.x-(s.left??0))}, ${-(s.height/2)+l/2-(s.y-(s.top??0))})`),Z(t,b),t.intersect=function(_){return q.polygon(t,m,_)},a}p(Qf,"windowPane");async function ko(e,t){var ut,at,xt,st;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:nt}=Pt(),{background:ct}=nt,mt={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await ko(e,mt)}const i=Pt();t.useHtmlLabels=i.htmlLabels;let a=((ut=i.er)==null?void 0:ut.diagramPadding)??10,s=((at=i.er)==null?void 0:at.entityPadding)??6;const{cssStyles:o}=t,{labelStyles:n,nodeStyles:c}=V(t);if(r.attributes.length===0&&t.label){const nt={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Ee(t.label,i)+nt.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const ct=await Ri(e,t,nt);if(!je(i.htmlLabels)){const mt=ct.select("text"),_t=(xt=mt.node())==null?void 0:xt.getBBox();mt.attr("transform",`translate(${-_t.width/2}, 0)`)}return ct}i.htmlLabels||(a*=1.25,s*=1.25);let l=tt(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),u=await _r(h,t.label??"",i,0,0,["name"],n);u.height+=s;let f=0;const d=[],g=[];let m=0,y=0,x=0,b=0,_=!0,v=!0;for(const nt of r.attributes){const ct=await _r(h,nt.type,i,0,f,["attribute-type"],n);m=Math.max(m,ct.width+a);const mt=await _r(h,nt.name,i,0,f,["attribute-name"],n);y=Math.max(y,mt.width+a);const _t=await _r(h,nt.keys.join(),i,0,f,["attribute-keys"],n);x=Math.max(x,_t.width+a);const bt=await _r(h,nt.comment,i,0,f,["attribute-comment"],n);b=Math.max(b,bt.width+a);const vt=Math.max(ct.height,mt.height,_t.height,bt.height)+s;g.push({yOffset:f,rowHeight:vt}),f+=vt}let S=4;x<=a&&(_=!1,x=0,S--),b<=a&&(v=!1,b=0,S--);const C=h.node().getBBox();if(u.width+a*2-(m+y+x+b)>0){const nt=u.width+a*2-(m+y+x+b);m+=nt/S,y+=nt/S,x>0&&(x+=nt/S),b>0&&(b+=nt/S)}const T=m+y+x+b,F=U.svg(h),P=G(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let R=0;g.length>0&&(R=g.reduce((nt,ct)=>nt+((ct==null?void 0:ct.rowHeight)??0),0));const $=Math.max(C.width+a*2,(t==null?void 0:t.width)||0,T),z=Math.max((R??0)+u.height,(t==null?void 0:t.height)||0),O=-$/2,A=-z/2;h.selectAll("g:not(:first-child)").each((nt,ct,mt)=>{const _t=ot(mt[ct]),bt=_t.attr("transform");let vt=0,oe=0;if(bt){const Oe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(bt);Oe&&(vt=parseFloat(Oe[1]),oe=parseFloat(Oe[2]),_t.attr("class").includes("attribute-name")?vt+=m:_t.attr("class").includes("attribute-keys")?vt+=m+y:_t.attr("class").includes("attribute-comment")&&(vt+=m+y+x))}_t.attr("transform",`translate(${O+a/2+vt}, ${oe+A+u.height+s/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(A+s/2)+")");const M=F.rectangle(O,A,$,z,P),B=h.insert(()=>M,":first-child").attr("style",o.join("")),{themeVariables:E}=Pt(),{rowEven:L,rowOdd:W,nodeBorder:Y}=E;d.push(0);for(const[nt,ct]of g.entries()){const _t=(nt+1)%2===0&&ct.yOffset!==0,bt=F.rectangle(O,u.height+A+(ct==null?void 0:ct.yOffset),$,ct==null?void 0:ct.rowHeight,{...P,fill:_t?L:W,stroke:Y});h.insert(()=>bt,"g.label").attr("style",o.join("")).attr("class",`row-rect-${_t?"even":"odd"}`)}let H=F.line(O,u.height+A,$+O,u.height+A,P);h.insert(()=>H).attr("class","divider"),H=F.line(m+O,u.height+A,m+O,z+A,P),h.insert(()=>H).attr("class","divider"),_&&(H=F.line(m+y+O,u.height+A,m+y+O,z+A,P),h.insert(()=>H).attr("class","divider")),v&&(H=F.line(m+y+x+O,u.height+A,m+y+x+O,z+A,P),h.insert(()=>H).attr("class","divider"));for(const nt of d)H=F.line(O,u.height+A+nt,$+O,u.height+A+nt,P),h.insert(()=>H).attr("class","divider");if(Z(t,B),c&&t.look!=="handDrawn"){const nt=c.split(";"),ct=(st=nt==null?void 0:nt.filter(mt=>mt.includes("stroke")))==null?void 0:st.map(mt=>`${mt}`).join("; ");h.selectAll("path").attr("style",ct??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(nt){return q.rect(t,nt)},h}p(ko,"erBox");async function _r(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==el(t)&&(t=el(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=n.node().appendChild(await Fe(n,t,{width:Ee(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=c.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 l=c.getBBox();if(je(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const u=ot(c);l=h.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}return l}p(_r,"addText");async function Jf(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",tt(t)).attr("id",t.domId||t.id);let n=null,c=null,l=null,h=null,u=0,f=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await li(n,{text:`«${b}»`},0),u=n.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await li(c,t,0,["font-weight: bolder"]);const g=c.node().getBBox();f=g.height,l=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await li(l,b,m,[b.parseClassifier()]);m+=_+s}d=l.node().getBBox().height,d<=0&&(d=a/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await li(h,b,y,[b.parseClassifier()]);y+=_+s}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+a*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+a*4:a*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Jf,"textHelper");async function li(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Pt();let o="useHtmlLabels"in t?t.useHtmlLabels:je(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),yi(n)&&(o=!0);const c=await Fe(a,In(Wr(n)),{width:Ee(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let l,h=1;if(o){const u=c.children[0],f=ot(c);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const _=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(_,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}l=u.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}else{i.includes("font-weight: bolder")&&ot(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const u=c.children[0];(c.textContent===""||c.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=""),l=c.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}p(li,"addText");async function tp(e,t){var P,R;const r=pt(),i=r.class.padding??12,a=i,s=t.useHtmlLabels??je(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:n,bbox:c}=await Jf(e,t,r,s,a),{labelStyles:l,nodeStyles:h}=V(t);t.labelStyle=l,t.cssStyles=o.styles||"";const u=((P=o.styles)==null?void 0:P.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),d=U.svg(n),g=G(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=c.width;let y=c.height;o.members.length===0&&o.methods.length===0?y+=a:o.members.length>0&&o.methods.length===0&&(y+=a*2);const x=-m/2,b=-y/2,_=d.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),v=n.insert(()=>_,":first-child");v.attr("class","basic label-container");const S=v.node().getBBox();n.selectAll(".text").each(($,z,O)=>{var W;const A=ot(O[z]),M=A.attr("transform");let B=0;if(M){const H=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);H&&(B=parseFloat(H[2]))}let E=B+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);s||(E-=4);let L=x;(A.attr("class").includes("label-group")||A.attr("class").includes("annotation-group"))&&(L=-((W=A.node())==null?void 0:W.getBBox().width)/2||0,n.selectAll("text").each(function(Y,H,ut){window.getComputedStyle(ut[H]).textAnchor==="middle"&&(L=0)})),A.attr("transform",`translate(${L}, ${E})`)});const C=n.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,T=n.select(".label-group").node().getBBox().height-(f?i/2:0)||0,F=n.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const $=d.line(S.x,C+T+b+i,S.x+S.width,C+T+b+i,g);n.insert(()=>$).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const $=d.line(S.x,C+T+F+b+a*2+i,S.x+S.width,C+T+F+b+i+a*2,g);n.insert(()=>$).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&n.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),n.selectAll(".divider").select("path").attr("style",u),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",u),!s){const $=RegExp(/color\s*:\s*([^;]*)/),z=$.exec(u);if(z){const O=z[0].replace("color","fill");n.selectAll("tspan").attr("style",O)}else if(l){const O=$.exec(l);if(O){const A=O[0].replace("color","fill");n.selectAll("tspan").attr("style",A)}}}return Z(t,v),t.intersect=function($){return q.rect(t,$)},n}p(tp,"classBox");async function ep(e,t){var C,T;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,c="verifyMethod"in t,l=tt(t),h=e.insert("g").attr("class",l).attr("id",t.domId??t.id);let u;c?u=await xe(h,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):u=await xe(h,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let f=u;const d=await xe(h,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+n,c){const F=await xe(h,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=F;const P=await xe(h,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=P;const R=await xe(h,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=R,await xe(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const F=await xe(h,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=F,await xe(h,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const g=(((C=h.node())==null?void 0:C.getBBox().width)??200)+o,m=(((T=h.node())==null?void 0:T.getBBox().height)??200)+o,y=-g/2,x=-m/2,b=U.svg(h),_=G(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(y,x,g,m,_),S=h.insert(()=>v,":first-child");if(S.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((F,P,R)=>{const $=ot(R[P]),z=$.attr("transform");let O=0,A=0;if(z){const L=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);L&&(O=parseFloat(L[1]),A=parseFloat(L[2]))}const M=A-m/2;let B=y+o/2;(P===0||P===1)&&(B=O),$.attr("transform",`translate(${B}, ${M+o})`)}),f>u+d+n){const F=b.line(y,x+u+d+n,y+g,x+u+d+n,_);h.insert(()=>F).attr("style",i)}return Z(t,S),t.intersect=function(F){return q.rect(t,F)},h}p(ep,"requirementBox");async function xe(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=pt(),o=s.htmlLabels??!0,n=await Fe(a,In(Wr(t)),{width:Ee(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let c;if(o){const l=n.children[0],h=ot(n);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=n.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);c=n.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(xe,"addText");var oC=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 rp(e,t,{config:r}){var z,O;const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:c,label:l}=await et(e,t,tt(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(u=(O=r==null?void 0:r.kanban)==null?void 0:O.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await Os(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await Os(n,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await Os(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,_=(t==null?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,S=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+v,C=-_/2,T=-S/2;l.attr("transform","translate("+(h-_/2)+", "+(-v-c.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-v+c.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*s)+", "+(-v+c.height/2)+")");let F;const{rx:P,ry:R}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const A=U.svg(n),M=G(t,{}),B=P||R?A.path(Ue(C,T,_,S,P||0),M):A.rectangle(C,T,_,S,M);F=n.insert(()=>B,":first-child"),F.attr("class","basic label-container").attr("style",$||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",a).attr("rx",P??5).attr("ry",R??5).attr("x",C).attr("y",T).attr("width",_).attr("height",S);const A="priority"in t&&t.priority;if(A){const M=n.append("line"),B=C+2,E=T+Math.floor((P??0)/2),L=T+S-Math.floor((P??0)/2);M.attr("x1",B).attr("y1",E).attr("x2",B).attr("y2",L).attr("stroke-width","4").attr("stroke",oC(A))}}return Z(t,F),t.height=S,t.intersect=function(A){return q.rect(t,A)},n}p(rp,"kanbanItem");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),c=s.width+10*o,l=s.height+8*o,h=.15*c,{cssStyles:u}=t,f=s.width+20,d=s.height+20,g=Math.max(c,f),m=Math.max(l,d);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const x=`M0 0
196
+ a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
197
+ a${h},${h} 1 0,0 ${g*.25},0
198
+ a${h},${h} 1 0,0 ${g*.25},0
199
+ a${h},${h} 1 0,0 ${g*.25},${m*.1}
200
+
201
+ a${h},${h} 1 0,0 ${g*.15},${m*.33}
202
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
203
+ a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
204
+
205
+ a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
206
+ a${h},${h} 1 0,0 ${-1*g*.25},0
207
+ a${h},${h} 1 0,0 ${-1*g*.25},0
208
+ a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
209
+
210
+ a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
211
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
212
+ a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
213
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=U.svg(a),_=G(t,{}),v=b.path(x,_);y=a.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",zt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Z(t,y),t.calcIntersect=function(b,_){return q.rect(b,_)},t.intersect=function(b){return D.info("Bang intersect",t,b),q.rect(t,b)},a}p(ip,"bang");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),c=s.width+2*o,l=s.height+2*o,h=.15*c,u=.25*c,f=.35*c,d=.2*c,{cssStyles:g}=t;let m;const y=`M0 0
214
+ a${h},${h} 0 0,1 ${c*.25},${-1*c*.1}
215
+ a${f},${f} 1 0,1 ${c*.4},${-1*c*.1}
216
+ a${u},${u} 1 0,1 ${c*.35},${c*.2}
217
+
218
+ a${h},${h} 1 0,1 ${c*.15},${l*.35}
219
+ a${d},${d} 1 0,1 ${-1*c*.15},${l*.65}
220
+
221
+ a${u},${h} 1 0,1 ${-1*c*.25},${c*.15}
222
+ a${f},${f} 1 0,1 ${-1*c*.5},0
223
+ a${h},${h} 1 0,1 ${-1*c*.25},${-1*c*.15}
224
+
225
+ a${h},${h} 1 0,1 ${-1*c*.1},${-1*l*.35}
226
+ a${d},${d} 1 0,1 ${c*.1},${-1*l*.65}
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=U.svg(a),b=G(t,{}),_=x.path(y,b);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",zt(g))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),m.attr("transform",`translate(${-c/2}, ${-l/2})`),Z(t,m),t.calcIntersect=function(x,b){return q.rect(x,b)},t.intersect=function(x){return D.info("Cloud intersect",t,x),q.rect(t,x)},a}p(ap,"cloud");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await et(e,t,tt(t)),c=s.width+8*o,l=s.height+2*o,h=5,u=`
228
+ M${-c/2} ${l/2-h}
229
+ v${-l+2*h}
230
+ q0,-${h} ${h},-${h}
231
+ h${c-2*h}
232
+ q${h},0 ${h},${h}
233
+ v${l-2*h}
234
+ q0,${h} -${h},${h}
235
+ h${-c+2*h}
236
+ q-${h},0 -${h},-${h}
237
+ Z
238
+ `,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",l/2).attr("x2",c/2).attr("y2",l/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),Z(t,f),t.calcIntersect=function(d,g){return q.rect(d,g)},t.intersect=function(d){return q.rect(t,d)},a}p(sp,"defaultMindmapNode");async function np(e,t){const r={padding:t.padding??0};return _o(e,t,r)}p(np,"mindmapCircle");var lC=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:If},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Df},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Pf},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:qf},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:of},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:_o},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ip},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ap},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ef},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Sf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:wf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Gf},{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:_f},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:cf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Yf},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Qd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Of},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Wf},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:zf},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:df},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:rf},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:af},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:sf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:vf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Zf},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ff},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Uf},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Tf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Xf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Qf},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:hf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Vf},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:uf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Rf},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Af},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Lf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Kd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ef},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jf},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Hf},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Kf},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:$f},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Bf}],cC=p(()=>{const t=[...Object.entries({state:Nf,choice:Jd,note:Mf,rectWithTitle:Ff,labelRect:kf,iconSquare:bf,iconCircle:yf,icon:mf,iconRounded:xf,imageSquare:Cf,anchor:Zd,kanbanItem:rp,mindmapCircle:np,defaultMindmapNode:sp,classBox:tp,erBox:ko,requirementBox:ep}),...lC.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),op=cC();function hC(e){return e in op}p(hC,"isValidShape");var ss=new Map;async function lp(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?op[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),ss.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(lp,"insertNode");var AS=p((e,t)=>{ss.set(t.id,e)},"setNodeElem"),MS=p(()=>{ss.clear()},"clear"),ES=p(e=>{const t=ss.get(e.id);D.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"),uC=p((e,t,r,i,a,s)=>{t.arrowTypeStart&&Xl(e,"start",t.arrowTypeStart,r,i,a,s),t.arrowTypeEnd&&Xl(e,"end",t.arrowTypeEnd,r,i,a,s)},"addEdgeMarkers"),dC={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Xl=p((e,t,r,i,a,s,o)=>{var u;const n=dC[r];if(!n){D.warn(`Unknown arrow type: ${r}`);return}const c=n.type,h=`${a}_${s}-${c}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){const g=document.getElementById(h);if(g){const m=g.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(x=>{x.setAttribute("stroke",o),n.fill&&x.setAttribute("fill",o)}),(u=g.parentNode)==null||u.appendChild(m)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),fC=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=pt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Pa=new Map,Dt=new Map,$S=p(()=>{Pa.clear(),Dt.clear()},"clear"),ai=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),pC=p(async(e,t)=>{const r=pt();let i=Wt(r);const{labelStyles:a}=V(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",l=await Fe(e,t.label,{style:ai(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(l),D.info("abc82",t,t.labelType);let h=l.getBBox(),u=h;if(i){const d=l.children[0],g=ot(l);h=d.getBoundingClientRect(),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const d=ot(l).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Qr(u,i)),Pa.set(t.id,s),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ie(g,t.startLabelLeft,ai(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ot(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Qr(y,i)),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).startLeft=d,ci(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ie(g,t.startLabelRight,ai(t.labelStyle)||"",!1,!1);f=m,g.node().appendChild(m);let y=m.getBBox();if(i){const x=m.children[0],b=ot(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Qr(y,i)),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).startRight=d,ci(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ie(g,t.endLabelLeft,ai(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ot(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Qr(y,i)),d.node().appendChild(m),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).endLeft=d,ci(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await Ie(g,t.endLabelRight,ai(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ot(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",Qr(y,i)),d.node().appendChild(m),Dt.get(t.id)||Dt.set(t.id,{}),Dt.get(t.id).endRight=d,ci(f,t.endLabelRight)}return l},"insertEdgeLabel");function ci(e,t){Wt(pt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(ci,"setTerminalWidth");var gC=p((e,t)=>{D.debug("Moving label abc88 ",e.id,e.label,Pa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=pt(),{subGraphTitleTotalMargin:a}=oo(i);if(e.label){const s=Pa.get(e.id);let o=e.x,n=e.y;if(r){const c=he.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",o,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(o=c.x,n=c.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=Dt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const c=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=Dt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const c=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=Dt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const c=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=Dt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const c=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=c.x,n=c.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),mC=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),yC=p((e,t,r)=>{D.debug(`intersection calc abc89:
239
+ outsidePoint: ${JSON.stringify(t)}
240
+ insidePoint : ${JSON.stringify(r)}
241
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-a:a-c-t.y;n=h*u/l;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+l-u:r.y-l+u};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),l===0&&(f.y=t.y),D.debug(`abc89 top/bottom calc, Q ${l}, q ${u}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=l*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return D.debug(`sides calc abc89, Q ${l}, q ${u}, R ${h}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),h===0&&(f=t.x),l===0&&(d=t.y),{x:f,y:d}}},"intersection"),Zl=p((e,t)=>{D.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(D.info("abc88 checking point",s,t),!mC(t,s)&&!a){const o=yC(t,i,s);D.debug("abc88 inside",s,i,o),D.debug("abc88 intersection",o,t);let n=!1;r.forEach(c=>{n=n||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?D.warn("abc88 no intersect",o,r):r.push(o),a=!0}else D.warn("abc88 outside",s,i),i=s,a||r.push(s)}),D.debug("returning points",r),r},"cutPathAtIntersect");function cp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(cp,"extractCornerPoints");var Kl=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),xC=p(function(e){const{cornerPointPositions:t}=cp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=Kl(a,o,5),c=Kl(s,o,5),l=c.x-n.x,h=c.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){D.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const d=5;o.x===n.x?f={x:l<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:f={x:l<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else D.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),bC=p((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),c=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),CC=p(function(e,t,r,i,a,s,o,n=!1){var B;const{handDrawnSeed:c}=pt();let l=t.points,h=!1;const u=a;var f=s;const d=[];for(const E in t.cssCompiledStyles)ld(E)||d.push(t.cssCompiledStyles[E]);D.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!n&&(l=l.slice(1,t.points.length-1),l.unshift(u.intersect(l[0])),D.debug("Last point UIO",t.start,"-->",t.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1])));const g=btoa(JSON.stringify(l));t.toCluster&&(D.info("to cluster abc88",r.get(t.toCluster)),l=Zl(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(D.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Zl(l.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=l.filter(E=>!Number.isNaN(E.y));const y=fC(t.curve);y!=="rounded"&&(m=xC(m));let x=pi;switch(y){case"linear":x=pi;break;case"basis":x=Gs;break;case"cardinal":x=qc;break;case"bumpX":x=Ic;break;case"bumpY":x=Pc;break;case"catmullRom":x=jc;break;case"monotoneX":x=Zc;break;case"monotoneY":x=Kc;break;case"natural":x=Jc;break;case"step":x=th;break;case"stepAfter":x=rh;break;case"stepBefore":x=eh;break;case"rounded":x=pi;break;default:x=Gs}const{x:b,y:_}=m0(t),v=Jm().x(b).y(_).curve(x);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let C,T=y==="rounded"?hp(up(m,t),5):v(m);const F=Array.isArray(t.style)?t.style:[t.style];let P=F.find(E=>E==null?void 0:E.startsWith("stroke:")),R="";t.animate&&(R="edge-animation-fast"),t.animation&&(R="edge-animation-"+t.animation);let $=!1;if(t.look==="handDrawn"){const E=U.svg(e);Object.assign([],m);const L=E.path(T,{roughness:.3,seed:c});S+=" transition",C=ot(L).select("path").attr("id",t.id).attr("class"," "+S+(t.classes?" "+t.classes:"")+(R?" "+R:"")).attr("style",F?F.reduce((Y,H)=>Y+";"+H,""):"");let W=C.attr("d");C.attr("d",W),e.node().appendChild(C.node())}else{const E=d.join(";"),L=F?F.reduce((xt,st)=>xt+st+";",""):"",W=(E?E+";"+L+";":L)+";"+(F?F.reduce((xt,st)=>xt+";"+st,""):"");C=e.append("path").attr("d",T).attr("id",t.id).attr("class"," "+S+(t.classes?" "+t.classes:"")+(R?" "+R:"")).attr("style",W),P=(B=W.match(/stroke:([^;]+)/))==null?void 0:B[1],$=t.animate===!0||!!t.animation||E.includes("animation");const Y=C.node(),H=typeof Y.getTotalLength=="function"?Y.getTotalLength():0,ut=dl[t.arrowTypeStart]||0,at=dl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const st=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?bC(H,ut,at):`0 ${ut} ${H-ut-at} ${at}`}; stroke-dashoffset: 0;`;C.attr("style",st+C.attr("style"))}}C.attr("data-edge",!0),C.attr("data-et","edge"),C.attr("data-id",t.id),C.attr("data-points",g),t.showPoints&&m.forEach(E=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",E.x).attr("cy",E.y)});let z="";(pt().flowchart.arrowMarkerAbsolute||pt().state.arrowMarkerAbsolute)&&(z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,z=z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",t.arrowTypeStart),D.info("arrowTypeEnd",t.arrowTypeEnd),uC(C,t,z,o,i,P);const O=Math.floor(l.length/2),A=l[O];he.isLabelCoordinateInPath(A,C.attr("d"))||(h=!0);let M={};return h&&(M.updatedPath=l),M.originalPath=t.points,M},"insertEdge");function hp(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],c=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const l=o.x-n.x,h=o.y-n.y,u=c.x-o.x,f=c.y-o.y,d=Math.hypot(l,h),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=l/d,y=h/d,x=u/g,b=f/g,_=m*x+y*b,v=Math.max(-1,Math.min(1,_)),S=Math.acos(v);if(S<a||Math.abs(Math.PI-S)<a){r+=`L${o.x},${o.y}`;continue}const C=Math.min(t/Math.sin(S/2),d/2,g/2),T=o.x-m*C,F=o.y-y*C,P=o.x+x*C,R=o.y+b*C;r+=`L${T},${F}`,r+=`Q${o.x},${o.y} ${P},${R}`}}return r}p(hp,"generateRoundedPath");function kn(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(kn,"calculateDeltaAndAngle");function up(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&It[t.arrowTypeStart]){const a=It[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=kn(s,o),c=a*Math.cos(n),l=a*Math.sin(n);r[0].x=s.x+c,r[0].y=s.y+l}const i=e.length;if(i>=2&&It[t.arrowTypeEnd]){const a=It[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=kn(o,s),c=a*Math.cos(n),l=a*Math.sin(n);r[i-1].x=s.x-c,r[i-1].y=s.y-l}return r}p(up,"applyMarkerOffsetsToPoints");var _C=p((e,t,r,i)=>{t.forEach(a=>{IC[a](e,r,i)})},"insertMarkers"),kC=p((e,t,r)=>{D.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),wC=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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),SC=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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),vC=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").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),TC=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").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").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),BC=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")},"point"),LC=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")},"circle"),AC=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")},"cross"),MC=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"),EC=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"),$C=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 a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),FC=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"),DC=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 a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),OC=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
242
+ L20,10
243
+ M20,10
244
+ L0,20`)},"requirement_arrow"),RC=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"),IC={extension:kC,composition:wC,aggregation:SC,dependency:vC,lollipop:TC,point:BC,circle:LC,cross:AC,barb:MC,only_one:EC,zero_or_one:$C,one_or_more:FC,zero_or_more:DC,requirement_arrow:OC,requirement_contains:RC},PC=_C,NC={common:Ai,getConfig:Pt,insertCluster:Y2,insertEdge:CC,insertEdgeLabel:pC,insertMarkers:PC,insertNode:lp,interpolateToCurve:eo,labelHelper:et,log:D,positionEdgeLabel:gC},vi={},dp=p(e=>{for(const t of e)vi[t.name]=t},"registerLayoutLoaders"),zC=p(()=>{dp([{name:"dagre",loader:p(async()=>await dt(()=>import("./dagre-KLK3FWXG-3pyNBzWY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await dt(()=>import("./cose-bilkent-S5V4N54A-B1M1ENTo.js"),__vite__mapDeps([8,9,6,7])),"loader")}])},"registerDefaultLayoutLoaders");zC();var FS=p(async(e,t)=>{if(!(e.layoutAlgorithm in vi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=vi[e.layoutAlgorithm];return(await r.loader()).render(e,t,NC,{algorithm:r.algorithm})},"render"),DS=p((e="",{fallback:t="dagre"}={})=>{if(e in vi)return e;if(t in vi)return D.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"),fp="comm",pp="rule",gp="decl",WC="@import",qC="@namespace",HC="@keyframes",jC="@layer",mp=Math.abs,wo=String.fromCharCode;function yp(e){return e.trim()}function la(e,t,r){return e.replace(t,r)}function YC(e,t,r){return e.indexOf(t,r)}function Sr(e,t){return e.charCodeAt(t)|0}function Ir(e,t,r){return e.slice(t,r)}function be(e){return e.length}function UC(e){return e.length}function Ki(e,t){return t.push(e),e}var ns=1,Pr=1,xp=0,ne=0,Bt=0,jr="";function So(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:ns,column:Pr,length:o,return:"",siblings:n}}function GC(){return Bt}function VC(){return Bt=ne>0?Sr(jr,--ne):0,Pr--,Bt===10&&(Pr=1,ns--),Bt}function de(){return Bt=ne<xp?Sr(jr,ne++):0,Pr++,Bt===10&&(Pr=1,ns++),Bt}function Pe(){return Sr(jr,ne)}function ca(){return ne}function os(e,t){return Ir(jr,e,t)}function Ti(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 XC(e){return ns=Pr=1,xp=be(jr=e),ne=0,[]}function ZC(e){return jr="",e}function Rs(e){return yp(os(ne-1,wn(e===91?e+2:e===40?e+1:e)))}function KC(e){for(;(Bt=Pe())&&Bt<33;)de();return Ti(e)>2||Ti(Bt)>3?"":" "}function QC(e,t){for(;--t&&de()&&!(Bt<48||Bt>102||Bt>57&&Bt<65||Bt>70&&Bt<97););return os(e,ca()+(t<6&&Pe()==32&&de()==32))}function wn(e){for(;de();)switch(Bt){case e:return ne;case 34:case 39:e!==34&&e!==39&&wn(Bt);break;case 40:e===41&&wn(e);break;case 92:de();break}return ne}function JC(e,t){for(;de()&&e+Bt!==57;)if(e+Bt===84&&Pe()===47)break;return"/*"+os(t,ne-1)+"*"+wo(e===47?e:de())}function t_(e){for(;!Ti(Pe());)de();return os(e,ne)}function e_(e){return ZC(ha("",null,null,null,[""],e=XC(e),0,[0],e))}function ha(e,t,r,i,a,s,o,n,c){for(var l=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",v=a,S=s,C=i,T=_;y;)switch(g=b,b=de()){case 40:if(g!=108&&Sr(T,u-1)==58){YC(T+=la(Rs(b),"&","&\f"),"&\f",mp(l?n[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=Rs(b);break;case 9:case 10:case 13:case 32:T+=KC(g);break;case 92:T+=QC(ca()-1,7);continue;case 47:switch(Pe()){case 42:case 47:Ki(r_(JC(de(),ca()),t,r,c),c),(Ti(g||1)==5||Ti(Pe()||1)==5)&&be(T)&&Ir(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[l++]=be(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=la(T,/\f/g,"")),d>0&&(be(T)-u||m===0&&g===47)&&Ki(d>32?Jl(T+";",i,r,u-1,c):Jl(la(T," ","")+";",i,r,u-2,c),c);break;case 59:T+=";";default:if(Ki(C=Ql(T,t,r,l,h,a,n,_,v=[],S=[],u,s),s),b===123)if(h===0)ha(T,t,C,C,v,s,u,n,S);else{switch(f){case 99:if(Sr(T,3)===110)break;case 108:if(Sr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ha(e,C,C,i&&Ki(Ql(e,C,C,0,0,a,n,_,a,v=[],u,S),S),a,S,u,n,i?v:S):ha(T,C,C,C,[""],S,0,n,S)}}l=h=d=0,m=x=1,_=T="",u=o;break;case 58:u=1+be(T),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&VC()==125)continue}switch(T+=wo(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:n[l++]=(be(T)-1)*x,x=1;break;case 64:Pe()===45&&(T+=Rs(de())),f=Pe(),h=u=be(_=T+=t_(ca())),b++;break;case 45:g===45&&be(T)==2&&(m=0)}}return s}function Ql(e,t,r,i,a,s,o,n,c,l,h,u){for(var f=a-1,d=a===0?s:[""],g=UC(d),m=0,y=0,x=0;m<i;++m)for(var b=0,_=Ir(e,f+1,f=mp(y=o[m])),v=e;b<g;++b)(v=yp(y>0?d[b]+" "+_:la(_,/&\f/g,d[b])))&&(c[x++]=v);return So(e,t,r,a===0?pp:n,c,l,h,u)}function r_(e,t,r,i){return So(e,t,r,fp,wo(GC()),Ir(e,2,-2),0,i)}function Jl(e,t,r,i,a){return So(e,t,r,gp,Ir(e,0,i),Ir(e,i+1,-1),i,a)}function Sn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function i_(e,t,r,i){switch(e.type){case jC:if(e.children.length)break;case WC:case qC:case gp:return e.return=e.return||e.value;case fp:return"";case HC:return e.return=e.value+"{"+Sn(e.children,i)+"}";case pp:if(!be(e.value=e.props.join(",")))return""}return be(r=Sn(e.children,i))?e.return=e.value+"{"+r+"}":""}var a_=Wu(Object.keys,Object),s_=Object.prototype,n_=s_.hasOwnProperty;function o_(e){if(!Ka(e))return a_(e);var t=[];for(var r in Object(e))n_.call(e,r)&&r!="constructor"&&t.push(r);return t}var vn=ur(ke,"DataView"),Tn=ur(ke,"Promise"),Bn=ur(ke,"Set"),Ln=ur(ke,"WeakMap"),tc="[object Map]",l_="[object Object]",ec="[object Promise]",rc="[object Set]",ic="[object WeakMap]",ac="[object DataView]",c_=hr(vn),h_=hr(wi),u_=hr(Tn),d_=hr(Bn),f_=hr(Ln),Qe=Nr;(vn&&Qe(new vn(new ArrayBuffer(1)))!=ac||wi&&Qe(new wi)!=tc||Tn&&Qe(Tn.resolve())!=ec||Bn&&Qe(new Bn)!=rc||Ln&&Qe(new Ln)!=ic)&&(Qe=function(e){var t=Nr(e),r=t==l_?e.constructor:void 0,i=r?hr(r):"";if(i)switch(i){case c_:return ac;case h_:return tc;case u_:return ec;case d_:return rc;case f_:return ic}return t});var p_="[object Map]",g_="[object Set]",m_=Object.prototype,y_=m_.hasOwnProperty;function sc(e){if(e==null)return!0;if(Qa(e)&&(La(e)||typeof e=="string"||typeof e.splice=="function"||Jn(e)||to(e)||Ba(e)))return!e.length;var t=Qe(e);if(t==p_||t==g_)return!e.size;if(Ka(e))return!o_(e).length;for(var r in e)if(y_.call(e,r))return!1;return!0}var bp="c4",x_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./c4Diagram-IC4MRINW-CI4Z5c6N.js");return{diagram:t}},__vite__mapDeps([10,11,6,7]));return{id:bp,diagram:e}},"loader"),C_={id:bp,detector:x_,loader:b_},__=C_,Cp="flowchart",k_=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),w_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-CuoB0thO.js");return{diagram:t}},__vite__mapDeps([12,13,11,6,7,14,15,16]));return{id:Cp,diagram:e}},"loader"),S_={id:Cp,detector:k_,loader:w_},v_=S_,_p="flowchart-v2",T_=p((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),B_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-CuoB0thO.js");return{diagram:t}},__vite__mapDeps([12,13,11,6,7,14,15,16]));return{id:_p,diagram:e}},"loader"),L_={id:_p,detector:T_,loader:B_},A_=L_,kp="er",M_=p(e=>/^\s*erDiagram/.test(e),"detector"),E_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./erDiagram-INFDFZHY-BhVWsRrc.js");return{diagram:t}},__vite__mapDeps([17,14,6,7,15,16]));return{id:kp,diagram:e}},"loader"),$_={id:kp,detector:M_,loader:E_},F_=$_,wp="gitGraph",D_=p(e=>/^\s*gitGraph/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-K3NZZRJ6-DfEhHzOH.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,6,7,2,4,5]));return{id:wp,diagram:e}},"loader"),R_={id:wp,detector:D_,loader:O_},I_=R_,Sp="gantt",P_=p(e=>/^\s*gantt/.test(e),"detector"),N_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./ganttDiagram-A5KZAMGK-yNNalQY9.js");return{diagram:t}},__vite__mapDeps([22,6,7,23,24,25]));return{id:Sp,diagram:e}},"loader"),z_={id:Sp,detector:P_,loader:N_},W_=z_,vp="info",q_=p(e=>/^\s*info/.test(e),"detector"),H_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./infoDiagram-LFFYTUFH-CDAMAxDE.js");return{diagram:t}},__vite__mapDeps([26,21,6,7,2,4,5]));return{id:vp,diagram:e}},"loader"),j_={id:vp,detector:q_,loader:H_},Tp="pie",Y_=p(e=>/^\s*pie/.test(e),"detector"),U_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./pieDiagram-SKSYHLDU-BULUJrhI.js");return{diagram:t}},__vite__mapDeps([27,19,21,6,7,2,4,5,28,29,24]));return{id:Tp,diagram:e}},"loader"),G_={id:Tp,detector:Y_,loader:U_},Bp="quadrantChart",V_=p(e=>/^\s*quadrantChart/.test(e),"detector"),X_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./quadrantDiagram-337W2JSQ-CWQC3mf-.js");return{diagram:t}},__vite__mapDeps([30,6,7,23,24,25]));return{id:Bp,diagram:e}},"loader"),Z_={id:Bp,detector:V_,loader:X_},K_=Z_,Lp="xychart",Q_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),J_=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./xychartDiagram-JWTSCODW-A3enOtVP.js");return{diagram:t}},__vite__mapDeps([31,6,7,24,29,23,25]));return{id:Lp,diagram:e}},"loader"),tk={id:Lp,detector:Q_,loader:J_},ek=tk,Ap="requirement",rk=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),ik=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./requirementDiagram-Z7DCOOCP-CYadvMn7.js");return{diagram:t}},__vite__mapDeps([32,14,6,7,15]));return{id:Ap,diagram:e}},"loader"),ak={id:Ap,detector:rk,loader:ik},sk=ak,Mp="sequence",nk=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),ok=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./sequenceDiagram-2WXFIKYE-CeWKKFdg.js");return{diagram:t}},__vite__mapDeps([33,11,6,7,20]));return{id:Mp,diagram:e}},"loader"),lk={id:Mp,detector:nk,loader:ok},ck=lk,Ep="class",hk=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),uk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./classDiagram-VBA2DB6C-DHkm1twH.js");return{diagram:t}},__vite__mapDeps([34,35,13,11,6,7,14,15]));return{id:Ep,diagram:e}},"loader"),dk={id:Ep,detector:hk,loader:uk},fk=dk,$p="classDiagram",pk=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),gk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./classDiagram-v2-RAHNMMFH-DHkm1twH.js");return{diagram:t}},__vite__mapDeps([36,35,13,11,6,7,14,15]));return{id:$p,diagram:e}},"loader"),mk={id:$p,detector:pk,loader:gk},yk=mk,Fp="state",xk=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),bk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./stateDiagram-RAJIS63D-BvN-wCps.js");return{diagram:t}},__vite__mapDeps([37,38,14,6,7,15,1,2,3,4]));return{id:Fp,diagram:e}},"loader"),Ck={id:Fp,detector:xk,loader:bk},_k=Ck,Dp="stateDiagram",kk=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),wk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-FVOUBMTO-BV7kxiIj.js");return{diagram:t}},__vite__mapDeps([39,38,14,6,7,15]));return{id:Dp,diagram:e}},"loader"),Sk={id:Dp,detector:kk,loader:wk},vk=Sk,Op="journey",Tk=p(e=>/^\s*journey/.test(e),"detector"),Bk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./journeyDiagram-4ABVD52K-DtuQQjW_.js");return{diagram:t}},__vite__mapDeps([40,13,11,6,7,28]));return{id:Op,diagram:e}},"loader"),Lk={id:Op,detector:Tk,loader:Bk},Ak=Lk,Mk=p((e,t,r)=>{D.debug(`rendering svg for syntax error
245
+ `);const i=ly(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),$c(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Rp={draw:Mk},Ek=Rp,$k={db:{},renderer:Rp,parser:{parse:p(()=>{},"parse")}},Fk=$k,Ip="flowchart-elk",Dk=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),Ok=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-CuoB0thO.js");return{diagram:t}},__vite__mapDeps([12,13,11,6,7,14,15,16]));return{id:Ip,diagram:e}},"loader"),Rk={id:Ip,detector:Dk,loader:Ok},Ik=Rk,Pp="timeline",Pk=p(e=>/^\s*timeline/.test(e),"detector"),Nk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./timeline-definition-YZTLITO2-DOLRfgbL.js");return{diagram:t}},__vite__mapDeps([41,6,7,28]));return{id:Pp,diagram:e}},"loader"),zk={id:Pp,detector:Pk,loader:Nk},Wk=zk,Np="mindmap",qk=p(e=>/^\s*mindmap/.test(e),"detector"),Hk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./mindmap-definition-YRQLILUH-CL8mKZYJ.js");return{diagram:t}},__vite__mapDeps([42,14,6,7,15]));return{id:Np,diagram:e}},"loader"),jk={id:Np,detector:qk,loader:Hk},Yk=jk,zp="kanban",Uk=p(e=>/^\s*kanban/.test(e),"detector"),Gk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./kanban-definition-K7BYSVSG-DYGt44vU.js");return{diagram:t}},__vite__mapDeps([43,13,6,7]));return{id:zp,diagram:e}},"loader"),Vk={id:zp,detector:Uk,loader:Gk},Xk=Vk,Wp="sankey",Zk=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Kk=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./sankeyDiagram-WA2Y5GQK-e2AhGJiF.js");return{diagram:t}},__vite__mapDeps([44,6,7,29,24]));return{id:Wp,diagram:e}},"loader"),Qk={id:Wp,detector:Zk,loader:Kk},Jk=Qk,qp="packet",tw=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),ew=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-P4PSJMXO-B5KRvZqb.js");return{diagram:t}},__vite__mapDeps([45,19,21,6,7,2,4,5]));return{id:qp,diagram:e}},"loader"),rw={id:qp,detector:tw,loader:ew},Hp="radar",iw=p(e=>/^\s*radar-beta/.test(e),"detector"),aw=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-IFDJBPK2-CTx5NFFi.js");return{diagram:t}},__vite__mapDeps([46,19,21,6,7,2,4,5]));return{id:Hp,diagram:e}},"loader"),sw={id:Hp,detector:iw,loader:aw},jp="block",nw=p(e=>/^\s*block(-beta)?/.test(e),"detector"),ow=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./blockDiagram-WCTKOSBZ-DGkYzINJ.js");return{diagram:t}},__vite__mapDeps([47,13,5,2,6,7,1,16]));return{id:jp,diagram:e}},"loader"),lw={id:jp,detector:nw,loader:ow},cw=lw,Yp="architecture",hw=p(e=>/^\s*architecture/.test(e),"detector"),uw=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./architectureDiagram-2XIMDMQ5-CcV5llaa.js");return{diagram:t}},__vite__mapDeps([48,19,21,6,7,2,4,5,9]));return{id:Yp,diagram:e}},"loader"),dw={id:Yp,detector:hw,loader:uw},fw=dw,Up="ishikawa",pw=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),gw=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-PHBUUO56-DMRl5xeW.js");return{diagram:t}},__vite__mapDeps([49,6,7]));return{id:Up,diagram:e}},"loader"),mw={id:Up,detector:pw,loader:gw},Gp="venn",yw=p(e=>/^\s*venn-beta/.test(e),"detector"),xw=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./vennDiagram-LZ73GAT5-Dt-knC6b.js");return{diagram:t}},__vite__mapDeps([50,6,7]));return{id:Gp,diagram:e}},"loader"),bw={id:Gp,detector:yw,loader:xw},Cw=bw,Vp="treemap",_w=p(e=>/^\s*treemap/.test(e),"detector"),kw=p(async()=>{const{diagram:e}=await dt(async()=>{const{diagram:t}=await import("./diagram-E7M64L7V-B5-5pbKh.js");return{diagram:t}},__vite__mapDeps([51,15,19,21,6,7,2,4,5,25,29,24]));return{id:Vp,diagram:e}},"loader"),ww={id:Vp,detector:_w,loader:kw},nc=!1,ls=p(()=>{nc||(nc=!0,ga("error",Fk,e=>e.toLowerCase().trim()==="error"),ga("---",{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("---")),zs(Ik,Yk,fw),zs(__,Xk,yk,fk,F_,W_,j_,G_,sk,ck,A_,v_,Wk,I_,vk,_k,Ak,K_,Jk,rw,ek,cw,sw,mw,ww,Cw))},"addDiagrams"),Sw=p(async()=>{D.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ir).map(async([r,{detector:i,loader:a}])=>{if(a)try{js(r)}catch{try{const{diagram:s,id:o}=await a();ga(o,s,i)}catch(s){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ir[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){D.error(`Failed to load ${t.length} external diagrams`);for(const r of t)D.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),vw="graphics-document document";function Xp(e,t){e.attr("role",vw),t!==""&&e.attr("aria-roledescription",t)}p(Xp,"setA11yDiagramInfo");function Zp(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Zp,"addSVGa11yTitleDescription");var rr,An=(rr=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var l,h;const i=Pt(),a=$n(t,i);t=u1(t)+`
246
+ `;try{js(a)}catch{const u=Jg(a);if(!u)throw new xc(`Diagram ${a} not found.`);const{id:f,diagram:d}=await u();ga(f,d)}const{db:s,parser:o,renderer:n,init:c}=js(a);return o.parser&&(o.parser.yy=s),(l=s.clear)==null||l.call(s),c==null||c(i),r.title&&((h=s.setDiagramTitle)==null||h.call(s,r.title)),await o.parse(t),new rr(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(rr,"Diagram"),rr),oc=[],Tw=p(()=>{oc.forEach(e=>{e()}),oc=[]},"attachFunctions"),Bw=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Kp(e){const t=e.match(yc);if(!t)return{text:e,metadata:{}};let r=g0(t[1],{schema:p0})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Kp,"extractFrontMatter");var Lw=p(e=>e.replace(/\r\n?/g,`
247
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Aw=p(e=>{const{text:t,metadata:r}=Kp(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),Mw=p(e=>{const t=he.detectInit(e)??{},r=he.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Qb(e),directive:t}},"processDirectives");function vo(e){const t=Lw(e),r=Aw(t),i=Mw(r.text),a=no(r.config,i.directive);return e=Bw(i.text),{code:e,title:r.title,config:a}}p(vo,"preprocessDiagram");function Qp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Qp,"toBase64");var Ew=5e4,$w="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Fw="sandbox",Dw="loose",Ow="http://www.w3.org/2000/svg",Rw="http://www.w3.org/1999/xlink",Iw="http://www.w3.org/1999/xhtml",Pw="100%",Nw="100%",zw="border:0;margin:0;",Ww="margin:0",qw="allow-top-navigation-by-user-activation allow-popups",Hw='The "iframe" tag is not supported by your browser.',jw=["foreignobject"],Yw=["dominant-baseline"];function To(e){const t=vo(e);return fa(),gm(t.config??{}),t}p(To,"processAndSetConfigs");async function Jp(e,t){ls();try{const{code:r,config:i}=To(e);return{diagramType:(await eg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Jp,"parse");var lc=p((e,t,r=[])=>`
248
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Uw=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
249
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
250
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
251
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=Wt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(n=>{sc(n.styles)||o.forEach(c=>{r+=lc(n.id,c,n.styles)}),sc(n.textStyles)||(r+=lc(n.id,"tspan",((n==null?void 0:n.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),Gw=p((e,t,r,i)=>{const a=Uw(e,r),s=Dm(t,a,e.themeVariables);return Sn(e_(`${i}{${s}}`),i_)},"createUserStyles"),Vw=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"),Xw=p((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":Nw,i=Qp(`<body style="${Ww}">${e}</body>`);return`<iframe style="width:${Pw};height:${r};${zw}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${qw}">
252
+ ${Hw}
253
+ </iframe>`},"putIntoIFrame"),cc=p((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Ow);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function Mn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Mn,"sandboxedIframe");var Zw=p((e,t,r,i)=>{var a,s,o;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),Kw=p(async function(e,t,r){var z,O,A,M,B,E;ls();const i=To(t);t=i.code;const a=Pt();D.debug(a),t.length>((a==null?void 0:a.maxTextSize)??Ew)&&(t=$w);const s="#"+e,o="i"+e,n="#"+o,c="d"+e,l="#"+c,h=p(()=>{const W=ot(f?n:l).node();W&&"remove"in W&&W.remove()},"removeTempElements");let u=ot("body");const f=a.securityLevel===Fw,d=a.securityLevel===Dw,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const L=Mn(ot(r),o);u=ot(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ot(r);cc(u,e,c,`font-family: ${g}`,Rw)}else{if(Zw(document,e,c,o),f){const L=Mn(ot("body"),o);u=ot(L.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ot("body");cc(u,e,c)}let m,y;try{m=await An.fromText(t,{title:i.title})}catch(L){if(a.suppressErrorRendering)throw h(),L;m=await An.fromText("error"),y=L}const x=u.select(l).node(),b=m.type,_=x.firstChild,v=_.firstChild,S=(O=(z=m.renderer).getClasses)==null?void 0:O.call(z,t,m),C=Gw(a,b,S,s),T=document.createElement("style");T.innerHTML=C,_.insertBefore(T,v);try{await m.renderer.draw(t,e,"11.13.0",m)}catch(L){throw a.suppressErrorRendering?h():Ek.draw(t,e,"11.13.0"),L}const F=u.select(`${l} svg`),P=(M=(A=m.db).getAccTitle)==null?void 0:M.call(A),R=(E=(B=m.db).getAccDescription)==null?void 0:E.call(B);rg(b,F,P,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Iw);let $=u.select(l).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),$=Vw($,f,je(a.arrowMarkerAbsolute)),f){const L=u.select(l+" svg").node();$=Xw($,L)}else d||($=Fr.sanitize($,{ADD_TAGS:jw,ADD_ATTR:Yw,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Tw(),y)throw y;return h(),{diagramType:b,svg:$,bindFunctions:m.db.bindFunctions}},"render");function tg(e={}){var i;const t=Mt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),fm(t),t!=null&&t.theme&&t.theme in Ae?t.themeVariables=Ae[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ae.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?dm(t):wc();En(r.logLevel),ls()}p(tg,"initialize");var eg=p((e,t={})=>{const{code:r}=vo(e);return An.fromText(r,t)},"getDiagramFromText");function rg(e,t,r,i){Xp(t,e),Zp(t,r,i,t.attr("id"))}p(rg,"addA11yInfo");var lr=Object.freeze({render:Kw,parse:Jp,getDiagramFromText:eg,initialize:tg,getConfig:Pt,setConfig:Sc,getSiteConfig:wc,updateSiteConfig:pm,reset:p(()=>{fa()},"reset"),globalReset:p(()=>{fa(Dr)},"globalReset"),defaultConfig:Dr});En(Pt().logLevel);fa(Pt());var Qw=p((e,t,r)=>{D.warn(e),so(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ig=p(async function(e={querySelector:".mermaid"}){try{await Jw(e)}catch(t){if(so(t)&&D.error(t.str),ee.parseError&&ee.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Jw=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=lr.getConfig();D.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(D.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),lr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new he.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const c of Array.from(a)){if(D.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${s.next()}`;o=c.innerHTML,o=_d(he.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=he.detectInit(o);h&&D.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await og(l,o,c);c.innerHTML=u,e&&await e(l),f&&f(c)}catch(u){Qw(u,n,ee.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ag=p(function(e){lr.initialize(e)},"initialize"),tS=p(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&ag(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ig(i)},"init"),eS=p(async(e,{lazyLoad:t=!0}={})=>{ls(),zs(...e),t===!1&&await Sw()},"registerExternalDiagrams"),sg=p(function(){if(ee.startOnLoad){const{startOnLoad:e}=lr.getConfig();e&&ee.run().catch(t=>D.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",sg,!1);var rS=p(function(e){ee.parseError=e},"setParseErrorHandler"),Na=[],Is=!1,ng=p(async()=>{if(!Is){for(Is=!0;Na.length>0;){const e=Na.shift();if(e)try{await e()}catch(t){D.error("Error executing queue",t)}}Is=!1}},"executeQueue"),iS=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((s,o)=>{lr.parse(e,t).then(n=>{s(n),r(n)},n=>{var c;D.error("Error parsing",n),(c=ee.parseError)==null||c.call(ee,n),o(n),i(n)})}),"performCall");Na.push(a),ng().catch(i)}),"parse"),og=p((e,t,r)=>new Promise((i,a)=>{const s=p(()=>new Promise((o,n)=>{lr.render(e,t,r).then(c=>{o(c),i(c)},c=>{var l;D.error("Error parsing",c),(l=ee.parseError)==null||l.call(ee,c),n(c),a(c)})}),"performCall");Na.push(s),ng().catch(a)}),"render"),aS=p(()=>Object.keys(ir).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ee={startOnLoad:!0,mermaidAPI:lr,parse:iS,render:og,init:tS,run:ig,registerExternalDiagrams:eS,registerLayoutLoaders:dp,initialize:ag,parseError:void 0,contentLoaded:sg,setParseErrorHandler:rS,detectType:$n,registerIconPacks:x2,getRegisteredDiagramsMetadata:aS},sS=ee;/*! Check if previously processed *//*!
254
+ * Wait for document loaded before starting the execution
255
+ */const OS=Object.freeze(Object.defineProperty({__proto__:null,default:sS},Symbol.toStringTag,{value:"Module"}));export{Xm as $,ui as A,wg as B,Hm as C,no as D,kc as E,Pt as F,i1 as G,ly as H,sm as I,p0 as J,yi as K,cS as L,Ja as M,wm as N,Ec as O,el as P,Jm as Q,Gs as R,r1 as S,Li as T,Em as U,Bi as V,j as W,J as X,Fc as Y,Vb as Z,p as _,Im as a,wx as a$,Pn as a0,pS as a1,yS as a2,xr as a3,sl as a4,al as a5,bS as a6,xS as a7,mS as a8,dS as a9,pC as aA,jb as aB,Rx as aC,Ib as aD,Kn as aE,sc as aF,C2 as aG,dc as aH,Zm as aI,lS as aJ,Di as aK,x2 as aL,y2 as aM,cr as aN,Yb as aO,Xu as aP,Va as aQ,Qa as aR,La as aS,Ku as aT,Vu as aU,_b as aV,V as aW,ld as aX,kg as aY,Hb as aZ,Rb as a_,fS as aa,gS as ab,_S as ac,CS as ad,Y2 as ae,lp as af,ES as ag,m0 as ah,Wt as ai,Fe as aj,Qr as ak,oo as al,id as am,Wr as an,od as ao,it as ap,Ce as aq,U as ar,PC as as,MS as at,$S as au,LS as av,Z as aw,AS as ax,CC as ay,gC as az,Rm as b,Qn as b0,yb as b1,Gb as b2,$i as b3,Nr as b4,va as b5,Lb as b6,o_ as b7,Ei as b8,Ba as b9,kb as ba,qu as bb,Tx as bc,Bx as bd,Qe as be,vl as bf,Lx as bg,Jn as bh,vx as bi,Ex as bj,zr as bk,Ye as bl,Cl as bm,to as bn,ju as bo,Bn as bp,Ub as bq,Ka as br,OS as bs,pt as c,$c as d,Mt as e,Ee as f,Nm as g,fe as h,b0 as i,Ai as j,sd as k,D as l,hS as m,DS as n,zm as o,Wm as p,g0 as q,FS as r,Pm as s,hC as t,he as u,kS as v,n1 as w,Fr as x,Om as y,uS as z};