dreamcontext 0.5.3 → 0.6.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 (109) hide show
  1. package/LICENSE +201 -21
  2. package/NOTICE +7 -0
  3. package/README.md +77 -12
  4. package/agents/dreamcontext-explore.md +1 -1
  5. package/agents/sleep-product.md +29 -8
  6. package/agents/sleep-tasks.md +44 -9
  7. package/dist/agents/dreamcontext-explore.md +1 -1
  8. package/dist/agents/sleep-product.md +29 -8
  9. package/dist/agents/sleep-tasks.md +44 -9
  10. package/dist/dashboard/assets/{BrainCanvas3D-1HMiA14F.js → BrainCanvas3D-LLqVeXtb.js} +1 -1
  11. package/dist/dashboard/assets/{_baseUniq-C7pfRmXz.js → _baseUniq-DW0uA0ty.js} +1 -1
  12. package/dist/dashboard/assets/{arc-B5x_GF9Q.js → arc-fVUGtlbL.js} +1 -1
  13. package/dist/dashboard/assets/{architectureDiagram-Q4EWVU46-CWmjaqno.js → architectureDiagram-Q4EWVU46-Dz2PKBsS.js} +1 -1
  14. package/dist/dashboard/assets/{blockDiagram-DXYQGD6D-B7SyUIdV.js → blockDiagram-DXYQGD6D-ByWKxzhL.js} +1 -1
  15. package/dist/dashboard/assets/{c4Diagram-AHTNJAMY-OeJBWXHU.js → c4Diagram-AHTNJAMY-dpHsVM3D.js} +1 -1
  16. package/dist/dashboard/assets/channel-zrLwggBX.js +1 -0
  17. package/dist/dashboard/assets/{chunk-4BX2VUAB-2Oop1B0M.js → chunk-4BX2VUAB-HEXb6Yg5.js} +1 -1
  18. package/dist/dashboard/assets/{chunk-4TB4RGXK-Bh7qSu_X.js → chunk-4TB4RGXK-DeVy5g6H.js} +1 -1
  19. package/dist/dashboard/assets/{chunk-55IACEB6-gNeHRO_i.js → chunk-55IACEB6-DGy3ZgDZ.js} +1 -1
  20. package/dist/dashboard/assets/{chunk-EDXVE4YY-BRniAH53.js → chunk-EDXVE4YY-CYJehjz4.js} +1 -1
  21. package/dist/dashboard/assets/{chunk-FMBD7UC4-B5r8U2gJ.js → chunk-FMBD7UC4-DKTOmvgZ.js} +1 -1
  22. package/dist/dashboard/assets/{chunk-OYMX7WX6-Dd1c17fm.js → chunk-OYMX7WX6-mmtWyiDA.js} +1 -1
  23. package/dist/dashboard/assets/{chunk-QZHKN3VN-BIw-OdTn.js → chunk-QZHKN3VN-DSdV0iwY.js} +1 -1
  24. package/dist/dashboard/assets/{chunk-YZCP3GAM-Dl9MlwCW.js → chunk-YZCP3GAM-DbY-KoDn.js} +1 -1
  25. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-BvejNiwH.js +1 -0
  26. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-BvejNiwH.js +1 -0
  27. package/dist/dashboard/assets/clone-BFVdml6g.js +1 -0
  28. package/dist/dashboard/assets/{cose-bilkent-S5V4N54A-DlrROH5K.js → cose-bilkent-S5V4N54A-p0t1DY88.js} +1 -1
  29. package/dist/dashboard/assets/{dagre-KV5264BT-B0GpPXKL.js → dagre-KV5264BT-DYE0WzHM.js} +1 -1
  30. package/dist/dashboard/assets/{diagram-5BDNPKRD-BBYcDW2Z.js → diagram-5BDNPKRD-D9EiQCOP.js} +1 -1
  31. package/dist/dashboard/assets/{diagram-G4DWMVQ6-BxHxugdp.js → diagram-G4DWMVQ6-poDXSAfu.js} +1 -1
  32. package/dist/dashboard/assets/{diagram-MMDJMWI5-C9Jc19Wo.js → diagram-MMDJMWI5-CHZ7wgN1.js} +1 -1
  33. package/dist/dashboard/assets/{diagram-TYMM5635-Vmo5GAAU.js → diagram-TYMM5635-DVk6fYG7.js} +1 -1
  34. package/dist/dashboard/assets/{erDiagram-SMLLAGMA-pskr9x-V.js → erDiagram-SMLLAGMA-D2sqkGin.js} +1 -1
  35. package/dist/dashboard/assets/{flowDiagram-DWJPFMVM-B1D7Ky0W.js → flowDiagram-DWJPFMVM-DrMlKBYA.js} +1 -1
  36. package/dist/dashboard/assets/{ganttDiagram-T4ZO3ILL-BVJZZV1M.js → ganttDiagram-T4ZO3ILL-Cf4FbEFp.js} +1 -1
  37. package/dist/dashboard/assets/{gitGraphDiagram-UUTBAWPF-BiOGN6We.js → gitGraphDiagram-UUTBAWPF-BsbOq1C9.js} +1 -1
  38. package/dist/dashboard/assets/{graph-D58deEXr.js → graph-CUxxgCtS.js} +1 -1
  39. package/dist/dashboard/assets/index-CqSkXBSu.css +1 -0
  40. package/dist/dashboard/assets/index-flRpQtDj.js +476 -0
  41. package/dist/dashboard/assets/{infoDiagram-42DDH7IO-DgJYg1X1.js → infoDiagram-42DDH7IO-DTkMnZiD.js} +1 -1
  42. package/dist/dashboard/assets/{ishikawaDiagram-UXIWVN3A-arJgr-8P.js → ishikawaDiagram-UXIWVN3A-CahQ348K.js} +1 -1
  43. package/dist/dashboard/assets/{journeyDiagram-VCZTEJTY-B3DCvb8p.js → journeyDiagram-VCZTEJTY-BDY2Nslc.js} +1 -1
  44. package/dist/dashboard/assets/{kanban-definition-6JOO6SKY-B--dN6Ma.js → kanban-definition-6JOO6SKY-CgrwoTjI.js} +1 -1
  45. package/dist/dashboard/assets/{layout-z2qEbZWC.js → layout-IaUxkFkm.js} +1 -1
  46. package/dist/dashboard/assets/{linear-BQu1dwrM.js → linear-shc0iNFn.js} +1 -1
  47. package/dist/dashboard/assets/{min-DkF5b2sh.js → min-BIL7YgTN.js} +1 -1
  48. package/dist/dashboard/assets/{mindmap-definition-QFDTVHPH-Bw04koyq.js → mindmap-definition-QFDTVHPH-GmO0JRtA.js} +1 -1
  49. package/dist/dashboard/assets/{pieDiagram-DEJITSTG-vNqz64o8.js → pieDiagram-DEJITSTG-Bfm_toYA.js} +1 -1
  50. package/dist/dashboard/assets/{quadrantDiagram-34T5L4WZ-TuVP5Gi6.js → quadrantDiagram-34T5L4WZ-DIjTM3lm.js} +1 -1
  51. package/dist/dashboard/assets/{requirementDiagram-MS252O5E-D3mS8_ke.js → requirementDiagram-MS252O5E-B9AEoGYh.js} +1 -1
  52. package/dist/dashboard/assets/{sankeyDiagram-XADWPNL6-BmVRers6.js → sankeyDiagram-XADWPNL6-C_O5XLXm.js} +1 -1
  53. package/dist/dashboard/assets/{sequenceDiagram-FGHM5R23-CTYCgk5P.js → sequenceDiagram-FGHM5R23-CHSxSvmJ.js} +1 -1
  54. package/dist/dashboard/assets/{stateDiagram-FHFEXIEX-DNbP2aCg.js → stateDiagram-FHFEXIEX-B0URrhHw.js} +1 -1
  55. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-FdAb9MBo.js +1 -0
  56. package/dist/dashboard/assets/{timeline-definition-GMOUNBTQ-DKHJd4z8.js → timeline-definition-GMOUNBTQ-CycU2gVC.js} +1 -1
  57. package/dist/dashboard/assets/{vennDiagram-DHZGUBPP-ChotNMNq.js → vennDiagram-DHZGUBPP-DcU2536G.js} +1 -1
  58. package/dist/dashboard/assets/{wardley-RL74JXVD-Dmo2_ksP.js → wardley-RL74JXVD-BWqqaX3S.js} +1 -1
  59. package/dist/dashboard/assets/{wardleyDiagram-NUSXRM2D-Z6Wbiv2H.js → wardleyDiagram-NUSXRM2D-CUnIHJgd.js} +1 -1
  60. package/dist/dashboard/assets/{xychartDiagram-5P7HB3ND-BJa0AHtN.js → xychartDiagram-5P7HB3ND-b9fcOYTj.js} +1 -1
  61. package/dist/dashboard/index.html +2 -2
  62. package/dist/dashboard/media/README.md +29 -0
  63. package/dist/dashboard/media/brain-hero.png +0 -0
  64. package/dist/dashboard/media/brain.mp4 +0 -0
  65. package/dist/dashboard/media/brain.webm +0 -0
  66. package/dist/dashboard/media/shot-disabled.png +0 -0
  67. package/dist/dashboard/media/shot-enabled.png +0 -0
  68. package/dist/index.js +3408 -2051
  69. package/dist/skill-packs/catalog.json +44 -0
  70. package/dist/skill-packs/excalidraw/SKILL.md +123 -0
  71. package/dist/skill-packs/excalidraw/examples/hello.spec.json +14 -0
  72. package/dist/skill-packs/excalidraw/examples/sample.png +0 -0
  73. package/dist/skill-packs/excalidraw/examples/style_board.js +31 -0
  74. package/dist/skill-packs/excalidraw/package.json +5 -0
  75. package/dist/skill-packs/excalidraw/reference/format.md +93 -0
  76. package/dist/skill-packs/excalidraw/scripts/build_excalidraw.js +357 -0
  77. package/dist/skill-packs/excalidraw/scripts/lib/fractional-indexing.LICENSE +121 -0
  78. package/dist/skill-packs/excalidraw/scripts/lib/fractional-indexing.js +311 -0
  79. package/dist/skill-packs/excalidraw/scripts/lib/imagesize.js +65 -0
  80. package/dist/skill-packs/excalidraw/scripts/lib/style.js +130 -0
  81. package/dist/skill-packs/video-watching/SKILL.md +151 -0
  82. package/dist/skill-packs/video-watching/scripts/build_frame_index.py +95 -0
  83. package/dist/skill-packs/video-watching/scripts/gap_fill.py +45 -0
  84. package/dist/skill-packs/video-watching/scripts/transcribe.sh +136 -0
  85. package/package.json +4 -2
  86. package/skill/SKILL.md +5 -0
  87. package/skill-packs/catalog.json +44 -0
  88. package/skill-packs/excalidraw/SKILL.md +123 -0
  89. package/skill-packs/excalidraw/examples/hello.spec.json +14 -0
  90. package/skill-packs/excalidraw/examples/sample.png +0 -0
  91. package/skill-packs/excalidraw/examples/style_board.js +31 -0
  92. package/skill-packs/excalidraw/package.json +5 -0
  93. package/skill-packs/excalidraw/reference/format.md +93 -0
  94. package/skill-packs/excalidraw/scripts/build_excalidraw.js +357 -0
  95. package/skill-packs/excalidraw/scripts/lib/fractional-indexing.LICENSE +121 -0
  96. package/skill-packs/excalidraw/scripts/lib/fractional-indexing.js +311 -0
  97. package/skill-packs/excalidraw/scripts/lib/imagesize.js +65 -0
  98. package/skill-packs/excalidraw/scripts/lib/style.js +130 -0
  99. package/skill-packs/video-watching/SKILL.md +151 -0
  100. package/skill-packs/video-watching/scripts/build_frame_index.py +95 -0
  101. package/skill-packs/video-watching/scripts/gap_fill.py +45 -0
  102. package/skill-packs/video-watching/scripts/transcribe.sh +136 -0
  103. package/dist/dashboard/assets/channel-CbuTKKsM.js +0 -1
  104. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-HXl3A_sM.js +0 -1
  105. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-HXl3A_sM.js +0 -1
  106. package/dist/dashboard/assets/clone-NKHOtdi8.js +0 -1
  107. package/dist/dashboard/assets/index-DK_2-eWY.css +0 -1
  108. package/dist/dashboard/assets/index-Ds-JXWtr.js +0 -476
  109. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-CfN6kjo8.js +0 -1
@@ -1,476 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-B0GpPXKL.js","assets/graph-D58deEXr.js","assets/_baseUniq-C7pfRmXz.js","assets/layout-z2qEbZWC.js","assets/min-DkF5b2sh.js","assets/clone-NKHOtdi8.js","assets/cose-bilkent-S5V4N54A-DlrROH5K.js","assets/cytoscape.esm-D_LviqZs.js","assets/c4Diagram-AHTNJAMY-OeJBWXHU.js","assets/chunk-YZCP3GAM-Dl9MlwCW.js","assets/flowDiagram-DWJPFMVM-B1D7Ky0W.js","assets/chunk-FMBD7UC4-B5r8U2gJ.js","assets/chunk-55IACEB6-gNeHRO_i.js","assets/chunk-EDXVE4YY-BRniAH53.js","assets/channel-CbuTKKsM.js","assets/erDiagram-SMLLAGMA-pskr9x-V.js","assets/gitGraphDiagram-UUTBAWPF-BiOGN6We.js","assets/chunk-4BX2VUAB-2Oop1B0M.js","assets/chunk-QZHKN3VN-BIw-OdTn.js","assets/wardley-RL74JXVD-Dmo2_ksP.js","assets/ganttDiagram-T4ZO3ILL-BVJZZV1M.js","assets/linear-BQu1dwrM.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-DgJYg1X1.js","assets/pieDiagram-DEJITSTG-vNqz64o8.js","assets/arc-B5x_GF9Q.js","assets/quadrantDiagram-34T5L4WZ-TuVP5Gi6.js","assets/xychartDiagram-5P7HB3ND-BJa0AHtN.js","assets/requirementDiagram-MS252O5E-D3mS8_ke.js","assets/sequenceDiagram-FGHM5R23-CTYCgk5P.js","assets/classDiagram-6PBFFD2Q-HXl3A_sM.js","assets/chunk-4TB4RGXK-Bh7qSu_X.js","assets/classDiagram-v2-HSJHXN6E-HXl3A_sM.js","assets/stateDiagram-FHFEXIEX-DNbP2aCg.js","assets/chunk-OYMX7WX6-Dd1c17fm.js","assets/stateDiagram-v2-QKLJ7IA2-CfN6kjo8.js","assets/journeyDiagram-VCZTEJTY-B3DCvb8p.js","assets/timeline-definition-GMOUNBTQ-DKHJd4z8.js","assets/mindmap-definition-QFDTVHPH-Bw04koyq.js","assets/kanban-definition-6JOO6SKY-B--dN6Ma.js","assets/diagram-TYMM5635-Vmo5GAAU.js","assets/diagram-MMDJMWI5-C9Jc19Wo.js","assets/blockDiagram-DXYQGD6D-B7SyUIdV.js","assets/diagram-5BDNPKRD-BBYcDW2Z.js","assets/architectureDiagram-Q4EWVU46-CWmjaqno.js","assets/diagram-G4DWMVQ6-BxHxugdp.js","assets/wardleyDiagram-NUSXRM2D-Z6Wbiv2H.js"])))=>i.map(i=>d[i]);
2
- var D4=Object.defineProperty;var g_=i=>{throw TypeError(i)};var F4=(i,e,r)=>e in i?D4(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r;var Ht=(i,e,r)=>F4(i,typeof e!="symbol"?e+"":e,r),g0=(i,e,r)=>e.has(i)||g_("Cannot "+r);var Q=(i,e,r)=>(g0(i,e,"read from private field"),r?r.call(i):e.get(i)),Ut=(i,e,r)=>e.has(i)?g_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,r),Mt=(i,e,r,n)=>(g0(i,e,"write to private field"),n?n.call(i,r):e.set(i,r),r),he=(i,e,r)=>(g0(i,e,"access private method"),r);var Qd=(i,e,r,n)=>({set _(a){Mt(i,e,a,r)},get _(){return Q(i,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function jg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Ket(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var e=i.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var a=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return i[n]}})}),r}var m0={exports:{}},ru={};/**
3
- * @license React
4
- * react-jsx-runtime.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var m_;function $4(){if(m_)return ru;m_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var h in a)h!=="key"&&(o[h]=a[h])}else o=a;return a=o.ref,{$$typeof:i,type:n,key:c,ref:a!==void 0?a:null,props:o}}return ru.Fragment=e,ru.jsx=r,ru.jsxs=r,ru}var y_;function z4(){return y_||(y_=1,m0.exports=$4()),m0.exports}var b=z4(),y0={exports:{}},ne={};/**
11
- * @license React
12
- * react.production.js
13
- *
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var x_;function q4(){if(x_)return ne;x_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=x&&P[x]||P["@@iterator"],typeof P=="function"?P:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function w(P,K,ot){this.props=P,this.context=K,this.refs=_,this.updater=ot||v}w.prototype.isReactComponent={},w.prototype.setState=function(P,K){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,K,"setState")},w.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=w.prototype;function A(P,K,ot){this.props=P,this.context=K,this.refs=_,this.updater=ot||v}var E=A.prototype=new T;E.constructor=A,C(E,w.prototype),E.isPureReactComponent=!0;var N=Array.isArray;function R(){}var M={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function Y(P,K,ot){var st=ot.ref;return{$$typeof:i,type:P,key:K,ref:st!==void 0?st:null,props:ot}}function $(P,K){return Y(P.type,K,P.props)}function q(P){return typeof P=="object"&&P!==null&&P.$$typeof===i}function J(P){var K={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ot){return K[ot]})}var W=/\/+/g;function F(P,K){return typeof P=="object"&&P!==null&&P.key!=null?J(""+P.key):K.toString(36)}function U(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(R,R):(P.status="pending",P.then(function(K){P.status==="pending"&&(P.status="fulfilled",P.value=K)},function(K){P.status==="pending"&&(P.status="rejected",P.reason=K)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function j(P,K,ot,st,bt){var kt=typeof P;(kt==="undefined"||kt==="boolean")&&(P=null);var Lt=!1;if(P===null)Lt=!0;else switch(kt){case"bigint":case"string":case"number":Lt=!0;break;case"object":switch(P.$$typeof){case i:case e:Lt=!0;break;case p:return Lt=P._init,j(Lt(P._payload),K,ot,st,bt)}}if(Lt)return bt=bt(P),Lt=st===""?"."+F(P,0):st,N(bt)?(ot="",Lt!=null&&(ot=Lt.replace(W,"$&/")+"/"),j(bt,K,ot,"",function(gt){return gt})):bt!=null&&(q(bt)&&(bt=$(bt,ot+(bt.key==null||P&&P.key===bt.key?"":(""+bt.key).replace(W,"$&/")+"/")+Lt)),K.push(bt)),1;Lt=0;var at=st===""?".":st+":";if(N(P))for(var Ct=0;Ct<P.length;Ct++)st=P[Ct],kt=at+F(st,Ct),Lt+=j(st,K,ot,kt,bt);else if(Ct=y(P),typeof Ct=="function")for(P=Ct.call(P),Ct=0;!(st=P.next()).done;)st=st.value,kt=at+F(st,Ct++),Lt+=j(st,K,ot,kt,bt);else if(kt==="object"){if(typeof P.then=="function")return j(U(P),K,ot,st,bt);throw K=String(P),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return Lt}function I(P,K,ot){if(P==null)return P;var st=[],bt=0;return j(P,st,"","",function(kt){return K.call(ot,kt,bt++)}),st}function H(P){if(P._status===-1){var K=P._result;K=K(),K.then(function(ot){(P._status===0||P._status===-1)&&(P._status=1,P._result=ot)},function(ot){(P._status===0||P._status===-1)&&(P._status=2,P._result=ot)}),P._status===-1&&(P._status=0,P._result=K)}if(P._status===1)return P._result.default;throw P._result}var V=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},Z={map:I,forEach:function(P,K,ot){I(P,function(){K.apply(this,arguments)},ot)},count:function(P){var K=0;return I(P,function(){K++}),K},toArray:function(P){return I(P,function(K){return K})||[]},only:function(P){if(!q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return ne.Activity=g,ne.Children=Z,ne.Component=w,ne.Fragment=r,ne.Profiler=a,ne.PureComponent=A,ne.StrictMode=n,ne.Suspense=u,ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ne.__COMPILER_RUNTIME={__proto__:null,c:function(P){return M.H.useMemoCache(P)}},ne.cache=function(P){return function(){return P.apply(null,arguments)}},ne.cacheSignal=function(){return null},ne.cloneElement=function(P,K,ot){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var st=C({},P.props),bt=P.key;if(K!=null)for(kt in K.key!==void 0&&(bt=""+K.key),K)!O.call(K,kt)||kt==="key"||kt==="__self"||kt==="__source"||kt==="ref"&&K.ref===void 0||(st[kt]=K[kt]);var kt=arguments.length-2;if(kt===1)st.children=ot;else if(1<kt){for(var Lt=Array(kt),at=0;at<kt;at++)Lt[at]=arguments[at+2];st.children=Lt}return Y(P.type,bt,st)},ne.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},ne.createElement=function(P,K,ot){var st,bt={},kt=null;if(K!=null)for(st in K.key!==void 0&&(kt=""+K.key),K)O.call(K,st)&&st!=="key"&&st!=="__self"&&st!=="__source"&&(bt[st]=K[st]);var Lt=arguments.length-2;if(Lt===1)bt.children=ot;else if(1<Lt){for(var at=Array(Lt),Ct=0;Ct<Lt;Ct++)at[Ct]=arguments[Ct+2];bt.children=at}if(P&&P.defaultProps)for(st in Lt=P.defaultProps,Lt)bt[st]===void 0&&(bt[st]=Lt[st]);return Y(P,kt,bt)},ne.createRef=function(){return{current:null}},ne.forwardRef=function(P){return{$$typeof:h,render:P}},ne.isValidElement=q,ne.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:H}},ne.memo=function(P,K){return{$$typeof:f,type:P,compare:K===void 0?null:K}},ne.startTransition=function(P){var K=M.T,ot={};M.T=ot;try{var st=P(),bt=M.S;bt!==null&&bt(ot,st),typeof st=="object"&&st!==null&&typeof st.then=="function"&&st.then(R,V)}catch(kt){V(kt)}finally{K!==null&&ot.types!==null&&(K.types=ot.types),M.T=K}},ne.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ne.use=function(P){return M.H.use(P)},ne.useActionState=function(P,K,ot){return M.H.useActionState(P,K,ot)},ne.useCallback=function(P,K){return M.H.useCallback(P,K)},ne.useContext=function(P){return M.H.useContext(P)},ne.useDebugValue=function(){},ne.useDeferredValue=function(P,K){return M.H.useDeferredValue(P,K)},ne.useEffect=function(P,K){return M.H.useEffect(P,K)},ne.useEffectEvent=function(P){return M.H.useEffectEvent(P)},ne.useId=function(){return M.H.useId()},ne.useImperativeHandle=function(P,K,ot){return M.H.useImperativeHandle(P,K,ot)},ne.useInsertionEffect=function(P,K){return M.H.useInsertionEffect(P,K)},ne.useLayoutEffect=function(P,K){return M.H.useLayoutEffect(P,K)},ne.useMemo=function(P,K){return M.H.useMemo(P,K)},ne.useOptimistic=function(P,K){return M.H.useOptimistic(P,K)},ne.useReducer=function(P,K,ot){return M.H.useReducer(P,K,ot)},ne.useRef=function(P){return M.H.useRef(P)},ne.useState=function(P){return M.H.useState(P)},ne.useSyncExternalStore=function(P,K,ot){return M.H.useSyncExternalStore(P,K,ot)},ne.useTransition=function(){return M.H.useTransition()},ne.version="19.2.4",ne}var b_;function rv(){return b_||(b_=1,y0.exports=q4()),y0.exports}var tt=rv();const I4=jg(tt);var x0={exports:{}},nu={},b0={exports:{}},v0={};/**
19
- * @license React
20
- * scheduler.production.js
21
- *
22
- * Copyright (c) Meta Platforms, Inc. and affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var v_;function P4(){return v_||(v_=1,(function(i){function e(j,I){var H=j.length;j.push(I);t:for(;0<H;){var V=H-1>>>1,Z=j[V];if(0<a(Z,I))j[V]=I,j[H]=Z,H=V;else break t}}function r(j){return j.length===0?null:j[0]}function n(j){if(j.length===0)return null;var I=j[0],H=j.pop();if(H!==I){j[0]=H;t:for(var V=0,Z=j.length,P=Z>>>1;V<P;){var K=2*(V+1)-1,ot=j[K],st=K+1,bt=j[st];if(0>a(ot,H))st<Z&&0>a(bt,ot)?(j[V]=bt,j[st]=H,V=st):(j[V]=ot,j[K]=H,V=K);else if(st<Z&&0>a(bt,H))j[V]=bt,j[st]=H,V=st;else break t}}return I}function a(j,I){var H=j.sortIndex-I.sortIndex;return H!==0?H:j.id-I.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();i.unstable_now=function(){return c.now()-h}}var u=[],f=[],p=1,g=null,x=3,y=!1,v=!1,C=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function E(j){for(var I=r(f);I!==null;){if(I.callback===null)n(f);else if(I.startTime<=j)n(f),I.sortIndex=I.expirationTime,e(u,I);else break;I=r(f)}}function N(j){if(C=!1,E(j),!v)if(r(u)!==null)v=!0,R||(R=!0,J());else{var I=r(f);I!==null&&U(N,I.startTime-j)}}var R=!1,M=-1,O=5,Y=-1;function $(){return _?!0:!(i.unstable_now()-Y<O)}function q(){if(_=!1,R){var j=i.unstable_now();Y=j;var I=!0;try{t:{v=!1,C&&(C=!1,T(M),M=-1),y=!0;var H=x;try{e:{for(E(j),g=r(u);g!==null&&!(g.expirationTime>j&&$());){var V=g.callback;if(typeof V=="function"){g.callback=null,x=g.priorityLevel;var Z=V(g.expirationTime<=j);if(j=i.unstable_now(),typeof Z=="function"){g.callback=Z,E(j),I=!0;break e}g===r(u)&&n(u),E(j)}else n(u);g=r(u)}if(g!==null)I=!0;else{var P=r(f);P!==null&&U(N,P.startTime-j),I=!1}}break t}finally{g=null,x=H,y=!1}I=void 0}}finally{I?J():R=!1}}}var J;if(typeof A=="function")J=function(){A(q)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,F=W.port2;W.port1.onmessage=q,J=function(){F.postMessage(null)}}else J=function(){w(q,0)};function U(j,I){M=w(function(){j(i.unstable_now())},I)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return x},i.unstable_next=function(j){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var H=x;x=I;try{return j()}finally{x=H}},i.unstable_requestPaint=function(){_=!0},i.unstable_runWithPriority=function(j,I){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var H=x;x=j;try{return I()}finally{x=H}},i.unstable_scheduleCallback=function(j,I,H){var V=i.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?V+H:V):H=V,j){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=H+Z,j={id:p++,callback:I,priorityLevel:j,startTime:H,expirationTime:Z,sortIndex:-1},H>V?(j.sortIndex=H,e(f,j),r(u)===null&&j===r(f)&&(C?(T(M),M=-1):C=!0,U(N,H-V))):(j.sortIndex=Z,e(u,j),v||y||(v=!0,R||(R=!0,J()))),j},i.unstable_shouldYield=$,i.unstable_wrapCallback=function(j){var I=x;return function(){var H=x;x=I;try{return j.apply(this,arguments)}finally{x=H}}}})(v0)),v0}var C_;function H4(){return C_||(C_=1,b0.exports=P4()),b0.exports}var C0={exports:{}},Ji={};/**
27
- * @license React
28
- * react-dom.production.js
29
- *
30
- * Copyright (c) Meta Platforms, Inc. and affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var k_;function U4(){if(k_)return Ji;k_=1;var i=rv();function e(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(u,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:u,containerInfo:f,implementation:p}}var c=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Ji.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Ji.createPortal=function(u,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(u,f,null,p)},Ji.flushSync=function(u){var f=c.T,p=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=f,n.p=p,n.d.f()}},Ji.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(u,f))},Ji.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},Ji.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?n.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:y}):p==="script"&&n.d.X(u,{crossOrigin:g,integrity:x,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Ji.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=h(f.as,f.crossOrigin);n.d.M(u,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(u)},Ji.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin);n.d.L(u,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Ji.preloadModule=function(u,f){if(typeof u=="string")if(f){var p=h(f.as,f.crossOrigin);n.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(u)},Ji.requestFormReset=function(u){n.d.r(u)},Ji.unstable_batchedUpdates=function(u,f){return u(f)},Ji.useFormState=function(u,f,p){return c.H.useFormState(u,f,p)},Ji.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ji.version="19.2.4",Ji}var __;function W4(){if(__)return C0.exports;__=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),C0.exports=U4(),C0.exports}/**
35
- * @license React
36
- * react-dom-client.production.js
37
- *
38
- * Copyright (c) Meta Platforms, Inc. and affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */var S_;function Y4(){if(S_)return nu;S_=1;var i=H4(),e=rv(),r=W4();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function h(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function f(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var d=s,m=l;;){var k=d.return;if(k===null)break;var S=k.alternate;if(S===null){if(m=k.return,m!==null){d=m;continue}break}if(k.child===S.child){for(S=k.child;S;){if(S===d)return u(k),s;if(S===m)return u(k),l;S=S.sibling}throw Error(n(188))}if(d.return!==m.return)d=k,m=S;else{for(var L=!1,z=k.child;z;){if(z===d){L=!0,d=k,m=S;break}if(z===m){L=!0,m=k,d=S;break}z=z.sibling}if(!L){for(z=S.child;z;){if(z===d){L=!0,d=S,m=k;break}if(z===m){L=!0,m=S,d=k;break}z=z.sibling}if(!L)throw Error(n(189))}}if(d.alternate!==m)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:l}function p(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=p(s),l!==null)return l;s=s.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),A=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function J(s){return s===null||typeof s!="object"?null:(s=q&&s[q]||s["@@iterator"],typeof s=="function"?s:null)}var W=Symbol.for("react.client.reference");function F(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===W?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case R:return"SuspenseList";case Y:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case A:return s.displayName||"Context";case T:return(s._context.displayName||"Context")+".Consumer";case E:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case M:return l=s.displayName||null,l!==null?l:F(s.type)||"Memo";case O:l=s._payload,s=s._init;try{return F(s(l))}catch{}}return null}var U=Array.isArray,j=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},V=[],Z=-1;function P(s){return{current:s}}function K(s){0>Z||(s.current=V[Z],V[Z]=null,Z--)}function ot(s,l){Z++,V[Z]=s.current,s.current=l}var st=P(null),bt=P(null),kt=P(null),Lt=P(null);function at(s,l){switch(ot(kt,l),ot(bt,s),ot(st,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?$k(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=$k(l),s=zk(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}K(st),ot(st,s)}function Ct(){K(st),K(bt),K(kt)}function gt(s){s.memoizedState!==null&&ot(Lt,s);var l=st.current,d=zk(l,s.type);l!==d&&(ot(bt,s),ot(st,d))}function Bt(s){bt.current===s&&(K(st),K(bt)),Lt.current===s&&(K(Lt),Jh._currentValue=H)}var Wt,Gt;function Zt(s){if(Wt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);Wt=l&&l[1]||"",Gt=-1<d.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+Wt+s+Gt}var Et=!1;function Vt(s,l){if(!s||Et)return"";Et=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var vt=function(){throw Error()};if(Object.defineProperty(vt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(vt,[])}catch(dt){var ht=dt}Reflect.construct(s,[],vt)}else{try{vt.call()}catch(dt){ht=dt}s.call(vt.prototype)}}else{try{throw Error()}catch(dt){ht=dt}(vt=s())&&typeof vt.catch=="function"&&vt.catch(function(){})}}catch(dt){if(dt&&ht&&typeof dt.stack=="string")return[dt.stack,ht.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=m.DetermineComponentFrameRoot(),L=S[0],z=S[1];if(L&&z){var X=L.split(`
45
- `),ct=z.split(`
46
- `);for(k=m=0;m<X.length&&!X[m].includes("DetermineComponentFrameRoot");)m++;for(;k<ct.length&&!ct[k].includes("DetermineComponentFrameRoot");)k++;if(m===X.length||k===ct.length)for(m=X.length-1,k=ct.length-1;1<=m&&0<=k&&X[m]!==ct[k];)k--;for(;1<=m&&0<=k;m--,k--)if(X[m]!==ct[k]){if(m!==1||k!==1)do if(m--,k--,0>k||X[m]!==ct[k]){var yt=`
47
- `+X[m].replace(" at new "," at ");return s.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",s.displayName)),yt}while(1<=m&&0<=k);break}}}finally{Et=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?Zt(d):""}function we(s,l){switch(s.tag){case 26:case 27:case 5:return Zt(s.type);case 16:return Zt("Lazy");case 13:return s.child!==l&&l!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return Vt(s.type,!1);case 11:return Vt(s.type.render,!1);case 1:return Vt(s.type,!0);case 31:return Zt("Activity");default:return""}}function ni(s){try{var l="",d=null;do l+=we(s,d),d=s,s=s.return;while(s);return l}catch(m){return`
48
- Error generating stack: `+m.message+`
49
- `+m.stack}}var qi=Object.prototype.hasOwnProperty,ue=i.unstable_scheduleCallback,ke=i.unstable_cancelCallback,De=i.unstable_shouldYield,Ni=i.unstable_requestPaint,Pe=i.unstable_now,or=i.unstable_getCurrentPriorityLevel,Un=i.unstable_ImmediatePriority,Kr=i.unstable_UserBlockingPriority,Dr=i.unstable_NormalPriority,Wn=i.unstable_LowPriority,lr=i.unstable_IdlePriority,To=i.log,Nl=i.unstable_setDisableYieldValue,Zi=null,wi=null;function Fr(s){if(typeof To=="function"&&Nl(s),wi&&typeof wi.setStrictMode=="function")try{wi.setStrictMode(Zi,s)}catch{}}var mi=Math.clz32?Math.clz32:Yn,ys=Math.log,kr=Math.LN2;function Yn(s){return s>>>=0,s===0?32:31-(ys(s)/kr|0)|0}var Gn=256,Vn=262144,xs=4194304;function $r(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Xn(s,l,d){var m=s.pendingLanes;if(m===0)return 0;var k=0,S=s.suspendedLanes,L=s.pingedLanes;s=s.warmLanes;var z=m&134217727;return z!==0?(m=z&~S,m!==0?k=$r(m):(L&=z,L!==0?k=$r(L):d||(d=z&~s,d!==0&&(k=$r(d))))):(z=m&~S,z!==0?k=$r(z):L!==0?k=$r(L):d||(d=m&~s,d!==0&&(k=$r(d)))),k===0?0:l!==0&&l!==k&&(l&S)===0&&(S=k&-k,d=l&-l,S>=d||S===32&&(d&4194048)!==0)?l:k}function bn(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Qn(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bs(){var s=xs;return xs<<=1,(xs&62914560)===0&&(xs=4194304),s}function vs(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Fe(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Zn(s,l,d,m,k,S){var L=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var z=s.entanglements,X=s.expirationTimes,ct=s.hiddenUpdates;for(d=L&~d;0<d;){var yt=31-mi(d),vt=1<<yt;z[yt]=0,X[yt]=-1;var ht=ct[yt];if(ht!==null)for(ct[yt]=null,yt=0;yt<ht.length;yt++){var dt=ht[yt];dt!==null&&(dt.lane&=-536870913)}d&=~vt}m!==0&&Cs(s,m,0),S!==0&&k===0&&s.tag!==0&&(s.suspendedLanes|=S&~(L&~l))}function Cs(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var m=31-mi(l);s.entangledLanes|=l,s.entanglements[m]=s.entanglements[m]|1073741824|d&261930}function ks(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var m=31-mi(d),k=1<<m;k&l|s[m]&l&&(s[m]|=l),d&=~k}}function vn(s,l){var d=l&-l;return d=(d&42)!==0?1:_s(d),(d&(s.suspendedLanes|l))!==0?0:d}function _s(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Ss(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Cn(){var s=I.p;return s!==0?s:(s=window.event,s===void 0?32:l_(s.type))}function Ki(s,l){var d=I.p;try{return I.p=s,l()}finally{I.p=d}}var Oi=Math.random().toString(36).slice(2),ai="__reactFiber$"+Oi,yi="__reactProps$"+Oi,kn="__reactContainer$"+Oi,Kn="__reactEvents$"+Oi,Jn="__reactListeners$"+Oi,ws="__reactHandles$"+Oi,cr="__reactResources$"+Oi,ta="__reactMarker$"+Oi;function Ts(s){delete s[ai],delete s[yi],delete s[Kn],delete s[Jn],delete s[ws]}function ea(s){var l=s[ai];if(l)return l;for(var d=s.parentNode;d;){if(l=d[kn]||d[ai]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=Yk(s);s!==null;){if(d=s[ai])return d;s=Yk(s)}return l}s=d,d=s.parentNode}return null}function Jr(s){if(s=s[ai]||s[kn]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function _n(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function Ii(s){var l=s[cr];return l||(l=s[cr]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function He(s){s[ta]=!0}var jt=new Set,G={};function mt(s,l){At(s,l),At(s+"Capture",l)}function At(s,l){for(G[s]=l,s=0;s<l.length;s++)jt.add(l[s])}var ye=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),se={},Me={};function Pi(s){return qi.call(Me,s)?!0:qi.call(se,s)?!1:ye.test(s)?Me[s]=!0:(se[s]=!0,!1)}function ji(s,l,d){if(Pi(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function Xe(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function Ri(s,l,d,m){if(m===null)s.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+m)}}function Se(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Sn(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Ba(s,l,d){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var k=m.get,S=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return k.call(this)},set:function(L){d=""+L,S.call(this,L)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(L){d=""+L},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function Bs(s){if(!s._valueTracker){var l=Sn(s)?"checked":"value";s._valueTracker=Ba(s,l,""+s[l])}}function ph(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return s&&(m=Sn(s)?s.checked?"true":"false":s.value),s=m,s!==d?(l.setValue(s),!0):!1}function Bo(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var gh=/[\n"\\]/g;function hr(s){return s.replace(gh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function ia(s,l,d,m,k,S,L,z){s.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?s.type=L:s.removeAttribute("type"),l!=null?L==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Se(l)):s.value!==""+Se(l)&&(s.value=""+Se(l)):L!=="submit"&&L!=="reset"||s.removeAttribute("value"),l!=null?St(s,L,Se(l)):d!=null?St(s,L,Se(d)):m!=null&&s.removeAttribute("value"),k==null&&S!=null&&(s.defaultChecked=!!S),k!=null&&(s.checked=k&&typeof k!="function"&&typeof k!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?s.name=""+Se(z):s.removeAttribute("name")}function ut(s,l,d,m,k,S,L,z){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.type=S),l!=null||d!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){Bs(s);return}d=d!=null?""+Se(d):"",l=l!=null?""+Se(l):d,z||l===s.value||(s.value=l),s.defaultValue=l}m=m??k,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=z?s.checked:!!m,s.defaultChecked=!!m,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(s.name=L),Bs(s)}function St(s,l,d){l==="number"&&Bo(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function wt(s,l,d,m){if(s=s.options,l){l={};for(var k=0;k<d.length;k++)l["$"+d[k]]=!0;for(d=0;d<s.length;d++)k=l.hasOwnProperty("$"+s[d].value),s[d].selected!==k&&(s[d].selected=k),k&&m&&(s[d].defaultSelected=!0)}else{for(d=""+Se(d),l=null,k=0;k<s.length;k++){if(s[k].value===d){s[k].selected=!0,m&&(s[k].defaultSelected=!0);return}l!==null||s[k].disabled||(l=s[k])}l!==null&&(l.selected=!0)}}function Nt(s,l,d){if(l!=null&&(l=""+Se(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Se(d):""}function fe(s,l,d,m){if(l==null){if(m!=null){if(d!=null)throw Error(n(92));if(U(m)){if(1<m.length)throw Error(n(93));m=m[0]}d=m}d==null&&(d=""),l=d}d=Se(l),s.defaultValue=d,m=s.textContent,m===d&&m!==""&&m!==null&&(s.value=m),Bs(s)}function _e(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var $e=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xi(s,l,d){var m=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":m?s.setProperty(l,d):typeof d!="number"||d===0||$e.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function Aa(s,l,d){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var k in l)m=l[k],l.hasOwnProperty(k)&&d[k]!==m&&xi(s,k,m)}else for(var S in l)l.hasOwnProperty(S)&&xi(s,S,l[S])}function wn(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zf=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qf=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function If(s){return qf.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ea(){}var fm=null;function dm(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ol=null,jl=null;function F1(s){var l=Jr(s);if(l&&(s=l.stateNode)){var d=s[yi]||null;t:switch(s=l.stateNode,l.type){case"input":if(ia(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+hr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==s&&m.form===s.form){var k=m[yi]||null;if(!k)throw Error(n(90));ia(m,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(l=0;l<d.length;l++)m=d[l],m.form===s.form&&ph(m)}break t;case"textarea":Nt(s,d.value,d.defaultValue);break t;case"select":l=d.value,l!=null&&wt(s,!!d.multiple,l,!1)}}}var pm=!1;function $1(s,l,d){if(pm)return s(l,d);pm=!0;try{var m=s(l);return m}finally{if(pm=!1,(Ol!==null||jl!==null)&&(Ad(),Ol&&(l=Ol,s=jl,jl=Ol=null,F1(l),s)))for(l=0;l<s.length;l++)F1(s[l])}}function mh(s,l){var d=s.stateNode;if(d===null)return null;var m=d[yi]||null;if(m===null)return null;d=m[l];t:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break t;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gm=!1;if(Ma)try{var yh={};Object.defineProperty(yh,"passive",{get:function(){gm=!0}}),window.addEventListener("test",yh,yh),window.removeEventListener("test",yh,yh)}catch{gm=!1}var As=null,mm=null,Pf=null;function z1(){if(Pf)return Pf;var s,l=mm,d=l.length,m,k="value"in As?As.value:As.textContent,S=k.length;for(s=0;s<d&&l[s]===k[s];s++);var L=d-s;for(m=1;m<=L&&l[d-m]===k[S-m];m++);return Pf=k.slice(s,1<m?1-m:void 0)}function Hf(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function Uf(){return!0}function q1(){return!1}function _r(s){function l(d,m,k,S,L){this._reactName=d,this._targetInst=k,this.type=m,this.nativeEvent=S,this.target=L,this.currentTarget=null;for(var z in s)s.hasOwnProperty(z)&&(d=s[z],this[z]=d?d(S):S[z]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Uf:q1,this.isPropagationStopped=q1,this}return g(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Uf)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Uf)},persist:function(){},isPersistent:Uf}),l}var Ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wf=_r(Ao),xh=g({},Ao,{view:0,detail:0}),jO=_r(xh),ym,xm,bh,Yf=g({},xh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==bh&&(bh&&s.type==="mousemove"?(ym=s.screenX-bh.screenX,xm=s.screenY-bh.screenY):xm=ym=0,bh=s),ym)},movementY:function(s){return"movementY"in s?s.movementY:xm}}),I1=_r(Yf),RO=g({},Yf,{dataTransfer:0}),DO=_r(RO),FO=g({},xh,{relatedTarget:0}),bm=_r(FO),$O=g({},Ao,{animationName:0,elapsedTime:0,pseudoElement:0}),zO=_r($O),qO=g({},Ao,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),IO=_r(qO),PO=g({},Ao,{data:0}),P1=_r(PO),HO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UO={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},WO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YO(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=WO[s])?!!l[s]:!1}function vm(){return YO}var GO=g({},xh,{key:function(s){if(s.key){var l=HO[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Hf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?UO[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vm,charCode:function(s){return s.type==="keypress"?Hf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Hf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),VO=_r(GO),XO=g({},Yf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),H1=_r(XO),QO=g({},xh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vm}),ZO=_r(QO),KO=g({},Ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),JO=_r(KO),tj=g({},Yf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),ej=_r(tj),ij=g({},Ao,{newState:0,oldState:0}),rj=_r(ij),nj=[9,13,27,32],Cm=Ma&&"CompositionEvent"in window,vh=null;Ma&&"documentMode"in document&&(vh=document.documentMode);var aj=Ma&&"TextEvent"in window&&!vh,U1=Ma&&(!Cm||vh&&8<vh&&11>=vh),W1=" ",Y1=!1;function G1(s,l){switch(s){case"keyup":return nj.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V1(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Rl=!1;function sj(s,l){switch(s){case"compositionend":return V1(l);case"keypress":return l.which!==32?null:(Y1=!0,W1);case"textInput":return s=l.data,s===W1&&Y1?null:s;default:return null}}function oj(s,l){if(Rl)return s==="compositionend"||!Cm&&G1(s,l)?(s=z1(),Pf=mm=As=null,Rl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return U1&&l.locale!=="ko"?null:l.data;default:return null}}var lj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function X1(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!lj[s.type]:l==="textarea"}function Q1(s,l,d,m){Ol?jl?jl.push(m):jl=[m]:Ol=m,l=Rd(l,"onChange"),0<l.length&&(d=new Wf("onChange","change",null,d,m),s.push({event:d,listeners:l}))}var Ch=null,kh=null;function cj(s){Nk(s,0)}function Gf(s){var l=_n(s);if(ph(l))return s}function Z1(s,l){if(s==="change")return l}var K1=!1;if(Ma){var km;if(Ma){var _m="oninput"in document;if(!_m){var J1=document.createElement("div");J1.setAttribute("oninput","return;"),_m=typeof J1.oninput=="function"}km=_m}else km=!1;K1=km&&(!document.documentMode||9<document.documentMode)}function tC(){Ch&&(Ch.detachEvent("onpropertychange",eC),kh=Ch=null)}function eC(s){if(s.propertyName==="value"&&Gf(kh)){var l=[];Q1(l,kh,s,dm(s)),$1(cj,l)}}function hj(s,l,d){s==="focusin"?(tC(),Ch=l,kh=d,Ch.attachEvent("onpropertychange",eC)):s==="focusout"&&tC()}function uj(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Gf(kh)}function fj(s,l){if(s==="click")return Gf(l)}function dj(s,l){if(s==="input"||s==="change")return Gf(l)}function pj(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var zr=typeof Object.is=="function"?Object.is:pj;function _h(s,l){if(zr(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var k=d[m];if(!qi.call(l,k)||!zr(s[k],l[k]))return!1}return!0}function iC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function rC(s,l){var d=iC(s);s=0;for(var m;d;){if(d.nodeType===3){if(m=s+d.textContent.length,s<=l&&m>=l)return{node:d,offset:l-s};s=m}t:{for(;d;){if(d.nextSibling){d=d.nextSibling;break t}d=d.parentNode}d=void 0}d=iC(d)}}function nC(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?nC(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function aC(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Bo(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=Bo(s.document)}return l}function Sm(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var gj=Ma&&"documentMode"in document&&11>=document.documentMode,Dl=null,wm=null,Sh=null,Tm=!1;function sC(s,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Tm||Dl==null||Dl!==Bo(m)||(m=Dl,"selectionStart"in m&&Sm(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Sh&&_h(Sh,m)||(Sh=m,m=Rd(wm,"onSelect"),0<m.length&&(l=new Wf("onSelect","select",null,l,d),s.push({event:l,listeners:m}),l.target=Dl)))}function Eo(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var Fl={animationend:Eo("Animation","AnimationEnd"),animationiteration:Eo("Animation","AnimationIteration"),animationstart:Eo("Animation","AnimationStart"),transitionrun:Eo("Transition","TransitionRun"),transitionstart:Eo("Transition","TransitionStart"),transitioncancel:Eo("Transition","TransitionCancel"),transitionend:Eo("Transition","TransitionEnd")},Bm={},oC={};Ma&&(oC=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function Mo(s){if(Bm[s])return Bm[s];if(!Fl[s])return s;var l=Fl[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in oC)return Bm[s]=l[d];return s}var lC=Mo("animationend"),cC=Mo("animationiteration"),hC=Mo("animationstart"),mj=Mo("transitionrun"),yj=Mo("transitionstart"),xj=Mo("transitioncancel"),uC=Mo("transitionend"),fC=new Map,Am="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Am.push("scrollEnd");function Tn(s,l){fC.set(s,l),mt(l,[s])}var Vf=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},tn=[],$l=0,Em=0;function Xf(){for(var s=$l,l=Em=$l=0;l<s;){var d=tn[l];tn[l++]=null;var m=tn[l];tn[l++]=null;var k=tn[l];tn[l++]=null;var S=tn[l];if(tn[l++]=null,m!==null&&k!==null){var L=m.pending;L===null?k.next=k:(k.next=L.next,L.next=k),m.pending=k}S!==0&&dC(d,k,S)}}function Qf(s,l,d,m){tn[$l++]=s,tn[$l++]=l,tn[$l++]=d,tn[$l++]=m,Em|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function Mm(s,l,d,m){return Qf(s,l,d,m),Zf(s)}function Lo(s,l){return Qf(s,null,null,l),Zf(s)}function dC(s,l,d){s.lanes|=d;var m=s.alternate;m!==null&&(m.lanes|=d);for(var k=!1,S=s.return;S!==null;)S.childLanes|=d,m=S.alternate,m!==null&&(m.childLanes|=d),S.tag===22&&(s=S.stateNode,s===null||s._visibility&1||(k=!0)),s=S,S=S.return;return s.tag===3?(S=s.stateNode,k&&l!==null&&(k=31-mi(d),s=S.hiddenUpdates,m=s[k],m===null?s[k]=[l]:m.push(l),l.lane=d|536870912),S):null}function Zf(s){if(50<Yh)throw Yh=0,zy=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var zl={};function bj(s,l,d,m){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(s,l,d,m){return new bj(s,l,d,m)}function Lm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function La(s,l){var d=s.alternate;return d===null?(d=qr(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function pC(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function Kf(s,l,d,m,k,S){var L=0;if(m=s,typeof s=="function")Lm(s)&&(L=1);else if(typeof s=="string")L=S4(s,d,st.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case Y:return s=qr(31,d,l,k),s.elementType=Y,s.lanes=S,s;case C:return No(d.children,k,S,l);case _:L=8,k|=24;break;case w:return s=qr(12,d,l,k|2),s.elementType=w,s.lanes=S,s;case N:return s=qr(13,d,l,k),s.elementType=N,s.lanes=S,s;case R:return s=qr(19,d,l,k),s.elementType=R,s.lanes=S,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case A:L=10;break t;case T:L=9;break t;case E:L=11;break t;case M:L=14;break t;case O:L=16,m=null;break t}L=29,d=Error(n(130,s===null?"null":typeof s,"")),m=null}return l=qr(L,d,l,k),l.elementType=s,l.type=m,l.lanes=S,l}function No(s,l,d,m){return s=qr(7,s,m,l),s.lanes=d,s}function Nm(s,l,d){return s=qr(6,s,null,l),s.lanes=d,s}function gC(s){var l=qr(18,null,null,0);return l.stateNode=s,l}function Om(s,l,d){return l=qr(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var mC=new WeakMap;function en(s,l){if(typeof s=="object"&&s!==null){var d=mC.get(s);return d!==void 0?d:(l={value:s,source:l,stack:ni(l)},mC.set(s,l),l)}return{value:s,source:l,stack:ni(l)}}var ql=[],Il=0,Jf=null,wh=0,rn=[],nn=0,Es=null,ra=1,na="";function Na(s,l){ql[Il++]=wh,ql[Il++]=Jf,Jf=s,wh=l}function yC(s,l,d){rn[nn++]=ra,rn[nn++]=na,rn[nn++]=Es,Es=s;var m=ra;s=na;var k=32-mi(m)-1;m&=~(1<<k),d+=1;var S=32-mi(l)+k;if(30<S){var L=k-k%5;S=(m&(1<<L)-1).toString(32),m>>=L,k-=L,ra=1<<32-mi(l)+k|d<<k|m,na=S+s}else ra=1<<S|d<<k|m,na=s}function jm(s){s.return!==null&&(Na(s,1),yC(s,1,0))}function Rm(s){for(;s===Jf;)Jf=ql[--Il],ql[Il]=null,wh=ql[--Il],ql[Il]=null;for(;s===Es;)Es=rn[--nn],rn[nn]=null,na=rn[--nn],rn[nn]=null,ra=rn[--nn],rn[nn]=null}function xC(s,l){rn[nn++]=ra,rn[nn++]=na,rn[nn++]=Es,ra=l.id,na=l.overflow,Es=s}var Hi=null,Qe=null,xe=!1,Ms=null,an=!1,Dm=Error(n(519));function Ls(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Th(en(l,s)),Dm}function bC(s){var l=s.stateNode,d=s.type,m=s.memoizedProps;switch(l[ai]=s,l[yi]=m,d){case"dialog":pe("cancel",l),pe("close",l);break;case"iframe":case"object":case"embed":pe("load",l);break;case"video":case"audio":for(d=0;d<Vh.length;d++)pe(Vh[d],l);break;case"source":pe("error",l);break;case"img":case"image":case"link":pe("error",l),pe("load",l);break;case"details":pe("toggle",l);break;case"input":pe("invalid",l),ut(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":pe("invalid",l);break;case"textarea":pe("invalid",l),fe(l,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||m.suppressHydrationWarning===!0||Dk(l.textContent,d)?(m.popover!=null&&(pe("beforetoggle",l),pe("toggle",l)),m.onScroll!=null&&pe("scroll",l),m.onScrollEnd!=null&&pe("scrollend",l),m.onClick!=null&&(l.onclick=Ea),l=!0):l=!1,l||Ls(s,!0)}function vC(s){for(Hi=s.return;Hi;)switch(Hi.tag){case 5:case 31:case 13:an=!1;return;case 27:case 3:an=!0;return;default:Hi=Hi.return}}function Pl(s){if(s!==Hi)return!1;if(!xe)return vC(s),xe=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||t0(s.type,s.memoizedProps)),d=!d),d&&Qe&&Ls(s),vC(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Qe=Wk(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));Qe=Wk(s)}else l===27?(l=Qe,Ws(s.type)?(s=a0,a0=null,Qe=s):Qe=l):Qe=Hi?on(s.stateNode.nextSibling):null;return!0}function Oo(){Qe=Hi=null,xe=!1}function Fm(){var s=Ms;return s!==null&&(Br===null?Br=s:Br.push.apply(Br,s),Ms=null),s}function Th(s){Ms===null?Ms=[s]:Ms.push(s)}var $m=P(null),jo=null,Oa=null;function Ns(s,l,d){ot($m,l._currentValue),l._currentValue=d}function ja(s){s._currentValue=$m.current,K($m)}function zm(s,l,d){for(;s!==null;){var m=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),s===d)break;s=s.return}}function qm(s,l,d,m){var k=s.child;for(k!==null&&(k.return=s);k!==null;){var S=k.dependencies;if(S!==null){var L=k.child;S=S.firstContext;t:for(;S!==null;){var z=S;S=k;for(var X=0;X<l.length;X++)if(z.context===l[X]){S.lanes|=d,z=S.alternate,z!==null&&(z.lanes|=d),zm(S.return,d,s),m||(L=null);break t}S=z.next}}else if(k.tag===18){if(L=k.return,L===null)throw Error(n(341));L.lanes|=d,S=L.alternate,S!==null&&(S.lanes|=d),zm(L,d,s),L=null}else L=k.child;if(L!==null)L.return=k;else for(L=k;L!==null;){if(L===s){L=null;break}if(k=L.sibling,k!==null){k.return=L.return,L=k;break}L=L.return}k=L}}function Hl(s,l,d,m){s=null;for(var k=l,S=!1;k!==null;){if(!S){if((k.flags&524288)!==0)S=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var L=k.alternate;if(L===null)throw Error(n(387));if(L=L.memoizedProps,L!==null){var z=k.type;zr(k.pendingProps.value,L.value)||(s!==null?s.push(z):s=[z])}}else if(k===Lt.current){if(L=k.alternate,L===null)throw Error(n(387));L.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(s!==null?s.push(Jh):s=[Jh])}k=k.return}s!==null&&qm(l,s,d,m),l.flags|=262144}function td(s){for(s=s.firstContext;s!==null;){if(!zr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ro(s){jo=s,Oa=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Ui(s){return CC(jo,s)}function ed(s,l){return jo===null&&Ro(s),CC(s,l)}function CC(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Oa===null){if(s===null)throw Error(n(308));Oa=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else Oa=Oa.next=l;return d}var vj=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,m){s.push(m)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},Cj=i.unstable_scheduleCallback,kj=i.unstable_NormalPriority,bi={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Im(){return{controller:new vj,data:new Map,refCount:0}}function Bh(s){s.refCount--,s.refCount===0&&Cj(kj,function(){s.controller.abort()})}var Ah=null,Pm=0,Ul=0,Wl=null;function _j(s,l){if(Ah===null){var d=Ah=[];Pm=0,Ul=Wy(),Wl={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Pm++,l.then(kC,kC),l}function kC(){if(--Pm===0&&Ah!==null){Wl!==null&&(Wl.status="fulfilled");var s=Ah;Ah=null,Ul=0,Wl=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function Sj(s,l){var d=[],m={status:"pending",value:null,reason:null,then:function(k){d.push(k)}};return s.then(function(){m.status="fulfilled",m.value=l;for(var k=0;k<d.length;k++)(0,d[k])(l)},function(k){for(m.status="rejected",m.reason=k,k=0;k<d.length;k++)(0,d[k])(void 0)}),m}var _C=j.S;j.S=function(s,l){sk=Pe(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&_j(s,l),_C!==null&&_C(s,l)};var Do=P(null);function Hm(){var s=Do.current;return s!==null?s:Ge.pooledCache}function id(s,l){l===null?ot(Do,Do.current):ot(Do,l.pool)}function SC(){var s=Hm();return s===null?null:{parent:bi._currentValue,pool:s}}var Yl=Error(n(460)),Um=Error(n(474)),rd=Error(n(542)),nd={then:function(){}};function wC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function TC(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(Ea,Ea),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,AC(s),s;default:if(typeof l.status=="string")l.then(Ea,Ea);else{if(s=Ge,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(m){if(l.status==="pending"){var k=l;k.status="fulfilled",k.value=m}},function(m){if(l.status==="pending"){var k=l;k.status="rejected",k.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,AC(s),s}throw $o=l,Yl}}function Fo(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?($o=d,Yl):d}}var $o=null;function BC(){if($o===null)throw Error(n(459));var s=$o;return $o=null,s}function AC(s){if(s===Yl||s===rd)throw Error(n(483))}var Gl=null,Eh=0;function ad(s){var l=Eh;return Eh+=1,Gl===null&&(Gl=[]),TC(Gl,s,l)}function Mh(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function sd(s,l){throw l.$$typeof===x?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function EC(s){function l(nt,et){if(s){var lt=nt.deletions;lt===null?(nt.deletions=[et],nt.flags|=16):lt.push(et)}}function d(nt,et){if(!s)return null;for(;et!==null;)l(nt,et),et=et.sibling;return null}function m(nt){for(var et=new Map;nt!==null;)nt.key!==null?et.set(nt.key,nt):et.set(nt.index,nt),nt=nt.sibling;return et}function k(nt,et){return nt=La(nt,et),nt.index=0,nt.sibling=null,nt}function S(nt,et,lt){return nt.index=lt,s?(lt=nt.alternate,lt!==null?(lt=lt.index,lt<et?(nt.flags|=67108866,et):lt):(nt.flags|=67108866,et)):(nt.flags|=1048576,et)}function L(nt){return s&&nt.alternate===null&&(nt.flags|=67108866),nt}function z(nt,et,lt,xt){return et===null||et.tag!==6?(et=Nm(lt,nt.mode,xt),et.return=nt,et):(et=k(et,lt),et.return=nt,et)}function X(nt,et,lt,xt){var Yt=lt.type;return Yt===C?yt(nt,et,lt.props.children,xt,lt.key):et!==null&&(et.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===O&&Fo(Yt)===et.type)?(et=k(et,lt.props),Mh(et,lt),et.return=nt,et):(et=Kf(lt.type,lt.key,lt.props,null,nt.mode,xt),Mh(et,lt),et.return=nt,et)}function ct(nt,et,lt,xt){return et===null||et.tag!==4||et.stateNode.containerInfo!==lt.containerInfo||et.stateNode.implementation!==lt.implementation?(et=Om(lt,nt.mode,xt),et.return=nt,et):(et=k(et,lt.children||[]),et.return=nt,et)}function yt(nt,et,lt,xt,Yt){return et===null||et.tag!==7?(et=No(lt,nt.mode,xt,Yt),et.return=nt,et):(et=k(et,lt),et.return=nt,et)}function vt(nt,et,lt){if(typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint")return et=Nm(""+et,nt.mode,lt),et.return=nt,et;if(typeof et=="object"&&et!==null){switch(et.$$typeof){case y:return lt=Kf(et.type,et.key,et.props,null,nt.mode,lt),Mh(lt,et),lt.return=nt,lt;case v:return et=Om(et,nt.mode,lt),et.return=nt,et;case O:return et=Fo(et),vt(nt,et,lt)}if(U(et)||J(et))return et=No(et,nt.mode,lt,null),et.return=nt,et;if(typeof et.then=="function")return vt(nt,ad(et),lt);if(et.$$typeof===A)return vt(nt,ed(nt,et),lt);sd(nt,et)}return null}function ht(nt,et,lt,xt){var Yt=et!==null?et.key:null;if(typeof lt=="string"&&lt!==""||typeof lt=="number"||typeof lt=="bigint")return Yt!==null?null:z(nt,et,""+lt,xt);if(typeof lt=="object"&&lt!==null){switch(lt.$$typeof){case y:return lt.key===Yt?X(nt,et,lt,xt):null;case v:return lt.key===Yt?ct(nt,et,lt,xt):null;case O:return lt=Fo(lt),ht(nt,et,lt,xt)}if(U(lt)||J(lt))return Yt!==null?null:yt(nt,et,lt,xt,null);if(typeof lt.then=="function")return ht(nt,et,ad(lt),xt);if(lt.$$typeof===A)return ht(nt,et,ed(nt,lt),xt);sd(nt,lt)}return null}function dt(nt,et,lt,xt,Yt){if(typeof xt=="string"&&xt!==""||typeof xt=="number"||typeof xt=="bigint")return nt=nt.get(lt)||null,z(et,nt,""+xt,Yt);if(typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case y:return nt=nt.get(xt.key===null?lt:xt.key)||null,X(et,nt,xt,Yt);case v:return nt=nt.get(xt.key===null?lt:xt.key)||null,ct(et,nt,xt,Yt);case O:return xt=Fo(xt),dt(nt,et,lt,xt,Yt)}if(U(xt)||J(xt))return nt=nt.get(lt)||null,yt(et,nt,xt,Yt,null);if(typeof xt.then=="function")return dt(nt,et,lt,ad(xt),Yt);if(xt.$$typeof===A)return dt(nt,et,lt,ed(et,xt),Yt);sd(et,xt)}return null}function Rt(nt,et,lt,xt){for(var Yt=null,Te=null,zt=et,le=et=0,me=null;zt!==null&&le<lt.length;le++){zt.index>le?(me=zt,zt=null):me=zt.sibling;var Be=ht(nt,zt,lt[le],xt);if(Be===null){zt===null&&(zt=me);break}s&&zt&&Be.alternate===null&&l(nt,zt),et=S(Be,et,le),Te===null?Yt=Be:Te.sibling=Be,Te=Be,zt=me}if(le===lt.length)return d(nt,zt),xe&&Na(nt,le),Yt;if(zt===null){for(;le<lt.length;le++)zt=vt(nt,lt[le],xt),zt!==null&&(et=S(zt,et,le),Te===null?Yt=zt:Te.sibling=zt,Te=zt);return xe&&Na(nt,le),Yt}for(zt=m(zt);le<lt.length;le++)me=dt(zt,nt,le,lt[le],xt),me!==null&&(s&&me.alternate!==null&&zt.delete(me.key===null?le:me.key),et=S(me,et,le),Te===null?Yt=me:Te.sibling=me,Te=me);return s&&zt.forEach(function(Qs){return l(nt,Qs)}),xe&&Na(nt,le),Yt}function Kt(nt,et,lt,xt){if(lt==null)throw Error(n(151));for(var Yt=null,Te=null,zt=et,le=et=0,me=null,Be=lt.next();zt!==null&&!Be.done;le++,Be=lt.next()){zt.index>le?(me=zt,zt=null):me=zt.sibling;var Qs=ht(nt,zt,Be.value,xt);if(Qs===null){zt===null&&(zt=me);break}s&&zt&&Qs.alternate===null&&l(nt,zt),et=S(Qs,et,le),Te===null?Yt=Qs:Te.sibling=Qs,Te=Qs,zt=me}if(Be.done)return d(nt,zt),xe&&Na(nt,le),Yt;if(zt===null){for(;!Be.done;le++,Be=lt.next())Be=vt(nt,Be.value,xt),Be!==null&&(et=S(Be,et,le),Te===null?Yt=Be:Te.sibling=Be,Te=Be);return xe&&Na(nt,le),Yt}for(zt=m(zt);!Be.done;le++,Be=lt.next())Be=dt(zt,nt,le,Be.value,xt),Be!==null&&(s&&Be.alternate!==null&&zt.delete(Be.key===null?le:Be.key),et=S(Be,et,le),Te===null?Yt=Be:Te.sibling=Be,Te=Be);return s&&zt.forEach(function(R4){return l(nt,R4)}),xe&&Na(nt,le),Yt}function Ye(nt,et,lt,xt){if(typeof lt=="object"&&lt!==null&&lt.type===C&&lt.key===null&&(lt=lt.props.children),typeof lt=="object"&&lt!==null){switch(lt.$$typeof){case y:t:{for(var Yt=lt.key;et!==null;){if(et.key===Yt){if(Yt=lt.type,Yt===C){if(et.tag===7){d(nt,et.sibling),xt=k(et,lt.props.children),xt.return=nt,nt=xt;break t}}else if(et.elementType===Yt||typeof Yt=="object"&&Yt!==null&&Yt.$$typeof===O&&Fo(Yt)===et.type){d(nt,et.sibling),xt=k(et,lt.props),Mh(xt,lt),xt.return=nt,nt=xt;break t}d(nt,et);break}else l(nt,et);et=et.sibling}lt.type===C?(xt=No(lt.props.children,nt.mode,xt,lt.key),xt.return=nt,nt=xt):(xt=Kf(lt.type,lt.key,lt.props,null,nt.mode,xt),Mh(xt,lt),xt.return=nt,nt=xt)}return L(nt);case v:t:{for(Yt=lt.key;et!==null;){if(et.key===Yt)if(et.tag===4&&et.stateNode.containerInfo===lt.containerInfo&&et.stateNode.implementation===lt.implementation){d(nt,et.sibling),xt=k(et,lt.children||[]),xt.return=nt,nt=xt;break t}else{d(nt,et);break}else l(nt,et);et=et.sibling}xt=Om(lt,nt.mode,xt),xt.return=nt,nt=xt}return L(nt);case O:return lt=Fo(lt),Ye(nt,et,lt,xt)}if(U(lt))return Rt(nt,et,lt,xt);if(J(lt)){if(Yt=J(lt),typeof Yt!="function")throw Error(n(150));return lt=Yt.call(lt),Kt(nt,et,lt,xt)}if(typeof lt.then=="function")return Ye(nt,et,ad(lt),xt);if(lt.$$typeof===A)return Ye(nt,et,ed(nt,lt),xt);sd(nt,lt)}return typeof lt=="string"&&lt!==""||typeof lt=="number"||typeof lt=="bigint"?(lt=""+lt,et!==null&&et.tag===6?(d(nt,et.sibling),xt=k(et,lt),xt.return=nt,nt=xt):(d(nt,et),xt=Nm(lt,nt.mode,xt),xt.return=nt,nt=xt),L(nt)):d(nt,et)}return function(nt,et,lt,xt){try{Eh=0;var Yt=Ye(nt,et,lt,xt);return Gl=null,Yt}catch(zt){if(zt===Yl||zt===rd)throw zt;var Te=qr(29,zt,null,nt.mode);return Te.lanes=xt,Te.return=nt,Te}finally{}}}var zo=EC(!0),MC=EC(!1),Os=!1;function Wm(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ym(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function js(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Rs(s,l,d){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(Le&2)!==0){var k=m.pending;return k===null?l.next=l:(l.next=k.next,k.next=l),m.pending=l,l=Zf(s),dC(s,null,d),l}return Qf(s,m,l,d),Zf(s)}function Lh(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,ks(s,d)}}function Gm(s,l){var d=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var k=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var L={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};S===null?k=S=L:S=S.next=L,d=d.next}while(d!==null);S===null?k=S=l:S=S.next=l}else k=S=l;d={baseState:m.baseState,firstBaseUpdate:k,lastBaseUpdate:S,shared:m.shared,callbacks:m.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var Vm=!1;function Nh(){if(Vm){var s=Wl;if(s!==null)throw s}}function Oh(s,l,d,m){Vm=!1;var k=s.updateQueue;Os=!1;var S=k.firstBaseUpdate,L=k.lastBaseUpdate,z=k.shared.pending;if(z!==null){k.shared.pending=null;var X=z,ct=X.next;X.next=null,L===null?S=ct:L.next=ct,L=X;var yt=s.alternate;yt!==null&&(yt=yt.updateQueue,z=yt.lastBaseUpdate,z!==L&&(z===null?yt.firstBaseUpdate=ct:z.next=ct,yt.lastBaseUpdate=X))}if(S!==null){var vt=k.baseState;L=0,yt=ct=X=null,z=S;do{var ht=z.lane&-536870913,dt=ht!==z.lane;if(dt?(ge&ht)===ht:(m&ht)===ht){ht!==0&&ht===Ul&&(Vm=!0),yt!==null&&(yt=yt.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});t:{var Rt=s,Kt=z;ht=l;var Ye=d;switch(Kt.tag){case 1:if(Rt=Kt.payload,typeof Rt=="function"){vt=Rt.call(Ye,vt,ht);break t}vt=Rt;break t;case 3:Rt.flags=Rt.flags&-65537|128;case 0:if(Rt=Kt.payload,ht=typeof Rt=="function"?Rt.call(Ye,vt,ht):Rt,ht==null)break t;vt=g({},vt,ht);break t;case 2:Os=!0}}ht=z.callback,ht!==null&&(s.flags|=64,dt&&(s.flags|=8192),dt=k.callbacks,dt===null?k.callbacks=[ht]:dt.push(ht))}else dt={lane:ht,tag:z.tag,payload:z.payload,callback:z.callback,next:null},yt===null?(ct=yt=dt,X=vt):yt=yt.next=dt,L|=ht;if(z=z.next,z===null){if(z=k.shared.pending,z===null)break;dt=z,z=dt.next,dt.next=null,k.lastBaseUpdate=dt,k.shared.pending=null}}while(!0);yt===null&&(X=vt),k.baseState=X,k.firstBaseUpdate=ct,k.lastBaseUpdate=yt,S===null&&(k.shared.lanes=0),qs|=L,s.lanes=L,s.memoizedState=vt}}function LC(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function NC(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)LC(d[s],l)}var Vl=P(null),od=P(0);function OC(s,l){s=Ha,ot(od,s),ot(Vl,l),Ha=s|l.baseLanes}function Xm(){ot(od,Ha),ot(Vl,Vl.current)}function Qm(){Ha=od.current,K(Vl),K(od)}var Ir=P(null),sn=null;function Ds(s){var l=s.alternate;ot(di,di.current&1),ot(Ir,s),sn===null&&(l===null||Vl.current!==null||l.memoizedState!==null)&&(sn=s)}function Zm(s){ot(di,di.current),ot(Ir,s),sn===null&&(sn=s)}function jC(s){s.tag===22?(ot(di,di.current),ot(Ir,s),sn===null&&(sn=s)):Fs()}function Fs(){ot(di,di.current),ot(Ir,Ir.current)}function Pr(s){K(Ir),sn===s&&(sn=null),K(di)}var di=P(0);function ld(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||r0(d)||n0(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Ra=0,oe=null,Ue=null,vi=null,cd=!1,Xl=!1,qo=!1,hd=0,jh=0,Ql=null,wj=0;function li(){throw Error(n(321))}function Km(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!zr(s[d],l[d]))return!1;return!0}function Jm(s,l,d,m,k,S){return Ra=S,oe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,j.H=s===null||s.memoizedState===null?y2:py,qo=!1,S=d(m,k),qo=!1,Xl&&(S=DC(l,d,m,k)),RC(s),S}function RC(s){j.H=Fh;var l=Ue!==null&&Ue.next!==null;if(Ra=0,vi=Ue=oe=null,cd=!1,jh=0,Ql=null,l)throw Error(n(300));s===null||Ci||(s=s.dependencies,s!==null&&td(s)&&(Ci=!0))}function DC(s,l,d,m){oe=s;var k=0;do{if(Xl&&(Ql=null),jh=0,Xl=!1,25<=k)throw Error(n(301));if(k+=1,vi=Ue=null,s.updateQueue!=null){var S=s.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}j.H=x2,S=l(d,m)}while(Xl);return S}function Tj(){var s=j.H,l=s.useState()[0];return l=typeof l.then=="function"?Rh(l):l,s=s.useState()[0],(Ue!==null?Ue.memoizedState:null)!==s&&(oe.flags|=1024),l}function ty(){var s=hd!==0;return hd=0,s}function ey(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function iy(s){if(cd){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}cd=!1}Ra=0,vi=Ue=oe=null,Xl=!1,jh=hd=0,Ql=null}function ur(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vi===null?oe.memoizedState=vi=s:vi=vi.next=s,vi}function pi(){if(Ue===null){var s=oe.alternate;s=s!==null?s.memoizedState:null}else s=Ue.next;var l=vi===null?oe.memoizedState:vi.next;if(l!==null)vi=l,Ue=s;else{if(s===null)throw oe.alternate===null?Error(n(467)):Error(n(310));Ue=s,s={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},vi===null?oe.memoizedState=vi=s:vi=vi.next=s}return vi}function ud(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rh(s){var l=jh;return jh+=1,Ql===null&&(Ql=[]),s=TC(Ql,s,l),l=oe,(vi===null?l.memoizedState:vi.next)===null&&(l=l.alternate,j.H=l===null||l.memoizedState===null?y2:py),s}function fd(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Rh(s);if(s.$$typeof===A)return Ui(s)}throw Error(n(438,String(s)))}function ry(s){var l=null,d=oe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var m=oe.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(k){return k.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=ud(),oe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),m=0;m<s;m++)d[m]=$;return l.index++,d}function Da(s,l){return typeof l=="function"?l(s):l}function dd(s){var l=pi();return ny(l,Ue,s)}function ny(s,l,d){var m=s.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=d;var k=s.baseQueue,S=m.pending;if(S!==null){if(k!==null){var L=k.next;k.next=S.next,S.next=L}l.baseQueue=k=S,m.pending=null}if(S=s.baseState,k===null)s.memoizedState=S;else{l=k.next;var z=L=null,X=null,ct=l,yt=!1;do{var vt=ct.lane&-536870913;if(vt!==ct.lane?(ge&vt)===vt:(Ra&vt)===vt){var ht=ct.revertLane;if(ht===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null}),vt===Ul&&(yt=!0);else if((Ra&ht)===ht){ct=ct.next,ht===Ul&&(yt=!0);continue}else vt={lane:0,revertLane:ct.revertLane,gesture:null,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},X===null?(z=X=vt,L=S):X=X.next=vt,oe.lanes|=ht,qs|=ht;vt=ct.action,qo&&d(S,vt),S=ct.hasEagerState?ct.eagerState:d(S,vt)}else ht={lane:vt,revertLane:ct.revertLane,gesture:ct.gesture,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null},X===null?(z=X=ht,L=S):X=X.next=ht,oe.lanes|=vt,qs|=vt;ct=ct.next}while(ct!==null&&ct!==l);if(X===null?L=S:X.next=z,!zr(S,s.memoizedState)&&(Ci=!0,yt&&(d=Wl,d!==null)))throw d;s.memoizedState=S,s.baseState=L,s.baseQueue=X,m.lastRenderedState=S}return k===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function ay(s){var l=pi(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var m=d.dispatch,k=d.pending,S=l.memoizedState;if(k!==null){d.pending=null;var L=k=k.next;do S=s(S,L.action),L=L.next;while(L!==k);zr(S,l.memoizedState)||(Ci=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),d.lastRenderedState=S}return[S,m]}function FC(s,l,d){var m=oe,k=pi(),S=xe;if(S){if(d===void 0)throw Error(n(407));d=d()}else d=l();var L=!zr((Ue||k).memoizedState,d);if(L&&(k.memoizedState=d,Ci=!0),k=k.queue,ly(qC.bind(null,m,k,s),[s]),k.getSnapshot!==l||L||vi!==null&&vi.memoizedState.tag&1){if(m.flags|=2048,Zl(9,{destroy:void 0},zC.bind(null,m,k,d,l),null),Ge===null)throw Error(n(349));S||(Ra&127)!==0||$C(m,l,d)}return d}function $C(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=oe.updateQueue,l===null?(l=ud(),oe.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function zC(s,l,d,m){l.value=d,l.getSnapshot=m,IC(l)&&PC(s)}function qC(s,l,d){return d(function(){IC(l)&&PC(s)})}function IC(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!zr(s,d)}catch{return!0}}function PC(s){var l=Lo(s,2);l!==null&&Ar(l,s,2)}function sy(s){var l=ur();if(typeof s=="function"){var d=s;if(s=d(),qo){Fr(!0);try{d()}finally{Fr(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:s},l}function HC(s,l,d,m){return s.baseState=d,ny(s,Ue,typeof m=="function"?m:Da)}function Bj(s,l,d,m,k){if(md(s))throw Error(n(485));if(s=l.action,s!==null){var S={payload:k,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){S.listeners.push(L)}};j.T!==null?d(!0):S.isTransition=!1,m(S),d=l.pending,d===null?(S.next=l.pending=S,UC(l,S)):(S.next=d.next,l.pending=d.next=S)}}function UC(s,l){var d=l.action,m=l.payload,k=s.state;if(l.isTransition){var S=j.T,L={};j.T=L;try{var z=d(k,m),X=j.S;X!==null&&X(L,z),WC(s,l,z)}catch(ct){oy(s,l,ct)}finally{S!==null&&L.types!==null&&(S.types=L.types),j.T=S}}else try{S=d(k,m),WC(s,l,S)}catch(ct){oy(s,l,ct)}}function WC(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){YC(s,l,m)},function(m){return oy(s,l,m)}):YC(s,l,d)}function YC(s,l,d){l.status="fulfilled",l.value=d,GC(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,UC(s,d)))}function oy(s,l,d){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=d,GC(l),l=l.next;while(l!==m)}s.action=null}function GC(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function VC(s,l){return l}function XC(s,l){if(xe){var d=Ge.formState;if(d!==null){t:{var m=oe;if(xe){if(Qe){e:{for(var k=Qe,S=an;k.nodeType!==8;){if(!S){k=null;break e}if(k=on(k.nextSibling),k===null){k=null;break e}}S=k.data,k=S==="F!"||S==="F"?k:null}if(k){Qe=on(k.nextSibling),m=k.data==="F!";break t}}Ls(m)}m=!1}m&&(l=d[0])}}return d=ur(),d.memoizedState=d.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:VC,lastRenderedState:l},d.queue=m,d=p2.bind(null,oe,m),m.dispatch=d,m=sy(!1),S=dy.bind(null,oe,!1,m.queue),m=ur(),k={state:l,dispatch:null,action:s,pending:null},m.queue=k,d=Bj.bind(null,oe,k,S,d),k.dispatch=d,m.memoizedState=s,[l,d,!1]}function QC(s){var l=pi();return ZC(l,Ue,s)}function ZC(s,l,d){if(l=ny(s,l,VC)[0],s=dd(Da)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=Rh(l)}catch(L){throw L===Yl?rd:L}else m=l;l=pi();var k=l.queue,S=k.dispatch;return d!==l.memoizedState&&(oe.flags|=2048,Zl(9,{destroy:void 0},Aj.bind(null,k,d),null)),[m,S,s]}function Aj(s,l){s.action=l}function KC(s){var l=pi(),d=Ue;if(d!==null)return ZC(l,d,s);pi(),l=l.memoizedState,d=pi();var m=d.queue.dispatch;return d.memoizedState=s,[l,m,!1]}function Zl(s,l,d,m){return s={tag:s,create:d,deps:m,inst:l,next:null},l=oe.updateQueue,l===null&&(l=ud(),oe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(m=d.next,d.next=s,s.next=m,l.lastEffect=s),s}function JC(){return pi().memoizedState}function pd(s,l,d,m){var k=ur();oe.flags|=s,k.memoizedState=Zl(1|l,{destroy:void 0},d,m===void 0?null:m)}function gd(s,l,d,m){var k=pi();m=m===void 0?null:m;var S=k.memoizedState.inst;Ue!==null&&m!==null&&Km(m,Ue.memoizedState.deps)?k.memoizedState=Zl(l,S,d,m):(oe.flags|=s,k.memoizedState=Zl(1|l,S,d,m))}function t2(s,l){pd(8390656,8,s,l)}function ly(s,l){gd(2048,8,s,l)}function Ej(s){oe.flags|=4;var l=oe.updateQueue;if(l===null)l=ud(),oe.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function e2(s){var l=pi().memoizedState;return Ej({ref:l,nextImpl:s}),function(){if((Le&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function i2(s,l){return gd(4,2,s,l)}function r2(s,l){return gd(4,4,s,l)}function n2(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function a2(s,l,d){d=d!=null?d.concat([s]):null,gd(4,4,n2.bind(null,l,s),d)}function cy(){}function s2(s,l){var d=pi();l=l===void 0?null:l;var m=d.memoizedState;return l!==null&&Km(l,m[1])?m[0]:(d.memoizedState=[s,l],s)}function o2(s,l){var d=pi();l=l===void 0?null:l;var m=d.memoizedState;if(l!==null&&Km(l,m[1]))return m[0];if(m=s(),qo){Fr(!0);try{s()}finally{Fr(!1)}}return d.memoizedState=[m,l],m}function hy(s,l,d){return d===void 0||(Ra&1073741824)!==0&&(ge&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=lk(),oe.lanes|=s,qs|=s,d)}function l2(s,l,d,m){return zr(d,l)?d:Vl.current!==null?(s=hy(s,d,m),zr(s,l)||(Ci=!0),s):(Ra&42)===0||(Ra&1073741824)!==0&&(ge&261930)===0?(Ci=!0,s.memoizedState=d):(s=lk(),oe.lanes|=s,qs|=s,l)}function c2(s,l,d,m,k){var S=I.p;I.p=S!==0&&8>S?S:8;var L=j.T,z={};j.T=z,dy(s,!1,l,d);try{var X=k(),ct=j.S;if(ct!==null&&ct(z,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var yt=Sj(X,m);Dh(s,l,yt,Wr(s))}else Dh(s,l,m,Wr(s))}catch(vt){Dh(s,l,{then:function(){},status:"rejected",reason:vt},Wr())}finally{I.p=S,L!==null&&z.types!==null&&(L.types=z.types),j.T=L}}function Mj(){}function uy(s,l,d,m){if(s.tag!==5)throw Error(n(476));var k=h2(s).queue;c2(s,k,l,H,d===null?Mj:function(){return u2(s),d(m)})}function h2(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:H},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function u2(s){var l=h2(s);l.next===null&&(l=s.alternate.memoizedState),Dh(s,l.next.queue,{},Wr())}function fy(){return Ui(Jh)}function f2(){return pi().memoizedState}function d2(){return pi().memoizedState}function Lj(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Wr();s=js(d);var m=Rs(l,s,d);m!==null&&(Ar(m,l,d),Lh(m,l,d)),l={cache:Im()},s.payload=l;return}l=l.return}}function Nj(s,l,d){var m=Wr();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},md(s)?g2(l,d):(d=Mm(s,l,d,m),d!==null&&(Ar(d,s,m),m2(d,l,m)))}function p2(s,l,d){var m=Wr();Dh(s,l,d,m)}function Dh(s,l,d,m){var k={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(md(s))g2(l,k);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var L=l.lastRenderedState,z=S(L,d);if(k.hasEagerState=!0,k.eagerState=z,zr(z,L))return Qf(s,l,k,0),Ge===null&&Xf(),!1}catch{}finally{}if(d=Mm(s,l,k,m),d!==null)return Ar(d,s,m),m2(d,l,m),!0}return!1}function dy(s,l,d,m){if(m={lane:2,revertLane:Wy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},md(s)){if(l)throw Error(n(479))}else l=Mm(s,d,m,2),l!==null&&Ar(l,s,2)}function md(s){var l=s.alternate;return s===oe||l!==null&&l===oe}function g2(s,l){Xl=cd=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function m2(s,l,d){if((d&4194048)!==0){var m=l.lanes;m&=s.pendingLanes,d|=m,l.lanes=d,ks(s,d)}}var Fh={readContext:Ui,use:fd,useCallback:li,useContext:li,useEffect:li,useImperativeHandle:li,useLayoutEffect:li,useInsertionEffect:li,useMemo:li,useReducer:li,useRef:li,useState:li,useDebugValue:li,useDeferredValue:li,useTransition:li,useSyncExternalStore:li,useId:li,useHostTransitionStatus:li,useFormState:li,useActionState:li,useOptimistic:li,useMemoCache:li,useCacheRefresh:li};Fh.useEffectEvent=li;var y2={readContext:Ui,use:fd,useCallback:function(s,l){return ur().memoizedState=[s,l===void 0?null:l],s},useContext:Ui,useEffect:t2,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,pd(4194308,4,n2.bind(null,l,s),d)},useLayoutEffect:function(s,l){return pd(4194308,4,s,l)},useInsertionEffect:function(s,l){pd(4,2,s,l)},useMemo:function(s,l){var d=ur();l=l===void 0?null:l;var m=s();if(qo){Fr(!0);try{s()}finally{Fr(!1)}}return d.memoizedState=[m,l],m},useReducer:function(s,l,d){var m=ur();if(d!==void 0){var k=d(l);if(qo){Fr(!0);try{d(l)}finally{Fr(!1)}}}else k=l;return m.memoizedState=m.baseState=k,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:k},m.queue=s,s=s.dispatch=Nj.bind(null,oe,s),[m.memoizedState,s]},useRef:function(s){var l=ur();return s={current:s},l.memoizedState=s},useState:function(s){s=sy(s);var l=s.queue,d=p2.bind(null,oe,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:cy,useDeferredValue:function(s,l){var d=ur();return hy(d,s,l)},useTransition:function(){var s=sy(!1);return s=c2.bind(null,oe,s.queue,!0,!1),ur().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var m=oe,k=ur();if(xe){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),Ge===null)throw Error(n(349));(ge&127)!==0||$C(m,l,d)}k.memoizedState=d;var S={value:d,getSnapshot:l};return k.queue=S,t2(qC.bind(null,m,S,s),[s]),m.flags|=2048,Zl(9,{destroy:void 0},zC.bind(null,m,S,d,l),null),d},useId:function(){var s=ur(),l=Ge.identifierPrefix;if(xe){var d=na,m=ra;d=(m&~(1<<32-mi(m)-1)).toString(32)+d,l="_"+l+"R_"+d,d=hd++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=wj++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:fy,useFormState:XC,useActionState:XC,useOptimistic:function(s){var l=ur();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=dy.bind(null,oe,!0,d),d.dispatch=l,[s,l]},useMemoCache:ry,useCacheRefresh:function(){return ur().memoizedState=Lj.bind(null,oe)},useEffectEvent:function(s){var l=ur(),d={impl:s};return l.memoizedState=d,function(){if((Le&2)!==0)throw Error(n(440));return d.impl.apply(void 0,arguments)}}},py={readContext:Ui,use:fd,useCallback:s2,useContext:Ui,useEffect:ly,useImperativeHandle:a2,useInsertionEffect:i2,useLayoutEffect:r2,useMemo:o2,useReducer:dd,useRef:JC,useState:function(){return dd(Da)},useDebugValue:cy,useDeferredValue:function(s,l){var d=pi();return l2(d,Ue.memoizedState,s,l)},useTransition:function(){var s=dd(Da)[0],l=pi().memoizedState;return[typeof s=="boolean"?s:Rh(s),l]},useSyncExternalStore:FC,useId:f2,useHostTransitionStatus:fy,useFormState:QC,useActionState:QC,useOptimistic:function(s,l){var d=pi();return HC(d,Ue,s,l)},useMemoCache:ry,useCacheRefresh:d2};py.useEffectEvent=e2;var x2={readContext:Ui,use:fd,useCallback:s2,useContext:Ui,useEffect:ly,useImperativeHandle:a2,useInsertionEffect:i2,useLayoutEffect:r2,useMemo:o2,useReducer:ay,useRef:JC,useState:function(){return ay(Da)},useDebugValue:cy,useDeferredValue:function(s,l){var d=pi();return Ue===null?hy(d,s,l):l2(d,Ue.memoizedState,s,l)},useTransition:function(){var s=ay(Da)[0],l=pi().memoizedState;return[typeof s=="boolean"?s:Rh(s),l]},useSyncExternalStore:FC,useId:f2,useHostTransitionStatus:fy,useFormState:KC,useActionState:KC,useOptimistic:function(s,l){var d=pi();return Ue!==null?HC(d,Ue,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:ry,useCacheRefresh:d2};x2.useEffectEvent=e2;function gy(s,l,d,m){l=s.memoizedState,d=d(m,l),d=d==null?l:g({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var my={enqueueSetState:function(s,l,d){s=s._reactInternals;var m=Wr(),k=js(m);k.payload=l,d!=null&&(k.callback=d),l=Rs(s,k,m),l!==null&&(Ar(l,s,m),Lh(l,s,m))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var m=Wr(),k=js(m);k.tag=1,k.payload=l,d!=null&&(k.callback=d),l=Rs(s,k,m),l!==null&&(Ar(l,s,m),Lh(l,s,m))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Wr(),m=js(d);m.tag=2,l!=null&&(m.callback=l),l=Rs(s,m,d),l!==null&&(Ar(l,s,d),Lh(l,s,d))}};function b2(s,l,d,m,k,S,L){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,S,L):l.prototype&&l.prototype.isPureReactComponent?!_h(d,m)||!_h(k,S):!0}function v2(s,l,d,m){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==s&&my.enqueueReplaceState(l,l.state,null)}function Io(s,l){var d=l;if("ref"in l){d={};for(var m in l)m!=="ref"&&(d[m]=l[m])}if(s=s.defaultProps){d===l&&(d=g({},d));for(var k in s)d[k]===void 0&&(d[k]=s[k])}return d}function C2(s){Vf(s)}function k2(s){console.error(s)}function _2(s){Vf(s)}function yd(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function S2(s,l,d){try{var m=s.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function yy(s,l,d){return d=js(d),d.tag=3,d.payload={element:null},d.callback=function(){yd(s,l)},d}function w2(s){return s=js(s),s.tag=3,s}function T2(s,l,d,m){var k=d.type.getDerivedStateFromError;if(typeof k=="function"){var S=m.value;s.payload=function(){return k(S)},s.callback=function(){S2(l,d,m)}}var L=d.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(s.callback=function(){S2(l,d,m),typeof k!="function"&&(Is===null?Is=new Set([this]):Is.add(this));var z=m.stack;this.componentDidCatch(m.value,{componentStack:z!==null?z:""})})}function Oj(s,l,d,m,k){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=d.alternate,l!==null&&Hl(l,d,k,!0),d=Ir.current,d!==null){switch(d.tag){case 31:case 13:return sn===null?Ed():d.alternate===null&&ci===0&&(ci=3),d.flags&=-257,d.flags|=65536,d.lanes=k,m===nd?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([m]):l.add(m),Py(s,m,k)),!1;case 22:return d.flags|=65536,m===nd?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([m]):d.add(m)),Py(s,m,k)),!1}throw Error(n(435,d.tag))}return Py(s,m,k),Ed(),!1}if(xe)return l=Ir.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=k,m!==Dm&&(s=Error(n(422),{cause:m}),Th(en(s,d)))):(m!==Dm&&(l=Error(n(423),{cause:m}),Th(en(l,d))),s=s.current.alternate,s.flags|=65536,k&=-k,s.lanes|=k,m=en(m,d),k=yy(s.stateNode,m,k),Gm(s,k),ci!==4&&(ci=2)),!1;var S=Error(n(520),{cause:m});if(S=en(S,d),Wh===null?Wh=[S]:Wh.push(S),ci!==4&&(ci=2),l===null)return!0;m=en(m,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=k&-k,d.lanes|=s,s=yy(d.stateNode,m,s),Gm(d,s),!1;case 1:if(l=d.type,S=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Is===null||!Is.has(S))))return d.flags|=65536,k&=-k,d.lanes|=k,k=w2(k),T2(k,s,d,m),Gm(d,k),!1}d=d.return}while(d!==null);return!1}var xy=Error(n(461)),Ci=!1;function Wi(s,l,d,m){l.child=s===null?MC(l,null,d,m):zo(l,s.child,d,m)}function B2(s,l,d,m,k){d=d.render;var S=l.ref;if("ref"in m){var L={};for(var z in m)z!=="ref"&&(L[z]=m[z])}else L=m;return Ro(l),m=Jm(s,l,d,L,S,k),z=ty(),s!==null&&!Ci?(ey(s,l,k),Fa(s,l,k)):(xe&&z&&jm(l),l.flags|=1,Wi(s,l,m,k),l.child)}function A2(s,l,d,m,k){if(s===null){var S=d.type;return typeof S=="function"&&!Lm(S)&&S.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=S,E2(s,l,S,m,k)):(s=Kf(d.type,null,m,l,l.mode,k),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,!Ty(s,k)){var L=S.memoizedProps;if(d=d.compare,d=d!==null?d:_h,d(L,m)&&s.ref===l.ref)return Fa(s,l,k)}return l.flags|=1,s=La(S,m),s.ref=l.ref,s.return=l,l.child=s}function E2(s,l,d,m,k){if(s!==null){var S=s.memoizedProps;if(_h(S,m)&&s.ref===l.ref)if(Ci=!1,l.pendingProps=m=S,Ty(s,k))(s.flags&131072)!==0&&(Ci=!0);else return l.lanes=s.lanes,Fa(s,l,k)}return by(s,l,d,m,k)}function M2(s,l,d,m){var k=m.children,S=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|d:d,s!==null){for(m=l.child=s.child,k=0;m!==null;)k=k|m.lanes|m.childLanes,m=m.sibling;m=k&~S}else m=0,l.child=null;return L2(s,l,S,d,m)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&id(l,S!==null?S.cachePool:null),S!==null?OC(l,S):Xm(),jC(l);else return m=l.lanes=536870912,L2(s,l,S!==null?S.baseLanes|d:d,d,m)}else S!==null?(id(l,S.cachePool),OC(l,S),Fs(),l.memoizedState=null):(s!==null&&id(l,null),Xm(),Fs());return Wi(s,l,k,d),l.child}function $h(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function L2(s,l,d,m,k){var S=Hm();return S=S===null?null:{parent:bi._currentValue,pool:S},l.memoizedState={baseLanes:d,cachePool:S},s!==null&&id(l,null),Xm(),jC(l),s!==null&&Hl(s,l,m,!0),l.childLanes=k,null}function xd(s,l){return l=vd({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function N2(s,l,d){return zo(l,s.child,null,d),s=xd(l,l.pendingProps),s.flags|=2,Pr(l),l.memoizedState=null,s}function jj(s,l,d){var m=l.pendingProps,k=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(xe){if(m.mode==="hidden")return s=xd(l,m),l.lanes=536870912,$h(null,s);if(Zm(l),(s=Qe)?(s=Uk(s,an),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Es!==null?{id:ra,overflow:na}:null,retryLane:536870912,hydrationErrors:null},d=gC(s),d.return=l,l.child=d,Hi=l,Qe=null)):s=null,s===null)throw Ls(l);return l.lanes=536870912,null}return xd(l,m)}var S=s.memoizedState;if(S!==null){var L=S.dehydrated;if(Zm(l),k)if(l.flags&256)l.flags&=-257,l=N2(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(Ci||Hl(s,l,d,!1),k=(d&s.childLanes)!==0,Ci||k){if(m=Ge,m!==null&&(L=vn(m,d),L!==0&&L!==S.retryLane))throw S.retryLane=L,Lo(s,L),Ar(m,s,L),xy;Ed(),l=N2(s,l,d)}else s=S.treeContext,Qe=on(L.nextSibling),Hi=l,xe=!0,Ms=null,an=!1,s!==null&&xC(l,s),l=xd(l,m),l.flags|=4096;return l}return s=La(s.child,{mode:m.mode,children:m.children}),s.ref=l.ref,l.child=s,s.return=l,s}function bd(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function by(s,l,d,m,k){return Ro(l),d=Jm(s,l,d,m,void 0,k),m=ty(),s!==null&&!Ci?(ey(s,l,k),Fa(s,l,k)):(xe&&m&&jm(l),l.flags|=1,Wi(s,l,d,k),l.child)}function O2(s,l,d,m,k,S){return Ro(l),l.updateQueue=null,d=DC(l,m,d,k),RC(s),m=ty(),s!==null&&!Ci?(ey(s,l,S),Fa(s,l,S)):(xe&&m&&jm(l),l.flags|=1,Wi(s,l,d,S),l.child)}function j2(s,l,d,m,k){if(Ro(l),l.stateNode===null){var S=zl,L=d.contextType;typeof L=="object"&&L!==null&&(S=Ui(L)),S=new d(m,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=my,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=m,S.state=l.memoizedState,S.refs={},Wm(l),L=d.contextType,S.context=typeof L=="object"&&L!==null?Ui(L):zl,S.state=l.memoizedState,L=d.getDerivedStateFromProps,typeof L=="function"&&(gy(l,d,L,m),S.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(L=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),L!==S.state&&my.enqueueReplaceState(S,S.state,null),Oh(l,m,S,k),Nh(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(s===null){S=l.stateNode;var z=l.memoizedProps,X=Io(d,z);S.props=X;var ct=S.context,yt=d.contextType;L=zl,typeof yt=="object"&&yt!==null&&(L=Ui(yt));var vt=d.getDerivedStateFromProps;yt=typeof vt=="function"||typeof S.getSnapshotBeforeUpdate=="function",z=l.pendingProps!==z,yt||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(z||ct!==L)&&v2(l,S,m,L),Os=!1;var ht=l.memoizedState;S.state=ht,Oh(l,m,S,k),Nh(),ct=l.memoizedState,z||ht!==ct||Os?(typeof vt=="function"&&(gy(l,d,vt,m),ct=l.memoizedState),(X=Os||b2(l,d,X,m,ht,ct,L))?(yt||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=ct),S.props=m,S.state=ct,S.context=L,m=X):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{S=l.stateNode,Ym(s,l),L=l.memoizedProps,yt=Io(d,L),S.props=yt,vt=l.pendingProps,ht=S.context,ct=d.contextType,X=zl,typeof ct=="object"&&ct!==null&&(X=Ui(ct)),z=d.getDerivedStateFromProps,(ct=typeof z=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==vt||ht!==X)&&v2(l,S,m,X),Os=!1,ht=l.memoizedState,S.state=ht,Oh(l,m,S,k),Nh();var dt=l.memoizedState;L!==vt||ht!==dt||Os||s!==null&&s.dependencies!==null&&td(s.dependencies)?(typeof z=="function"&&(gy(l,d,z,m),dt=l.memoizedState),(yt=Os||b2(l,d,yt,m,ht,dt,X)||s!==null&&s.dependencies!==null&&td(s.dependencies))?(ct||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(m,dt,X),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(m,dt,X)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=dt),S.props=m,S.state=dt,S.context=X,m=yt):(typeof S.componentDidUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===s.memoizedProps&&ht===s.memoizedState||(l.flags|=1024),m=!1)}return S=m,bd(s,l),m=(l.flags&128)!==0,S||m?(S=l.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,s!==null&&m?(l.child=zo(l,s.child,null,k),l.child=zo(l,null,d,k)):Wi(s,l,d,k),l.memoizedState=S.state,s=l.child):s=Fa(s,l,k),s}function R2(s,l,d,m){return Oo(),l.flags|=256,Wi(s,l,d,m),l.child}var vy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cy(s){return{baseLanes:s,cachePool:SC()}}function ky(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Ur),s}function D2(s,l,d){var m=l.pendingProps,k=!1,S=(l.flags&128)!==0,L;if((L=S)||(L=s!==null&&s.memoizedState===null?!1:(di.current&2)!==0),L&&(k=!0,l.flags&=-129),L=(l.flags&32)!==0,l.flags&=-33,s===null){if(xe){if(k?Ds(l):Fs(),(s=Qe)?(s=Uk(s,an),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Es!==null?{id:ra,overflow:na}:null,retryLane:536870912,hydrationErrors:null},d=gC(s),d.return=l,l.child=d,Hi=l,Qe=null)):s=null,s===null)throw Ls(l);return n0(s)?l.lanes=32:l.lanes=536870912,null}var z=m.children;return m=m.fallback,k?(Fs(),k=l.mode,z=vd({mode:"hidden",children:z},k),m=No(m,k,d,null),z.return=l,m.return=l,z.sibling=m,l.child=z,m=l.child,m.memoizedState=Cy(d),m.childLanes=ky(s,L,d),l.memoizedState=vy,$h(null,m)):(Ds(l),_y(l,z))}var X=s.memoizedState;if(X!==null&&(z=X.dehydrated,z!==null)){if(S)l.flags&256?(Ds(l),l.flags&=-257,l=Sy(s,l,d)):l.memoizedState!==null?(Fs(),l.child=s.child,l.flags|=128,l=null):(Fs(),z=m.fallback,k=l.mode,m=vd({mode:"visible",children:m.children},k),z=No(z,k,d,null),z.flags|=2,m.return=l,z.return=l,m.sibling=z,l.child=m,zo(l,s.child,null,d),m=l.child,m.memoizedState=Cy(d),m.childLanes=ky(s,L,d),l.memoizedState=vy,l=$h(null,m));else if(Ds(l),n0(z)){if(L=z.nextSibling&&z.nextSibling.dataset,L)var ct=L.dgst;L=ct,m=Error(n(419)),m.stack="",m.digest=L,Th({value:m,source:null,stack:null}),l=Sy(s,l,d)}else if(Ci||Hl(s,l,d,!1),L=(d&s.childLanes)!==0,Ci||L){if(L=Ge,L!==null&&(m=vn(L,d),m!==0&&m!==X.retryLane))throw X.retryLane=m,Lo(s,m),Ar(L,s,m),xy;r0(z)||Ed(),l=Sy(s,l,d)}else r0(z)?(l.flags|=192,l.child=s.child,l=null):(s=X.treeContext,Qe=on(z.nextSibling),Hi=l,xe=!0,Ms=null,an=!1,s!==null&&xC(l,s),l=_y(l,m.children),l.flags|=4096);return l}return k?(Fs(),z=m.fallback,k=l.mode,X=s.child,ct=X.sibling,m=La(X,{mode:"hidden",children:m.children}),m.subtreeFlags=X.subtreeFlags&65011712,ct!==null?z=La(ct,z):(z=No(z,k,d,null),z.flags|=2),z.return=l,m.return=l,m.sibling=z,l.child=m,$h(null,m),m=l.child,z=s.child.memoizedState,z===null?z=Cy(d):(k=z.cachePool,k!==null?(X=bi._currentValue,k=k.parent!==X?{parent:X,pool:X}:k):k=SC(),z={baseLanes:z.baseLanes|d,cachePool:k}),m.memoizedState=z,m.childLanes=ky(s,L,d),l.memoizedState=vy,$h(s.child,m)):(Ds(l),d=s.child,s=d.sibling,d=La(d,{mode:"visible",children:m.children}),d.return=l,d.sibling=null,s!==null&&(L=l.deletions,L===null?(l.deletions=[s],l.flags|=16):L.push(s)),l.child=d,l.memoizedState=null,d)}function _y(s,l){return l=vd({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function vd(s,l){return s=qr(22,s,null,l),s.lanes=0,s}function Sy(s,l,d){return zo(l,s.child,null,d),s=_y(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function F2(s,l,d){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l),zm(s.return,l,d)}function wy(s,l,d,m,k,S){var L=s.memoizedState;L===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:k,treeForkCount:S}:(L.isBackwards=l,L.rendering=null,L.renderingStartTime=0,L.last=m,L.tail=d,L.tailMode=k,L.treeForkCount=S)}function $2(s,l,d){var m=l.pendingProps,k=m.revealOrder,S=m.tail;m=m.children;var L=di.current,z=(L&2)!==0;if(z?(L=L&1|2,l.flags|=128):L&=1,ot(di,L),Wi(s,l,m,d),m=xe?wh:0,!z&&s!==null&&(s.flags&128)!==0)t:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&F2(s,d,l);else if(s.tag===19)F2(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break t;for(;s.sibling===null;){if(s.return===null||s.return===l)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(k){case"forwards":for(d=l.child,k=null;d!==null;)s=d.alternate,s!==null&&ld(s)===null&&(k=d),d=d.sibling;d=k,d===null?(k=l.child,l.child=null):(k=d.sibling,d.sibling=null),wy(l,!1,k,d,S,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,k=l.child,l.child=null;k!==null;){if(s=k.alternate,s!==null&&ld(s)===null){l.child=k;break}s=k.sibling,k.sibling=d,d=k,k=s}wy(l,!0,d,null,S,m);break;case"together":wy(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function Fa(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),qs|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Hl(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,d=La(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=La(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function Ty(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&td(s)))}function Rj(s,l,d){switch(l.tag){case 3:at(l,l.stateNode.containerInfo),Ns(l,bi,s.memoizedState.cache),Oo();break;case 27:case 5:gt(l);break;case 4:at(l,l.stateNode.containerInfo);break;case 10:Ns(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Zm(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(Ds(l),l.flags|=128,null):(d&l.child.childLanes)!==0?D2(s,l,d):(Ds(l),s=Fa(s,l,d),s!==null?s.sibling:null);Ds(l);break;case 19:var k=(s.flags&128)!==0;if(m=(d&l.childLanes)!==0,m||(Hl(s,l,d,!1),m=(d&l.childLanes)!==0),k){if(m)return $2(s,l,d);l.flags|=128}if(k=l.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),ot(di,di.current),m)break;return null;case 22:return l.lanes=0,M2(s,l,d,l.pendingProps);case 24:Ns(l,bi,s.memoizedState.cache)}return Fa(s,l,d)}function z2(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)Ci=!0;else{if(!Ty(s,d)&&(l.flags&128)===0)return Ci=!1,Rj(s,l,d);Ci=(s.flags&131072)!==0}else Ci=!1,xe&&(l.flags&1048576)!==0&&yC(l,wh,l.index);switch(l.lanes=0,l.tag){case 16:t:{var m=l.pendingProps;if(s=Fo(l.elementType),l.type=s,typeof s=="function")Lm(s)?(m=Io(s,m),l.tag=1,l=j2(null,l,s,m,d)):(l.tag=0,l=by(null,l,s,m,d));else{if(s!=null){var k=s.$$typeof;if(k===E){l.tag=11,l=B2(null,l,s,m,d);break t}else if(k===M){l.tag=14,l=A2(null,l,s,m,d);break t}}throw l=F(s)||s,Error(n(306,l,""))}}return l;case 0:return by(s,l,l.type,l.pendingProps,d);case 1:return m=l.type,k=Io(m,l.pendingProps),j2(s,l,m,k,d);case 3:t:{if(at(l,l.stateNode.containerInfo),s===null)throw Error(n(387));m=l.pendingProps;var S=l.memoizedState;k=S.element,Ym(s,l),Oh(l,m,null,d);var L=l.memoizedState;if(m=L.cache,Ns(l,bi,m),m!==S.cache&&qm(l,[bi],d,!0),Nh(),m=L.element,S.isDehydrated)if(S={element:m,isDehydrated:!1,cache:L.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=R2(s,l,m,d);break t}else if(m!==k){k=en(Error(n(424)),l),Th(k),l=R2(s,l,m,d);break t}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Qe=on(s.firstChild),Hi=l,xe=!0,Ms=null,an=!0,d=MC(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Oo(),m===k){l=Fa(s,l,d);break t}Wi(s,l,m,d)}l=l.child}return l;case 26:return bd(s,l),s===null?(d=Qk(l.type,null,l.pendingProps,null))?l.memoizedState=d:xe||(d=l.type,s=l.pendingProps,m=Dd(kt.current).createElement(d),m[ai]=l,m[yi]=s,Yi(m,d,s),He(m),l.stateNode=m):l.memoizedState=Qk(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return gt(l),s===null&&xe&&(m=l.stateNode=Gk(l.type,l.pendingProps,kt.current),Hi=l,an=!0,k=Qe,Ws(l.type)?(a0=k,Qe=on(m.firstChild)):Qe=k),Wi(s,l,l.pendingProps.children,d),bd(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&xe&&((k=m=Qe)&&(m=u4(m,l.type,l.pendingProps,an),m!==null?(l.stateNode=m,Hi=l,Qe=on(m.firstChild),an=!1,k=!0):k=!1),k||Ls(l)),gt(l),k=l.type,S=l.pendingProps,L=s!==null?s.memoizedProps:null,m=S.children,t0(k,S)?m=null:L!==null&&t0(k,L)&&(l.flags|=32),l.memoizedState!==null&&(k=Jm(s,l,Tj,null,null,d),Jh._currentValue=k),bd(s,l),Wi(s,l,m,d),l.child;case 6:return s===null&&xe&&((s=d=Qe)&&(d=f4(d,l.pendingProps,an),d!==null?(l.stateNode=d,Hi=l,Qe=null,s=!0):s=!1),s||Ls(l)),null;case 13:return D2(s,l,d);case 4:return at(l,l.stateNode.containerInfo),m=l.pendingProps,s===null?l.child=zo(l,null,m,d):Wi(s,l,m,d),l.child;case 11:return B2(s,l,l.type,l.pendingProps,d);case 7:return Wi(s,l,l.pendingProps,d),l.child;case 8:return Wi(s,l,l.pendingProps.children,d),l.child;case 12:return Wi(s,l,l.pendingProps.children,d),l.child;case 10:return m=l.pendingProps,Ns(l,l.type,m.value),Wi(s,l,m.children,d),l.child;case 9:return k=l.type._context,m=l.pendingProps.children,Ro(l),k=Ui(k),m=m(k),l.flags|=1,Wi(s,l,m,d),l.child;case 14:return A2(s,l,l.type,l.pendingProps,d);case 15:return E2(s,l,l.type,l.pendingProps,d);case 19:return $2(s,l,d);case 31:return jj(s,l,d);case 22:return M2(s,l,d,l.pendingProps);case 24:return Ro(l),m=Ui(bi),s===null?(k=Hm(),k===null&&(k=Ge,S=Im(),k.pooledCache=S,S.refCount++,S!==null&&(k.pooledCacheLanes|=d),k=S),l.memoizedState={parent:m,cache:k},Wm(l),Ns(l,bi,k)):((s.lanes&d)!==0&&(Ym(s,l),Oh(l,null,null,d),Nh()),k=s.memoizedState,S=l.memoizedState,k.parent!==m?(k={parent:m,cache:m},l.memoizedState=k,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=k),Ns(l,bi,m)):(m=S.cache,Ns(l,bi,m),m!==k.cache&&qm(l,[bi],d,!0))),Wi(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function $a(s){s.flags|=4}function By(s,l,d,m,k){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(k&335544128)===k)if(s.stateNode.complete)s.flags|=8192;else if(fk())s.flags|=8192;else throw $o=nd,Um}else s.flags&=-16777217}function q2(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!e_(l))if(fk())s.flags|=8192;else throw $o=nd,Um}function Cd(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?bs():536870912,s.lanes|=l,ec|=l)}function zh(s,l){if(!xe)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function Ze(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,m=0;if(l)for(var k=s.child;k!==null;)d|=k.lanes|k.childLanes,m|=k.subtreeFlags&65011712,m|=k.flags&65011712,k.return=s,k=k.sibling;else for(k=s.child;k!==null;)d|=k.lanes|k.childLanes,m|=k.subtreeFlags,m|=k.flags,k.return=s,k=k.sibling;return s.subtreeFlags|=m,s.childLanes=d,l}function Dj(s,l,d){var m=l.pendingProps;switch(Rm(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(l),null;case 1:return Ze(l),null;case 3:return d=l.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),ja(bi),Ct(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Pl(l)?$a(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Fm())),Ze(l),null;case 26:var k=l.type,S=l.memoizedState;return s===null?($a(l),S!==null?(Ze(l),q2(l,S)):(Ze(l),By(l,k,null,m,d))):S?S!==s.memoizedState?($a(l),Ze(l),q2(l,S)):(Ze(l),l.flags&=-16777217):(s=s.memoizedProps,s!==m&&$a(l),Ze(l),By(l,k,s,m,d)),null;case 27:if(Bt(l),d=kt.current,k=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&$a(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ze(l),null}s=st.current,Pl(l)?bC(l):(s=Gk(k,m,d),l.stateNode=s,$a(l))}return Ze(l),null;case 5:if(Bt(l),k=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==m&&$a(l);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Ze(l),null}if(S=st.current,Pl(l))bC(l);else{var L=Dd(kt.current);switch(S){case 1:S=L.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:S=L.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":S=L.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":S=L.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":S=L.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof m.is=="string"?L.createElement("select",{is:m.is}):L.createElement("select"),m.multiple?S.multiple=!0:m.size&&(S.size=m.size);break;default:S=typeof m.is=="string"?L.createElement(k,{is:m.is}):L.createElement(k)}}S[ai]=l,S[yi]=m;t:for(L=l.child;L!==null;){if(L.tag===5||L.tag===6)S.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===l)break t;for(;L.sibling===null;){if(L.return===null||L.return===l)break t;L=L.return}L.sibling.return=L.return,L=L.sibling}l.stateNode=S;t:switch(Yi(S,k,m),k){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break t;case"img":m=!0;break t;default:m=!1}m&&$a(l)}}return Ze(l),By(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==m&&$a(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(n(166));if(s=kt.current,Pl(l)){if(s=l.stateNode,d=l.memoizedProps,m=null,k=Hi,k!==null)switch(k.tag){case 27:case 5:m=k.memoizedProps}s[ai]=l,s=!!(s.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||Dk(s.nodeValue,d)),s||Ls(l,!0)}else s=Dd(s).createTextNode(m),s[ai]=l,l.stateNode=s}return Ze(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(m=Pl(l),d!==null){if(s===null){if(!m)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[ai]=l}else Oo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ze(l),s=!1}else d=Fm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Pr(l),l):(Pr(l),null);if((l.flags&128)!==0)throw Error(n(558))}return Ze(l),null;case 13:if(m=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(k=Pl(l),m!==null&&m.dehydrated!==null){if(s===null){if(!k)throw Error(n(318));if(k=l.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[ai]=l}else Oo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ze(l),k=!1}else k=Fm(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=k),k=!0;if(!k)return l.flags&256?(Pr(l),l):(Pr(l),null)}return Pr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=m!==null,s=s!==null&&s.memoizedState!==null,d&&(m=l.child,k=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(k=m.alternate.memoizedState.cachePool.pool),S=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(S=m.memoizedState.cachePool.pool),S!==k&&(m.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Cd(l,l.updateQueue),Ze(l),null);case 4:return Ct(),s===null&&Xy(l.stateNode.containerInfo),Ze(l),null;case 10:return ja(l.type),Ze(l),null;case 19:if(K(di),m=l.memoizedState,m===null)return Ze(l),null;if(k=(l.flags&128)!==0,S=m.rendering,S===null)if(k)zh(m,!1);else{if(ci!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(S=ld(s),S!==null){for(l.flags|=128,zh(m,!1),s=S.updateQueue,l.updateQueue=s,Cd(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)pC(d,s),d=d.sibling;return ot(di,di.current&1|2),xe&&Na(l,m.treeForkCount),l.child}s=s.sibling}m.tail!==null&&Pe()>Td&&(l.flags|=128,k=!0,zh(m,!1),l.lanes=4194304)}else{if(!k)if(s=ld(S),s!==null){if(l.flags|=128,k=!0,s=s.updateQueue,l.updateQueue=s,Cd(l,s),zh(m,!0),m.tail===null&&m.tailMode==="hidden"&&!S.alternate&&!xe)return Ze(l),null}else 2*Pe()-m.renderingStartTime>Td&&d!==536870912&&(l.flags|=128,k=!0,zh(m,!1),l.lanes=4194304);m.isBackwards?(S.sibling=l.child,l.child=S):(s=m.last,s!==null?s.sibling=S:l.child=S,m.last=S)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=Pe(),s.sibling=null,d=di.current,ot(di,k?d&1|2:d&1),xe&&Na(l,m.treeForkCount),s):(Ze(l),null);case 22:case 23:return Pr(l),Qm(),m=l.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(d&536870912)!==0&&(l.flags&128)===0&&(Ze(l),l.subtreeFlags&6&&(l.flags|=8192)):Ze(l),d=l.updateQueue,d!==null&&Cd(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048),s!==null&&K(Do),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),ja(bi),Ze(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function Fj(s,l){switch(Rm(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ja(bi),Ct(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Bt(l),null;case 31:if(l.memoizedState!==null){if(Pr(l),l.alternate===null)throw Error(n(340));Oo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Pr(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Oo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return K(di),null;case 4:return Ct(),null;case 10:return ja(l.type),null;case 22:case 23:return Pr(l),Qm(),s!==null&&K(Do),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ja(bi),null;case 25:return null;default:return null}}function I2(s,l){switch(Rm(l),l.tag){case 3:ja(bi),Ct();break;case 26:case 27:case 5:Bt(l);break;case 4:Ct();break;case 31:l.memoizedState!==null&&Pr(l);break;case 13:Pr(l);break;case 19:K(di);break;case 10:ja(l.type);break;case 22:case 23:Pr(l),Qm(),s!==null&&K(Do);break;case 24:ja(bi)}}function qh(s,l){try{var d=l.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var k=m.next;d=k;do{if((d.tag&s)===s){m=void 0;var S=d.create,L=d.inst;m=S(),L.destroy=m}d=d.next}while(d!==k)}}catch(z){qe(l,l.return,z)}}function $s(s,l,d){try{var m=l.updateQueue,k=m!==null?m.lastEffect:null;if(k!==null){var S=k.next;m=S;do{if((m.tag&s)===s){var L=m.inst,z=L.destroy;if(z!==void 0){L.destroy=void 0,k=l;var X=d,ct=z;try{ct()}catch(yt){qe(k,X,yt)}}}m=m.next}while(m!==S)}}catch(yt){qe(l,l.return,yt)}}function P2(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{NC(l,d)}catch(m){qe(s,s.return,m)}}}function H2(s,l,d){d.props=Io(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(m){qe(s,l,m)}}function Ih(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof d=="function"?s.refCleanup=d(m):d.current=m}}catch(k){qe(s,l,k)}}function aa(s,l){var d=s.ref,m=s.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(k){qe(s,l,k)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(k){qe(s,l,k)}else d.current=null}function U2(s){var l=s.type,d=s.memoizedProps,m=s.stateNode;try{t:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break t;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(k){qe(s,s.return,k)}}function Ay(s,l,d){try{var m=s.stateNode;a4(m,s.type,d,l),m[yi]=l}catch(k){qe(s,s.return,k)}}function W2(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ws(s.type)||s.tag===4}function Ey(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||W2(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ws(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function My(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Ea));else if(m!==4&&(m===27&&Ws(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(My(s,l,d),s=s.sibling;s!==null;)My(s,l,d),s=s.sibling}function kd(s,l,d){var m=s.tag;if(m===5||m===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(m!==4&&(m===27&&Ws(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(kd(s,l,d),s=s.sibling;s!==null;)kd(s,l,d),s=s.sibling}function Y2(s){var l=s.stateNode,d=s.memoizedProps;try{for(var m=s.type,k=l.attributes;k.length;)l.removeAttributeNode(k[0]);Yi(l,m,d),l[ai]=s,l[yi]=d}catch(S){qe(s,s.return,S)}}var za=!1,ki=!1,Ly=!1,G2=typeof WeakSet=="function"?WeakSet:Set,Di=null;function $j(s,l){if(s=s.containerInfo,Ky=Hd,s=aC(s),Sm(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else t:{d=(d=s.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var k=m.anchorOffset,S=m.focusNode;m=m.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break t}var L=0,z=-1,X=-1,ct=0,yt=0,vt=s,ht=null;e:for(;;){for(var dt;vt!==d||k!==0&&vt.nodeType!==3||(z=L+k),vt!==S||m!==0&&vt.nodeType!==3||(X=L+m),vt.nodeType===3&&(L+=vt.nodeValue.length),(dt=vt.firstChild)!==null;)ht=vt,vt=dt;for(;;){if(vt===s)break e;if(ht===d&&++ct===k&&(z=L),ht===S&&++yt===m&&(X=L),(dt=vt.nextSibling)!==null)break;vt=ht,ht=vt.parentNode}vt=dt}d=z===-1||X===-1?null:{start:z,end:X}}else d=null}d=d||{start:0,end:0}}else d=null;for(Jy={focusedElem:s,selectionRange:d},Hd=!1,Di=l;Di!==null;)if(l=Di,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Di=s;else for(;Di!==null;){switch(l=Di,S=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)k=s[d],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&S!==null){s=void 0,d=l,k=S.memoizedProps,S=S.memoizedState,m=d.stateNode;try{var Rt=Io(d.type,k);s=m.getSnapshotBeforeUpdate(Rt,S),m.__reactInternalSnapshotBeforeUpdate=s}catch(Kt){qe(d,d.return,Kt)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)i0(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":i0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,Di=s;break}Di=l.return}}function V2(s,l,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ia(s,d),m&4&&qh(5,d);break;case 1:if(Ia(s,d),m&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(L){qe(d,d.return,L)}else{var k=Io(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(k,l,s.__reactInternalSnapshotBeforeUpdate)}catch(L){qe(d,d.return,L)}}m&64&&P2(d),m&512&&Ih(d,d.return);break;case 3:if(Ia(s,d),m&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{NC(s,l)}catch(L){qe(d,d.return,L)}}break;case 27:l===null&&m&4&&Y2(d);case 26:case 5:Ia(s,d),l===null&&m&4&&U2(d),m&512&&Ih(d,d.return);break;case 12:Ia(s,d);break;case 31:Ia(s,d),m&4&&Z2(s,d);break;case 13:Ia(s,d),m&4&&K2(s,d),m&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=Gj.bind(null,d),d4(s,d))));break;case 22:if(m=d.memoizedState!==null||za,!m){l=l!==null&&l.memoizedState!==null||ki,k=za;var S=ki;za=m,(ki=l)&&!S?Pa(s,d,(d.subtreeFlags&8772)!==0):Ia(s,d),za=k,ki=S}break;case 30:break;default:Ia(s,d)}}function X2(s){var l=s.alternate;l!==null&&(s.alternate=null,X2(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&Ts(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var ti=null,Sr=!1;function qa(s,l,d){for(d=d.child;d!==null;)Q2(s,l,d),d=d.sibling}function Q2(s,l,d){if(wi&&typeof wi.onCommitFiberUnmount=="function")try{wi.onCommitFiberUnmount(Zi,d)}catch{}switch(d.tag){case 26:ki||aa(d,l),qa(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:ki||aa(d,l);var m=ti,k=Sr;Ws(d.type)&&(ti=d.stateNode,Sr=!1),qa(s,l,d),Qh(d.stateNode),ti=m,Sr=k;break;case 5:ki||aa(d,l);case 6:if(m=ti,k=Sr,ti=null,qa(s,l,d),ti=m,Sr=k,ti!==null)if(Sr)try{(ti.nodeType===9?ti.body:ti.nodeName==="HTML"?ti.ownerDocument.body:ti).removeChild(d.stateNode)}catch(S){qe(d,l,S)}else try{ti.removeChild(d.stateNode)}catch(S){qe(d,l,S)}break;case 18:ti!==null&&(Sr?(s=ti,Pk(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),cc(s)):Pk(ti,d.stateNode));break;case 4:m=ti,k=Sr,ti=d.stateNode.containerInfo,Sr=!0,qa(s,l,d),ti=m,Sr=k;break;case 0:case 11:case 14:case 15:$s(2,d,l),ki||$s(4,d,l),qa(s,l,d);break;case 1:ki||(aa(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"&&H2(d,l,m)),qa(s,l,d);break;case 21:qa(s,l,d);break;case 22:ki=(m=ki)||d.memoizedState!==null,qa(s,l,d),ki=m;break;default:qa(s,l,d)}}function Z2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{cc(s)}catch(d){qe(l,l.return,d)}}}function K2(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{cc(s)}catch(d){qe(l,l.return,d)}}function zj(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new G2),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new G2),l;default:throw Error(n(435,s.tag))}}function _d(s,l){var d=zj(s);l.forEach(function(m){if(!d.has(m)){d.add(m);var k=Vj.bind(null,s,m);m.then(k,k)}})}function wr(s,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var k=d[m],S=s,L=l,z=L;t:for(;z!==null;){switch(z.tag){case 27:if(Ws(z.type)){ti=z.stateNode,Sr=!1;break t}break;case 5:ti=z.stateNode,Sr=!1;break t;case 3:case 4:ti=z.stateNode.containerInfo,Sr=!0;break t}z=z.return}if(ti===null)throw Error(n(160));Q2(S,L,k),ti=null,Sr=!1,S=k.alternate,S!==null&&(S.return=null),k.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)J2(l,s),l=l.sibling}var Bn=null;function J2(s,l){var d=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:wr(l,s),Tr(s),m&4&&($s(3,s,s.return),qh(3,s),$s(5,s,s.return));break;case 1:wr(l,s),Tr(s),m&512&&(ki||d===null||aa(d,d.return)),m&64&&za&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var k=Bn;if(wr(l,s),Tr(s),m&512&&(ki||d===null||aa(d,d.return)),m&4){var S=d!==null?d.memoizedState:null;if(m=s.memoizedState,d===null)if(m===null)if(s.stateNode===null){t:{m=s.type,d=s.memoizedProps,k=k.ownerDocument||k;e:switch(m){case"title":S=k.getElementsByTagName("title")[0],(!S||S[ta]||S[ai]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=k.createElement(m),k.head.insertBefore(S,k.querySelector("head > title"))),Yi(S,m,d),S[ai]=s,He(S),m=S;break t;case"link":var L=Jk("link","href",k).get(m+(d.href||""));if(L){for(var z=0;z<L.length;z++)if(S=L[z],S.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&S.getAttribute("rel")===(d.rel==null?null:d.rel)&&S.getAttribute("title")===(d.title==null?null:d.title)&&S.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){L.splice(z,1);break e}}S=k.createElement(m),Yi(S,m,d),k.head.appendChild(S);break;case"meta":if(L=Jk("meta","content",k).get(m+(d.content||""))){for(z=0;z<L.length;z++)if(S=L[z],S.getAttribute("content")===(d.content==null?null:""+d.content)&&S.getAttribute("name")===(d.name==null?null:d.name)&&S.getAttribute("property")===(d.property==null?null:d.property)&&S.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&S.getAttribute("charset")===(d.charSet==null?null:d.charSet)){L.splice(z,1);break e}}S=k.createElement(m),Yi(S,m,d),k.head.appendChild(S);break;default:throw Error(n(468,m))}S[ai]=s,He(S),m=S}s.stateNode=m}else t_(k,s.type,s.stateNode);else s.stateNode=Kk(k,m,s.memoizedProps);else S!==m?(S===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):S.count--,m===null?t_(k,s.type,s.stateNode):Kk(k,m,s.memoizedProps)):m===null&&s.stateNode!==null&&Ay(s,s.memoizedProps,d.memoizedProps)}break;case 27:wr(l,s),Tr(s),m&512&&(ki||d===null||aa(d,d.return)),d!==null&&m&4&&Ay(s,s.memoizedProps,d.memoizedProps);break;case 5:if(wr(l,s),Tr(s),m&512&&(ki||d===null||aa(d,d.return)),s.flags&32){k=s.stateNode;try{_e(k,"")}catch(Rt){qe(s,s.return,Rt)}}m&4&&s.stateNode!=null&&(k=s.memoizedProps,Ay(s,k,d!==null?d.memoizedProps:k)),m&1024&&(Ly=!0);break;case 6:if(wr(l,s),Tr(s),m&4){if(s.stateNode===null)throw Error(n(162));m=s.memoizedProps,d=s.stateNode;try{d.nodeValue=m}catch(Rt){qe(s,s.return,Rt)}}break;case 3:if(zd=null,k=Bn,Bn=Fd(l.containerInfo),wr(l,s),Bn=k,Tr(s),m&4&&d!==null&&d.memoizedState.isDehydrated)try{cc(l.containerInfo)}catch(Rt){qe(s,s.return,Rt)}Ly&&(Ly=!1,tk(s));break;case 4:m=Bn,Bn=Fd(s.stateNode.containerInfo),wr(l,s),Tr(s),Bn=m;break;case 12:wr(l,s),Tr(s);break;case 31:wr(l,s),Tr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,_d(s,m)));break;case 13:wr(l,s),Tr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(wd=Pe()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,_d(s,m)));break;case 22:k=s.memoizedState!==null;var X=d!==null&&d.memoizedState!==null,ct=za,yt=ki;if(za=ct||k,ki=yt||X,wr(l,s),ki=yt,za=ct,Tr(s),m&8192)t:for(l=s.stateNode,l._visibility=k?l._visibility&-2:l._visibility|1,k&&(d===null||X||za||ki||Po(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){X=d=l;try{if(S=X.stateNode,k)L=S.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{z=X.stateNode;var vt=X.memoizedProps.style,ht=vt!=null&&vt.hasOwnProperty("display")?vt.display:null;z.style.display=ht==null||typeof ht=="boolean"?"":(""+ht).trim()}}catch(Rt){qe(X,X.return,Rt)}}}else if(l.tag===6){if(d===null){X=l;try{X.stateNode.nodeValue=k?"":X.memoizedProps}catch(Rt){qe(X,X.return,Rt)}}}else if(l.tag===18){if(d===null){X=l;try{var dt=X.stateNode;k?Hk(dt,!0):Hk(X.stateNode,!1)}catch(Rt){qe(X,X.return,Rt)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break t;for(;l.sibling===null;){if(l.return===null||l.return===s)break t;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=s.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,_d(s,d))));break;case 19:wr(l,s),Tr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,_d(s,m)));break;case 30:break;case 21:break;default:wr(l,s),Tr(s)}}function Tr(s){var l=s.flags;if(l&2){try{for(var d,m=s.return;m!==null;){if(W2(m)){d=m;break}m=m.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var k=d.stateNode,S=Ey(s);kd(s,S,k);break;case 5:var L=d.stateNode;d.flags&32&&(_e(L,""),d.flags&=-33);var z=Ey(s);kd(s,z,L);break;case 3:case 4:var X=d.stateNode.containerInfo,ct=Ey(s);My(s,ct,X);break;default:throw Error(n(161))}}catch(yt){qe(s,s.return,yt)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function tk(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;tk(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ia(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)V2(s,l.alternate,l),l=l.sibling}function Po(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:$s(4,l,l.return),Po(l);break;case 1:aa(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&H2(l,l.return,d),Po(l);break;case 27:Qh(l.stateNode);case 26:case 5:aa(l,l.return),Po(l);break;case 22:l.memoizedState===null&&Po(l);break;case 30:Po(l);break;default:Po(l)}s=s.sibling}}function Pa(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,k=s,S=l,L=S.flags;switch(S.tag){case 0:case 11:case 15:Pa(k,S,d),qh(4,S);break;case 1:if(Pa(k,S,d),m=S,k=m.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(ct){qe(m,m.return,ct)}if(m=S,k=m.updateQueue,k!==null){var z=m.stateNode;try{var X=k.shared.hiddenCallbacks;if(X!==null)for(k.shared.hiddenCallbacks=null,k=0;k<X.length;k++)LC(X[k],z)}catch(ct){qe(m,m.return,ct)}}d&&L&64&&P2(S),Ih(S,S.return);break;case 27:Y2(S);case 26:case 5:Pa(k,S,d),d&&m===null&&L&4&&U2(S),Ih(S,S.return);break;case 12:Pa(k,S,d);break;case 31:Pa(k,S,d),d&&L&4&&Z2(k,S);break;case 13:Pa(k,S,d),d&&L&4&&K2(k,S);break;case 22:S.memoizedState===null&&Pa(k,S,d),Ih(S,S.return);break;case 30:break;default:Pa(k,S,d)}l=l.sibling}}function Ny(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Bh(d))}function Oy(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Bh(s))}function An(s,l,d,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)ek(s,l,d,m),l=l.sibling}function ek(s,l,d,m){var k=l.flags;switch(l.tag){case 0:case 11:case 15:An(s,l,d,m),k&2048&&qh(9,l);break;case 1:An(s,l,d,m);break;case 3:An(s,l,d,m),k&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Bh(s)));break;case 12:if(k&2048){An(s,l,d,m),s=l.stateNode;try{var S=l.memoizedProps,L=S.id,z=S.onPostCommit;typeof z=="function"&&z(L,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(X){qe(l,l.return,X)}}else An(s,l,d,m);break;case 31:An(s,l,d,m);break;case 13:An(s,l,d,m);break;case 23:break;case 22:S=l.stateNode,L=l.alternate,l.memoizedState!==null?S._visibility&2?An(s,l,d,m):Ph(s,l):S._visibility&2?An(s,l,d,m):(S._visibility|=2,Kl(s,l,d,m,(l.subtreeFlags&10256)!==0||!1)),k&2048&&Ny(L,l);break;case 24:An(s,l,d,m),k&2048&&Oy(l.alternate,l);break;default:An(s,l,d,m)}}function Kl(s,l,d,m,k){for(k=k&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=s,L=l,z=d,X=m,ct=L.flags;switch(L.tag){case 0:case 11:case 15:Kl(S,L,z,X,k),qh(8,L);break;case 23:break;case 22:var yt=L.stateNode;L.memoizedState!==null?yt._visibility&2?Kl(S,L,z,X,k):Ph(S,L):(yt._visibility|=2,Kl(S,L,z,X,k)),k&&ct&2048&&Ny(L.alternate,L);break;case 24:Kl(S,L,z,X,k),k&&ct&2048&&Oy(L.alternate,L);break;default:Kl(S,L,z,X,k)}l=l.sibling}}function Ph(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,m=l,k=m.flags;switch(m.tag){case 22:Ph(d,m),k&2048&&Ny(m.alternate,m);break;case 24:Ph(d,m),k&2048&&Oy(m.alternate,m);break;default:Ph(d,m)}l=l.sibling}}var Hh=8192;function Jl(s,l,d){if(s.subtreeFlags&Hh)for(s=s.child;s!==null;)ik(s,l,d),s=s.sibling}function ik(s,l,d){switch(s.tag){case 26:Jl(s,l,d),s.flags&Hh&&s.memoizedState!==null&&w4(d,Bn,s.memoizedState,s.memoizedProps);break;case 5:Jl(s,l,d);break;case 3:case 4:var m=Bn;Bn=Fd(s.stateNode.containerInfo),Jl(s,l,d),Bn=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=Hh,Hh=16777216,Jl(s,l,d),Hh=m):Jl(s,l,d));break;default:Jl(s,l,d)}}function rk(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function Uh(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];Di=m,ak(m,s)}rk(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)nk(s),s=s.sibling}function nk(s){switch(s.tag){case 0:case 11:case 15:Uh(s),s.flags&2048&&$s(9,s,s.return);break;case 3:Uh(s);break;case 12:Uh(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Sd(s)):Uh(s);break;default:Uh(s)}}function Sd(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var m=l[d];Di=m,ak(m,s)}rk(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:$s(8,l,l.return),Sd(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Sd(l));break;default:Sd(l)}s=s.sibling}}function ak(s,l){for(;Di!==null;){var d=Di;switch(d.tag){case 0:case 11:case 15:$s(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Bh(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,Di=m;else t:for(d=s;Di!==null;){m=Di;var k=m.sibling,S=m.return;if(X2(m),m===d){Di=null;break t}if(k!==null){k.return=S,Di=k;break t}Di=S}}}var qj={getCacheForType:function(s){var l=Ui(bi),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Ui(bi).controller.signal}},Ij=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ge=null,de=null,ge=0,ze=0,Hr=null,zs=!1,tc=!1,jy=!1,Ha=0,ci=0,qs=0,Ho=0,Ry=0,Ur=0,ec=0,Wh=null,Br=null,Dy=!1,wd=0,sk=0,Td=1/0,Bd=null,Is=null,Ti=0,Ps=null,ic=null,Ua=0,Fy=0,$y=null,ok=null,Yh=0,zy=null;function Wr(){return(Le&2)!==0&&ge!==0?ge&-ge:j.T!==null?Wy():Cn()}function lk(){if(Ur===0)if((ge&536870912)===0||xe){var s=Vn;Vn<<=1,(Vn&3932160)===0&&(Vn=262144),Ur=s}else Ur=536870912;return s=Ir.current,s!==null&&(s.flags|=32),Ur}function Ar(s,l,d){(s===Ge&&(ze===2||ze===9)||s.cancelPendingCommit!==null)&&(rc(s,0),Hs(s,ge,Ur,!1)),Fe(s,d),((Le&2)===0||s!==Ge)&&(s===Ge&&((Le&2)===0&&(Ho|=d),ci===4&&Hs(s,ge,Ur,!1)),sa(s))}function ck(s,l,d){if((Le&6)!==0)throw Error(n(327));var m=!d&&(l&127)===0&&(l&s.expiredLanes)===0||bn(s,l),k=m?Uj(s,l):Iy(s,l,!0),S=m;do{if(k===0){tc&&!m&&Hs(s,l,0,!1);break}else{if(d=s.current.alternate,S&&!Pj(d)){k=Iy(s,l,!1),S=!1;continue}if(k===2){if(S=l,s.errorRecoveryDisabledLanes&S)var L=0;else L=s.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){l=L;t:{var z=s;k=Wh;var X=z.current.memoizedState.isDehydrated;if(X&&(rc(z,L).flags|=256),L=Iy(z,L,!1),L!==2){if(jy&&!X){z.errorRecoveryDisabledLanes|=S,Ho|=S,k=4;break t}S=Br,Br=k,S!==null&&(Br===null?Br=S:Br.push.apply(Br,S))}k=L}if(S=!1,k!==2)continue}}if(k===1){rc(s,0),Hs(s,l,0,!0);break}t:{switch(m=s,S=k,S){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:Hs(m,l,Ur,!zs);break t;case 2:Br=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(k=wd+300-Pe(),10<k)){if(Hs(m,l,Ur,!zs),Xn(m,0,!0)!==0)break t;Ua=l,m.timeoutHandle=qk(hk.bind(null,m,d,Br,Bd,Dy,l,Ur,Ho,ec,zs,S,"Throttled",-0,0),k);break t}hk(m,d,Br,Bd,Dy,l,Ur,Ho,ec,zs,S,null,-0,0)}}break}while(!0);sa(s)}function hk(s,l,d,m,k,S,L,z,X,ct,yt,vt,ht,dt){if(s.timeoutHandle=-1,vt=l.subtreeFlags,vt&8192||(vt&16785408)===16785408){vt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ea},ik(l,S,vt);var Rt=(S&62914560)===S?wd-Pe():(S&4194048)===S?sk-Pe():0;if(Rt=T4(vt,Rt),Rt!==null){Ua=S,s.cancelPendingCommit=Rt(xk.bind(null,s,l,S,d,m,k,L,z,X,yt,vt,null,ht,dt)),Hs(s,S,L,!ct);return}}xk(s,l,S,d,m,k,L,z,X)}function Pj(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var k=d[m],S=k.getSnapshot;k=k.value;try{if(!zr(S(),k))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Hs(s,l,d,m){l&=~Ry,l&=~Ho,s.suspendedLanes|=l,s.pingedLanes&=~l,m&&(s.warmLanes|=l),m=s.expirationTimes;for(var k=l;0<k;){var S=31-mi(k),L=1<<S;m[S]=-1,k&=~L}d!==0&&Cs(s,d,l)}function Ad(){return(Le&6)===0?(Gh(0),!1):!0}function qy(){if(de!==null){if(ze===0)var s=de.return;else s=de,Oa=jo=null,iy(s),Gl=null,Eh=0,s=de;for(;s!==null;)I2(s.alternate,s),s=s.return;de=null}}function rc(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,l4(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ua=0,qy(),Ge=s,de=d=La(s.current,null),ge=l,ze=0,Hr=null,zs=!1,tc=bn(s,l),jy=!1,ec=Ur=Ry=Ho=qs=ci=0,Br=Wh=null,Dy=!1,(l&8)!==0&&(l|=l&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=l;0<m;){var k=31-mi(m),S=1<<k;l|=s[k],m&=~S}return Ha=l,Xf(),d}function uk(s,l){oe=null,j.H=Fh,l===Yl||l===rd?(l=BC(),ze=3):l===Um?(l=BC(),ze=4):ze=l===xy?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Hr=l,de===null&&(ci=1,yd(s,en(l,s.current)))}function fk(){var s=Ir.current;return s===null?!0:(ge&4194048)===ge?sn===null:(ge&62914560)===ge||(ge&536870912)!==0?s===sn:!1}function dk(){var s=j.H;return j.H=Fh,s===null?Fh:s}function pk(){var s=j.A;return j.A=qj,s}function Ed(){ci=4,zs||(ge&4194048)!==ge&&Ir.current!==null||(tc=!0),(qs&134217727)===0&&(Ho&134217727)===0||Ge===null||Hs(Ge,ge,Ur,!1)}function Iy(s,l,d){var m=Le;Le|=2;var k=dk(),S=pk();(Ge!==s||ge!==l)&&(Bd=null,rc(s,l)),l=!1;var L=ci;t:do try{if(ze!==0&&de!==null){var z=de,X=Hr;switch(ze){case 8:qy(),L=6;break t;case 3:case 2:case 9:case 6:Ir.current===null&&(l=!0);var ct=ze;if(ze=0,Hr=null,nc(s,z,X,ct),d&&tc){L=0;break t}break;default:ct=ze,ze=0,Hr=null,nc(s,z,X,ct)}}Hj(),L=ci;break}catch(yt){uk(s,yt)}while(!0);return l&&s.shellSuspendCounter++,Oa=jo=null,Le=m,j.H=k,j.A=S,de===null&&(Ge=null,ge=0,Xf()),L}function Hj(){for(;de!==null;)gk(de)}function Uj(s,l){var d=Le;Le|=2;var m=dk(),k=pk();Ge!==s||ge!==l?(Bd=null,Td=Pe()+500,rc(s,l)):tc=bn(s,l);t:do try{if(ze!==0&&de!==null){l=de;var S=Hr;e:switch(ze){case 1:ze=0,Hr=null,nc(s,l,S,1);break;case 2:case 9:if(wC(S)){ze=0,Hr=null,mk(l);break}l=function(){ze!==2&&ze!==9||Ge!==s||(ze=7),sa(s)},S.then(l,l);break t;case 3:ze=7;break t;case 4:ze=5;break t;case 7:wC(S)?(ze=0,Hr=null,mk(l)):(ze=0,Hr=null,nc(s,l,S,7));break;case 5:var L=null;switch(de.tag){case 26:L=de.memoizedState;case 5:case 27:var z=de;if(L?e_(L):z.stateNode.complete){ze=0,Hr=null;var X=z.sibling;if(X!==null)de=X;else{var ct=z.return;ct!==null?(de=ct,Md(ct)):de=null}break e}}ze=0,Hr=null,nc(s,l,S,5);break;case 6:ze=0,Hr=null,nc(s,l,S,6);break;case 8:qy(),ci=6;break t;default:throw Error(n(462))}}Wj();break}catch(yt){uk(s,yt)}while(!0);return Oa=jo=null,j.H=m,j.A=k,Le=d,de!==null?0:(Ge=null,ge=0,Xf(),ci)}function Wj(){for(;de!==null&&!De();)gk(de)}function gk(s){var l=z2(s.alternate,s,Ha);s.memoizedProps=s.pendingProps,l===null?Md(s):de=l}function mk(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=O2(d,l,l.pendingProps,l.type,void 0,ge);break;case 11:l=O2(d,l,l.pendingProps,l.type.render,l.ref,ge);break;case 5:iy(l);default:I2(d,l),l=de=pC(l,Ha),l=z2(d,l,Ha)}s.memoizedProps=s.pendingProps,l===null?Md(s):de=l}function nc(s,l,d,m){Oa=jo=null,iy(l),Gl=null,Eh=0;var k=l.return;try{if(Oj(s,k,l,d,ge)){ci=1,yd(s,en(d,s.current)),de=null;return}}catch(S){if(k!==null)throw de=k,S;ci=1,yd(s,en(d,s.current)),de=null;return}l.flags&32768?(xe||m===1?s=!0:tc||(ge&536870912)!==0?s=!1:(zs=s=!0,(m===2||m===9||m===3||m===6)&&(m=Ir.current,m!==null&&m.tag===13&&(m.flags|=16384))),yk(l,s)):Md(l)}function Md(s){var l=s;do{if((l.flags&32768)!==0){yk(l,zs);return}s=l.return;var d=Dj(l.alternate,l,Ha);if(d!==null){de=d;return}if(l=l.sibling,l!==null){de=l;return}de=l=s}while(l!==null);ci===0&&(ci=5)}function yk(s,l){do{var d=Fj(s.alternate,s);if(d!==null){d.flags&=32767,de=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){de=s;return}de=s=d}while(s!==null);ci=6,de=null}function xk(s,l,d,m,k,S,L,z,X){s.cancelPendingCommit=null;do Ld();while(Ti!==0);if((Le&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(S=l.lanes|l.childLanes,S|=Em,Zn(s,d,S,L,z,X),s===Ge&&(de=Ge=null,ge=0),ic=l,Ps=s,Ua=d,Fy=S,$y=k,ok=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Xj(Dr,function(){return _k(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=j.T,j.T=null,k=I.p,I.p=2,L=Le,Le|=4;try{$j(s,l,d)}finally{Le=L,I.p=k,j.T=m}}Ti=1,bk(),vk(),Ck()}}function bk(){if(Ti===1){Ti=0;var s=Ps,l=ic,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=j.T,j.T=null;var m=I.p;I.p=2;var k=Le;Le|=4;try{J2(l,s);var S=Jy,L=aC(s.containerInfo),z=S.focusedElem,X=S.selectionRange;if(L!==z&&z&&z.ownerDocument&&nC(z.ownerDocument.documentElement,z)){if(X!==null&&Sm(z)){var ct=X.start,yt=X.end;if(yt===void 0&&(yt=ct),"selectionStart"in z)z.selectionStart=ct,z.selectionEnd=Math.min(yt,z.value.length);else{var vt=z.ownerDocument||document,ht=vt&&vt.defaultView||window;if(ht.getSelection){var dt=ht.getSelection(),Rt=z.textContent.length,Kt=Math.min(X.start,Rt),Ye=X.end===void 0?Kt:Math.min(X.end,Rt);!dt.extend&&Kt>Ye&&(L=Ye,Ye=Kt,Kt=L);var nt=rC(z,Kt),et=rC(z,Ye);if(nt&&et&&(dt.rangeCount!==1||dt.anchorNode!==nt.node||dt.anchorOffset!==nt.offset||dt.focusNode!==et.node||dt.focusOffset!==et.offset)){var lt=vt.createRange();lt.setStart(nt.node,nt.offset),dt.removeAllRanges(),Kt>Ye?(dt.addRange(lt),dt.extend(et.node,et.offset)):(lt.setEnd(et.node,et.offset),dt.addRange(lt))}}}}for(vt=[],dt=z;dt=dt.parentNode;)dt.nodeType===1&&vt.push({element:dt,left:dt.scrollLeft,top:dt.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<vt.length;z++){var xt=vt[z];xt.element.scrollLeft=xt.left,xt.element.scrollTop=xt.top}}Hd=!!Ky,Jy=Ky=null}finally{Le=k,I.p=m,j.T=d}}s.current=l,Ti=2}}function vk(){if(Ti===2){Ti=0;var s=Ps,l=ic,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=j.T,j.T=null;var m=I.p;I.p=2;var k=Le;Le|=4;try{V2(s,l.alternate,l)}finally{Le=k,I.p=m,j.T=d}}Ti=3}}function Ck(){if(Ti===4||Ti===3){Ti=0,Ni();var s=Ps,l=ic,d=Ua,m=ok;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Ti=5:(Ti=0,ic=Ps=null,kk(s,s.pendingLanes));var k=s.pendingLanes;if(k===0&&(Is=null),Ss(d),l=l.stateNode,wi&&typeof wi.onCommitFiberRoot=="function")try{wi.onCommitFiberRoot(Zi,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=j.T,k=I.p,I.p=2,j.T=null;try{for(var S=s.onRecoverableError,L=0;L<m.length;L++){var z=m[L];S(z.value,{componentStack:z.stack})}}finally{j.T=l,I.p=k}}(Ua&3)!==0&&Ld(),sa(s),k=s.pendingLanes,(d&261930)!==0&&(k&42)!==0?s===zy?Yh++:(Yh=0,zy=s):Yh=0,Gh(0)}}function kk(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Bh(l)))}function Ld(){return bk(),vk(),Ck(),_k()}function _k(){if(Ti!==5)return!1;var s=Ps,l=Fy;Fy=0;var d=Ss(Ua),m=j.T,k=I.p;try{I.p=32>d?32:d,j.T=null,d=$y,$y=null;var S=Ps,L=Ua;if(Ti=0,ic=Ps=null,Ua=0,(Le&6)!==0)throw Error(n(331));var z=Le;if(Le|=4,nk(S.current),ek(S,S.current,L,d),Le=z,Gh(0,!1),wi&&typeof wi.onPostCommitFiberRoot=="function")try{wi.onPostCommitFiberRoot(Zi,S)}catch{}return!0}finally{I.p=k,j.T=m,kk(s,l)}}function Sk(s,l,d){l=en(d,l),l=yy(s.stateNode,l,2),s=Rs(s,l,2),s!==null&&(Fe(s,2),sa(s))}function qe(s,l,d){if(s.tag===3)Sk(s,s,d);else for(;l!==null;){if(l.tag===3){Sk(l,s,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Is===null||!Is.has(m))){s=en(d,s),d=w2(2),m=Rs(l,d,2),m!==null&&(T2(d,m,l,s),Fe(m,2),sa(m));break}}l=l.return}}function Py(s,l,d){var m=s.pingCache;if(m===null){m=s.pingCache=new Ij;var k=new Set;m.set(l,k)}else k=m.get(l),k===void 0&&(k=new Set,m.set(l,k));k.has(d)||(jy=!0,k.add(d),s=Yj.bind(null,s,l,d),l.then(s,s))}function Yj(s,l,d){var m=s.pingCache;m!==null&&m.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,Ge===s&&(ge&d)===d&&(ci===4||ci===3&&(ge&62914560)===ge&&300>Pe()-wd?(Le&2)===0&&rc(s,0):Ry|=d,ec===ge&&(ec=0)),sa(s)}function wk(s,l){l===0&&(l=bs()),s=Lo(s,l),s!==null&&(Fe(s,l),sa(s))}function Gj(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),wk(s,d)}function Vj(s,l){var d=0;switch(s.tag){case 31:case 13:var m=s.stateNode,k=s.memoizedState;k!==null&&(d=k.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(l),wk(s,d)}function Xj(s,l){return ue(s,l)}var Nd=null,ac=null,Hy=!1,Od=!1,Uy=!1,Us=0;function sa(s){s!==ac&&s.next===null&&(ac===null?Nd=ac=s:ac=ac.next=s),Od=!0,Hy||(Hy=!0,Zj())}function Gh(s,l){if(!Uy&&Od){Uy=!0;do for(var d=!1,m=Nd;m!==null;){if(s!==0){var k=m.pendingLanes;if(k===0)var S=0;else{var L=m.suspendedLanes,z=m.pingedLanes;S=(1<<31-mi(42|s)+1)-1,S&=k&~(L&~z),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(d=!0,Ek(m,S))}else S=ge,S=Xn(m,m===Ge?S:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(S&3)===0||bn(m,S)||(d=!0,Ek(m,S));m=m.next}while(d);Uy=!1}}function Qj(){Tk()}function Tk(){Od=Hy=!1;var s=0;Us!==0&&o4()&&(s=Us);for(var l=Pe(),d=null,m=Nd;m!==null;){var k=m.next,S=Bk(m,l);S===0?(m.next=null,d===null?Nd=k:d.next=k,k===null&&(ac=d)):(d=m,(s!==0||(S&3)!==0)&&(Od=!0)),m=k}Ti!==0&&Ti!==5||Gh(s),Us!==0&&(Us=0)}function Bk(s,l){for(var d=s.suspendedLanes,m=s.pingedLanes,k=s.expirationTimes,S=s.pendingLanes&-62914561;0<S;){var L=31-mi(S),z=1<<L,X=k[L];X===-1?((z&d)===0||(z&m)!==0)&&(k[L]=Qn(z,l)):X<=l&&(s.expiredLanes|=z),S&=~z}if(l=Ge,d=ge,d=Xn(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,d===0||s===l&&(ze===2||ze===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&ke(m),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||bn(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(m!==null&&ke(m),Ss(d)){case 2:case 8:d=Kr;break;case 32:d=Dr;break;case 268435456:d=lr;break;default:d=Dr}return m=Ak.bind(null,s),d=ue(d,m),s.callbackPriority=l,s.callbackNode=d,l}return m!==null&&m!==null&&ke(m),s.callbackPriority=2,s.callbackNode=null,2}function Ak(s,l){if(Ti!==0&&Ti!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(Ld()&&s.callbackNode!==d)return null;var m=ge;return m=Xn(s,s===Ge?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(ck(s,m,l),Bk(s,Pe()),s.callbackNode!=null&&s.callbackNode===d?Ak.bind(null,s):null)}function Ek(s,l){if(Ld())return null;ck(s,l,!0)}function Zj(){c4(function(){(Le&6)!==0?ue(Un,Qj):Tk()})}function Wy(){if(Us===0){var s=Ul;s===0&&(s=Gn,Gn<<=1,(Gn&261888)===0&&(Gn=256)),Us=s}return Us}function Mk(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:If(""+s)}function Lk(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function Kj(s,l,d,m,k){if(l==="submit"&&d&&d.stateNode===k){var S=Mk((k[yi]||null).action),L=m.submitter;L&&(l=(l=L[yi]||null)?Mk(l.formAction):L.getAttribute("formAction"),l!==null&&(S=l,L=null));var z=new Wf("action","action",null,m,k);s.push({event:z,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Us!==0){var X=L?Lk(k,L):new FormData(k);uy(d,{pending:!0,data:X,method:k.method,action:S},null,X)}}else typeof S=="function"&&(z.preventDefault(),X=L?Lk(k,L):new FormData(k),uy(d,{pending:!0,data:X,method:k.method,action:S},S,X))},currentTarget:k}]})}}for(var Yy=0;Yy<Am.length;Yy++){var Gy=Am[Yy],Jj=Gy.toLowerCase(),t4=Gy[0].toUpperCase()+Gy.slice(1);Tn(Jj,"on"+t4)}Tn(lC,"onAnimationEnd"),Tn(cC,"onAnimationIteration"),Tn(hC,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(mj,"onTransitionRun"),Tn(yj,"onTransitionStart"),Tn(xj,"onTransitionCancel"),Tn(uC,"onTransitionEnd"),At("onMouseEnter",["mouseout","mouseover"]),At("onMouseLeave",["mouseout","mouseover"]),At("onPointerEnter",["pointerout","pointerover"]),At("onPointerLeave",["pointerout","pointerover"]),mt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mt("onBeforeInput",["compositionend","keypress","textInput","paste"]),mt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),e4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vh));function Nk(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var m=s[d],k=m.event;m=m.listeners;t:{var S=void 0;if(l)for(var L=m.length-1;0<=L;L--){var z=m[L],X=z.instance,ct=z.currentTarget;if(z=z.listener,X!==S&&k.isPropagationStopped())break t;S=z,k.currentTarget=ct;try{S(k)}catch(yt){Vf(yt)}k.currentTarget=null,S=X}else for(L=0;L<m.length;L++){if(z=m[L],X=z.instance,ct=z.currentTarget,z=z.listener,X!==S&&k.isPropagationStopped())break t;S=z,k.currentTarget=ct;try{S(k)}catch(yt){Vf(yt)}k.currentTarget=null,S=X}}}}function pe(s,l){var d=l[Kn];d===void 0&&(d=l[Kn]=new Set);var m=s+"__bubble";d.has(m)||(Ok(l,s,2,!1),d.add(m))}function Vy(s,l,d){var m=0;l&&(m|=4),Ok(d,s,m,l)}var jd="_reactListening"+Math.random().toString(36).slice(2);function Xy(s){if(!s[jd]){s[jd]=!0,jt.forEach(function(d){d!=="selectionchange"&&(e4.has(d)||Vy(d,!1,s),Vy(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[jd]||(l[jd]=!0,Vy("selectionchange",!1,l))}}function Ok(s,l,d,m){switch(l_(l)){case 2:var k=E4;break;case 8:k=M4;break;default:k=h0}d=k.bind(null,l,d,s),k=void 0,!gm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(k=!0),m?k!==void 0?s.addEventListener(l,d,{capture:!0,passive:k}):s.addEventListener(l,d,!0):k!==void 0?s.addEventListener(l,d,{passive:k}):s.addEventListener(l,d,!1)}function Qy(s,l,d,m,k){var S=m;if((l&1)===0&&(l&2)===0&&m!==null)t:for(;;){if(m===null)return;var L=m.tag;if(L===3||L===4){var z=m.stateNode.containerInfo;if(z===k)break;if(L===4)for(L=m.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===k)return;L=L.return}for(;z!==null;){if(L=ea(z),L===null)return;if(X=L.tag,X===5||X===6||X===26||X===27){m=S=L;continue t}z=z.parentNode}}m=m.return}$1(function(){var ct=S,yt=dm(d),vt=[];t:{var ht=fC.get(s);if(ht!==void 0){var dt=Wf,Rt=s;switch(s){case"keypress":if(Hf(d)===0)break t;case"keydown":case"keyup":dt=VO;break;case"focusin":Rt="focus",dt=bm;break;case"focusout":Rt="blur",dt=bm;break;case"beforeblur":case"afterblur":dt=bm;break;case"click":if(d.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":dt=I1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":dt=DO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":dt=ZO;break;case lC:case cC:case hC:dt=zO;break;case uC:dt=JO;break;case"scroll":case"scrollend":dt=jO;break;case"wheel":dt=ej;break;case"copy":case"cut":case"paste":dt=IO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":dt=H1;break;case"toggle":case"beforetoggle":dt=rj}var Kt=(l&4)!==0,Ye=!Kt&&(s==="scroll"||s==="scrollend"),nt=Kt?ht!==null?ht+"Capture":null:ht;Kt=[];for(var et=ct,lt;et!==null;){var xt=et;if(lt=xt.stateNode,xt=xt.tag,xt!==5&&xt!==26&&xt!==27||lt===null||nt===null||(xt=mh(et,nt),xt!=null&&Kt.push(Xh(et,xt,lt))),Ye)break;et=et.return}0<Kt.length&&(ht=new dt(ht,Rt,null,d,yt),vt.push({event:ht,listeners:Kt}))}}if((l&7)===0){t:{if(ht=s==="mouseover"||s==="pointerover",dt=s==="mouseout"||s==="pointerout",ht&&d!==fm&&(Rt=d.relatedTarget||d.fromElement)&&(ea(Rt)||Rt[kn]))break t;if((dt||ht)&&(ht=yt.window===yt?yt:(ht=yt.ownerDocument)?ht.defaultView||ht.parentWindow:window,dt?(Rt=d.relatedTarget||d.toElement,dt=ct,Rt=Rt?ea(Rt):null,Rt!==null&&(Ye=o(Rt),Kt=Rt.tag,Rt!==Ye||Kt!==5&&Kt!==27&&Kt!==6)&&(Rt=null)):(dt=null,Rt=ct),dt!==Rt)){if(Kt=I1,xt="onMouseLeave",nt="onMouseEnter",et="mouse",(s==="pointerout"||s==="pointerover")&&(Kt=H1,xt="onPointerLeave",nt="onPointerEnter",et="pointer"),Ye=dt==null?ht:_n(dt),lt=Rt==null?ht:_n(Rt),ht=new Kt(xt,et+"leave",dt,d,yt),ht.target=Ye,ht.relatedTarget=lt,xt=null,ea(yt)===ct&&(Kt=new Kt(nt,et+"enter",Rt,d,yt),Kt.target=lt,Kt.relatedTarget=Ye,xt=Kt),Ye=xt,dt&&Rt)e:{for(Kt=i4,nt=dt,et=Rt,lt=0,xt=nt;xt;xt=Kt(xt))lt++;xt=0;for(var Yt=et;Yt;Yt=Kt(Yt))xt++;for(;0<lt-xt;)nt=Kt(nt),lt--;for(;0<xt-lt;)et=Kt(et),xt--;for(;lt--;){if(nt===et||et!==null&&nt===et.alternate){Kt=nt;break e}nt=Kt(nt),et=Kt(et)}Kt=null}else Kt=null;dt!==null&&jk(vt,ht,dt,Kt,!1),Rt!==null&&Ye!==null&&jk(vt,Ye,Rt,Kt,!0)}}t:{if(ht=ct?_n(ct):window,dt=ht.nodeName&&ht.nodeName.toLowerCase(),dt==="select"||dt==="input"&&ht.type==="file")var Te=Z1;else if(X1(ht))if(K1)Te=dj;else{Te=uj;var zt=hj}else dt=ht.nodeName,!dt||dt.toLowerCase()!=="input"||ht.type!=="checkbox"&&ht.type!=="radio"?ct&&wn(ct.elementType)&&(Te=Z1):Te=fj;if(Te&&(Te=Te(s,ct))){Q1(vt,Te,d,yt);break t}zt&&zt(s,ht,ct),s==="focusout"&&ct&&ht.type==="number"&&ct.memoizedProps.value!=null&&St(ht,"number",ht.value)}switch(zt=ct?_n(ct):window,s){case"focusin":(X1(zt)||zt.contentEditable==="true")&&(Dl=zt,wm=ct,Sh=null);break;case"focusout":Sh=wm=Dl=null;break;case"mousedown":Tm=!0;break;case"contextmenu":case"mouseup":case"dragend":Tm=!1,sC(vt,d,yt);break;case"selectionchange":if(gj)break;case"keydown":case"keyup":sC(vt,d,yt)}var le;if(Cm)t:{switch(s){case"compositionstart":var me="onCompositionStart";break t;case"compositionend":me="onCompositionEnd";break t;case"compositionupdate":me="onCompositionUpdate";break t}me=void 0}else Rl?G1(s,d)&&(me="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(me="onCompositionStart");me&&(U1&&d.locale!=="ko"&&(Rl||me!=="onCompositionStart"?me==="onCompositionEnd"&&Rl&&(le=z1()):(As=yt,mm="value"in As?As.value:As.textContent,Rl=!0)),zt=Rd(ct,me),0<zt.length&&(me=new P1(me,s,null,d,yt),vt.push({event:me,listeners:zt}),le?me.data=le:(le=V1(d),le!==null&&(me.data=le)))),(le=aj?sj(s,d):oj(s,d))&&(me=Rd(ct,"onBeforeInput"),0<me.length&&(zt=new P1("onBeforeInput","beforeinput",null,d,yt),vt.push({event:zt,listeners:me}),zt.data=le)),Kj(vt,s,ct,d,yt)}Nk(vt,l)})}function Xh(s,l,d){return{instance:s,listener:l,currentTarget:d}}function Rd(s,l){for(var d=l+"Capture",m=[];s!==null;){var k=s,S=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||S===null||(k=mh(s,d),k!=null&&m.unshift(Xh(s,k,S)),k=mh(s,l),k!=null&&m.push(Xh(s,k,S))),s.tag===3)return m;s=s.return}return[]}function i4(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function jk(s,l,d,m,k){for(var S=l._reactName,L=[];d!==null&&d!==m;){var z=d,X=z.alternate,ct=z.stateNode;if(z=z.tag,X!==null&&X===m)break;z!==5&&z!==26&&z!==27||ct===null||(X=ct,k?(ct=mh(d,S),ct!=null&&L.unshift(Xh(d,ct,X))):k||(ct=mh(d,S),ct!=null&&L.push(Xh(d,ct,X)))),d=d.return}L.length!==0&&s.push({event:l,listeners:L})}var r4=/\r\n?/g,n4=/\u0000|\uFFFD/g;function Rk(s){return(typeof s=="string"?s:""+s).replace(r4,`
50
- `).replace(n4,"")}function Dk(s,l){return l=Rk(l),Rk(s)===l}function We(s,l,d,m,k,S){switch(d){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||_e(s,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&_e(s,""+m);break;case"className":Xe(s,"class",m);break;case"tabIndex":Xe(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Xe(s,d,m);break;case"style":Aa(s,m,S);break;case"data":if(l!=="object"){Xe(s,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=If(""+m),s.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){s.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(d==="formAction"?(l!=="input"&&We(s,l,"name",k.name,k,null),We(s,l,"formEncType",k.formEncType,k,null),We(s,l,"formMethod",k.formMethod,k,null),We(s,l,"formTarget",k.formTarget,k,null)):(We(s,l,"encType",k.encType,k,null),We(s,l,"method",k.method,k,null),We(s,l,"target",k.target,k,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(d);break}m=If(""+m),s.setAttribute(d,m);break;case"onClick":m!=null&&(s.onclick=Ea);break;case"onScroll":m!=null&&pe("scroll",s);break;case"onScrollEnd":m!=null&&pe("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(k.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}d=If(""+m),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""+m):s.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":m===!0?s.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(d,m):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(d,m):s.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(d):s.setAttribute(d,m);break;case"popover":pe("beforetoggle",s),pe("toggle",s),ji(s,"popover",m);break;case"xlinkActuate":Ri(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Ri(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Ri(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Ri(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Ri(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Ri(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Ri(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Ri(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Ri(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":ji(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=zf.get(d)||d,ji(s,d,m))}}function Zy(s,l,d,m,k,S){switch(d){case"style":Aa(s,m,S);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(d=m.__html,d!=null){if(k.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"children":typeof m=="string"?_e(s,m):(typeof m=="number"||typeof m=="bigint")&&_e(s,""+m);break;case"onScroll":m!=null&&pe("scroll",s);break;case"onScrollEnd":m!=null&&pe("scrollend",s);break;case"onClick":m!=null&&(s.onclick=Ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!G.hasOwnProperty(d))t:{if(d[0]==="o"&&d[1]==="n"&&(k=d.endsWith("Capture"),l=d.slice(2,k?d.length-7:void 0),S=s[yi]||null,S=S!=null?S[d]:null,typeof S=="function"&&s.removeEventListener(l,S,k),typeof m=="function")){typeof S!="function"&&S!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,m,k);break t}d in s?s[d]=m:m===!0?s.setAttribute(d,""):ji(s,d,m)}}}function Yi(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",s),pe("load",s);var m=!1,k=!1,S;for(S in d)if(d.hasOwnProperty(S)){var L=d[S];if(L!=null)switch(S){case"src":m=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:We(s,l,S,L,d,null)}}k&&We(s,l,"srcSet",d.srcSet,d,null),m&&We(s,l,"src",d.src,d,null);return;case"input":pe("invalid",s);var z=S=L=k=null,X=null,ct=null;for(m in d)if(d.hasOwnProperty(m)){var yt=d[m];if(yt!=null)switch(m){case"name":k=yt;break;case"type":L=yt;break;case"checked":X=yt;break;case"defaultChecked":ct=yt;break;case"value":S=yt;break;case"defaultValue":z=yt;break;case"children":case"dangerouslySetInnerHTML":if(yt!=null)throw Error(n(137,l));break;default:We(s,l,m,yt,d,null)}}ut(s,S,z,X,ct,L,k,!1);return;case"select":pe("invalid",s),m=L=S=null;for(k in d)if(d.hasOwnProperty(k)&&(z=d[k],z!=null))switch(k){case"value":S=z;break;case"defaultValue":L=z;break;case"multiple":m=z;default:We(s,l,k,z,d,null)}l=S,d=L,s.multiple=!!m,l!=null?wt(s,!!m,l,!1):d!=null&&wt(s,!!m,d,!0);return;case"textarea":pe("invalid",s),S=k=m=null;for(L in d)if(d.hasOwnProperty(L)&&(z=d[L],z!=null))switch(L){case"value":m=z;break;case"defaultValue":k=z;break;case"children":S=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(n(91));break;default:We(s,l,L,z,d,null)}fe(s,m,k,S);return;case"option":for(X in d)if(d.hasOwnProperty(X)&&(m=d[X],m!=null))switch(X){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:We(s,l,X,m,d,null)}return;case"dialog":pe("beforetoggle",s),pe("toggle",s),pe("cancel",s),pe("close",s);break;case"iframe":case"object":pe("load",s);break;case"video":case"audio":for(m=0;m<Vh.length;m++)pe(Vh[m],s);break;case"image":pe("error",s),pe("load",s);break;case"details":pe("toggle",s);break;case"embed":case"source":case"link":pe("error",s),pe("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ct in d)if(d.hasOwnProperty(ct)&&(m=d[ct],m!=null))switch(ct){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:We(s,l,ct,m,d,null)}return;default:if(wn(l)){for(yt in d)d.hasOwnProperty(yt)&&(m=d[yt],m!==void 0&&Zy(s,l,yt,m,d,void 0));return}}for(z in d)d.hasOwnProperty(z)&&(m=d[z],m!=null&&We(s,l,z,m,d,null))}function a4(s,l,d,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,S=null,L=null,z=null,X=null,ct=null,yt=null;for(dt in d){var vt=d[dt];if(d.hasOwnProperty(dt)&&vt!=null)switch(dt){case"checked":break;case"value":break;case"defaultValue":X=vt;default:m.hasOwnProperty(dt)||We(s,l,dt,null,m,vt)}}for(var ht in m){var dt=m[ht];if(vt=d[ht],m.hasOwnProperty(ht)&&(dt!=null||vt!=null))switch(ht){case"type":S=dt;break;case"name":k=dt;break;case"checked":ct=dt;break;case"defaultChecked":yt=dt;break;case"value":L=dt;break;case"defaultValue":z=dt;break;case"children":case"dangerouslySetInnerHTML":if(dt!=null)throw Error(n(137,l));break;default:dt!==vt&&We(s,l,ht,dt,m,vt)}}ia(s,L,z,X,ct,yt,S,k);return;case"select":dt=L=z=ht=null;for(S in d)if(X=d[S],d.hasOwnProperty(S)&&X!=null)switch(S){case"value":break;case"multiple":dt=X;default:m.hasOwnProperty(S)||We(s,l,S,null,m,X)}for(k in m)if(S=m[k],X=d[k],m.hasOwnProperty(k)&&(S!=null||X!=null))switch(k){case"value":ht=S;break;case"defaultValue":z=S;break;case"multiple":L=S;default:S!==X&&We(s,l,k,S,m,X)}l=z,d=L,m=dt,ht!=null?wt(s,!!d,ht,!1):!!m!=!!d&&(l!=null?wt(s,!!d,l,!0):wt(s,!!d,d?[]:"",!1));return;case"textarea":dt=ht=null;for(z in d)if(k=d[z],d.hasOwnProperty(z)&&k!=null&&!m.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:We(s,l,z,null,m,k)}for(L in m)if(k=m[L],S=d[L],m.hasOwnProperty(L)&&(k!=null||S!=null))switch(L){case"value":ht=k;break;case"defaultValue":dt=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(n(91));break;default:k!==S&&We(s,l,L,k,m,S)}Nt(s,ht,dt);return;case"option":for(var Rt in d)if(ht=d[Rt],d.hasOwnProperty(Rt)&&ht!=null&&!m.hasOwnProperty(Rt))switch(Rt){case"selected":s.selected=!1;break;default:We(s,l,Rt,null,m,ht)}for(X in m)if(ht=m[X],dt=d[X],m.hasOwnProperty(X)&&ht!==dt&&(ht!=null||dt!=null))switch(X){case"selected":s.selected=ht&&typeof ht!="function"&&typeof ht!="symbol";break;default:We(s,l,X,ht,m,dt)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Kt in d)ht=d[Kt],d.hasOwnProperty(Kt)&&ht!=null&&!m.hasOwnProperty(Kt)&&We(s,l,Kt,null,m,ht);for(ct in m)if(ht=m[ct],dt=d[ct],m.hasOwnProperty(ct)&&ht!==dt&&(ht!=null||dt!=null))switch(ct){case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(n(137,l));break;default:We(s,l,ct,ht,m,dt)}return;default:if(wn(l)){for(var Ye in d)ht=d[Ye],d.hasOwnProperty(Ye)&&ht!==void 0&&!m.hasOwnProperty(Ye)&&Zy(s,l,Ye,void 0,m,ht);for(yt in m)ht=m[yt],dt=d[yt],!m.hasOwnProperty(yt)||ht===dt||ht===void 0&&dt===void 0||Zy(s,l,yt,ht,m,dt);return}}for(var nt in d)ht=d[nt],d.hasOwnProperty(nt)&&ht!=null&&!m.hasOwnProperty(nt)&&We(s,l,nt,null,m,ht);for(vt in m)ht=m[vt],dt=d[vt],!m.hasOwnProperty(vt)||ht===dt||ht==null&&dt==null||We(s,l,vt,ht,m,dt)}function Fk(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function s4(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var k=d[m],S=k.transferSize,L=k.initiatorType,z=k.duration;if(S&&z&&Fk(L)){for(L=0,z=k.responseEnd,m+=1;m<d.length;m++){var X=d[m],ct=X.startTime;if(ct>z)break;var yt=X.transferSize,vt=X.initiatorType;yt&&Fk(vt)&&(X=X.responseEnd,L+=yt*(X<z?1:(z-ct)/(X-ct)))}if(--m,l+=8*(S+L)/(k.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Ky=null,Jy=null;function Dd(s){return s.nodeType===9?s:s.ownerDocument}function $k(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zk(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function t0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var e0=null;function o4(){var s=window.event;return s&&s.type==="popstate"?s===e0?!1:(e0=s,!0):(e0=null,!1)}var qk=typeof setTimeout=="function"?setTimeout:void 0,l4=typeof clearTimeout=="function"?clearTimeout:void 0,Ik=typeof Promise=="function"?Promise:void 0,c4=typeof queueMicrotask=="function"?queueMicrotask:typeof Ik<"u"?function(s){return Ik.resolve(null).then(s).catch(h4)}:qk;function h4(s){setTimeout(function(){throw s})}function Ws(s){return s==="head"}function Pk(s,l){var d=l,m=0;do{var k=d.nextSibling;if(s.removeChild(d),k&&k.nodeType===8)if(d=k.data,d==="/$"||d==="/&"){if(m===0){s.removeChild(k),cc(l);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")Qh(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,Qh(d);for(var S=d.firstChild;S;){var L=S.nextSibling,z=S.nodeName;S[ta]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&S.rel.toLowerCase()==="stylesheet"||d.removeChild(S),S=L}}else d==="body"&&Qh(s.ownerDocument.body);d=k}while(d);cc(l)}function Hk(s,l){var d=s;s=0;do{var m=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=m}while(d)}function i0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":i0(d),Ts(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function u4(s,l,d,m){for(;s.nodeType===1;){var k=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[ta])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(S=s.getAttribute("rel"),S==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(S!==k.rel||s.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||s.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||s.getAttribute("title")!==(k.title==null?null:k.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(S=s.getAttribute("src"),(S!==(k.src==null?null:k.src)||s.getAttribute("type")!==(k.type==null?null:k.type)||s.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&S&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var S=k.name==null?null:""+k.name;if(k.type==="hidden"&&s.getAttribute("name")===S)return s}else return s;if(s=on(s.nextSibling),s===null)break}return null}function f4(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=on(s.nextSibling),s===null))return null;return s}function Uk(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=on(s.nextSibling),s===null))return null;return s}function r0(s){return s.data==="$?"||s.data==="$~"}function n0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function d4(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var m=function(){l(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function on(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var a0=null;function Wk(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return on(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function Yk(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function Gk(s,l,d){switch(l=Dd(d),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function Qh(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);Ts(s)}var ln=new Map,Vk=new Set;function Fd(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Wa=I.d;I.d={f:p4,r:g4,D:m4,C:y4,L:x4,m:b4,X:C4,S:v4,M:k4};function p4(){var s=Wa.f(),l=Ad();return s||l}function g4(s){var l=Jr(s);l!==null&&l.tag===5&&l.type==="form"?u2(l):Wa.r(s)}var sc=typeof document>"u"?null:document;function Xk(s,l,d){var m=sc;if(m&&typeof l=="string"&&l){var k=hr(l);k='link[rel="'+s+'"][href="'+k+'"]',typeof d=="string"&&(k+='[crossorigin="'+d+'"]'),Vk.has(k)||(Vk.add(k),s={rel:s,crossOrigin:d,href:l},m.querySelector(k)===null&&(l=m.createElement("link"),Yi(l,"link",s),He(l),m.head.appendChild(l)))}}function m4(s){Wa.D(s),Xk("dns-prefetch",s,null)}function y4(s,l){Wa.C(s,l),Xk("preconnect",s,l)}function x4(s,l,d){Wa.L(s,l,d);var m=sc;if(m&&s&&l){var k='link[rel="preload"][as="'+hr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(k+='[imagesrcset="'+hr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(k+='[imagesizes="'+hr(d.imageSizes)+'"]')):k+='[href="'+hr(s)+'"]';var S=k;switch(l){case"style":S=oc(s);break;case"script":S=lc(s)}ln.has(S)||(s=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),ln.set(S,s),m.querySelector(k)!==null||l==="style"&&m.querySelector(Zh(S))||l==="script"&&m.querySelector(Kh(S))||(l=m.createElement("link"),Yi(l,"link",s),He(l),m.head.appendChild(l)))}}function b4(s,l){Wa.m(s,l);var d=sc;if(d&&s){var m=l&&typeof l.as=="string"?l.as:"script",k='link[rel="modulepreload"][as="'+hr(m)+'"][href="'+hr(s)+'"]',S=k;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=lc(s)}if(!ln.has(S)&&(s=g({rel:"modulepreload",href:s},l),ln.set(S,s),d.querySelector(k)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Kh(S)))return}m=d.createElement("link"),Yi(m,"link",s),He(m),d.head.appendChild(m)}}}function v4(s,l,d){Wa.S(s,l,d);var m=sc;if(m&&s){var k=Ii(m).hoistableStyles,S=oc(s);l=l||"default";var L=k.get(S);if(!L){var z={loading:0,preload:null};if(L=m.querySelector(Zh(S)))z.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":l},d),(d=ln.get(S))&&s0(s,d);var X=L=m.createElement("link");He(X),Yi(X,"link",s),X._p=new Promise(function(ct,yt){X.onload=ct,X.onerror=yt}),X.addEventListener("load",function(){z.loading|=1}),X.addEventListener("error",function(){z.loading|=2}),z.loading|=4,$d(L,l,m)}L={type:"stylesheet",instance:L,count:1,state:z},k.set(S,L)}}}function C4(s,l){Wa.X(s,l);var d=sc;if(d&&s){var m=Ii(d).hoistableScripts,k=lc(s),S=m.get(k);S||(S=d.querySelector(Kh(k)),S||(s=g({src:s,async:!0},l),(l=ln.get(k))&&o0(s,l),S=d.createElement("script"),He(S),Yi(S,"link",s),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(k,S))}}function k4(s,l){Wa.M(s,l);var d=sc;if(d&&s){var m=Ii(d).hoistableScripts,k=lc(s),S=m.get(k);S||(S=d.querySelector(Kh(k)),S||(s=g({src:s,async:!0,type:"module"},l),(l=ln.get(k))&&o0(s,l),S=d.createElement("script"),He(S),Yi(S,"link",s),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(k,S))}}function Qk(s,l,d,m){var k=(k=kt.current)?Fd(k):null;if(!k)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=oc(d.href),d=Ii(k).hoistableStyles,m=d.get(l),m||(m={type:"style",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=oc(d.href);var S=Ii(k).hoistableStyles,L=S.get(s);if(L||(k=k.ownerDocument||k,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(s,L),(S=k.querySelector(Zh(s)))&&!S._p&&(L.instance=S,L.state.loading=5),ln.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ln.set(s,d),S||_4(k,s,d,L.state))),l&&m===null)throw Error(n(528,""));return L}if(l&&m!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=lc(d),d=Ii(k).hoistableScripts,m=d.get(l),m||(m={type:"script",instance:null,count:0,state:null},d.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function oc(s){return'href="'+hr(s)+'"'}function Zh(s){return'link[rel="stylesheet"]['+s+"]"}function Zk(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function _4(s,l,d,m){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=s.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),Yi(l,"link",d),He(l),s.head.appendChild(l))}function lc(s){return'[src="'+hr(s)+'"]'}function Kh(s){return"script[async]"+s}function Kk(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var m=s.querySelector('style[data-href~="'+hr(d.href)+'"]');if(m)return l.instance=m,He(m),m;var k=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),He(m),Yi(m,"style",k),$d(m,d.precedence,s),l.instance=m;case"stylesheet":k=oc(d.href);var S=s.querySelector(Zh(k));if(S)return l.state.loading|=4,l.instance=S,He(S),S;m=Zk(d),(k=ln.get(k))&&s0(m,k),S=(s.ownerDocument||s).createElement("link"),He(S);var L=S;return L._p=new Promise(function(z,X){L.onload=z,L.onerror=X}),Yi(S,"link",m),l.state.loading|=4,$d(S,d.precedence,s),l.instance=S;case"script":return S=lc(d.src),(k=s.querySelector(Kh(S)))?(l.instance=k,He(k),k):(m=d,(k=ln.get(S))&&(m=g({},d),o0(m,k)),s=s.ownerDocument||s,k=s.createElement("script"),He(k),Yi(k,"link",m),s.head.appendChild(k),l.instance=k);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,$d(m,d.precedence,s));return l.instance}function $d(s,l,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=m.length?m[m.length-1]:null,S=k,L=0;L<m.length;L++){var z=m[L];if(z.dataset.precedence===l)S=z;else if(S!==k)break}S?S.parentNode.insertBefore(s,S.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function s0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function o0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var zd=null;function Jk(s,l,d){if(zd===null){var m=new Map,k=zd=new Map;k.set(d,m)}else k=zd,m=k.get(d),m||(m=new Map,k.set(d,m));if(m.has(s))return m;for(m.set(s,null),d=d.getElementsByTagName(s),k=0;k<d.length;k++){var S=d[k];if(!(S[ta]||S[ai]||s==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var L=S.getAttribute(l)||"";L=s+L;var z=m.get(L);z?z.push(S):m.set(L,[S])}}return m}function t_(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function S4(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function e_(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function w4(s,l,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var k=oc(m.href),S=l.querySelector(Zh(k));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=qd.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=S,He(S);return}S=l.ownerDocument||l,m=Zk(m),(k=ln.get(k))&&s0(m,k),S=S.createElement("link"),He(S);var L=S;L._p=new Promise(function(z,X){L.onload=z,L.onerror=X}),Yi(S,"link",m),d.instance=S}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=qd.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var l0=0;function T4(s,l){return s.stylesheets&&s.count===0&&Pd(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var m=setTimeout(function(){if(s.stylesheets&&Pd(s,s.stylesheets),s.unsuspend){var S=s.unsuspend;s.unsuspend=null,S()}},6e4+l);0<s.imgBytes&&l0===0&&(l0=62500*s4());var k=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Pd(s,s.stylesheets),s.unsuspend)){var S=s.unsuspend;s.unsuspend=null,S()}},(s.imgBytes>l0?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(k)}}:null}function qd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Id=null;function Pd(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Id=new Map,l.forEach(B4,s),Id=null,qd.call(s))}function B4(s,l){if(!(l.state.loading&4)){var d=Id.get(s);if(d)var m=d.get(null);else{d=new Map,Id.set(s,d);for(var k=s.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<k.length;S++){var L=k[S];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(d.set(L.dataset.precedence,L),m=L)}m&&d.set(null,m)}k=l.instance,L=k.getAttribute("data-precedence"),S=d.get(L)||m,S===m&&d.set(null,k),d.set(L,k),this.count++,m=qd.bind(this),k.addEventListener("load",m),k.addEventListener("error",m),S?S.parentNode.insertBefore(k,S.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(k,s.firstChild)),l.state.loading|=4}}var Jh={$$typeof:A,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function A4(s,l,d,m,k,S,L,z,X){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=vs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vs(0),this.hiddenUpdates=vs(null),this.identifierPrefix=m,this.onUncaughtError=k,this.onCaughtError=S,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function i_(s,l,d,m,k,S,L,z,X,ct,yt,vt){return s=new A4(s,l,d,L,X,ct,yt,vt,z),l=1,S===!0&&(l|=24),S=qr(3,null,null,l),s.current=S,S.stateNode=s,l=Im(),l.refCount++,s.pooledCache=l,l.refCount++,S.memoizedState={element:m,isDehydrated:d,cache:l},Wm(S),s}function r_(s){return s?(s=zl,s):zl}function n_(s,l,d,m,k,S){k=r_(k),m.context===null?m.context=k:m.pendingContext=k,m=js(l),m.payload={element:d},S=S===void 0?null:S,S!==null&&(m.callback=S),d=Rs(s,m,l),d!==null&&(Ar(d,s,l),Lh(d,s,l))}function a_(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function c0(s,l){a_(s,l),(s=s.alternate)&&a_(s,l)}function s_(s){if(s.tag===13||s.tag===31){var l=Lo(s,67108864);l!==null&&Ar(l,s,67108864),c0(s,67108864)}}function o_(s){if(s.tag===13||s.tag===31){var l=Wr();l=_s(l);var d=Lo(s,l);d!==null&&Ar(d,s,l),c0(s,l)}}var Hd=!0;function E4(s,l,d,m){var k=j.T;j.T=null;var S=I.p;try{I.p=2,h0(s,l,d,m)}finally{I.p=S,j.T=k}}function M4(s,l,d,m){var k=j.T;j.T=null;var S=I.p;try{I.p=8,h0(s,l,d,m)}finally{I.p=S,j.T=k}}function h0(s,l,d,m){if(Hd){var k=u0(m);if(k===null)Qy(s,l,m,Ud,d),c_(s,m);else if(N4(k,s,l,d,m))m.stopPropagation();else if(c_(s,m),l&4&&-1<L4.indexOf(s)){for(;k!==null;){var S=Jr(k);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var L=$r(S.pendingLanes);if(L!==0){var z=S;for(z.pendingLanes|=2,z.entangledLanes|=2;L;){var X=1<<31-mi(L);z.entanglements[1]|=X,L&=~X}sa(S),(Le&6)===0&&(Td=Pe()+500,Gh(0))}}break;case 31:case 13:z=Lo(S,2),z!==null&&Ar(z,S,2),Ad(),c0(S,2)}if(S=u0(m),S===null&&Qy(s,l,m,Ud,d),S===k)break;k=S}k!==null&&m.stopPropagation()}else Qy(s,l,m,null,d)}}function u0(s){return s=dm(s),f0(s)}var Ud=null;function f0(s){if(Ud=null,s=ea(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=c(l),s!==null)return s;s=null}else if(d===31){if(s=h(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return Ud=s,null}function l_(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(or()){case Un:return 2;case Kr:return 8;case Dr:case Wn:return 32;case lr:return 268435456;default:return 32}default:return 32}}var d0=!1,Ys=null,Gs=null,Vs=null,tu=new Map,eu=new Map,Xs=[],L4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function c_(s,l){switch(s){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Gs=null;break;case"mouseover":case"mouseout":Vs=null;break;case"pointerover":case"pointerout":tu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(l.pointerId)}}function iu(s,l,d,m,k,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:S,targetContainers:[k]},l!==null&&(l=Jr(l),l!==null&&s_(l)),s):(s.eventSystemFlags|=m,l=s.targetContainers,k!==null&&l.indexOf(k)===-1&&l.push(k),s)}function N4(s,l,d,m,k){switch(l){case"focusin":return Ys=iu(Ys,s,l,d,m,k),!0;case"dragenter":return Gs=iu(Gs,s,l,d,m,k),!0;case"mouseover":return Vs=iu(Vs,s,l,d,m,k),!0;case"pointerover":var S=k.pointerId;return tu.set(S,iu(tu.get(S)||null,s,l,d,m,k)),!0;case"gotpointercapture":return S=k.pointerId,eu.set(S,iu(eu.get(S)||null,s,l,d,m,k)),!0}return!1}function h_(s){var l=ea(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=c(d),l!==null){s.blockedOn=l,Ki(s.priority,function(){o_(d)});return}}else if(l===31){if(l=h(d),l!==null){s.blockedOn=l,Ki(s.priority,function(){o_(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Wd(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=u0(s.nativeEvent);if(d===null){d=s.nativeEvent;var m=new d.constructor(d.type,d);fm=m,d.target.dispatchEvent(m),fm=null}else return l=Jr(d),l!==null&&s_(l),s.blockedOn=d,!1;l.shift()}return!0}function u_(s,l,d){Wd(s)&&d.delete(l)}function O4(){d0=!1,Ys!==null&&Wd(Ys)&&(Ys=null),Gs!==null&&Wd(Gs)&&(Gs=null),Vs!==null&&Wd(Vs)&&(Vs=null),tu.forEach(u_),eu.forEach(u_)}function Yd(s,l){s.blockedOn===l&&(s.blockedOn=null,d0||(d0=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,O4)))}var Gd=null;function f_(s){Gd!==s&&(Gd=s,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Gd===s&&(Gd=null);for(var l=0;l<s.length;l+=3){var d=s[l],m=s[l+1],k=s[l+2];if(typeof m!="function"){if(f0(m||d)===null)continue;break}var S=Jr(d);S!==null&&(s.splice(l,3),l-=3,uy(S,{pending:!0,data:k,method:d.method,action:m},m,k))}}))}function cc(s){function l(X){return Yd(X,s)}Ys!==null&&Yd(Ys,s),Gs!==null&&Yd(Gs,s),Vs!==null&&Yd(Vs,s),tu.forEach(l),eu.forEach(l);for(var d=0;d<Xs.length;d++){var m=Xs[d];m.blockedOn===s&&(m.blockedOn=null)}for(;0<Xs.length&&(d=Xs[0],d.blockedOn===null);)h_(d),d.blockedOn===null&&Xs.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var k=d[m],S=d[m+1],L=k[yi]||null;if(typeof S=="function")L||f_(d);else if(L){var z=null;if(S&&S.hasAttribute("formAction")){if(k=S,L=S[yi]||null)z=L.formAction;else if(f0(k)!==null)continue}else z=L.action;typeof z=="function"?d[m+1]=z:(d.splice(m,3),m-=3),f_(d)}}}function d_(){function s(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(L){return k=L})},focusReset:"manual",scroll:"manual"})}function l(){k!==null&&(k(),k=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,k=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),k!==null&&(k(),k=null)}}}function p0(s){this._internalRoot=s}Vd.prototype.render=p0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,m=Wr();n_(d,m,s,l,null,null)},Vd.prototype.unmount=p0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;n_(s.current,2,null,s,null,null),Ad(),l[kn]=null}};function Vd(s){this._internalRoot=s}Vd.prototype.unstable_scheduleHydration=function(s){if(s){var l=Cn();s={blockedOn:null,target:s,priority:l};for(var d=0;d<Xs.length&&l!==0&&l<Xs[d].priority;d++);Xs.splice(d,0,s),d===0&&h_(s)}};var p_=e.version;if(p_!=="19.2.4")throw Error(n(527,p_,"19.2.4"));I.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=f(l),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var j4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xd.isDisabled&&Xd.supportsFiber)try{Zi=Xd.inject(j4),wi=Xd}catch{}}return nu.createRoot=function(s,l){if(!a(s))throw Error(n(299));var d=!1,m="",k=C2,S=k2,L=_2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(k=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError)),l=i_(s,1,!1,null,null,d,m,null,k,S,L,d_),s[kn]=l.current,Xy(s),new p0(l)},nu.hydrateRoot=function(s,l,d){if(!a(s))throw Error(n(299));var m=!1,k="",S=C2,L=k2,z=_2,X=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(k=d.identifierPrefix),d.onUncaughtError!==void 0&&(S=d.onUncaughtError),d.onCaughtError!==void 0&&(L=d.onCaughtError),d.onRecoverableError!==void 0&&(z=d.onRecoverableError),d.formState!==void 0&&(X=d.formState)),l=i_(s,1,!0,l,d??null,m,k,X,S,L,z,d_),l.context=r_(null),d=l.current,m=Wr(),m=_s(m),k=js(m),k.callback=null,Rs(d,k,m),d=m,l.current.lanes=d,Fe(l,d),sa(l),s[kn]=l.current,Xy(s),new Vd(l)},nu.version="19.2.4",nu}var w_;function G4(){if(w_)return x0.exports;w_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),x0.exports=Y4(),x0.exports}var V4=G4(),lh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},X4={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},no,iv,xB,Q4=(xB=class{constructor(){Ut(this,no,X4);Ut(this,iv,!1)}setTimeoutProvider(i){Mt(this,no,i)}setTimeout(i,e){return Q(this,no).setTimeout(i,e)}clearTimeout(i){Q(this,no).clearTimeout(i)}setInterval(i,e){return Q(this,no).setInterval(i,e)}clearInterval(i){Q(this,no).clearInterval(i)}},no=new WeakMap,iv=new WeakMap,xB),Zo=new Q4;function Z4(i){setTimeout(i,0)}var pl=typeof window>"u"||"Deno"in globalThis;function pr(){}function K4(i,e){return typeof i=="function"?i(e):i}function yx(i){return typeof i=="number"&&i>=0&&i!==1/0}function EB(i,e){return Math.max(i+(e||0)-Date.now(),0)}function mo(i,e){return typeof i=="function"?i(e):i}function pn(i,e){return typeof i=="function"?i(e):i}function T_(i,e){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:h}=i;if(c){if(n){if(e.queryHash!==nv(c,e.options))return!1}else if(!tf(e.queryKey,c))return!1}if(r!=="all"){const u=e.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof h=="boolean"&&e.isStale()!==h||a&&a!==e.state.fetchStatus||o&&!o(e))}function B_(i,e){const{exact:r,status:n,predicate:a,mutationKey:o}=i;if(o){if(!e.options.mutationKey)return!1;if(r){if(gl(e.options.mutationKey)!==gl(o))return!1}else if(!tf(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function nv(i,e){return((e==null?void 0:e.queryKeyHashFn)||gl)(i)}function gl(i){return JSON.stringify(i,(e,r)=>xx(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function tf(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(r=>tf(i[r],e[r])):!1}var J4=Object.prototype.hasOwnProperty;function MB(i,e,r=0){if(i===e)return i;if(r>500)return e;const n=A_(i)&&A_(e);if(!n&&!(xx(i)&&xx(e)))return e;const o=(n?i:Object.keys(i)).length,c=n?e:Object.keys(e),h=c.length,u=n?new Array(h):{};let f=0;for(let p=0;p<h;p++){const g=n?p:c[p],x=i[g],y=e[g];if(x===y){u[g]=x,(n?p<o:J4.call(i,g))&&f++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){u[g]=y;continue}const v=MB(x,y,r+1);u[g]=v,v===x&&f++}return o===h&&f===o?i:u}function qp(i,e){if(!e||Object.keys(i).length!==Object.keys(e).length)return!1;for(const r in i)if(i[r]!==e[r])return!1;return!0}function A_(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function xx(i){if(!E_(i))return!1;const e=i.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!E_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function E_(i){return Object.prototype.toString.call(i)==="[object Object]"}function tR(i){return new Promise(e=>{Zo.setTimeout(e,i)})}function bx(i,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(i,e):r.structuralSharing!==!1?MB(i,e):e}function eR(i,e,r=0){const n=[...i,e];return r&&n.length>r?n.slice(1):n}function iR(i,e,r=0){const n=[e,...i];return r&&n.length>r?n.slice(0,-1):n}var av=Symbol();function LB(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===av?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function sv(i,e){return typeof i=="function"?i(...e):!!i}function rR(i,e,r){let n=!1,a;return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(a??(a=e()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),i}var il,ao,Ac,bB,nR=(bB=class extends lh{constructor(){super();Ut(this,il);Ut(this,ao);Ut(this,Ac);Mt(this,Ac,e=>{if(!pl&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){Q(this,ao)||this.setEventListener(Q(this,Ac))}onUnsubscribe(){var e;this.hasListeners()||((e=Q(this,ao))==null||e.call(this),Mt(this,ao,void 0))}setEventListener(e){var r;Mt(this,Ac,e),(r=Q(this,ao))==null||r.call(this),Mt(this,ao,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){Q(this,il)!==e&&(Mt(this,il,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof Q(this,il)=="boolean"?Q(this,il):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},il=new WeakMap,ao=new WeakMap,Ac=new WeakMap,bB),ov=new nR;function vx(){let i,e;const r=new Promise((a,o)=>{i=a,e=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),i(a)},r.reject=a=>{n({status:"rejected",reason:a}),e(a)},r}var aR=Z4;function sR(){let i=[],e=0,r=h=>{h()},n=h=>{h()},a=aR;const o=h=>{e?i.push(h):a(()=>{r(h)})},c=()=>{const h=i;i=[],h.length&&a(()=>{n(()=>{h.forEach(u=>{r(u)})})})};return{batch:h=>{let u;e++;try{u=h()}finally{e--,e||c()}return u},batchCalls:h=>(...u)=>{o(()=>{h(...u)})},schedule:o,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{n=h},setScheduler:h=>{a=h}}}var Ai=sR(),Ec,so,Mc,vB,oR=(vB=class extends lh{constructor(){super();Ut(this,Ec,!0);Ut(this,so);Ut(this,Mc);Mt(this,Mc,e=>{if(!pl&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){Q(this,so)||this.setEventListener(Q(this,Mc))}onUnsubscribe(){var e;this.hasListeners()||((e=Q(this,so))==null||e.call(this),Mt(this,so,void 0))}setEventListener(e){var r;Mt(this,Mc,e),(r=Q(this,so))==null||r.call(this),Mt(this,so,e(this.setOnline.bind(this)))}setOnline(e){Q(this,Ec)!==e&&(Mt(this,Ec,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return Q(this,Ec)}},Ec=new WeakMap,so=new WeakMap,Mc=new WeakMap,vB),Ip=new oR;function lR(i){return Math.min(1e3*2**i,3e4)}function NB(i){return(i??"online")==="online"?Ip.isOnline():!0}var Cx=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function OB(i){let e=!1,r=0,n;const a=vx(),o=()=>a.status!=="pending",c=C=>{var _;if(!o()){const w=new Cx(C);x(w),(_=i.onCancel)==null||_.call(i,w)}},h=()=>{e=!0},u=()=>{e=!1},f=()=>ov.isFocused()&&(i.networkMode==="always"||Ip.isOnline())&&i.canRun(),p=()=>NB(i.networkMode)&&i.canRun(),g=C=>{o()||(n==null||n(),a.resolve(C))},x=C=>{o()||(n==null||n(),a.reject(C))},y=()=>new Promise(C=>{var _;n=w=>{(o()||f())&&C(w)},(_=i.onPause)==null||_.call(i)}).then(()=>{var C;n=void 0,o()||(C=i.onContinue)==null||C.call(i)}),v=()=>{if(o())return;let C;const _=r===0?i.initialPromise:void 0;try{C=_??i.fn()}catch(w){C=Promise.reject(w)}Promise.resolve(C).then(g).catch(w=>{var R;if(o())return;const T=i.retry??(pl?0:3),A=i.retryDelay??lR,E=typeof A=="function"?A(r,w):A,N=T===!0||typeof T=="number"&&r<T||typeof T=="function"&&T(r,w);if(e||!N){x(w);return}r++,(R=i.onFail)==null||R.call(i,r,w),tR(E).then(()=>f()?void 0:y()).then(()=>{e?x(w):v()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:h,continueRetry:u,canStart:p,start:()=>(p()?v():y().then(v),a)}}var rl,CB,jB=(CB=class{constructor(){Ut(this,rl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yx(this.gcTime)&&Mt(this,rl,Zo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(pl?1/0:300*1e3))}clearGcTimeout(){Q(this,rl)&&(Zo.clearTimeout(Q(this,rl)),Mt(this,rl,void 0))}},rl=new WeakMap,CB),nl,Lc,dn,al,Fi,xf,sl,Mn,Za,kB,cR=(kB=class extends jB{constructor(e){super();Ut(this,Mn);Ut(this,nl);Ut(this,Lc);Ut(this,dn);Ut(this,al);Ut(this,Fi);Ut(this,xf);Ut(this,sl);Mt(this,sl,!1),Mt(this,xf,e.defaultOptions),this.setOptions(e.options),this.observers=[],Mt(this,al,e.client),Mt(this,dn,Q(this,al).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Mt(this,nl,L_(this.options)),this.state=e.state??Q(this,nl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Q(this,Fi))==null?void 0:e.promise}setOptions(e){if(this.options={...Q(this,xf),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=L_(this.options);r.data!==void 0&&(this.setState(M_(r.data,r.dataUpdatedAt)),Mt(this,nl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,dn).remove(this)}setData(e,r){const n=bx(this.state.data,e,this.options);return he(this,Mn,Za).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){he(this,Mn,Za).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,a;const r=(n=Q(this,Fi))==null?void 0:n.promise;return(a=Q(this,Fi))==null||a.cancel(e),r?r.then(pr).catch(pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,nl))}isActive(){return this.observers.some(e=>pn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===av||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>mo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!EB(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=Q(this,Fi))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=Q(this,Fi))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Q(this,dn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(Q(this,Fi)&&(Q(this,sl)?Q(this,Fi).cancel({revert:!0}):Q(this,Fi).cancelRetry()),this.scheduleGc()),Q(this,dn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Mn,Za).call(this,{type:"invalidate"})}async fetch(e,r){var u,f,p,g,x,y,v,C,_,w,T,A;if(this.state.fetchStatus!=="idle"&&((u=Q(this,Fi))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Fi))return Q(this,Fi).continueRetry(),Q(this,Fi).promise}if(e&&this.setOptions(e),!this.options.queryFn){const E=this.observers.find(N=>N.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,a=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Mt(this,sl,!0),n.signal)})},o=()=>{const E=LB(this.options,r),R=(()=>{const M={client:Q(this,al),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return Mt(this,sl,!1),this.options.persister?this.options.persister(E,R,this):E(R)},h=(()=>{const E={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:Q(this,al),state:this.state,fetchFn:o};return a(E),E})();(f=this.options.behavior)==null||f.onFetch(h,this),Mt(this,Lc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=h.fetchOptions)==null?void 0:p.meta))&&he(this,Mn,Za).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta}),Mt(this,Fi,OB({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:E=>{E instanceof Cx&&E.revert&&this.setState({...Q(this,Lc),fetchStatus:"idle"}),n.abort()},onFail:(E,N)=>{he(this,Mn,Za).call(this,{type:"failed",failureCount:E,error:N})},onPause:()=>{he(this,Mn,Za).call(this,{type:"pause"})},onContinue:()=>{he(this,Mn,Za).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const E=await Q(this,Fi).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(y=(x=Q(this,dn).config).onSuccess)==null||y.call(x,E,this),(C=(v=Q(this,dn).config).onSettled)==null||C.call(v,E,this.state.error,this),E}catch(E){if(E instanceof Cx){if(E.silent)return Q(this,Fi).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw he(this,Mn,Za).call(this,{type:"error",error:E}),(w=(_=Q(this,dn).config).onError)==null||w.call(_,E,this),(A=(T=Q(this,dn).config).onSettled)==null||A.call(T,this.state.data,E,this),E}finally{this.scheduleGc()}}},nl=new WeakMap,Lc=new WeakMap,dn=new WeakMap,al=new WeakMap,Fi=new WeakMap,xf=new WeakMap,sl=new WeakMap,Mn=new WeakSet,Za=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...RB(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...M_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Mt(this,Lc,e.manual?a:void 0),a;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),Ai.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),Q(this,dn).notify({query:this,type:"updated",action:e})})},kB);function RB(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:NB(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function M_(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function L_(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,r=e!==void 0,n=r?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Mr,be,bf,dr,ol,Nc,ts,oo,vf,Oc,jc,ll,cl,lo,Rc,je,Mu,kx,_x,Sx,wx,Tx,Bx,Ax,DB,_B,hR=(_B=class extends lh{constructor(e,r){super();Ut(this,je);Ut(this,Mr);Ut(this,be);Ut(this,bf);Ut(this,dr);Ut(this,ol);Ut(this,Nc);Ut(this,ts);Ut(this,oo);Ut(this,vf);Ut(this,Oc);Ut(this,jc);Ut(this,ll);Ut(this,cl);Ut(this,lo);Ut(this,Rc,new Set);this.options=r,Mt(this,Mr,e),Mt(this,oo,null),Mt(this,ts,vx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,be).addObserver(this),N_(Q(this,be),this.options)?he(this,je,Mu).call(this):this.updateResult(),he(this,je,wx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ex(Q(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ex(Q(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,je,Tx).call(this),he(this,je,Bx).call(this),Q(this,be).removeObserver(this)}setOptions(e){const r=this.options,n=Q(this,be);if(this.options=Q(this,Mr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pn(this.options.enabled,Q(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,je,Ax).call(this),Q(this,be).setOptions(this.options),r._defaulted&&!qp(this.options,r)&&Q(this,Mr).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,be),observer:this});const a=this.hasListeners();a&&O_(Q(this,be),n,this.options,r)&&he(this,je,Mu).call(this),this.updateResult(),a&&(Q(this,be)!==n||pn(this.options.enabled,Q(this,be))!==pn(r.enabled,Q(this,be))||mo(this.options.staleTime,Q(this,be))!==mo(r.staleTime,Q(this,be)))&&he(this,je,kx).call(this);const o=he(this,je,_x).call(this);a&&(Q(this,be)!==n||pn(this.options.enabled,Q(this,be))!==pn(r.enabled,Q(this,be))||o!==Q(this,lo))&&he(this,je,Sx).call(this,o)}getOptimisticResult(e){const r=Q(this,Mr).getQueryCache().build(Q(this,Mr),e),n=this.createResult(r,e);return fR(this,n)&&(Mt(this,dr,n),Mt(this,Nc,this.options),Mt(this,ol,Q(this,be).state)),n}getCurrentResult(){return Q(this,dr)}trackResult(e,r){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Q(this,ts).status==="pending"&&Q(this,ts).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){Q(this,Rc).add(e)}getCurrentQuery(){return Q(this,be)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=Q(this,Mr).defaultQueryOptions(e),n=Q(this,Mr).getQueryCache().build(Q(this,Mr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return he(this,je,Mu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,dr)))}createResult(e,r){var Y;const n=Q(this,be),a=this.options,o=Q(this,dr),c=Q(this,ol),h=Q(this,Nc),f=e!==n?e.state:Q(this,bf),{state:p}=e;let g={...p},x=!1,y;if(r._optimisticResults){const $=this.hasListeners(),q=!$&&N_(e,r),J=$&&O_(e,n,r,a);(q||J)&&(g={...g,...RB(p.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:_}=g;y=g.data;let w=!1;if(r.placeholderData!==void 0&&y===void 0&&_==="pending"){let $;o!=null&&o.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?($=o.data,w=!0):$=typeof r.placeholderData=="function"?r.placeholderData((Y=Q(this,jc))==null?void 0:Y.state.data,Q(this,jc)):r.placeholderData,$!==void 0&&(_="success",y=bx(o==null?void 0:o.data,$,r),x=!0)}if(r.select&&y!==void 0&&!w)if(o&&y===(c==null?void 0:c.data)&&r.select===Q(this,vf))y=Q(this,Oc);else try{Mt(this,vf,r.select),y=r.select(y),y=bx(o==null?void 0:o.data,y,r),Mt(this,Oc,y),Mt(this,oo,null)}catch($){Mt(this,oo,$)}Q(this,oo)&&(v=Q(this,oo),y=Q(this,Oc),C=Date.now(),_="error");const T=g.fetchStatus==="fetching",A=_==="pending",E=_==="error",N=A&&T,R=y!==void 0,O={status:_,fetchStatus:g.fetchStatus,isPending:A,isSuccess:_==="success",isError:E,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:T,isRefetching:T&&!A,isLoadingError:E&&!R,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:E&&R,isStale:lv(e,r),refetch:this.refetch,promise:Q(this,ts),isEnabled:pn(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const $=O.data!==void 0,q=O.status==="error"&&!$,J=U=>{q?U.reject(O.error):$&&U.resolve(O.data)},W=()=>{const U=Mt(this,ts,O.promise=vx());J(U)},F=Q(this,ts);switch(F.status){case"pending":e.queryHash===n.queryHash&&J(F);break;case"fulfilled":(q||O.data!==F.value)&&W();break;case"rejected":(!q||O.error!==F.reason)&&W();break}}return O}updateResult(){const e=Q(this,dr),r=this.createResult(Q(this,be),this.options);if(Mt(this,ol,Q(this,be).state),Mt(this,Nc,this.options),Q(this,ol).data!==void 0&&Mt(this,jc,Q(this,be)),qp(r,e))return;Mt(this,dr,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!Q(this,Rc).size)return!0;const c=new Set(o??Q(this,Rc));return this.options.throwOnError&&c.add("error"),Object.keys(Q(this,dr)).some(h=>{const u=h;return Q(this,dr)[u]!==e[u]&&c.has(u)})};he(this,je,DB).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,je,wx).call(this)}},Mr=new WeakMap,be=new WeakMap,bf=new WeakMap,dr=new WeakMap,ol=new WeakMap,Nc=new WeakMap,ts=new WeakMap,oo=new WeakMap,vf=new WeakMap,Oc=new WeakMap,jc=new WeakMap,ll=new WeakMap,cl=new WeakMap,lo=new WeakMap,Rc=new WeakMap,je=new WeakSet,Mu=function(e){he(this,je,Ax).call(this);let r=Q(this,be).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(pr)),r},kx=function(){he(this,je,Tx).call(this);const e=mo(this.options.staleTime,Q(this,be));if(pl||Q(this,dr).isStale||!yx(e))return;const n=EB(Q(this,dr).dataUpdatedAt,e)+1;Mt(this,ll,Zo.setTimeout(()=>{Q(this,dr).isStale||this.updateResult()},n))},_x=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,be)):this.options.refetchInterval)??!1},Sx=function(e){he(this,je,Bx).call(this),Mt(this,lo,e),!(pl||pn(this.options.enabled,Q(this,be))===!1||!yx(Q(this,lo))||Q(this,lo)===0)&&Mt(this,cl,Zo.setInterval(()=>{(this.options.refetchIntervalInBackground||ov.isFocused())&&he(this,je,Mu).call(this)},Q(this,lo)))},wx=function(){he(this,je,kx).call(this),he(this,je,Sx).call(this,he(this,je,_x).call(this))},Tx=function(){Q(this,ll)&&(Zo.clearTimeout(Q(this,ll)),Mt(this,ll,void 0))},Bx=function(){Q(this,cl)&&(Zo.clearInterval(Q(this,cl)),Mt(this,cl,void 0))},Ax=function(){const e=Q(this,Mr).getQueryCache().build(Q(this,Mr),this.options);if(e===Q(this,be))return;const r=Q(this,be);Mt(this,be,e),Mt(this,bf,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},DB=function(e){Ai.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(Q(this,dr))}),Q(this,Mr).getQueryCache().notify({query:Q(this,be),type:"observerResultsUpdated"})})},_B);function uR(i,e){return pn(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function N_(i,e){return uR(i,e)||i.state.data!==void 0&&Ex(i,e,e.refetchOnMount)}function Ex(i,e,r){if(pn(e.enabled,i)!==!1&&mo(e.staleTime,i)!=="static"){const n=typeof r=="function"?r(i):r;return n==="always"||n!==!1&&lv(i,e)}return!1}function O_(i,e,r,n){return(i!==e||pn(n.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&lv(i,r)}function lv(i,e){return pn(e.enabled,i)!==!1&&i.isStaleByTime(mo(e.staleTime,i))}function fR(i,e){return!qp(i.getCurrentResult(),e)}function j_(i){return{onFetch:(e,r)=>{var p,g,x,y,v;const n=e.options,a=(x=(g=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],c=((v=e.state.data)==null?void 0:v.pageParams)||[];let h={pages:[],pageParams:[]},u=0;const f=async()=>{let C=!1;const _=A=>{rR(A,()=>e.signal,()=>C=!0)},w=LB(e.options,e.fetchOptions),T=async(A,E,N)=>{if(C)return Promise.reject();if(E==null&&A.pages.length)return Promise.resolve(A);const M=(()=>{const q={client:e.client,queryKey:e.queryKey,pageParam:E,direction:N?"backward":"forward",meta:e.options.meta};return _(q),q})(),O=await w(M),{maxPages:Y}=e.options,$=N?iR:eR;return{pages:$(A.pages,O,Y),pageParams:$(A.pageParams,E,Y)}};if(a&&o.length){const A=a==="backward",E=A?dR:R_,N={pages:o,pageParams:c},R=E(n,N);h=await T(N,R,A)}else{const A=i??o.length;do{const E=u===0?c[0]??n.initialPageParam:R_(n,h);if(u>0&&E==null)break;h=await T(h,E),u++}while(u<A)}return h};e.options.persister?e.fetchFn=()=>{var C,_;return(_=(C=e.options).persister)==null?void 0:_.call(C,f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=f}}}function R_(i,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?i.getNextPageParam(e[n],e,r[n],r):void 0}function dR(i,{pages:e,pageParams:r}){var n;return e.length>0?(n=i.getPreviousPageParam)==null?void 0:n.call(i,e[0],e,r[0],r):void 0}var Cf,ga,rr,hl,ma,to,SB,pR=(SB=class extends jB{constructor(e){super();Ut(this,ma);Ut(this,Cf);Ut(this,ga);Ut(this,rr);Ut(this,hl);Mt(this,Cf,e.client),this.mutationId=e.mutationId,Mt(this,rr,e.mutationCache),Mt(this,ga,[]),this.state=e.state||FB(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Q(this,ga).includes(e)||(Q(this,ga).push(e),this.clearGcTimeout(),Q(this,rr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Mt(this,ga,Q(this,ga).filter(r=>r!==e)),this.scheduleGc(),Q(this,rr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Q(this,ga).length||(this.state.status==="pending"?this.scheduleGc():Q(this,rr).remove(this))}continue(){var e;return((e=Q(this,hl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,h,u,f,p,g,x,y,v,C,_,w,T,A,E,N,R,M;const r=()=>{he(this,ma,to).call(this,{type:"continue"})},n={client:Q(this,Cf),meta:this.options.meta,mutationKey:this.options.mutationKey};Mt(this,hl,OB({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(O,Y)=>{he(this,ma,to).call(this,{type:"failed",failureCount:O,error:Y})},onPause:()=>{he(this,ma,to).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,rr).canRun(this)}));const a=this.state.status==="pending",o=!Q(this,hl).canStart();try{if(a)r();else{he(this,ma,to).call(this,{type:"pending",variables:e,isPaused:o}),Q(this,rr).config.onMutate&&await Q(this,rr).config.onMutate(e,this,n);const Y=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,n));Y!==this.state.context&&he(this,ma,to).call(this,{type:"pending",context:Y,variables:e,isPaused:o})}const O=await Q(this,hl).start();return await((f=(u=Q(this,rr).config).onSuccess)==null?void 0:f.call(u,O,e,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,O,e,this.state.context,n)),await((y=(x=Q(this,rr).config).onSettled)==null?void 0:y.call(x,O,null,this.state.variables,this.state.context,this,n)),await((C=(v=this.options).onSettled)==null?void 0:C.call(v,O,null,e,this.state.context,n)),he(this,ma,to).call(this,{type:"success",data:O}),O}catch(O){try{await((w=(_=Q(this,rr).config).onError)==null?void 0:w.call(_,O,e,this.state.context,this,n))}catch(Y){Promise.reject(Y)}try{await((A=(T=this.options).onError)==null?void 0:A.call(T,O,e,this.state.context,n))}catch(Y){Promise.reject(Y)}try{await((N=(E=Q(this,rr).config).onSettled)==null?void 0:N.call(E,void 0,O,this.state.variables,this.state.context,this,n))}catch(Y){Promise.reject(Y)}try{await((M=(R=this.options).onSettled)==null?void 0:M.call(R,void 0,O,e,this.state.context,n))}catch(Y){Promise.reject(Y)}throw he(this,ma,to).call(this,{type:"error",error:O}),O}finally{Q(this,rr).runNext(this)}}},Cf=new WeakMap,ga=new WeakMap,rr=new WeakMap,hl=new WeakMap,ma=new WeakSet,to=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ai.batch(()=>{Q(this,ga).forEach(n=>{n.onMutationUpdate(e)}),Q(this,rr).notify({mutation:this,type:"updated",action:e})})},SB);function FB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var es,Ln,kf,wB,gR=(wB=class extends lh{constructor(e={}){super();Ut(this,es);Ut(this,Ln);Ut(this,kf);this.config=e,Mt(this,es,new Set),Mt(this,Ln,new Map),Mt(this,kf,0)}build(e,r,n){const a=new pR({client:e,mutationCache:this,mutationId:++Qd(this,kf)._,options:e.defaultMutationOptions(r),state:n});return this.add(a),a}add(e){Q(this,es).add(e);const r=Zd(e);if(typeof r=="string"){const n=Q(this,Ln).get(r);n?n.push(e):Q(this,Ln).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Q(this,es).delete(e)){const r=Zd(e);if(typeof r=="string"){const n=Q(this,Ln).get(r);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&Q(this,Ln).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Zd(e);if(typeof r=="string"){const n=Q(this,Ln).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){var n;const r=Zd(e);if(typeof r=="string"){const a=(n=Q(this,Ln).get(r))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ai.batch(()=>{Q(this,es).forEach(e=>{this.notify({type:"removed",mutation:e})}),Q(this,es).clear(),Q(this,Ln).clear()})}getAll(){return Array.from(Q(this,es))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>B_(r,n))}findAll(e={}){return this.getAll().filter(r=>B_(e,r))}notify(e){Ai.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return Ai.batch(()=>Promise.all(e.map(r=>r.continue().catch(pr))))}},es=new WeakMap,Ln=new WeakMap,kf=new WeakMap,wB);function Zd(i){var e;return(e=i.options.scope)==null?void 0:e.id}var is,co,Lr,rs,hs,_p,Mx,TB,mR=(TB=class extends lh{constructor(r,n){super();Ut(this,hs);Ut(this,is);Ut(this,co);Ut(this,Lr);Ut(this,rs);Mt(this,is,r),this.setOptions(n),this.bindMethods(),he(this,hs,_p).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var a;const n=this.options;this.options=Q(this,is).defaultMutationOptions(r),qp(this.options,n)||Q(this,is).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,Lr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&gl(n.mutationKey)!==gl(this.options.mutationKey)?this.reset():((a=Q(this,Lr))==null?void 0:a.state.status)==="pending"&&Q(this,Lr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=Q(this,Lr))==null||r.removeObserver(this)}onMutationUpdate(r){he(this,hs,_p).call(this),he(this,hs,Mx).call(this,r)}getCurrentResult(){return Q(this,co)}reset(){var r;(r=Q(this,Lr))==null||r.removeObserver(this),Mt(this,Lr,void 0),he(this,hs,_p).call(this),he(this,hs,Mx).call(this)}mutate(r,n){var a;return Mt(this,rs,n),(a=Q(this,Lr))==null||a.removeObserver(this),Mt(this,Lr,Q(this,is).getMutationCache().build(Q(this,is),this.options)),Q(this,Lr).addObserver(this),Q(this,Lr).execute(r)}},is=new WeakMap,co=new WeakMap,Lr=new WeakMap,rs=new WeakMap,hs=new WeakSet,_p=function(){var n;const r=((n=Q(this,Lr))==null?void 0:n.state)??FB();Mt(this,co,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Mx=function(r){Ai.batch(()=>{var n,a,o,c,h,u,f,p;if(Q(this,rs)&&this.hasListeners()){const g=Q(this,co).variables,x=Q(this,co).context,y={client:Q(this,is),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(a=(n=Q(this,rs)).onSuccess)==null||a.call(n,r.data,g,x,y)}catch(v){Promise.reject(v)}try{(c=(o=Q(this,rs)).onSettled)==null||c.call(o,r.data,null,g,x,y)}catch(v){Promise.reject(v)}}else if((r==null?void 0:r.type)==="error"){try{(u=(h=Q(this,rs)).onError)==null||u.call(h,r.error,g,x,y)}catch(v){Promise.reject(v)}try{(p=(f=Q(this,rs)).onSettled)==null||p.call(f,void 0,r.error,g,x,y)}catch(v){Promise.reject(v)}}}this.listeners.forEach(g=>{g(Q(this,co))})})},TB),ya,BB,yR=(BB=class extends lh{constructor(e={}){super();Ut(this,ya);this.config=e,Mt(this,ya,new Map)}build(e,r,n){const a=r.queryKey,o=r.queryHash??nv(a,r);let c=this.get(o);return c||(c=new cR({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){Q(this,ya).has(e.queryHash)||(Q(this,ya).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=Q(this,ya).get(e.queryHash);r&&(e.destroy(),r===e&&Q(this,ya).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ai.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Q(this,ya).get(e)}getAll(){return[...Q(this,ya).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>T_(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>T_(e,n)):r}notify(e){Ai.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Ai.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ai.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ya=new WeakMap,BB),fi,ho,uo,Dc,Fc,fo,$c,zc,AB,xR=(AB=class{constructor(i={}){Ut(this,fi);Ut(this,ho);Ut(this,uo);Ut(this,Dc);Ut(this,Fc);Ut(this,fo);Ut(this,$c);Ut(this,zc);Mt(this,fi,i.queryCache||new yR),Mt(this,ho,i.mutationCache||new gR),Mt(this,uo,i.defaultOptions||{}),Mt(this,Dc,new Map),Mt(this,Fc,new Map),Mt(this,fo,0)}mount(){Qd(this,fo)._++,Q(this,fo)===1&&(Mt(this,$c,ov.subscribe(async i=>{i&&(await this.resumePausedMutations(),Q(this,fi).onFocus())})),Mt(this,zc,Ip.subscribe(async i=>{i&&(await this.resumePausedMutations(),Q(this,fi).onOnline())})))}unmount(){var i,e;Qd(this,fo)._--,Q(this,fo)===0&&((i=Q(this,$c))==null||i.call(this),Mt(this,$c,void 0),(e=Q(this,zc))==null||e.call(this),Mt(this,zc,void 0))}isFetching(i){return Q(this,fi).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return Q(this,ho).findAll({...i,status:"pending"}).length}getQueryData(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=Q(this,fi).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),r=Q(this,fi).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&r.isStaleByTime(mo(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return Q(this,fi).findAll(i).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(i,e,r){const n=this.defaultQueryOptions({queryKey:i}),a=Q(this,fi).get(n.queryHash),o=a==null?void 0:a.state.data,c=K4(e,o);if(c!==void 0)return Q(this,fi).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(i,e,r){return Ai.batch(()=>Q(this,fi).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(i){var r;const e=this.defaultQueryOptions({queryKey:i});return(r=Q(this,fi).get(e.queryHash))==null?void 0:r.state}removeQueries(i){const e=Q(this,fi);Ai.batch(()=>{e.findAll(i).forEach(r=>{e.remove(r)})})}resetQueries(i,e){const r=Q(this,fi);return Ai.batch(()=>(r.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const r={revert:!0,...e},n=Ai.batch(()=>Q(this,fi).findAll(i).map(a=>a.cancel(r)));return Promise.all(n).then(pr).catch(pr)}invalidateQueries(i,e={}){return Ai.batch(()=>(Q(this,fi).findAll(i).forEach(r=>{r.invalidate()}),(i==null?void 0:i.refetchType)==="none"?Promise.resolve():this.refetchQueries({...i,type:(i==null?void 0:i.refetchType)??(i==null?void 0:i.type)??"active"},e)))}refetchQueries(i,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=Ai.batch(()=>Q(this,fi).findAll(i).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(pr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(pr)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const r=Q(this,fi).build(this,e);return r.isStaleByTime(mo(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(pr).catch(pr)}fetchInfiniteQuery(i){return i.behavior=j_(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(pr).catch(pr)}ensureInfiniteQueryData(i){return i.behavior=j_(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return Ip.isOnline()?Q(this,ho).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,fi)}getMutationCache(){return Q(this,ho)}getDefaultOptions(){return Q(this,uo)}setDefaultOptions(i){Mt(this,uo,i)}setQueryDefaults(i,e){Q(this,Dc).set(gl(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...Q(this,Dc).values()],r={};return e.forEach(n=>{tf(i,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(i,e){Q(this,Fc).set(gl(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...Q(this,Fc).values()],r={};return e.forEach(n=>{tf(i,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(i){if(i._defaulted)return i;const e={...Q(this,uo).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=nv(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===av&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...Q(this,uo).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){Q(this,fi).clear(),Q(this,ho).clear()}},fi=new WeakMap,ho=new WeakMap,uo=new WeakMap,Dc=new WeakMap,Fc=new WeakMap,fo=new WeakMap,$c=new WeakMap,zc=new WeakMap,AB),$B=tt.createContext(void 0),Zr=i=>{const e=tt.useContext($B);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},bR=({client:i,children:e})=>(tt.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),b.jsx($B.Provider,{value:i,children:e})),zB=tt.createContext(!1),vR=()=>tt.useContext(zB);zB.Provider;function CR(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var kR=tt.createContext(CR()),_R=()=>tt.useContext(kR),SR=(i,e,r)=>{const n=r!=null&&r.state.error&&typeof i.throwOnError=="function"?sv(i.throwOnError,[r.state.error,r]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},wR=i=>{tt.useEffect(()=>{i.clearReset()},[i])},TR=({result:i,errorResetBoundary:e,throwOnError:r,query:n,suspense:a})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(a&&i.data===void 0||sv(r,[i.error,n])),BR=i=>{if(i.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=i.staleTime;i.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3))}},AR=(i,e)=>i.isLoading&&i.isFetching&&!e,ER=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,D_=(i,e,r)=>e.fetchOptimistic(i).catch(()=>{r.clearReset()});function MR(i,e,r){var x,y,v,C;const n=vR(),a=_R(),o=Zr(),c=o.defaultQueryOptions(i);(y=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||y.call(x,c);const h=o.getQueryCache().get(c.queryHash);c._optimisticResults=n?"isRestoring":"optimistic",BR(c),SR(c,a,h),wR(a);const u=!o.getQueryCache().get(c.queryHash),[f]=tt.useState(()=>new e(o,c)),p=f.getOptimisticResult(c),g=!n&&i.subscribed!==!1;if(tt.useSyncExternalStore(tt.useCallback(_=>{const w=g?f.subscribe(Ai.batchCalls(_)):pr;return f.updateResult(),w},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),tt.useEffect(()=>{f.setOptions(c)},[c,f]),ER(c,p))throw D_(c,f,a);if(TR({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw p.error;if((C=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||C.call(v,c,p),c.experimental_prefetchInRender&&!pl&&AR(p,n)){const _=u?D_(c,f,a):h==null?void 0:h.promise;_==null||_.catch(pr).finally(()=>{f.updateResult()})}return c.notifyOnChangeProps?p:f.trackResult(p)}function zi(i,e){return MR(i,hR)}function _a(i,e){const r=Zr(),[n]=tt.useState(()=>new mR(r,i));tt.useEffect(()=>{n.setOptions(i)},[n,i]);const a=tt.useSyncExternalStore(tt.useCallback(c=>n.subscribe(Ai.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=tt.useCallback((c,h)=>{n.mutate(c,h).catch(pr)},[n]);if(a.error&&sv(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}const qB=tt.createContext(null);function IB(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function F_(i){return i==="system"?IB():i}function LR({children:i}){const[e,r]=tt.useState(()=>localStorage.getItem("dreamcontext-theme")||"system"),[n,a]=tt.useState(()=>F_(e)),o=c=>{r(c),localStorage.setItem("dreamcontext-theme",c)};return tt.useEffect(()=>{const c=F_(e);a(c),document.documentElement.setAttribute("data-theme",c)},[e]),tt.useEffect(()=>{if(e!=="system")return;const c=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const u=IB();a(u),document.documentElement.setAttribute("data-theme",u)};return c.addEventListener("change",h),()=>c.removeEventListener("change",h)},[e]),b.jsx(qB.Provider,{value:{theme:e,resolved:n,setTheme:o},children:i})}function Rg(){const i=tt.useContext(qB);if(!i)throw new Error("useTheme must be used within ThemeProvider");return i}const NR={en:{"nav.brain":"Brain","nav.tasks":"Tasks","nav.core":"Core Files","nav.knowledge":"Knowledge","nav.features":"Features","nav.sleep":"Sleep State","nav.council":"Council","nav.settings":"Settings","nav.packs":"Packs","nav.group.workspace":"Workspace","nav.group.control":"Control Panel","nav.collapse":"Collapse","nav.expand":"Expand","council.title":"Council","council.tab.verdict":"Verdict","council.tab.matrix":"Matrix","council.tab.transcript":"Transcript","council.search.placeholder":"Search sessions…","council.search.matrix":"Filter cells by text…","council.search.transcript":"Search transcript…","council.filter.all":"All","council.filter.status":"Status","council.inspector.empty":"Select a persona or cell to inspect.","council.inspector.selectCell":"Select a cell in the matrix for round details.","council.verdict.awaitingSynthesis":"Awaiting synthesis","council.verdict.synthPending":"The final report will appear here once the synthesizer runs.","council.empty.list":"No council sessions yet.","council.empty.detail":"Select a council session from the list.","tasks.title":"Tasks","tasks.create":"New Task","tasks.filter":"Filter","tasks.todo":"To Do","tasks.in_progress":"In Progress","tasks.in_review":"In Review","tasks.completed":"Completed","tasks.name":"Task Name","tasks.description":"Description","tasks.priority":"Priority","tasks.tags":"Tags","tasks.save":"Create Task","tasks.cancel":"Cancel","tasks.changelog":"Changelog","tasks.add_entry":"Add Entry","rice.title":"RICE","rice.reach":"Reach","rice.impact":"Impact","rice.confidence":"Confidence","rice.effort":"Effort","rice.score":"Score","rice.clear":"Clear RICE","rice.tooltip.reach":"How many people / sessions / units affected (1–10)","rice.tooltip.impact":"How much per affected unit (1=minimal, 5=massive)","rice.tooltip.confidence":"How sure are you? (25, 50, 75, 100)","rice.tooltip.effort":"Person-weeks (0.5–8 typical, max 52)","rice.empty":"Not rated","sort.rice":"RICE score","filter.min_rice":"Min RICE","priority.critical":"Critical","priority.high":"High","priority.medium":"Medium","priority.low":"Low","sleep.title":"Sleep State","sleep.debt":"Debt","sleep.level":"Level","sleep.last_sleep":"Last Sleep","sleep.sessions":"Sessions","sleep.alert":"Alert","sleep.drowsy":"Drowsy","sleep.sleepy":"Sleepy","sleep.must_sleep":"Must Sleep","sleep.changelog":"Changelog","sleep.changelog.pending":"Will fold into next sleep","sleep.changelog.breaking":"BREAKING","sleep.changelog.earlier":"earlier entries not shown","core.title":"Core Files","knowledge.title":"Knowledge","knowledge.pin":"Pin","knowledge.unpin":"Unpin","knowledge.search":"Search knowledge...","features.title":"Features","settings.title":"Settings","settings.platforms":"Platforms","settings.save":"Save","settings.saving":"Saving...","settings.saved":"Saved","settings.no_config":"No configuration file found. Saving will create one with your selections.","settings.platform.claude":"Claude (Anthropic)","settings.platform.codex":"Codex (OpenAI)","settings.packs.installed":"Installed","packs.title":"Skill Packs","packs.section.packs":"Packs","packs.section.standalone":"Standalone Skills","packs.detail.base":"Base Skill","packs.detail.subskills":"Sub-Skills","packs.detail.agents":"Related Agents","packs.detail.close":"Close","packs.action.install":"Install","packs.action.remove":"Remove","packs.action.installing":"Installing…","packs.action.removing":"Removing…","packs.action.error":"Action failed","update.available":"Update available","update.title":"Update Available","update.dismiss":"Dismiss","update.managePacks":"Manage packs →","common.loading":"Loading...","common.error":"Error","common.empty":"Nothing here yet.","common.close":"Close"}},PB=tt.createContext(null);function OR({children:i}){const[e,r]=tt.useState("en"),n=a=>{var o;return((o=NR[e])==null?void 0:o[a])??a};return b.jsx(PB.Provider,{value:{locale:e,setLocale:r,t:n},children:i})}function oi(){const i=tt.useContext(PB);if(!i)throw new Error("useI18n must be used within I18nProvider");return i}const jR="/api";class RR{async request(e,r){const n=await fetch(`${jR}${e}`,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!n.ok){let a=`Request failed: ${n.status}`;try{const o=await n.json();o.message&&(a=o.message)}catch{}throw new Error(a)}return await n.json()}get(e){return this.request(e)}post(e,r){return this.request(e,{method:"POST",body:JSON.stringify(r)})}patch(e,r){return this.request(e,{method:"PATCH",body:JSON.stringify(r)})}put(e,r){return this.request(e,{method:"PUT",body:JSON.stringify(r)})}del(e){return this.request(e,{method:"DELETE"})}}const Ie=new RR,HB=tt.createContext({projectId:"",contextRoot:""});function DR(i){let e=0;for(let r=0;r<i.length;r++)e=(e<<5)-e+i.charCodeAt(r)|0;return Math.abs(e).toString(36)}function FR({children:i}){const[e,r]=tt.useState({kind:"loading"});return tt.useEffect(()=>{Ie.get("/health").then(n=>{r({kind:"ready",value:{contextRoot:n.contextRoot,projectId:DR(n.contextRoot)}})}).catch(()=>{r({kind:"ready",value:{projectId:"",contextRoot:""}})})},[]),e.kind==="loading"?b.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--color-text-secondary, #888)",fontSize:"14px"},children:"Loading project…"}):b.jsx(HB.Provider,{value:e.value,children:i})}function UB(){return tt.useContext(HB)}function WB(i){return i<=3?"Alert":i<=6?"Drowsy":i<=9?"Sleepy":"Must Sleep"}function YB(i){return i<=3?"alert":i<=6?"drowsy":i<=9?"sleepy":"must_sleep"}function GB(){return zi({queryKey:["sleep"],queryFn:()=>Ie.get("/sleep")})}function $R(){return zi({queryKey:["version-check"],queryFn:()=>Ie.get("/version-check")})}function cv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Tl=cv();function VB(i){Tl=i}var Pu={exec:()=>null};function Re(i,e=""){let r=typeof i=="string"?i:i.source;const n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(mr.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var mr={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:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},zR=/^(?:[ \t]*(?:\n|$))+/,qR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,IR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,PR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hv=/(?:[*+-]|\d{1,9}[.)])/,XB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,QB=Re(XB).replace(/bull/g,hv).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(),HR=Re(XB).replace(/bull/g,hv).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(),uv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,UR=/^[^\n]+/,fv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,WR=Re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),YR=Re(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hv).getRegex(),Dg="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",dv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,GR=Re("^ {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",dv).replace("tag",Dg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ZB=Re(uv).replace("hr",_f).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",Dg).getRegex(),VR=Re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZB).getRegex(),pv={blockquote:VR,code:qR,def:WR,fences:IR,heading:PR,hr:_f,html:GR,lheading:QB,list:YR,newline:zR,paragraph:ZB,table:Pu,text:UR},$_=Re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_f).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",Dg).getRegex(),XR={...pv,lheading:HR,table:$_,paragraph:Re(uv).replace("hr",_f).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",Dg).getRegex()},QR={...pv,html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dv).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:Pu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Re(uv).replace("hr",_f).replace("heading",` *#{1,6} *[^
51
- ]`).replace("lheading",QB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ZR=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,KR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,KB=/^( {2,}|\\)\n(?!\s*$)/,JR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fg=/[\p{P}\p{S}]/u,gv=/[\s\p{P}\p{S}]/u,JB=/[^\s\p{P}\p{S}]/u,tD=Re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,gv).getRegex(),tA=/(?!~)[\p{P}\p{S}]/u,eD=/(?!~)[\s\p{P}\p{S}]/u,iD=/(?:[^\s\p{P}\p{S}]|~)/u,rD=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,eA=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nD=Re(eA,"u").replace(/punct/g,Fg).getRegex(),aD=Re(eA,"u").replace(/punct/g,tA).getRegex(),iA="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sD=Re(iA,"gu").replace(/notPunctSpace/g,JB).replace(/punctSpace/g,gv).replace(/punct/g,Fg).getRegex(),oD=Re(iA,"gu").replace(/notPunctSpace/g,iD).replace(/punctSpace/g,eD).replace(/punct/g,tA).getRegex(),lD=Re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,JB).replace(/punctSpace/g,gv).replace(/punct/g,Fg).getRegex(),cD=Re(/\\(punct)/,"gu").replace(/punct/g,Fg).getRegex(),hD=Re(/^<(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(),uD=Re(dv).replace("(?:-->|$)","-->").getRegex(),fD=Re("^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",uD).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,dD=Re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Pp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rA=Re(/^!?\[(label)\]\[(ref)\]/).replace("label",Pp).replace("ref",fv).getRegex(),nA=Re(/^!?\[(ref)\](?:\[\])?/).replace("ref",fv).getRegex(),pD=Re("reflink|nolink(?!\\()","g").replace("reflink",rA).replace("nolink",nA).getRegex(),mv={_backpedal:Pu,anyPunctuation:cD,autolink:hD,blockSkip:rD,br:KB,code:KR,del:Pu,emStrongLDelim:nD,emStrongRDelimAst:sD,emStrongRDelimUnd:lD,escape:ZR,link:dD,nolink:nA,punctuation:tD,reflink:rA,reflinkSearch:pD,tag:fD,text:JR,url:Pu},gD={...mv,link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",Pp).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pp).getRegex()},Lx={...mv,emStrongRDelimAst:oD,emStrongLDelim:aD,url:Re(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},mD={...Lx,br:Re(KB).replace("{2,}","*").getRegex(),text:Re(Lx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Kd={normal:pv,gfm:XR,pedantic:QR},au={normal:mv,gfm:Lx,breaks:mD,pedantic:gD},yD={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},z_=i=>yD[i];function la(i,e){if(e){if(mr.escapeTest.test(i))return i.replace(mr.escapeReplace,z_)}else if(mr.escapeTestNoEncode.test(i))return i.replace(mr.escapeReplaceNoEncode,z_);return i}function q_(i){try{i=encodeURI(i).replace(mr.percentDecode,"%")}catch{return null}return i}function I_(i,e){var o;const r=i.replace(mr.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(mr.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(mr.slashPipe,"|");return n}function su(i,e,r){const n=i.length;if(n===0)return"";let a=0;for(;a<n&&i.charAt(n-a-1)===e;)a++;return i.slice(0,n-a)}function xD(i,e){if(i.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])r++;else if(i[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function P_(i,e,r,n,a){const o=e.href,c=e.title||null,h=i[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function bD(i,e,r){const n=i.match(r.other.indentCodeCompensation);if(n===null)return e;const a=n[1];return e.split(`
52
- `).map(o=>{const c=o.match(r.other.beginningSpace);if(c===null)return o;const[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
53
- `)}var Hp=class{constructor(i){Ht(this,"options");Ht(this,"rules");Ht(this,"lexer");this.options=i||Tl}space(i){const e=this.rules.block.newline.exec(i);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(i){const e=this.rules.block.code.exec(i);if(e){const r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:su(r,`
54
- `)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const r=e[0],n=bD(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(i){const e=this.rules.block.heading.exec(i);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){const n=su(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(i){const e=this.rules.block.hr.exec(i);if(e)return{type:"hr",raw:su(e[0],`
55
- `)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let r=su(e[0],`
56
- `).split(`
57
- `),n="",a="";const o=[];for(;r.length>0;){let c=!1;const h=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))h.push(r[u]),c=!0;else if(!c)h.push(r[u]);else break;r=r.slice(u);const f=h.join(`
58
- `),p=f.replace(this.rules.other.blockquoteSetextReplace,`
59
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
60
- ${f}`:f,a=a?`${a}
61
- ${p}`:p;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=g,r.length===0)break;const x=o.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const y=x,v=y.raw+`
62
- `+r.join(`
63
- `),C=this.blockquote(v);o[o.length-1]=C,n=n.substring(0,n.length-y.raw.length)+C.raw,a=a.substring(0,a.length-y.text.length)+C.text;break}else if((x==null?void 0:x.type)==="list"){const y=x,v=y.raw+`
64
- `+r.join(`
65
- `),C=this.list(v);o[o.length-1]=C,n=n.substring(0,n.length-x.raw.length)+C.raw,a=a.substring(0,a.length-y.raw.length)+C.raw,r=v.substring(o.at(-1).raw.length).split(`
66
- `);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(i){let e=this.rules.block.list.exec(i);if(e){let r=e[1].trim();const n=r.length>1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const o=this.rules.other.listItemRegex(r);let c=!1;for(;i;){let u=!1,f="",p="";if(!(e=o.exec(i))||this.rules.block.hr.test(i))break;f=e[0],i=i.substring(f.length);let g=e[2].split(`
67
- `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),x=i.split(`
68
- `,1)[0],y=!g.trim(),v=0;if(this.options.pedantic?(v=2,p=g.trimStart()):y?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,p=g.slice(v),v+=e[1].length),y&&this.rules.other.blankLine.test(x)&&(f+=x+`
69
- `,i=i.substring(x.length+1),u=!0),!u){const w=this.rules.other.nextBulletRegex(v),T=this.rules.other.hrRegex(v),A=this.rules.other.fencesBeginRegex(v),E=this.rules.other.headingBeginRegex(v),N=this.rules.other.htmlBeginRegex(v);for(;i;){const R=i.split(`
70
- `,1)[0];let M;if(x=R,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),M=x):M=x.replace(this.rules.other.tabCharGlobal," "),A.test(x)||E.test(x)||N.test(x)||w.test(x)||T.test(x))break;if(M.search(this.rules.other.nonSpaceChar)>=v||!x.trim())p+=`
71
- `+M.slice(v);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||E.test(g)||T.test(g))break;p+=`
72
- `+x}!y&&!x.trim()&&(y=!0),f+=R+`
73
- `,i=i.substring(R.length+1),g=M.slice(v)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let C=null,_;this.options.gfm&&(C=this.rules.other.listIsTask.exec(p),C&&(_=C[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:f,task:!!C,checked:_,loose:!1,text:p,tokens:[]}),a.raw+=f}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u=0;u<a.items.length;u++)if(this.lexer.state.top=!1,a.items[u].tokens=this.lexer.blockTokens(a.items[u].text,[]),!a.loose){const f=a.items[u].tokens.filter(g=>g.type==="space"),p=f.length>0&&f.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=p}if(a.loose)for(let u=0;u<a.items.length;u++)a.items[u].loose=!0;return a}}html(i){const e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){const e=this.rules.block.def.exec(i);if(e){const r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:a}}}table(i){var c;const e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const r=I_(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=e[3])!=null&&c.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
74
- `):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const h of n)this.rules.other.tableAlignRight.test(h)?o.align.push("right"):this.rules.other.tableAlignCenter.test(h)?o.align.push("center"):this.rules.other.tableAlignLeft.test(h)?o.align.push("left"):o.align.push(null);for(let h=0;h<r.length;h++)o.header.push({text:r[h],tokens:this.lexer.inline(r[h]),header:!0,align:o.align[h]});for(const h of a)o.rows.push(I_(h,o.header.length).map((u,f)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[f]})));return o}}lheading(i){const e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){const e=this.rules.block.paragraph.exec(i);if(e){const r=e[1].charAt(e[1].length-1)===`
75
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(i){const e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){const e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){const e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){const e=this.rules.inline.link.exec(i);if(e){const r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=su(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=xD(e[2],"()");if(o===-2)return;if(o>-1){const h=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),P_(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(i,e){let r;if((r=this.rules.inline.reflink.exec(i))||(r=this.rules.inline.nolink.exec(i))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return P_(r,a,r[0],this.lexer,this.rules)}}emStrong(i,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(i);if(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...n[0]].length-1;let c,h,u=o,f=0;const p=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*i.length+o);(n=p.exec(e))!=null;){if(c=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!c)continue;if(h=[...c].length,n[3]||n[4]){u+=h;continue}else if((n[5]||n[6])&&o%3&&!((o+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);const g=[...n[0]][0].length,x=i.slice(0,o+n.index+g+h);if(Math.min(o,h)%2){const v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}const y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(i){const e=this.rules.inline.code.exec(i);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(i){const e=this.rules.inline.br.exec(i);if(e)return{type:"br",raw:e[0]}}del(i){const e=this.rules.inline.del.exec(i);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(i){const e=this.rules.inline.autolink.exec(i);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(i){var r;let e;if(e=this.rules.inline.url.exec(i)){let n,a;if(e[2]==="@")n=e[0],a="mailto:"+n;else{let o;do o=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(o!==e[0]);n=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(i){const e=this.rules.inline.text.exec(i);if(e){const r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},ns=class Nx{constructor(e){Ht(this,"tokens");Ht(this,"options");Ht(this,"state");Ht(this,"tokenizer");Ht(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Tl,this.options.tokenizer=this.options.tokenizer||new Hp,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:mr,block:Kd.normal,inline:au.normal};this.options.pedantic?(r.block=Kd.pedantic,r.inline=au.pedantic):this.options.gfm&&(r.block=Kd.gfm,this.options.breaks?r.inline=au.breaks:r.inline=au.gfm),this.tokenizer.rules=r}static get rules(){return{block:Kd,inline:au}}static lex(e,r){return new Nx(r).lex(e)}static lexInline(e,r){return new Nx(r).inlineTokens(e)}lex(e){e=e.replace(mr.carriageReturn,`
76
- `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(mr.tabCharGlobal," ").replace(mr.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(f=>(h=f.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);const f=r.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
77
- `:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);const f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=`
78
- `+h.raw,f.text+=`
79
- `+h.text,this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);const f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=`
80
- `+h.raw,f.text+=`
81
- `+h.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0;const p=e.slice(1);let g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(u=e.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){const f=r.at(-1);n&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=`
82
- `+h.raw,f.text+=`
83
- `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=`
84
- `+h.raw,f.text+=`
85
- `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var h,u,f;let n=e,a=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;e;){o||(c=""),o=!1;let p;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(x=>(p=x.call({lexer:this},e,r))?(e=e.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(p.raw.length);const x=r.at(-1);p.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(e,n,c)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(e)){e=e.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(e)){e=e.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(e))){e=e.substring(p.raw.length),r.push(p);continue}let g=e;if((f=this.options.extensions)!=null&&f.startInline){let x=1/0;const y=e.slice(1);let v;this.options.extensions.startInline.forEach(C=>{v=C.call({lexer:this},y),typeof v=="number"&&v>=0&&(x=Math.min(x,v))}),x<1/0&&x>=0&&(g=e.substring(0,x+1))}if(p=this.tokenizer.inlineText(g)){e=e.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(c=p.raw.slice(-1)),o=!0;const x=r.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=p.raw,x.text+=p.text):r.push(p);continue}if(e){const x="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return r}},Up=class{constructor(i){Ht(this,"options");Ht(this,"parser");this.options=i||Tl}space(i){return""}code({text:i,lang:e,escaped:r}){var o;const n=(o=(e||"").match(mr.notSpaceStart))==null?void 0:o[0],a=i.replace(mr.endingNewline,"")+`
86
- `;return n?'<pre><code class="language-'+la(n)+'">'+(r?a:la(a,!0))+`</code></pre>
87
- `:"<pre><code>"+(r?a:la(a,!0))+`</code></pre>
88
- `}blockquote({tokens:i}){return`<blockquote>
89
- ${this.parser.parse(i)}</blockquote>
90
- `}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
91
- `}hr(i){return`<hr>
92
- `}list(i){const e=i.ordered,r=i.start;let n="";for(let c=0;c<i.items.length;c++){const h=i.items[c];n+=this.listitem(h)}const a=e?"ol":"ul",o=e&&r!==1?' start="'+r+'"':"";return"<"+a+o+`>
93
- `+n+"</"+a+`>
94
- `}listitem(i){var r;let e="";if(i.task){const n=this.checkbox({checked:!!i.checked});i.loose?((r=i.tokens[0])==null?void 0:r.type)==="paragraph"?(i.tokens[0].text=n+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=n+" "+la(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(i.tokens,!!i.loose),`<li>${e}</li>
95
- `}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
96
- `}table(i){let e="",r="";for(let a=0;a<i.header.length;a++)r+=this.tablecell(i.header[a]);e+=this.tablerow({text:r});let n="";for(let a=0;a<i.rows.length;a++){const o=i.rows[a];r="";for(let c=0;c<o.length;c++)r+=this.tablecell(o[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
97
- <thead>
98
- `+e+`</thead>
99
- `+n+`</table>
100
- `}tablerow({text:i}){return`<tr>
101
- ${i}</tr>
102
- `}tablecell(i){const e=this.parser.parseInline(i.tokens),r=i.header?"th":"td";return(i.align?`<${r} align="${i.align}">`:`<${r}>`)+e+`</${r}>
103
- `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${la(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:r}){const n=this.parser.parseInline(r),a=q_(i);if(a===null)return n;i=a;let o='<a href="'+i+'"';return e&&(o+=' title="'+la(e)+'"'),o+=">"+n+"</a>",o}image({href:i,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const a=q_(i);if(a===null)return la(r);i=a;let o=`<img src="${i}" alt="${r}"`;return e&&(o+=` title="${la(e)}"`),o+=">",o}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:la(i.text)}},yv=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},as=class Ox{constructor(e){Ht(this,"options");Ht(this,"renderer");Ht(this,"textRenderer");this.options=e||Tl,this.options.renderer=this.options.renderer||new Up,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yv}static parse(e,r){return new Ox(r).parse(e)}static parseInline(e,r){return new Ox(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const f=h,p=this.options.extensions.renderers[f.type].call({parser:this},f);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(f.type)){n+=p||"";continue}}const u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let f=u,p=this.renderer.text(f);for(;c+1<e.length&&e[c+1].type==="text";)f=e[++c],p+=`
104
- `+this.renderer.text(f);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){const h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){const f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=f||"";continue}}const u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},mx,Sp=(mx=class{constructor(i){Ht(this,"options");Ht(this,"block");this.options=i||Tl}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?ns.lex:ns.lexInline}provideParser(){return this.block?as.parse:as.parseInline}},Ht(mx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),mx),vD=class{constructor(...i){Ht(this,"defaults",cv());Ht(this,"options",this.setOptions);Ht(this,"parse",this.parseMarkdown(!0));Ht(this,"parseInline",this.parseMarkdown(!1));Ht(this,"Parser",as);Ht(this,"Renderer",Up);Ht(this,"TextRenderer",yv);Ht(this,"Lexer",ns);Ht(this,"Tokenizer",Hp);Ht(this,"Hooks",Sp);this.use(...i)}walkTokens(i,e){var n,a;let r=[];for(const o of i)switch(r=r.concat(e.call(this,o)),o.type){case"table":{const c=o;for(const h of c.header)r=r.concat(this.walkTokens(h.tokens,e));for(const h of c.rows)for(const u of h)r=r.concat(this.walkTokens(u.tokens,e));break}case"list":{const c=o;r=r.concat(this.walkTokens(c.items,e));break}default:{const c=o;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{const u=c[h].flat(1/0);r=r.concat(this.walkTokens(u,e))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,e)))}}return r}use(...i){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=e.renderers[a.name];o?e.renderers[a.name]=function(...c){let h=a.renderer.apply(this,c);return h===!1&&(h=o.apply(this,c)),h}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[a.level];o?o.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),r.renderer){const a=this.defaults.renderer||new Up(this.defaults);for(const o in r.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,h=r.renderer[c],u=a[c];a[c]=(...f)=>{let p=h.apply(a,f);return p===!1&&(p=u.apply(a,f)),p||""}}n.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new Hp(this.defaults);for(const o in r.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,h=r.tokenizer[c],u=a[c];a[c]=(...f)=>{let p=h.apply(a,f);return p===!1&&(p=u.apply(a,f)),p}}n.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new Sp;for(const o in r.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,h=r.hooks[c],u=a[c];Sp.passThroughHooks.has(o)?a[c]=f=>{if(this.defaults.async)return Promise.resolve(h.call(a,f)).then(g=>u.call(a,g));const p=h.call(a,f);return u.call(a,p)}:a[c]=(...f)=>{let p=h.apply(a,f);return p===!1&&(p=u.apply(a,f)),p}}n.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,o=r.walkTokens;n.walkTokens=function(c){let h=[];return h.push(o.call(this,c)),a&&(h=h.concat(a.call(this,c))),h}}this.defaults={...this.defaults,...n}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,e){return ns.lex(i,e??this.defaults)}parser(i,e){return as.parse(i,e??this.defaults)}parseMarkdown(i){return(r,n)=>{const a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(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 c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=i);const h=o.hooks?o.hooks.provideLexer():i?ns.lex:ns.lexInline,u=o.hooks?o.hooks.provideParser():i?as.parse:as.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(f=>h(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let f=h(r,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let p=u(f,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(f){return c(f)}}}onError(i,e){return r=>{if(r.message+=`
105
- Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+la(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},ml=new vD;function ae(i,e){return ml.parse(i,e)}ae.options=ae.setOptions=function(i){return ml.setOptions(i),ae.defaults=ml.defaults,VB(ae.defaults),ae};ae.getDefaults=cv;ae.defaults=Tl;ae.use=function(...i){return ml.use(...i),ae.defaults=ml.defaults,VB(ae.defaults),ae};ae.walkTokens=function(i,e){return ml.walkTokens(i,e)};ae.parseInline=ml.parseInline;ae.Parser=as;ae.parser=as.parse;ae.Renderer=Up;ae.TextRenderer=yv;ae.Lexer=ns;ae.lexer=ns.lex;ae.Tokenizer=Hp;ae.Hooks=Sp;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;as.parse;ns.lex;/*! @license DOMPurify 3.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.7/LICENSE */function H_(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function CD(i){if(Array.isArray(i))return i}function kD(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function _D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
106
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SD(i,e){return CD(i)||kD(i,e)||wD(i,e)||_D()}function wD(i,e){if(i){if(typeof i=="string")return H_(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H_(i,e):void 0}}const aA=Object.entries,U_=Object.setPrototypeOf,TD=Object.isFrozen,BD=Object.getPrototypeOf,AD=Object.getOwnPropertyDescriptor;let br=Object.freeze,yn=Object.seal,xc=Object.create,sA=typeof Reflect<"u"&&Reflect,jx=sA.apply,Rx=sA.construct;br||(br=function(e){return e});yn||(yn=function(e){return e});jx||(jx=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];return e.apply(r,a)});Rx||(Rx=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return new e(...n)});const hc=Si(Array.prototype.forEach),ED=Si(Array.prototype.lastIndexOf),W_=Si(Array.prototype.pop),uc=Si(Array.prototype.push),MD=Si(Array.prototype.splice),fr=Array.isArray,Lu=Si(String.prototype.toLowerCase),k0=Si(String.prototype.toString),Y_=Si(String.prototype.match),fc=Si(String.prototype.replace),G_=Si(String.prototype.indexOf),LD=Si(String.prototype.trim),ND=Si(Number.prototype.toString),OD=Si(Boolean.prototype.toString),V_=typeof BigInt>"u"?null:Si(BigInt.prototype.toString),X_=typeof Symbol>"u"?null:Si(Symbol.prototype.toString),ui=Si(Object.prototype.hasOwnProperty),ou=Si(Object.prototype.toString),Gi=Si(RegExp.prototype.test),lu=jD(TypeError);function Si(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return jx(i,e,n)}}function jD(i){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Rx(i,r)}}function ce(i,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Lu;if(U_&&U_(i,null),!fr(e))return i;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const o=r(a);o!==a&&(TD(e)||(e[n]=o),a=o)}i[a]=!0}return i}function RD(i){for(let e=0;e<i.length;e++)ui(i,e)||(i[e]=null);return i}function er(i){const e=xc(null);for(const n of aA(i)){var r=SD(n,2);const a=r[0],o=r[1];ui(i,a)&&(fr(o)?e[a]=RD(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=er(o):e[a]=o)}return e}function DD(i){switch(typeof i){case"string":return i;case"number":return ND(i);case"boolean":return OD(i);case"bigint":return V_?V_(i):"0";case"symbol":return X_?X_(i):"Symbol()";case"undefined":return ou(i);case"function":case"object":{if(i===null)return ou(i);const e=i,r=ca(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:ou(n)}return ou(i)}default:return ou(i)}}function ca(i,e){for(;i!==null;){const n=AD(i,e);if(n){if(n.get)return Si(n.get);if(typeof n.value=="function")return Si(n.value)}i=BD(i)}function r(){return null}return r}function FD(i){try{return Gi(i,""),!0}catch{return!1}}const Q_=br(["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"]),_0=br(["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"]),S0=br(["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"]),$D=br(["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"]),w0=br(["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"]),zD=br(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Z_=br(["#text"]),K_=br(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),T0=br(["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"]),J_=br(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Jd=br(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qD=yn(/{{[\w\W]*|^[\w\W]*}}/g),ID=yn(/<%[\w\W]*|^[\w\W]*%>/g),PD=yn(/\${[\w\W]*/g),HD=yn(/^data-[\-\w.\u00B7-\uFFFF]+$/),UD=yn(/^aria-[\-\w]+$/),tS=yn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),WD=yn(/^(?:\w+script|data):/i),YD=yn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),GD=yn(/^html$/i),VD=yn(/^[a-z][.\w]*(-[.\w]+)+$/i),oa={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},XD=function(){return typeof window>"u"?null:window},QD=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},eS=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function oA(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:XD();const e=jt=>oA(jt);if(e.version="3.4.7",e.removed=[],!i||!i.document||i.document.nodeType!==oa.document||!i.Element)return e.isSupported=!1,e;let r=i.document;const n=r,a=n.currentScript;i.DocumentFragment;const o=i.HTMLTemplateElement,c=i.Node,h=i.Element,u=i.NodeFilter,f=i.NamedNodeMap;f===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const p=i.DOMParser,g=i.trustedTypes,x=h.prototype,y=ca(x,"cloneNode"),v=ca(x,"remove"),C=ca(x,"nextSibling"),_=ca(x,"childNodes"),w=ca(x,"parentNode"),T=ca(x,"shadowRoot"),A=ca(x,"attributes"),E=c&&c.prototype?ca(c.prototype,"nodeType"):null,N=c&&c.prototype?ca(c.prototype,"nodeName"):null;if(typeof o=="function"){const jt=r.createElement("template");jt.content&&jt.content.ownerDocument&&(r=jt.content.ownerDocument)}let R,M="";const O=r,Y=O.implementation,$=O.createNodeIterator,q=O.createDocumentFragment,J=O.getElementsByTagName,W=n.importNode;let F=eS();e.isSupported=typeof aA=="function"&&typeof w=="function"&&Y&&Y.createHTMLDocument!==void 0;const U=qD,j=ID,I=PD,H=HD,V=UD,Z=WD,P=YD,K=VD;let ot=tS,st=null;const bt=ce({},[...Q_,..._0,...S0,...w0,...Z_]);let kt=null;const Lt=ce({},[...K_,...T0,...J_,...Jd]);let at=Object.seal(xc(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}})),Ct=null,gt=null;const Bt=Object.seal(xc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Wt=!0,Gt=!0,Zt=!1,Et=!0,Vt=!1,we=!0,ni=!1,qi=!1,ue=!1,ke=!1,De=!1,Ni=!1,Pe=!0,or=!1;const Un="user-content-";let Kr=!0,Dr=!1,Wn={},lr=null;const To=ce({},["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 Nl=null;const Zi=ce({},["audio","video","img","source","image","track"]);let wi=null;const Fr=ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mi="http://www.w3.org/1998/Math/MathML",ys="http://www.w3.org/2000/svg",kr="http://www.w3.org/1999/xhtml";let Yn=kr,Gn=!1,Vn=null;const xs=ce({},[mi,ys,kr],k0);let $r=ce({},["mi","mo","mn","ms","mtext"]),Xn=ce({},["annotation-xml"]);const bn=ce({},["title","style","font","a","script"]);let Qn=null;const bs=["application/xhtml+xml","text/html"],vs="text/html";let Fe=null,Zn=null;const Cs=r.createElement("form"),ks=function(G){return G instanceof RegExp||G instanceof Function},vn=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zn&&Zn===G)return;(!G||typeof G!="object")&&(G={}),G=er(G),Qn=bs.indexOf(G.PARSER_MEDIA_TYPE)===-1?vs:G.PARSER_MEDIA_TYPE,Fe=Qn==="application/xhtml+xml"?k0:Lu,st=ui(G,"ALLOWED_TAGS")&&fr(G.ALLOWED_TAGS)?ce({},G.ALLOWED_TAGS,Fe):bt,kt=ui(G,"ALLOWED_ATTR")&&fr(G.ALLOWED_ATTR)?ce({},G.ALLOWED_ATTR,Fe):Lt,Vn=ui(G,"ALLOWED_NAMESPACES")&&fr(G.ALLOWED_NAMESPACES)?ce({},G.ALLOWED_NAMESPACES,k0):xs,wi=ui(G,"ADD_URI_SAFE_ATTR")&&fr(G.ADD_URI_SAFE_ATTR)?ce(er(Fr),G.ADD_URI_SAFE_ATTR,Fe):Fr,Nl=ui(G,"ADD_DATA_URI_TAGS")&&fr(G.ADD_DATA_URI_TAGS)?ce(er(Zi),G.ADD_DATA_URI_TAGS,Fe):Zi,lr=ui(G,"FORBID_CONTENTS")&&fr(G.FORBID_CONTENTS)?ce({},G.FORBID_CONTENTS,Fe):To,Ct=ui(G,"FORBID_TAGS")&&fr(G.FORBID_TAGS)?ce({},G.FORBID_TAGS,Fe):er({}),gt=ui(G,"FORBID_ATTR")&&fr(G.FORBID_ATTR)?ce({},G.FORBID_ATTR,Fe):er({}),Wn=ui(G,"USE_PROFILES")?G.USE_PROFILES&&typeof G.USE_PROFILES=="object"?er(G.USE_PROFILES):G.USE_PROFILES:!1,Wt=G.ALLOW_ARIA_ATTR!==!1,Gt=G.ALLOW_DATA_ATTR!==!1,Zt=G.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=G.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Vt=G.SAFE_FOR_TEMPLATES||!1,we=G.SAFE_FOR_XML!==!1,ni=G.WHOLE_DOCUMENT||!1,ke=G.RETURN_DOM||!1,De=G.RETURN_DOM_FRAGMENT||!1,Ni=G.RETURN_TRUSTED_TYPE||!1,ue=G.FORCE_BODY||!1,Pe=G.SANITIZE_DOM!==!1,or=G.SANITIZE_NAMED_PROPS||!1,Kr=G.KEEP_CONTENT!==!1,Dr=G.IN_PLACE||!1,ot=FD(G.ALLOWED_URI_REGEXP)?G.ALLOWED_URI_REGEXP:tS,Yn=typeof G.NAMESPACE=="string"?G.NAMESPACE:kr,$r=ui(G,"MATHML_TEXT_INTEGRATION_POINTS")&&G.MATHML_TEXT_INTEGRATION_POINTS&&typeof G.MATHML_TEXT_INTEGRATION_POINTS=="object"?er(G.MATHML_TEXT_INTEGRATION_POINTS):ce({},["mi","mo","mn","ms","mtext"]),Xn=ui(G,"HTML_INTEGRATION_POINTS")&&G.HTML_INTEGRATION_POINTS&&typeof G.HTML_INTEGRATION_POINTS=="object"?er(G.HTML_INTEGRATION_POINTS):ce({},["annotation-xml"]);const mt=ui(G,"CUSTOM_ELEMENT_HANDLING")&&G.CUSTOM_ELEMENT_HANDLING&&typeof G.CUSTOM_ELEMENT_HANDLING=="object"?er(G.CUSTOM_ELEMENT_HANDLING):xc(null);if(at=xc(null),ui(mt,"tagNameCheck")&&ks(mt.tagNameCheck)&&(at.tagNameCheck=mt.tagNameCheck),ui(mt,"attributeNameCheck")&&ks(mt.attributeNameCheck)&&(at.attributeNameCheck=mt.attributeNameCheck),ui(mt,"allowCustomizedBuiltInElements")&&typeof mt.allowCustomizedBuiltInElements=="boolean"&&(at.allowCustomizedBuiltInElements=mt.allowCustomizedBuiltInElements),Vt&&(Gt=!1),De&&(ke=!0),Wn&&(st=ce({},Z_),kt=xc(null),Wn.html===!0&&(ce(st,Q_),ce(kt,K_)),Wn.svg===!0&&(ce(st,_0),ce(kt,T0),ce(kt,Jd)),Wn.svgFilters===!0&&(ce(st,S0),ce(kt,T0),ce(kt,Jd)),Wn.mathMl===!0&&(ce(st,w0),ce(kt,J_),ce(kt,Jd))),Bt.tagCheck=null,Bt.attributeCheck=null,ui(G,"ADD_TAGS")&&(typeof G.ADD_TAGS=="function"?Bt.tagCheck=G.ADD_TAGS:fr(G.ADD_TAGS)&&(st===bt&&(st=er(st)),ce(st,G.ADD_TAGS,Fe))),ui(G,"ADD_ATTR")&&(typeof G.ADD_ATTR=="function"?Bt.attributeCheck=G.ADD_ATTR:fr(G.ADD_ATTR)&&(kt===Lt&&(kt=er(kt)),ce(kt,G.ADD_ATTR,Fe))),ui(G,"ADD_URI_SAFE_ATTR")&&fr(G.ADD_URI_SAFE_ATTR)&&ce(wi,G.ADD_URI_SAFE_ATTR,Fe),ui(G,"FORBID_CONTENTS")&&fr(G.FORBID_CONTENTS)&&(lr===To&&(lr=er(lr)),ce(lr,G.FORBID_CONTENTS,Fe)),ui(G,"ADD_FORBID_CONTENTS")&&fr(G.ADD_FORBID_CONTENTS)&&(lr===To&&(lr=er(lr)),ce(lr,G.ADD_FORBID_CONTENTS,Fe)),Kr&&(st["#text"]=!0),ni&&ce(st,["html","head","body"]),st.table&&(ce(st,["tbody"]),delete Ct.tbody),G.TRUSTED_TYPES_POLICY){if(typeof G.TRUSTED_TYPES_POLICY.createHTML!="function")throw lu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof G.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');R=G.TRUSTED_TYPES_POLICY,M=R.createHTML("")}else R===void 0&&(R=QD(g,a)),R!==null&&typeof M=="string"&&(M=R.createHTML(""));(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&st===bt&&(st=er(st)),F.uponSanitizeAttribute.length>0&&kt===Lt&&(kt=er(kt)),br&&br(G),Zn=G},_s=ce({},[..._0,...S0,...$D]),Ss=ce({},[...w0,...zD]),Cn=function(G){let mt=w(G);(!mt||!mt.tagName)&&(mt={namespaceURI:Yn,tagName:"template"});const At=Lu(G.tagName),ye=Lu(mt.tagName);return Vn[G.namespaceURI]?G.namespaceURI===ys?mt.namespaceURI===kr?At==="svg":mt.namespaceURI===mi?At==="svg"&&(ye==="annotation-xml"||$r[ye]):!!_s[At]:G.namespaceURI===mi?mt.namespaceURI===kr?At==="math":mt.namespaceURI===ys?At==="math"&&Xn[ye]:!!Ss[At]:G.namespaceURI===kr?mt.namespaceURI===ys&&!Xn[ye]||mt.namespaceURI===mi&&!$r[ye]?!1:!Ss[At]&&(bn[At]||!_s[At]):!!(Qn==="application/xhtml+xml"&&Vn[G.namespaceURI]):!1},Ki=function(G){uc(e.removed,{element:G});try{w(G).removeChild(G)}catch{v(G)}},Oi=function(G,mt){try{uc(e.removed,{attribute:mt.getAttributeNode(G),from:mt})}catch{uc(e.removed,{attribute:null,from:mt})}if(mt.removeAttribute(G),G==="is")if(ke||De)try{Ki(mt)}catch{}else try{mt.setAttribute(G,"")}catch{}},ai=function(G){let mt=null,At=null;if(ue)G="<remove></remove>"+G;else{const Me=Y_(G,/^[\r\n\t ]+/);At=Me&&Me[0]}Qn==="application/xhtml+xml"&&Yn===kr&&(G='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+G+"</body></html>");const ye=R?R.createHTML(G):G;if(Yn===kr)try{mt=new p().parseFromString(ye,Qn)}catch{}if(!mt||!mt.documentElement){mt=Y.createDocument(Yn,"template",null);try{mt.documentElement.innerHTML=Gn?M:ye}catch{}}const se=mt.body||mt.documentElement;return G&&At&&se.insertBefore(r.createTextNode(At),se.childNodes[0]||null),Yn===kr?J.call(mt,ni?"html":"body")[0]:ni?mt.documentElement:se},yi=function(G){return $.call(G.ownerDocument||G,G,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},kn=function(G){G.normalize();const mt=$.call(G.ownerDocument||G,G,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let At=mt.nextNode();for(;At;){let ye=At.data;hc([U,j,I],se=>{ye=fc(ye,se," ")}),At.data=ye,At=mt.nextNode()}},Kn=function(G){const mt=N?N(G):null;return typeof mt!="string"||Fe(mt)!=="form"?!1:typeof G.nodeName!="string"||typeof G.textContent!="string"||typeof G.removeChild!="function"||G.attributes!==A(G)||typeof G.removeAttribute!="function"||typeof G.setAttribute!="function"||typeof G.namespaceURI!="string"||typeof G.insertBefore!="function"||typeof G.hasChildNodes!="function"||G.nodeType!==E(G)||G.childNodes!==_(G)},Jn=function(G){if(!E||typeof G!="object"||G===null)return!1;try{return E(G)===oa.documentFragment}catch{return!1}},ws=function(G){if(!E||typeof G!="object"||G===null)return!1;try{return typeof E(G)=="number"}catch{return!1}};function cr(jt,G,mt){hc(jt,At=>{At.call(e,G,mt,Zn)})}const ta=function(G){let mt=null;if(cr(F.beforeSanitizeElements,G,null),Kn(G))return Ki(G),!0;const At=Fe(G.nodeName);if(cr(F.uponSanitizeElement,G,{tagName:At,allowedTags:st}),we&&G.hasChildNodes()&&!ws(G.firstElementChild)&&Gi(/<[/\w!]/g,G.innerHTML)&&Gi(/<[/\w!]/g,G.textContent)||we&&G.namespaceURI===kr&&At==="style"&&ws(G.firstElementChild)||G.nodeType===oa.progressingInstruction||we&&G.nodeType===oa.comment&&Gi(/<[/\w]/g,G.data))return Ki(G),!0;if(Ct[At]||!(Bt.tagCheck instanceof Function&&Bt.tagCheck(At))&&!st[At]){if(!Ct[At]&&Jr(At)&&(at.tagNameCheck instanceof RegExp&&Gi(at.tagNameCheck,At)||at.tagNameCheck instanceof Function&&at.tagNameCheck(At)))return!1;if(Kr&&!lr[At]){const se=w(G),Me=_(G);if(Me&&se){const Pi=Me.length;for(let ji=Pi-1;ji>=0;--ji){const Xe=y(Me[ji],!0);se.insertBefore(Xe,C(G))}}}return Ki(G),!0}return(E?E(G):G.nodeType)===oa.element&&!Cn(G)||(At==="noscript"||At==="noembed"||At==="noframes")&&Gi(/<\/no(script|embed|frames)/i,G.innerHTML)?(Ki(G),!0):(Vt&&G.nodeType===oa.text&&(mt=G.textContent,hc([U,j,I],se=>{mt=fc(mt,se," ")}),G.textContent!==mt&&(uc(e.removed,{element:G.cloneNode()}),G.textContent=mt)),cr(F.afterSanitizeElements,G,null),!1)},Ts=function(G,mt,At){if(gt[mt]||Pe&&(mt==="id"||mt==="name")&&(At in r||At in Cs))return!1;const ye=kt[mt]||Bt.attributeCheck instanceof Function&&Bt.attributeCheck(mt,G);if(!(Gt&&!gt[mt]&&Gi(H,mt))){if(!(Wt&&Gi(V,mt))){if(!ye||gt[mt]){if(!(Jr(G)&&(at.tagNameCheck instanceof RegExp&&Gi(at.tagNameCheck,G)||at.tagNameCheck instanceof Function&&at.tagNameCheck(G))&&(at.attributeNameCheck instanceof RegExp&&Gi(at.attributeNameCheck,mt)||at.attributeNameCheck instanceof Function&&at.attributeNameCheck(mt,G))||mt==="is"&&at.allowCustomizedBuiltInElements&&(at.tagNameCheck instanceof RegExp&&Gi(at.tagNameCheck,At)||at.tagNameCheck instanceof Function&&at.tagNameCheck(At))))return!1}else if(!wi[mt]){if(!Gi(ot,fc(At,P,""))){if(!((mt==="src"||mt==="xlink:href"||mt==="href")&&G!=="script"&&G_(At,"data:")===0&&Nl[G])){if(!(Zt&&!Gi(Z,fc(At,P,"")))){if(At)return!1}}}}}}return!0},ea=ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jr=function(G){return!ea[Lu(G)]&&Gi(K,G)},_n=function(G){cr(F.beforeSanitizeAttributes,G,null);const mt=G.attributes;if(!mt||Kn(G))return;const At={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt,forceKeepAttr:void 0};let ye=mt.length;for(;ye--;){const se=mt[ye],Me=se.name,Pi=se.namespaceURI,ji=se.value,Xe=Fe(Me),Ri=ji;let Se=Me==="value"?Ri:LD(Ri);if(At.attrName=Xe,At.attrValue=Se,At.keepAttr=!0,At.forceKeepAttr=void 0,cr(F.uponSanitizeAttribute,G,At),Se=At.attrValue,or&&(Xe==="id"||Xe==="name")&&G_(Se,Un)!==0&&(Oi(Me,G),Se=Un+Se),we&&Gi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Se)){Oi(Me,G);continue}if(Xe==="attributename"&&Y_(Se,"href")){Oi(Me,G);continue}if(At.forceKeepAttr)continue;if(!At.keepAttr){Oi(Me,G);continue}if(!Et&&Gi(/\/>/i,Se)){Oi(Me,G);continue}Vt&&hc([U,j,I],Ba=>{Se=fc(Se,Ba," ")});const Sn=Fe(G.nodeName);if(!Ts(Sn,Xe,Se)){Oi(Me,G);continue}if(R&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Pi)switch(g.getAttributeType(Sn,Xe)){case"TrustedHTML":{Se=R.createHTML(Se);break}case"TrustedScriptURL":{Se=R.createScriptURL(Se);break}}if(Se!==Ri)try{Pi?G.setAttributeNS(Pi,Me,Se):G.setAttribute(Me,Se),Kn(G)?Ki(G):W_(e.removed)}catch{Oi(Me,G)}}cr(F.afterSanitizeAttributes,G,null)},Ii=function(G){let mt=null;const At=yi(G);for(cr(F.beforeSanitizeShadowDOM,G,null);mt=At.nextNode();)if(cr(F.uponSanitizeShadowNode,mt,null),ta(mt),_n(mt),Jn(mt.content)&&Ii(mt.content),(E?E(mt):mt.nodeType)===oa.element){const se=T?T(mt):mt.shadowRoot;Jn(se)&&(He(se),Ii(se))}cr(F.afterSanitizeShadowDOM,G,null)},He=function(G){const mt=E?E(G):G.nodeType;if(mt===oa.element){const se=T?T(G):G.shadowRoot;Jn(se)&&(He(se),Ii(se))}const At=_?_(G):G.childNodes;if(!At)return;const ye=[];hc(At,se=>{uc(ye,se)});for(const se of ye)He(se);if(mt===oa.element){const se=N?N(G):null;if(typeof se=="string"&&Fe(se)==="template"){const Me=G.content;Jn(Me)&&He(Me)}}};return e.sanitize=function(jt){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},mt=null,At=null,ye=null,se=null;if(Gn=!jt,Gn&&(jt="<!-->"),typeof jt!="string"&&!ws(jt)&&(jt=DD(jt),typeof jt!="string"))throw lu("dirty is not a string, aborting");if(!e.isSupported)return jt;if(qi||vn(G),e.removed=[],typeof jt=="string"&&(Dr=!1),Dr){const ji=N?N(jt):jt.nodeName;if(typeof ji=="string"){const Xe=Fe(ji);if(!st[Xe]||Ct[Xe])throw lu("root node is forbidden and cannot be sanitized in-place")}if(Kn(jt))throw lu("root node is clobbered and cannot be sanitized in-place");He(jt)}else if(ws(jt))mt=ai("<!---->"),At=mt.ownerDocument.importNode(jt,!0),At.nodeType===oa.element&&At.nodeName==="BODY"||At.nodeName==="HTML"?mt=At:mt.appendChild(At),He(At);else{if(!ke&&!Vt&&!ni&&jt.indexOf("<")===-1)return R&&Ni?R.createHTML(jt):jt;if(mt=ai(jt),!mt)return ke?null:Ni?M:""}mt&&ue&&Ki(mt.firstChild);const Me=yi(Dr?jt:mt);for(;ye=Me.nextNode();)ta(ye),_n(ye),Jn(ye.content)&&Ii(ye.content);if(Dr)return Vt&&kn(jt),jt;if(ke){if(Vt&&kn(mt),De)for(se=q.call(mt.ownerDocument);mt.firstChild;)se.appendChild(mt.firstChild);else se=mt;return(kt.shadowroot||kt.shadowrootmode)&&(se=W.call(n,se,!0)),se}let Pi=ni?mt.outerHTML:mt.innerHTML;return ni&&st["!doctype"]&&mt.ownerDocument&&mt.ownerDocument.doctype&&mt.ownerDocument.doctype.name&&Gi(GD,mt.ownerDocument.doctype.name)&&(Pi="<!DOCTYPE "+mt.ownerDocument.doctype.name+`>
107
- `+Pi),Vt&&hc([U,j,I],ji=>{Pi=fc(Pi,ji," ")}),R&&Ni?R.createHTML(Pi):Pi},e.setConfig=function(){let jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vn(jt),qi=!0},e.clearConfig=function(){Zn=null,qi=!1},e.isValidAttribute=function(jt,G,mt){Zn||vn({});const At=Fe(jt),ye=Fe(G);return Ts(At,ye,mt)},e.addHook=function(jt,G){typeof G=="function"&&uc(F[jt],G)},e.removeHook=function(jt,G){if(G!==void 0){const mt=ED(F[jt],G);return mt===-1?void 0:MD(F[jt],mt,1)[0]}return W_(F[jt])},e.removeHooks=function(jt){F[jt]=[]},e.removeAllHooks=function(){F=eS()},e}var yl=oA();const ZD="modulepreload",KD=function(i){return"/"+i},iS={},Ce=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let c=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),u=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(r.map(f=>{if(f=KD(f),f in iS)return;iS[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":ZD,p||(x.as="script"),x.crossOrigin="",x.href=f,u&&x.setAttribute("nonce",u),document.head.appendChild(x),p)return new Promise((y,v)=>{x.addEventListener("load",y),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return a.then(c=>{for(const h of c||[])h.status==="rejected"&&o(h.reason);return e().catch(o)})};var wp={exports:{}},JD=wp.exports,rS;function tF(){return rS||(rS=1,(function(i,e){(function(r,n){i.exports=n()})(JD,(function(){var r=1e3,n=6e4,a=36e5,o="millisecond",c="second",h="minute",u="hour",f="day",p="week",g="month",x="quarter",y="year",v="date",C="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,T={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(F){var U=["th","st","nd","rd"],j=F%100;return"["+F+(U[(j-20)%10]||U[j]||U[0])+"]"}},A=function(F,U,j){var I=String(F);return!I||I.length>=U?F:""+Array(U+1-I.length).join(j)+F},E={s:A,z:function(F){var U=-F.utcOffset(),j=Math.abs(U),I=Math.floor(j/60),H=j%60;return(U<=0?"+":"-")+A(I,2,"0")+":"+A(H,2,"0")},m:function F(U,j){if(U.date()<j.date())return-F(j,U);var I=12*(j.year()-U.year())+(j.month()-U.month()),H=U.clone().add(I,g),V=j-H<0,Z=U.clone().add(I+(V?-1:1),g);return+(-(I+(j-H)/(V?H-Z:Z-H))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:g,y,w:p,d:f,D:v,h:u,m:h,s:c,ms:o,Q:x}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},N="en",R={};R[N]=T;var M="$isDayjsObject",O=function(F){return F instanceof J||!(!F||!F[M])},Y=function F(U,j,I){var H;if(!U)return N;if(typeof U=="string"){var V=U.toLowerCase();R[V]&&(H=V),j&&(R[V]=j,H=V);var Z=U.split("-");if(!H&&Z.length>1)return F(Z[0])}else{var P=U.name;R[P]=U,H=P}return!I&&H&&(N=H),H||!I&&N},$=function(F,U){if(O(F))return F.clone();var j=typeof U=="object"?U:{};return j.date=F,j.args=arguments,new J(j)},q=E;q.l=Y,q.i=O,q.w=function(F,U){return $(F,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var J=(function(){function F(j){this.$L=Y(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[M]=!0}var U=F.prototype;return U.parse=function(j){this.$d=(function(I){var H=I.date,V=I.utc;if(H===null)return new Date(NaN);if(q.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var Z=H.match(_);if(Z){var P=Z[2]-1||0,K=(Z[7]||"0").substring(0,3);return V?new Date(Date.UTC(Z[1],P,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,K)):new Date(Z[1],P,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,K)}}return new Date(H)})(j),this.init()},U.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},U.$utils=function(){return q},U.isValid=function(){return this.$d.toString()!==C},U.isSame=function(j,I){var H=$(j);return this.startOf(I)<=H&&H<=this.endOf(I)},U.isAfter=function(j,I){return $(j)<this.startOf(I)},U.isBefore=function(j,I){return this.endOf(I)<$(j)},U.$g=function(j,I,H){return q.u(j)?this[I]:this.set(H,j)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(j,I){var H=this,V=!!q.u(I)||I,Z=q.p(j),P=function(Ct,gt){var Bt=q.w(H.$u?Date.UTC(H.$y,gt,Ct):new Date(H.$y,gt,Ct),H);return V?Bt:Bt.endOf(f)},K=function(Ct,gt){return q.w(H.toDate()[Ct].apply(H.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(gt)),H)},ot=this.$W,st=this.$M,bt=this.$D,kt="set"+(this.$u?"UTC":"");switch(Z){case y:return V?P(1,0):P(31,11);case g:return V?P(1,st):P(0,st+1);case p:var Lt=this.$locale().weekStart||0,at=(ot<Lt?ot+7:ot)-Lt;return P(V?bt-at:bt+(6-at),st);case f:case v:return K(kt+"Hours",0);case u:return K(kt+"Minutes",1);case h:return K(kt+"Seconds",2);case c:return K(kt+"Milliseconds",3);default:return this.clone()}},U.endOf=function(j){return this.startOf(j,!1)},U.$set=function(j,I){var H,V=q.p(j),Z="set"+(this.$u?"UTC":""),P=(H={},H[f]=Z+"Date",H[v]=Z+"Date",H[g]=Z+"Month",H[y]=Z+"FullYear",H[u]=Z+"Hours",H[h]=Z+"Minutes",H[c]=Z+"Seconds",H[o]=Z+"Milliseconds",H)[V],K=V===f?this.$D+(I-this.$W):I;if(V===g||V===y){var ot=this.clone().set(v,1);ot.$d[P](K),ot.init(),this.$d=ot.set(v,Math.min(this.$D,ot.daysInMonth())).$d}else P&&this.$d[P](K);return this.init(),this},U.set=function(j,I){return this.clone().$set(j,I)},U.get=function(j){return this[q.p(j)]()},U.add=function(j,I){var H,V=this;j=Number(j);var Z=q.p(I),P=function(st){var bt=$(V);return q.w(bt.date(bt.date()+Math.round(st*j)),V)};if(Z===g)return this.set(g,this.$M+j);if(Z===y)return this.set(y,this.$y+j);if(Z===f)return P(1);if(Z===p)return P(7);var K=(H={},H[h]=n,H[u]=a,H[c]=r,H)[Z]||1,ot=this.$d.getTime()+j*K;return q.w(ot,this)},U.subtract=function(j,I){return this.add(-1*j,I)},U.format=function(j){var I=this,H=this.$locale();if(!this.isValid())return H.invalidDate||C;var V=j||"YYYY-MM-DDTHH:mm:ssZ",Z=q.z(this),P=this.$H,K=this.$m,ot=this.$M,st=H.weekdays,bt=H.months,kt=H.meridiem,Lt=function(gt,Bt,Wt,Gt){return gt&&(gt[Bt]||gt(I,V))||Wt[Bt].slice(0,Gt)},at=function(gt){return q.s(P%12||12,gt,"0")},Ct=kt||function(gt,Bt,Wt){var Gt=gt<12?"AM":"PM";return Wt?Gt.toLowerCase():Gt};return V.replace(w,(function(gt,Bt){return Bt||(function(Wt){switch(Wt){case"YY":return String(I.$y).slice(-2);case"YYYY":return q.s(I.$y,4,"0");case"M":return ot+1;case"MM":return q.s(ot+1,2,"0");case"MMM":return Lt(H.monthsShort,ot,bt,3);case"MMMM":return Lt(bt,ot);case"D":return I.$D;case"DD":return q.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Lt(H.weekdaysMin,I.$W,st,2);case"ddd":return Lt(H.weekdaysShort,I.$W,st,3);case"dddd":return st[I.$W];case"H":return String(P);case"HH":return q.s(P,2,"0");case"h":return at(1);case"hh":return at(2);case"a":return Ct(P,K,!0);case"A":return Ct(P,K,!1);case"m":return String(K);case"mm":return q.s(K,2,"0");case"s":return String(I.$s);case"ss":return q.s(I.$s,2,"0");case"SSS":return q.s(I.$ms,3,"0");case"Z":return Z}return null})(gt)||Z.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(j,I,H){var V,Z=this,P=q.p(I),K=$(j),ot=(K.utcOffset()-this.utcOffset())*n,st=this-K,bt=function(){return q.m(Z,K)};switch(P){case y:V=bt()/12;break;case g:V=bt();break;case x:V=bt()/3;break;case p:V=(st-ot)/6048e5;break;case f:V=(st-ot)/864e5;break;case u:V=st/a;break;case h:V=st/n;break;case c:V=st/r;break;default:V=st}return H?V:q.a(V)},U.daysInMonth=function(){return this.endOf(g).$D},U.$locale=function(){return R[this.$L]},U.locale=function(j,I){if(!j)return this.$L;var H=this.clone(),V=Y(j,I,!0);return V&&(H.$L=V),H},U.clone=function(){return q.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},F})(),W=J.prototype;return $.prototype=W,[["$ms",o],["$s",c],["$m",h],["$H",u],["$W",f],["$M",g],["$y",y],["$D",v]].forEach((function(F){W[F[1]]=function(U){return this.$g(U,F[0],F[1])}})),$.extend=function(F,U){return F.$i||(F(U,J,$),F.$i=!0),$},$.locale=Y,$.isDayjs=O,$.unix=function(F){return $(1e3*F)},$.en=R[N],$.Ls=R,$.p={},$}))})(wp)),wp.exports}var eF=tF();const iF=jg(eF);var lA=Object.defineProperty,B=(i,e)=>lA(i,"name",{value:e,configurable:!0}),rF=(i,e)=>{for(var r in e)lA(i,r,{get:e[r],enumerable:!0})},Ya={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},_t={trace:B((...i)=>{},"trace"),debug:B((...i)=>{},"debug"),info:B((...i)=>{},"info"),warn:B((...i)=>{},"warn"),error:B((...i)=>{},"error"),fatal:B((...i)=>{},"fatal")},xv=B(function(i="fatal"){let e=Ya.fatal;typeof i=="string"?i.toLowerCase()in Ya&&(e=Ya[i]):typeof i=="number"&&(e=i),_t.trace=()=>{},_t.debug=()=>{},_t.info=()=>{},_t.warn=()=>{},_t.error=()=>{},_t.fatal=()=>{},e<=Ya.fatal&&(_t.fatal=console.error?console.error.bind(console,cn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",cn("FATAL"))),e<=Ya.error&&(_t.error=console.error?console.error.bind(console,cn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",cn("ERROR"))),e<=Ya.warn&&(_t.warn=console.warn?console.warn.bind(console,cn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",cn("WARN"))),e<=Ya.info&&(_t.info=console.info?console.info.bind(console,cn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",cn("INFO"))),e<=Ya.debug&&(_t.debug=console.debug?console.debug.bind(console,cn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",cn("DEBUG"))),e<=Ya.trace&&(_t.trace=console.debug?console.debug.bind(console,cn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",cn("TRACE")))},"setLogLevel"),cn=B(i=>`%c${iF().format("ss.SSS")} : ${i} : `,"format");const Tp={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:i=>i>=255?255:i<0?0:i,g:i=>i>=255?255:i<0?0:i,b:i=>i>=255?255:i<0?0:i,h:i=>i%360,s:i=>i>=100?100:i<0?0:i,l:i=>i>=100?100:i<0?0:i,a:i=>i>=1?1:i<0?0:i},toLinear:i=>{const e=i/255;return i>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(i,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?i+(e-i)*6*r:r<1/2?e:r<2/3?i+(e-i)*(2/3-r)*6:i),hsl2rgb:({h:i,s:e,l:r},n)=>{if(!e)return r*2.55;i/=360,e/=100,r/=100;const a=r<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return Tp.hue2rgb(o,a,i+1/3)*255;case"g":return Tp.hue2rgb(o,a,i)*255;case"b":return Tp.hue2rgb(o,a,i-1/3)*255}},rgb2hsl:({r:i,g:e,b:r},n)=>{i/=255,e/=255,r/=255;const a=Math.max(i,e,r),o=Math.min(i,e,r),c=(a+o)/2;if(n==="l")return c*100;if(a===o)return 0;const h=a-o,u=c>.5?h/(2-a-o):h/(a+o);if(n==="s")return u*100;switch(a){case i:return((e-r)/h+(e<r?6:0))*60;case e:return((r-i)/h+2)*60;case r:return((i-e)/h+4)*60;default:return-1}}},nF={clamp:(i,e,r)=>e>r?Math.min(e,Math.max(r,i)):Math.min(r,Math.max(e,i)),round:i=>Math.round(i*1e10)/1e10},aF={dec2hex:i=>{const e=Math.round(i).toString(16);return e.length>1?e:`0${e}`}},re={channel:Tp,lang:nF,unit:aF},eo={};for(let i=0;i<=255;i++)eo[i]=re.unit.dec2hex(i);const ir={ALL:0,RGB:1,HSL:2};class sF{constructor(){this.type=ir.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ir.ALL}is(e){return this.type===e}}class oF{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new sF}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ir.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:a}=e;r===void 0&&(e.h=re.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=re.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=re.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=re.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=re.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=re.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(ir.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(ir.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ir.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ir.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ir.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ir.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ir.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ir.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const $g=new oF({r:0,g:0,b:0,a:0},"transparent"),Sc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const e=i.match(Sc.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,o=a%4===0,c=a>4,h=c?1:17,u=c?8:4,f=o?0:-1,p=c?255:15;return $g.set({r:(n>>u*(f+3)&p)*h,g:(n>>u*(f+2)&p)*h,b:(n>>u*(f+1)&p)*h,a:o?(n&p)*h/255:1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`#${eo[Math.round(e)]}${eo[Math.round(r)]}${eo[Math.round(n)]}${eo[Math.round(a*255)]}`:`#${eo[Math.round(e)]}${eo[Math.round(r)]}${eo[Math.round(n)]}`}},Ko={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:i=>{const e=i.match(Ko.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return re.channel.clamp.h(parseFloat(r)*.9);case"rad":return re.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return re.channel.clamp.h(parseFloat(r)*360)}}return re.channel.clamp.h(parseFloat(i))},parse:i=>{const e=i.charCodeAt(0);if(e!==104&&e!==72)return;const r=i.match(Ko.re);if(!r)return;const[,n,a,o,c,h]=r;return $g.set({h:Ko._hue2deg(n),s:re.channel.clamp.s(parseFloat(a)),l:re.channel.clamp.l(parseFloat(o)),a:c?re.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},i)},stringify:i=>{const{h:e,s:r,l:n,a}=i;return a<1?`hsla(${re.lang.round(e)}, ${re.lang.round(r)}%, ${re.lang.round(n)}%, ${a})`:`hsl(${re.lang.round(e)}, ${re.lang.round(r)}%, ${re.lang.round(n)}%)`}},Hu={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:i=>{i=i.toLowerCase();const e=Hu.colors[i];if(e)return Sc.parse(e)},stringify:i=>{const e=Sc.stringify(i);for(const r in Hu.colors)if(Hu.colors[r]===e)return r}},Nu={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:i=>{const e=i.charCodeAt(0);if(e!==114&&e!==82)return;const r=i.match(Nu.re);if(!r)return;const[,n,a,o,c,h,u,f,p]=r;return $g.set({r:re.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:re.channel.clamp.g(c?parseFloat(o)*2.55:parseFloat(o)),b:re.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:f?re.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},i)},stringify:i=>{const{r:e,g:r,b:n,a}=i;return a<1?`rgba(${re.lang.round(e)}, ${re.lang.round(r)}, ${re.lang.round(n)}, ${re.lang.round(a)})`:`rgb(${re.lang.round(e)}, ${re.lang.round(r)}, ${re.lang.round(n)})`}},va={format:{keyword:Hu,hex:Sc,rgb:Nu,rgba:Nu,hsl:Ko,hsla:Ko},parse:i=>{if(typeof i!="string")return i;const e=Sc.parse(i)||Nu.parse(i)||Ko.parse(i)||Hu.parse(i);if(e)return e;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(ir.HSL)||i.data.r===void 0?Ko.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?Nu.stringify(i):Sc.stringify(i)},cA=(i,e)=>{const r=va.parse(i);for(const n in e)r[n]=re.channel.clamp[n](e[n]);return va.stringify(r)},yo=(i,e,r=0,n=1)=>{if(typeof i!="number")return cA(i,{a:e});const a=$g.set({r:re.channel.clamp.r(i),g:re.channel.clamp.g(e),b:re.channel.clamp.b(r),a:re.channel.clamp.a(n)});return va.stringify(a)},lF=i=>{const{r:e,g:r,b:n}=va.parse(i),a=.2126*re.channel.toLinear(e)+.7152*re.channel.toLinear(r)+.0722*re.channel.toLinear(n);return re.lang.round(a)},cF=i=>lF(i)>=.5,In=i=>!cF(i),hA=(i,e,r)=>{const n=va.parse(i),a=n[e],o=re.channel.clamp[e](a+r);return a!==o&&(n[e]=o),va.stringify(n)},pt=(i,e)=>hA(i,"l",e),ft=(i,e)=>hA(i,"l",-e),D=(i,e)=>{const r=va.parse(i),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return cA(i,n)},hF=(i,e,r=50)=>{const{r:n,g:a,b:o,a:c}=va.parse(i),{r:h,g:u,b:f,a:p}=va.parse(e),g=r/100,x=g*2-1,y=c-p,C=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,_=1-C,w=n*C+h*_,T=a*C+u*_,A=o*C+f*_,E=c*g+p*(1-g);return yo(w,T,A,E)},rt=(i,e=100)=>{const r=va.parse(i);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,hF(r,i,e)};var uA=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Uu=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,uF=/\s*%%.*\n/gm,qc,fA=(qc=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},B(qc,"UnknownDiagramError"),qc),xl={},bv=B(function(i,e){i=i.replace(uA,"").replace(Uu,"").replace(uF,`
108
- `);for(const[r,{detector:n}]of Object.entries(xl))if(n(i,e))return r;throw new fA(`No diagram type detected matching given configuration for text: ${i}`)},"detectType"),Dx=B((...i)=>{for(const{id:e,detector:r,loader:n}of i)dA(e,r,n)},"registerLazyLoadedDiagrams"),dA=B((i,e,r)=>{xl[i]&&_t.warn(`Detector with key ${i} already exists. Overwriting.`),xl[i]={detector:e,loader:r},_t.debug(`Detector with key ${i} added${r?" with loader":""}`)},"addDetector"),fF=B(i=>xl[i].loader,"getDiagramLoader"),Fx=B((i,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(i)?(e.forEach(o=>Fx(i,o,a)),i):Array.isArray(e)&&Array.isArray(i)?(e.forEach(o=>{i.includes(o)||i.push(o)}),i):i===void 0||r<=0?i!=null&&typeof i=="object"&&typeof e=="object"?Object.assign(i,e):e:(e!==void 0&&typeof i=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&e[o]!==null&&(i[o]===void 0||typeof i[o]=="object")?(i[o]===void 0&&(i[o]=Array.isArray(e[o])?[]:{}),i[o]=Fx(i[o],e[o],{depth:r-1,clobber:n})):(n||typeof i[o]!="object"&&typeof e[o]!="object")&&(i[o]=e[o])}),i)},"assignWithDepth"),Ei=Fx,Sa="#ffffff",wa="#f2f2f2",ee=B((i,e)=>e?D(i,{s:-40,l:10}):D(i,{s:-40,l:-10}),"mkBorder"),Ic,dF=(Ic=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,n,a,o,c,h,u,f,p,g,x,y,v,C,_,w,T,A,E,N,R,M;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(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?ft(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||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(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||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ft(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10)):(this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||pt(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||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.darkMode)for(let O=0;O<this.THEME_COLOR_LIMIT;O++)this["cScale"+O]=ft(this["cScale"+O],75);else for(let O=0;O<this.THEME_COLOR_LIMIT;O++)this["cScale"+O]=ft(this["cScale"+O],25);for(let O=0;O<this.THEME_COLOR_LIMIT;O++)this["cScaleInv"+O]=this["cScaleInv"+O]||rt(this["cScale"+O]);for(let O=0;O<this.THEME_COLOR_LIMIT;O++)this.darkMode?this["cScalePeer"+O]=this["cScalePeer"+O]||pt(this["cScale"+O],10):this["cScalePeer"+O]=this["cScalePeer"+O]||ft(this["cScale"+O],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let O=0;O<this.THEME_COLOR_LIMIT;O++)this["cScaleLabel"+O]=this["cScaleLabel"+O]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let O=0;O<5;O++)this["surface"+O]=this["surface"+O]||D(this.mainBkg,{h:180,s:-15,l:e*(5+O*3)}),this["surfacePeer"+O]=this["surfacePeer"+O]||D(this.mainBkg,{h:180,s:-15,l:e*(8+O*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(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??D(this.primaryColor,{l:-30}),this.venn2=this.venn2??D(this.secondaryColor,{l:-30}),this.venn3=this.venn3??D(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??D(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??D(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??D(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??D(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??D(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:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((c=this.radar)==null?void 0:c.curveStrokeWidth)||2,graticuleColor:((h=this.radar)==null?void 0:h.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((u=this.radar)==null?void 0:u.graticuleStrokeWidth)||1,graticuleOpacity:((f=this.radar)==null?void 0:f.graticuleOpacity)||.3,legendBoxSize:((p=this.radar)==null?void 0:p.legendBoxSize)||12,legendFontSize:((g=this.radar)==null?void 0:g.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||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((v=this.xyChart)==null?void 0:v.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((C=this.xyChart)==null?void 0:C.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((w=this.xyChart)==null?void 0:w.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((R=this.xyChart)==null?void 0:R.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.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?ft(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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(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||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Ic,"Theme"),Ic),pF=B(i=>{const e=new dF;return e.calculate(i),e},"getThemeVariables"),Pc,gF=(Pc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=yo(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=ft("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ft(this.sectionBkgColor,10),this.taskBorderColor=yo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=yo(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||pt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ft(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,x,y,v,C,_,w,T,A,E,N,R;this.secondBkg=pt(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=pt(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=pt(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=rt(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(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||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||rt(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScalePeer"+M]=this["cScalePeer"+M]||pt(this["cScale"+M],10);for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{h:30,s:-30,l:-(-10+M*4)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{h:30,s:-30,l:-(-7+M*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];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 M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??pt(this["cScale"+M],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((N=this.radar)==null?void 0:N.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=pt(this.secondaryColor,20),this.git1=pt(this.pie2||this.secondaryColor,20),this.git2=pt(this.pie3||this.tertiaryColor,20),this.git3=pt(this.pie4||D(this.primaryColor,{h:-30}),20),this.git4=pt(this.pie5||D(this.primaryColor,{h:-60}),20),this.git5=pt(this.pie6||D(this.primaryColor,{h:-90}),10),this.git6=pt(this.pie7||D(this.primaryColor,{h:60}),10),this.git7=pt(this.pie8||D(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||rt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||rt(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||pt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||pt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Pc,"Theme"),Pc),mF=B(i=>{const e=new gF;return e.calculate(i),e},"getThemeVariables"),Hc,yF=(Hc=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=D(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=yo(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,x,y,v,C,_,w,T,A,E,N,R;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=ft(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||D(this["cScale"+M],{h:180});for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{h:30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{h:30,l:-(7+M*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||rt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||rt(this.labelTextColor);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||pt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||pt(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||D(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-30}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||D(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||D(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??D(this.primaryColor,{l:-30}),this.venn2=this.venn2??D(this.secondaryColor,{l:-30}),this.venn3=this.venn3??D(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??D(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??D(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??D(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??D(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??D(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||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||ft(rt(this.git0),25),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||rt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||rt(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||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Hc,"Theme"),Hc),xF=B(i=>{const e=new yF;return e.calculate(i),e},"getThemeVariables"),Uc,bF=(Uc=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=pt("#cde498",10),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.primaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,x,y,v,C,_,w,T,A,E,N,R;this.actorBorder=ft(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||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ft(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ft(this.tertiaryColor,40);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScale"+M]=ft(this["cScale"+M],10),this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],25);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||D(this["cScale"+M],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{h:30,s:-30,l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{h:30,s:-30,l:-(8+M*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||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||pt(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(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||D(this.primaryColor,{l:-30}),this.pie5=this.pie5||D(this.secondaryColor,{l:-30}),this.pie6=this.pie6||D(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||D(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??D(this.primaryColor,{l:-30}),this.venn2=this.venn2??D(this.secondaryColor,{l:-30}),this.venn3=this.venn3??D(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??D(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??D(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??D(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??D(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??D(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||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((c=this.radar)==null?void 0:c.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((h=this.radar)==null?void 0:h.graticuleStrokeWidth)||1,graticuleOpacity:((u=this.radar)==null?void 0:u.graticuleOpacity)||.3,legendBoxSize:((f=this.radar)==null?void 0:f.legendBoxSize)||12,legendFontSize:((p=this.radar)==null?void 0:p.legendFontSize)||12},this.xyChart={backgroundColor:((g=this.xyChart)==null?void 0:g.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((y=this.xyChart)==null?void 0:y.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((v=this.xyChart)==null?void 0:v.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((C=this.xyChart)==null?void 0:C.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((w=this.xyChart)==null?void 0:w.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((T=this.xyChart)==null?void 0:T.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||rt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||rt(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||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Uc,"Theme"),Uc),vF=B(i=>{const e=new bF;return e.calculate(i),e},"getThemeVariables"),Wc,CF=(Wc=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=pt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.lineColor=rt(this.background),this.textColor=rt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||pt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var e,r,n,a,o,c,h,u,f,p,g,x,y,v,C,_,w,T,A,E,N,R;this.secondBkg=pt(this.contrast,55),this.border2=this.contrast,this.actorBorder=pt(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 M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleInv"+M]=this["cScaleInv"+M]||rt(this["cScale"+M]);for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this.darkMode?this["cScalePeer"+M]=this["cScalePeer"+M]||pt(this["cScale"+M],10):this["cScalePeer"+M]=this["cScalePeer"+M]||ft(this["cScale"+M],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["cScaleLabel"+M]=this["cScaleLabel"+M]||this.scaleLabelColor;for(let M=0;M<5;M++)this["surface"+M]=this["surface"+M]||D(this.mainBkg,{l:-(5+M*5)}),this["surfacePeer"+M]=this["surfacePeer"+M]||D(this.mainBkg,{l:-(8+M*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=pt(this.contrast,30),this.sectionBkgColor2=pt(this.contrast,30),this.taskBorderColor=ft(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=pt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ft(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=D(this.primaryColor,{h:64}),this.fillType3=D(this.secondaryColor,{h:64}),this.fillType4=D(this.primaryColor,{h:-64}),this.fillType5=D(this.secondaryColor,{h:-64}),this.fillType6=D(this.primaryColor,{h:128}),this.fillType7=D(this.secondaryColor,{h:128});for(let M=0;M<this.THEME_COLOR_LIMIT;M++)this["pie"+M]=this["cScale"+M];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 M=0;M<8;M++)this["venn"+(M+1)]=this["venn"+(M+1)]??this["cScale"+M];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((n=this.xyChart)==null?void 0:n.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((N=this.radar)==null?void 0:N.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.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=ft(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||D(this.primaryColor,{h:-30}),this.git4=this.pie5||D(this.primaryColor,{h:-60}),this.git5=this.pie6||D(this.primaryColor,{h:-90}),this.git6=this.pie7||D(this.primaryColor,{h:60}),this.git7=this.pie8||D(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(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||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Wc,"Theme"),Wc),kF=B(i=>{const e=new CF;return e.calculate(i),e},"getThemeVariables"),Yc,_F=(Yc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,c,h,u,f,p,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(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?ft(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||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=D(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||D(e,{h:30}),this.cScale4=this.cScale4||D(e,{h:60}),this.cScale5=this.cScale5||D(e,{h:90}),this.cScale6=this.cScale6||D(e,{h:120}),this.cScale7=this.cScale7||D(e,{h:150}),this.cScale8=this.cScale8||D(e,{h:210,l:150}),this.cScale9=this.cScale9||D(e,{h:270}),this.cScale10=this.cScale10||D(e,{h:300}),this.cScale11=this.cScale11||D(e,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||rt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||pt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||ft(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||D(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||D(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||D(e,{h:64}),this.fillType3=this.fillType3||D(r,{h:64}),this.fillType4=this.fillType4||D(e,{h:-64}),this.fillType5=this.fillType5||D(r,{h:-64}),this.fillType6=this.fillType6||D(e,{h:128}),this.fillType7=this.fillType7||D(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||D(e,{l:-10}),this.pie5=this.pie5||D(r,{l:-10}),this.pie6=this.pie6||D(n,{l:-10}),this.pie7=this.pie7||D(e,{h:60,l:-10}),this.pie8=this.pie8||D(e,{h:-60,l:-10}),this.pie9=this.pie9||D(e,{h:120,l:0}),this.pie10=this.pie10||D(e,{h:60,l:-20}),this.pie11=this.pie11||D(e,{h:-60,l:-20}),this.pie12=this.pie12||D(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||D(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.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||e,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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||D(e,{h:-30}),this.git4=this.git4||D(e,{h:-60}),this.git5=this.git5||D(e,{h:-90}),this.git6=this.git6||D(e,{h:60}),this.git7=this.git7||D(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(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||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Yc,"Theme"),Yc),SF=B(i=>{const e=new _F;return e.calculate(i),e},"getThemeVariables"),Gc,wF=(Gc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.border1="#ccc",this.border2=yo(255,255,255,.25),this.arrowheadColor=rt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,n,a,o,c,h,u,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(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||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(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||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||rt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(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||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Gc,"Theme"),Gc),TF=B(i=>{const e=new wF;return e.calculate(i),e},"getThemeVariables"),Vc,BF=(Vc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ee("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,c,h,u,f,p,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(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?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=D(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=this.mainBkg;if(this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=ft(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||rt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||pt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||ft(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||D(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||D(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||D(e,{h:64}),this.fillType3=this.fillType3||D(r,{h:64}),this.fillType4=this.fillType4||D(e,{h:-64}),this.fillType5=this.fillType5||D(r,{h:-64}),this.fillType6=this.fillType6||D(e,{h:128}),this.fillType7=this.fillType7||D(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||D(e,{l:-10}),this.pie5=this.pie5||D(r,{l:-10}),this.pie6=this.pie6||D(n,{l:-10}),this.pie7=this.pie7||D(e,{h:60,l:-10}),this.pie8=this.pie8||D(e,{h:-60,l:-10}),this.pie9=this.pie9||D(e,{h:120,l:0}),this.pie10=this.pie10||D(e,{h:60,l:-20}),this.pie11=this.pie11||D(e,{h:-60,l:-20}),this.pie12=this.pie12||D(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||D(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.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||e,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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||D(e,{h:-30}),this.git4=this.git4||D(e,{h:-60}),this.git5=this.git5||D(e,{h:-90}),this.git6=this.git6||D(e,{h:60}),this.git7=this.git7||D(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Vc,"Theme"),Vc),AF=B(i=>{const e=new BF;return e.calculate(i),e},"getThemeVariables"),Xc,EF=(Xc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.border1="#ccc",this.border2=yo(255,255,255,.25),this.arrowheadColor=rt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,n,a,o,c,h,u,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(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||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||D(this.primaryColor,{h:30}),this.cScale4=this.cScale4||D(this.primaryColor,{h:60}),this.cScale5=this.cScale5||D(this.primaryColor,{h:90}),this.cScale6=this.cScale6||D(this.primaryColor,{h:120}),this.cScale7=this.cScale7||D(this.primaryColor,{h:150}),this.cScale8=this.cScale8||D(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||D(this.primaryColor,{h:270}),this.cScale10=this.cScale10||D(this.primaryColor,{h:300}),this.cScale11=this.cScale11||D(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=ft(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||rt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Xc,"Theme"),Xc),MF=B(i=>{const e=new EF;return e.calculate(i),e},"getThemeVariables"),Qc,LF=(Qc=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ee(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,c,h,u,f,p,g,x,y,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(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?ft(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||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor);const e="#ECECFE",r="#E9E9F1",n=D(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||rt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this.darkMode?this["cScalePeer"+_]=this["cScalePeer"+_]||pt(this["cScale"+_],10):this["cScalePeer"+_]=this["cScalePeer"+_]||ft(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||D(this.mainBkg,{h:180,s:-15,l:a*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||D(this.mainBkg,{h:180,s:-15,l:a*(8+_*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||D(e,{h:64}),this.fillType3=this.fillType3||D(r,{h:64}),this.fillType4=this.fillType4||D(e,{h:-64}),this.fillType5=this.fillType5||D(r,{h:-64}),this.fillType6=this.fillType6||D(e,{h:128}),this.fillType7=this.fillType7||D(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||D(e,{l:-10}),this.pie5=this.pie5||D(r,{l:-10}),this.pie6=this.pie6||D(n,{l:-10}),this.pie7=this.pie7||D(e,{h:60,l:-10}),this.pie8=this.pie8||D(e,{h:-60,l:-10}),this.pie9=this.pie9||D(e,{h:120,l:0}),this.pie10=this.pie10||D(e,{h:60,l:-20}),this.pie11=this.pie11||D(e,{h:-60,l:-20}),this.pie12=this.pie12||D(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||D(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((c=this.xyChart)==null?void 0:c.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((u=this.xyChart)==null?void 0:u.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.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||e,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?ft(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||D(e,{h:-30}),this.git4=this.git4||D(e,{h:-60}),this.git5=this.git5||D(e,{h:-90}),this.git6=this.git6||D(e,{h:60}),this.git7=this.git7||D(e,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Qc,"Theme"),Qc),NF=B(i=>{const e=new LF;return e.calculate(i),e},"getThemeVariables"),Zc,OF=(Zc=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=pt(this.primaryColor,16),this.tertiaryColor=D(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.background),this.secondaryBorderColor=ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ee(this.tertiaryColor,this.darkMode),this.primaryTextColor=rt(this.primaryColor),this.secondaryTextColor=rt(this.secondaryColor),this.tertiaryTextColor=rt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=pt(rt("#323D47"),10),this.border1="#ccc",this.border2=yo(255,255,255,.25),this.arrowheadColor=rt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,n,a,o,c,h,u,f,p,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||D(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||D(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ee(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ee(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ee(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ee(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||rt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||rt(this.tertiaryColor),this.lineColor=this.lineColor||rt(this.background),this.arrowheadColor=this.arrowheadColor||rt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ft(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ft(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||rt(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||pt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||rt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||pt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||ft(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=ft(this["cScale"+y],75);const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||D(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||D(this.primaryColor,{h:64}),this.fillType3=this.fillType3||D(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||D(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||D(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||D(this.primaryColor,{h:128}),this.fillType7=this.fillType7||D(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||D(this.primaryColor,{l:-10}),this.pie5=this.pie5||D(this.secondaryColor,{l:-10}),this.pie6=this.pie6||D(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||D(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||D(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||D(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||D(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||D(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||D(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||D(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||D(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||D(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||D(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||D(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||D(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||In(this.quadrant1Fill)?pt(this.quadrant1Fill):ft(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ft(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||D(this.primaryColor,{h:-30}),this.git4=this.git4||D(this.primaryColor,{h:-60}),this.git5=this.git5||D(this.primaryColor,{h:-90}),this.git6=this.git6||D(this.primaryColor,{h:60}),this.git7=this.git7||D(this.primaryColor,{h:120}),this.darkMode?(this.git0=pt(this.git0,25),this.git1=pt(this.git1,25),this.git2=pt(this.git2,25),this.git3=pt(this.git3,25),this.git4=pt(this.git4,25),this.git5=pt(this.git5,25),this.git6=pt(this.git6,25),this.git7=pt(this.git7,25)):(this.git0=ft(this.git0,25),this.git1=ft(this.git1,25),this.git2=ft(this.git2,25),this.git3=ft(this.git3,25),this.git4=ft(this.git4,25),this.git5=ft(this.git5,25),this.git6=ft(this.git6,25),this.git7=ft(this.git7,25)),this.gitInv0=this.gitInv0||rt(this.git0),this.gitInv1=this.gitInv1||rt(this.git1),this.gitInv2=this.gitInv2||rt(this.git2),this.gitInv3=this.gitInv3||rt(this.git3),this.gitInv4=this.gitInv4||rt(this.git4),this.gitInv5=this.gitInv5||rt(this.git5),this.gitInv6=this.gitInv6||rt(this.git6),this.gitInv7=this.gitInv7||rt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Sa,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||wa}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},B(Zc,"Theme"),Zc),jF=B(i=>{const e=new OF;return e.calculate(i),e},"getThemeVariables"),os={base:{getThemeVariables:pF},dark:{getThemeVariables:mF},default:{getThemeVariables:xF},forest:{getThemeVariables:vF},neutral:{getThemeVariables:kF},neo:{getThemeVariables:SF},"neo-dark":{getThemeVariables:TF},redux:{getThemeVariables:AF},"redux-dark":{getThemeVariables:MF},"redux-color":{getThemeVariables:NF},"redux-dark-color":{getThemeVariables:jF}},Yr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},pA={...Yr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:os.default.getThemeVariables(),sequence:{...Yr.sequence,messageFont:B(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:B(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:B(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Yr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Yr.c4,useWidth:void 0,personFont:B(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Yr.flowchart,inheritDir:!1},external_personFont:B(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:B(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:B(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:B(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:B(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:B(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:B(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:B(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:B(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:B(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:B(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:B(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:B(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:B(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:B(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:B(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:B(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:B(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:B(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:B(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:B(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Yr.pie,useWidth:984},xyChart:{...Yr.xyChart,useWidth:void 0},requirement:{...Yr.requirement,useWidth:void 0},packet:{...Yr.packet},treeView:{...Yr.treeView,useWidth:void 0},radar:{...Yr.radar},ishikawa:{...Yr.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Yr.venn}},gA=B((i,e="")=>Object.keys(i).reduce((r,n)=>Array.isArray(i[n])?r:typeof i[n]=="object"&&i[n]!==null?[...r,e+n,...gA(i[n],"")]:[...r,e+n],[]),"keyify"),RF=new Set(gA(pA,"")),mA=pA,Wp=B(i=>{if(_t.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(e=>Wp(e));return}for(const e of Object.keys(i)){if(_t.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!RF.has(e)||i[e]==null){_t.debug("sanitize deleting key: ",e),delete i[e];continue}if(typeof i[e]=="object"){_t.debug("sanitizing object",e),Wp(i[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(_t.debug("sanitizing css option",e),i[e]=DF(i[e]))}if(i.themeVariables)for(const e of Object.keys(i.themeVariables)){const r=i.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[e]="")}_t.debug("After sanitization",i)}},"sanitizeDirective"),DF=B(i=>{let e=0,r=0;for(const n of i){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":i},"sanitizeCss"),th=Object.freeze(mA),ds=B(i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),"evaluate"),Nr=Ei({},th),Yp,bl=[],Wu=Ei({},th),zg=B((i,e)=>{let r=Ei({},i),n={};for(const a of e)bA(a),n=Ei(n,a);if(r=Ei(r,n),n.theme&&n.theme in os){const a=Ei({},Yp),o=Ei(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in os&&(r.themeVariables=os[r.theme].getThemeVariables(o))}return Wu=r,CA(Wu),Wu},"updateCurrentConfig"),FF=B(i=>(Nr=Ei({},th),Nr=Ei(Nr,i),i.theme&&os[i.theme]&&(Nr.themeVariables=os[i.theme].getThemeVariables(i.themeVariables)),zg(Nr,bl),Nr),"setSiteConfig"),$F=B(i=>{Yp=Ei({},i)},"saveConfigFromInitialize"),zF=B(i=>(Nr=Ei(Nr,i),zg(Nr,bl),Nr),"updateSiteConfig"),yA=B(()=>Ei({},Nr),"getSiteConfig"),xA=B(i=>(CA(i),Ei(Wu,i),si()),"setConfig"),si=B(()=>Ei({},Wu),"getConfig"),bA=B(i=>{i&&(["secure",...Nr.secure??[]].forEach(e=>{Object.hasOwn(i,e)&&(_t.debug(`Denied attempt to modify a secure key ${e}`,i[e]),delete i[e])}),Object.keys(i).forEach(e=>{e.startsWith("__")&&delete i[e]}),Object.keys(i).forEach(e=>{typeof i[e]=="string"&&(i[e].includes("<")||i[e].includes(">")||i[e].includes("url(data:"))&&delete i[e],typeof i[e]=="object"&&bA(i[e])}))},"sanitize"),qF=B(i=>{var e;Wp(i),i.fontFamily&&!((e=i.themeVariables)!=null&&e.fontFamily)&&(i.themeVariables={...i.themeVariables,fontFamily:i.fontFamily}),bl.push(i),zg(Nr,bl)},"addDirective"),Gp=B((i=Nr)=>{bl=[],zg(i,bl)},"reset"),IF={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."},nS={},vA=B(i=>{nS[i]||(_t.warn(IF[i]),nS[i]=!0)},"issueWarning"),CA=B(i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&vA("LAZY_LOAD_DEPRECATED")},"checkConfig"),tit=B(()=>{let i={};Yp&&(i=Ei(i,Yp));for(const e of bl)i=Ei(i,e);return i},"getUserDefinedConfig"),vr=B(i=>{var e,r;return((e=i.flowchart)==null?void 0:e.htmlLabels)!=null&&vA("FLOWCHART_HTML_LABELS_DEPRECATED"),ds(i.htmlLabels??((r=i.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Sf=/<br\s*\/?>/gi,PF=B(i=>i?SA(i).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),HF=(()=>{let i=!1;return()=>{i||(kA(),i=!0)}})();function kA(){const i="data-temp-href-target";yl.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(i,e.getAttribute("target")??"")}),yl.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(i)&&(e.setAttribute("target",e.getAttribute(i)??""),e.removeAttribute(i),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}B(kA,"setupDompurifyHooks");var _A=B(i=>(HF(),yl.sanitize(i)),"removeScript"),aS=B((i,e)=>{if(vr(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?i=_A(i):r!=="loose"&&(i=SA(i),i=i.replace(/</g,"&lt;").replace(/>/g,"&gt;"),i=i.replace(/=/g,"&equals;"),i=GF(i))}return i},"sanitizeMore"),zn=B((i,e)=>i&&(e.dompurifyConfig?i=yl.sanitize(aS(i,e),e.dompurifyConfig).toString():i=yl.sanitize(aS(i,e),{FORBID_TAGS:["style"]}).toString(),i),"sanitizeText"),UF=B((i,e)=>typeof i=="string"?zn(i,e):i.flat().map(r=>zn(r,e)),"sanitizeTextOrArray"),WF=B(i=>Sf.test(i),"hasBreaks"),YF=B(i=>i.split(Sf),"splitBreaks"),GF=B(i=>i.replace(/#br#/g,"<br/>"),"placeholderToBreak"),SA=B(i=>i.replace(Sf,"#br#"),"breakToPlaceholder"),VF=B(i=>{let e="";return i&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),XF=B(function(...i){const e=i.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),QF=B(function(...i){const e=i.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),sS=B(function(i){const e=i.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const o=e[n-1],c=e[n+1];ZF(o,c)&&(a=o+","+c,n++,r.pop())}r.push(KF(a))}return r.join("")},"parseGenericTypes"),$x=B((i,e)=>Math.max(0,i.split(e).length-1),"countOccurrence"),ZF=B((i,e)=>{const r=$x(i,"~"),n=$x(e,"~");return r===1&&n===1},"shouldCombineSets"),KF=B(i=>{const e=$x(i,"~");let r=!1;if(e<=1)return i;e%2!==0&&i.startsWith("~")&&(i=i.substring(1),r=!0);const n=[...i];let a=n.indexOf("~"),o=n.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)n[a]="<",n[o]=">",a=n.indexOf("~"),o=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),oS=B(()=>window.MathMLElement!==void 0,"isMathMLSupported"),zx=/\$\$(.*)\$\$/g,ef=B(i=>{var e;return(((e=i.match(zx))==null?void 0:e.length)??0)>0},"hasKatex"),eit=B(async(i,e)=>{const r=document.createElement("div");r.innerHTML=await wA(i,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),JF=B(async(i,e)=>{if(!ef(i))return i;if(!(oS()||e.legacyMathML||e.forceLegacyMathML))return i.replace(zx,"MathML is unsupported in this environment.");{const{default:r}=await Ce(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),n=e.forceLegacyMathML||!oS()&&e.legacyMathML?"htmlAndMathml":"mathml";return i.split(Sf).map(a=>ef(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(zx,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),wA=B(async(i,e)=>zn(await JF(i,e),e),"renderKatexSanitized"),wf={getRows:PF,sanitizeText:zn,sanitizeTextOrArray:UF,hasBreaks:WF,splitBreaks:YF,lineBreakRegex:Sf,removeScript:_A,getUrl:VF,evaluate:ds,getMax:XF,getMin:QF},t6=B(function(i,e){for(let r of e)i.attr(r[0],r[1])},"d3Attrs"),e6=B(function(i,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",i),n.set("width",e)),n},"calculateSvgSizeAttrs"),TA=B(function(i,e,r,n){const a=e6(e,r,n);t6(i,a)},"configureSvgSize"),i6=B(function(i,e,r,n){const a=e.node().getBBox(),o=a.width,c=a.height;_t.info(`SVG bounds: ${o}x${c}`,a);let h=0,u=0;_t.info(`Graph bounds: ${h}x${u}`,i),h=o+r*2,u=c+r*2,_t.info(`Calculated bounds: ${h}x${u}`),TA(e,u,h,n);const f=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",f)},"setupGraphViewbox"),Bp={},r6=B((i,e,r,n)=>{let a="";return i in Bp&&Bp[i]?a=Bp[i]({...r,svgId:n}):_t.warn(`No theme found for ${i}`),` & {
109
- font-family: ${r.fontFamily};
110
- font-size: ${r.fontSize};
111
- fill: ${r.textColor}
112
- }
113
- @keyframes edge-animation-frame {
114
- from {
115
- stroke-dashoffset: 0;
116
- }
117
- }
118
- @keyframes dash {
119
- to {
120
- stroke-dashoffset: 0;
121
- }
122
- }
123
- & .edge-animation-slow {
124
- stroke-dasharray: 9,5 !important;
125
- stroke-dashoffset: 900;
126
- animation: dash 50s linear infinite;
127
- stroke-linecap: round;
128
- }
129
- & .edge-animation-fast {
130
- stroke-dasharray: 9,5 !important;
131
- stroke-dashoffset: 900;
132
- animation: dash 20s linear infinite;
133
- stroke-linecap: round;
134
- }
135
- /* Classes common for multiple diagrams */
136
-
137
- & .error-icon {
138
- fill: ${r.errorBkgColor};
139
- }
140
- & .error-text {
141
- fill: ${r.errorTextColor};
142
- stroke: ${r.errorTextColor};
143
- }
144
-
145
- & .edge-thickness-normal {
146
- stroke-width: ${r.strokeWidth??1}px;
147
- }
148
- & .edge-thickness-thick {
149
- stroke-width: 3.5px
150
- }
151
- & .edge-pattern-solid {
152
- stroke-dasharray: 0;
153
- }
154
- & .edge-thickness-invisible {
155
- stroke-width: 0;
156
- fill: none;
157
- }
158
- & .edge-pattern-dashed{
159
- stroke-dasharray: 3;
160
- }
161
- .edge-pattern-dotted {
162
- stroke-dasharray: 2;
163
- }
164
-
165
- & .marker {
166
- fill: ${r.lineColor};
167
- stroke: ${r.lineColor};
168
- }
169
- & .marker.cross {
170
- stroke: ${r.lineColor};
171
- }
172
-
173
- & svg {
174
- font-family: ${r.fontFamily};
175
- font-size: ${r.fontSize};
176
- }
177
- & p {
178
- margin: 0
179
- }
180
-
181
- ${a}
182
- .node .neo-node {
183
- stroke: ${r.nodeBorder};
184
- }
185
-
186
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
187
- stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
188
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
189
- }
190
-
191
-
192
- [data-look="neo"].node path {
193
- stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
194
- stroke-width: ${r.strokeWidth??1}px;
195
- }
196
-
197
- [data-look="neo"].node .outer-path {
198
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
199
- }
200
-
201
- [data-look="neo"].node .neo-line path {
202
- stroke: ${r.nodeBorder};
203
- filter: none;
204
- }
205
-
206
- [data-look="neo"].node circle{
207
- stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
208
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
209
- }
210
-
211
- [data-look="neo"].node circle .state-start{
212
- fill: #000000;
213
- }
214
-
215
- [data-look="neo"].icon-shape .icon {
216
- fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
217
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
218
- }
219
-
220
- [data-look="neo"].icon-shape .icon-neo path {
221
- stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
222
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
223
- }
224
-
225
- ${e}
226
- `},"getStyles"),n6=B((i,e)=>{e!==void 0&&(Bp[i]=e)},"addStylesForDiagram"),a6=r6,BA={};rF(BA,{clear:()=>s6,getAccDescription:()=>h6,getAccTitle:()=>l6,getDiagramTitle:()=>f6,setAccDescription:()=>c6,setAccTitle:()=>o6,setDiagramTitle:()=>u6});var vv="",Cv="",kv="",_v=B(i=>zn(i,si()),"sanitizeText"),s6=B(()=>{vv="",kv="",Cv=""},"clear"),o6=B(i=>{vv=_v(i).replace(/^\s+/g,"")},"setAccTitle"),l6=B(()=>vv,"getAccTitle"),c6=B(i=>{kv=_v(i).replace(/\n\s+/g,`
227
- `)},"setAccDescription"),h6=B(()=>kv,"getAccDescription"),u6=B(i=>{Cv=_v(i)},"setDiagramTitle"),f6=B(()=>Cv,"getDiagramTitle"),lS=_t,d6=xv,Ae=si,iit=xA,rit=th,Sv=B(i=>zn(i,Ae()),"sanitizeText"),p6=i6,g6=B(()=>BA,"getCommonDb"),Vp={},Xp=B((i,e,r)=>{var n;Vp[i]&&lS.warn(`Diagram with id ${i} already registered. Overwriting.`),Vp[i]=e,r&&dA(i,r),n6(i,e.styles),(n=e.injectUtils)==null||n.call(e,lS,d6,Ae,Sv,p6,g6(),()=>{})},"registerDiagram"),qx=B(i=>{if(i in Vp)return Vp[i];throw new m6(i)},"getDiagram"),Kc,m6=(Kc=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},B(Kc,"DiagramNotFoundError"),Kc);class cS extends Map{constructor(e,r=b6){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(hS(this,e))}has(e){return super.has(hS(this,e))}set(e,r){return super.set(y6(this,e),r)}delete(e){return super.delete(x6(this,e))}}function hS({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):r}function y6({_intern:i,_key:e},r){const n=e(r);return i.has(n)?i.get(n):(i.set(n,r),r)}function x6({_intern:i,_key:e},r){const n=e(r);return i.has(n)&&(r=i.get(n),i.delete(n)),r}function b6(i){return i!==null&&typeof i=="object"?i.valueOf():i}function uS(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function fS(i,e){let r;if(e===void 0)for(const n of i)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of i)(a=e(a,++n,i))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function v6(i,e){let r=0;for(let n of i)(n=+n)&&(r+=n);return r}var C6={value:()=>{}};function Tf(){for(var i=0,e=arguments.length,r={},n;i<e;++i){if(!(n=arguments[i]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Ap(r)}function Ap(i){this._=i}function k6(i,e){return i.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Ap.prototype=Tf.prototype={constructor:Ap,on:function(i,e){var r=this._,n=k6(i+"",r),a,o=-1,c=n.length;if(arguments.length<2){for(;++o<c;)if((a=(i=n[o]).type)&&(a=_6(r[a],i.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(a=(i=n[o]).type)r[a]=dS(r[a],i.name,e);else if(e==null)for(a in r)r[a]=dS(r[a],i.name,null);return this},copy:function(){var i={},e=this._;for(var r in e)i[r]=e[r].slice();return new Ap(i)},call:function(i,e){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,o;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(o=this._[i],n=0,a=o.length;n<a;++n)o[n].value.apply(e,r)},apply:function(i,e,r){if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(var n=this._[i],a=0,o=n.length;a<o;++a)n[a].value.apply(e,r)}};function _6(i,e){for(var r=0,n=i.length,a;r<n;++r)if((a=i[r]).name===e)return a.value}function dS(i,e,r){for(var n=0,a=i.length;n<a;++n)if(i[n].name===e){i[n]=C6,i=i.slice(0,n).concat(i.slice(n+1));break}return r!=null&&i.push({name:e,value:r}),i}var Ix="http://www.w3.org/1999/xhtml";const pS={svg:"http://www.w3.org/2000/svg",xhtml:Ix,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qg(i){var e=i+="",r=e.indexOf(":");return r>=0&&(e=i.slice(0,r))!=="xmlns"&&(i=i.slice(r+1)),pS.hasOwnProperty(e)?{space:pS[e],local:i}:i}function S6(i){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Ix&&e.documentElement.namespaceURI===Ix?e.createElement(i):e.createElementNS(r,i)}}function w6(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function AA(i){var e=qg(i);return(e.local?w6:S6)(e)}function T6(){}function wv(i){return i==null?T6:function(){return this.querySelector(i)}}function B6(i){typeof i!="function"&&(i=wv(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=new Array(c),u,f,p=0;p<c;++p)(u=o[p])&&(f=i.call(u,u.__data__,p,o))&&("__data__"in u&&(f.__data__=u.__data__),h[p]=f);return new Qr(n,this._parents)}function A6(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function E6(){return[]}function EA(i){return i==null?E6:function(){return this.querySelectorAll(i)}}function M6(i){return function(){return A6(i.apply(this,arguments))}}function L6(i){typeof i=="function"?i=M6(i):i=EA(i);for(var e=this._groups,r=e.length,n=[],a=[],o=0;o<r;++o)for(var c=e[o],h=c.length,u,f=0;f<h;++f)(u=c[f])&&(n.push(i.call(u,u.__data__,f,c)),a.push(u));return new Qr(n,a)}function MA(i){return function(){return this.matches(i)}}function LA(i){return function(e){return e.matches(i)}}var N6=Array.prototype.find;function O6(i){return function(){return N6.call(this.children,i)}}function j6(){return this.firstElementChild}function R6(i){return this.select(i==null?j6:O6(typeof i=="function"?i:LA(i)))}var D6=Array.prototype.filter;function F6(){return Array.from(this.children)}function $6(i){return function(){return D6.call(this.children,i)}}function z6(i){return this.selectAll(i==null?F6:$6(typeof i=="function"?i:LA(i)))}function q6(i){typeof i!="function"&&(i=MA(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,f=0;f<c;++f)(u=o[f])&&i.call(u,u.__data__,f,o)&&h.push(u);return new Qr(n,this._parents)}function NA(i){return new Array(i.length)}function I6(){return new Qr(this._enter||this._groups.map(NA),this._parents)}function Qp(i,e){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=e}Qp.prototype={constructor:Qp,appendChild:function(i){return this._parent.insertBefore(i,this._next)},insertBefore:function(i,e){return this._parent.insertBefore(i,e)},querySelector:function(i){return this._parent.querySelector(i)},querySelectorAll:function(i){return this._parent.querySelectorAll(i)}};function P6(i){return function(){return i}}function H6(i,e,r,n,a,o){for(var c=0,h,u=e.length,f=o.length;c<f;++c)(h=e[c])?(h.__data__=o[c],n[c]=h):r[c]=new Qp(i,o[c]);for(;c<u;++c)(h=e[c])&&(a[c]=h)}function U6(i,e,r,n,a,o,c){var h,u,f=new Map,p=e.length,g=o.length,x=new Array(p),y;for(h=0;h<p;++h)(u=e[h])&&(x[h]=y=c.call(u,u.__data__,h,e)+"",f.has(y)?a[h]=u:f.set(y,u));for(h=0;h<g;++h)y=c.call(i,o[h],h,o)+"",(u=f.get(y))?(n[h]=u,u.__data__=o[h],f.delete(y)):r[h]=new Qp(i,o[h]);for(h=0;h<p;++h)(u=e[h])&&f.get(x[h])===u&&(a[h]=u)}function W6(i){return i.__data__}function Y6(i,e){if(!arguments.length)return Array.from(this,W6);var r=e?U6:H6,n=this._parents,a=this._groups;typeof i!="function"&&(i=P6(i));for(var o=a.length,c=new Array(o),h=new Array(o),u=new Array(o),f=0;f<o;++f){var p=n[f],g=a[f],x=g.length,y=G6(i.call(p,p&&p.__data__,f,n)),v=y.length,C=h[f]=new Array(v),_=c[f]=new Array(v),w=u[f]=new Array(x);r(p,g,C,_,w,y,e);for(var T=0,A=0,E,N;T<v;++T)if(E=C[T]){for(T>=A&&(A=T+1);!(N=_[A])&&++A<v;);E._next=N||null}}return c=new Qr(c,n),c._enter=h,c._exit=u,c}function G6(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function V6(){return new Qr(this._exit||this._groups.map(NA),this._parents)}function X6(i,e,r){var n=this.enter(),a=this,o=this.exit();return typeof i=="function"?(n=i(n),n&&(n=n.selection())):n=n.append(i+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?o.remove():r(o),n&&a?n.merge(a).order():a}function Q6(i){for(var e=i.selection?i.selection():i,r=this._groups,n=e._groups,a=r.length,o=n.length,c=Math.min(a,o),h=new Array(a),u=0;u<c;++u)for(var f=r[u],p=n[u],g=f.length,x=h[u]=new Array(g),y,v=0;v<g;++v)(y=f[v]||p[v])&&(x[v]=y);for(;u<a;++u)h[u]=r[u];return new Qr(h,this._parents)}function Z6(){for(var i=this._groups,e=-1,r=i.length;++e<r;)for(var n=i[e],a=n.length-1,o=n[a],c;--a>=0;)(c=n[a])&&(o&&c.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(c,o),o=c);return this}function K6(i){i||(i=J6);function e(g,x){return g&&x?i(g.__data__,x.__data__):!g-!x}for(var r=this._groups,n=r.length,a=new Array(n),o=0;o<n;++o){for(var c=r[o],h=c.length,u=a[o]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(u[p]=f);u.sort(e)}return new Qr(a,this._parents).order()}function J6(i,e){return i<e?-1:i>e?1:i>=e?0:NaN}function t8(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function e8(){return Array.from(this)}function i8(){for(var i=this._groups,e=0,r=i.length;e<r;++e)for(var n=i[e],a=0,o=n.length;a<o;++a){var c=n[a];if(c)return c}return null}function r8(){let i=0;for(const e of this)++i;return i}function n8(){return!this.node()}function a8(i){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],o=0,c=a.length,h;o<c;++o)(h=a[o])&&i.call(h,h.__data__,o,a);return this}function s8(i){return function(){this.removeAttribute(i)}}function o8(i){return function(){this.removeAttributeNS(i.space,i.local)}}function l8(i,e){return function(){this.setAttribute(i,e)}}function c8(i,e){return function(){this.setAttributeNS(i.space,i.local,e)}}function h8(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(i):this.setAttribute(i,r)}}function u8(i,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(i.space,i.local):this.setAttributeNS(i.space,i.local,r)}}function f8(i,e){var r=qg(i);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?o8:s8:typeof e=="function"?r.local?u8:h8:r.local?c8:l8)(r,e))}function OA(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function d8(i){return function(){this.style.removeProperty(i)}}function p8(i,e,r){return function(){this.style.setProperty(i,e,r)}}function g8(i,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(i):this.style.setProperty(i,n,r)}}function m8(i,e,r){return arguments.length>1?this.each((e==null?d8:typeof e=="function"?g8:p8)(i,e,r??"")):eh(this.node(),i)}function eh(i,e){return i.style.getPropertyValue(e)||OA(i).getComputedStyle(i,null).getPropertyValue(e)}function y8(i){return function(){delete this[i]}}function x8(i,e){return function(){this[i]=e}}function b8(i,e){return function(){var r=e.apply(this,arguments);r==null?delete this[i]:this[i]=r}}function v8(i,e){return arguments.length>1?this.each((e==null?y8:typeof e=="function"?b8:x8)(i,e)):this.node()[i]}function jA(i){return i.trim().split(/^|\s+/)}function Tv(i){return i.classList||new RA(i)}function RA(i){this._node=i,this._names=jA(i.getAttribute("class")||"")}RA.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function DA(i,e){for(var r=Tv(i),n=-1,a=e.length;++n<a;)r.add(e[n])}function FA(i,e){for(var r=Tv(i),n=-1,a=e.length;++n<a;)r.remove(e[n])}function C8(i){return function(){DA(this,i)}}function k8(i){return function(){FA(this,i)}}function _8(i,e){return function(){(e.apply(this,arguments)?DA:FA)(this,i)}}function S8(i,e){var r=jA(i+"");if(arguments.length<2){for(var n=Tv(this.node()),a=-1,o=r.length;++a<o;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?_8:e?C8:k8)(r,e))}function w8(){this.textContent=""}function T8(i){return function(){this.textContent=i}}function B8(i){return function(){var e=i.apply(this,arguments);this.textContent=e??""}}function A8(i){return arguments.length?this.each(i==null?w8:(typeof i=="function"?B8:T8)(i)):this.node().textContent}function E8(){this.innerHTML=""}function M8(i){return function(){this.innerHTML=i}}function L8(i){return function(){var e=i.apply(this,arguments);this.innerHTML=e??""}}function N8(i){return arguments.length?this.each(i==null?E8:(typeof i=="function"?L8:M8)(i)):this.node().innerHTML}function O8(){this.nextSibling&&this.parentNode.appendChild(this)}function j8(){return this.each(O8)}function R8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function D8(){return this.each(R8)}function F8(i){var e=typeof i=="function"?i:AA(i);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function $8(){return null}function z8(i,e){var r=typeof i=="function"?i:AA(i),n=e==null?$8:typeof e=="function"?e:wv(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function q8(){var i=this.parentNode;i&&i.removeChild(this)}function I8(){return this.each(q8)}function P8(){var i=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function H8(){var i=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(i,this.nextSibling):i}function U8(i){return this.select(i?H8:P8)}function W8(i){return arguments.length?this.property("__data__",i):this.node().__data__}function Y8(i){return function(e){i.call(this,e,this.__data__)}}function G8(i){return i.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function V8(i){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,o;r<a;++r)o=e[r],(!i.type||o.type===i.type)&&o.name===i.name?this.removeEventListener(o.type,o.listener,o.options):e[++n]=o;++n?e.length=n:delete this.__on}}}function X8(i,e,r){return function(){var n=this.__on,a,o=Y8(e);if(n){for(var c=0,h=n.length;c<h;++c)if((a=n[c]).type===i.type&&a.name===i.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=r),a.value=e;return}}this.addEventListener(i.type,o,r),a={type:i.type,name:i.name,value:e,listener:o,options:r},n?n.push(a):this.__on=[a]}}function Q8(i,e,r){var n=G8(i+""),a,o=n.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var u=0,f=h.length,p;u<f;++u)for(a=0,p=h[u];a<o;++a)if((c=n[a]).type===p.type&&c.name===p.name)return p.value}return}for(h=e?X8:V8,a=0;a<o;++a)this.each(h(n[a],e,r));return this}function $A(i,e,r){var n=OA(i),a=n.CustomEvent;typeof a=="function"?a=new a(e,r):(a=n.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),i.dispatchEvent(a)}function Z8(i,e){return function(){return $A(this,i,e)}}function K8(i,e){return function(){return $A(this,i,e.apply(this,arguments))}}function J8(i,e){return this.each((typeof e=="function"?K8:Z8)(i,e))}function*t$(){for(var i=this._groups,e=0,r=i.length;e<r;++e)for(var n=i[e],a=0,o=n.length,c;a<o;++a)(c=n[a])&&(yield c)}var zA=[null];function Qr(i,e){this._groups=i,this._parents=e}function Bf(){return new Qr([[document.documentElement]],zA)}function e$(){return this}Qr.prototype=Bf.prototype={constructor:Qr,select:B6,selectAll:L6,selectChild:R6,selectChildren:z6,filter:q6,data:Y6,enter:I6,exit:V6,join:X6,merge:Q6,selection:e$,order:Z6,sort:K6,call:t8,nodes:e8,node:i8,size:r8,empty:n8,each:a8,attr:f8,style:m8,property:v8,classed:S8,text:A8,html:N8,raise:j8,lower:D8,append:F8,insert:z8,remove:I8,clone:U8,datum:W8,on:Q8,dispatch:J8,[Symbol.iterator]:t$};function Xt(i){return typeof i=="string"?new Qr([[document.querySelector(i)]],[document.documentElement]):new Qr([[i]],zA)}function i$(i){let e;for(;e=i.sourceEvent;)i=e;return i}function da(i,e){if(i=i$(i),e===void 0&&(e=i.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=i.clientX,n.y=i.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[i.clientX-a.left-e.clientLeft,i.clientY-a.top-e.clientTop]}}return[i.pageX,i.pageY]}const r$={passive:!1},rf={capture:!0,passive:!1};function B0(i){i.stopImmediatePropagation()}function wc(i){i.preventDefault(),i.stopImmediatePropagation()}function qA(i){var e=i.document.documentElement,r=Xt(i).on("dragstart.drag",wc,rf);"onselectstart"in e?r.on("selectstart.drag",wc,rf):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function IA(i,e){var r=i.document.documentElement,n=Xt(i).on("dragstart.drag",null);e&&(n.on("click.drag",wc,rf),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const tp=i=>()=>i;function Px(i,{sourceEvent:e,subject:r,target:n,identifier:a,active:o,x:c,y:h,dx:u,dy:f,dispatch:p}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:p}})}Px.prototype.on=function(){var i=this._.on.apply(this._,arguments);return i===this._?this:i};function n$(i){return!i.ctrlKey&&!i.button}function a$(){return this.parentNode}function s$(i,e){return e??{x:i.x,y:i.y}}function o$(){return navigator.maxTouchPoints||"ontouchstart"in this}function l$(){var i=n$,e=a$,r=s$,n=o$,a={},o=Tf("start","drag","end"),c=0,h,u,f,p,g=0;function x(E){E.on("mousedown.drag",y).filter(n).on("touchstart.drag",_).on("touchmove.drag",w,r$).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(E,N){if(!(p||!i.call(this,E,N))){var R=A(this,e.call(this,E,N),E,N,"mouse");R&&(Xt(E.view).on("mousemove.drag",v,rf).on("mouseup.drag",C,rf),qA(E.view),B0(E),f=!1,h=E.clientX,u=E.clientY,R("start",E))}}function v(E){if(wc(E),!f){var N=E.clientX-h,R=E.clientY-u;f=N*N+R*R>g}a.mouse("drag",E)}function C(E){Xt(E.view).on("mousemove.drag mouseup.drag",null),IA(E.view,f),wc(E),a.mouse("end",E)}function _(E,N){if(i.call(this,E,N)){var R=E.changedTouches,M=e.call(this,E,N),O=R.length,Y,$;for(Y=0;Y<O;++Y)($=A(this,M,E,N,R[Y].identifier,R[Y]))&&(B0(E),$("start",E,R[Y]))}}function w(E){var N=E.changedTouches,R=N.length,M,O;for(M=0;M<R;++M)(O=a[N[M].identifier])&&(wc(E),O("drag",E,N[M]))}function T(E){var N=E.changedTouches,R=N.length,M,O;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),M=0;M<R;++M)(O=a[N[M].identifier])&&(B0(E),O("end",E,N[M]))}function A(E,N,R,M,O,Y){var $=o.copy(),q=da(Y||R,N),J,W,F;if((F=r.call(E,new Px("beforestart",{sourceEvent:R,target:x,identifier:O,active:c,x:q[0],y:q[1],dx:0,dy:0,dispatch:$}),M))!=null)return J=F.x-q[0]||0,W=F.y-q[1]||0,function U(j,I,H){var V=q,Z;switch(j){case"start":a[O]=U,Z=c++;break;case"end":delete a[O],--c;case"drag":q=da(H||I,N),Z=c;break}$.call(j,E,new Px(j,{sourceEvent:I,subject:F,target:x,identifier:O,active:Z,x:q[0]+J,y:q[1]+W,dx:q[0]-V[0],dy:q[1]-V[1],dispatch:$}),M)}}return x.filter=function(E){return arguments.length?(i=typeof E=="function"?E:tp(!!E),x):i},x.container=function(E){return arguments.length?(e=typeof E=="function"?E:tp(E),x):e},x.subject=function(E){return arguments.length?(r=typeof E=="function"?E:tp(E),x):r},x.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:tp(!!E),x):n},x.on=function(){var E=o.on.apply(o,arguments);return E===o?x:E},x.clickDistance=function(E){return arguments.length?(g=(E=+E)*E,x):Math.sqrt(g)},x}function Bv(i,e,r){i.prototype=e.prototype=r,r.constructor=i}function PA(i,e){var r=Object.create(i.prototype);for(var n in e)r[n]=e[n];return r}function Af(){}var nf=.7,Zp=1/nf,Tc="\\s*([+-]?\\d+)\\s*",af="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ba="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c$=/^#([0-9a-f]{3,8})$/,h$=new RegExp(`^rgb\\(${Tc},${Tc},${Tc}\\)$`),u$=new RegExp(`^rgb\\(${ba},${ba},${ba}\\)$`),f$=new RegExp(`^rgba\\(${Tc},${Tc},${Tc},${af}\\)$`),d$=new RegExp(`^rgba\\(${ba},${ba},${ba},${af}\\)$`),p$=new RegExp(`^hsl\\(${af},${ba},${ba}\\)$`),g$=new RegExp(`^hsla\\(${af},${ba},${ba},${af}\\)$`),gS={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Bv(Af,sf,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:mS,formatHex:mS,formatHex8:m$,formatHsl:y$,formatRgb:yS,toString:yS});function mS(){return this.rgb().formatHex()}function m$(){return this.rgb().formatHex8()}function y$(){return HA(this).formatHsl()}function yS(){return this.rgb().formatRgb()}function sf(i){var e,r;return i=(i+"").trim().toLowerCase(),(e=c$.exec(i))?(r=e[1].length,e=parseInt(e[1],16),r===6?xS(e):r===3?new jr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ep(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ep(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=h$.exec(i))?new jr(e[1],e[2],e[3],1):(e=u$.exec(i))?new jr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=f$.exec(i))?ep(e[1],e[2],e[3],e[4]):(e=d$.exec(i))?ep(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=p$.exec(i))?CS(e[1],e[2]/100,e[3]/100,1):(e=g$.exec(i))?CS(e[1],e[2]/100,e[3]/100,e[4]):gS.hasOwnProperty(i)?xS(gS[i]):i==="transparent"?new jr(NaN,NaN,NaN,0):null}function xS(i){return new jr(i>>16&255,i>>8&255,i&255,1)}function ep(i,e,r,n){return n<=0&&(i=e=r=NaN),new jr(i,e,r,n)}function x$(i){return i instanceof Af||(i=sf(i)),i?(i=i.rgb(),new jr(i.r,i.g,i.b,i.opacity)):new jr}function Hx(i,e,r,n){return arguments.length===1?x$(i):new jr(i,e,r,n??1)}function jr(i,e,r,n){this.r=+i,this.g=+e,this.b=+r,this.opacity=+n}Bv(jr,Hx,PA(Af,{brighter(i){return i=i==null?Zp:Math.pow(Zp,i),new jr(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?nf:Math.pow(nf,i),new jr(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new jr(ul(this.r),ul(this.g),ul(this.b),Kp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bS,formatHex:bS,formatHex8:b$,formatRgb:vS,toString:vS}));function bS(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}`}function b$(){return`#${Jo(this.r)}${Jo(this.g)}${Jo(this.b)}${Jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function vS(){const i=Kp(this.opacity);return`${i===1?"rgb(":"rgba("}${ul(this.r)}, ${ul(this.g)}, ${ul(this.b)}${i===1?")":`, ${i})`}`}function Kp(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function ul(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function Jo(i){return i=ul(i),(i<16?"0":"")+i.toString(16)}function CS(i,e,r,n){return n<=0?i=e=r=NaN:r<=0||r>=1?i=e=NaN:e<=0&&(i=NaN),new jn(i,e,r,n)}function HA(i){if(i instanceof jn)return new jn(i.h,i.s,i.l,i.opacity);if(i instanceof Af||(i=sf(i)),!i)return new jn;if(i instanceof jn)return i;i=i.rgb();var e=i.r/255,r=i.g/255,n=i.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),c=NaN,h=o-a,u=(o+a)/2;return h?(e===o?c=(r-n)/h+(r<n)*6:r===o?c=(n-e)/h+2:c=(e-r)/h+4,h/=u<.5?o+a:2-o-a,c*=60):h=u>0&&u<1?0:c,new jn(c,h,u,i.opacity)}function v$(i,e,r,n){return arguments.length===1?HA(i):new jn(i,e,r,n??1)}function jn(i,e,r,n){this.h=+i,this.s=+e,this.l=+r,this.opacity=+n}Bv(jn,v$,PA(Af,{brighter(i){return i=i==null?Zp:Math.pow(Zp,i),new jn(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?nf:Math.pow(nf,i),new jn(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new jr(A0(i>=240?i-240:i+120,a,n),A0(i,a,n),A0(i<120?i+240:i-120,a,n),this.opacity)},clamp(){return new jn(kS(this.h),ip(this.s),ip(this.l),Kp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=Kp(this.opacity);return`${i===1?"hsl(":"hsla("}${kS(this.h)}, ${ip(this.s)*100}%, ${ip(this.l)*100}%${i===1?")":`, ${i})`}`}}));function kS(i){return i=(i||0)%360,i<0?i+360:i}function ip(i){return Math.max(0,Math.min(1,i||0))}function A0(i,e,r){return(i<60?e+(r-e)*i/60:i<180?r:i<240?e+(r-e)*(240-i)/60:e)*255}const Av=i=>()=>i;function UA(i,e){return function(r){return i+r*e}}function C$(i,e,r){return i=Math.pow(i,r),e=Math.pow(e,r)-i,r=1/r,function(n){return Math.pow(i+n*e,r)}}function nit(i,e){var r=e-i;return r?UA(i,r>180||r<-180?r-360*Math.round(r/360):r):Av(isNaN(i)?e:i)}function k$(i){return(i=+i)==1?WA:function(e,r){return r-e?C$(e,r,i):Av(isNaN(e)?r:e)}}function WA(i,e){var r=e-i;return r?UA(i,r):Av(isNaN(i)?e:i)}const _S=(function i(e){var r=k$(e);function n(a,o){var c=r((a=Hx(a)).r,(o=Hx(o)).r),h=r(a.g,o.g),u=r(a.b,o.b),f=WA(a.opacity,o.opacity);return function(p){return a.r=c(p),a.g=h(p),a.b=u(p),a.opacity=f(p),a+""}}return n.gamma=i,n})(1);function io(i,e){return i=+i,e=+e,function(r){return i*(1-r)+e*r}}var Ux=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E0=new RegExp(Ux.source,"g");function _$(i){return function(){return i}}function S$(i){return function(e){return i(e)+""}}function w$(i,e){var r=Ux.lastIndex=E0.lastIndex=0,n,a,o,c=-1,h=[],u=[];for(i=i+"",e=e+"";(n=Ux.exec(i))&&(a=E0.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),h[c]?h[c]+=o:h[++c]=o),(n=n[0])===(a=a[0])?h[c]?h[c]+=a:h[++c]=a:(h[++c]=null,u.push({i:c,x:io(n,a)})),r=E0.lastIndex;return r<e.length&&(o=e.slice(r),h[c]?h[c]+=o:h[++c]=o),h.length<2?u[0]?S$(u[0].x):_$(e):(e=u.length,function(f){for(var p=0,g;p<e;++p)h[(g=u[p]).i]=g.x(f);return h.join("")})}var SS=180/Math.PI,Wx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function YA(i,e,r,n,a,o){var c,h,u;return(c=Math.sqrt(i*i+e*e))&&(i/=c,e/=c),(u=i*r+e*n)&&(r-=i*u,n-=e*u),(h=Math.sqrt(r*r+n*n))&&(r/=h,n/=h,u/=h),i*n<e*r&&(i=-i,e=-e,u=-u,c=-c),{translateX:a,translateY:o,rotate:Math.atan2(e,i)*SS,skewX:Math.atan(u)*SS,scaleX:c,scaleY:h}}var rp;function T$(i){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return e.isIdentity?Wx:YA(e.a,e.b,e.c,e.d,e.e,e.f)}function B$(i){return i==null||(rp||(rp=document.createElementNS("http://www.w3.org/2000/svg","g")),rp.setAttribute("transform",i),!(i=rp.transform.baseVal.consolidate()))?Wx:(i=i.matrix,YA(i.a,i.b,i.c,i.d,i.e,i.f))}function GA(i,e,r,n){function a(f){return f.length?f.pop()+" ":""}function o(f,p,g,x,y,v){if(f!==g||p!==x){var C=y.push("translate(",null,e,null,r);v.push({i:C-4,x:io(f,g)},{i:C-2,x:io(p,x)})}else(g||x)&&y.push("translate("+g+e+x+r)}function c(f,p,g,x){f!==p?(f-p>180?p+=360:p-f>180&&(f+=360),x.push({i:g.push(a(g)+"rotate(",null,n)-2,x:io(f,p)})):p&&g.push(a(g)+"rotate("+p+n)}function h(f,p,g,x){f!==p?x.push({i:g.push(a(g)+"skewX(",null,n)-2,x:io(f,p)}):p&&g.push(a(g)+"skewX("+p+n)}function u(f,p,g,x,y,v){if(f!==g||p!==x){var C=y.push(a(y)+"scale(",null,",",null,")");v.push({i:C-4,x:io(f,g)},{i:C-2,x:io(p,x)})}else(g!==1||x!==1)&&y.push(a(y)+"scale("+g+","+x+")")}return function(f,p){var g=[],x=[];return f=i(f),p=i(p),o(f.translateX,f.translateY,p.translateX,p.translateY,g,x),c(f.rotate,p.rotate,g,x),h(f.skewX,p.skewX,g,x),u(f.scaleX,f.scaleY,p.scaleX,p.scaleY,g,x),f=p=null,function(y){for(var v=-1,C=x.length,_;++v<C;)g[(_=x[v]).i]=_.x(y);return g.join("")}}}var A$=GA(T$,"px, ","px)","deg)"),E$=GA(B$,", ",")",")"),M$=1e-12;function wS(i){return((i=Math.exp(i))+1/i)/2}function L$(i){return((i=Math.exp(i))-1/i)/2}function N$(i){return((i=Math.exp(2*i))-1)/(i+1)}const O$=(function i(e,r,n){function a(o,c){var h=o[0],u=o[1],f=o[2],p=c[0],g=c[1],x=c[2],y=p-h,v=g-u,C=y*y+v*v,_,w;if(C<M$)w=Math.log(x/f)/e,_=function(M){return[h+M*y,u+M*v,f*Math.exp(e*M*w)]};else{var T=Math.sqrt(C),A=(x*x-f*f+n*C)/(2*f*r*T),E=(x*x-f*f-n*C)/(2*x*r*T),N=Math.log(Math.sqrt(A*A+1)-A),R=Math.log(Math.sqrt(E*E+1)-E);w=(R-N)/e,_=function(M){var O=M*w,Y=wS(N),$=f/(r*T)*(Y*N$(e*O+N)-L$(N));return[h+$*y,u+$*v,f*Y/wS(e*O+N)]}}return _.duration=w*1e3*e/Math.SQRT2,_}return a.rho=function(o){var c=Math.max(.001,+o),h=c*c,u=h*h;return i(c,h,u)},a})(Math.SQRT2,2,4);var ih=0,Ou=0,cu=0,VA=1e3,Jp,ju,tg=0,vl=0,Ig=0,of=typeof performance=="object"&&performance.now?performance:Date,XA=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function Ev(){return vl||(XA(j$),vl=of.now()+Ig)}function j$(){vl=0}function eg(){this._call=this._time=this._next=null}eg.prototype=Mv.prototype={constructor:eg,restart:function(i,e,r){if(typeof i!="function")throw new TypeError("callback is not a function");r=(r==null?Ev():+r)+(e==null?0:+e),!this._next&&ju!==this&&(ju?ju._next=this:Jp=this,ju=this),this._call=i,this._time=r,Yx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Yx())}};function Mv(i,e,r){var n=new eg;return n.restart(i,e,r),n}function R$(){Ev(),++ih;for(var i=Jp,e;i;)(e=vl-i._time)>=0&&i._call.call(void 0,e),i=i._next;--ih}function TS(){vl=(tg=of.now())+Ig,ih=Ou=0;try{R$()}finally{ih=0,F$(),vl=0}}function D$(){var i=of.now(),e=i-tg;e>VA&&(Ig-=e,tg=i)}function F$(){for(var i,e=Jp,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),i=e,e=e._next):(r=e._next,e._next=null,e=i?i._next=r:Jp=r);ju=i,Yx(n)}function Yx(i){if(!ih){Ou&&(Ou=clearTimeout(Ou));var e=i-vl;e>24?(i<1/0&&(Ou=setTimeout(TS,i-of.now()-Ig)),cu&&(cu=clearInterval(cu))):(cu||(tg=of.now(),cu=setInterval(D$,VA)),ih=1,XA(TS))}}function BS(i,e,r){var n=new eg;return e=e==null?0:+e,n.restart(a=>{n.stop(),i(a+e)},e,r),n}var $$=Tf("start","end","cancel","interrupt"),z$=[],QA=0,AS=1,Gx=2,Ep=3,ES=4,Vx=5,Mp=6;function Pg(i,e,r,n,a,o){var c=i.__transition;if(!c)i.__transition={};else if(r in c)return;q$(i,r,{name:e,index:n,group:a,on:$$,tween:z$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:QA})}function Lv(i,e){var r=Pn(i,e);if(r.state>QA)throw new Error("too late; already scheduled");return r}function Ta(i,e){var r=Pn(i,e);if(r.state>Ep)throw new Error("too late; already running");return r}function Pn(i,e){var r=i.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function q$(i,e,r){var n=i.__transition,a;n[e]=r,r.timer=Mv(o,0,r.time);function o(f){r.state=AS,r.timer.restart(c,r.delay,r.time),r.delay<=f&&c(f-r.delay)}function c(f){var p,g,x,y;if(r.state!==AS)return u();for(p in n)if(y=n[p],y.name===r.name){if(y.state===Ep)return BS(c);y.state===ES?(y.state=Mp,y.timer.stop(),y.on.call("interrupt",i,i.__data__,y.index,y.group),delete n[p]):+p<e&&(y.state=Mp,y.timer.stop(),y.on.call("cancel",i,i.__data__,y.index,y.group),delete n[p])}if(BS(function(){r.state===Ep&&(r.state=ES,r.timer.restart(h,r.delay,r.time),h(f))}),r.state=Gx,r.on.call("start",i,i.__data__,r.index,r.group),r.state===Gx){for(r.state=Ep,a=new Array(x=r.tween.length),p=0,g=-1;p<x;++p)(y=r.tween[p].value.call(i,i.__data__,r.index,r.group))&&(a[++g]=y);a.length=g+1}}function h(f){for(var p=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(u),r.state=Vx,1),g=-1,x=a.length;++g<x;)a[g].call(i,p);r.state===Vx&&(r.on.call("end",i,i.__data__,r.index,r.group),u())}function u(){r.state=Mp,r.timer.stop(),delete n[e];for(var f in n)return;delete i.__transition}}function Lp(i,e){var r=i.__transition,n,a,o=!0,c;if(r){e=e==null?null:e+"";for(c in r){if((n=r[c]).name!==e){o=!1;continue}a=n.state>Gx&&n.state<Vx,n.state=Mp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete r[c]}o&&delete i.__transition}}function I$(i){return this.each(function(){Lp(this,i)})}function P$(i,e){var r,n;return function(){var a=Ta(this,i),o=a.tween;if(o!==r){n=r=o;for(var c=0,h=n.length;c<h;++c)if(n[c].name===e){n=n.slice(),n.splice(c,1);break}}a.tween=n}}function H$(i,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var o=Ta(this,i),c=o.tween;if(c!==n){a=(n=c).slice();for(var h={name:e,value:r},u=0,f=a.length;u<f;++u)if(a[u].name===e){a[u]=h;break}u===f&&a.push(h)}o.tween=a}}function U$(i,e){var r=this._id;if(i+="",arguments.length<2){for(var n=Pn(this.node(),r).tween,a=0,o=n.length,c;a<o;++a)if((c=n[a]).name===i)return c.value;return null}return this.each((e==null?P$:H$)(r,i,e))}function Nv(i,e,r){var n=i._id;return i.each(function(){var a=Ta(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return Pn(a,n).value[e]}}function ZA(i,e){var r;return(typeof e=="number"?io:e instanceof sf?_S:(r=sf(e))?(e=r,_S):w$)(i,e)}function W$(i){return function(){this.removeAttribute(i)}}function Y$(i){return function(){this.removeAttributeNS(i.space,i.local)}}function G$(i,e,r){var n,a=r+"",o;return function(){var c=this.getAttribute(i);return c===a?null:c===n?o:o=e(n=c,r)}}function V$(i,e,r){var n,a=r+"",o;return function(){var c=this.getAttributeNS(i.space,i.local);return c===a?null:c===n?o:o=e(n=c,r)}}function X$(i,e,r){var n,a,o;return function(){var c,h=r(this),u;return h==null?void this.removeAttribute(i):(c=this.getAttribute(i),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Q$(i,e,r){var n,a,o;return function(){var c,h=r(this),u;return h==null?void this.removeAttributeNS(i.space,i.local):(c=this.getAttributeNS(i.space,i.local),u=h+"",c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h)))}}function Z$(i,e){var r=qg(i),n=r==="transform"?E$:ZA;return this.attrTween(i,typeof e=="function"?(r.local?Q$:X$)(r,n,Nv(this,"attr."+i,e)):e==null?(r.local?Y$:W$)(r):(r.local?V$:G$)(r,n,e))}function K$(i,e){return function(r){this.setAttribute(i,e.call(this,r))}}function J$(i,e){return function(r){this.setAttributeNS(i.space,i.local,e.call(this,r))}}function tz(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&J$(i,o)),r}return a._value=e,a}function ez(i,e){var r,n;function a(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&K$(i,o)),r}return a._value=e,a}function iz(i,e){var r="attr."+i;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=qg(i);return this.tween(r,(n.local?tz:ez)(n,e))}function rz(i,e){return function(){Lv(this,i).delay=+e.apply(this,arguments)}}function nz(i,e){return e=+e,function(){Lv(this,i).delay=e}}function az(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?rz:nz)(e,i)):Pn(this.node(),e).delay}function sz(i,e){return function(){Ta(this,i).duration=+e.apply(this,arguments)}}function oz(i,e){return e=+e,function(){Ta(this,i).duration=e}}function lz(i){var e=this._id;return arguments.length?this.each((typeof i=="function"?sz:oz)(e,i)):Pn(this.node(),e).duration}function cz(i,e){if(typeof e!="function")throw new Error;return function(){Ta(this,i).ease=e}}function hz(i){var e=this._id;return arguments.length?this.each(cz(e,i)):Pn(this.node(),e).ease}function uz(i,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Ta(this,i).ease=r}}function fz(i){if(typeof i!="function")throw new Error;return this.each(uz(this._id,i))}function dz(i){typeof i!="function"&&(i=MA(i));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var o=e[a],c=o.length,h=n[a]=[],u,f=0;f<c;++f)(u=o[f])&&i.call(u,u.__data__,f,o)&&h.push(u);return new us(n,this._parents,this._name,this._id)}function pz(i){if(i._id!==this._id)throw new Error;for(var e=this._groups,r=i._groups,n=e.length,a=r.length,o=Math.min(n,a),c=new Array(n),h=0;h<o;++h)for(var u=e[h],f=r[h],p=u.length,g=c[h]=new Array(p),x,y=0;y<p;++y)(x=u[y]||f[y])&&(g[y]=x);for(;h<n;++h)c[h]=e[h];return new us(c,this._parents,this._name,this._id)}function gz(i){return(i+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function mz(i,e,r){var n,a,o=gz(e)?Lv:Ta;return function(){var c=o(this,i),h=c.on;h!==n&&(a=(n=h).copy()).on(e,r),c.on=a}}function yz(i,e){var r=this._id;return arguments.length<2?Pn(this.node(),r).on.on(i):this.each(mz(r,i,e))}function xz(i){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==i)return;e&&e.removeChild(this)}}function bz(){return this.on("end.remove",xz(this._id))}function vz(i){var e=this._name,r=this._id;typeof i!="function"&&(i=wv(i));for(var n=this._groups,a=n.length,o=new Array(a),c=0;c<a;++c)for(var h=n[c],u=h.length,f=o[c]=new Array(u),p,g,x=0;x<u;++x)(p=h[x])&&(g=i.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),f[x]=g,Pg(f[x],e,r,x,f,Pn(p,r)));return new us(o,this._parents,e,r)}function Cz(i){var e=this._name,r=this._id;typeof i!="function"&&(i=EA(i));for(var n=this._groups,a=n.length,o=[],c=[],h=0;h<a;++h)for(var u=n[h],f=u.length,p,g=0;g<f;++g)if(p=u[g]){for(var x=i.call(p,p.__data__,g,u),y,v=Pn(p,r),C=0,_=x.length;C<_;++C)(y=x[C])&&Pg(y,e,r,C,x,v);o.push(x),c.push(p)}return new us(o,c,e,r)}var kz=Bf.prototype.constructor;function _z(){return new kz(this._groups,this._parents)}function Sz(i,e){var r,n,a;return function(){var o=eh(this,i),c=(this.style.removeProperty(i),eh(this,i));return o===c?null:o===r&&c===n?a:a=e(r=o,n=c)}}function KA(i){return function(){this.style.removeProperty(i)}}function wz(i,e,r){var n,a=r+"",o;return function(){var c=eh(this,i);return c===a?null:c===n?o:o=e(n=c,r)}}function Tz(i,e,r){var n,a,o;return function(){var c=eh(this,i),h=r(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(i),eh(this,i))),c===u?null:c===n&&u===a?o:(a=u,o=e(n=c,h))}}function Bz(i,e){var r,n,a,o="style."+e,c="end."+o,h;return function(){var u=Ta(this,i),f=u.on,p=u.value[o]==null?h||(h=KA(e)):void 0;(f!==r||a!==p)&&(n=(r=f).copy()).on(c,a=p),u.on=n}}function Az(i,e,r){var n=(i+="")=="transform"?A$:ZA;return e==null?this.styleTween(i,Sz(i,n)).on("end.style."+i,KA(i)):typeof e=="function"?this.styleTween(i,Tz(i,n,Nv(this,"style."+i,e))).each(Bz(this._id,i)):this.styleTween(i,wz(i,n,e),r).on("end.style."+i,null)}function Ez(i,e,r){return function(n){this.style.setProperty(i,e.call(this,n),r)}}function Mz(i,e,r){var n,a;function o(){var c=e.apply(this,arguments);return c!==a&&(n=(a=c)&&Ez(i,c,r)),n}return o._value=e,o}function Lz(i,e,r){var n="style."+(i+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,Mz(i,e,r??""))}function Nz(i){return function(){this.textContent=i}}function Oz(i){return function(){var e=i(this);this.textContent=e??""}}function jz(i){return this.tween("text",typeof i=="function"?Oz(Nv(this,"text",i)):Nz(i==null?"":i+""))}function Rz(i){return function(e){this.textContent=i.call(this,e)}}function Dz(i){var e,r;function n(){var a=i.apply(this,arguments);return a!==r&&(e=(r=a)&&Rz(a)),e}return n._value=i,n}function Fz(i){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(i==null)return this.tween(e,null);if(typeof i!="function")throw new Error;return this.tween(e,Dz(i))}function $z(){for(var i=this._name,e=this._id,r=JA(),n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,f=0;f<h;++f)if(u=c[f]){var p=Pn(u,e);Pg(u,i,r,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new us(n,this._parents,i,r)}function zz(){var i,e,r=this,n=r._id,a=r.size();return new Promise(function(o,c){var h={value:c},u={value:function(){--a===0&&o()}};r.each(function(){var f=Ta(this,n),p=f.on;p!==i&&(e=(i=p).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(u)),f.on=e}),a===0&&o()})}var qz=0;function us(i,e,r,n){this._groups=i,this._parents=e,this._name=r,this._id=n}function JA(){return++qz}var Ga=Bf.prototype;us.prototype={constructor:us,select:vz,selectAll:Cz,selectChild:Ga.selectChild,selectChildren:Ga.selectChildren,filter:dz,merge:pz,selection:_z,transition:$z,call:Ga.call,nodes:Ga.nodes,node:Ga.node,size:Ga.size,empty:Ga.empty,each:Ga.each,on:yz,attr:Z$,attrTween:iz,style:Az,styleTween:Lz,text:jz,textTween:Fz,remove:bz,tween:U$,delay:az,duration:lz,ease:hz,easeVarying:fz,end:zz,[Symbol.iterator]:Ga[Symbol.iterator]};function Iz(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var Pz={time:null,delay:0,duration:250,ease:Iz};function Hz(i,e){for(var r;!(r=i.__transition)||!(r=r[e]);)if(!(i=i.parentNode))throw new Error(`transition ${e} not found`);return r}function Uz(i){var e,r;i instanceof us?(e=i._id,i=i._name):(e=JA(),(r=Pz).time=Ev(),i=i==null?null:i+"");for(var n=this._groups,a=n.length,o=0;o<a;++o)for(var c=n[o],h=c.length,u,f=0;f<h;++f)(u=c[f])&&Pg(u,i,e,f,c,r||Hz(u,e));return new us(n,this._parents,i,e)}Bf.prototype.interrupt=I$;Bf.prototype.transition=Uz;const Xx=Math.PI,Qx=2*Xx,Vo=1e-6,Wz=Qx-Vo;function tE(i){this._+=i[0];for(let e=1,r=i.length;e<r;++e)this._+=arguments[e]+i[e]}function Yz(i){let e=Math.floor(i);if(!(e>=0))throw new Error(`invalid digits: ${i}`);if(e>15)return tE;const r=10**e;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class Gz{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?tE:Yz(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,o,c){this._append`C${+e},${+r},${+n},${+a},${this._x1=+o},${this._y1=+c}`}arcTo(e,r,n,a,o){if(e=+e,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,h=this._y1,u=n-e,f=a-r,p=c-e,g=h-r,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(x>Vo)if(!(Math.abs(g*u-f*p)>Vo)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let y=n-c,v=a-h,C=u*u+f*f,_=y*y+v*v,w=Math.sqrt(C),T=Math.sqrt(x),A=o*Math.tan((Xx-Math.acos((C+x-_)/(2*w*T)))/2),E=A/T,N=A/w;Math.abs(E-1)>Vo&&this._append`L${e+E*p},${r+E*g}`,this._append`A${o},${o},0,0,${+(g*y>p*v)},${this._x1=e+N*u},${this._y1=r+N*f}`}}arc(e,r,n,a,o,c){if(e=+e,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let h=n*Math.cos(a),u=n*Math.sin(a),f=e+h,p=r+u,g=1^c,x=c?a-o:o-a;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Vo||Math.abs(this._y1-p)>Vo)&&this._append`L${f},${p}`,n&&(x<0&&(x=x%Qx+Qx),x>Wz?this._append`A${n},${n},0,1,${g},${e-h},${r-u}A${n},${n},0,1,${g},${this._x1=f},${this._y1=p}`:x>Vo&&this._append`A${n},${n},0,${+(x>=Xx)},${g},${this._x1=e+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function Vz(i){const e=+this._x.call(null,i),r=+this._y.call(null,i);return eE(this.cover(e,r),e,r,i)}function eE(i,e,r,n){if(isNaN(e)||isNaN(r))return i;var a,o=i._root,c={data:n},h=i._x0,u=i._y0,f=i._x1,p=i._y1,g,x,y,v,C,_,w,T;if(!o)return i._root=c,i;for(;o.length;)if((C=e>=(g=(h+f)/2))?h=g:f=g,(_=r>=(x=(u+p)/2))?u=x:p=x,a=o,!(o=o[w=_<<1|C]))return a[w]=c,i;if(y=+i._x.call(null,o.data),v=+i._y.call(null,o.data),e===y&&r===v)return c.next=o,a?a[w]=c:i._root=c,i;do a=a?a[w]=new Array(4):i._root=new Array(4),(C=e>=(g=(h+f)/2))?h=g:f=g,(_=r>=(x=(u+p)/2))?u=x:p=x;while((w=_<<1|C)===(T=(v>=x)<<1|y>=g));return a[T]=o,a[w]=c,i}function Xz(i){var e,r,n=i.length,a,o,c=new Array(n),h=new Array(n),u=1/0,f=1/0,p=-1/0,g=-1/0;for(r=0;r<n;++r)isNaN(a=+this._x.call(null,e=i[r]))||isNaN(o=+this._y.call(null,e))||(c[r]=a,h[r]=o,a<u&&(u=a),a>p&&(p=a),o<f&&(f=o),o>g&&(g=o));if(u>p||f>g)return this;for(this.cover(u,f).cover(p,g),r=0;r<n;++r)eE(this,c[r],h[r],i[r]);return this}function Qz(i,e){if(isNaN(i=+i)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(i))+1,o=(n=Math.floor(e))+1;else{for(var c=a-r||1,h=this._root,u,f;r>i||i>=a||n>e||e>=o;)switch(f=(e<n)<<1|i<r,u=new Array(4),u[f]=h,h=u,c*=2,f){case 0:a=r+c,o=n+c;break;case 1:r=a-c,o=n+c;break;case 2:a=r+c,n=o-c;break;case 3:r=a-c,n=o-c;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=n,this._x1=a,this._y1=o,this}function Zz(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function Kz(i){return arguments.length?this.cover(+i[0][0],+i[0][1]).cover(+i[1][0],+i[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function gr(i,e,r,n,a){this.node=i,this.x0=e,this.y0=r,this.x1=n,this.y1=a}function Jz(i,e,r){var n,a=this._x0,o=this._y0,c,h,u,f,p=this._x1,g=this._y1,x=[],y=this._root,v,C;for(y&&x.push(new gr(y,a,o,p,g)),r==null?r=1/0:(a=i-r,o=e-r,p=i+r,g=e+r,r*=r);v=x.pop();)if(!(!(y=v.node)||(c=v.x0)>p||(h=v.y0)>g||(u=v.x1)<a||(f=v.y1)<o))if(y.length){var _=(c+u)/2,w=(h+f)/2;x.push(new gr(y[3],_,w,u,f),new gr(y[2],c,w,_,f),new gr(y[1],_,h,u,w),new gr(y[0],c,h,_,w)),(C=(e>=w)<<1|i>=_)&&(v=x[x.length-1],x[x.length-1]=x[x.length-1-C],x[x.length-1-C]=v)}else{var T=i-+this._x.call(null,y.data),A=e-+this._y.call(null,y.data),E=T*T+A*A;if(E<r){var N=Math.sqrt(r=E);a=i-N,o=e-N,p=i+N,g=e+N,n=y.data}}return n}function t7(i){if(isNaN(p=+this._x.call(null,i))||isNaN(g=+this._y.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._x1,f=this._y1,p,g,x,y,v,C,_,w;if(!r)return this;if(r.length)for(;;){if((v=p>=(x=(c+u)/2))?c=x:u=x,(C=g>=(y=(h+f)/2))?h=y:f=y,e=r,!(r=r[_=C<<1|v]))return this;if(!r.length)break;(e[_+1&3]||e[_+2&3]||e[_+3&3])&&(n=e,w=_)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[_]=o:delete e[_],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[w]=r:this._root=r),this):(this._root=o,this)}function e7(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function i7(){return this._root}function r7(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function n7(i){var e=[],r,n=this._root,a,o,c,h,u;for(n&&e.push(new gr(n,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.y0,h=r.x1,u=r.y1)&&n.length){var f=(o+h)/2,p=(c+u)/2;(a=n[3])&&e.push(new gr(a,f,p,h,u)),(a=n[2])&&e.push(new gr(a,o,p,f,u)),(a=n[1])&&e.push(new gr(a,f,c,h,p)),(a=n[0])&&e.push(new gr(a,o,c,f,p))}return this}function a7(i){var e=[],r=[],n;for(this._root&&e.push(new gr(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.x1,f=n.y1,p=(c+u)/2,g=(h+f)/2;(o=a[0])&&e.push(new gr(o,c,h,p,g)),(o=a[1])&&e.push(new gr(o,p,h,u,g)),(o=a[2])&&e.push(new gr(o,c,g,p,f)),(o=a[3])&&e.push(new gr(o,p,g,u,f))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.y0,n.x1,n.y1);return this}function s7(i){return i[0]}function o7(i){return arguments.length?(this._x=i,this):this._x}function l7(i){return i[1]}function c7(i){return arguments.length?(this._y=i,this):this._y}function Ov(i,e,r){var n=new jv(e??s7,r??l7,NaN,NaN,NaN,NaN);return i==null?n:n.addAll(i)}function jv(i,e,r,n,a,o){this._x=i,this._y=e,this._x0=r,this._y0=n,this._x1=a,this._y1=o,this._root=void 0}function MS(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Cr=Ov.prototype=jv.prototype;Cr.copy=function(){var i=new jv(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=MS(e),i;for(r=[{source:e,target:i._root=new Array(4)}];e=r.pop();)for(var a=0;a<4;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(4)}):e.target[a]=MS(n));return i};Cr.add=Vz;Cr.addAll=Xz;Cr.cover=Qz;Cr.data=Zz;Cr.extent=Kz;Cr.find=Jz;Cr.remove=t7;Cr.removeAll=e7;Cr.root=i7;Cr.size=r7;Cr.visit=n7;Cr.visitAfter=a7;Cr.x=o7;Cr.y=c7;function h7(i,e){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(e).domain(i);break}return this}const LS=Symbol("implicit");function iE(){var i=new cS,e=[],r=[],n=LS;function a(o){let c=i.get(o);if(c===void 0){if(n!==LS)return n;i.set(o,c=e.push(o)-1)}return r[c%r.length]}return a.domain=function(o){if(!arguments.length)return e.slice();e=[],i=new cS;for(const c of o)i.has(c)||i.set(c,e.push(c)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return iE(e,r).unknown(n)},h7.apply(a,arguments),a}function u7(i){for(var e=i.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+i.slice(n*6,++n*6);return r}const f7=u7("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function dc(i){return function(){return i}}const ait=Math.abs,sit=Math.atan2,oit=Math.cos,lit=Math.max,cit=Math.min,hit=Math.sin,uit=Math.sqrt,NS=1e-12,Rv=Math.PI,OS=Rv/2,fit=2*Rv;function dit(i){return i>1?0:i<-1?Rv:Math.acos(i)}function pit(i){return i>=1?OS:i<=-1?-OS:Math.asin(i)}function d7(i){let e=3;return i.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return i},()=>new Gz(e)}function p7(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function rE(i){this._context=i}rE.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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;default:this._context.lineTo(i,e);break}}};function Yu(i){return new rE(i)}function g7(i){return i[0]}function m7(i){return i[1]}function y7(i,e){var r=dc(!0),n=null,a=Yu,o=null,c=d7(h);i=typeof i=="function"?i:i===void 0?g7:dc(i),e=typeof e=="function"?e:e===void 0?m7:dc(e);function h(u){var f,p=(u=p7(u)).length,g,x=!1,y;for(n==null&&(o=a(y=c())),f=0;f<=p;++f)!(f<p&&r(g=u[f],f,u))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+i(g,f,u),+e(g,f,u));if(y)return o=null,y+""||null}return h.x=function(u){return arguments.length?(i=typeof u=="function"?u:dc(+u),h):i},h.y=function(u){return arguments.length?(e=typeof u=="function"?u:dc(+u),h):e},h.defined=function(u){return arguments.length?(r=typeof u=="function"?u:dc(!!u),h):r},h.curve=function(u){return arguments.length?(a=u,n!=null&&(o=a(n)),h):a},h.context=function(u){return arguments.length?(u==null?n=o=null:o=a(n=u),h):n},h}class nE{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function aE(i){return new nE(i,!0)}function sE(i){return new nE(i,!1)}function vo(){}function ig(i,e,r){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+e)/6,(i._y0+4*i._y1+r)/6)}function Hg(i){this._context=i}Hg.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:ig(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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);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:ig(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function Zx(i){return new Hg(i)}function oE(i){this._context=i}oE.prototype={areaStart:vo,areaEnd:vo,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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x2=i,this._y2=e;break;case 1:this._point=2,this._x3=i,this._y3=e;break;case 2:this._point=3,this._x4=i,this._y4=e,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+e)/6);break;default:ig(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function x7(i){return new oE(i)}function lE(i){this._context=i}lE.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(i,e){switch(i=+i,e=+e,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+i)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ig(this,i,e);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e}};function b7(i){return new lE(i)}function cE(i,e){this._basis=new Hg(i),this._beta=e}cE.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var i=this._x,e=this._y,r=i.length-1;if(r>0)for(var n=i[0],a=e[0],o=i[r]-n,c=e[r]-a,h=-1,u;++h<=r;)u=h/r,this._basis.point(this._beta*i[h]+(1-this._beta)*(n+u*o),this._beta*e[h]+(1-this._beta)*(a+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(i,e){this._x.push(+i),this._y.push(+e)}};const v7=(function i(e){function r(n){return e===1?new Hg(n):new cE(n,e)}return r.beta=function(n){return i(+n)},r})(.85);function rg(i,e,r){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-e),i._y2+i._k*(i._y1-r),i._x2,i._y2)}function Dv(i,e){this._context=i,this._k=(1-e)/6}Dv.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:rg(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2,this._x1=i,this._y1=e;break;case 2:this._point=3;default:rg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const hE=(function i(e){function r(n){return new Dv(n,e)}return r.tension=function(n){return i(+n)},r})(0);function Fv(i,e){this._context=i,this._k=(1-e)/6}Fv.prototype={areaStart:vo,areaEnd:vo,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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:rg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const C7=(function i(e){function r(n){return new Fv(n,e)}return r.tension=function(n){return i(+n)},r})(0);function $v(i,e){this._context=i,this._k=(1-e)/6}$v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rg(this,i,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const k7=(function i(e){function r(n){return new $v(n,e)}return r.tension=function(n){return i(+n)},r})(0);function zv(i,e,r){var n=i._x1,a=i._y1,o=i._x2,c=i._y2;if(i._l01_a>NS){var h=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,u=3*i._l01_a*(i._l01_a+i._l12_a);n=(n*h-i._x0*i._l12_2a+i._x2*i._l01_2a)/u,a=(a*h-i._y0*i._l12_2a+i._y2*i._l01_2a)/u}if(i._l23_a>NS){var f=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,p=3*i._l23_a*(i._l23_a+i._l12_a);o=(o*f+i._x1*i._l23_2a-e*i._l12_2a)/p,c=(c*f+i._y1*i._l23_2a-r*i._l12_2a)/p}i._context.bezierCurveTo(n,a,o,c,i._x2,i._y2)}function uE(i,e){this._context=i,this._alpha=e}uE.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(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3;default:zv(this,i,e);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=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fE=(function i(e){function r(n){return e?new uE(n,e):new Dv(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function dE(i,e){this._context=i,this._alpha=e}dE.prototype={areaStart:vo,areaEnd:vo,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(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=e);break;case 2:this._point=3,this._x5=i,this._y5=e;break;default:zv(this,i,e);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=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _7=(function i(e){function r(n){return e?new dE(n,e):new Fv(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function pE(i,e){this._context=i,this._alpha=e}pE.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(i,e){if(i=+i,e=+e,this._point){var r=this._x2-i,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zv(this,i,e);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=i,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const S7=(function i(e){function r(n){return e?new pE(n,e):new $v(n,0)}return r.alpha=function(n){return i(+n)},r})(.5);function gE(i){this._context=i}gE.prototype={areaStart:vo,areaEnd:vo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,e){i=+i,e=+e,this._point?this._context.lineTo(i,e):(this._point=1,this._context.moveTo(i,e))}};function w7(i){return new gE(i)}function jS(i){return i<0?-1:1}function RS(i,e,r){var n=i._x1-i._x0,a=e-i._x1,o=(i._y1-i._y0)/(n||a<0&&-0),c=(r-i._y1)/(a||n<0&&-0),h=(o*a+c*n)/(n+a);return(jS(o)+jS(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(h))||0}function DS(i,e){var r=i._x1-i._x0;return r?(3*(i._y1-i._y0)/r-e)/2:e}function M0(i,e,r){var n=i._x0,a=i._y0,o=i._x1,c=i._y1,h=(o-n)/3;i._context.bezierCurveTo(n+h,a+h*e,o-h,c-h*r,o,c)}function ng(i){this._context=i}ng.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:M0(this,this._t0,DS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,e){var r=NaN;if(i=+i,e=+e,!(i===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;break;case 2:this._point=3,M0(this,DS(this,r=RS(this,i,e)),r);break;default:M0(this,this._t0,r=RS(this,i,e));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=e,this._t0=r}}};function mE(i){this._context=new yE(i)}(mE.prototype=Object.create(ng.prototype)).point=function(i,e){ng.prototype.point.call(this,e,i)};function yE(i){this._context=i}yE.prototype={moveTo:function(i,e){this._context.moveTo(e,i)},closePath:function(){this._context.closePath()},lineTo:function(i,e){this._context.lineTo(e,i)},bezierCurveTo:function(i,e,r,n,a,o){this._context.bezierCurveTo(e,i,n,r,o,a)}};function xE(i){return new ng(i)}function bE(i){return new mE(i)}function vE(i){this._context=i}vE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var i=this._x,e=this._y,r=i.length;if(r)if(this._line?this._context.lineTo(i[0],e[0]):this._context.moveTo(i[0],e[0]),r===2)this._context.lineTo(i[1],e[1]);else for(var n=FS(i),a=FS(e),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],i[c],e[c]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(i,e){this._x.push(+i),this._y.push(+e)}};function FS(i){var e,r=i.length-1,n,a=new Array(r),o=new Array(r),c=new Array(r);for(a[0]=0,o[0]=2,c[0]=i[0]+2*i[1],e=1;e<r-1;++e)a[e]=1,o[e]=4,c[e]=4*i[e]+2*i[e+1];for(a[r-1]=2,o[r-1]=7,c[r-1]=8*i[r-1]+i[r],e=1;e<r;++e)n=a[e]/o[e-1],o[e]-=n,c[e]-=n*c[e-1];for(a[r-1]=c[r-1]/o[r-1],e=r-2;e>=0;--e)a[e]=(c[e]-a[e+1])/o[e];for(o[r-1]=(i[r]+a[r-1])/2,e=0;e<r-1;++e)o[e]=2*i[e+1]-a[e+1];return[a,o]}function CE(i){return new vE(i)}function Ug(i,e){this._context=i,this._t=e}Ug.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(i,e){switch(i=+i,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(i,e);else{var r=this._x*(1-this._t)+i*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=i,this._y=e}};function kE(i){return new Ug(i,.5)}function _E(i){return new Ug(i,0)}function SE(i){return new Ug(i,1)}const np=i=>()=>i;function T7(i,{sourceEvent:e,target:r,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:i,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function ss(i,e,r){this.k=i,this.x=e,this.y=r}ss.prototype={constructor:ss,scale:function(i){return i===1?this:new ss(this.k*i,this.x,this.y)},translate:function(i,e){return i===0&e===0?this:new ss(this.k,this.x+this.k*i,this.y+this.k*e)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var qv=new ss(1,0,0);fa.prototype=ss.prototype;function fa(i){for(;!i.__zoom;)if(!(i=i.parentNode))return qv;return i.__zoom}function L0(i){i.stopImmediatePropagation()}function hu(i){i.preventDefault(),i.stopImmediatePropagation()}function B7(i){return(!i.ctrlKey||i.type==="wheel")&&!i.button}function A7(){var i=this;return i instanceof SVGElement?(i=i.ownerSVGElement||i,i.hasAttribute("viewBox")?(i=i.viewBox.baseVal,[[i.x,i.y],[i.x+i.width,i.y+i.height]]):[[0,0],[i.width.baseVal.value,i.height.baseVal.value]]):[[0,0],[i.clientWidth,i.clientHeight]]}function $S(){return this.__zoom||qv}function E7(i){return-i.deltaY*(i.deltaMode===1?.05:i.deltaMode?1:.002)*(i.ctrlKey?10:1)}function M7(){return navigator.maxTouchPoints||"ontouchstart"in this}function L7(i,e,r){var n=i.invertX(e[0][0])-r[0][0],a=i.invertX(e[1][0])-r[1][0],o=i.invertY(e[0][1])-r[0][1],c=i.invertY(e[1][1])-r[1][1];return i.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c))}function N7(){var i=B7,e=A7,r=L7,n=E7,a=M7,o=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=O$,f=Tf("start","zoom","end"),p,g,x,y=500,v=150,C=0,_=10;function w(F){F.property("__zoom",$S).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",Y).on("dblclick.zoom",$).filter(a).on("touchstart.zoom",q).on("touchmove.zoom",J).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(F,U,j,I){var H=F.selection?F.selection():F;H.property("__zoom",$S),F!==H?N(F,U,j,I):H.interrupt().each(function(){R(this,arguments).event(I).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},w.scaleBy=function(F,U,j,I){w.scaleTo(F,function(){var H=this.__zoom.k,V=typeof U=="function"?U.apply(this,arguments):U;return H*V},j,I)},w.scaleTo=function(F,U,j,I){w.transform(F,function(){var H=e.apply(this,arguments),V=this.__zoom,Z=j==null?E(H):typeof j=="function"?j.apply(this,arguments):j,P=V.invert(Z),K=typeof U=="function"?U.apply(this,arguments):U;return r(A(T(V,K),Z,P),H,c)},j,I)},w.translateBy=function(F,U,j,I){w.transform(F,function(){return r(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof j=="function"?j.apply(this,arguments):j),e.apply(this,arguments),c)},null,I)},w.translateTo=function(F,U,j,I,H){w.transform(F,function(){var V=e.apply(this,arguments),Z=this.__zoom,P=I==null?E(V):typeof I=="function"?I.apply(this,arguments):I;return r(qv.translate(P[0],P[1]).scale(Z.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof j=="function"?-j.apply(this,arguments):-j),V,c)},I,H)};function T(F,U){return U=Math.max(o[0],Math.min(o[1],U)),U===F.k?F:new ss(U,F.x,F.y)}function A(F,U,j){var I=U[0]-j[0]*F.k,H=U[1]-j[1]*F.k;return I===F.x&&H===F.y?F:new ss(F.k,I,H)}function E(F){return[(+F[0][0]+ +F[1][0])/2,(+F[0][1]+ +F[1][1])/2]}function N(F,U,j,I){F.on("start.zoom",function(){R(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(I).end()}).tween("zoom",function(){var H=this,V=arguments,Z=R(H,V).event(I),P=e.apply(H,V),K=j==null?E(P):typeof j=="function"?j.apply(H,V):j,ot=Math.max(P[1][0]-P[0][0],P[1][1]-P[0][1]),st=H.__zoom,bt=typeof U=="function"?U.apply(H,V):U,kt=u(st.invert(K).concat(ot/st.k),bt.invert(K).concat(ot/bt.k));return function(Lt){if(Lt===1)Lt=bt;else{var at=kt(Lt),Ct=ot/at[2];Lt=new ss(Ct,K[0]-at[0]*Ct,K[1]-at[1]*Ct)}Z.zoom(null,Lt)}})}function R(F,U,j){return!j&&F.__zooming||new M(F,U)}function M(F,U){this.that=F,this.args=U,this.active=0,this.sourceEvent=null,this.extent=e.apply(F,U),this.taps=0}M.prototype={event:function(F){return F&&(this.sourceEvent=F),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(F,U){return this.mouse&&F!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&F!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&F!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(F){var U=Xt(this.that).datum();f.call(F,this.that,new T7(F,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:f}),U)}};function O(F,...U){if(!i.apply(this,arguments))return;var j=R(this,U).event(F),I=this.__zoom,H=Math.max(o[0],Math.min(o[1],I.k*Math.pow(2,n.apply(this,arguments)))),V=da(F);if(j.wheel)(j.mouse[0][0]!==V[0]||j.mouse[0][1]!==V[1])&&(j.mouse[1]=I.invert(j.mouse[0]=V)),clearTimeout(j.wheel);else{if(I.k===H)return;j.mouse=[V,I.invert(V)],Lp(this),j.start()}hu(F),j.wheel=setTimeout(Z,v),j.zoom("mouse",r(A(T(I,H),j.mouse[0],j.mouse[1]),j.extent,c));function Z(){j.wheel=null,j.end()}}function Y(F,...U){if(x||!i.apply(this,arguments))return;var j=F.currentTarget,I=R(this,U,!0).event(F),H=Xt(F.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",ot,!0),V=da(F,j),Z=F.clientX,P=F.clientY;qA(F.view),L0(F),I.mouse=[V,this.__zoom.invert(V)],Lp(this),I.start();function K(st){if(hu(st),!I.moved){var bt=st.clientX-Z,kt=st.clientY-P;I.moved=bt*bt+kt*kt>C}I.event(st).zoom("mouse",r(A(I.that.__zoom,I.mouse[0]=da(st,j),I.mouse[1]),I.extent,c))}function ot(st){H.on("mousemove.zoom mouseup.zoom",null),IA(st.view,I.moved),hu(st),I.event(st).end()}}function $(F,...U){if(i.apply(this,arguments)){var j=this.__zoom,I=da(F.changedTouches?F.changedTouches[0]:F,this),H=j.invert(I),V=j.k*(F.shiftKey?.5:2),Z=r(A(T(j,V),I,H),e.apply(this,U),c);hu(F),h>0?Xt(this).transition().duration(h).call(N,Z,I,F):Xt(this).call(w.transform,Z,I,F)}}function q(F,...U){if(i.apply(this,arguments)){var j=F.touches,I=j.length,H=R(this,U,F.changedTouches.length===I).event(F),V,Z,P,K;for(L0(F),Z=0;Z<I;++Z)P=j[Z],K=da(P,this),K=[K,this.__zoom.invert(K),P.identifier],H.touch0?!H.touch1&&H.touch0[2]!==K[2]&&(H.touch1=K,H.taps=0):(H.touch0=K,V=!0,H.taps=1+!!p);p&&(p=clearTimeout(p)),V&&(H.taps<2&&(g=K[0],p=setTimeout(function(){p=null},y)),Lp(this),H.start())}}function J(F,...U){if(this.__zooming){var j=R(this,U).event(F),I=F.changedTouches,H=I.length,V,Z,P,K;for(hu(F),V=0;V<H;++V)Z=I[V],P=da(Z,this),j.touch0&&j.touch0[2]===Z.identifier?j.touch0[0]=P:j.touch1&&j.touch1[2]===Z.identifier&&(j.touch1[0]=P);if(Z=j.that.__zoom,j.touch1){var ot=j.touch0[0],st=j.touch0[1],bt=j.touch1[0],kt=j.touch1[1],Lt=(Lt=bt[0]-ot[0])*Lt+(Lt=bt[1]-ot[1])*Lt,at=(at=kt[0]-st[0])*at+(at=kt[1]-st[1])*at;Z=T(Z,Math.sqrt(Lt/at)),P=[(ot[0]+bt[0])/2,(ot[1]+bt[1])/2],K=[(st[0]+kt[0])/2,(st[1]+kt[1])/2]}else if(j.touch0)P=j.touch0[0],K=j.touch0[1];else return;j.zoom("touch",r(A(Z,P,K),j.extent,c))}}function W(F,...U){if(this.__zooming){var j=R(this,U).event(F),I=F.changedTouches,H=I.length,V,Z;for(L0(F),x&&clearTimeout(x),x=setTimeout(function(){x=null},y),V=0;V<H;++V)Z=I[V],j.touch0&&j.touch0[2]===Z.identifier?delete j.touch0:j.touch1&&j.touch1[2]===Z.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&(Z=da(Z,this),Math.hypot(g[0]-Z[0],g[1]-Z[1])<_)){var P=Xt(this).on("dblclick.zoom");P&&P.apply(this,arguments)}}}return w.wheelDelta=function(F){return arguments.length?(n=typeof F=="function"?F:np(+F),w):n},w.filter=function(F){return arguments.length?(i=typeof F=="function"?F:np(!!F),w):i},w.touchable=function(F){return arguments.length?(a=typeof F=="function"?F:np(!!F),w):a},w.extent=function(F){return arguments.length?(e=typeof F=="function"?F:np([[+F[0][0],+F[0][1]],[+F[1][0],+F[1][1]]]),w):e},w.scaleExtent=function(F){return arguments.length?(o[0]=+F[0],o[1]=+F[1],w):[o[0],o[1]]},w.translateExtent=function(F){return arguments.length?(c[0][0]=+F[0][0],c[1][0]=+F[1][0],c[0][1]=+F[0][1],c[1][1]=+F[1][1],w):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},w.constrain=function(F){return arguments.length?(r=F,w):r},w.duration=function(F){return arguments.length?(h=+F,w):h},w.interpolate=function(F){return arguments.length?(u=F,w):u},w.on=function(){var F=f.on.apply(f,arguments);return F===f?w:F},w.clickDistance=function(F){return arguments.length?(C=(F=+F)*F,w):Math.sqrt(C)},w.tapDistance=function(F){return arguments.length?(_=+F,w):_},w}var O7=B(i=>{var a;const{securityLevel:e}=Ae();let r=Xt("body");if(e==="sandbox"){const c=((a=Xt(`#i${i}`).node())==null?void 0:a.contentDocument)??document;r=Xt(c.body)}return r.select(`#${i}`)},"selectSvgElement");function Iv(i){return typeof i>"u"||i===null}B(Iv,"isNothing");function wE(i){return typeof i=="object"&&i!==null}B(wE,"isObject");function TE(i){return Array.isArray(i)?i:Iv(i)?[]:[i]}B(TE,"toArray");function BE(i,e){var r,n,a,o;if(e)for(o=Object.keys(e),r=0,n=o.length;r<n;r+=1)a=o[r],i[a]=e[a];return i}B(BE,"extend");function AE(i,e){var r="",n;for(n=0;n<e;n+=1)r+=i;return r}B(AE,"repeat");function EE(i){return i===0&&Number.NEGATIVE_INFINITY===1/i}B(EE,"isNegativeZero");var j7=Iv,R7=wE,D7=TE,F7=AE,$7=EE,z7=BE,Mi={isNothing:j7,isObject:R7,toArray:D7,repeat:F7,isNegativeZero:$7,extend:z7};function Pv(i,e){var r="",n=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(r+='in "'+i.mark.name+'" '),r+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!e&&i.mark.snippet&&(r+=`
228
-
229
- `+i.mark.snippet),n+" "+r):n}B(Pv,"formatError");function rh(i,e){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=e,this.message=Pv(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}B(rh,"YAMLException$1");rh.prototype=Object.create(Error.prototype);rh.prototype.constructor=rh;rh.prototype.toString=B(function(e){return this.name+": "+Pv(this,e)},"toString");var Or=rh;function Np(i,e,r,n,a){var o="",c="",h=Math.floor(a/2)-1;return n-e>h&&(o=" ... ",e=n-h+o.length),r-n>h&&(c=" ...",r=n+h-c.length),{str:o+i.slice(e,r).replace(/\t/g,"→")+c,pos:n-e+o.length}}B(Np,"getLine");function Op(i,e){return Mi.repeat(" ",e-i.length)+i}B(Op,"padStart");function ME(i,e){if(e=Object.create(e||null),!i.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],a=[],o,c=-1;o=r.exec(i.buffer);)a.push(o.index),n.push(o.index+o[0].length),i.position<=o.index&&c<0&&(c=n.length-2);c<0&&(c=n.length-1);var h="",u,f,p=Math.min(i.line+e.linesAfter,a.length).toString().length,g=e.maxLength-(e.indent+p+3);for(u=1;u<=e.linesBefore&&!(c-u<0);u++)f=Np(i.buffer,n[c-u],a[c-u],i.position-(n[c]-n[c-u]),g),h=Mi.repeat(" ",e.indent)+Op((i.line-u+1).toString(),p)+" | "+f.str+`
230
- `+h;for(f=Np(i.buffer,n[c],a[c],i.position,g),h+=Mi.repeat(" ",e.indent)+Op((i.line+1).toString(),p)+" | "+f.str+`
231
- `,h+=Mi.repeat("-",e.indent+p+3+f.pos)+`^
232
- `,u=1;u<=e.linesAfter&&!(c+u>=a.length);u++)f=Np(i.buffer,n[c+u],a[c+u],i.position-(n[c]-n[c+u]),g),h+=Mi.repeat(" ",e.indent)+Op((i.line+u+1).toString(),p)+" | "+f.str+`
233
- `;return h.replace(/\n$/,"")}B(ME,"makeSnippet");var q7=ME,I7=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],P7=["scalar","sequence","mapping"];function LE(i){var e={};return i!==null&&Object.keys(i).forEach(function(r){i[r].forEach(function(n){e[String(n)]=r})}),e}B(LE,"compileStyleAliases");function NE(i,e){if(e=e||{},Object.keys(e).forEach(function(r){if(I7.indexOf(r)===-1)throw new Or('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=e,this.tag=i,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=LE(e.styleAliases||null),P7.indexOf(this.kind)===-1)throw new Or('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}B(NE,"Type$1");var ar=NE;function Kx(i,e){var r=[];return i[e].forEach(function(n){var a=r.length;r.forEach(function(o,c){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(a=c)}),r[a]=n}),r}B(Kx,"compileList");function OE(){var i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(a){a.multi?(i.multi[a.kind].push(a),i.multi.fallback.push(a)):i[a.kind][a.tag]=i.fallback[a.tag]=a}for(B(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return i}B(OE,"compileMap");function ag(i){return this.extend(i)}B(ag,"Schema$1");ag.prototype.extend=B(function(e){var r=[],n=[];if(e instanceof ar)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Or("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof ar))throw new Or("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Or("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Or("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof ar))throw new Or("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ag.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=Kx(a,"implicit"),a.compiledExplicit=Kx(a,"explicit"),a.compiledTypeMap=OE(a.compiledImplicit,a.compiledExplicit),a},"extend");var H7=ag,U7=new ar("tag:yaml.org,2002:str",{kind:"scalar",construct:B(function(i){return i!==null?i:""},"construct")}),W7=new ar("tag:yaml.org,2002:seq",{kind:"sequence",construct:B(function(i){return i!==null?i:[]},"construct")}),Y7=new ar("tag:yaml.org,2002:map",{kind:"mapping",construct:B(function(i){return i!==null?i:{}},"construct")}),G7=new H7({explicit:[U7,W7,Y7]});function jE(i){if(i===null)return!0;var e=i.length;return e===1&&i==="~"||e===4&&(i==="null"||i==="Null"||i==="NULL")}B(jE,"resolveYamlNull");function RE(){return null}B(RE,"constructYamlNull");function DE(i){return i===null}B(DE,"isNull");var V7=new ar("tag:yaml.org,2002:null",{kind:"scalar",resolve:jE,construct:RE,predicate:DE,represent:{canonical:B(function(){return"~"},"canonical"),lowercase:B(function(){return"null"},"lowercase"),uppercase:B(function(){return"NULL"},"uppercase"),camelcase:B(function(){return"Null"},"camelcase"),empty:B(function(){return""},"empty")},defaultStyle:"lowercase"});function FE(i){if(i===null)return!1;var e=i.length;return e===4&&(i==="true"||i==="True"||i==="TRUE")||e===5&&(i==="false"||i==="False"||i==="FALSE")}B(FE,"resolveYamlBoolean");function $E(i){return i==="true"||i==="True"||i==="TRUE"}B($E,"constructYamlBoolean");function zE(i){return Object.prototype.toString.call(i)==="[object Boolean]"}B(zE,"isBoolean");var X7=new ar("tag:yaml.org,2002:bool",{kind:"scalar",resolve:FE,construct:$E,predicate:zE,represent:{lowercase:B(function(i){return i?"true":"false"},"lowercase"),uppercase:B(function(i){return i?"TRUE":"FALSE"},"uppercase"),camelcase:B(function(i){return i?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function qE(i){return 48<=i&&i<=57||65<=i&&i<=70||97<=i&&i<=102}B(qE,"isHexCode");function IE(i){return 48<=i&&i<=55}B(IE,"isOctCode");function PE(i){return 48<=i&&i<=57}B(PE,"isDecCode");function HE(i){if(i===null)return!1;var e=i.length,r=0,n=!1,a;if(!e)return!1;if(a=i[r],(a==="-"||a==="+")&&(a=i[++r]),a==="0"){if(r+1===e)return!0;if(a=i[++r],a==="b"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!qE(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=i[r],a!=="_"){if(!IE(i.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=i[r],a!=="_"){if(!PE(i.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}B(HE,"resolveYamlInteger");function UE(i){var e=i,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}B(UE,"constructYamlInteger");function WE(i){return Object.prototype.toString.call(i)==="[object Number]"&&i%1===0&&!Mi.isNegativeZero(i)}B(WE,"isInteger");var Q7=new ar("tag:yaml.org,2002:int",{kind:"scalar",resolve:HE,construct:UE,predicate:WE,represent:{binary:B(function(i){return i>=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},"binary"),octal:B(function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},"octal"),decimal:B(function(i){return i.toString(10)},"decimal"),hexadecimal:B(function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Z7=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function YE(i){return!(i===null||!Z7.test(i)||i[i.length-1]==="_")}B(YE,"resolveYamlFloat");function GE(i){var e,r;return e=i.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}B(GE,"constructYamlFloat");var K7=/^[-+]?[0-9]+e/;function VE(i,e){var r;if(isNaN(i))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===i)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===i)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Mi.isNegativeZero(i))return"-0.0";return r=i.toString(10),K7.test(r)?r.replace("e",".e"):r}B(VE,"representYamlFloat");function XE(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||Mi.isNegativeZero(i))}B(XE,"isFloat");var J7=new ar("tag:yaml.org,2002:float",{kind:"scalar",resolve:YE,construct:GE,predicate:XE,represent:VE,defaultStyle:"lowercase"}),QE=G7.extend({implicit:[V7,X7,Q7,J7]}),tq=QE,ZE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),KE=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 JE(i){return i===null?!1:ZE.exec(i)!==null||KE.exec(i)!==null}B(JE,"resolveYamlTimestamp");function t3(i){var e,r,n,a,o,c,h,u=0,f=null,p,g,x;if(e=ZE.exec(i),e===null&&(e=KE.exec(i)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,n,a));if(o=+e[4],c=+e[5],h=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(p=+e[10],g=+(e[11]||0),f=(p*60+g)*6e4,e[9]==="-"&&(f=-f)),x=new Date(Date.UTC(r,n,a,o,c,h,u)),f&&x.setTime(x.getTime()-f),x}B(t3,"constructYamlTimestamp");function e3(i){return i.toISOString()}B(e3,"representYamlTimestamp");var eq=new ar("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:JE,construct:t3,instanceOf:Date,represent:e3});function i3(i){return i==="<<"||i===null}B(i3,"resolveYamlMerge");var iq=new ar("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i3}),Hv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
234
- \r`;function r3(i){if(i===null)return!1;var e,r,n=0,a=i.length,o=Hv;for(r=0;r<a;r++)if(e=o.indexOf(i.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}B(r3,"resolveYamlBinary");function n3(i){var e,r,n=i.replace(/[\r\n=]/g,""),a=n.length,o=Hv,c=0,h=[];for(e=0;e<a;e++)e%4===0&&e&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|o.indexOf(n.charAt(e));return r=a%4*6,r===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):r===18?(h.push(c>>10&255),h.push(c>>2&255)):r===12&&h.push(c>>4&255),new Uint8Array(h)}B(n3,"constructYamlBinary");function a3(i){var e="",r=0,n,a,o=i.length,c=Hv;for(n=0;n<o;n++)n%3===0&&n&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+i[n];return a=o%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}B(a3,"representYamlBinary");function s3(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}B(s3,"isBinary");var rq=new ar("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r3,construct:n3,predicate:s3,represent:a3}),nq=Object.prototype.hasOwnProperty,aq=Object.prototype.toString;function o3(i){if(i===null)return!0;var e=[],r,n,a,o,c,h=i;for(r=0,n=h.length;r<n;r+=1){if(a=h[r],c=!1,aq.call(a)!=="[object Object]")return!1;for(o in a)if(nq.call(a,o))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}B(o3,"resolveYamlOmap");function l3(i){return i!==null?i:[]}B(l3,"constructYamlOmap");var sq=new ar("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o3,construct:l3}),oq=Object.prototype.toString;function c3(i){if(i===null)return!0;var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(n=c[e],oq.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;o[e]=[a[0],n[a[0]]]}return!0}B(c3,"resolveYamlPairs");function h3(i){if(i===null)return[];var e,r,n,a,o,c=i;for(o=new Array(c.length),e=0,r=c.length;e<r;e+=1)n=c[e],a=Object.keys(n),o[e]=[a[0],n[a[0]]];return o}B(h3,"constructYamlPairs");var lq=new ar("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:c3,construct:h3}),cq=Object.prototype.hasOwnProperty;function u3(i){if(i===null)return!0;var e,r=i;for(e in r)if(cq.call(r,e)&&r[e]!==null)return!1;return!0}B(u3,"resolveYamlSet");function f3(i){return i!==null?i:{}}B(f3,"constructYamlSet");var hq=new ar("tag:yaml.org,2002:set",{kind:"mapping",resolve:u3,construct:f3}),d3=tq.extend({implicit:[eq,iq],explicit:[rq,sq,lq,hq]}),Co=Object.prototype.hasOwnProperty,sg=1,p3=2,g3=3,og=4,N0=1,uq=2,zS=3,fq=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,dq=/[\x85\u2028\u2029]/,pq=/[,\[\]\{\}]/,m3=/^(?:!|!!|![a-z\-]+!)$/i,y3=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jx(i){return Object.prototype.toString.call(i)}B(Jx,"_class");function Fn(i){return i===10||i===13}B(Fn,"is_EOL");function xo(i){return i===9||i===32}B(xo,"is_WHITE_SPACE");function yr(i){return i===9||i===32||i===10||i===13}B(yr,"is_WS_OR_EOL");function tl(i){return i===44||i===91||i===93||i===123||i===125}B(tl,"is_FLOW_INDICATOR");function x3(i){var e;return 48<=i&&i<=57?i-48:(e=i|32,97<=e&&e<=102?e-97+10:-1)}B(x3,"fromHexCode");function b3(i){return i===120?2:i===117?4:i===85?8:0}B(b3,"escapedHexLen");function v3(i){return 48<=i&&i<=57?i-48:-1}B(v3,"fromDecimalCode");function tb(i){return i===48?"\0":i===97?"\x07":i===98?"\b":i===116||i===9?" ":i===110?`
235
- `:i===118?"\v":i===102?"\f":i===114?"\r":i===101?"\x1B":i===32?" ":i===34?'"':i===47?"/":i===92?"\\":i===78?"…":i===95?" ":i===76?"\u2028":i===80?"\u2029":""}B(tb,"simpleEscapeSequence");function C3(i){return i<=65535?String.fromCharCode(i):String.fromCharCode((i-65536>>10)+55296,(i-65536&1023)+56320)}B(C3,"charFromCodepoint");function Uv(i,e,r){e==="__proto__"?Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):i[e]=r}B(Uv,"setProperty");var k3=new Array(256),_3=new Array(256);for(Uo=0;Uo<256;Uo++)k3[Uo]=tb(Uo)?1:0,_3[Uo]=tb(Uo);var Uo;function S3(i,e){this.input=i,this.filename=e.filename||null,this.schema=e.schema||d3,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}B(S3,"State$1");function Wv(i,e){var r={name:i.filename,buffer:i.input.slice(0,-1),position:i.position,line:i.line,column:i.position-i.lineStart};return r.snippet=q7(r),new Or(e,r)}B(Wv,"generateError");function It(i,e){throw Wv(i,e)}B(It,"throwError");function lf(i,e){i.onWarning&&i.onWarning.call(null,Wv(i,e))}B(lf,"throwWarning");var qS={YAML:B(function(e,r,n){var a,o,c;e.version!==null&&It(e,"duplication of %YAML directive"),n.length!==1&&It(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&It(e,"ill-formed argument of the YAML directive"),o=parseInt(a[1],10),c=parseInt(a[2],10),o!==1&&It(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&lf(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:B(function(e,r,n){var a,o;n.length!==2&&It(e,"TAG directive accepts exactly two arguments"),a=n[0],o=n[1],m3.test(a)||It(e,"ill-formed tag handle (first argument) of the TAG directive"),Co.call(e.tagMap,a)&&It(e,'there is a previously declared suffix for "'+a+'" tag handle'),y3.test(o)||It(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{It(e,"tag prefix is malformed: "+o)}e.tagMap[a]=o},"handleTagDirective")};function ls(i,e,r,n){var a,o,c,h;if(e<r){if(h=i.input.slice(e,r),n)for(a=0,o=h.length;a<o;a+=1)c=h.charCodeAt(a),c===9||32<=c&&c<=1114111||It(i,"expected valid JSON character");else fq.test(h)&&It(i,"the stream contains non-printable characters");i.result+=h}}B(ls,"captureSegment");function eb(i,e,r,n){var a,o,c,h;for(Mi.isObject(r)||It(i,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,h=a.length;c<h;c+=1)o=a[c],Co.call(e,o)||(Uv(e,o,r[o]),n[o]=!0)}B(eb,"mergeMappings");function el(i,e,r,n,a,o,c,h,u){var f,p;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),f=0,p=a.length;f<p;f+=1)Array.isArray(a[f])&&It(i,"nested arrays are not supported inside keys"),typeof a=="object"&&Jx(a[f])==="[object Object]"&&(a[f]="[object Object]");if(typeof a=="object"&&Jx(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(f=0,p=o.length;f<p;f+=1)eb(i,e,o[f],r);else eb(i,e,o,r);else!i.json&&!Co.call(r,a)&&Co.call(e,a)&&(i.line=c||i.line,i.lineStart=h||i.lineStart,i.position=u||i.position,It(i,"duplicated mapping key")),Uv(e,a,o),delete r[a];return e}B(el,"storeMappingPair");function Wg(i){var e;e=i.input.charCodeAt(i.position),e===10?i.position++:e===13?(i.position++,i.input.charCodeAt(i.position)===10&&i.position++):It(i,"a line break is expected"),i.line+=1,i.lineStart=i.position,i.firstTabInLine=-1}B(Wg,"readLineBreak");function gi(i,e,r){for(var n=0,a=i.input.charCodeAt(i.position);a!==0;){for(;xo(a);)a===9&&i.firstTabInLine===-1&&(i.firstTabInLine=i.position),a=i.input.charCodeAt(++i.position);if(e&&a===35)do a=i.input.charCodeAt(++i.position);while(a!==10&&a!==13&&a!==0);if(Fn(a))for(Wg(i),a=i.input.charCodeAt(i.position),n++,i.lineIndent=0;a===32;)i.lineIndent++,a=i.input.charCodeAt(++i.position);else break}return r!==-1&&n!==0&&i.lineIndent<r&&lf(i,"deficient indentation"),n}B(gi,"skipSeparationSpace");function Ef(i){var e=i.position,r;return r=i.input.charCodeAt(e),!!((r===45||r===46)&&r===i.input.charCodeAt(e+1)&&r===i.input.charCodeAt(e+2)&&(e+=3,r=i.input.charCodeAt(e),r===0||yr(r)))}B(Ef,"testDocumentSeparator");function Yg(i,e){e===1?i.result+=" ":e>1&&(i.result+=Mi.repeat(`
236
- `,e-1))}B(Yg,"writeFoldedLines");function w3(i,e,r){var n,a,o,c,h,u,f,p,g=i.kind,x=i.result,y;if(y=i.input.charCodeAt(i.position),yr(y)||tl(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(a=i.input.charCodeAt(i.position+1),yr(a)||r&&tl(a)))return!1;for(i.kind="scalar",i.result="",o=c=i.position,h=!1;y!==0;){if(y===58){if(a=i.input.charCodeAt(i.position+1),yr(a)||r&&tl(a))break}else if(y===35){if(n=i.input.charCodeAt(i.position-1),yr(n))break}else{if(i.position===i.lineStart&&Ef(i)||r&&tl(y))break;if(Fn(y))if(u=i.line,f=i.lineStart,p=i.lineIndent,gi(i,!1,-1),i.lineIndent>=e){h=!0,y=i.input.charCodeAt(i.position);continue}else{i.position=c,i.line=u,i.lineStart=f,i.lineIndent=p;break}}h&&(ls(i,o,c,!1),Yg(i,i.line-u),o=c=i.position,h=!1),xo(y)||(c=i.position+1),y=i.input.charCodeAt(++i.position)}return ls(i,o,c,!1),i.result?!0:(i.kind=g,i.result=x,!1)}B(w3,"readPlainScalar");function T3(i,e){var r,n,a;if(r=i.input.charCodeAt(i.position),r!==39)return!1;for(i.kind="scalar",i.result="",i.position++,n=a=i.position;(r=i.input.charCodeAt(i.position))!==0;)if(r===39)if(ls(i,n,i.position,!0),r=i.input.charCodeAt(++i.position),r===39)n=i.position,i.position++,a=i.position;else return!0;else Fn(r)?(ls(i,n,a,!0),Yg(i,gi(i,!1,e)),n=a=i.position):i.position===i.lineStart&&Ef(i)?It(i,"unexpected end of the document within a single quoted scalar"):(i.position++,a=i.position);It(i,"unexpected end of the stream within a single quoted scalar")}B(T3,"readSingleQuotedScalar");function B3(i,e){var r,n,a,o,c,h;if(h=i.input.charCodeAt(i.position),h!==34)return!1;for(i.kind="scalar",i.result="",i.position++,r=n=i.position;(h=i.input.charCodeAt(i.position))!==0;){if(h===34)return ls(i,r,i.position,!0),i.position++,!0;if(h===92){if(ls(i,r,i.position,!0),h=i.input.charCodeAt(++i.position),Fn(h))gi(i,!1,e);else if(h<256&&k3[h])i.result+=_3[h],i.position++;else if((c=b3(h))>0){for(a=c,o=0;a>0;a--)h=i.input.charCodeAt(++i.position),(c=x3(h))>=0?o=(o<<4)+c:It(i,"expected hexadecimal character");i.result+=C3(o),i.position++}else It(i,"unknown escape sequence");r=n=i.position}else Fn(h)?(ls(i,r,n,!0),Yg(i,gi(i,!1,e)),r=n=i.position):i.position===i.lineStart&&Ef(i)?It(i,"unexpected end of the document within a double quoted scalar"):(i.position++,n=i.position)}It(i,"unexpected end of the stream within a double quoted scalar")}B(B3,"readDoubleQuotedScalar");function A3(i,e){var r=!0,n,a,o,c=i.tag,h,u=i.anchor,f,p,g,x,y,v=Object.create(null),C,_,w,T;if(T=i.input.charCodeAt(i.position),T===91)p=93,y=!1,h=[];else if(T===123)p=125,y=!0,h={};else return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=h),T=i.input.charCodeAt(++i.position);T!==0;){if(gi(i,!0,e),T=i.input.charCodeAt(i.position),T===p)return i.position++,i.tag=c,i.anchor=u,i.kind=y?"mapping":"sequence",i.result=h,!0;r?T===44&&It(i,"expected the node content, but found ','"):It(i,"missed comma between flow collection entries"),_=C=w=null,g=x=!1,T===63&&(f=i.input.charCodeAt(i.position+1),yr(f)&&(g=x=!0,i.position++,gi(i,!0,e))),n=i.line,a=i.lineStart,o=i.position,Cl(i,e,sg,!1,!0),_=i.tag,C=i.result,gi(i,!0,e),T=i.input.charCodeAt(i.position),(x||i.line===n)&&T===58&&(g=!0,T=i.input.charCodeAt(++i.position),gi(i,!0,e),Cl(i,e,sg,!1,!0),w=i.result),y?el(i,h,v,_,C,w,n,a,o):g?h.push(el(i,null,v,_,C,w,n,a,o)):h.push(C),gi(i,!0,e),T=i.input.charCodeAt(i.position),T===44?(r=!0,T=i.input.charCodeAt(++i.position)):r=!1}It(i,"unexpected end of the stream within a flow collection")}B(A3,"readFlowCollection");function E3(i,e){var r,n,a=N0,o=!1,c=!1,h=e,u=0,f=!1,p,g;if(g=i.input.charCodeAt(i.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(i.kind="scalar",i.result="";g!==0;)if(g=i.input.charCodeAt(++i.position),g===43||g===45)N0===a?a=g===43?zS:uq:It(i,"repeat of a chomping mode identifier");else if((p=v3(g))>=0)p===0?It(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?It(i,"repeat of an indentation width identifier"):(h=e+p-1,c=!0);else break;if(xo(g)){do g=i.input.charCodeAt(++i.position);while(xo(g));if(g===35)do g=i.input.charCodeAt(++i.position);while(!Fn(g)&&g!==0)}for(;g!==0;){for(Wg(i),i.lineIndent=0,g=i.input.charCodeAt(i.position);(!c||i.lineIndent<h)&&g===32;)i.lineIndent++,g=i.input.charCodeAt(++i.position);if(!c&&i.lineIndent>h&&(h=i.lineIndent),Fn(g)){u++;continue}if(i.lineIndent<h){a===zS?i.result+=Mi.repeat(`
237
- `,o?1+u:u):a===N0&&o&&(i.result+=`
238
- `);break}for(n?xo(g)?(f=!0,i.result+=Mi.repeat(`
239
- `,o?1+u:u)):f?(f=!1,i.result+=Mi.repeat(`
240
- `,u+1)):u===0?o&&(i.result+=" "):i.result+=Mi.repeat(`
241
- `,u):i.result+=Mi.repeat(`
242
- `,o?1+u:u),o=!0,c=!0,u=0,r=i.position;!Fn(g)&&g!==0;)g=i.input.charCodeAt(++i.position);ls(i,r,i.position,!1)}return!0}B(E3,"readBlockScalar");function ib(i,e){var r,n=i.tag,a=i.anchor,o=[],c,h=!1,u;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=o),u=i.input.charCodeAt(i.position);u!==0&&(i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,It(i,"tab characters must not be used in indentation")),!(u!==45||(c=i.input.charCodeAt(i.position+1),!yr(c))));){if(h=!0,i.position++,gi(i,!0,-1)&&i.lineIndent<=e){o.push(null),u=i.input.charCodeAt(i.position);continue}if(r=i.line,Cl(i,e,g3,!1,!0),o.push(i.result),gi(i,!0,-1),u=i.input.charCodeAt(i.position),(i.line===r||i.lineIndent>e)&&u!==0)It(i,"bad indentation of a sequence entry");else if(i.lineIndent<e)break}return h?(i.tag=n,i.anchor=a,i.kind="sequence",i.result=o,!0):!1}B(ib,"readBlockSequence");function M3(i,e,r){var n,a,o,c,h,u,f=i.tag,p=i.anchor,g={},x=Object.create(null),y=null,v=null,C=null,_=!1,w=!1,T;if(i.firstTabInLine!==-1)return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=g),T=i.input.charCodeAt(i.position);T!==0;){if(!_&&i.firstTabInLine!==-1&&(i.position=i.firstTabInLine,It(i,"tab characters must not be used in indentation")),n=i.input.charCodeAt(i.position+1),o=i.line,(T===63||T===58)&&yr(n))T===63?(_&&(el(i,g,x,y,v,null,c,h,u),y=v=C=null),w=!0,_=!0,a=!0):_?(_=!1,a=!0):It(i,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),i.position+=1,T=n;else{if(c=i.line,h=i.lineStart,u=i.position,!Cl(i,r,p3,!1,!0))break;if(i.line===o){for(T=i.input.charCodeAt(i.position);xo(T);)T=i.input.charCodeAt(++i.position);if(T===58)T=i.input.charCodeAt(++i.position),yr(T)||It(i,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(el(i,g,x,y,v,null,c,h,u),y=v=C=null),w=!0,_=!1,a=!1,y=i.tag,v=i.result;else if(w)It(i,"can not read an implicit mapping pair; a colon is missed");else return i.tag=f,i.anchor=p,!0}else if(w)It(i,"can not read a block mapping entry; a multiline key may not be an implicit key");else return i.tag=f,i.anchor=p,!0}if((i.line===o||i.lineIndent>e)&&(_&&(c=i.line,h=i.lineStart,u=i.position),Cl(i,e,og,!0,a)&&(_?v=i.result:C=i.result),_||(el(i,g,x,y,v,C,c,h,u),y=v=C=null),gi(i,!0,-1),T=i.input.charCodeAt(i.position)),(i.line===o||i.lineIndent>e)&&T!==0)It(i,"bad indentation of a mapping entry");else if(i.lineIndent<e)break}return _&&el(i,g,x,y,v,null,c,h,u),w&&(i.tag=f,i.anchor=p,i.kind="mapping",i.result=g),w}B(M3,"readBlockMapping");function L3(i){var e,r=!1,n=!1,a,o,c;if(c=i.input.charCodeAt(i.position),c!==33)return!1;if(i.tag!==null&&It(i,"duplication of a tag property"),c=i.input.charCodeAt(++i.position),c===60?(r=!0,c=i.input.charCodeAt(++i.position)):c===33?(n=!0,a="!!",c=i.input.charCodeAt(++i.position)):a="!",e=i.position,r){do c=i.input.charCodeAt(++i.position);while(c!==0&&c!==62);i.position<i.length?(o=i.input.slice(e,i.position),c=i.input.charCodeAt(++i.position)):It(i,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!yr(c);)c===33&&(n?It(i,"tag suffix cannot contain exclamation marks"):(a=i.input.slice(e-1,i.position+1),m3.test(a)||It(i,"named tag handle cannot contain such characters"),n=!0,e=i.position+1)),c=i.input.charCodeAt(++i.position);o=i.input.slice(e,i.position),pq.test(o)&&It(i,"tag suffix cannot contain flow indicator characters")}o&&!y3.test(o)&&It(i,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{It(i,"tag name is malformed: "+o)}return r?i.tag=o:Co.call(i.tagMap,a)?i.tag=i.tagMap[a]+o:a==="!"?i.tag="!"+o:a==="!!"?i.tag="tag:yaml.org,2002:"+o:It(i,'undeclared tag handle "'+a+'"'),!0}B(L3,"readTagProperty");function N3(i){var e,r;if(r=i.input.charCodeAt(i.position),r!==38)return!1;for(i.anchor!==null&&It(i,"duplication of an anchor property"),r=i.input.charCodeAt(++i.position),e=i.position;r!==0&&!yr(r)&&!tl(r);)r=i.input.charCodeAt(++i.position);return i.position===e&&It(i,"name of an anchor node must contain at least one character"),i.anchor=i.input.slice(e,i.position),!0}B(N3,"readAnchorProperty");function O3(i){var e,r,n;if(n=i.input.charCodeAt(i.position),n!==42)return!1;for(n=i.input.charCodeAt(++i.position),e=i.position;n!==0&&!yr(n)&&!tl(n);)n=i.input.charCodeAt(++i.position);return i.position===e&&It(i,"name of an alias node must contain at least one character"),r=i.input.slice(e,i.position),Co.call(i.anchorMap,r)||It(i,'unidentified alias "'+r+'"'),i.result=i.anchorMap[r],gi(i,!0,-1),!0}B(O3,"readAlias");function Cl(i,e,r,n,a){var o,c,h,u=1,f=!1,p=!1,g,x,y,v,C,_;if(i.listener!==null&&i.listener("open",i),i.tag=null,i.anchor=null,i.kind=null,i.result=null,o=c=h=og===r||g3===r,n&&gi(i,!0,-1)&&(f=!0,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)),u===1)for(;L3(i)||N3(i);)gi(i,!0,-1)?(f=!0,h=o,i.lineIndent>e?u=1:i.lineIndent===e?u=0:i.lineIndent<e&&(u=-1)):h=!1;if(h&&(h=f||a),(u===1||og===r)&&(sg===r||p3===r?C=e:C=e+1,_=i.position-i.lineStart,u===1?h&&(ib(i,_)||M3(i,_,C))||A3(i,C)?p=!0:(c&&E3(i,C)||T3(i,C)||B3(i,C)?p=!0:O3(i)?(p=!0,(i.tag!==null||i.anchor!==null)&&It(i,"alias node should not have any properties")):w3(i,C,sg===r)&&(p=!0,i.tag===null&&(i.tag="?")),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):u===0&&(p=h&&ib(i,_))),i.tag===null)i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);else if(i.tag==="?"){for(i.result!==null&&i.kind!=="scalar"&&It(i,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+i.kind+'"'),g=0,x=i.implicitTypes.length;g<x;g+=1)if(v=i.implicitTypes[g],v.resolve(i.result)){i.result=v.construct(i.result),i.tag=v.tag,i.anchor!==null&&(i.anchorMap[i.anchor]=i.result);break}}else if(i.tag!=="!"){if(Co.call(i.typeMap[i.kind||"fallback"],i.tag))v=i.typeMap[i.kind||"fallback"][i.tag];else for(v=null,y=i.typeMap.multi[i.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(i.tag.slice(0,y[g].tag.length)===y[g].tag){v=y[g];break}v||It(i,"unknown tag !<"+i.tag+">"),i.result!==null&&v.kind!==i.kind&&It(i,"unacceptable node kind for !<"+i.tag+'> tag; it should be "'+v.kind+'", not "'+i.kind+'"'),v.resolve(i.result,i.tag)?(i.result=v.construct(i.result,i.tag),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):It(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return i.listener!==null&&i.listener("close",i),i.tag!==null||i.anchor!==null||p}B(Cl,"composeNode");function j3(i){var e=i.position,r,n,a,o=!1,c;for(i.version=null,i.checkLineBreaks=i.legacy,i.tagMap=Object.create(null),i.anchorMap=Object.create(null);(c=i.input.charCodeAt(i.position))!==0&&(gi(i,!0,-1),c=i.input.charCodeAt(i.position),!(i.lineIndent>0||c!==37));){for(o=!0,c=i.input.charCodeAt(++i.position),r=i.position;c!==0&&!yr(c);)c=i.input.charCodeAt(++i.position);for(n=i.input.slice(r,i.position),a=[],n.length<1&&It(i,"directive name must not be less than one character in length");c!==0;){for(;xo(c);)c=i.input.charCodeAt(++i.position);if(c===35){do c=i.input.charCodeAt(++i.position);while(c!==0&&!Fn(c));break}if(Fn(c))break;for(r=i.position;c!==0&&!yr(c);)c=i.input.charCodeAt(++i.position);a.push(i.input.slice(r,i.position))}c!==0&&Wg(i),Co.call(qS,n)?qS[n](i,n,a):lf(i,'unknown document directive "'+n+'"')}if(gi(i,!0,-1),i.lineIndent===0&&i.input.charCodeAt(i.position)===45&&i.input.charCodeAt(i.position+1)===45&&i.input.charCodeAt(i.position+2)===45?(i.position+=3,gi(i,!0,-1)):o&&It(i,"directives end mark is expected"),Cl(i,i.lineIndent-1,og,!1,!0),gi(i,!0,-1),i.checkLineBreaks&&dq.test(i.input.slice(e,i.position))&&lf(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&Ef(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,gi(i,!0,-1));return}if(i.position<i.length-1)It(i,"end of the stream or a document separator is expected");else return}B(j3,"readDocument");function Yv(i,e){i=String(i),e=e||{},i.length!==0&&(i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
243
- `),i.charCodeAt(0)===65279&&(i=i.slice(1)));var r=new S3(i,e),n=i.indexOf("\0");for(n!==-1&&(r.position=n,It(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;)j3(r);return r.documents}B(Yv,"loadDocuments");function gq(i,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=Yv(i,r);if(typeof e!="function")return n;for(var a=0,o=n.length;a<o;a+=1)e(n[a])}B(gq,"loadAll$1");function R3(i,e){var r=Yv(i,e);if(r.length!==0){if(r.length===1)return r[0];throw new Or("expected a single document in the stream, but found more")}}B(R3,"load$1");var mq=R3,yq={load:mq},D3=Object.prototype.toString,F3=Object.prototype.hasOwnProperty,Gv=65279,xq=9,cf=10,bq=13,vq=32,Cq=33,kq=34,rb=35,_q=37,Sq=38,wq=39,Tq=42,$3=44,Bq=45,lg=58,Aq=61,Eq=62,Mq=63,Lq=64,z3=91,q3=93,Nq=96,I3=123,Oq=124,P3=125,sr={};sr[0]="\\0";sr[7]="\\a";sr[8]="\\b";sr[9]="\\t";sr[10]="\\n";sr[11]="\\v";sr[12]="\\f";sr[13]="\\r";sr[27]="\\e";sr[34]='\\"';sr[92]="\\\\";sr[133]="\\N";sr[160]="\\_";sr[8232]="\\L";sr[8233]="\\P";var jq=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Rq=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function H3(i,e){var r,n,a,o,c,h,u;if(e===null)return{};for(r={},n=Object.keys(e),a=0,o=n.length;a<o;a+=1)c=n[a],h=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=i.compiledTypeMap.fallback[c],u&&F3.call(u.styleAliases,h)&&(h=u.styleAliases[h]),r[c]=h;return r}B(H3,"compileStyleMap");function U3(i){var e,r,n;if(e=i.toString(16).toUpperCase(),i<=255)r="x",n=2;else if(i<=65535)r="u",n=4;else if(i<=4294967295)r="U",n=8;else throw new Or("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Mi.repeat("0",n-e.length)+e}B(U3,"encodeHex");var Dq=1,hf=2;function W3(i){this.schema=i.schema||d3,this.indent=Math.max(1,i.indent||2),this.noArrayIndent=i.noArrayIndent||!1,this.skipInvalid=i.skipInvalid||!1,this.flowLevel=Mi.isNothing(i.flowLevel)?-1:i.flowLevel,this.styleMap=H3(this.schema,i.styles||null),this.sortKeys=i.sortKeys||!1,this.lineWidth=i.lineWidth||80,this.noRefs=i.noRefs||!1,this.noCompatMode=i.noCompatMode||!1,this.condenseFlow=i.condenseFlow||!1,this.quotingType=i.quotingType==='"'?hf:Dq,this.forceQuotes=i.forceQuotes||!1,this.replacer=typeof i.replacer=="function"?i.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}B(W3,"State");function nb(i,e){for(var r=Mi.repeat(" ",e),n=0,a=-1,o="",c,h=i.length;n<h;)a=i.indexOf(`
244
- `,n),a===-1?(c=i.slice(n),n=h):(c=i.slice(n,a+1),n=a+1),c.length&&c!==`
245
- `&&(o+=r),o+=c;return o}B(nb,"indentString");function cg(i,e){return`
246
- `+Mi.repeat(" ",i.indent*e)}B(cg,"generateNextLine");function Y3(i,e){var r,n,a;for(r=0,n=i.implicitTypes.length;r<n;r+=1)if(a=i.implicitTypes[r],a.resolve(e))return!0;return!1}B(Y3,"testImplicitResolving");function uf(i){return i===vq||i===xq}B(uf,"isWhitespace");function nh(i){return 32<=i&&i<=126||161<=i&&i<=55295&&i!==8232&&i!==8233||57344<=i&&i<=65533&&i!==Gv||65536<=i&&i<=1114111}B(nh,"isPrintable");function ab(i){return nh(i)&&i!==Gv&&i!==bq&&i!==cf}B(ab,"isNsCharOrWhitespace");function sb(i,e,r){var n=ab(i),a=n&&!uf(i);return(r?n:n&&i!==$3&&i!==z3&&i!==q3&&i!==I3&&i!==P3)&&i!==rb&&!(e===lg&&!a)||ab(e)&&!uf(e)&&i===rb||e===lg&&a}B(sb,"isPlainSafe");function G3(i){return nh(i)&&i!==Gv&&!uf(i)&&i!==Bq&&i!==Mq&&i!==lg&&i!==$3&&i!==z3&&i!==q3&&i!==I3&&i!==P3&&i!==rb&&i!==Sq&&i!==Tq&&i!==Cq&&i!==Oq&&i!==Aq&&i!==Eq&&i!==wq&&i!==kq&&i!==_q&&i!==Lq&&i!==Nq}B(G3,"isPlainSafeFirst");function V3(i){return!uf(i)&&i!==lg}B(V3,"isPlainSafeLast");function _c(i,e){var r=i.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<i.length&&(n=i.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}B(_c,"codePointAt");function Vv(i){var e=/^\n* /;return e.test(i)}B(Vv,"needIndentIndicator");var X3=1,ob=2,Q3=3,Z3=4,bc=5;function K3(i,e,r,n,a,o,c,h){var u,f=0,p=null,g=!1,x=!1,y=n!==-1,v=-1,C=G3(_c(i,0))&&V3(_c(i,i.length-1));if(e||c)for(u=0;u<i.length;f>=65536?u+=2:u++){if(f=_c(i,u),!nh(f))return bc;C=C&&sb(f,p,h),p=f}else{for(u=0;u<i.length;f>=65536?u+=2:u++){if(f=_c(i,u),f===cf)g=!0,y&&(x=x||u-v-1>n&&i[v+1]!==" ",v=u);else if(!nh(f))return bc;C=C&&sb(f,p,h),p=f}x=x||y&&u-v-1>n&&i[v+1]!==" "}return!g&&!x?C&&!c&&!a(i)?X3:o===hf?bc:ob:r>9&&Vv(i)?bc:c?o===hf?bc:ob:x?Z3:Q3}B(K3,"chooseScalarStyle");function J3(i,e,r,n,a){i.dump=(function(){if(e.length===0)return i.quotingType===hf?'""':"''";if(!i.noCompatMode&&(jq.indexOf(e)!==-1||Rq.test(e)))return i.quotingType===hf?'"'+e+'"':"'"+e+"'";var o=i.indent*Math.max(1,r),c=i.lineWidth===-1?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-o),h=n||i.flowLevel>-1&&r>=i.flowLevel;function u(f){return Y3(i,f)}switch(B(u,"testAmbiguity"),K3(e,h,i.indent,c,u,i.quotingType,i.forceQuotes&&!n,a)){case X3:return e;case ob:return"'"+e.replace(/'/g,"''")+"'";case Q3:return"|"+lb(e,i.indent)+cb(nb(e,o));case Z3:return">"+lb(e,i.indent)+cb(nb(t5(e,c),o));case bc:return'"'+e5(e)+'"';default:throw new Or("impossible error: invalid scalar style")}})()}B(J3,"writeScalar");function lb(i,e){var r=Vv(i)?String(e):"",n=i[i.length-1]===`
247
- `,a=n&&(i[i.length-2]===`
248
- `||i===`
249
- `),o=a?"+":n?"":"-";return r+o+`
250
- `}B(lb,"blockHeader");function cb(i){return i[i.length-1]===`
251
- `?i.slice(0,-1):i}B(cb,"dropEndingNewline");function t5(i,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var f=i.indexOf(`
252
- `);return f=f!==-1?f:i.length,r.lastIndex=f,hb(i.slice(0,f),e)})(),a=i[0]===`
253
- `||i[0]===" ",o,c;c=r.exec(i);){var h=c[1],u=c[2];o=u[0]===" ",n+=h+(!a&&!o&&u!==""?`
254
- `:"")+hb(u,e),a=o}return n}B(t5,"foldString");function hb(i,e){if(i===""||i[0]===" ")return i;for(var r=/ [^ ]/g,n,a=0,o,c=0,h=0,u="";n=r.exec(i);)h=n.index,h-a>e&&(o=c>a?c:h,u+=`
255
- `+i.slice(a,o),a=o+1),c=h;return u+=`
256
- `,i.length-a>e&&c>a?u+=i.slice(a,c)+`
257
- `+i.slice(c+1):u+=i.slice(a),u.slice(1)}B(hb,"foldLine");function e5(i){for(var e="",r=0,n,a=0;a<i.length;r>=65536?a+=2:a++)r=_c(i,a),n=sr[r],!n&&nh(r)?(e+=i[a],r>=65536&&(e+=i[a+1])):e+=n||U3(r);return e}B(e5,"escapeString");function i5(i,e,r){var n="",a=i.tag,o,c,h;for(o=0,c=r.length;o<c;o+=1)h=r[o],i.replacer&&(h=i.replacer.call(r,String(o),h)),(Ca(i,e,h,!1,!1)||typeof h>"u"&&Ca(i,e,null,!1,!1))&&(n!==""&&(n+=","+(i.condenseFlow?"":" ")),n+=i.dump);i.tag=a,i.dump="["+n+"]"}B(i5,"writeFlowSequence");function ub(i,e,r,n){var a="",o=i.tag,c,h,u;for(c=0,h=r.length;c<h;c+=1)u=r[c],i.replacer&&(u=i.replacer.call(r,String(c),u)),(Ca(i,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&Ca(i,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=cg(i,e)),i.dump&&cf===i.dump.charCodeAt(0)?a+="-":a+="- ",a+=i.dump);i.tag=o,i.dump=a||"[]"}B(ub,"writeBlockSequence");function r5(i,e,r){var n="",a=i.tag,o=Object.keys(r),c,h,u,f,p;for(c=0,h=o.length;c<h;c+=1)p="",n!==""&&(p+=", "),i.condenseFlow&&(p+='"'),u=o[c],f=r[u],i.replacer&&(f=i.replacer.call(r,u,f)),Ca(i,e,u,!1,!1)&&(i.dump.length>1024&&(p+="? "),p+=i.dump+(i.condenseFlow?'"':"")+":"+(i.condenseFlow?"":" "),Ca(i,e,f,!1,!1)&&(p+=i.dump,n+=p));i.tag=a,i.dump="{"+n+"}"}B(r5,"writeFlowMapping");function n5(i,e,r,n){var a="",o=i.tag,c=Object.keys(r),h,u,f,p,g,x;if(i.sortKeys===!0)c.sort();else if(typeof i.sortKeys=="function")c.sort(i.sortKeys);else if(i.sortKeys)throw new Or("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!n||a!=="")&&(x+=cg(i,e)),f=c[h],p=r[f],i.replacer&&(p=i.replacer.call(r,f,p)),Ca(i,e+1,f,!0,!0,!0)&&(g=i.tag!==null&&i.tag!=="?"||i.dump&&i.dump.length>1024,g&&(i.dump&&cf===i.dump.charCodeAt(0)?x+="?":x+="? "),x+=i.dump,g&&(x+=cg(i,e)),Ca(i,e+1,p,!0,g)&&(i.dump&&cf===i.dump.charCodeAt(0)?x+=":":x+=": ",x+=i.dump,a+=x));i.tag=o,i.dump=a||"{}"}B(n5,"writeBlockMapping");function fb(i,e,r){var n,a,o,c,h,u;for(a=r?i.explicitTypes:i.implicitTypes,o=0,c=a.length;o<c;o+=1)if(h=a[o],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof e=="object"&&e instanceof h.instanceOf)&&(!h.predicate||h.predicate(e))){if(r?h.multi&&h.representName?i.tag=h.representName(e):i.tag=h.tag:i.tag="?",h.represent){if(u=i.styleMap[h.tag]||h.defaultStyle,D3.call(h.represent)==="[object Function]")n=h.represent(e,u);else if(F3.call(h.represent,u))n=h.represent[u](e,u);else throw new Or("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');i.dump=n}return!0}return!1}B(fb,"detectType");function Ca(i,e,r,n,a,o,c){i.tag=null,i.dump=r,fb(i,r,!1)||fb(i,r,!0);var h=D3.call(i.dump),u=n,f;n&&(n=i.flowLevel<0||i.flowLevel>e);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=i.duplicates.indexOf(r),x=g!==-1),(i.tag!==null&&i.tag!=="?"||x||i.indent!==2&&e>0)&&(a=!1),x&&i.usedDuplicates[g])i.dump="*ref_"+g;else{if(p&&x&&!i.usedDuplicates[g]&&(i.usedDuplicates[g]=!0),h==="[object Object]")n&&Object.keys(i.dump).length!==0?(n5(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(r5(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object Array]")n&&i.dump.length!==0?(i.noArrayIndent&&!c&&e>0?ub(i,e-1,i.dump,a):ub(i,e,i.dump,a),x&&(i.dump="&ref_"+g+i.dump)):(i5(i,e,i.dump),x&&(i.dump="&ref_"+g+" "+i.dump));else if(h==="[object String]")i.tag!=="?"&&J3(i,i.dump,e,o,u);else{if(h==="[object Undefined]")return!1;if(i.skipInvalid)return!1;throw new Or("unacceptable kind of an object to dump "+h)}i.tag!==null&&i.tag!=="?"&&(f=encodeURI(i.tag[0]==="!"?i.tag.slice(1):i.tag).replace(/!/g,"%21"),i.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",i.dump=f+" "+i.dump)}return!0}B(Ca,"writeNode");function a5(i,e){var r=[],n=[],a,o;for(hg(i,r,n),a=0,o=n.length;a<o;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(o)}B(a5,"getDuplicateReferences");function hg(i,e,r){var n,a,o;if(i!==null&&typeof i=="object")if(a=e.indexOf(i),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(i),Array.isArray(i))for(a=0,o=i.length;a<o;a+=1)hg(i[a],e,r);else for(n=Object.keys(i),a=0,o=n.length;a<o;a+=1)hg(i[n[a]],e,r)}B(hg,"inspectNode");function Fq(i,e){e=e||{};var r=new W3(e);r.noRefs||a5(i,r);var n=i;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ca(r,0,n,!0,!0)?r.dump+`
258
- `:""}B(Fq,"dump$1");function $q(i,e){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}B($q,"renamed");var zq=QE,qq=yq.load;/*! Bundled license information:
259
-
260
- js-yaml/dist/js-yaml.mjs:
261
- (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
262
- */var uu=B((i,e)=>{if(e)return"translate("+-i.width/2+", "+-i.height/2+")";const r=i.x??0,n=i.y??0;return"translate("+-(r+i.width/2)+", "+-(n+i.height/2)+")"},"computeLabelTransform"),nr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},IS={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ru(i,e){if(i===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};i=ei(i),e=ei(e);const[r,n]=[i.x,i.y],[a,o]=[e.x,e.y],c=a-r,h=o-n;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}B(Ru,"calculateDeltaAndAngle");var ei=B(i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,"pointTransformer"),Iq=B(i=>({x:B(function(e,r,n){let a=0;const o=ei(n[0]).x<ei(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(nr,i.arrowTypeStart)){const{angle:y,deltaX:v}=Ru(n[0],n[1]);a=nr[i.arrowTypeStart]*Math.cos(y)*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(nr,i.arrowTypeEnd)){const{angle:y,deltaX:v}=Ru(n[n.length-1],n[n.length-2]);a=nr[i.arrowTypeEnd]*Math.cos(y)*(v>=0?1:-1)}const c=Math.abs(ei(e).x-ei(n[n.length-1]).x),h=Math.abs(ei(e).y-ei(n[n.length-1]).y),u=Math.abs(ei(e).x-ei(n[0]).x),f=Math.abs(ei(e).y-ei(n[0]).y),p=nr[i.arrowTypeStart],g=nr[i.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=o==="right"?-1:1,a-=y}if(u<p&&u>0&&f<p){let y=p+x-u;y*=o==="right"?-1:1,a+=y}return ei(e).x+a},"x"),y:B(function(e,r,n){let a=0;const o=ei(n[0]).y<ei(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(nr,i.arrowTypeStart)){const{angle:y,deltaY:v}=Ru(n[0],n[1]);a=nr[i.arrowTypeStart]*Math.abs(Math.sin(y))*(v>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(nr,i.arrowTypeEnd)){const{angle:y,deltaY:v}=Ru(n[n.length-1],n[n.length-2]);a=nr[i.arrowTypeEnd]*Math.abs(Math.sin(y))*(v>=0?1:-1)}const c=Math.abs(ei(e).y-ei(n[n.length-1]).y),h=Math.abs(ei(e).x-ei(n[n.length-1]).x),u=Math.abs(ei(e).y-ei(n[0]).y),f=Math.abs(ei(e).x-ei(n[0]).x),p=nr[i.arrowTypeStart],g=nr[i.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=o==="up"?-1:1,a-=y}if(u<p&&u>0&&f<p){let y=p+x-u;y*=o==="up"?-1:1,a+=y}return ei(e).y+a},"y")}),"getLineFunctionsWithOffset"),ap={},Bi={},PS;function Pq(){return PS||(PS=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.BLANK_URL=Bi.relativeFirstCharacters=Bi.whitespaceEscapeCharsRegex=Bi.urlSchemeRegex=Bi.ctrlCharactersRegex=Bi.htmlCtrlEntityRegex=Bi.htmlEntitiesRegex=Bi.invalidProtocolRegex=void 0,Bi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Bi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Bi.htmlCtrlEntityRegex=/&(newline|tab);/gi,Bi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Bi.urlSchemeRegex=/^.+(:|&colon;)/gim,Bi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Bi.relativeFirstCharacters=[".","/"],Bi.BLANK_URL="about:blank"),Bi}var HS;function Hq(){if(HS)return ap;HS=1,Object.defineProperty(ap,"__esModule",{value:!0}),ap.sanitizeUrl=o;var i=Pq();function e(c){return i.relativeFirstCharacters.indexOf(c[0])>-1}function r(c){var h=c.replace(i.ctrlCharactersRegex,"");return h.replace(i.htmlEntitiesRegex,function(u,f){return String.fromCharCode(f)})}function n(c){return URL.canParse(c)}function a(c){try{return decodeURIComponent(c)}catch{return c}}function o(c){if(!c)return i.BLANK_URL;var h,u=a(c.trim());do u=r(u).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(i.ctrlCharactersRegex)||u.match(i.htmlEntitiesRegex)||u.match(i.htmlCtrlEntityRegex)||u.match(i.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=u;if(!f)return i.BLANK_URL;if(e(f))return f;var p=f.trimStart(),g=p.match(i.urlSchemeRegex);if(!g)return f;var x=g[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(x))return i.BLANK_URL;var y=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!n(y))return i.BLANK_URL;var v=new URL(y);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return y}return ap}var Uq=Hq(),s5=typeof global=="object"&&global&&global.Object===Object&&global,Wq=typeof self=="object"&&self&&self.Object===Object&&self,Hn=s5||Wq||Function("return this")(),ug=Hn.Symbol,o5=Object.prototype,Yq=o5.hasOwnProperty,Gq=o5.toString,fu=ug?ug.toStringTag:void 0;function Vq(i){var e=Yq.call(i,fu),r=i[fu];try{i[fu]=void 0;var n=!0}catch{}var a=Gq.call(i);return n&&(e?i[fu]=r:delete i[fu]),a}var Xq=Object.prototype,Qq=Xq.toString;function Zq(i){return Qq.call(i)}var Kq="[object Null]",Jq="[object Undefined]",US=ug?ug.toStringTag:void 0;function Bl(i){return i==null?i===void 0?Jq:Kq:US&&US in Object(i)?Vq(i):Zq(i)}function qn(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var t9="[object AsyncFunction]",e9="[object Function]",i9="[object GeneratorFunction]",r9="[object Proxy]";function Xv(i){if(!qn(i))return!1;var e=Bl(i);return e==e9||e==i9||e==t9||e==r9}var O0=Hn["__core-js_shared__"],WS=(function(){var i=/[^.]+$/.exec(O0&&O0.keys&&O0.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function n9(i){return!!WS&&WS in i}var a9=Function.prototype,s9=a9.toString;function Al(i){if(i!=null){try{return s9.call(i)}catch{}try{return i+""}catch{}}return""}var o9=/[\\^$.*+?()[\]{}|]/g,l9=/^\[object .+?Constructor\]$/,c9=Function.prototype,h9=Object.prototype,u9=c9.toString,f9=h9.hasOwnProperty,d9=RegExp("^"+u9.call(f9).replace(o9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p9(i){if(!qn(i)||n9(i))return!1;var e=Xv(i)?d9:l9;return e.test(Al(i))}function g9(i,e){return i==null?void 0:i[e]}function El(i,e){var r=g9(i,e);return p9(r)?r:void 0}var ff=El(Object,"create");function m9(){this.__data__=ff?ff(null):{},this.size=0}function y9(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var x9="__lodash_hash_undefined__",b9=Object.prototype,v9=b9.hasOwnProperty;function C9(i){var e=this.__data__;if(ff){var r=e[i];return r===x9?void 0:r}return v9.call(e,i)?e[i]:void 0}var k9=Object.prototype,_9=k9.hasOwnProperty;function S9(i){var e=this.__data__;return ff?e[i]!==void 0:_9.call(e,i)}var w9="__lodash_hash_undefined__";function T9(i,e){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=ff&&e===void 0?w9:e,this}function kl(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}kl.prototype.clear=m9;kl.prototype.delete=y9;kl.prototype.get=C9;kl.prototype.has=S9;kl.prototype.set=T9;function B9(){this.__data__=[],this.size=0}function Gg(i,e){return i===e||i!==i&&e!==e}function Vg(i,e){for(var r=i.length;r--;)if(Gg(i[r][0],e))return r;return-1}var A9=Array.prototype,E9=A9.splice;function M9(i){var e=this.__data__,r=Vg(e,i);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():E9.call(e,r,1),--this.size,!0}function L9(i){var e=this.__data__,r=Vg(e,i);return r<0?void 0:e[r][1]}function N9(i){return Vg(this.__data__,i)>-1}function O9(i,e){var r=this.__data__,n=Vg(r,i);return n<0?(++this.size,r.push([i,e])):r[n][1]=e,this}function ps(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}ps.prototype.clear=B9;ps.prototype.delete=M9;ps.prototype.get=L9;ps.prototype.has=N9;ps.prototype.set=O9;var df=El(Hn,"Map");function j9(){this.size=0,this.__data__={hash:new kl,map:new(df||ps),string:new kl}}function R9(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function Xg(i,e){var r=i.__data__;return R9(e)?r[typeof e=="string"?"string":"hash"]:r.map}function D9(i){var e=Xg(this,i).delete(i);return this.size-=e?1:0,e}function F9(i){return Xg(this,i).get(i)}function $9(i){return Xg(this,i).has(i)}function z9(i,e){var r=Xg(this,i),n=r.size;return r.set(i,e),this.size+=r.size==n?0:1,this}function So(i){var e=-1,r=i==null?0:i.length;for(this.clear();++e<r;){var n=i[e];this.set(n[0],n[1])}}So.prototype.clear=j9;So.prototype.delete=D9;So.prototype.get=F9;So.prototype.has=$9;So.prototype.set=z9;var q9="Expected a function";function Mf(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(q9);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var c=i.apply(this,n);return r.cache=o.set(a,c)||o,c};return r.cache=new(Mf.Cache||So),r}Mf.Cache=So;function I9(){this.__data__=new ps,this.size=0}function P9(i){var e=this.__data__,r=e.delete(i);return this.size=e.size,r}function H9(i){return this.__data__.get(i)}function U9(i){return this.__data__.has(i)}var W9=200;function Y9(i,e){var r=this.__data__;if(r instanceof ps){var n=r.__data__;if(!df||n.length<W9-1)return n.push([i,e]),this.size=++r.size,this;r=this.__data__=new So(n)}return r.set(i,e),this.size=r.size,this}function ch(i){var e=this.__data__=new ps(i);this.size=e.size}ch.prototype.clear=I9;ch.prototype.delete=P9;ch.prototype.get=H9;ch.prototype.has=U9;ch.prototype.set=Y9;var fg=(function(){try{var i=El(Object,"defineProperty");return i({},"",{}),i}catch{}})();function Qv(i,e,r){e=="__proto__"&&fg?fg(i,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[e]=r}function db(i,e,r){(r!==void 0&&!Gg(i[e],r)||r===void 0&&!(e in i))&&Qv(i,e,r)}function G9(i){return function(e,r,n){for(var a=-1,o=Object(e),c=n(e),h=c.length;h--;){var u=c[++a];if(r(o[u],u,o)===!1)break}return e}}var V9=G9(),l5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,YS=l5&&typeof module=="object"&&module&&!module.nodeType&&module,X9=YS&&YS.exports===l5,GS=X9?Hn.Buffer:void 0,VS=GS?GS.allocUnsafe:void 0;function Q9(i,e){if(e)return i.slice();var r=i.length,n=VS?VS(r):new i.constructor(r);return i.copy(n),n}var XS=Hn.Uint8Array;function Z9(i){var e=new i.constructor(i.byteLength);return new XS(e).set(new XS(i)),e}function K9(i,e){var r=e?Z9(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}function J9(i,e){var r=-1,n=i.length;for(e||(e=Array(n));++r<n;)e[r]=i[r];return e}var QS=Object.create,tI=(function(){function i(){}return function(e){if(!qn(e))return{};if(QS)return QS(e);i.prototype=e;var r=new i;return i.prototype=void 0,r}})();function c5(i,e){return function(r){return i(e(r))}}var h5=c5(Object.getPrototypeOf,Object),eI=Object.prototype;function Qg(i){var e=i&&i.constructor,r=typeof e=="function"&&e.prototype||eI;return i===r}function iI(i){return typeof i.constructor=="function"&&!Qg(i)?tI(h5(i)):{}}function hh(i){return i!=null&&typeof i=="object"}var rI="[object Arguments]";function ZS(i){return hh(i)&&Bl(i)==rI}var u5=Object.prototype,nI=u5.hasOwnProperty,aI=u5.propertyIsEnumerable,dg=ZS((function(){return arguments})())?ZS:function(i){return hh(i)&&nI.call(i,"callee")&&!aI.call(i,"callee")},pg=Array.isArray,sI=9007199254740991;function f5(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=sI}function Zg(i){return i!=null&&f5(i.length)&&!Xv(i)}function oI(i){return hh(i)&&Zg(i)}function lI(){return!1}var d5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,KS=d5&&typeof module=="object"&&module&&!module.nodeType&&module,cI=KS&&KS.exports===d5,JS=cI?Hn.Buffer:void 0,hI=JS?JS.isBuffer:void 0,Zv=hI||lI,uI="[object Object]",fI=Function.prototype,dI=Object.prototype,p5=fI.toString,pI=dI.hasOwnProperty,gI=p5.call(Object);function mI(i){if(!hh(i)||Bl(i)!=uI)return!1;var e=h5(i);if(e===null)return!0;var r=pI.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&p5.call(r)==gI}var yI="[object Arguments]",xI="[object Array]",bI="[object Boolean]",vI="[object Date]",CI="[object Error]",kI="[object Function]",_I="[object Map]",SI="[object Number]",wI="[object Object]",TI="[object RegExp]",BI="[object Set]",AI="[object String]",EI="[object WeakMap]",MI="[object ArrayBuffer]",LI="[object DataView]",NI="[object Float32Array]",OI="[object Float64Array]",jI="[object Int8Array]",RI="[object Int16Array]",DI="[object Int32Array]",FI="[object Uint8Array]",$I="[object Uint8ClampedArray]",zI="[object Uint16Array]",qI="[object Uint32Array]",Je={};Je[NI]=Je[OI]=Je[jI]=Je[RI]=Je[DI]=Je[FI]=Je[$I]=Je[zI]=Je[qI]=!0;Je[yI]=Je[xI]=Je[MI]=Je[bI]=Je[LI]=Je[vI]=Je[CI]=Je[kI]=Je[_I]=Je[SI]=Je[wI]=Je[TI]=Je[BI]=Je[AI]=Je[EI]=!1;function II(i){return hh(i)&&f5(i.length)&&!!Je[Bl(i)]}function PI(i){return function(e){return i(e)}}var g5=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gu=g5&&typeof module=="object"&&module&&!module.nodeType&&module,HI=Gu&&Gu.exports===g5,j0=HI&&s5.process,tw=(function(){try{var i=Gu&&Gu.require&&Gu.require("util").types;return i||j0&&j0.binding&&j0.binding("util")}catch{}})(),ew=tw&&tw.isTypedArray,Kv=ew?PI(ew):II;function pb(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}var UI=Object.prototype,WI=UI.hasOwnProperty;function YI(i,e,r){var n=i[e];(!(WI.call(i,e)&&Gg(n,r))||r===void 0&&!(e in i))&&Qv(i,e,r)}function GI(i,e,r,n){var a=!r;r||(r={});for(var o=-1,c=e.length;++o<c;){var h=e[o],u=void 0;u===void 0&&(u=i[h]),a?Qv(r,h,u):YI(r,h,u)}return r}function VI(i,e){for(var r=-1,n=Array(i);++r<i;)n[r]=e(r);return n}var XI=9007199254740991,QI=/^(?:0|[1-9]\d*)$/;function m5(i,e){var r=typeof i;return e=e??XI,!!e&&(r=="number"||r!="symbol"&&QI.test(i))&&i>-1&&i%1==0&&i<e}var ZI=Object.prototype,KI=ZI.hasOwnProperty;function JI(i,e){var r=pg(i),n=!r&&dg(i),a=!r&&!n&&Zv(i),o=!r&&!n&&!a&&Kv(i),c=r||n||a||o,h=c?VI(i.length,String):[],u=h.length;for(var f in i)(e||KI.call(i,f))&&!(c&&(f=="length"||a&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||m5(f,u)))&&h.push(f);return h}function tP(i){var e=[];if(i!=null)for(var r in Object(i))e.push(r);return e}var eP=Object.prototype,iP=eP.hasOwnProperty;function rP(i){if(!qn(i))return tP(i);var e=Qg(i),r=[];for(var n in i)n=="constructor"&&(e||!iP.call(i,n))||r.push(n);return r}function y5(i){return Zg(i)?JI(i,!0):rP(i)}function nP(i){return GI(i,y5(i))}function aP(i,e,r,n,a,o,c){var h=pb(i,r),u=pb(e,r),f=c.get(u);if(f){db(i,r,f);return}var p=o?o(h,u,r+"",i,e,c):void 0,g=p===void 0;if(g){var x=pg(u),y=!x&&Zv(u),v=!x&&!y&&Kv(u);p=u,x||y||v?pg(h)?p=h:oI(h)?p=J9(h):y?(g=!1,p=Q9(u,!0)):v?(g=!1,p=K9(u,!0)):p=[]:mI(u)||dg(u)?(p=h,dg(h)?p=nP(h):(!qn(h)||Xv(h))&&(p=iI(u))):g=!1}g&&(c.set(u,p),a(p,u,n,o,c),c.delete(u)),db(i,r,p)}function x5(i,e,r,n,a){i!==e&&V9(e,function(o,c){if(a||(a=new ch),qn(o))aP(i,e,c,r,x5,n,a);else{var h=n?n(pb(i,c),o,c+"",i,e,a):void 0;h===void 0&&(h=o),db(i,c,h)}},y5)}function b5(i){return i}function sP(i,e,r){switch(r.length){case 0:return i.call(e);case 1:return i.call(e,r[0]);case 2:return i.call(e,r[0],r[1]);case 3:return i.call(e,r[0],r[1],r[2])}return i.apply(e,r)}var iw=Math.max;function oP(i,e,r){return e=iw(e===void 0?i.length-1:e,0),function(){for(var n=arguments,a=-1,o=iw(n.length-e,0),c=Array(o);++a<o;)c[a]=n[e+a];a=-1;for(var h=Array(e+1);++a<e;)h[a]=n[a];return h[e]=r(c),sP(i,this,h)}}function lP(i){return function(){return i}}var cP=fg?function(i,e){return fg(i,"toString",{configurable:!0,enumerable:!1,value:lP(e),writable:!0})}:b5,hP=800,uP=16,fP=Date.now;function dP(i){var e=0,r=0;return function(){var n=fP(),a=uP-(n-r);if(r=n,a>0){if(++e>=hP)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}var pP=dP(cP);function gP(i,e){return pP(oP(i,e,b5),i+"")}function mP(i,e,r){if(!qn(r))return!1;var n=typeof e;return(n=="number"?Zg(r)&&m5(e,r.length):n=="string"&&e in r)?Gg(r[e],i):!1}function yP(i){return gP(function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,c=a>2?r[2]:void 0;for(o=i.length>3&&typeof o=="function"?(a--,o):void 0,c&&mP(r[0],r[1],c)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var h=r[n];h&&i(e,h,n,o)}return e})}var xP=yP(function(i,e,r){x5(i,e,r)}),bP="​",vP={curveBasis:Zx,curveBasisClosed:x7,curveBasisOpen:b7,curveBumpX:aE,curveBumpY:sE,curveBundle:v7,curveCardinalClosed:C7,curveCardinalOpen:k7,curveCardinal:hE,curveCatmullRomClosed:_7,curveCatmullRomOpen:S7,curveCatmullRom:fE,curveLinear:Yu,curveLinearClosed:w7,curveMonotoneX:xE,curveMonotoneY:bE,curveNatural:CE,curveStep:kE,curveStepAfter:SE,curveStepBefore:_E},CP=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kP=B(function(i,e){const r=v5(i,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const c=r.map(h=>h.args);Wp(c),n=Ei(n,[...c])}else n=r.args;if(!n)return;let a=bv(i,e);const o="config";return n[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),v5=B(function(i,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${CP.source})(?=[}][%]{2}).*
263
- `,"ig");i=i.trim().replace(a,"").replace(/'/gm,'"'),_t.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${i}`);let o;const c=[];for(;(o=Uu.exec(i))!==null;)if(o.index===Uu.lastIndex&&Uu.lastIndex++,o&&!e||e&&((r=o[1])!=null&&r.match(e))||e&&((n=o[2])!=null&&n.match(e))){const h=o[1]?o[1]:o[2],u=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:i,args:null}:c.length===1?c[0]:c}catch(a){return _t.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${i}'`),{type:void 0,args:null}}},"detectDirective"),_P=B(function(i){return i.replace(Uu,"")},"removeDirectives"),SP=B(function(i,e){for(const[r,n]of e.entries())if(n.match(i))return r;return-1},"isSubstringInArray");function Jv(i,e){if(!i)return e;const r=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return vP[r]??e}B(Jv,"interpolateToCurve");function C5(i,e){const r=i.trim();if(r)return e.securityLevel!=="loose"?Uq.sanitizeUrl(r):r}B(C5,"formatUrl");var wP=B((i,...e)=>{const r=i.split("."),n=r.length-1,a=r[n];let o=window;for(let c=0;c<n;c++)if(o=o[r[c]],!o){_t.error(`Function name: ${i} not found in window`);return}o[a](...e)},"runFunc");function t1(i,e){return!i||!e?0:Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}B(t1,"distance");function k5(i){let e,r=0;i.forEach(a=>{r+=t1(a,e),e=a});const n=r/2;return e1(i,n)}B(k5,"traverseEdge");function _5(i){return i.length===1?i[0]:k5(i)}B(_5,"calcLabelPosition");var rw=B((i,e=2)=>{const r=Math.pow(10,e);return Math.round(i*r)/r},"roundNumber"),e1=B((i,e)=>{let r,n=e;for(const a of i){if(r){const o=t1(a,r);if(o===0)return r;if(o<n)n-=o;else{const c=n/o;if(c<=0)return r;if(c>=1)return{x:a.x,y:a.y};if(c>0&&c<1)return{x:rw((1-c)*r.x+c*a.x,5),y:rw((1-c)*r.y+c*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),TP=B((i,e,r)=>{_t.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=e1(e,25),o=i?10:5,c=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(c)*o+(e[0].x+a.x)/2,h.y=-Math.cos(c)*o+(e[0].y+a.y)/2,h},"calcCardinalityPosition");function S5(i,e,r){const n=structuredClone(r);_t.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+i,o=e1(n,a),c=10+i*.5,h=Math.atan2(n[0].y-o.y,n[0].x-o.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*c+(n[0].y+o.y)/2):e==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(n[0].y+o.y)/2-5):e==="end_left"?(u.x=Math.sin(h)*c+(n[0].x+o.x)/2-5,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2-5):(u.x=Math.sin(h)*c+(n[0].x+o.x)/2,u.y=-Math.cos(h)*c+(n[0].y+o.y)/2),u}B(S5,"calcTerminalLabelPosition");function w5(i){let e="",r="";for(const n of i)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}B(w5,"getStylesFromArray");var nw=0,BP=B(()=>(nw++,"id-"+Math.random().toString(36).substr(2,12)+"-"+nw),"generateId");function T5(i){let e="";const r="0123456789abcdef",n=r.length;for(let a=0;a<i;a++)e+=r.charAt(Math.floor(Math.random()*n));return e}B(T5,"makeRandomHex");var AP=B(i=>T5(i.length),"random"),EP=B(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"),MP=B(function(i,e){const r=e.text.replace(wf.lineBreakRegex," "),[,n]=Kg(e.fontSize),a=i.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),LP=Mf((i,e,r)=>{if(!i||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),wf.lineBreakRegex.test(i)))return i;const n=i.split(" ").filter(Boolean),a=[];let o="";return n.forEach((c,h)=>{const u=fs(`${c} `,r),f=fs(o,r);if(u>e){const{hyphenatedStrings:x,remainingWord:y}=NP(c,e,"-",r);a.push(o,...x),o=y}else f+u>=e?(a.push(o),o=c):o=[o,c].filter(Boolean).join(" ");h+1===n.length&&a.push(o)}),a.filter(c=>c!=="").join(r.joinWith)},(i,e,r)=>`${i}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),NP=Mf((i,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...i],o=[];let c="";return a.forEach((h,u)=>{const f=`${c}${h}`;if(fs(f,n)>=e){const g=u+1,x=a.length===g,y=`${f}${r}`;o.push(x?f:y),c=""}else c=f}),{hyphenatedStrings:o,remainingWord:c}},(i,e,r="-",n)=>`${i}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function B5(i,e){return i1(i,e).height}B(B5,"calculateTextHeight");function fs(i,e){return i1(i,e).width}B(fs,"calculateTextWidth");var i1=Mf((i,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!i)return{width:0,height:0};const[,o]=Kg(r),c=["sans-serif",n],h=i.split(wf.lineBreakRegex),u=[],f=Xt("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const p=f.append("svg");for(const x of c){let y=0;const v={width:0,height:0,lineHeight:0};for(const C of h){const _=EP();_.text=C||bP;const w=MP(p,_).style("font-size",o).style("font-weight",a).style("font-family",x),T=(w._groups||w)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,T.width)),y=Math.round(T.height),v.height+=y,v.lineHeight=Math.round(Math.max(v.lineHeight,y))}u.push(v)}p.remove();const g=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[g]},(i,e)=>`${i}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Jc,OP=(Jc=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},B(Jc,"InitIDGenerator"),Jc),sp,jP=B(function(i){return sp=sp||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),sp.innerHTML=i,unescape(sp.textContent)},"entityDecode");function r1(i){return"str"in i}B(r1,"isDetailedError");var RP=B((i,e,r,n)=>{var o;if(!n)return;const a=(o=i.node())==null?void 0:o.getBBox();a&&i.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Kg=B(i=>{if(typeof i=="number")return[i,i+"px"];const e=parseInt(i??"",10);return Number.isNaN(e)?[void 0,void 0]:i===String(e)?[e,i+"px"]:[e,i]},"parseFontSize");function n1(i,e){return xP({},i,e)}B(n1,"cleanAndMerge");var Rn={assignWithDepth:Ei,wrapLabel:LP,calculateTextHeight:B5,calculateTextWidth:fs,calculateTextDimensions:i1,cleanAndMerge:n1,detectInit:kP,detectDirective:v5,isSubstringInArray:SP,interpolateToCurve:Jv,calcLabelPosition:_5,calcCardinalityPosition:TP,calcTerminalLabelPosition:S5,formatUrl:C5,getStylesFromArray:w5,generateId:BP,random:AP,runFunc:wP,entityDecode:jP,insertTitle:RP,isLabelCoordinateInPath:A5,parseFontSize:Kg,InitIDGenerator:OP},DP=B(function(i){let e=i;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),_l=B(function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),git=B((i,e,{counter:r=0,prefix:n,suffix:a},o)=>o||`${n?`${n}_`:""}${i}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function $i(i){return i??null}B($i,"handleUndefinedAttr");function A5(i,e){const r=Math.round(i.x),n=Math.round(i.y),a=e.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(n.toString())}B(A5,"isLabelCoordinateInPath");var a1=B(({flowchart:i})=>{var a,o;const e=((a=i==null?void 0:i.subGraphTitleMargin)==null?void 0:a.top)??0,r=((o=i==null?void 0:i.subGraphTitleMargin)==null?void 0:o.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");async function E5(i,e){const r=i.getElementsByTagName("img");if(!r||r.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(o=>{function c(){if(a.style.display="flex",a.style.flexDirection="column",n){const h=Ae().fontSize?Ae().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[f=mA.fontSize]=Kg(h),p=f*u+"px";a.style.minWidth=p,a.style.maxWidth=p}else a.style.width="100%";o(a)}B(c,"setupImage"),setTimeout(()=>{a.complete&&c()}),a.addEventListener("error",c),a.addEventListener("load",c)})))}B(E5,"configureLabelImages");var FP=B(i=>{const{handDrawnSeed:e}=Ae();return{fill:i,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:i,seed:e}},"solidStateFill"),uh=B(i=>{const e=$P([...i.cssCompiledStyles||[],...i.cssStyles||[],...i.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),$P=B(i=>{const e=new Map;return i.forEach(r=>{const[n,a]=r.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),M5=B(i=>i==="color"||i==="font-size"||i==="font-family"||i==="font-weight"||i==="font-style"||i==="text-decoration"||i==="text-align"||i==="text-transform"||i==="line-height"||i==="letter-spacing"||i==="word-spacing"||i==="text-shadow"||i==="text-overflow"||i==="white-space"||i==="word-wrap"||i==="word-break"||i==="overflow-wrap"||i==="hyphens","isLabelStyle"),$t=B(i=>{const{stylesArray:e}=uh(i),r=[],n=[],a=[],o=[];return e.forEach(c=>{const h=c[0];M5(h)?r.push(c.join(":")+" !important"):(n.push(c.join(":")+" !important"),h.includes("stroke")&&a.push(c.join(":")+" !important"),h==="fill"&&o.push(c.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:o}},"styles2String"),Ft=B((i,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=Ae(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:c}=uh(i);return Object.assign({roughness:.7,fill:c.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||a,seed:n,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:zP(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),zP=B(i=>{if(!i)return[0,0];const e=i.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray");const qP=Object.freeze({left:0,top:0,width:16,height:16}),gg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),L5=Object.freeze({...qP,...gg}),IP=Object.freeze({...L5,body:"",hidden:!1}),PP=Object.freeze({width:null,height:null}),HP=Object.freeze({...PP,...gg}),UP=(i,e,r,n="")=>{const a=i.split(":");if(i.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const h=a.pop(),u=a.pop(),f={provider:a.length>0?a[0]:n,prefix:u,name:h};return R0(f)?f:null}const o=a[0],c=o.split("-");if(c.length>1){const h={provider:n,prefix:c.shift(),name:c.join("-")};return R0(h)?h:null}if(r&&n===""){const h={provider:n,prefix:"",name:o};return R0(h,r)?h:null}return null},R0=(i,e)=>i?!!((e&&i.prefix===""||i.prefix)&&i.name):!1;function WP(i,e){const r={};!i.hFlip!=!e.hFlip&&(r.hFlip=!0),!i.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((i.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function aw(i,e){const r=WP(i,e);for(const n in IP)n in gg?n in i&&!(n in r)&&(r[n]=gg[n]):n in e?r[n]=e[n]:n in i&&(r[n]=i[n]);return r}function YP(i,e){const r=i.icons,n=i.aliases||Object.create(null),a=Object.create(null);function o(c){if(r[c])return a[c]=[];if(!(c in a)){a[c]=null;const h=n[c]&&n[c].parent,u=h&&o(h);u&&(a[c]=[h].concat(u))}return a[c]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(o),a}function sw(i,e,r){const n=i.icons,a=i.aliases||Object.create(null);let o={};function c(h){o=aw(n[h]||a[h],o)}return c(e),r.forEach(c),aw(i,o)}function GP(i,e){if(i.icons[e])return sw(i,e,[]);const r=YP(i,[e])[e];return r?sw(i,e,r):null}const VP=/(-?[0-9.]*[0-9]+[0-9.]*)/g,XP=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ow(i,e,r){if(e===1)return i;if(r=r||100,typeof i=="number")return Math.ceil(i*e*r)/r;if(typeof i!="string")return i;const n=i.split(VP);if(n===null||!n.length)return i;const a=[];let o=n.shift(),c=XP.test(o);for(;;){if(c){const h=parseFloat(o);isNaN(h)?a.push(o):a.push(Math.ceil(h*e*r)/r)}else a.push(o);if(o=n.shift(),o===void 0)return a.join("");c=!c}}function QP(i,e="defs"){let r="";const n=i.indexOf("<"+e);for(;n>=0;){const a=i.indexOf(">",n),o=i.indexOf("</"+e);if(a===-1||o===-1)break;const c=i.indexOf(">",o);if(c===-1)break;r+=i.slice(a+1,o).trim(),i=i.slice(0,n).trim()+i.slice(c+1)}return{defs:r,content:i}}function ZP(i,e){return i?"<defs>"+i+"</defs>"+e:e}function KP(i,e,r){const n=QP(i);return ZP(n.defs,e+n.content+r)}const JP=i=>i==="unset"||i==="undefined"||i==="none";function tH(i,e){const r={...L5,...i},n={...HP,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(C=>{const _=[],w=C.hFlip,T=C.vFlip;let A=C.rotate;w?T?A+=2:(_.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),_.push("scale(-1 1)"),a.top=a.left=0):T&&(_.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),_.push("scale(1 -1)"),a.top=a.left=0);let E;switch(A<0&&(A-=Math.floor(A/4)*4),A=A%4,A){case 1:E=a.height/2+a.top,_.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:_.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:E=a.width/2+a.left,_.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}A%2===1&&(a.left!==a.top&&(E=a.left,a.left=a.top,a.top=E),a.width!==a.height&&(E=a.width,a.width=a.height,a.height=E)),_.length&&(o=KP(o,'<g transform="'+_.join(" ")+'">',"</g>"))});const c=n.width,h=n.height,u=a.width,f=a.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=ow(g,u/f)):(p=c==="auto"?u:c,g=h===null?ow(p,f/u):h==="auto"?f:h);const x={},y=(C,_)=>{JP(_)||(x[C]=_.toString())};y("width",p),y("height",g);const v=[a.left,a.top,u,f];return x.viewBox=v.join(" "),{attributes:x,viewBox:v,body:o}}const eH=/\sid="(\S+)"/g,lw=new Map;function iH(i){i=i.replace(/[0-9]+$/,"")||"a";const e=lw.get(i)||0;return lw.set(i,e+1),e?`${i}${e}`:i}function rH(i){const e=[];let r;for(;r=eH.exec(i);)e.push(r[1]);if(!e.length)return i;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const o=iH(a),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),i=i.replace(new RegExp(n,"g"),""),i}function nH(i,e){let r=i.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+i+"</svg>"}function s1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ml=s1();function N5(i){Ml=i}var Vu={exec:()=>null};function Ee(i,e=""){let r=typeof i=="string"?i:i.source,n={replace:(a,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(xr.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,e)};return n}var aH=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),xr={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:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},sH=/^(?:[ \t]*(?:\n|$))+/,oH=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lH=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cH=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,o1=/(?:[*+-]|\d{1,9}[.)])/,O5=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,j5=Ee(O5).replace(/bull/g,o1).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(),hH=Ee(O5).replace(/bull/g,o1).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(),l1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uH=/^[^\n]+/,c1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,fH=Ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",c1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dH=Ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o1).getRegex(),Jg="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",h1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pH=Ee("^ {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",h1).replace("tag",Jg).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R5=Ee(l1).replace("hr",Lf).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",Jg).getRegex(),gH=Ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R5).getRegex(),u1={blockquote:gH,code:oH,def:fH,fences:lH,heading:cH,hr:Lf,html:pH,lheading:j5,list:dH,newline:sH,paragraph:R5,table:Vu,text:uH},cw=Ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lf).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",Jg).getRegex(),mH={...u1,lheading:hH,table:cw,paragraph:Ee(l1).replace("hr",Lf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cw).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",Jg).getRegex()},yH={...u1,html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",h1).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:Vu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ee(l1).replace("hr",Lf).replace("heading",` *#{1,6} *[^
264
- ]`).replace("lheading",j5).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xH=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bH=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,D5=/^( {2,}|\\)\n(?!\s*$)/,vH=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tm=/[\p{P}\p{S}]/u,f1=/[\s\p{P}\p{S}]/u,F5=/[^\s\p{P}\p{S}]/u,CH=Ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,f1).getRegex(),$5=/(?!~)[\p{P}\p{S}]/u,kH=/(?!~)[\s\p{P}\p{S}]/u,_H=/(?:[^\s\p{P}\p{S}]|~)/u,SH=Ee(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",aH?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),z5=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wH=Ee(z5,"u").replace(/punct/g,tm).getRegex(),TH=Ee(z5,"u").replace(/punct/g,$5).getRegex(),q5="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",BH=Ee(q5,"gu").replace(/notPunctSpace/g,F5).replace(/punctSpace/g,f1).replace(/punct/g,tm).getRegex(),AH=Ee(q5,"gu").replace(/notPunctSpace/g,_H).replace(/punctSpace/g,kH).replace(/punct/g,$5).getRegex(),EH=Ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,F5).replace(/punctSpace/g,f1).replace(/punct/g,tm).getRegex(),MH=Ee(/\\(punct)/,"gu").replace(/punct/g,tm).getRegex(),LH=Ee(/^<(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(),NH=Ee(h1).replace("(?:-->|$)","-->").getRegex(),OH=Ee("^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",NH).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,jH=Ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",mg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),I5=Ee(/^!?\[(label)\]\[(ref)\]/).replace("label",mg).replace("ref",c1).getRegex(),P5=Ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",c1).getRegex(),RH=Ee("reflink|nolink(?!\\()","g").replace("reflink",I5).replace("nolink",P5).getRegex(),hw=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,d1={_backpedal:Vu,anyPunctuation:MH,autolink:LH,blockSkip:SH,br:D5,code:bH,del:Vu,emStrongLDelim:wH,emStrongRDelimAst:BH,emStrongRDelimUnd:EH,escape:xH,link:jH,nolink:P5,punctuation:CH,reflink:I5,reflinkSearch:RH,tag:OH,text:vH,url:Vu},DH={...d1,link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",mg).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mg).getRegex()},gb={...d1,emStrongRDelimAst:AH,emStrongLDelim:TH,url:Ee(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",hw).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:Ee(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",hw).getRegex()},FH={...gb,br:Ee(D5).replace("{2,}","*").getRegex(),text:Ee(gb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},op={normal:u1,gfm:mH,pedantic:yH},du={normal:d1,gfm:gb,breaks:FH,pedantic:DH},$H={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uw=i=>$H[i];function ha(i,e){if(e){if(xr.escapeTest.test(i))return i.replace(xr.escapeReplace,uw)}else if(xr.escapeTestNoEncode.test(i))return i.replace(xr.escapeReplaceNoEncode,uw);return i}function fw(i){try{i=encodeURI(i).replace(xr.percentDecode,"%")}catch{return null}return i}function dw(i,e){var o;let r=i.replace(xr.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(xr.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(xr.slashPipe,"|");return n}function pu(i,e,r){let n=i.length;if(n===0)return"";let a=0;for(;a<n&&i.charAt(n-a-1)===e;)a++;return i.slice(0,n-a)}function zH(i,e){if(i.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])r++;else if(i[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function pw(i,e,r,n,a){let o=e.href,c=e.title||null,h=i[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:i[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:h,tokens:n.inlineTokens(h)};return n.state.inLink=!1,u}function qH(i,e,r){let n=i.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
265
- `).map(o=>{let c=o.match(r.other.beginningSpace);if(c===null)return o;let[h]=c;return h.length>=a.length?o.slice(a.length):o}).join(`
266
- `)}var yg=class{constructor(e){Ht(this,"options");Ht(this,"rules");Ht(this,"lexer");this.options=e||Ml}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pu(n,`
267
- `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=qH(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let a=pu(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:pu(r[0],`
268
- `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=pu(r[0],`
269
- `).split(`
270
- `),a="",o="",c=[];for(;n.length>0;){let h=!1,u=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))u.push(n[f]),h=!0;else if(!h)u.push(n[f]);else break;n=n.slice(f);let p=u.join(`
271
- `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
272
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
273
- ${p}`:p,o=o?`${o}
274
- ${g}`:g;let x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(g,c,!0),this.lexer.state.top=x,n.length===0)break;let y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let v=y,C=v.raw+`
275
- `+n.join(`
276
- `),_=this.blockquote(C);c[c.length-1]=_,a=a.substring(0,a.length-v.raw.length)+_.raw,o=o.substring(0,o.length-v.text.length)+_.text;break}else if((y==null?void 0:y.type)==="list"){let v=y,C=v.raw+`
277
- `+n.join(`
278
- `),_=this.list(C);c[c.length-1]=_,a=a.substring(0,a.length-y.raw.length)+_.raw,o=o.substring(0,o.length-v.raw.length)+_.raw,n=C.substring(c.at(-1).raw.length).split(`
279
- `);continue}}return{type:"blockquote",raw:a,tokens:c,text:o}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),a=n.length>1,o={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let c=this.rules.other.listItemRegex(n),h=!1;for(;e;){let f=!1,p="",g="";if(!(r=c.exec(e))||this.rules.block.hr.test(e))break;p=r[0],e=e.substring(p.length);let x=r[2].split(`
280
- `,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),y=e.split(`
281
- `,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=r[1].length),v&&this.rules.other.blankLine.test(y)&&(p+=y+`
282
- `,e=e.substring(y.length+1),f=!0),!f){let T=this.rules.other.nextBulletRegex(C),A=this.rules.other.hrRegex(C),E=this.rules.other.fencesBeginRegex(C),N=this.rules.other.headingBeginRegex(C),R=this.rules.other.htmlBeginRegex(C);for(;e;){let M=e.split(`
283
- `,1)[0],O;if(y=M,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),O=y):O=y.replace(this.rules.other.tabCharGlobal," "),E.test(y)||N.test(y)||R.test(y)||T.test(y)||A.test(y))break;if(O.search(this.rules.other.nonSpaceChar)>=C||!y.trim())g+=`
284
- `+O.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(x)||N.test(x)||A.test(x))break;g+=`
285
- `+y}!v&&!y.trim()&&(v=!0),p+=M+`
286
- `,e=e.substring(M.length+1),x=O.slice(C)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let _=null,w;this.options.gfm&&(_=this.rules.other.listIsTask.exec(g),_&&(w=_[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:p,task:!!_,checked:w,loose:!1,text:g,tokens:[]}),o.raw+=p}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){let p=o.items[f].tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].loose=!0;return o}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=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"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:a,title:o}}}table(e){var h;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=dw(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=r[3])!=null&&h.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
287
- `):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<n.length;u++)c.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:c.align[u]});for(let u of o)c.rows.push(dw(u,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(e){let r=this.rules.block.lheading.exec(e);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(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
288
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);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(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let c=pu(n.slice(0,-1),"\\");if((n.length-c.length)%2===0)return}else{let c=zH(r[2],"()");if(c===-2)return;if(c>-1){let h=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,h).trim(),r[3]=""}}let a=r[2],o="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(a);c&&(a=c[1],o=c[3])}else o=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(n)?a=a.slice(1):a=a.slice(1,-1)),pw(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[a.toLowerCase()];if(!o){let c=n[0].charAt(0);return{type:"text",raw:c,text:c}}return pw(n,o,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...a[0]].length-1,c,h,u=o,f=0,p=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*e.length+o);(a=p.exec(r))!=null;){if(c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!c)continue;if(h=[...c].length,a[3]||a[4]){u+=h;continue}else if((a[5]||a[6])&&o%3&&!((o+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);let g=[...a[0]][0].length,x=e.slice(0,o+a.index+g+h);if(Math.min(o,h)%2){let v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,a;return r[2]==="@"?(n=r[1],a="mailto:"+n):(n=r[1],a=n),{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let a,o;if(r[2]==="@")a=r[0],o="mailto:"+a;else{let c;do c=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(c!==r[0]);a=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},Nn=class mb{constructor(e){Ht(this,"tokens");Ht(this,"options");Ht(this,"state");Ht(this,"tokenizer");Ht(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ml,this.options.tokenizer=this.options.tokenizer||new yg,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:xr,block:op.normal,inline:du.normal};this.options.pedantic?(r.block=op.pedantic,r.inline=du.pedantic):this.options.gfm&&(r.block=op.gfm,this.options.breaks?r.inline=du.breaks:r.inline=du.gfm),this.tokenizer.rules=r}static get rules(){return{block:op,inline:du}}static lex(e,r){return new mb(r).lex(e)}static lexInline(e,r){return new mb(r).inlineTokens(e)}lex(e){e=e.replace(xr.carriageReturn,`
289
- `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,o,c;for(this.options.pedantic&&(e=e.replace(xr.tabCharGlobal," ").replace(xr.spaceLine,""));e;){let h;if((o=(a=this.options.extensions)==null?void 0:a.block)!=null&&o.some(f=>(h=f.call({lexer:this},e,r))?(e=e.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.space(e)){e=e.substring(h.raw.length);let f=r.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
290
- `:r.push(h);continue}if(h=this.tokenizer.code(e)){e=e.substring(h.raw.length);let f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
291
- `)?"":`
292
- `)+h.raw,f.text+=`
293
- `+h.text,this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(h=this.tokenizer.fences(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.heading(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.hr(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.blockquote(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.list(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.html(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.def(e)){e=e.substring(h.raw.length);let f=r.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
294
- `)?"":`
295
- `)+h.raw,f.text+=`
296
- `+h.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},r.push(h));continue}if(h=this.tokenizer.table(e)){e=e.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.lheading(e)){e=e.substring(h.raw.length),r.push(h);continue}let u=e;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0,p=e.slice(1),g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},p),typeof g=="number"&&g>=0&&(f=Math.min(f,g))}),f<1/0&&f>=0&&(u=e.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let f=r.at(-1);n&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
297
- `)?"":`
298
- `)+h.raw,f.text+=`
299
- `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h),n=u.length!==e.length,e=e.substring(h.raw.length);continue}if(h=this.tokenizer.text(e)){e=e.substring(h.raw.length);let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
300
- `)?"":`
301
- `)+h.raw,f.text+=`
302
- `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):r.push(h);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,f,p,g,x;let n=e,a=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)y.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=a[2]?a[2].length:0,n=n.slice(0,a.index+o)+"["+"a".repeat(a[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((f=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:f.call({lexer:this},n))??n;let c=!1,h="";for(;e;){c||(h=""),c=!1;let y;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(C=>(y=C.call({lexer:this},e,r))?(e=e.substring(y.raw.length),r.push(y),!0):!1))continue;if(y=this.tokenizer.escape(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.tag(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.link(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(y.raw.length);let C=r.at(-1);y.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(y=this.tokenizer.emStrong(e,n,h)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.codespan(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.br(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.del(e)){e=e.substring(y.raw.length),r.push(y);continue}if(y=this.tokenizer.autolink(e)){e=e.substring(y.raw.length),r.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(e))){e=e.substring(y.raw.length),r.push(y);continue}let v=e;if((x=this.options.extensions)!=null&&x.startInline){let C=1/0,_=e.slice(1),w;this.options.extensions.startInline.forEach(T=>{w=T.call({lexer:this},_),typeof w=="number"&&w>=0&&(C=Math.min(C,w))}),C<1/0&&C>=0&&(v=e.substring(0,C+1))}if(y=this.tokenizer.inlineText(v)){e=e.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let C=r.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=y.raw,C.text+=y.text):r.push(y);continue}if(e){let C="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return r}},xg=class{constructor(e){Ht(this,"options");Ht(this,"parser");this.options=e||Ml}space(e){return""}code({text:e,lang:r,escaped:n}){var c;let a=(c=(r||"").match(xr.notSpaceStart))==null?void 0:c[0],o=e.replace(xr.endingNewline,"")+`
303
- `;return a?'<pre><code class="language-'+ha(a)+'">'+(n?o:ha(o,!0))+`</code></pre>
304
- `:"<pre><code>"+(n?o:ha(o,!0))+`</code></pre>
305
- `}blockquote({tokens:e}){return`<blockquote>
306
- ${this.parser.parse(e)}</blockquote>
307
- `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
308
- `}hr(e){return`<hr>
309
- `}list(e){let r=e.ordered,n=e.start,a="";for(let h=0;h<e.items.length;h++){let u=e.items[h];a+=this.listitem(u)}let o=r?"ol":"ul",c=r&&n!==1?' start="'+n+'"':"";return"<"+o+c+`>
310
- `+a+"</"+o+`>
311
- `}listitem(e){var n;let r="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+ha(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
312
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
313
- `}table(e){let r="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);r+=this.tablerow({text:n});let a="";for(let o=0;o<e.rows.length;o++){let c=e.rows[o];n="";for(let h=0;h<c.length;h++)n+=this.tablecell(c[h]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
314
- <thead>
315
- `+r+`</thead>
316
- `+a+`</table>
317
- `}tablerow({text:e}){return`<tr>
318
- ${e}</tr>
319
- `}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
320
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ha(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let a=this.parser.parseInline(n),o=fw(e);if(o===null)return a;e=o;let c='<a href="'+e+'"';return r&&(c+=' title="'+ha(r)+'"'),c+=">"+a+"</a>",c}image({href:e,title:r,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let o=fw(e);if(o===null)return ha(n);e=o;let c=`<img src="${e}" alt="${n}"`;return r&&(c+=` title="${ha(r)}"`),c+=">",c}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ha(e.text)}},p1=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},On=class yb{constructor(e){Ht(this,"options");Ht(this,"renderer");Ht(this,"textRenderer");this.options=e||Ml,this.options.renderer=this.options.renderer||new xg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new p1}static parse(e,r){return new yb(r).parse(e)}static parseInline(e,r){return new yb(r).parseInline(e)}parse(e,r=!0){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let f=h,p=this.options.extensions.renderers[f.type].call({parser:this},f);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=p||"";continue}}let u=h;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let f=u,p=this.renderer.text(f);for(;c+1<e.length&&e[c+1].type==="text";)f=e[++c],p+=`
321
- `+this.renderer.text(f);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(e,r=this.renderer){var a,o;let n="";for(let c=0;c<e.length;c++){let h=e[c];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[h.type]){let f=this.options.extensions.renderers[h.type].call({parser:this},h);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){n+=f||"";continue}}let u=h;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},kp,Du=(kp=class{constructor(e){Ht(this,"options");Ht(this,"block");this.options=e||Ml}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Nn.lex:Nn.lexInline}provideParser(){return this.block?On.parse:On.parseInline}},Ht(kp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ht(kp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),kp),IH=class{constructor(...e){Ht(this,"defaults",s1());Ht(this,"options",this.setOptions);Ht(this,"parse",this.parseMarkdown(!0));Ht(this,"parseInline",this.parseMarkdown(!1));Ht(this,"Parser",On);Ht(this,"Renderer",xg);Ht(this,"TextRenderer",p1);Ht(this,"Lexer",Nn);Ht(this,"Tokenizer",yg);Ht(this,"Hooks",Du);this.use(...e)}walkTokens(e,r){var a,o;let n=[];for(let c of e)switch(n=n.concat(r.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of h.rows)for(let f of u)n=n.concat(this.walkTokens(f.tokens,r));break}case"list":{let h=c;n=n.concat(this.walkTokens(h.items,r));break}default:{let h=c;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let f=h[u].flat(1/0);n=n.concat(this.walkTokens(f,r))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let c=r.renderers[o.name];c?r.renderers[o.name]=function(...h){let u=o.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=r[o.level];c?c.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),a.extensions=r),n.renderer){let o=this.defaults.renderer||new xg(this.defaults);for(let c in n.renderer){if(!(c in o))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=n.renderer[h],f=o[h];o[h]=(...p)=>{let g=u.apply(o,p);return g===!1&&(g=f.apply(o,p)),g||""}}a.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new yg(this.defaults);for(let c in n.tokenizer){if(!(c in o))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=n.tokenizer[h],f=o[h];o[h]=(...p)=>{let g=u.apply(o,p);return g===!1&&(g=f.apply(o,p)),g}}a.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Du;for(let c in n.hooks){if(!(c in o))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=n.hooks[h],f=o[h];Du.passThroughHooks.has(c)?o[h]=p=>{if(this.defaults.async&&Du.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(o,p);return f.call(o,x)})();let g=u.call(o,p);return f.call(o,g)}:o[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(o,p);return x===!1&&(x=await f.apply(o,p)),x})();let g=u.apply(o,p);return g===!1&&(g=f.apply(o,p)),g}}a.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,c=n.walkTokens;a.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),o&&(u=u.concat(o.call(this,h))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return Nn.lex(e,r??this.defaults)}parser(e,r){return On.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let a={...n},o={...this.defaults,...a},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return c(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 c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(r):r,u=await(o.hooks?await o.hooks.provideLexer():e?Nn.lex:Nn.lexInline)(h,o),f=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(f,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser():e?On.parse:On.parseInline)(f,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let h=(o.hooks?o.hooks.provideLexer():e?Nn.lex:Nn.lexInline)(r,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():e?On.parse:On.parseInline)(h,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(e,r){return n=>{if(n.message+=`
322
- Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+ha(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},Sl=new IH;function Oe(i,e){return Sl.parse(i,e)}Oe.options=Oe.setOptions=function(i){return Sl.setOptions(i),Oe.defaults=Sl.defaults,N5(Oe.defaults),Oe};Oe.getDefaults=s1;Oe.defaults=Ml;Oe.use=function(...i){return Sl.use(...i),Oe.defaults=Sl.defaults,N5(Oe.defaults),Oe};Oe.walkTokens=function(i,e){return Sl.walkTokens(i,e)};Oe.parseInline=Sl.parseInline;Oe.Parser=On;Oe.parser=On.parse;Oe.Renderer=xg;Oe.TextRenderer=p1;Oe.Lexer=Nn;Oe.lexer=Nn.lex;Oe.Tokenizer=yg;Oe.Hooks=Du;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.use;Oe.walkTokens;Oe.parseInline;On.parse;Nn.lex;function H5(i){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof i=="string"?[i]:i);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(h,u){var f=u.match(/\n([\t ]+|(?!\s).)/g);return f?h.concat(f.map(function(p){var g,x;return(x=(g=p.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&x!==void 0?x:0})):h},[]);if(a.length){var o=new RegExp(`
323
- [ ]{`+Math.min.apply(Math,a)+"}","g");n=n.map(function(h){return h.replace(o,`
324
- `)})}n[0]=n[0].replace(/^\r?\n/,"");var c=n[0];return e.forEach(function(h,u){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
325
- `)&&(g=String(h).split(`
326
- `).map(function(x,y){return y===0?x:""+p+x}).join(`
327
- `)),c+=g+n[u+1]}),c}var PH={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},xb=new Map,U5=new Map,HH=B(i=>{for(const e of i){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(_t.debug("Registering icon pack:",e.name),"loader"in e)U5.set(e.name,e.loader);else if("icons"in e)xb.set(e.name,e.icons);else throw _t.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),W5=B(async(i,e)=>{const r=UP(i,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${i}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${i}`);let a=xb.get(n);if(!a){const c=U5.get(n);if(!c)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await c(),prefix:n},xb.set(n,a)}catch(h){throw _t.error(h),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=GP(a,r.name);if(!o)throw new Error(`Icon not found: ${i}`);return o},"getRegisteredIconData"),UH=B(async i=>{try{return await W5(i),!0}catch{return!1}},"isIconAvailable"),Nf=B(async(i,e,r)=>{let n;try{n=await W5(i,e==null?void 0:e.fallbackPrefix)}catch(c){_t.error(c),n=PH}const a=tH(n,e),o=nH(rH(a.body),{...a.attributes,...r});return zn(o,si())},"getIconSVG");function Y5(i,{markdownAutoWrap:e}){const n=i.replace(/<br\/>/g,`
328
- `).replace(/\n{2,}/g,`
329
- `);return H5(n)}B(Y5,"preprocessMarkdown");function G5(i){return i.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var r;return((r=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(n=>({content:n,type:"normal"})))??[]})}B(G5,"nonMarkdownToLines");function V5(i,e={}){const r=Y5(i,e),n=Oe.lexer(r),a=[[]];let o=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
330
- `).forEach((p,g)=>{g!==0&&(o++,a.push([])),p.split(" ").forEach(x=>{x=x.replace(/&#39;/g,"'"),x&&a[o].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&a[o].push({content:h.text,type:"normal"})}return B(c,"processNode"),n.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(f=>{c(f)}):h.type==="html"?a[o].push({content:h.text,type:"normal"}):a[o].push({content:h.raw,type:"normal"})}),a}B(V5,"markdownToLines");function X5(i){return i?`<p>${i.replace(/\\n|\n/g,"<br />")}</p>`:""}B(X5,"nonMarkdownToHTML");function Q5(i,{markdownAutoWrap:e}={}){const r=Oe.lexer(i);function n(a){var o,c,h;return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(n).join("")}</strong>`:a.type==="em"?`<em>${(c=a.tokens)==null?void 0:c.map(n).join("")}</em>`:a.type==="paragraph"?`<p>${(h=a.tokens)==null?void 0:h.map(n).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(_t.warn(`Unsupported markdown: ${a.type}`),a.raw)}return B(n,"output"),r.map(n).join("")}B(Q5,"markdownToHTML");function Z5(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(e=>e.segment):[...i]}B(Z5,"splitTextToChars");function K5(i,e){const r=Z5(e.content);return g1(i,[],r,e.type)}B(K5,"splitWordToFitWidth");function g1(i,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...o]=r,c=[...e,a];return i([{content:c.join(""),type:n}])?g1(i,c,o,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}B(g1,"splitWordToFitWidthRecursion");function J5(i,e){if(i.some(({content:r})=>r.includes(`
331
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return bg(i,e)}B(J5,"splitLineToFitWidth");function bg(i,e,r=[],n=[]){if(i.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let a="";i[0].content===" "&&(a=" ",i.shift());const o=i.shift()??{content:" ",type:"normal"},c=[...n];if(a!==""&&c.push({content:a,type:"normal"}),c.push(o),e(c))return bg(i,e,r,c);if(n.length>0)r.push(n),i.unshift(o);else if(o.content){const[h,u]=K5(e,o);r.push([h]),u.content&&i.unshift(u)}return bg(i,e,r)}B(bg,"splitLineToFitWidthRecursion");function bb(i,e){e&&i.attr("style",e)}B(bb,"applyStyle");var gw=16384;async function tM(i,e,r,n,a=!1,o=si()){const c=i.append("foreignObject");c.attr("width",`${Math.min(10*r,gw)}px`),c.attr("height",`${Math.min(10*r,gw)}px`);const h=c.append("xhtml:div"),u=ef(e.label)?await wA(e.label.replace(wf.lineBreakRegex,`
332
- `),o):zn(e.label,o),f=e.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(u),bb(p,e.labelStyle),p.attr("class",`${f} ${n}`),bb(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===r&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px"),g=h.node().getBoundingClientRect()),c.node()}B(tM,"addHtmlSpan");function em(i,e,r,n=!1){const a=i.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return n&&a.attr("text-anchor","middle"),a}B(em,"createTspan");function eM(i,e,r){const n=i.append("text"),a=em(n,1,e);im(a,r);const o=a.node().getComputedTextLength();return n.remove(),o}B(eM,"computeWidthOfText");function WH(i,e,r){var c;const n=i.append("text"),a=em(n,1,e);im(a,[{content:r,type:"normal"}]);const o=(c=a.node())==null?void 0:c.getBoundingClientRect();return o&&n.remove(),o}B(WH,"computeDimensionOfText");function iM(i,e,r,n=!1,a=!1){const c=e.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let f=0;for(const p of r){const g=B(y=>eM(c,1.1,y)<=i,"checkWidth"),x=g(p)?[p]:J5(p,g);for(const y of x){const v=em(u,f,1.1,a);im(v,y),f++}}if(n){const p=u.node().getBBox(),g=2;return h.attr("x",p.x-g).attr("y",p.y-g).attr("width",p.width+2*g).attr("height",p.height+2*g),c.node()}else return u.node()}B(iM,"createFormattedText");function vb(i){const e=/&(amp|lt|gt);/g;return i.replace(e,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}B(vb,"decodeHTMLEntities");function im(i,e){i.text(""),e.forEach((r,n)=>{const a=i.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?a.text(vb(r.content)):a.text(" "+vb(r.content))})}B(im,"updateTextContentAndStyles");async function rM(i,e={}){const r=[];i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,c)=>(r.push((async()=>{const h=`${o}:${c}`;return await UH(h)?await Nf(h,void 0,{class:"label-icon"}):`<i class='${zn(a,e).replace(":"," ")}'></i>`})()),a));const n=await Promise.all(r);return i.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}B(rM,"replaceIconSubstring");var gs=B(async(i,e="",{style:r="",isTitle:n=!1,classes:a="",useHtmlLabels:o=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:f=!1}={},p)=>{if(_t.debug("XYZ createText",e,r,n,a,o,h,"addSvgBackground: ",f),o){const g=c?Q5(e,p):X5(e),x=await rM(_l(g),p),y=e.replace(/\\\\/g,"\\"),v={isNode:h,label:ef(e)?y:x,labelStyle:r.replace("fill:","color:")};return await tM(i,v,u,a,f,p)}else{const g=_l(e.replace(/<br\s*\/?>/g,"<br/>")),x=c?V5(g.replace("<br>","<br/>"),p):G5(g),y=iM(u,i,x,e?f:!1,!h);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(y).attr("style",v)}else{const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(y).select("rect").attr("style",v.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(y).select("text").attr("style",C)}return n?Xt(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Xt(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function D0(i,e,r){if(i&&i.length){const[n,a]=e,o=Math.PI/180*r,c=Math.cos(o),h=Math.sin(o);for(const u of i){const[f,p]=u;u[0]=(f-n)*c-(p-a)*h+n,u[1]=(f-n)*h+(p-a)*c+a}}}function YH(i,e){return i[0]===e[0]&&i[1]===e[1]}function GH(i,e,r,n=1){const a=r,o=Math.max(e,.1),c=i[0]&&i[0][0]&&typeof i[0][0]=="number"?[i]:i,h=[0,0];if(a)for(const f of c)D0(f,h,a);const u=(function(f,p,g){const x=[];for(const T of f){const A=[...T];YH(A[0],A[A.length-1])||A.push([A[0][0],A[0][1]]),A.length>2&&x.push(A)}const y=[];p=Math.max(p,.1);const v=[];for(const T of x)for(let A=0;A<T.length-1;A++){const E=T[A],N=T[A+1];if(E[1]!==N[1]){const R=Math.min(E[1],N[1]);v.push({ymin:R,ymax:Math.max(E[1],N[1]),x:R===E[1]?E[0]:N[0],islope:(N[0]-E[0])/(N[1]-E[1])})}}if(v.sort(((T,A)=>T.ymin<A.ymin?-1:T.ymin>A.ymin?1:T.x<A.x?-1:T.x>A.x?1:T.ymax===A.ymax?0:(T.ymax-A.ymax)/Math.abs(T.ymax-A.ymax))),!v.length)return y;let C=[],_=v[0].ymin,w=0;for(;C.length||v.length;){if(v.length){let T=-1;for(let A=0;A<v.length&&!(v[A].ymin>_);A++)T=A;v.splice(0,T+1).forEach((A=>{C.push({s:_,edge:A})}))}if(C=C.filter((T=>!(T.edge.ymax<=_))),C.sort(((T,A)=>T.edge.x===A.edge.x?0:(T.edge.x-A.edge.x)/Math.abs(T.edge.x-A.edge.x))),(g!==1||w%p==0)&&C.length>1)for(let T=0;T<C.length;T+=2){const A=T+1;if(A>=C.length)break;const E=C[T].edge,N=C[A].edge;y.push([[Math.round(E.x),_],[Math.round(N.x),_]])}_+=g,C.forEach((T=>{T.edge.x=T.edge.x+g*T.edge.islope})),w++}return y})(c,o,n);if(a){for(const f of c)D0(f,h,-a);(function(f,p,g){const x=[];f.forEach((y=>x.push(...y))),D0(x,p,g)})(u,h,-a)}return u}function Of(i,e){var r;const n=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),GH(i,a,n,o||1)}let m1=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Of(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return n}};function rm(i){const e=i[0],r=i[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}let VH=class extends m1{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=Of(e,Object.assign({},r,{hachureGap:n})),o=Math.PI/180*r.hachureAngle,c=[],h=.5*n*Math.cos(o),u=.5*n*Math.sin(o);for(const[f,p]of a)rm([f,p])&&c.push([[f[0]-h,f[1]+u],[...p]],[[f[0]+h,f[1]-u],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,r)}}},XH=class extends m1{fillPolygons(e,r){const n=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(e,a);return n.ops=n.ops.concat(o.ops),n}},QH=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=Of(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const c=a/4;for(const h of e){const u=rm(h),f=u/a,p=Math.ceil(f)-1,g=u-p*a,x=(h[0][0]+h[1][0])/2-a/4,y=Math.min(h[0][1],h[1][1]);for(let v=0;v<p;v++){const C=y+g+v*a,_=x-c+2*Math.random()*c,w=C-c+2*Math.random()*c,T=this.helper.ellipse(_,w,o,o,r);n.push(...T.ops)}}return{type:"fillSketch",ops:n}}},ZH=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=Of(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){const n=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,o=[];return e.forEach((c=>{const h=rm(c),u=Math.floor(h/(n+a)),f=(h+a-u*(n+a))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const x=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let y=0;y<u;y++){const v=y*(n+a),C=v+n,_=[p[0]+v*Math.cos(x)+f*Math.cos(x),p[1]+v*Math.sin(x)+f*Math.sin(x)],w=[p[0]+C*Math.cos(x)+f*Math.cos(x),p[1]+C*Math.sin(x)+f*Math.sin(x)];o.push(...this.helper.doubleLineOps(_[0],_[1],w[0],w[1],r))}})),o}},KH=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?n:r.zigzagOffset,o=Of(e,r=Object.assign({},r,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(e,r,n){const a=[];return e.forEach((o=>{const c=rm(o),h=Math.round(c/(2*r));let u=o[0],f=o[1];u[0]>f[0]&&(u=o[1],f=o[0]);const p=Math.atan((f[1]-u[1])/(f[0]-u[0]));for(let g=0;g<h;g++){const x=2*g*r,y=2*(g+1)*r,v=Math.sqrt(2*Math.pow(r,2)),C=[u[0]+x*Math.cos(p),u[1]+x*Math.sin(p)],_=[u[0]+y*Math.cos(p),u[1]+y*Math.sin(p)],w=[C[0]+v*Math.cos(p+Math.PI/4),C[1]+v*Math.sin(p+Math.PI/4)];a.push(...this.helper.doubleLineOps(C[0],C[1],w[0],w[1],n),...this.helper.doubleLineOps(w[0],w[1],_[0],_[1],n))}})),a}};const Er={};let JH=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const tU=0,F0=1,mw=2,lp={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 $0(i,e){return i.type===e}function y1(i){const e=[],r=(function(c){const h=new Array;for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))h[h.length]={type:tU,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];h[h.length]={type:F0,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:mw,text:""},h})(i);let n="BOD",a=0,o=r[a];for(;!$0(o,mw);){let c=0;const h=[];if(n==="BOD"){if(o.text!=="M"&&o.text!=="m")return y1("M0,0"+i);a++,c=lp[o.text],n=o.text}else $0(o,F0)?c=lp[n]:(a++,c=lp[o.text],n=o.text);if(!(a+c<r.length))throw new Error("Path data ended short");for(let u=a;u<a+c;u++){const f=r[u];if(!$0(f,F0))throw new Error("Param not a number: "+n+","+f.text);h[h.length]=+f.text}if(typeof lp[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:h};e.push(u),a+=c,o=r[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function nM(i){let e=0,r=0,n=0,a=0;const o=[];for(const{key:c,data:h}of i)switch(c){case"M":o.push({key:"M",data:[...h]}),[e,r]=h,[n,a]=h;break;case"m":e+=h[0],r+=h[1],o.push({key:"M",data:[e,r]}),n=e,a=r;break;case"L":o.push({key:"L",data:[...h]}),[e,r]=h;break;case"l":e+=h[0],r+=h[1],o.push({key:"L",data:[e,r]});break;case"C":o.push({key:"C",data:[...h]}),e=h[4],r=h[5];break;case"c":{const u=h.map(((f,p)=>p%2?f+r:f+e));o.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":o.push({key:"Q",data:[...h]}),e=h[2],r=h[3];break;case"q":{const u=h.map(((f,p)=>p%2?f+r:f+e));o.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":o.push({key:"A",data:[...h]}),e=h[5],r=h[6];break;case"a":e+=h[5],r+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],e,r]});break;case"H":o.push({key:"H",data:[...h]}),e=h[0];break;case"h":e+=h[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...h]}),r=h[0];break;case"v":r+=h[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...h]}),e=h[2],r=h[3];break;case"s":{const u=h.map(((f,p)=>p%2?f+r:f+e));o.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":o.push({key:"T",data:[...h]}),e=h[0],r=h[1];break;case"t":e+=h[0],r+=h[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=n,r=a}return o}function aM(i){const e=[];let r="",n=0,a=0,o=0,c=0,h=0,u=0;for(const{key:f,data:p}of i){switch(f){case"M":e.push({key:"M",data:[...p]}),[n,a]=p,[o,c]=p;break;case"C":e.push({key:"C",data:[...p]}),n=p[4],a=p[5],h=p[2],u=p[3];break;case"L":e.push({key:"L",data:[...p]}),[n,a]=p;break;case"H":n=p[0],e.push({key:"L",data:[n,a]});break;case"V":a=p[0],e.push({key:"L",data:[n,a]});break;case"S":{let g=0,x=0;r==="C"||r==="S"?(g=n+(n-h),x=a+(a-u)):(g=n,x=a),e.push({key:"C",data:[g,x,...p]}),h=p[0],u=p[1],n=p[2],a=p[3];break}case"T":{const[g,x]=p;let y=0,v=0;r==="Q"||r==="T"?(y=n+(n-h),v=a+(a-u)):(y=n,v=a);const C=n+2*(y-n)/3,_=a+2*(v-a)/3,w=g+2*(y-g)/3,T=x+2*(v-x)/3;e.push({key:"C",data:[C,_,w,T,g,x]}),h=y,u=v,n=g,a=x;break}case"Q":{const[g,x,y,v]=p,C=n+2*(g-n)/3,_=a+2*(x-a)/3,w=y+2*(g-y)/3,T=v+2*(x-v)/3;e.push({key:"C",data:[C,_,w,T,y,v]}),h=g,u=x,n=y,a=v;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),y=p[2],v=p[3],C=p[4],_=p[5],w=p[6];g===0||x===0?(e.push({key:"C",data:[n,a,_,w,_,w]}),n=_,a=w):(n!==_||a!==w)&&(sM(n,a,_,w,g,x,y,v,C).forEach((function(T){e.push({key:"C",data:T})})),n=_,a=w);break}case"Z":e.push({key:"Z",data:[]}),n=o,a=c}r=f}return e}function gu(i,e,r){return[i*Math.cos(r)-e*Math.sin(r),i*Math.sin(r)+e*Math.cos(r)]}function sM(i,e,r,n,a,o,c,h,u,f){const p=(g=c,Math.PI*g/180);var g;let x=[],y=0,v=0,C=0,_=0;if(f)[y,v,C,_]=f;else{[i,e]=gu(i,e,-p),[r,n]=gu(r,n,-p);const W=(i-r)/2,F=(e-n)/2;let U=W*W/(a*a)+F*F/(o*o);U>1&&(U=Math.sqrt(U),a*=U,o*=U);const j=a*a,I=o*o,H=j*I-j*F*F-I*W*W,V=j*F*F+I*W*W,Z=(h===u?-1:1)*Math.sqrt(Math.abs(H/V));C=Z*a*F/o+(i+r)/2,_=Z*-o*W/a+(e+n)/2,y=Math.asin(parseFloat(((e-_)/o).toFixed(9))),v=Math.asin(parseFloat(((n-_)/o).toFixed(9))),i<C&&(y=Math.PI-y),r<C&&(v=Math.PI-v),y<0&&(y=2*Math.PI+y),v<0&&(v=2*Math.PI+v),u&&y>v&&(y-=2*Math.PI),!u&&v>y&&(v-=2*Math.PI)}let w=v-y;if(Math.abs(w)>120*Math.PI/180){const W=v,F=r,U=n;v=u&&v>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=sM(r=C+a*Math.cos(v),n=_+o*Math.sin(v),F,U,a,o,c,0,u,[v,W,C,_])}w=v-y;const T=Math.cos(y),A=Math.sin(y),E=Math.cos(v),N=Math.sin(v),R=Math.tan(w/4),M=4/3*a*R,O=4/3*o*R,Y=[i,e],$=[i+M*A,e-O*T],q=[r+M*N,n-O*E],J=[r,n];if($[0]=2*Y[0]-$[0],$[1]=2*Y[1]-$[1],f)return[$,q,J].concat(x);{x=[$,q,J].concat(x);const W=[];for(let F=0;F<x.length;F+=3){const U=gu(x[F][0],x[F][1],p),j=gu(x[F+1][0],x[F+1][1],p),I=gu(x[F+2][0],x[F+2][1],p);W.push([U[0],U[1],j[0],j[1],I[0],I[1]])}return W}}const eU={randOffset:function(i,e){return te(i,e)},randOffsetWithRange:function(i,e,r){return vg(i,e,r)},ellipse:function(i,e,r,n,a){const o=lM(r,n,a);return Cb(i,e,a,o).opset},doubleLineOps:function(i,e,r,n,a){return ko(i,e,r,n,a,!0)}};function oM(i,e,r,n,a){return{type:"path",ops:ko(i,e,r,n,a)}}function jp(i,e,r){const n=(i||[]).length;if(n>2){const a=[];for(let o=0;o<n-1;o++)a.push(...ko(i[o][0],i[o][1],i[o+1][0],i[o+1][1],r));return e&&a.push(...ko(i[n-1][0],i[n-1][1],i[0][0],i[0][1],r)),{type:"path",ops:a}}return n===2?oM(i[0][0],i[0][1],i[1][0],i[1][1],r):{type:"path",ops:[]}}function iU(i,e,r,n,a){return(function(o,c){return jp(o,!0,c)})([[i,e],[i+r,e],[i+r,e+n],[i,e+n]],a)}function yw(i,e){if(i.length){const r=typeof i[0][0]=="number"?[i]:i,n=cp(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:cp(r[0],1.5*(1+.22*e.roughness),vw(e));for(let o=1;o<r.length;o++){const c=r[o];if(c.length){const h=cp(c,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:cp(c,1.5*(1+.22*e.roughness),vw(e));for(const f of h)f.op!=="move"&&n.push(f);for(const f of u)f.op!=="move"&&a.push(f)}}return{type:"path",ops:n.concat(a)}}return{type:"path",ops:[]}}function lM(i,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(i/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),o=2*Math.PI/a;let c=Math.abs(i/2),h=Math.abs(e/2);const u=1-r.curveFitting;return c+=te(c*u,r),h+=te(h*u,r),{increment:o,rx:c,ry:h}}function Cb(i,e,r,n){const[a,o]=Cw(n.increment,i,e,n.rx,n.ry,1,n.increment*vg(.1,vg(.4,1,r),r),r);let c=Cg(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[h]=Cw(n.increment,i,e,n.rx,n.ry,1.5,0,r),u=Cg(h,null,r);c=c.concat(u)}return{estimatedPoints:o,opset:{type:"path",ops:c}}}function xw(i,e,r,n,a,o,c,h,u){const f=i,p=e;let g=Math.abs(r/2),x=Math.abs(n/2);g+=te(.01*g,u),x+=te(.01*x,u);let y=a,v=o;for(;y<0;)y+=2*Math.PI,v+=2*Math.PI;v-y>2*Math.PI&&(y=0,v=2*Math.PI);const C=2*Math.PI/u.curveStepCount,_=Math.min(C/2,(v-y)/2),w=kw(_,f,p,g,x,y,v,1,u);if(!u.disableMultiStroke){const T=kw(_,f,p,g,x,y,v,1.5,u);w.push(...T)}return c&&(h?w.push(...ko(f,p,f+g*Math.cos(y),p+x*Math.sin(y),u),...ko(f,p,f+g*Math.cos(v),p+x*Math.sin(v),u)):w.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(y),p+x*Math.sin(y)]})),{type:"path",ops:w}}function bw(i,e){const r=aM(nM(y1(i))),n=[];let a=[0,0],o=[0,0];for(const{key:c,data:h}of r)switch(c){case"M":o=[h[0],h[1]],a=[h[0],h[1]];break;case"L":n.push(...ko(o[0],o[1],h[0],h[1],e)),o=[h[0],h[1]];break;case"C":{const[u,f,p,g,x,y]=h;n.push(...rU(u,f,p,g,x,y,o,e)),o=[x,y];break}case"Z":n.push(...ko(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:n}}function z0(i,e){const r=[];for(const n of i)if(n.length){const a=e.maxRandomnessOffset||0,o=n.length;if(o>2){r.push({op:"move",data:[n[0][0]+te(a,e),n[0][1]+te(a,e)]});for(let c=1;c<o;c++)r.push({op:"lineTo",data:[n[c][0]+te(a,e),n[c][1]+te(a,e)]})}}return{type:"fillPath",ops:r}}function pc(i,e){return(function(r,n){let a=r.fillStyle||"hachure";if(!Er[a])switch(a){case"zigzag":Er[a]||(Er[a]=new VH(n));break;case"cross-hatch":Er[a]||(Er[a]=new XH(n));break;case"dots":Er[a]||(Er[a]=new QH(n));break;case"dashed":Er[a]||(Er[a]=new ZH(n));break;case"zigzag-line":Er[a]||(Er[a]=new KH(n));break;default:a="hachure",Er[a]||(Er[a]=new m1(n))}return Er[a]})(e,eU).fillPolygons(i,e)}function vw(i){const e=Object.assign({},i);return e.randomizer=void 0,i.seed&&(e.seed=i.seed+1),e}function cM(i){return i.randomizer||(i.randomizer=new JH(i.seed||0)),i.randomizer.next()}function vg(i,e,r,n=1){return r.roughness*n*(cM(r)*(e-i)+i)}function te(i,e,r=1){return vg(-i,i,e,r)}function ko(i,e,r,n,a,o=!1){const c=o?a.disableMultiStrokeFill:a.disableMultiStroke,h=kb(i,e,r,n,a,!0,!1);if(c)return h;const u=kb(i,e,r,n,a,!0,!0);return h.concat(u)}function kb(i,e,r,n,a,o,c){const h=Math.pow(i-r,2)+Math.pow(e-n,2),u=Math.sqrt(h);let f=1;f=u<200?1:u>500?.4:-.0016668*u+1.233334;let p=a.maxRandomnessOffset||0;p*p*100>h&&(p=u/10);const g=p/2,x=.2+.2*cM(a);let y=a.bowing*a.maxRandomnessOffset*(n-e)/200,v=a.bowing*a.maxRandomnessOffset*(i-r)/200;y=te(y,a,f),v=te(v,a,f);const C=[],_=()=>te(g,a,f),w=()=>te(p,a,f),T=a.preserveVertices;return c?C.push({op:"move",data:[i+(T?0:_()),e+(T?0:_())]}):C.push({op:"move",data:[i+(T?0:te(p,a,f)),e+(T?0:te(p,a,f))]}),c?C.push({op:"bcurveTo",data:[y+i+(r-i)*x+_(),v+e+(n-e)*x+_(),y+i+2*(r-i)*x+_(),v+e+2*(n-e)*x+_(),r+(T?0:_()),n+(T?0:_())]}):C.push({op:"bcurveTo",data:[y+i+(r-i)*x+w(),v+e+(n-e)*x+w(),y+i+2*(r-i)*x+w(),v+e+2*(n-e)*x+w(),r+(T?0:w()),n+(T?0:w())]}),C}function cp(i,e,r){if(!i.length)return[];const n=[];n.push([i[0][0]+te(e,r),i[0][1]+te(e,r)]),n.push([i[0][0]+te(e,r),i[0][1]+te(e,r)]);for(let a=1;a<i.length;a++)n.push([i[a][0]+te(e,r),i[a][1]+te(e,r)]),a===i.length-1&&n.push([i[a][0]+te(e,r),i[a][1]+te(e,r)]);return Cg(n,null,r)}function Cg(i,e,r){const n=i.length,a=[];if(n>3){const o=[],c=1-r.curveTightness;a.push({op:"move",data:[i[1][0],i[1][1]]});for(let h=1;h+2<n;h++){const u=i[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*i[h+1][0]-c*i[h-1][0])/6,u[1]+(c*i[h+1][1]-c*i[h-1][1])/6],o[2]=[i[h+1][0]+(c*i[h][0]-c*i[h+2][0])/6,i[h+1][1]+(c*i[h][1]-c*i[h+2][1])/6],o[3]=[i[h+1][0],i[h+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else n===3?(a.push({op:"move",data:[i[1][0],i[1][1]]}),a.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[2][0],i[2][1]]})):n===2&&a.push(...kb(i[0][0],i[0][1],i[1][0],i[1][1],r,!0,!0));return a}function Cw(i,e,r,n,a,o,c,h){const u=[],f=[];if(h.roughness===0){i/=4,f.push([e+n*Math.cos(-i),r+a*Math.sin(-i)]);for(let p=0;p<=2*Math.PI;p+=i){const g=[e+n*Math.cos(p),r+a*Math.sin(p)];u.push(g),f.push(g)}f.push([e+n*Math.cos(0),r+a*Math.sin(0)]),f.push([e+n*Math.cos(i),r+a*Math.sin(i)])}else{const p=te(.5,h)-Math.PI/2;f.push([te(o,h)+e+.9*n*Math.cos(p-i),te(o,h)+r+.9*a*Math.sin(p-i)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=i){const y=[te(o,h)+e+n*Math.cos(x),te(o,h)+r+a*Math.sin(x)];u.push(y),f.push(y)}f.push([te(o,h)+e+n*Math.cos(p+2*Math.PI+.5*c),te(o,h)+r+a*Math.sin(p+2*Math.PI+.5*c)]),f.push([te(o,h)+e+.98*n*Math.cos(p+c),te(o,h)+r+.98*a*Math.sin(p+c)]),f.push([te(o,h)+e+.9*n*Math.cos(p+.5*c),te(o,h)+r+.9*a*Math.sin(p+.5*c)])}return[f,u]}function kw(i,e,r,n,a,o,c,h,u){const f=o+te(.1,u),p=[];p.push([te(h,u)+e+.9*n*Math.cos(f-i),te(h,u)+r+.9*a*Math.sin(f-i)]);for(let g=f;g<=c;g+=i)p.push([te(h,u)+e+n*Math.cos(g),te(h,u)+r+a*Math.sin(g)]);return p.push([e+n*Math.cos(c),r+a*Math.sin(c)]),p.push([e+n*Math.cos(c),r+a*Math.sin(c)]),Cg(p,null,u)}function rU(i,e,r,n,a,o,c,h){const u=[],f=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let y=0;y<g;y++)y===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(x?0:te(f[0],h)),c[1]+(x?0:te(f[0],h))]}),p=x?[a,o]:[a+te(f[y],h),o+te(f[y],h)],u.push({op:"bcurveTo",data:[i+te(f[y],h),e+te(f[y],h),r+te(f[y],h),n+te(f[y],h),p[0],p[1]]});return u}function mu(i){return[...i]}function _w(i,e=0){const r=i.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(mu(i[0]),mu(i[1]),mu(i[2]),mu(i[2]));else{const a=[];a.push(i[0],i[0]);for(let h=1;h<i.length;h++)a.push(i[h]),h===i.length-1&&a.push(i[h]);const o=[],c=1-e;n.push(mu(a[0]));for(let h=1;h+2<a.length;h++){const u=a[h];o[0]=[u[0],u[1]],o[1]=[u[0]+(c*a[h+1][0]-c*a[h-1][0])/6,u[1]+(c*a[h+1][1]-c*a[h-1][1])/6],o[2]=[a[h+1][0]+(c*a[h][0]-c*a[h+2][0])/6,a[h+1][1]+(c*a[h][1]-c*a[h+2][1])/6],o[3]=[a[h+1][0],a[h+1][1]],n.push(o[1],o[2],o[3])}}return n}function Rp(i,e){return Math.pow(i[0]-e[0],2)+Math.pow(i[1]-e[1],2)}function nU(i,e,r){const n=Rp(e,r);if(n===0)return Rp(i,e);let a=((i[0]-e[0])*(r[0]-e[0])+(i[1]-e[1])*(r[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),Rp(i,Xo(e,r,a))}function Xo(i,e,r){return[i[0]+(e[0]-i[0])*r,i[1]+(e[1]-i[1])*r]}function _b(i,e,r,n){const a=n||[];if((function(h,u){const f=h[u+0],p=h[u+1],g=h[u+2],x=h[u+3];let y=3*p[0]-2*f[0]-x[0];y*=y;let v=3*p[1]-2*f[1]-x[1];v*=v;let C=3*g[0]-2*x[0]-f[0];C*=C;let _=3*g[1]-2*x[1]-f[1];return _*=_,y<C&&(y=C),v<_&&(v=_),y+v})(i,e)<r){const h=i[e+0];a.length?(o=a[a.length-1],c=h,Math.sqrt(Rp(o,c))>1&&a.push(h)):a.push(h),a.push(i[e+3])}else{const u=i[e+0],f=i[e+1],p=i[e+2],g=i[e+3],x=Xo(u,f,.5),y=Xo(f,p,.5),v=Xo(p,g,.5),C=Xo(x,y,.5),_=Xo(y,v,.5),w=Xo(C,_,.5);_b([u,x,C,w],0,r,a),_b([w,_,v,g],0,r,a)}var o,c;return a}function aU(i,e){return kg(i,0,i.length,e)}function kg(i,e,r,n,a){const o=a||[],c=i[e],h=i[r-1];let u=0,f=1;for(let p=e+1;p<r-1;++p){const g=nU(i[p],c,h);g>u&&(u=g,f=p)}return Math.sqrt(u)>n?(kg(i,e,f+1,n,o),kg(i,f,r,n,o)):(o.length||o.push(c),o.push(h)),o}function q0(i,e=.15,r){const n=[],a=(i.length-1)/3;for(let o=0;o<a;o++)_b(i,3*o,e,n);return r&&r>0?kg(n,0,n.length,r):n}const Gr="none";class _g{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,a,o){const c=this._o(o);return this._d("line",[oM(e,r,n,a,c)],c)}rectangle(e,r,n,a,o){const c=this._o(o),h=[],u=iU(e,r,n,a,c);if(c.fill){const f=[[e,r],[e+n,r],[e+n,r+a],[e,r+a]];c.fillStyle==="solid"?h.push(z0([f],c)):h.push(pc([f],c))}return c.stroke!==Gr&&h.push(u),this._d("rectangle",h,c)}ellipse(e,r,n,a,o){const c=this._o(o),h=[],u=lM(n,a,c),f=Cb(e,r,c,u);if(c.fill)if(c.fillStyle==="solid"){const p=Cb(e,r,c,u).opset;p.type="fillPath",h.push(p)}else h.push(pc([f.estimatedPoints],c));return c.stroke!==Gr&&h.push(f.opset),this._d("ellipse",h,c)}circle(e,r,n,a){const o=this.ellipse(e,r,n,n,a);return o.shape="circle",o}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[jp(e,!1,n)],n)}arc(e,r,n,a,o,c,h=!1,u){const f=this._o(u),p=[],g=xw(e,r,n,a,o,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const x=Object.assign({},f);x.disableMultiStroke=!0;const y=xw(e,r,n,a,o,c,!0,!1,x);y.type="fillPath",p.push(y)}else p.push((function(x,y,v,C,_,w,T){const A=x,E=y;let N=Math.abs(v/2),R=Math.abs(C/2);N+=te(.01*N,T),R+=te(.01*R,T);let M=_,O=w;for(;M<0;)M+=2*Math.PI,O+=2*Math.PI;O-M>2*Math.PI&&(M=0,O=2*Math.PI);const Y=(O-M)/T.curveStepCount,$=[];for(let q=M;q<=O;q+=Y)$.push([A+N*Math.cos(q),E+R*Math.sin(q)]);return $.push([A+N*Math.cos(O),E+R*Math.sin(O)]),$.push([A,E]),pc([$],T)})(e,r,n,a,o,c,f));return f.stroke!==Gr&&p.push(g),this._d("arc",p,f)}curve(e,r){const n=this._o(r),a=[],o=yw(e,n);if(n.fill&&n.fill!==Gr)if(n.fillStyle==="solid"){const c=yw(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=e;if(h.length){const u=typeof h[0][0]=="number"?[h]:h;for(const f of u)f.length<3?c.push(...f):f.length===3?c.push(...q0(_w([f[0],f[0],f[1],f[2]]),10,(1+n.roughness)/2)):c.push(...q0(_w(f),10,(1+n.roughness)/2))}c.length&&a.push(pc([c],n))}return n.stroke!==Gr&&a.push(o),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],o=jp(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(z0([e],n)):a.push(pc([e],n))),n.stroke!==Gr&&a.push(o),this._d("polygon",a,n)}path(e,r){const n=this._o(r),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&n.fill!=="transparent"&&n.fill!==Gr,c=n.stroke!==Gr,h=!!(n.simplification&&n.simplification<1),u=(function(p,g,x){const y=aM(nM(y1(p))),v=[];let C=[],_=[0,0],w=[];const T=()=>{w.length>=4&&C.push(...q0(w,g)),w=[]},A=()=>{T(),C.length&&(v.push(C),C=[])};for(const{key:N,data:R}of y)switch(N){case"M":A(),_=[R[0],R[1]],C.push(_);break;case"L":T(),C.push([R[0],R[1]]);break;case"C":if(!w.length){const M=C.length?C[C.length-1]:_;w.push([M[0],M[1]])}w.push([R[0],R[1]]),w.push([R[2],R[3]]),w.push([R[4],R[5]]);break;case"Z":T(),C.push([_[0],_[1]])}if(A(),!x)return v;const E=[];for(const N of v){const R=aU(N,x);R.length&&E.push(R)}return E})(e,1,h?4-4*(n.simplification||1):(1+n.roughness)/2),f=bw(e,n);if(o)if(n.fillStyle==="solid")if(u.length===1){const p=bw(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else a.push(z0(u,n));else a.push(pc(u,n));return c&&(h?u.forEach((p=>{a.push(jp(p,!1,n))})):a.push(f)),this._d("path",a,n)}opsToPath(e,r){let n="";for(const a of e.ops){const o=typeof r=="number"&&r>=0?a.data.map((c=>+c.toFixed(r))):a.data;switch(a.op){case"move":n+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":n+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":n+=`L${o[0]} ${o[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const o of r){let c=null;switch(o.type){case"path":c={d:this.opsToPath(o),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Gr};break;case"fillPath":c={d:this.opsToPath(o),stroke:Gr,strokeWidth:0,fill:n.fill||Gr};break;case"fillSketch":c=this.fillSketch(o,n)}c&&a.push(c)}return a}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Gr,strokeWidth:n,fill:Gr}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}}class sU{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new _g(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const c of r)switch(c.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,c,o),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";const h=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,c,o,h),a.restore();break}case"fillSketch":this.fillSketch(a,c,n)}}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,a="nonzero"){e.beginPath();for(const o of r.ops){const c=typeof n=="number"&&n>=0?o.data.map((h=>+h.toFixed(n))):o.data;switch(o.op){case"move":e.moveTo(c[0],c[1]);break;case"bcurveTo":e.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":e.lineTo(c[0],c[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,a,o){const c=this.gen.line(e,r,n,a,o);return this.draw(c),c}rectangle(e,r,n,a,o){const c=this.gen.rectangle(e,r,n,a,o);return this.draw(c),c}ellipse(e,r,n,a,o){const c=this.gen.ellipse(e,r,n,a,o);return this.draw(c),c}circle(e,r,n,a){const o=this.gen.circle(e,r,n,a);return this.draw(o),o}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,a,o,c,h=!1,u){const f=this.gen.arc(e,r,n,a,o,c,h,u);return this.draw(f),f}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}}const hp="http://www.w3.org/2000/svg";class oU{constructor(e,r){this.svg=e,this.gen=new _g(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(hp,"g"),c=e.options.fixedDecimalPlaceDigits;for(const h of r){let u=null;switch(h.type){case"path":u=a.createElementNS(hp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(hp,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,h,n)}u&&o.appendChild(u)}return o}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const o=e.createElementNS(hp,"path");return o.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,a,o){const c=this.gen.line(e,r,n,a,o);return this.draw(c)}rectangle(e,r,n,a,o){const c=this.gen.rectangle(e,r,n,a,o);return this.draw(c)}ellipse(e,r,n,a,o){const c=this.gen.ellipse(e,r,n,a,o);return this.draw(c)}circle(e,r,n,a){const o=this.gen.circle(e,r,n,a);return this.draw(o)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,a,o,c,h=!1,u){const f=this.gen.arc(e,r,n,a,o,c,h,u);return this.draw(f)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}}var Dt={canvas:(i,e)=>new sU(i,e),svg:(i,e)=>new oU(i,e),generator:i=>new _g(i),newSeed:()=>_g.newSeed()},Jt=B(async(i,e,r)=>{var y,v;let n;const a=e.useHtmlLabels||ds((y=Ae())==null?void 0:y.htmlLabels);r?n=r:n="node default";const o=i.insert("g").attr("class",n).attr("id",e.domId||e.id),c=o.insert("g").attr("class","label").attr("style",$i(e.labelStyle));let h;e.label===void 0?h="":h=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,f=e.labelType==="markdown",p=await gs(c,zn(_l(h),Ae()),{useHtmlLabels:a,width:e.width||((v=Ae().flowchart)==null?void 0:v.wrappingWidth),classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:f},Ae());let g=p.getBBox();const x=((e==null?void 0:e.padding)??0)/2;if(a){const C=p.children[0],_=Xt(p);await E5(C,h),g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height)}return a?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:x,label:c}},"labelHelper"),I0=B(async(i,e,r)=>{var u,f;const n=r.useHtmlLabels??vr(Ae()),a=i.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await gs(a,zn(_l(e),Ae()),{useHtmlLabels:n,width:r.width||((f=(u=Ae())==null?void 0:u.flowchart)==null?void 0:f.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=o.getBBox();const h=r.padding/2;if(vr(Ae())){const p=o.children[0],g=Xt(o);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return n?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:i,bbox:c,halfPadding:h,label:a}},"insertLabel"),qt=B((i,e)=>{const r=e.node().getBBox();i.width=r.width,i.height=r.height},"updateNodeBounds"),Qt=B((i,e)=>(i.look==="handDrawn"?"rough-node":"node")+" "+i.cssClasses+" "+(e||""),"getNodeClasses");function ve(i){const e=i.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}B(ve,"createPathFromPoints");function _o(i,e,r,n,a,o){const c=[],u=r-i,f=n-e,p=u/o,g=2*Math.PI/p,x=e+f/2;for(let y=0;y<=50;y++){const v=y/50,C=i+v*u,_=x+a*Math.sin(g*(C-i));c.push({x:C,y:_})}return c}B(_o,"generateFullSineWavePoints");function pf(i,e,r,n,a,o){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}B(pf,"generateCirclePoints");function Sb(i){const e=Array.from(i.childNodes).filter(u=>u.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",n);const a=e.find(u=>u.getAttribute("fill")!=="none"),o=e.find(u=>u.getAttribute("stroke")!=="none"),c=B((u,f)=>(u==null?void 0:u.getAttribute(f))??void 0,"getAttr");if(a){const u={fill:c(a,"fill"),"fill-opacity":c(a,"fill-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&r.setAttribute(f,p)})}if(o){const u={stroke:c(o,"stroke"),"stroke-width":c(o,"stroke-width")??"1","stroke-opacity":c(o,"stroke-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&r.setAttribute(f,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(r),h}B(Sb,"mergePaths");var lU=B((i,e)=>{var r=i.x,n=i.y,a=e.x-r,o=e.y-n,c=i.width/2,h=i.height/2,u,f;return Math.abs(o)*c>Math.abs(a)*h?(o<0&&(h=-h),u=o===0?0:h*a/o,f=h):(a<0&&(c=-c),u=c,f=a===0?0:c*o/a),{x:r+u,y:n+f}},"intersectRect"),fh=lU,cU=B(async(i,e,r,n=!1,a=!1)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const c=Ae(),h=vr(c);return await gs(i,o,{style:r,isTitle:n,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},c)},"createLabel"),po=cU,wo=B((i,e,r,n,a)=>["M",i+a,e,"H",i+r-a,"A",a,a,0,0,1,i+r,e+a,"V",e+n-a,"A",a,a,0,0,1,i+r-a,e+n,"H",i+a,"A",a,a,0,0,1,i,e+n-a,"V",e+a,"A",a,a,0,0,1,i+a,e,"Z"].join(" "),"createRoundedRectPathD"),hM=B(async(i,e)=>{_t.info("Creating subgraph rect for ",e.id,e);const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=$t(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=vr(r),y=g.insert("g").attr("class","cluster-label ");let v;e.labelType==="markdown"?v=await gs(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}):v=await po(y,e.label,e.labelStyle||"",!1,!0);let C=v.getBBox();if(vr(r)){const M=v.children[0],O=Xt(v);C=M.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-_/2,A=e.y-w/2;_t.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const M=Dt.svg(g),O=Ft(e,{roughness:.7,fill:o,stroke:c,fillWeight:3,seed:a}),Y=M.path(wo(T,A,_,w,0),O);E=g.insert(()=>(_t.debug("Rough node insert CXC",Y),Y),":first-child"),E.select("path:nth-child(2)").attr("style",f.join(";")),E.select("path").attr("style",p.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",A).attr("width",_).attr("height",w);const{subGraphTitleTopMargin:N}=a1(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+N})`),h){const M=y.select("span");M&&M.attr("style",h)}const R=E.node().getBBox();return e.offsetX=0,e.width=R.width,e.height=R.height,e.offsetY=C.height-e.padding/2,e.intersect=function(M){return fh(e,M)},{cluster:g,labelBBox:C}},"rect"),hU=B((i,e)=>{const r=i.insert("g").attr("class","note-cluster").attr("id",e.domId),n=r.insert("rect",":first-child"),a=0*e.padding,o=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const c=n.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(h){return fh(e,h)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),uU=B(async(i,e)=>{const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=n,f=i.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let x=f.append("rect");const y=await po(g,e.label,e.labelStyle,void 0,!0);let v=y.getBBox();if(vr(r)){const Y=y.children[0],$=Xt(y);v=Y.getBoundingClientRect(),$.attr("width",v.width),$.attr("height",v.height)}const C=0*e.padding,_=C/2,w=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+C;e.width<=v.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+C,A=e.height+C-v.height-6,E=e.x-w/2,N=e.y-T/2;e.width=w;const R=e.y-e.height/2-_+v.height+2;let M;if(e.look==="handDrawn"){const Y=e.cssClasses.includes("statediagram-cluster-alt"),$=Dt.svg(f),q=e.rx||e.ry?$.path(wo(E,N,w,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:a}):$.rectangle(E,N,w,T,{seed:a});M=f.insert(()=>q,":first-child");const J=$.rectangle(E,R,w,A,{fill:Y?o:c,fillStyle:Y?"hachure":"solid",stroke:u,seed:a});M=f.insert(()=>q,":first-child"),x=f.insert(()=>J)}else M=p.insert("rect",":first-child"),M.attr("class","outer").attr("x",E).attr("y",N).attr("width",w).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",E).attr("y",R).attr("width",w).attr("height",A);g.attr("transform",`translate(${e.x-v.width/2}, ${N+1-(vr(r)?0:3)})`);const O=M.node().getBBox();return e.height=O.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(Y){return fh(e,Y)},{cluster:f,labelBBox:v}},"roundedWithTitle"),fU=B(async(i,e)=>{_t.info("Creating subgraph rect for ",e.id,e);const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:c}=n,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=$t(e),g=i.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=vr(r),y=g.insert("g").attr("class","cluster-label "),v=await gs(y,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let C=v.getBBox();if(vr(r)){const M=v.children[0],O=Xt(v);C=M.getBoundingClientRect(),O.attr("width",C.width),O.attr("height",C.height)}const _=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height,T=e.x-_/2,A=e.y-w/2;_t.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const M=Dt.svg(g),O=Ft(e,{roughness:.7,fill:o,stroke:c,fillWeight:4,seed:a}),Y=M.path(wo(T,A,_,w,e.rx),O);E=g.insert(()=>(_t.debug("Rough node insert CXC",Y),Y),":first-child"),E.select("path:nth-child(2)").attr("style",f.join(";")),E.select("path").attr("style",p.join(";").replace("fill","stroke"))}else E=g.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",A).attr("width",_).attr("height",w);const{subGraphTitleTopMargin:N}=a1(r);if(y.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+N})`),h){const M=y.select("span");M&&M.attr("style",h)}const R=E.node().getBBox();return e.offsetX=0,e.width=R.width,e.height=R.height,e.offsetY=C.height-e.padding/2,e.intersect=function(M){return fh(e,M)},{cluster:g,labelBBox:C}},"kanbanSection"),dU=B((i,e)=>{const r=Ae(),{themeVariables:n,handDrawnSeed:a}=r,{nodeBorder:o}=n,c=i.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=c.insert("g",":first-child"),u=0*e.padding,f=e.width+u;e.diff=-e.padding;const p=e.height+u,g=e.x-f/2,x=e.y-p/2;e.width=f;let y;if(e.look==="handDrawn"){const _=Dt.svg(c).rectangle(g,x,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});y=c.insert(()=>_,":first-child")}else{y=h.insert("rect",":first-child");let C="outer";e.look,C="divider",y.attr("class",C).attr("x",g).attr("y",x).attr("width",f).attr("height",p).attr("data-look",e.look)}const v=y.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(C){return fh(e,C)},{cluster:c,labelBBox:{}}},"divider"),pU=hM,gU={rect:hM,squareRect:pU,roundedWithTitle:uU,noteGroup:hU,divider:dU,kanbanSection:fU},uM=new Map,mU=B(async(i,e)=>{const r=e.shape||"rect",n=await gU[r](i,e);return uM.set(e.id,n),n},"insertCluster"),Ait=B(()=>{uM=new Map},"clear");function fM(i,e){return i.intersect(e)}B(fM,"intersectNode");var yU=fM;function dM(i,e,r,n){var a=i.x,o=i.y,c=a-n.x,h=o-n.y,u=Math.sqrt(e*e*h*h+r*r*c*c),f=Math.abs(e*r*c/u);n.x<a&&(f=-f);var p=Math.abs(e*r*h/u);return n.y<o&&(p=-p),{x:a+f,y:o+p}}B(dM,"intersectEllipse");var pM=dM;function gM(i,e,r){return pM(i,e,e,r)}B(gM,"intersectCircle");var xU=gM;function mM(i,e,r,n){{const a=e.y-i.y,o=i.x-e.x,c=e.x*i.y-i.x*e.y,h=a*r.x+o*r.y+c,u=a*n.x+o*n.y+c,f=1e-6;if(h!==0&&u!==0&&wb(h,u))return;const p=n.y-r.y,g=r.x-n.x,x=n.x*r.y-r.x*n.y,y=p*i.x+g*i.y+x,v=p*e.x+g*e.y+x;if(Math.abs(y)<f&&Math.abs(v)<f&&wb(y,v))return;const C=a*g-p*o;if(C===0)return;const _=Math.abs(C/2);let w=o*x-g*c;const T=w<0?(w-_)/C:(w+_)/C;w=p*c-a*x;const A=w<0?(w-_)/C:(w+_)/C;return{x:T,y:A}}}B(mM,"intersectLine");function wb(i,e){return i*e>0}B(wb,"sameSign");var bU=mM;function yM(i,e,r){let n=i.x,a=i.y,o=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,e.x),h=Math.min(h,e.y));let u=n-i.width/2-c,f=a-i.height/2-h;for(let p=0;p<e.length;p++){let g=e[p],x=e[p<e.length-1?p+1:0],y=bU(i,r,{x:u+g.x,y:f+g.y},{x:u+x.x,y:f+x.y});y&&o.push(y)}return o.length?(o.length>1&&o.sort(function(p,g){let x=p.x-r.x,y=p.y-r.y,v=Math.sqrt(x*x+y*y),C=g.x-r.x,_=g.y-r.y,w=Math.sqrt(C*C+_*_);return v<w?-1:v===w?0:1}),o[0]):i}B(yM,"intersectPolygon");var vU=yM,Ot={node:yU,circle:xU,ellipse:pM,polygon:vU,rect:fh};function xM(i,e){const{labelStyles:r}=$t(e);e.labelStyle=r;const n=Qt(e);let a=n;n||(a="anchor");const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=1,{cssStyles:h}=e,u=Dt.svg(o),f=Ft(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);const p=u.circle(0,0,c*2,f),g=o.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",$i(h)),qt(e,g),e.intersect=function(x){return _t.info("Circle intersect",e,c,x),Ot.circle(e,c,x)},o}B(xM,"anchor");function Tb(i,e,r,n,a,o,c){const u=(i+r)/2,f=(e+n)/2,p=Math.atan2(n-e,r-i),g=(r-i)/2,x=(n-e)/2,y=g/a,v=x/o,C=Math.sqrt(y**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const _=Math.sqrt(1-C**2),w=u+_*o*Math.sin(p)*(c?-1:1),T=f-_*a*Math.cos(p)*(c?-1:1),A=Math.atan2((e-T)/o,(i-w)/a);let N=Math.atan2((n-T)/o,(r-w)/a)-A;c&&N<0&&(N+=2*Math.PI),!c&&N>0&&(N-=2*Math.PI);const R=[];for(let M=0;M<20;M++){const O=M/19,Y=A+O*N,$=w+a*Math.cos(Y),q=T+o*Math.sin(Y);R.push({x:$,y:q})}return R}B(Tb,"generateArcPoints");function bM(i,e,r){const[n,a]=[e,r].sort((o,c)=>c-o);return a*(1-Math.sqrt(1-(i/n/2)**2))}B(bM,"calculateArcSagitta");async function vM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=B(Y=>Y+c,"calcTotalHeight"),u=B(Y=>{const $=Y/2;return[$/(2.5+Y/50),$]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await Jt(i,e,Qt(e)),g=h(e!=null&&e.height?e==null?void 0:e.height:p.height),[x,y]=u(g),v=bM(g,x,y),_=(e!=null&&e.width?e==null?void 0:e.width:p.width)+o*2+v-v,w=g,{cssStyles:T}=e,A=[{x:_/2,y:-w/2},{x:-_/2,y:-w/2},...Tb(-_/2,-w/2,-_/2,w/2,x,y,!1),{x:_/2,y:w/2},...Tb(_/2,w/2,_/2,-w/2,x,y,!0)],E=Dt.svg(f),N=Ft(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const R=ve(A),M=E.path(R,N),O=f.insert(()=>M,":first-child");return O.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(${x/2}, 0)`),qt(e,O),e.intersect=function(Y){return Ot.polygon(e,A,Y)},f}B(vM,"bowTieRect");function ms(i,e,r,n){return i.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}B(ms,"insertPolygonShape");var up=12;async function CM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?28:a,c=e.look==="neo"?24:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o+up),p=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),g=0,x=f,y=-p,v=0,C=[{x:g+up,y},{x,y},{x,y:v},{x:g,y:v},{x:g,y:y+up},{x:g+up,y}];let _;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=Dt.svg(h),A=Ft(e,{}),E=ve(C),N=T.path(E,A);_=h.insert(()=>N,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),w&&_.attr("style",w)}else _=ms(h,f,p,C);return n&&_.attr("style",n),qt(e,_),e.intersect=function(T){return Ot.polygon(e,C,T)},h}B(CM,"card");function kM(i,e){const{nodeStyles:r}=$t(e);e.label="";const n=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),c=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],h=Dt.svg(n),u=Ft(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ve(c),p=h.path(f,u),g=n.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(x){return Ot.polygon(e,c,x)},n}B(kM,"choice");async function x1(i,e,r){const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n;const{shapeSvg:o,bbox:c,halfPadding:h}=await Jt(i,e,Qt(e)),u=16,f=(r==null?void 0:r.padding)??h,p=e.look==="neo"?c.width/2+u*2:c.width/2+f;let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const y=Dt.svg(o),v=Ft(e,{}),C=y.circle(0,0,p*2,v);g=o.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",$i(x))}else g=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0);return qt(e,g),e.calcIntersect=function(y,v){const C=y.width/2;return Ot.circle(y,C,v)},e.intersect=function(y){return _t.info("Circle intersect",e,p,y),Ot.circle(e,p,y)},o}B(x1,"circle");function _M(i){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=i*2,a={x:n/2*e,y:n/2*r},o={x:-(n/2)*e,y:n/2*r},c={x:-(n/2)*e,y:-(n/2)*r},h={x:n/2*e,y:-(n/2)*r};return`M ${o.x},${o.y} L ${h.x},${h.y}
333
- M ${a.x},${a.y} L ${c.x},${c.y}`}B(_M,"createLine");function SM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r,e.label="";const a=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),o=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:c}=e,h=Dt.svg(a),u=Ft(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,o*2,u),p=_M(o),g=h.path(p,u),x=a.insert(()=>f,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",c),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),qt(e,x),e.intersect=function(y){return _t.info("crossedCircle intersect",e,{radius:o,point:y}),Ot.circle(e,o,y)},a}B(SM,"crossedCircle");function Ka(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}B(Ka,"generateCirclePoints");async function wM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,f=o.width+h,p=o.height+u,g=Math.max(5,p*.1),{cssStyles:x}=e,y=[...Ka(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...Ka(f/2+g*2,-g,g,20,-180,-270),...Ka(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...Ka(f/2,p/2,g,20,0,90)],v=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...Ka(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...Ka(f/2+f*.1,-g,g,20,-180,-270),...Ka(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...Ka(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],C=Dt.svg(a),_=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ve(y).replace("Z",""),A=C.path(T,_),E=ve(v),N=C.path(E,{..._}),R=a.insert("g",":first-child");return R.insert(()=>N,":first-child").attr("stroke-opacity",0),R.insert(()=>A,":first-child"),R.attr("class","text"),x&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",n),R.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-f/2+g-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),qt(e,R),e.intersect=function(M){return Ot.polygon(e,v,M)},a}B(wM,"curlyBraceLeft");function Ja(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:y,y:v})}return c}B(Ja,"generateCirclePoints");async function TM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,f=o.width+(e.look==="neo"?h*2:h),p=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=e,y=[...Ja(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...Ja(f/2+g*2,-g,g,20,-180,-270),...Ja(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...Ja(f/2,p/2,g,20,0,90)],v=[{x:-f/2,y:-p/2-g},{x:f/2,y:-p/2-g},...Ja(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...Ja(f/2+g*2,-g,g,20,-180,-270),...Ja(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...Ja(f/2,p/2,g,20,0,90),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],C=Dt.svg(a),_=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const T=ve(y).replace("Z",""),A=C.path(T,_),E=ve(v),N=C.path(E,{..._}),R=a.insert("g",":first-child");return R.insert(()=>N,":first-child").attr("stroke-opacity",0),R.insert(()=>A,":first-child"),R.attr("class","text"),x&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",n),R.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),qt(e,R),e.intersect=function(M){return Ot.polygon(e,v,M)},a}B(TM,"curlyBraceRight");function Vi(i,e,r,n=100,a=0,o=180){const c=[],h=a*Math.PI/180,p=(o*Math.PI/180-h)/(n-1);for(let g=0;g<n;g++){const x=h+g*p,y=i+r*Math.cos(x),v=e+r*Math.sin(x);c.push({x:-y,y:-v})}return c}B(Vi,"generateCirclePoints");async function BM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.look==="neo"?18:e.padding??0,u=e.look==="neo"?12:e.padding??0,f=o.width+(e.look==="neo"?h*2:h),p=o.height+(e.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=e,y=[...Vi(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...Vi(f/2+g*2,-g,g,20,-180,-270),...Vi(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...Vi(f/2,p/2,g,20,0,90)],v=[...Vi(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...Vi(-f/2-g/2,-g,g,20,0,90),...Vi(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...Vi(-f/2+g+g/2,p/2,g,30,-180,-270)],C=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...Vi(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...Vi(f/2+g*2,-g,g,20,-180,-270),...Vi(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...Vi(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2-g-g/2,y:p/2+g},...Vi(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...Vi(-f/2-g/2,-g,g,20,0,90),...Vi(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...Vi(-f/2+g+g/2,p/2,g,30,-180,-270)],_=Dt.svg(a),w=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const A=ve(y).replace("Z",""),E=_.path(A,w),R=ve(v).replace("Z",""),M=_.path(R,w),O=ve(C),Y=_.path(O,{...w}),$=a.insert("g",":first-child");return $.insert(()=>Y,":first-child").attr("stroke-opacity",0),$.insert(()=>E,":first-child"),$.insert(()=>M,":first-child"),$.attr("class","text"),x&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",x),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)/2-(o.y-(o.top??0))})`),qt(e,$),e.intersect=function(q){return Ot.polygon(e,C,q)},a}B(BM,"curlyBraces");async function AM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=20,u=5,{shapeSvg:f,bbox:p}=await Jt(i,e,Qt(e)),g=Math.max(h,(p.width+o*2)*1.25,(e==null?void 0:e.width)??0),x=Math.max(u,p.height+c*2,(e==null?void 0:e.height)??0),y=x/2,{cssStyles:v}=e,C=Dt.svg(f),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=g,T=x,A=w-y,E=T/4,N=[{x:A,y:0},{x:E,y:0},{x:0,y:T/2},{x:E,y:T},{x:A,y:T},...pf(-A,-T/2,y,50,270,90)],R=ve(N),M=C.path(R,_),O=f.insert(()=>M,":first-child");return O.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&O.selectChildren("path").attr("style",n),O.attr("transform",`translate(${-g/2}, ${-x/2})`),qt(e,O),e.intersect=function(Y){return Ot.polygon(e,N,Y)},f}B(AM,"curvedTrapezoid");var CU=B((i,e,r,n,a,o)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),kU=B((i,e,r,n,a,o)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),_U=B((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Sw=8,ww=8;async function EM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?24:a,c=e.look==="neo"?24:a;if(e.width||e.height){const _=e.width??0;e.width=(e.width??0)-c,e.width<ww&&(e.width=ww);const T=_/2/(2.5+_/50);e.height=(e.height??0)-o-T*3,e.height<Sw&&(e.height=Sw)}const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e.width?e.width:u.width)+c,g=p/2,x=g/(2.5+p/50),y=(e.height?e.height:u.height)+o+x;let v;const{cssStyles:C}=e;if(e.look==="handDrawn"){const _=Dt.svg(h),w=kU(0,0,p,y,g,x),T=_U(0,x,p,y,g,x),A=Ft(e,{}),E=_.path(w,A),N=_.path(T,Ft(e,{fill:"none"}));v=h.insert(()=>N,":first-child"),v=h.insert(()=>E,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const _=CU(0,0,p,y,g,x);v=h.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",$i(C)).attr("style",n)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),qt(e,v),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(_){const w=Ot.rect(e,_),T=w.x-(e.x??0);if(g!=0&&(Math.abs(T)<(e.width??0)/2||Math.abs(T)==(e.width??0)/2&&Math.abs(w.y-(e.y??0))>(e.height??0)/2-x)){let A=x*x*(1-T*T/(g*g));A>0&&(A=Math.sqrt(A)),A=x-A,_.y-(e.y??0)>0&&(A=-A),w.y+=A}return w},h}B(EM,"cylinder");async function MM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=h.width+a,p=h.height+o,g=p*.2,x=-f/2,y=-p/2-g/2,{cssStyles:v}=e,C=Dt.svg(c),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],T=C.polygon(w.map(E=>[E.x,E.y]),_),A=c.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),u.attr("transform",`translate(${x+(e.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(e.padding??0)/2-(h.y-(h.top??0))})`),qt(e,A),e.intersect=function(E){return Ot.rect(e,E)},c}B(MM,"dividedRectangle");async function LM(i,e){var y,v;const{labelStyles:r,nodeStyles:n}=$t(e),a=e.look==="neo"?12:5;e.labelStyle=r;const o=e.padding??0,c=e.look==="neo"?16:o,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(c??0),p=f-a;let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const C=Dt.svg(h),_=Ft(e,{roughness:.2,strokeWidth:2.5}),w=Ft(e,{roughness:.2,strokeWidth:1.5}),T=C.circle(0,0,f*2,_),A=C.circle(0,0,p*2,w);g=h.insert("g",":first-child"),g.attr("class",$i(e.cssClasses)).attr("style",$i(x)),(y=g.node())==null||y.appendChild(T),(v=g.node())==null||v.appendChild(A)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),_=g.insert("circle");g.attr("class","basic label-container").attr("style",n),C.attr("class","outer-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0),_.attr("class","inner-circle").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0)}return qt(e,g),e.intersect=function(C){return _t.info("DoubleCircle intersect",e,f,C),Ot.circle(e,f,C)},h}B(LM,"doublecircle");function NM(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=$t(e);e.label="",e.labelStyle=n;const o=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),c=7,{cssStyles:h}=e,u=Dt.svg(o),{nodeBorder:f}=r,p=Ft(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(p.roughness=0);const g=u.circle(0,0,c*2,p),x=o.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${f} !important;`),h&&h.length>0&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",h),a&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",a),qt(e,x),e.intersect=function(y){return _t.info("filledCircle intersect",e,{radius:c,point:y}),Ot.circle(e,c,y)},o}B(NM,"filledCircle");var Tw=10,Bw=10;async function OM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.height=(e==null?void 0:e.height)??0,e.height<Tw&&(e.height=Tw),e.width=((e==null?void 0:e.width)??0)-o-o/2,e.width<Bw&&(e.width=Bw));const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(o??0),p=e!=null&&e.height?e==null?void 0:e.height:f+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:y}=e,v=Dt.svg(c),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=ve(x),w=v.path(_,C),T=c.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=f,e.height=p,qt(e,T),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(A){return _t.info("Triangle intersect",e,x,A),Ot.polygon(e,x,A)},c}B(OM,"flippedTriangle");function jM(i,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=$t(e);e.label="";const c=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:h}=e;let u=Math.max(70,(e==null?void 0:e.width)??0),f=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(u=Math.max(10,(e==null?void 0:e.width)??0),f=Math.max(70,(e==null?void 0:e.height)??0));const p=-1*u/2,g=-1*f/2,x=Dt.svg(c),y=Ft(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=x.rectangle(p,g,u,f,y),C=c.insert(()=>v,":first-child");h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),o&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",o),qt(e,C);const _=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=_/2||0,e.height+=_/2||0),e.intersect=function(w){return Ot.rect(e,w)},c}B(jM,"forkJoin");async function RM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=15,o=10,c=e.look==="neo"?16:e.padding??0,h=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.height=((e==null?void 0:e.height)??0)-h*2,e.height<o&&(e.height=o),e.width=((e==null?void 0:e.width)??0)-c*2,e.width<a&&(e.width=a));const{shapeSvg:u,bbox:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:Math.max(a,f.width))+c*2,g=(e!=null&&e.height?e==null?void 0:e.height:Math.max(o,f.height))+h*2,x=g/2,{cssStyles:y}=e,v=Dt.svg(u),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...pf(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],w=ve(_),T=v.path(w,C),A=u.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",n),qt(e,A),e.intersect=function(E){return _t.info("Pill intersect",e,{radius:x,point:E}),Ot.polygon(e,_,E)},u}B(RM,"halfRoundedRectangle");var SU=B((i,e,r,n,a)=>[`M${i+a},${e}`,`L${i+r-a},${e}`,`L${i+r},${e-n/2}`,`L${i+r-a},${e-n}`,`L${i+a},${e-n}`,`L${i},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function DM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e),a=e.look==="neo"?3.5:4;e.labelStyle=r;const o=e.padding??0,c=70,h=32,u=e.look==="neo"?c:o,f=e.look==="neo"?h:o;if(e.width||e.height){const A=(e.height??0)/a;e.width=((e==null?void 0:e.width)??0)-2*A-f,e.height=(e.height??0)-u}const{shapeSvg:p,bbox:g}=await Jt(i,e,Qt(e)),x=(e!=null&&e.height?e==null?void 0:e.height:g.height)+u,y=x/a,v=(e!=null&&e.width?e==null?void 0:e.width:g.width)+2*y+f,C=[{x:y,y:0},{x:v-y,y:0},{x:v,y:-x/2},{x:v-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let _;const{cssStyles:w}=e;if(e.look==="handDrawn"){const T=Dt.svg(p),A=Ft(e,{}),E=SU(0,0,v,x,y),N=T.path(E,A);_=p.insert(()=>N,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),w&&_.attr("style",w)}else _=ms(p,v,x,C);return n&&_.attr("style",n),e.width=v,e.height=x,qt(e,_),e.intersect=function(T){return Ot.polygon(e,C,T)},p}B(DM,"hexagon");async function FM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Jt(i,e,Qt(e)),o=Math.max(30,(e==null?void 0:e.width)??0),c=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=Dt.svg(a),f=Ft(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:0,y:0},{x:o,y:0},{x:0,y:c},{x:o,y:c}],g=ve(p),x=u.path(g,f),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(${-o/2}, ${-c/2})`),qt(e,y),e.intersect=function(v){return _t.info("Pill intersect",e,{points:p}),Ot.polygon(e,p,v)},a}B(FM,"hourglass");async function $M(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await Jt(i,e,"icon-shape default"),x=e.pos==="t",y=h,v=h,{nodeBorder:C}=r,{stylesMap:_}=uh(e),w=-v/2,T=-y/2,A=e.label?8:0,E=Dt.svg(f),N=Ft(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const R=E.rectangle(w,T,v,y,N),M=Math.max(v,p.width),O=y+p.height+A,Y=E.rectangle(-M/2,-O/2,M,O,{...N,fill:"transparent",stroke:"none"}),$=f.insert(()=>R,":first-child"),q=f.insert(()=>Y);if(e.icon){const J=f.append("g");J.html(`<g>${await Nf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const W=J.node().getBBox(),F=W.width,U=W.height,j=W.x,I=W.y;J.attr("transform",`translate(${-F/2-j},${x?p.height/2+A/2-U/2-I:-p.height/2-A/2-U/2-I})`),J.attr("style",`color: ${_.get("stroke")??C};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-O/2:O/2-p.height})`),$.attr("transform",`translate(0,${x?p.height/2+A/2:-p.height/2-A/2})`),qt(e,q),e.intersect=function(J){if(_t.info("iconSquare intersect",e,J),!e.label)return Ot.rect(e,J);const W=e.x??0,F=e.y??0,U=e.height??0;let j=[];return x?j=[{x:W-p.width/2,y:F-U/2},{x:W+p.width/2,y:F-U/2},{x:W+p.width/2,y:F-U/2+p.height+A},{x:W+v/2,y:F-U/2+p.height+A},{x:W+v/2,y:F+U/2},{x:W-v/2,y:F+U/2},{x:W-v/2,y:F-U/2+p.height+A},{x:W-p.width/2,y:F-U/2+p.height+A}]:j=[{x:W-v/2,y:F-U/2},{x:W+v/2,y:F-U/2},{x:W+v/2,y:F-U/2+y},{x:W+p.width/2,y:F-U/2+y},{x:W+p.width/2/2,y:F+U/2},{x:W-p.width/2,y:F+U/2},{x:W-p.width/2,y:F-U/2+y},{x:W-v/2,y:F-U/2+y}],Ot.polygon(e,j,J)},f}B($M,"icon");async function zM(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await Jt(i,e,"icon-shape default"),x=20,y=e.label?8:0,v=e.pos==="t",{nodeBorder:C,mainBkg:_}=r,{stylesMap:w}=uh(e),T=Dt.svg(f),A=Ft(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const E=w.get("fill");A.stroke=E??_;const N=f.append("g");e.icon&&N.html(`<g>${await Nf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const R=N.node().getBBox(),M=R.width,O=R.height,Y=R.x,$=R.y,q=Math.max(M,O)*Math.SQRT2+x*2,J=T.circle(0,0,q,A),W=Math.max(q,p.width),F=q+p.height+y,U=T.rectangle(-W/2,-F/2,W,F,{...A,fill:"transparent",stroke:"none"}),j=f.insert(()=>J,":first-child"),I=f.insert(()=>U);return N.attr("transform",`translate(${-M/2-Y},${v?p.height/2+y/2-O/2-$:-p.height/2-y/2-O/2-$})`),N.attr("style",`color: ${w.get("stroke")??C};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${v?-F/2:F/2-p.height})`),j.attr("transform",`translate(0,${v?p.height/2+y/2:-p.height/2-y/2})`),qt(e,I),e.intersect=function(H){return _t.info("iconSquare intersect",e,H),Ot.rect(e,H)},f}B(zM,"iconCircle");async function qM(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Jt(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:w}=r,{stylesMap:T}=uh(e),A=-C/2,E=-v/2,N=e.label?8:0,R=Dt.svg(f),M=Ft(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const O=T.get("fill");M.stroke=O??w;const Y=R.path(wo(A,E,C,v,5),M),$=Math.max(C,p.width),q=v+p.height+N,J=R.rectangle(-$/2,-q/2,$,q,{...M,fill:"transparent",stroke:"none"}),W=f.insert(()=>Y,":first-child").attr("class","icon-shape2"),F=f.insert(()=>J);if(e.icon){const U=f.append("g");U.html(`<g>${await Nf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=U.node().getBBox(),I=j.width,H=j.height,V=j.x,Z=j.y;U.attr("transform",`translate(${-I/2-V},${y?p.height/2+N/2-H/2-Z:-p.height/2-N/2-H/2-Z})`),U.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-q/2:q/2-p.height})`),W.attr("transform",`translate(0,${y?p.height/2+N/2:-p.height/2-N/2})`),qt(e,F),e.intersect=function(U){if(_t.info("iconSquare intersect",e,U),!e.label)return Ot.rect(e,U);const j=e.x??0,I=e.y??0,H=e.height??0;let V=[];return y?V=[{x:j-p.width/2,y:I-H/2},{x:j+p.width/2,y:I-H/2},{x:j+p.width/2,y:I-H/2+p.height+N},{x:j+C/2,y:I-H/2+p.height+N},{x:j+C/2,y:I+H/2},{x:j-C/2,y:I+H/2},{x:j-C/2,y:I-H/2+p.height+N},{x:j-p.width/2,y:I-H/2+p.height+N}]:V=[{x:j-C/2,y:I-H/2},{x:j+C/2,y:I-H/2},{x:j+C/2,y:I-H/2+v},{x:j+p.width/2,y:I-H/2+v},{x:j+p.width/2/2,y:I+H/2},{x:j-p.width/2,y:I+H/2},{x:j-p.width/2,y:I-H/2+v},{x:j-C/2,y:I-H/2+v}],Ot.polygon(e,V,U)},f}B(qM,"iconRounded");async function IM(i,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=$t(e);e.labelStyle=a;const o=e.assetHeight??48,c=e.assetWidth??48,h=Math.max(o,c),u=n==null?void 0:n.wrappingWidth;e.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Jt(i,e,"icon-shape default"),y=e.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:_,mainBkg:w}=r,{stylesMap:T}=uh(e),A=-C/2,E=-v/2,N=e.label?8:0,R=Dt.svg(f),M=Ft(e,{});e.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const O=T.get("fill");M.stroke=O??w;const Y=R.path(wo(A,E,C,v,.1),M),$=Math.max(C,p.width),q=v+p.height+N,J=R.rectangle(-$/2,-q/2,$,q,{...M,fill:"transparent",stroke:"none"}),W=f.insert(()=>Y,":first-child"),F=f.insert(()=>J);if(e.icon){const U=f.append("g");U.html(`<g>${await Nf(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const j=U.node().getBBox(),I=j.width,H=j.height,V=j.x,Z=j.y;U.attr("transform",`translate(${-I/2-V},${y?p.height/2+N/2-H/2-Z:-p.height/2-N/2-H/2-Z})`),U.attr("style",`color: ${T.get("stroke")??_};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-q/2:q/2-p.height})`),W.attr("transform",`translate(0,${y?p.height/2+N/2:-p.height/2-N/2})`),qt(e,F),e.intersect=function(U){if(_t.info("iconSquare intersect",e,U),!e.label)return Ot.rect(e,U);const j=e.x??0,I=e.y??0,H=e.height??0;let V=[];return y?V=[{x:j-p.width/2,y:I-H/2},{x:j+p.width/2,y:I-H/2},{x:j+p.width/2,y:I-H/2+p.height+N},{x:j+C/2,y:I-H/2+p.height+N},{x:j+C/2,y:I+H/2},{x:j-C/2,y:I+H/2},{x:j-C/2,y:I-H/2+p.height+N},{x:j-p.width/2,y:I-H/2+p.height+N}]:V=[{x:j-C/2,y:I-H/2},{x:j+C/2,y:I-H/2},{x:j+C/2,y:I-H/2+v},{x:j+p.width/2,y:I-H/2+v},{x:j+p.width/2/2,y:I+H/2},{x:j-p.width/2,y:I+H/2},{x:j-p.width/2,y:I-H/2+v},{x:j-C/2,y:I-H/2+v}],Ot.polygon(e,V,U)},f}B(IM,"iconSquare");async function PM(i,e,{config:{flowchart:r}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:c}=$t(e);e.labelStyle=c;const h=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const u=Math.max(e.label?h??0:0,(e==null?void 0:e.assetWidth)??a),f=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:u,p=e.constraint==="on"?f/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??o;e.width=Math.max(f,h??0);const{shapeSvg:g,bbox:x,label:y}=await Jt(i,e,"image-shape default"),v=e.pos==="t",C=-f/2,_=-p/2,w=e.label?8:0,T=Dt.svg(g),A=Ft(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const E=T.rectangle(C,_,f,p,A),N=Math.max(f,x.width),R=p+x.height+w,M=T.rectangle(-N/2,-R/2,N,R,{...A,fill:"none",stroke:"none"}),O=g.insert(()=>E,":first-child"),Y=g.insert(()=>M);if(e.img){const $=g.append("image");$.attr("href",e.img),$.attr("width",f),$.attr("height",p),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-f/2},${v?R/2-p:-R/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${v?-p/2-x.height/2-w/2:p/2-x.height/2+w/2})`),O.attr("transform",`translate(0,${v?x.height/2+w/2:-x.height/2-w/2})`),qt(e,Y),e.intersect=function($){if(_t.info("iconSquare intersect",e,$),!e.label)return Ot.rect(e,$);const q=e.x??0,J=e.y??0,W=e.height??0;let F=[];return v?F=[{x:q-x.width/2,y:J-W/2},{x:q+x.width/2,y:J-W/2},{x:q+x.width/2,y:J-W/2+x.height+w},{x:q+f/2,y:J-W/2+x.height+w},{x:q+f/2,y:J+W/2},{x:q-f/2,y:J+W/2},{x:q-f/2,y:J-W/2+x.height+w},{x:q-x.width/2,y:J-W/2+x.height+w}]:F=[{x:q-f/2,y:J-W/2},{x:q+f/2,y:J-W/2},{x:q+f/2,y:J-W/2+p},{x:q+x.width/2,y:J-W/2+p},{x:q+x.width/2/2,y:J+W/2},{x:q-x.width/2,y:J+W/2},{x:q-x.width/2,y:J-W/2+p},{x:q-f/2,y:J-W/2+p}],Ot.polygon(e,F,$)},g}B(PM,"imageSquare");async function HM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=Math.max(u.width+(c??0)*2,(e==null?void 0:e.width)??0),p=Math.max(u.height+(o??0)*2,(e==null?void 0:e.height)??0),g=[{x:0,y:0},{x:f,y:0},{x:f+3*p/6,y:-p},{x:-3*p/6,y:-p}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),y&&x.attr("style",y)}else x=ms(h,f,p,g);return n&&x.attr("style",n),e.width=f,e.height=p,qt(e,x),e.intersect=function(v){return Ot.polygon(e,g,v)},h}B(HM,"inv_trapezoid");async function jf(i,e,r){const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n;const{shapeSvg:o,bbox:c}=await Jt(i,e,Qt(e)),h=Math.max(c.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(c.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),f=-h/2,p=-u/2;let g,{rx:x,ry:y}=e;const{cssStyles:v}=e;if(r!=null&&r.rx&&r.ry&&(x=r.rx,y=r.ry),e.look==="handDrawn"){const C=Dt.svg(o),_=Ft(e,{}),w=x||y?C.path(wo(f,p,h,u,x||0),_):C.rectangle(f,p,h,u,_);g=o.insert(()=>w,":first-child"),g.attr("class","basic label-container").attr("style",$i(v))}else g=o.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",a).attr("rx",$i(x)).attr("ry",$i(y)).attr("x",f).attr("y",p).attr("width",h).attr("height",u);return qt(e,g),e.calcIntersect=function(C,_){return Ot.rect(C,_)},e.intersect=function(C){return Ot.rect(e,C)},o}B(jf,"drawRect");async function UM(i,e){const{shapeSvg:r,bbox:n,label:a}=await Jt(i,e,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),qt(e,o),e.intersect=function(u){return Ot.rect(e,u)},r}B(UM,"labelRect");async function WM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:0,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:-(3*f)/6,y:-f}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=ms(h,p,f,g);return n&&x.attr("style",n),e.width=p,e.height=f,qt(e,x),e.intersect=function(v){return Ot.polygon(e,g,v)},h}B(WM,"lean_left");async function YM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=a,c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*f/6,y:0},{x:p,y:0},{x:p+3*f/6,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=ms(h,p,f,g);return n&&x.attr("style",n),e.width=p,e.height=f,qt(e,x),e.intersect=function(v){return Ot.polygon(e,g,v)},h}B(YM,"lean_right");function GM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.label="",e.labelStyle=r;const a=i.insert("g").attr("class",Qt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(35,(e==null?void 0:e.width)??0),h=Math.max(35,(e==null?void 0:e.height)??0),u=7,f=[{x:c,y:0},{x:0,y:h+u/2},{x:c-2*u,y:h+u/2},{x:0,y:2*h},{x:c,y:h-u/2},{x:2*u,y:h-u/2}],p=Dt.svg(a),g=Ft(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ve(f),y=p.path(x,g),v=a.insert(()=>y,":first-child");return v.attr("class","outer-path"),o&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(-${c/2},${-h})`),qt(e,v),e.intersect=function(C){return _t.info("lightningBolt intersect",e,C),Ot.polygon(e,f,C)},a}B(GM,"lightningBolt");var wU=B((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),TU=B((i,e,r,n,a,o,c)=>[`M${i},${e+o}`,`M${i+r},${e+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${o} 0,0,0 ${r},0`,`l0,${-n}`,`M${i},${e+o+c}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),BU=B((i,e,r,n,a,o)=>[`M${i-r/2},${-n/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Aw=10,Ew=10;async function VM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?24:a;if(e.width||e.height){const w=e.width??0;e.width=(e.width??0)-o,e.width<Ew&&(e.width=Ew);const A=w/2/(2.5+w/50);e.height=(e.height??0)-c-A*3,e.height<Aw&&(e.height=Aw)}const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=p/2,x=g/(2.5+p/50),y=(e!=null&&e.height?e==null?void 0:e.height:u.height)+x+c*2,v=y*.1;let C;const{cssStyles:_}=e;if(e.look==="handDrawn"){const w=Dt.svg(h),T=TU(0,0,p,y,g,x,v),A=BU(0,x,p,y,g,x),E=Ft(e,{}),N=w.path(T,E),R=w.path(A,E);h.insert(()=>R,":first-child").attr("class","line"),C=h.insert(()=>N,":first-child"),C.attr("class","basic label-container"),_&&C.attr("style",_)}else{const w=wU(0,0,p,y,g,x,v);C=h.insert("path",":first-child").attr("d",w).attr("class","basic label-container outer-path").attr("style",$i(_)).attr("style",n)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),qt(e,C),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(w){const T=Ot.rect(e,w),A=T.x-(e.x??0);if(g!=0&&(Math.abs(A)<(e.width??0)/2||Math.abs(A)==(e.width??0)/2&&Math.abs(T.y-(e.y??0))>(e.height??0)/2-x)){let E=x*x*(1-A*A/(g*g));E>0&&(E=Math.sqrt(E)),E=x-E,w.y-(e.y??0)>0&&(E=-E),T.y+=E}return T},h}B(VM,"linedCylinder");async function XM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;if(e.width||e.height){const E=e.width;e.width=(E??0)*10/11-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(o??0)*2,g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(c??0)*2,x=e.look==="neo"?g/4:g/8,y=g+x,{cssStyles:v}=e,C=Dt.svg(h),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-p/2-p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:y/2},..._o(-p/2-p/2*.1,y/2,p/2+p/2*.1,y/2,x,.8),{x:p/2+p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:-y/2},{x:-p/2,y:-y/2},{x:-p/2,y:y/2*1.1},{x:-p/2,y:-y/2}],T=C.polygon(w.map(E=>[E.x,E.y]),_),A=h.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-p/2+(e.padding??0)+p/2*.1/2-(u.x-(u.left??0))},${-g/2+(e.padding??0)-x/2-(u.y-(u.top??0))})`),qt(e,A),e.intersect=function(E){return Ot.polygon(e,w,E)},h}B(XM,"linedWaveEdgedRect");async function QM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-2*h,10),e.height=Math.max(((e==null?void 0:e.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:f,label:p}=await Jt(i,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:f.width)+o*2+2*h,x=(e!=null&&e.height?e==null?void 0:e.height:f.height)+c*2+2*h,y=g-2*h,v=x-2*h,C=-y/2,_=-v/2,{cssStyles:w}=e,T=Dt.svg(u),A=Ft(e,{}),E=[{x:C-h,y:_+h},{x:C-h,y:_+v+h},{x:C+y-h,y:_+v+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_+v-h},{x:C+y+h,y:_+v-h},{x:C+y+h,y:_-h},{x:C+h,y:_-h},{x:C+h,y:_},{x:C,y:_},{x:C,y:_+h}],N=[{x:C,y:_+h},{x:C+y-h,y:_+h},{x:C+y-h,y:_+v},{x:C+y,y:_+v},{x:C+y,y:_},{x:C,y:_}];e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const R=ve(E);let M=T.path(R,A);const O=ve(N);let Y=T.path(O,A);e.look!=="handDrawn"&&(M=Sb(M),Y=Sb(Y));const $=u.insert("g",":first-child");return $.insert(()=>M),$.insert(()=>Y),$.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),p.attr("transform",`translate(${-(f.width/2)-h-(f.x-(f.left??0))}, ${-(f.height/2)+h-(f.y-(f.top??0))})`),qt(e,$),e.intersect=function(q){return Ot.polygon(e,E,q)},u}B(QM,"multiRect");async function ZM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=e.padding??0,u=e.look==="neo"?16:h,f=e.look==="neo"?12:h;let p=!0;(e.width||e.height)&&(p=!1,e.width=((e==null?void 0:e.width)??0)-u*2,e.height=((e==null?void 0:e.height)??0)-f*3);const g=Math.max(o.width,(e==null?void 0:e.width)??0)+u*2,x=Math.max(o.height,(e==null?void 0:e.height)??0)+f*3,y=e.look==="neo"?x/4:x/8,v=x+(p?y/2:-y/2),C=-g/2,_=-v/2,w=10,{cssStyles:T}=e,A=_o(C-w,_+v+w,C+g-w,_+v+w,y,.8),E=A==null?void 0:A[A.length-1],N=[{x:C-w,y:_+w},{x:C-w,y:_+v+w},...A,{x:C+g-w,y:E.y-w},{x:C+g,y:E.y-w},{x:C+g,y:E.y-2*w},{x:C+g+w,y:E.y-2*w},{x:C+g+w,y:_-w},{x:C+w,y:_-w},{x:C+w,y:_},{x:C,y:_},{x:C,y:_+w}],R=[{x:C,y:_+w},{x:C+g-w,y:_+w},{x:C+g-w,y:E.y-w},{x:C+g,y:E.y-w},{x:C+g,y:_},{x:C,y:_}],M=Dt.svg(a),O=Ft(e,{});e.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const Y=ve(N),$=M.path(Y,O),q=ve(R),J=M.path(q,O),W=a.insert(()=>$,":first-child");return W.insert(()=>J),W.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",T),n&&e.look!=="handDrawn"&&W.selectAll("path").attr("style",n),W.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(o.width/2)-w-(o.x-(o.left??0))}, ${-(o.height/2)+w-y/2-(o.y-(o.top??0))})`),qt(e,W),e.intersect=function(F){return Ot.polygon(e,N,F)},a}B(ZM,"multiWaveEdgedRectangle");async function KM(i,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n,e.useHtmlLabels||vr(si())||(e.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=Math.max(h.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),p=Math.max(h.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),g=-f/2,x=-p/2,{cssStyles:y}=e,v=Dt.svg(c),C=Ft(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=v.rectangle(g,x,f,p,C),w=c.insert(()=>_,":first-child");return w.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),a&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",a),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),qt(e,w),e.intersect=function(T){return Ot.rect(e,T)},c}B(KM,"note");var AU=B((i,e,r)=>[`M${i+r/2},${e}`,`L${i+r},${e-r/2}`,`L${i+r/2},${e-r}`,`L${i},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function JM(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await Jt(i,e,Qt(e)),c=o.width+(e.padding??0),h=o.height+(e.padding??0),u=c+h,f=.5,p=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let g;const{cssStyles:x}=e;if(e.look==="handDrawn"){const y=Dt.svg(a),v=Ft(e,{}),C=AU(0,0,u),_=y.path(C,v);g=a.insert(()=>_,":first-child").attr("transform",`translate(${-u/2+f}, ${u/2})`),x&&g.attr("style",x)}else g=ms(a,u,u,p),g.attr("transform",`translate(${-u/2+f}, ${u/2})`);return n&&g.attr("style",n),qt(e,g),e.calcIntersect=function(y,v){const C=y.width,_=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],w=Ot.polygon(y,_,v);return{x:w.x-.5,y:w.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a}B(JM,"question");async function tL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?21:a??0,c=e.look==="neo"?12:a??0,{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=((e==null?void 0:e.width)??u.width)+(e.look==="neo"?o*2:o),g=((e==null?void 0:e.height)??u.height)+(e.look==="neo"?c*2:c),x=-p/2,y=-g/2,v=y/2,C=[{x:x+v,y},{x,y:0},{x:x+v,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:_}=e,w=Dt.svg(h),T=Ft(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=ve(C),E=w.path(A,T),N=h.insert(()=>E,":first-child");return N.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",_),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(${-v/2},0)`),f.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),qt(e,N),e.intersect=function(R){return Ot.polygon(e,C,R)},h}B(tL,"rect_left_inv_arrow");async function eL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const o=i.insert("g").attr("class",a).attr("id",e.domId||e.id),c=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",n),u=e.description,f=e.label,p=await po(h,f,e.labelStyle,!0,!0);let g={width:0,height:0};if(vr(Ae())){const O=p.children[0],Y=Xt(p);g=O.getBoundingClientRect(),Y.attr("width",g.width),Y.attr("height",g.height)}_t.info("Text 2",u);const x=u||[],y=p.getBBox(),v=await po(h,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),C=v.children[0],_=Xt(v);g=C.getBoundingClientRect(),_.attr("width",g.width),_.attr("height",g.height);const w=(e.padding||0)/2;Xt(v).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+w+5)+")"),Xt(p).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-w+3)+")");const T=g.width+(e.padding||0),A=g.height+(e.padding||0),E=-g.width/2-w,N=-g.height/2-w;let R,M;if(e.look==="handDrawn"){const O=Dt.svg(o),Y=Ft(e,{}),$=O.path(wo(E,N,T,A,e.rx||0),Y),q=O.line(-g.width/2-w,-g.height/2-w+y.height+w,g.width/2+w,-g.height/2-w+y.height+w,Y);M=o.insert(()=>(_t.debug("Rough node insert CXC",$),q),":first-child"),R=o.insert(()=>(_t.debug("Rough node insert CXC",$),$),":first-child")}else R=c.insert("rect",":first-child"),M=c.insert("line"),R.attr("class","outer title-state").attr("style",n).attr("x",-g.width/2-w).attr("y",-g.height/2-w).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),M.attr("class","divider").attr("x1",-g.width/2-w).attr("x2",g.width/2+w).attr("y1",-g.height/2-w+y.height+w).attr("y2",-g.height/2-w+y.height+w);return qt(e,R),e.intersect=function(O){return Ot.rect(e,O)},o}B(eL,"rectWithTitle");async function iL(i,e,{config:{themeVariables:r}}){const n=(r==null?void 0:r.radius)??5,a={rx:n,ry:n,labelPaddingX:((e==null?void 0:e.padding)??0)*1,labelPaddingY:((e==null?void 0:e.padding)??0)*1};return jf(i,e,a)}B(iL,"roundedRect");var Wo=8;async function rL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.width)??h.width)+a*2+(e.look==="neo"?Wo:Wo*2),p=((e==null?void 0:e.height)??h.height)+o*2,g=f-Wo,x=p,y=Wo-f/2,v=-p/2,{cssStyles:C}=e,_=Dt.svg(c),w=Ft(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=[{x:y,y:v},{x:y+g,y:v},{x:y+g,y:v+x},{x:y-Wo,y:v+x},{x:y-Wo,y:v},{x:y,y:v},{x:y,y:v+x}],A=_.polygon(T.map(N=>[N.x,N.y]),w),E=c.insert(()=>A,":first-child");return E.attr("class","basic label-container outer-path").attr("style",$i(C)),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),C&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${Wo/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),qt(e,E),e.intersect=function(N){return Ot.rect(e,N)},c}B(rL,"shadedProcess");async function nL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-o*2,10),e.height=Math.max(((e==null?void 0:e.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,g=((e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2)*1.5,x=p,y=g/1.5,v=-x/2,C=-y/2,{cssStyles:_}=e,w=Dt.svg(h),T=Ft(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const A=[{x:v,y:C},{x:v,y:C+y},{x:v+x,y:C+y},{x:v+x,y:C-y/2}],E=ve(A),N=w.path(E,T),R=h.insert(()=>N,":first-child");return R.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn"&&R.selectChildren("path").attr("style",_),n&&e.look!=="handDrawn"&&R.selectChildren("path").attr("style",n),R.attr("transform",`translate(0, ${y/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(u.x-(u.left??0))}, ${-y/4+(e.padding??0)-(u.y-(u.top??0))})`),qt(e,R),e.intersect=function(M){return Ot.polygon(e,A,M)},h}B(nL,"slopedRect");async function aL(i,e){const r=e.padding??0,n=e.look==="neo"?16:r*2,a=e.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:e.labelPaddingX??n,labelPaddingY:a};return jf(i,e,o)}B(aL,"squareRect");async function sL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?20:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=u.height+(e.look==="neo"?c*2:c),p=u.width+f/4+(e.look==="neo"?o*2:o),g=f/2,{cssStyles:x}=e,y=Dt.svg(h),v=Ft(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...pf(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...pf(p/2-g,0,g,50,270,450)],_=ve(C),w=y.path(_,v),T=h.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",x),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),qt(e,T),e.intersect=function(A){return Ot.polygon(e,C,A)},h}B(sL,"stadium");async function oL(i,e){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return jf(i,e,r)}B(oL,"state");function lL(i,e,{config:{themeVariables:r}}){var T,A;const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:f}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const p=i.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=Dt.svg(p),x=Ft(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),v=h??u,C=(e.width??0)*5/14,_=g.circle(0,0,C,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),w=p.insert(()=>y,":first-child");if(w.insert(()=>_),e.look!=="handDrawn"&&w.attr("class","outer-path"),o&&w.selectAll("path").attr("style",o),a&&w.selectAll("path").attr("style",a),e.width<25&&f&&e.look!=="handDrawn"){const E=((A=(T=i.node())==null?void 0:T.ownerSVGElement)==null?void 0:A.id)??"",N=E?`${E}-drop-shadow-small`:"drop-shadow-small";w.attr("style",`filter:url(#${N})`)}return qt(e,w),e.intersect=function(E){return Ot.circle(e,(e.width??0)/2,E)},p}B(lL,"stateEnd");function cL(i,e,{config:{themeVariables:r}}){var h,u;const{lineColor:n,nodeShadow:a}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const o=i.insert("g").attr("class","node default").attr("id",e.domId||e.id);let c;if(e.look==="handDrawn"){const p=Dt.svg(o).circle(0,0,e.width,FP(n));c=o.insert(()=>p),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=o.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&e.look!=="handDrawn"){const f=((u=(h=i.node())==null?void 0:h.ownerSVGElement)==null?void 0:u.id)??"",p=f?`${f}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return qt(e,c),e.intersect=function(f){return Ot.circle(e,(e.width??7)/2,f)},o}B(cL,"stateStart");var gc=8;async function hL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=(e==null?void 0:e.padding)??8,o=e.look==="neo"?28:a,c=e.look==="neo"?12:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.width)??u.width)+2*gc+o,p=((e==null?void 0:e.height)??u.height)+c,g=f-2*gc,x=p,y=-f/2,v=-p/2,C=[{x:0,y:0},{x:g,y:0},{x:g,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){const _=Dt.svg(h),w=Ft(e,{}),T=_.rectangle(y,v,g+16,x,w),A=_.line(y+gc,v,y+gc,v+x,w),E=_.line(y+gc+g,v,y+gc+g,v+x,w);h.insert(()=>A,":first-child"),h.insert(()=>E,":first-child");const N=h.insert(()=>T,":first-child"),{cssStyles:R}=e;N.attr("class","basic label-container").attr("style",$i(R)),qt(e,N)}else{const _=ms(h,g,x,C);n&&_.attr("style",n),qt(e,_)}return e.intersect=function(_){return Ot.polygon(e,C,_)},h}B(hL,"subroutine");var P0=.2;async function uL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;(e.width||e.height)&&(e.height=Math.max(((e==null?void 0:e.height)??0)-c*2,10),e.width=Math.max(((e==null?void 0:e.width)??0)-o*2-P0*(e.height+c*2),10));const{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c*2,p=P0*f,g=P0*f,y=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2+p-p,v=f,C=-y/2,_=-v/2,{cssStyles:w}=e,T=Dt.svg(h),A=Ft(e,{}),E=[{x:C-p/2,y:_},{x:C+y+p/2,y:_},{x:C+y+p/2,y:_+v},{x:C-p/2,y:_+v}],N=[{x:C+y-p/2,y:_+v},{x:C+y+p/2,y:_+v},{x:C+y+p/2,y:_+v-g}];e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const R=ve(E),M=T.path(R,A),O=ve(N),Y=T.path(O,{...A,fillStyle:"solid"}),$=h.insert(()=>Y,":first-child");return $.insert(()=>M,":first-child"),$.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),qt(e,$),e.intersect=function(q){return Ot.polygon(e,E,q)},h}B(uL,"taggedRect");async function fL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await Jt(i,e,Qt(e)),h=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),f=u/8,p=.2*h,g=.2*u,x=u+f,{cssStyles:y}=e,v=Dt.svg(a),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-h/2-h/2*.1,y:x/2},..._o(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,f,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],w=-h/2+h/2*.1,T=-x/2-g*.4,A=[{x:w+h-p,y:(T+u)*1.3},{x:w+h,y:T+u-g},{x:w+h,y:(T+u)*.9},..._o(w+h,(T+u)*1.25,w+h-p,(T+u)*1.3,-u*.02,.5)],E=ve(_),N=v.path(E,C),R=ve(A),M=v.path(R,{...C,fillStyle:"solid"}),O=a.insert(()=>M,":first-child");return O.insert(()=>N,":first-child"),O.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(e.padding??0)-(o.x-(o.left??0))},${-u/2+(e.padding??0)-f/2-(o.y-(o.top??0))})`),qt(e,O),e.intersect=function(Y){return Ot.polygon(e,_,Y)},a}B(fL,"taggedWaveEdgedRectangle");async function dL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await Jt(i,e,Qt(e)),c=Math.max(o.width+(e.padding??0),(e==null?void 0:e.width)||0),h=Math.max(o.height+(e.padding??0),(e==null?void 0:e.height)||0),u=-c/2,f=-h/2,p=a.insert("rect",":first-child");return p.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",f).attr("width",c).attr("height",h),qt(e,p),e.intersect=function(g){return Ot.rect(e,g)},a}B(dL,"text");var EU=B((i,e,r,n,a,o)=>`M${i},${e}
334
- a${a},${o} 0,0,1 0,${-n}
335
- l${r},0
336
- a${a},${o} 0,0,1 0,${n}
337
- M${r},${-n}
338
- a${a},${o} 0,0,0 0,${n}
339
- l${-r},0`,"createCylinderPathD"),MU=B((i,e,r,n,a,o)=>[`M${i},${e}`,`M${i+r},${e}`,`a${a},${o} 0,0,0 0,${-n}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),LU=B((i,e,r,n,a,o)=>[`M${i+r/2},${-n/2}`,`a${a},${o} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),Mw=5,Lw=10;async function pL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?12:a/2;if(e.width||e.height){const C=e.height??0;e.height=(e.height??0)-o,e.height<Mw&&(e.height=Mw);const w=C/2/(2.5+C/50);e.width=(e.width??0)-o-w*3,e.width<Lw&&(e.width=Lw)}const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=(e.height?e.height:h.height)+o,p=f/2,g=p/(2.5+f/50),x=(e.width?e.width:h.width)+g+o,{cssStyles:y}=e;let v;if(e.look==="handDrawn"){const C=Dt.svg(c),_=MU(0,0,x,f,g,p),w=LU(0,0,x,f,g,p),T=C.path(_,Ft(e,{})),A=C.path(w,Ft(e,{fill:"none"}));v=c.insert(()=>A,":first-child"),v=c.insert(()=>T,":first-child"),v.attr("class","basic label-container"),y&&v.attr("style",y)}else{const C=EU(0,0,x,f,g,p);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",$i(y)).attr("style",n),v.attr("class","basic label-container outer-path"),y&&v.selectAll("path").attr("style",y),n&&v.selectAll("path").attr("style",n)}return v.attr("label-offset-x",g),v.attr("transform",`translate(${-x/2}, ${f/2} )`),u.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),qt(e,v),e.intersect=function(C){const _=Ot.rect(e,C),w=_.y-(e.y??0);if(p!=0&&(Math.abs(w)<(e.height??0)/2||Math.abs(w)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-g)){let T=g*g*(1-w*w/(p*p));T!=0&&(T=Math.sqrt(Math.abs(T))),T=g-T,C.x-(e.x??0)>0&&(T=-T),_.x+=T}return _},c}B(pL,"tiltedCylinder");async function gL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=(e.look==="neo",a),c=e.look==="neo"?a*2:a,{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=((e==null?void 0:e.height)??u.height)+o,p=((e==null?void 0:e.width)??u.width)+c,g=[{x:-3*f/6,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=e;if(e.look==="handDrawn"){const v=Dt.svg(h),C=Ft(e,{}),_=ve(g),w=v.path(_,C);x=h.insert(()=>w,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=ms(h,p,f,g);return n&&x.attr("style",n),e.width=p,e.height=f,qt(e,x),e.intersect=function(v){return Ot.polygon(e,g,v)},h}B(gL,"trapezoid");async function mL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a,h=15,u=5;(e.width||e.height)&&(e.height=(e.height??0)-c*2,e.height<u&&(e.height=u),e.width=(e.width??0)-o*2,e.width<h&&(e.width=h));const{shapeSvg:f,bbox:p}=await Jt(i,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:p.width)+o*2,x=(e!=null&&e.height?e==null?void 0:e.height:p.height)+c*2,{cssStyles:y}=e,v=Dt.svg(f),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-g/2*.8,y:-x/2},{x:g/2*.8,y:-x/2},{x:g/2,y:-x/2*.6},{x:g/2,y:x/2},{x:-g/2,y:x/2},{x:-g/2,y:-x/2*.6}],w=ve(_),T=v.path(w,C),A=f.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",y),n&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",n),qt(e,A),e.intersect=function(E){return Ot.polygon(e,_,E)},f}B(mL,"trapezoidalPentagon");var Nw=10,Ow=10;async function yL(i,e){var E;const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.width=(((e==null?void 0:e.width)??0)-o)/2,e.width<Ow&&(e.width=Ow),e.height=(e==null?void 0:e.height)??0,e.height<Nw&&(e.height=Nw));const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=ds((E=Ae().flowchart)==null?void 0:E.htmlLabels),p=(e!=null&&e.width?e==null?void 0:e.width:h.width)+o,g=e!=null&&e.height?e==null?void 0:e.height:p+h.height,x=g,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:v}=e,C=Dt.svg(c),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=ve(y),T=C.path(w,_),A=c.insert(()=>T,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&A.selectChildren("path").attr("style",n),e.width=p,e.height=g,qt(e,A),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(f?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(N){return _t.info("Triangle intersect",e,y,N),Ot.polygon(e,y,N)},c}B(yL,"triangle");async function xL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?12:a;let h=!0;(e.width||e.height)&&(h=!1,e.width=((e==null?void 0:e.width)??0)-o*2,e.width<10&&(e.width=10),e.height=((e==null?void 0:e.height)??0)-c*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:f,label:p}=await Jt(i,e,Qt(e)),g=(e!=null&&e.width?e==null?void 0:e.width:f.width)+(o??0)*2,x=(e!=null&&e.height?e==null?void 0:e.height:f.height)+(c??0)*2,y=e.look==="neo"?x/4:x/8,v=x+(h?y:-y),{cssStyles:C}=e,w=14-g,T=w>0?w/2:0,A=Dt.svg(u),E=Ft(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const N=[{x:-g/2-T,y:v/2},..._o(-g/2-T,v/2,g/2+T,v/2,y,.8),{x:g/2+T,y:-v/2},{x:-g/2-T,y:-v/2}],R=ve(N),M=A.path(R,E),O=u.insert(()=>M,":first-child");return O.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(0,${-y/2})`),p.attr("transform",`translate(${-g/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-y-(f.y-(f.top??0))})`),qt(e,O),e.intersect=function(Y){return Ot.polygon(e,N,Y)},u}B(xL,"waveEdgedRectangle");async function bL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.padding??0,o=e.look==="neo"?16:a,c=e.look==="neo"?20:a;if(e.width||e.height){e.width=(e==null?void 0:e.width)??0,e.width<20&&(e.width=20),e.height=(e==null?void 0:e.height)??0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-c-E*(20/9)),e.width=e.width-o*2}const{shapeSvg:h,bbox:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?e==null?void 0:e.width:u.width)+o*2,p=(e!=null&&e.height?e==null?void 0:e.height:u.height)+c,g=p/8,x=p+g*2,{cssStyles:y}=e,v=Dt.svg(h),C=Ft(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-f/2,y:x/2},..._o(-f/2,x/2,f/2,x/2,g,1),{x:f/2,y:-x/2},..._o(f/2,-x/2,-f/2,-x/2,g,-1)],w=ve(_),T=v.path(w,C),A=h.insert(()=>T,":first-child");return A.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),qt(e,A),e.intersect=function(E){return Ot.polygon(e,_,E)},h}B(bL,"waveRectangle");var hi=10;async function vL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e.look==="neo"?16:e.padding??0,o=e.look==="neo"?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max(((e==null?void 0:e.width)??0)-a*2-hi,10),e.height=Math.max(((e==null?void 0:e.height)??0)-o*2-hi,10));const{shapeSvg:c,bbox:h,label:u}=await Jt(i,e,Qt(e)),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+a*2+hi,p=(e!=null&&e.height?e==null?void 0:e.height:h.height)+o*2+hi,g=f-hi,x=p-hi,y=-g/2,v=-x/2,{cssStyles:C}=e,_=Dt.svg(c),w=Ft(e,{}),T=[{x:y-hi,y:v-hi},{x:y-hi,y:v+x},{x:y+g,y:v+x},{x:y+g,y:v-hi}],A=`M${y-hi},${v-hi} L${y+g},${v-hi} L${y+g},${v+x} L${y-hi},${v+x} L${y-hi},${v-hi}
340
- M${y-hi},${v} L${y+g},${v}
341
- M${y},${v-hi} L${y},${v+x}`;e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const E=_.path(A,w),N=c.insert(()=>E,":first-child");return N.attr("transform",`translate(${hi/2}, ${hi/2})`),N.attr("class","basic label-container outer-path"),C&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",C),n&&e.look!=="handDrawn"&&N.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(h.width/2)+hi/2-(h.x-(h.left??0))}, ${-(h.height/2)+hi/2-(h.y-(h.top??0))})`),qt(e,N),e.intersect=function(R){return Ot.polygon(e,T,R)},c}B(vL,"windowPane");var jw=new Set(["redux-color","redux-dark-color"]),NU=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function b1(i,e){var kt,Lt,at,Ct;const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=si(),{rowEven:o,rowOdd:c,nodeBorder:h,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:gt}=si(),{background:Bt}=gt,Wt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Bt}`]};await b1(i,Wt)}const f=si();e.useHtmlLabels=f.htmlLabels;let p=((kt=f.er)==null?void 0:kt.diagramPadding)??10,g=((Lt=f.er)==null?void 0:Lt.entityPadding)??6;const{cssStyles:x}=e,{labelStyles:y,nodeStyles:v}=$t(e);if(r.attributes.length===0&&e.label){const gt={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};fs(e.label,f)+gt.labelPaddingX*2<f.er.minEntityWidth&&(e.width=f.er.minEntityWidth);const Bt=await jf(i,e,gt);if(n!=null&&jw.has(n)){const Wt=r.colorIndex??0;Bt.attr("data-color-id",`color-${Wt%u.length}`)}if(!ds(f.htmlLabels)){const Wt=Bt.select("text"),Gt=(at=Wt.node())==null?void 0:at.getBBox();Wt.attr("transform",`translate(${-Gt.width/2}, 0)`)}return Bt}f.htmlLabels||(p*=1.25,g*=1.25);let C=Qt(e);C||(C="node default");const _=i.insert("g").attr("class",C).attr("id",e.domId||e.id),w=await vc(_,e.label??"",f,0,0,["name"],y);w.height+=g;let T=0;const A=[],E=[];let N=0,R=0,M=0,O=0,Y=!0,$=!0;for(const gt of r.attributes){const Bt=await vc(_,gt.type,f,0,T,["attribute-type"],y);N=Math.max(N,Bt.width+p);const Wt=await vc(_,gt.name,f,0,T,["attribute-name"],y);R=Math.max(R,Wt.width+p);const Gt=await vc(_,gt.keys.join(),f,0,T,["attribute-keys"],y);M=Math.max(M,Gt.width+p);const Zt=await vc(_,gt.comment,f,0,T,["attribute-comment"],y);O=Math.max(O,Zt.width+p);const Et=Math.max(Bt.height,Wt.height,Gt.height,Zt.height)+g;E.push({yOffset:T,rowHeight:Et}),T+=Et}let q=4;M<=p&&(Y=!1,M=0,q--),O<=p&&($=!1,O=0,q--);const J=_.node().getBBox();if(w.width+p*2-(N+R+M+O)>0){const gt=w.width+p*2-(N+R+M+O);N+=gt/q,R+=gt/q,M>0&&(M+=gt/q),O>0&&(O+=gt/q)}const W=N+R+M+O,F=Dt.svg(_),U=Ft(e,{});e.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");let j=0;E.length>0&&(j=E.reduce((gt,Bt)=>gt+((Bt==null?void 0:Bt.rowHeight)??0),0));const I=Math.max(J.width+p*2,(e==null?void 0:e.width)||0,W),H=Math.max((j??0)+w.height,(e==null?void 0:e.height)||0),V=-I/2,Z=-H/2;if(_.selectAll("g:not(:first-child)").each((gt,Bt,Wt)=>{const Gt=Xt(Wt[Bt]),Zt=Gt.attr("transform");let Et=0,Vt=0;if(Zt){const ni=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Zt);ni&&(Et=parseFloat(ni[1]),Vt=parseFloat(ni[2]),Gt.attr("class").includes("attribute-name")?Et+=N:Gt.attr("class").includes("attribute-keys")?Et+=N+R:Gt.attr("class").includes("attribute-comment")&&(Et+=N+R+M))}Gt.attr("transform",`translate(${V+p/2+Et}, ${Vt+Z+w.height+g/2})`)}),_.select(".name").attr("transform","translate("+-w.width/2+", "+(Z+g/2)+")"),n!=null&&jw.has(n)){const gt=r.colorIndex??0;_.attr("data-color-id",`color-${gt%u.length}`)}const P=F.rectangle(V,Z,I,H,U),K=_.insert(()=>P,":first-child").attr("class","outer-path").attr("style",x.join(""));A.push(0);for(const[gt,Bt]of E.entries()){const Gt=(gt+1)%2===0&&Bt.yOffset!==0,Zt=F.rectangle(V,w.height+Z+(Bt==null?void 0:Bt.yOffset),I,Bt==null?void 0:Bt.rowHeight,{...U,fill:Gt?o:c,stroke:h});_.insert(()=>Zt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Gt?"even":"odd"}`)}const ot=1e-4;let st=Cc(V,w.height+Z,I+V,w.height+Z,ot),bt=F.polygon(st.map(gt=>[gt.x,gt.y]),U);if(_.insert(()=>bt).attr("class","divider"),st=Cc(N+V,w.height+Z,N+V,H+Z,ot),bt=F.polygon(st.map(gt=>[gt.x,gt.y]),U),_.insert(()=>bt).attr("class","divider"),Y){const gt=N+R+V;st=Cc(gt,w.height+Z,gt,H+Z,ot),bt=F.polygon(st.map(Bt=>[Bt.x,Bt.y]),U),_.insert(()=>bt).attr("class","divider")}if($){const gt=N+R+M+V;st=Cc(gt,w.height+Z,gt,H+Z,ot),bt=F.polygon(st.map(Bt=>[Bt.x,Bt.y]),U),_.insert(()=>bt).attr("class","divider")}for(const gt of A){const Bt=w.height+Z+gt;st=Cc(V,Bt,I+V,Bt,ot),bt=F.polygon(st.map(Wt=>[Wt.x,Wt.y]),U),_.insert(()=>bt).attr("class","divider")}if(qt(e,K),v&&e.look!=="handDrawn")if(n!=null&&NU.has(n))_.selectAll("path").attr("style",v);else{const gt=v.split(";"),Bt=(Ct=gt==null?void 0:gt.filter(Wt=>Wt.includes("stroke")))==null?void 0:Ct.map(Wt=>`${Wt}`).join("; ");_.selectAll("path").attr("style",Bt??""),_.selectAll(".row-rect-even path").attr("style",v)}return e.intersect=function(gt){return Ot.rect(e,gt)},_}B(b1,"erBox");async function vc(i,e,r,n=0,a=0,o=[],c=""){const h=i.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",c);e!==sS(e)&&(e=sS(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=h.node().appendChild(await gs(h,e,{width:fs(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let p=u.children[0];for(p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");p.childNodes[0];)p=p.childNodes[0],p.textContent=p.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let f=u.getBBox();if(ds(r.htmlLabels)){const p=u.children[0];p.style.textAlign="start";const g=Xt(u);f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return f}B(vc,"addText");function Cc(i,e,r,n,a){return i===r?[{x:i-a/2,y:e},{x:i+a/2,y:e},{x:r+a/2,y:n},{x:r-a/2,y:n}]:[{x:i,y:e-a/2},{x:i,y:e+a/2},{x:r,y:n+a/2},{x:r,y:n-a/2}]}B(Cc,"lineToPolygon");async function CL(i,e,r,n,a=r.class.padding??12){const o=n?0:3,c=i.insert("g").attr("class",Qt(e)).attr("id",e.domId||e.id);let h=null,u=null,f=null,p=null,g=0,x=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const T=e.annotations[0];await Fu(h,{text:`«${T}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await Fu(u,e,0,["font-weight: bolder"]);const v=u.node().getBBox();x=v.height,f=c.insert("g").attr("class","members-group text");let C=0;for(const T of e.members){const A=await Fu(f,T,C,[T.parseClassifier()]);C+=A+o}y=f.node().getBBox().height,y<=0&&(y=a/2),p=c.insert("g").attr("class","methods-group text");let _=0;for(const T of e.methods){const A=await Fu(p,T,_,[T.parseClassifier()]);_+=A+o}let w=c.node().getBBox();if(h!==null){const T=h.node().getBBox();h.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),w=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+a*2})`),w=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(y?y+a*4:a*2)})`),w=c.node().getBBox(),{shapeSvg:c,bbox:w}}B(CL,"textHelper");async function Fu(i,e,r,n=[]){const a=i.insert("g").attr("class","label").attr("style",n.join("; ")),o=si();let c="useHtmlLabels"in e?e.useHtmlLabels:ds(o.htmlLabels)??!0,h="";"text"in e?h=e.text:h=e.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),ef(h)&&(c=!0);const u=await gs(a,Sv(_l(h)),{width:fs(h,o)+50,classes:"markdown-node-label",useHtmlLabels:c},o);let f,p=1;if(c){const g=u.children[0],x=Xt(u);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(C=>new Promise(_=>{function w(){var T;if(C.style.display="flex",C.style.flexDirection="column",v){const A=((T=o.fontSize)==null?void 0:T.toString())??window.getComputedStyle(document.body).fontSize,N=parseInt(A,10)*5+"px";C.style.minWidth=N,C.style.maxWidth=N}else C.style.width="100%";_(C)}B(w,"setupImage"),setTimeout(()=>{C.complete&&w()}),C.addEventListener("error",w),C.addEventListener("load",w)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}else{n.includes("font-weight: bolder")&&Xt(u).selectAll("tspan").attr("font-weight",""),p=u.children.length;const g=u.children[0];(u.textContent===""||u.textContent.includes("&gt"))&&(g.textContent=h[0]+h.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),h[1]===" "&&(g.textContent=g.textContent[0]+" "+g.textContent.substring(1))),g.textContent==="undefined"&&(g.textContent=""),f=u.getBBox()}return a.attr("transform","translate(0,"+(-f.height/(2*p)+r)+")"),f.height}B(Fu,"addText");async function kL(i,e){var F,U;const r=Ae(),{themeVariables:n}=r,{useGradient:a}=n,o=r.class.padding??12,c=o,h=e.useHtmlLabels??ds(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:f,bbox:p}=await CL(i,e,r,h,c),{labelStyles:g,nodeStyles:x}=$t(e);e.labelStyle=g,e.cssStyles=u.styles||"";const y=((F=u.styles)==null?void 0:F.join(";"))||x||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((U=r.class)!=null&&U.hideEmptyMembersBox),C=Dt.svg(f),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=Math.max(e.width??0,p.width);let T=Math.max(e.height??0,p.height);const A=(e.height??0)>p.height;u.members.length===0&&u.methods.length===0?T+=c:u.members.length>0&&u.methods.length===0&&(T+=c*2);const E=-w/2,N=-T/2;let R=v?o*2:u.members.length===0&&u.methods.length===0?-o:0;A&&(R=o*2);const M=C.rectangle(E-o,N-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0),w+2*o,T+2*o+R,_),O=f.insert(()=>M,":first-child");O.attr("class","basic label-container outer-path");const Y=O.node().getBBox(),$=f.select(".annotation-group").node().getBBox().height-(v?o/2:0)||0,q=f.select(".label-group").node().getBBox().height-(v?o/2:0)||0,J=f.select(".members-group").node().getBBox().height-(v?o/2:0)||0,W=($+q+N+o-(N-o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0)))/2;if(f.selectAll(".text").each((j,I,H)=>{var st,bt;const V=Xt(H[I]),Z=V.attr("transform");let P=0;if(Z){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Z);Lt&&(P=parseFloat(Lt[2]))}let K=P+N+o-(v?o:u.members.length===0&&u.methods.length===0?-o/2:0);if(V.attr("class").includes("methods-group")){const kt=Math.max(J,c/2);A?K=Math.max(W,$+q+kt+N+c*2+o)+c*2:K=$+q+kt+N+c*4+o}u.members.length===0&&u.methods.length===0&&((st=r.class)!=null&&st.hideEmptyMembersBox)&&(u.annotations.length>0?K=P-c:K=P),h||(K-=4);let ot=E;(V.attr("class").includes("label-group")||V.attr("class").includes("annotation-group"))&&(ot=-((bt=V.node())==null?void 0:bt.getBBox().width)/2||0,f.selectAll("text").each(function(kt,Lt,at){window.getComputedStyle(at[Lt]).textAnchor==="middle"&&(ot=0)})),V.attr("transform",`translate(${ot}, ${K})`)}),u.members.length>0||u.methods.length>0||v){const j=$+q+N+o,I=C.line(Y.x,j,Y.x+Y.width,j+.001,_);f.insert(()=>I).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(v||u.members.length>0||u.methods.length>0){const j=$+q+J+N+c*2+o,I=C.line(Y.x,A?Math.max(W,j):j,Y.x+Y.width,(A?Math.max(W,j):j)+.001,_);f.insert(()=>I).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(u.look!=="handDrawn"&&f.selectAll("path").attr("style",y),O.select(":nth-child(2)").attr("style",y),f.selectAll(".divider").select("path").attr("style",y),e.labelStyle?f.selectAll("span").attr("style",e.labelStyle):f.selectAll("span").attr("style",y),!h){const j=RegExp(/color\s*:\s*([^;]*)/),I=j.exec(y);if(I){const H=I[0].replace("color","fill");f.selectAll("tspan").attr("style",H)}else if(g){const H=j.exec(g);if(H){const V=H[0].replace("color","fill");f.selectAll("tspan").attr("style",V)}}}return qt(e,O),e.intersect=function(j){return Ot.rect(e,j)},f}B(kL,"classBox");async function _L(i,e){var Y,$;const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const a=e,o=e,c=20,h=20,u="verifyMethod"in e,f=Qt(e),{themeVariables:p}=Ae(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,y=i.insert("g").attr("class",f).attr("id",e.domId??e.id);let v;u?v=await ua(y,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):v=await ua(y,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let C=v;const _=await ua(y,a.name,C,e.labelStyle+"; font-weight: bold;");if(C+=_+h,u){const q=await ua(y,`${a.requirementId?`ID: ${a.requirementId}`:""}`,C,e.labelStyle);C+=q;const J=await ua(y,`${a.text?`Text: ${a.text}`:""}`,C,e.labelStyle);C+=J;const W=await ua(y,`${a.risk?`Risk: ${a.risk}`:""}`,C,e.labelStyle);C+=W,await ua(y,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,C,e.labelStyle)}else{const q=await ua(y,`${o.type?`Type: ${o.type}`:""}`,C,e.labelStyle);C+=q,await ua(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,e.labelStyle)}const w=(((Y=y.node())==null?void 0:Y.getBBox().width)??200)+c,T=((($=y.node())==null?void 0:$.getBBox().height)??200)+c,A=-w/2,E=-T/2,N=Dt.svg(y),R=Ft(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const M=N.rectangle(A,E,w,T,R),O=y.insert(()=>M,":first-child");if(O.attr("class","basic label-container outer-path").attr("style",n),g!=null&&g.length){const q=e.colorIndex??0;y.attr("data-color-id",`color-${q%g.length}`)}if(y.selectAll(".label").each((q,J,W)=>{const F=Xt(W[J]),U=F.attr("transform");let j=0,I=0;if(U){const P=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);P&&(j=parseFloat(P[1]),I=parseFloat(P[2]))}const H=I-T/2;let V=A+c/2;(J===0||J===1)&&(V=j),F.attr("transform",`translate(${V}, ${H+c})`)}),C>v+_+h){const q=E+v+_+h;let J;if(e.look==="neo"){const U=[[A,q],[A+w,q],[A+w,q+.001],[A,q+.001]];J=N.polygon(U,R)}else J=N.line(A,q,A+w,q,R);y.insert(()=>J).attr("class","divider")}return qt(e,O),e.intersect=function(q){return Ot.rect(e,q)},n&&e.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",n),y}B(_L,"requirementBox");async function ua(i,e,r,n=""){if(e==="")return 0;const a=i.insert("g").attr("class","label").attr("style",n),o=Ae(),c=o.htmlLabels??!0,h=await gs(a,Sv(_l(e)),{width:fs(e,o)+50,classes:"markdown-node-label",useHtmlLabels:c,style:n},o);let u;if(c){const f=h.children[0],p=Xt(h);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}else{const f=h.children[0];for(const p of f.children)n&&p.setAttribute("style",n);u=h.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}B(ua,"addText");var OU=B(i=>{switch(i){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 SL(i,e,{config:r}){var J,W;const{labelStyles:n,nodeStyles:a}=$t(e);e.labelStyle=n||"";const o=10,c=e.width;e.width=(e.width??200)-10;const{shapeSvg:h,bbox:u,label:f}=await Jt(i,e,Qt(e)),p=e.padding||10;let g="",x;"ticket"in e&&e.ticket&&((J=r==null?void 0:r.kanban)!=null&&J.ticketBaseUrl)&&(g=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",e.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let v,C;x?{label:v,bbox:C}=await I0(x,"ticket"in e&&e.ticket||"",y):{label:v,bbox:C}=await I0(h,"ticket"in e&&e.ticket||"",y);const{label:_,bbox:w}=await I0(h,"assigned"in e&&e.assigned||"",y);e.width=c;const T=10,A=(e==null?void 0:e.width)||0,E=Math.max(C.height,w.height)/2,N=Math.max(u.height+T*2,(e==null?void 0:e.height)||0)+E,R=-A/2,M=-N/2;f.attr("transform","translate("+(p-A/2)+", "+(-E-u.height/2)+")"),v.attr("transform","translate("+(p-A/2)+", "+(-E+u.height/2)+")"),_.attr("transform","translate("+(p+A/2-w.width-2*o)+", "+(-E+u.height/2)+")");let O;const{rx:Y,ry:$}=e,{cssStyles:q}=e;if(e.look==="handDrawn"){const F=Dt.svg(h),U=Ft(e,{}),j=Y||$?F.path(wo(R,M,A,N,Y||0),U):F.rectangle(R,M,A,N,U);O=h.insert(()=>j,":first-child"),O.attr("class","basic label-container").attr("style",q||null)}else{O=h.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",a).attr("rx",Y??5).attr("ry",$??5).attr("x",R).attr("y",M).attr("width",A).attr("height",N);const F="priority"in e&&e.priority;if(F){const U=h.append("line"),j=R+2,I=M+Math.floor((Y??0)/2),H=M+N-Math.floor((Y??0)/2);U.attr("x1",j).attr("y1",I).attr("x2",j).attr("y2",H).attr("stroke-width","4").attr("stroke",OU(F))}}return qt(e,O),e.height=N,e.intersect=function(F){return Ot.rect(e,F)},h}B(SL,"kanbanItem");async function wL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Jt(i,e,Qt(e)),u=o.width+10*c,f=o.height+8*c,p=.15*u,{cssStyles:g}=e,x=o.width+20,y=o.height+20,v=Math.max(u,x),C=Math.max(f,y);h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let _;const w=`M0 0
342
- a${p},${p} 1 0,0 ${v*.25},${-1*C*.1}
343
- a${p},${p} 1 0,0 ${v*.25},0
344
- a${p},${p} 1 0,0 ${v*.25},0
345
- a${p},${p} 1 0,0 ${v*.25},${C*.1}
346
-
347
- a${p},${p} 1 0,0 ${v*.15},${C*.33}
348
- a${p*.8},${p*.8} 1 0,0 0,${C*.34}
349
- a${p},${p} 1 0,0 ${-1*v*.15},${C*.33}
350
-
351
- a${p},${p} 1 0,0 ${-1*v*.25},${C*.15}
352
- a${p},${p} 1 0,0 ${-1*v*.25},0
353
- a${p},${p} 1 0,0 ${-1*v*.25},0
354
- a${p},${p} 1 0,0 ${-1*v*.25},${-1*C*.15}
355
-
356
- a${p},${p} 1 0,0 ${-1*v*.1},${-1*C*.33}
357
- a${p*.8},${p*.8} 1 0,0 0,${-1*C*.34}
358
- a${p},${p} 1 0,0 ${v*.1},${-1*C*.33}
359
- H0 V0 Z`;if(e.look==="handDrawn"){const T=Dt.svg(a),A=Ft(e,{}),E=T.path(w,A);_=a.insert(()=>E,":first-child"),_.attr("class","basic label-container").attr("style",$i(g))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",w);return _.attr("transform",`translate(${-v/2}, ${-C/2})`),qt(e,_),e.calcIntersect=function(T,A){return Ot.rect(T,A)},e.intersect=function(T){return _t.info("Bang intersect",e,T),Ot.rect(e,T)},a}B(wL,"bang");async function TL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Jt(i,e,Qt(e)),u=o.width+2*c,f=o.height+2*c,p=.15*u,g=.25*u,x=.35*u,y=.2*u,{cssStyles:v}=e;let C;const _=`M0 0
360
- a${p},${p} 0 0,1 ${u*.25},${-1*u*.1}
361
- a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
362
- a${g},${g} 1 0,1 ${u*.35},${u*.2}
363
-
364
- a${p},${p} 1 0,1 ${u*.15},${f*.35}
365
- a${y},${y} 1 0,1 ${-1*u*.15},${f*.65}
366
-
367
- a${g},${p} 1 0,1 ${-1*u*.25},${u*.15}
368
- a${x},${x} 1 0,1 ${-1*u*.5},0
369
- a${p},${p} 1 0,1 ${-1*u*.25},${-1*u*.15}
370
-
371
- a${p},${p} 1 0,1 ${-1*u*.1},${-1*f*.35}
372
- a${y},${y} 1 0,1 ${u*.1},${-1*f*.65}
373
- H0 V0 Z`;if(e.look==="handDrawn"){const w=Dt.svg(a),T=Ft(e,{}),A=w.path(_,T);C=a.insert(()=>A,":first-child"),C.attr("class","basic label-container").attr("style",$i(v))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",_);return h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),C.attr("transform",`translate(${-u/2}, ${-f/2})`),qt(e,C),e.calcIntersect=function(w,T){return Ot.rect(w,T)},e.intersect=function(w){return _t.info("Cloud intersect",e,w),Ot.rect(e,w)},a}B(TL,"cloud");async function BL(i,e){const{labelStyles:r,nodeStyles:n}=$t(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:c,label:h}=await Jt(i,e,Qt(e)),u=o.width+8*c,f=o.height+2*c,p=5,g=e.look==="neo"?`
374
- M${-u/2} ${f/2-p}
375
- v${-f+2*p}
376
- q0,-${p} ${p},-${p}
377
- h${u-2*p}
378
- q${p},0 ${p},${p}
379
- v${f-p}
380
- H${-u/2}
381
- Z
382
- `:`
383
- M${-u/2} ${f/2-p}
384
- v${-f+2*p}
385
- q0,-${p} ${p},-${p}
386
- h${u-2*p}
387
- q${p},0 ${p},${p}
388
- v${f-2*p}
389
- q0,${p} ${-p},${p}
390
- h${-(u-2*p)}
391
- q${-p},0 ${-p},${-p}
392
- Z
393
- `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",g);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",f/2).attr("x2",u/2).attr("y2",f/2),h.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>h.node()),qt(e,x),e.calcIntersect=function(y,v){return Ot.rect(y,v)},e.intersect=function(y){return Ot.rect(e,y)},a}B(BL,"defaultMindmapNode");async function AL(i,e){const r={padding:e.padding??0};return x1(i,e,r)}B(AL,"mindmapCircle");var jU=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:aL},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:iL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:sL},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:hL},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:EM},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:x1},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:wL},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:TL},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:JM},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:DM},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:YM},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:WM},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:gL},{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:HM},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:LM},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:dL},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:CM},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:rL},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:cL},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:lL},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:jM},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:FM},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:wM},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:TM},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:BM},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:GM},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:xL},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:RM},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:pL},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:VM},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:AM},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:MM},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:yL},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:vL},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:NM},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:mL},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:OM},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:nL},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ZM},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:QM},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:vM},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:SM},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:fL},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:uL},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:bL},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:XM}],RU=B(()=>{const e=[...Object.entries({state:oL,choice:kM,note:KM,rectWithTitle:eL,labelRect:UM,iconSquare:IM,iconCircle:zM,icon:$M,iconRounded:qM,imageSquare:PM,anchor:xM,kanbanItem:SL,mindmapCircle:AL,defaultMindmapNode:BL,classBox:kL,erBox:b1,requirementBox:_L}),...jU.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),EL=RU();function DU(i){return i in EL}B(DU,"isValidShape");var nm=new Map;async function ML(i,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const o=e.shape?EL[e.shape]:void 0;if(!o)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;r.config.securityLevel==="sandbox"?c="_top":e.linkTarget&&(c=e.linkTarget||"_blank"),n=i.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),a=await o(n,e,r)}else a=await o(i,e,r),n=a;return n.attr("data-look",$i(e.look)),e.tooltip&&a.attr("title",e.tooltip),nm.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}B(ML,"insertNode");var Eit=B((i,e)=>{nm.set(e.id,i)},"setNodeElem"),Mit=B(()=>{nm.clear()},"clear"),Lit=B(i=>{const e=nm.get(i.id);_t.trace("Transforming node",i.diff,i,"translate("+(i.x-i.width/2-5)+", "+i.width/2+")");const r=8,n=i.diff||0;return i.clusterNode?e.attr("transform","translate("+(i.x+n-i.width/2)+", "+(i.y-i.height/2-r)+")"):e.attr("transform","translate("+i.x+", "+i.y+")"),n},"positionNode"),FU=B((i,e,r,n,a,o=!1,c)=>{e.arrowTypeStart&&Rw(i,"start",e.arrowTypeStart,r,n,a,o,c),e.arrowTypeEnd&&Rw(i,"end",e.arrowTypeEnd,r,n,a,o,c)},"addEdgeMarkers"),$U={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},zU=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Rw=B((i,e,r,n,a,o,c=!1,h)=>{var v;const u=$U[r],f=u&&zU.includes(u.type);if(!u){_t.warn(`Unknown arrow type: ${r}`);return}const p=u.type,y=`${a}_${o}-${p}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),_=`${y}_${C}`;if(!document.getElementById(_)){const w=document.getElementById(y);if(w){const T=w.cloneNode(!0);T.id=_,T.querySelectorAll("path, circle, line").forEach(E=>{E.setAttribute("stroke",h),u.fill&&E.setAttribute("fill",h)}),(v=w.parentNode)==null||v.appendChild(T)}}i.attr(`marker-${e}`,`url(${n}#${_})`)}else i.attr(`marker-${e}`,`url(${n}#${y})`)},"addEdgeMarker"),qU=B(i=>{var e,r;return typeof i=="string"?i:(r=(e=Ae())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Sg=new Map,Xi=new Map,Nit=B(()=>{Sg.clear(),Xi.clear()},"clear"),yu=B(i=>i?typeof i=="string"?i:i.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),IU=B(async(i,e)=>{const r=Ae();let n=vr(r);const{labelStyles:a}=$t(e);e.labelStyle=a;const o=i.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label").attr("data-id",e.id),h=e.labelType==="markdown",f=await gs(i,e.label,{style:yu(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},r);c.node().appendChild(f),_t.info("abc82",e,e.labelType);let p=f.getBBox(),g=p;if(n){const y=f.children[0],v=Xt(f);p=y.getBoundingClientRect(),g=p,v.attr("width",p.width),v.attr("height",p.height)}else{const y=Xt(f).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",uu(g,n)),Sg.set(e.id,o),e.width=p.width,e.height=p.height;let x;if(e.startLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await po(v,e.startLabelLeft,yu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",uu(_,n)),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).startLeft=y,$u(x,e.startLabelLeft)}if(e.startLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await po(v,e.startLabelRight,yu(e.labelStyle)||"",!1,!1);x=C,v.node().appendChild(C);let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",uu(_,n)),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).startRight=y,$u(x,e.startLabelRight)}if(e.endLabelLeft){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await po(v,e.endLabelLeft,yu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",uu(_,n)),y.node().appendChild(C),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).endLeft=y,$u(x,e.endLabelLeft)}if(e.endLabelRight){const y=i.insert("g").attr("class","edgeTerminals"),v=y.insert("g").attr("class","inner"),C=await po(v,e.endLabelRight,yu(e.labelStyle)||"",!1,!1);x=C;let _=C.getBBox();if(n){const w=C.children[0],T=Xt(C);_=w.getBoundingClientRect(),T.attr("width",_.width),T.attr("height",_.height)}v.attr("transform",uu(_,n)),y.node().appendChild(C),Xi.get(e.id)||Xi.set(e.id,{}),Xi.get(e.id).endRight=y,$u(x,e.endLabelRight)}return f},"insertEdgeLabel");function $u(i,e){vr(Ae())&&i&&(i.style.width=e.length*9+"px",i.style.height="12px")}B($u,"setTerminalWidth");var PU=B((i,e)=>{_t.debug("Moving label abc88 ",i.id,i.label,Sg.get(i.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=Ae(),{subGraphTitleTotalMargin:a}=a1(n);if(i.label){const o=Sg.get(i.id);let c=i.x,h=i.y;if(r){const u=Rn.calcLabelPosition(r);_t.debug("Moving label "+i.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(c=u.x,h=u.y)}o.attr("transform",`translate(${c}, ${h+a/2})`)}if(i.startLabelLeft){const o=Xi.get(i.id).startLeft;let c=i.x,h=i.y;if(r){const u=Rn.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.startLabelRight){const o=Xi.get(i.id).startRight;let c=i.x,h=i.y;if(r){const u=Rn.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.endLabelLeft){const o=Xi.get(i.id).endLeft;let c=i.x,h=i.y;if(r){const u=Rn.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}if(i.endLabelRight){const o=Xi.get(i.id).endRight;let c=i.x,h=i.y;if(r){const u=Rn.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",r);c=u.x,h=u.y}o.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),HU=B((i,e)=>{const r=i.x,n=i.y,a=Math.abs(e.x-r),o=Math.abs(e.y-n),c=i.width/2,h=i.height/2;return a>=c||o>=h},"outsideNode"),UU=B((i,e,r)=>{_t.debug(`intersection calc abc89:
394
- outsidePoint: ${JSON.stringify(e)}
395
- insidePoint : ${JSON.stringify(r)}
396
- node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const n=i.x,a=i.y,o=Math.abs(n-r.x),c=i.width/2;let h=r.x<e.x?c-o:c+o;const u=i.height/2,f=Math.abs(e.y-r.y),p=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*c>Math.abs(n-e.x)*u){let g=r.y<e.y?e.y-u-a:a-u-e.y;h=p*g/f;const x={x:r.x<e.x?r.x+h:r.x-p+h,y:r.y<e.y?r.y+f-g:r.y-f+g};return h===0&&(x.x=e.x,x.y=e.y),p===0&&(x.x=e.x),f===0&&(x.y=e.y),_t.debug(`abc89 top/bottom calc, Q ${f}, q ${g}, R ${p}, r ${h}`,x),x}else{r.x<e.x?h=e.x-c-n:h=n-c-e.x;let g=f*h/p,x=r.x<e.x?r.x+p-h:r.x-p+h,y=r.y<e.y?r.y+g:r.y-g;return _t.debug(`sides calc abc89, Q ${f}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:y}),h===0&&(x=e.x,y=e.y),p===0&&(x=e.x),f===0&&(y=e.y),{x,y}}},"intersection"),Dw=B((i,e)=>{_t.warn("abc88 cutPathAtIntersect",i,e);let r=[],n=i[0],a=!1;return i.forEach(o=>{if(_t.info("abc88 checking point",o,e),!HU(e,o)&&!a){const c=UU(e,n,o);_t.debug("abc88 inside",o,n,c),_t.debug("abc88 intersection",c,e);let h=!1;r.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),r.some(u=>u.x===c.x&&u.y===c.y)?_t.warn("abc88 no intersect",c,r):r.push(c),a=!0}else _t.warn("abc88 outside",o,n),n=o,a||r.push(o)}),_t.debug("returning points",r),r},"cutPathAtIntersect");function LL(i){const e=[],r=[];for(let n=1;n<i.length-1;n++){const a=i[n-1],o=i[n],c=i[n+1];(a.x===o.x&&o.y===c.y&&Math.abs(o.x-c.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===c.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-c.y)>5)&&(e.push(o),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}B(LL,"extractCornerPoints");var Fw=B(function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=Math.sqrt(n*n+a*a),c=r/o;return{x:e.x-c*n,y:e.y-c*a}},"findAdjacentPoint"),WU=B(function(i){const{cornerPointPositions:e}=LL(i),r=[];for(let n=0;n<i.length;n++)if(e.includes(n)){const a=i[n-1],o=i[n+1],c=i[n],h=Fw(a,c,5),u=Fw(o,c,5),f=u.x-h.x,p=u.y-h.y;r.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){_t.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const y=5;c.x===h.x?x={x:f<0?h.x-y+g:h.x+y-g,y:p<0?h.y-g:h.y+g}:x={x:f<0?h.x-g:h.x+g,y:p<0?h.y-y+g:h.y+y-g}}else _t.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(x,u)}else r.push(i[n]);return r},"fixCorners"),YU=B((i,e,r)=>{const n=i-e-r,a=2,o=2,c=a+o,h=Math.floor(n/c),u=Array(h).fill(`${a} ${o}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),GU=B(function(i,e,r,n,a,o,c,h=!1){var I;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=Ae();let f=e.points,p=!1;const g=a;var x=o;const y=[];for(const H in e.cssCompiledStyles)M5(H)||y.push(e.cssCompiledStyles[H]);_t.debug("UIO intersect check",e.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(f=f.slice(1,e.points.length-1),f.unshift(g.intersect(f[0])),_t.debug("Last point UIO",e.start,"-->",e.end,f[f.length-1],x,x.intersect(f[f.length-1])),f.push(x.intersect(f[f.length-1])));const v=btoa(JSON.stringify(f));e.toCluster&&(_t.info("to cluster abc88",r.get(e.toCluster)),f=Dw(e.points,r.get(e.toCluster).node),p=!0),e.fromCluster&&(_t.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(f,null,2)),f=Dw(f.reverse(),r.get(e.fromCluster).node).reverse(),p=!0);let C=f.filter(H=>!Number.isNaN(H.y));const _=qU(e.curve);_!=="rounded"&&(C=WU(C));let w=Yu;switch(_){case"linear":w=Yu;break;case"basis":w=Zx;break;case"cardinal":w=hE;break;case"bumpX":w=aE;break;case"bumpY":w=sE;break;case"catmullRom":w=fE;break;case"monotoneX":w=xE;break;case"monotoneY":w=bE;break;case"natural":w=CE;break;case"step":w=kE;break;case"stepAfter":w=SE;break;case"stepBefore":w=_E;break;case"rounded":w=Yu;break;default:w=Zx}const{x:T,y:A}=Iq(e),E=y7().x(T).y(A).curve(w);let N;switch(e.thickness){case"normal":N="edge-thickness-normal";break;case"thick":N="edge-thickness-thick";break;case"invisible":N="edge-thickness-invisible";break;default:N="edge-thickness-normal"}switch(e.pattern){case"solid":N+=" edge-pattern-solid";break;case"dotted":N+=" edge-pattern-dotted";break;case"dashed":N+=" edge-pattern-dashed";break;default:N+=" edge-pattern-solid"}let R,M=_==="rounded"?NL(OL(C,e),5):E(C);const O=Array.isArray(e.style)?e.style:[e.style];let Y=O.find(H=>H==null?void 0:H.startsWith("stroke:")),$="";e.animate&&($="edge-animation-fast"),e.animation&&($="edge-animation-"+e.animation);let q=!1;if(e.look==="handDrawn"){const H=Dt.svg(i);Object.assign([],C);const V=H.path(M,{roughness:.3,seed:u});N+=" transition",R=Xt(V).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+N+(e.classes?" "+e.classes:"")+($?" "+$:"")).attr("style",O?O.reduce((P,K)=>P+";"+K,""):"");let Z=R.attr("d");R.attr("d",Z),i.node().appendChild(R.node())}else{const H=y.join(";"),V=O?O.reduce((bt,kt)=>bt+kt+";",""):"",Z=(H?H+";"+V+";":V)+";"+(O?O.reduce((bt,kt)=>bt+";"+kt,""):"");R=i.append("path").attr("d",M).attr("id",`${c}-${e.id}`).attr("class"," "+N+(e.classes?" "+e.classes:"")+($?" "+$:"")).attr("style",Z),Y=(I=Z.match(/stroke:([^;]+)/))==null?void 0:I[1],q=e.animate===!0||!!e.animation||H.includes("animation");const P=R.node(),K=typeof P.getTotalLength=="function"?P.getTotalLength():0,ot=IS[e.arrowTypeStart]||0,st=IS[e.arrowTypeEnd]||0;if(e.look==="neo"&&!q){const kt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?YU(K,ot,st):`0 ${ot} ${K-ot-st} ${st}`}; stroke-dashoffset: 0;`;R.attr("style",kt+R.attr("style"))}}R.attr("data-edge",!0),R.attr("data-et","edge"),R.attr("data-id",e.id),R.attr("data-points",v),R.attr("data-look",$i(e.look)),e.showPoints&&C.forEach(H=>{i.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let J="";(Ae().flowchart.arrowMarkerAbsolute||Ae().state.arrowMarkerAbsolute)&&(J=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,J=J.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),_t.info("arrowTypeStart",e.arrowTypeStart),_t.info("arrowTypeEnd",e.arrowTypeEnd);const W=!q&&(e==null?void 0:e.look)==="neo";FU(R,e,J,c,n,W,Y);const F=Math.floor(f.length/2),U=f[F];Rn.isLabelCoordinateInPath(U,R.attr("d"))||(p=!0);let j={};return p&&(j.updatedPath=f),j.originalPath=e.points,j},"insertEdge");function NL(i,e){if(i.length<2)return"";let r="";const n=i.length,a=1e-5;for(let o=0;o<n;o++){const c=i[o],h=i[o-1],u=i[o+1];if(o===0)r+=`M${c.x},${c.y}`;else if(o===n-1)r+=`L${c.x},${c.y}`;else{const f=c.x-h.x,p=c.y-h.y,g=u.x-c.x,x=u.y-c.y,y=Math.hypot(f,p),v=Math.hypot(g,x);if(y<a||v<a){r+=`L${c.x},${c.y}`;continue}const C=f/y,_=p/y,w=g/v,T=x/v,A=C*w+_*T,E=Math.max(-1,Math.min(1,A)),N=Math.acos(E);if(N<a||Math.abs(Math.PI-N)<a){r+=`L${c.x},${c.y}`;continue}const R=Math.min(e/Math.sin(N/2),y/2,v/2),M=c.x-C*R,O=c.y-_*R,Y=c.x+w*R,$=c.y+T*R;r+=`L${M},${O}`,r+=`Q${c.x},${c.y} ${Y},${$}`}}return r}B(NL,"generateRoundedPath");function Bb(i,e){if(!i||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-i.x,n=e.y-i.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}B(Bb,"calculateDeltaAndAngle");function OL(i,e){const r=i.map(a=>({...a}));if(i.length>=2&&nr[e.arrowTypeStart]){const a=nr[e.arrowTypeStart],o=i[0],c=i[1],{angle:h}=Bb(o,c),u=a*Math.cos(h),f=a*Math.sin(h);r[0].x=o.x+u,r[0].y=o.y+f}const n=i.length;if(n>=2&&nr[e.arrowTypeEnd]){const a=nr[e.arrowTypeEnd],o=i[n-1],c=i[n-2],{angle:h}=Bb(c,o),u=a*Math.cos(h),f=a*Math.sin(h);r[n-1].x=o.x-u,r[n-1].y=o.y-f}return r}B(OL,"applyMarkerOffsetsToPoints");var VU=B((i,e,r,n)=>{e.forEach(a=>{yW[a](i,r,n)})},"insertMarkers"),XU=B((i,e,r)=>{_t.trace("Making markers for ",r),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),i.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),QU=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ZU=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),KU=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),JU=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),i.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),tW=B((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),eW=B((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),iW=B((i,e,r)=>{i.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),i.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),rW=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),nW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{transitionColor:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),i.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),aW=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),sW=B((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");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"),oW=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),lW=B((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");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"),cW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),i.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),hW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const u=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),uW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),i.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),fW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o,mainBkg:c}=a,h=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const u=i.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),dW=B((i,e,r)=>{i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
397
- L20,10
398
- M20,10
399
- L0,20`)},"requirement_arrow"),pW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a;i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
400
- L20,10
401
- M20,10
402
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),gW=B((i,e,r)=>{const n=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),mW=B((i,e,r)=>{const n=si(),{themeVariables:a}=n,{strokeWidth:o}=a,c=i.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),yW={extension:XU,composition:QU,aggregation:ZU,dependency:KU,lollipop:JU,point:tW,circle:eW,cross:iW,barb:rW,barbNeo:nW,only_one:aW,zero_or_one:sW,one_or_more:oW,zero_or_more:lW,only_one_neo:cW,zero_or_one_neo:hW,one_or_more_neo:uW,zero_or_more_neo:fW,requirement_arrow:dW,requirement_contains:gW,requirement_arrow_neo:pW,requirement_contains_neo:mW},xW=VU,bW={common:wf,getConfig:si,insertCluster:mU,insertEdge:GU,insertEdgeLabel:IU,insertMarkers:xW,insertNode:ML,interpolateToCurve:Jv,labelHelper:Jt,log:_t,positionEdgeLabel:PU},gf={},jL=B(i=>{for(const e of i)gf[e.name]=e},"registerLayoutLoaders"),vW=B(()=>{jL([{name:"dagre",loader:B(async()=>await Ce(()=>import("./dagre-KV5264BT-B0GpPXKL.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:B(async()=>await Ce(()=>import("./cose-bilkent-S5V4N54A-DlrROH5K.js"),__vite__mapDeps([6,7])),"loader")}])},"registerDefaultLayoutLoaders");vW();var Oit=B(async(i,e)=>{if(!(i.layoutAlgorithm in gf))throw new Error(`Unknown layout algorithm: ${i.layoutAlgorithm}`);if(i.diagramId)for(const p of i.nodes){const g=p.domId||p.id;p.domId=`${i.diagramId}-${g}`}const r=gf[i.layoutAlgorithm],n=await r.loader(),{theme:a,themeVariables:o}=i.config,{useGradient:c,gradientStart:h,gradientStop:u}=o,f=e.attr("id");if(e.append("defs").append("filter").attr("id",`${f}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${f}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),c){const p=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(i,e,bW,{algorithm:r.algorithm})},"render"),jit=B((i="",{fallback:e="dagre"}={})=>{if(i in gf)return i;if(e in gf)return _t.warn(`Layout algorithm ${i} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${i} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),RL="comm",DL="rule",FL="decl",CW="@import",kW="@namespace",_W="@keyframes",SW="@layer",wW=Math.abs,Xu=String.fromCharCode;function $L(i){return i.trim()}function Ab(i,e,r){return i.replace(e,r)}function Bc(i,e){return i.charCodeAt(e)|0}function ah(i,e,r){return i.slice(e,r)}function pa(i){return i.length}function TW(i){return i.length}function fp(i,e){return e.push(i),i}var am=1,sh=1,zL=0,xn=0,_i=0,dh="";function v1(i,e,r,n,a,o,c,h){return{value:i,root:e,parent:r,type:n,props:a,children:o,line:am,column:sh,length:c,return:"",siblings:h}}function BW(){return _i}function AW(){return _i=xn>0?Bc(dh,--xn):0,sh--,_i===10&&(sh=1,am--),_i}function $n(){return _i=xn<zL?Bc(dh,xn++):0,sh++,_i===10&&(sh=1,am++),_i}function go(){return Bc(dh,xn)}function Dp(){return xn}function sm(i,e){return ah(dh,i,e)}function mf(i){switch(i){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 EW(i){return am=sh=1,zL=pa(dh=i),xn=0,[]}function MW(i){return dh="",i}function H0(i){return $L(sm(xn-1,Eb(i===91?i+2:i===40?i+1:i)))}function LW(i){for(;(_i=go())&&_i<33;)$n();return mf(i)>2||mf(_i)>3?"":" "}function NW(i,e){for(;--e&&$n()&&!(_i<48||_i>102||_i>57&&_i<65||_i>70&&_i<97););return sm(i,Dp()+(e<6&&go()==32&&$n()==32))}function Eb(i){for(;$n();)switch(_i){case i:return xn;case 34:case 39:i!==34&&i!==39&&Eb(_i);break;case 40:i===41&&Eb(i);break;case 92:$n();break}return xn}function OW(i,e){for(;$n()&&i+_i!==57;)if(i+_i===84&&go()===47)break;return"/*"+sm(e,xn-1)+"*"+Xu(i===47?i:$n())}function jW(i){for(;!mf(go());)$n();return sm(i,xn)}function RW(i){return MW(Fp("",null,null,null,[""],i=EW(i),0,[0],i))}function Fp(i,e,r,n,a,o,c,h,u){for(var f=0,p=0,g=c,x=0,y=0,v=0,C=1,_=1,w=1,T=0,A=0,E="",N=a,R=o,M=n,O=E;_;)switch(v=A,A=$n()){case 40:v!=108&&Bc(O,g-1)==58?(T++,O+="("):O+=H0(A);break;case 41:T--,O+=")";break;case 34:case 39:case 91:O+=H0(A);break;case 9:case 10:case 13:case 32:if(T>0){O+=Xu(A);break}O+=LW(v);break;case 92:O+=NW(Dp()-1,7);continue;case 47:switch(go()){case 42:case 47:fp(DW(OW($n(),Dp()),e,r,u),u),(mf(v||1)==5||mf(go()||1)==5)&&pa(O)&&ah(O,-1,void 0)!==" "&&(O+=" ");break;default:O+="/"}break;case 123*C:h[f++]=pa(O)*w;case 125*C:case 59:case 0:if(T>0&&A){O+=Xu(A);break}switch(A){case 0:case 125:_=0;case 59+p:w==-1&&(O=Ab(O,/\f/g,"")),y>0&&(pa(O)-g||C===0)&&fp(y>32?zw(O+";",n,r,g-1,u):zw(Ab(O," ","")+";",n,r,g-2,u),u);break;case 59:O+=";";default:if(fp(M=$w(O,e,r,f,p,a,h,E,N=[],R=[],g,o),o),A===123)if(p===0)Fp(O,e,M,M,N,o,g,h,R);else{switch(x){case 99:if(Bc(O,3)===110)break;case 108:if(Bc(O,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Fp(i,M,M,n&&fp($w(i,M,M,0,0,a,h,E,a,N=[],g,R),R),a,R,g,h,n?N:R):Fp(O,M,M,M,[""],R,0,h,R)}}f=p=y=0,C=w=1,E=O="",g=c;break;case 58:g=1+pa(O),y=v;default:if(C<1){if(A==123)--C;else if(A==125&&C++==0&&AW()==125)continue}switch(O+=Xu(A),A*C){case 38:w=p>0?1:(O+="\f",-1);break;case 44:if(T>0)break;h[f++]=(pa(O)-1)*w,w=1;break;case 64:go()===45&&(O+=H0($n())),x=go(),p=g=pa(E=O+=jW(Dp())),A++;break;case 45:v===45&&pa(O)==2&&(C=0)}}return o}function $w(i,e,r,n,a,o,c,h,u,f,p,g){for(var x=a-1,y=a===0?o:[""],v=TW(y),C=0,_=0,w=0;C<n;++C)for(var T=0,A=ah(i,x+1,x=wW(_=c[C])),E=i;T<v;++T)(E=$L(_>0?y[T]+" "+A:Ab(A,/&\f/g,y[T])))&&(u[w++]=E);return v1(i,e,r,a===0?DL:h,u,f,p,g)}function DW(i,e,r,n){return v1(i,e,r,RL,Xu(BW()),ah(i,2,-2),0,n)}function zw(i,e,r,n,a){return v1(i,e,r,FL,ah(i,0,n),ah(i,n+1,-1),n,a)}function Mb(i,e){for(var r="",n=0;n<i.length;n++)r+=e(i[n],n,i,e)||"";return r}function FW(i,e,r,n){switch(i.type){case SW:if(i.children.length)break;case CW:case kW:case FL:return i.return=i.return||i.value;case RL:return"";case _W:return i.return=i.value+"{"+Mb(i.children,n)+"}";case DL:if(!pa(i.value=i.props.join(",")))return""}return pa(r=Mb(i.children,n))?i.return=i.value+"{"+r+"}":""}var $W=c5(Object.keys,Object),zW=Object.prototype,qW=zW.hasOwnProperty;function IW(i){if(!Qg(i))return $W(i);var e=[];for(var r in Object(i))qW.call(i,r)&&r!="constructor"&&e.push(r);return e}var Lb=El(Hn,"DataView"),Nb=El(Hn,"Promise"),Ob=El(Hn,"Set"),jb=El(Hn,"WeakMap"),qw="[object Map]",PW="[object Object]",Iw="[object Promise]",Pw="[object Set]",Hw="[object WeakMap]",Uw="[object DataView]",HW=Al(Lb),UW=Al(df),WW=Al(Nb),YW=Al(Ob),GW=Al(jb),Qo=Bl;(Lb&&Qo(new Lb(new ArrayBuffer(1)))!=Uw||df&&Qo(new df)!=qw||Nb&&Qo(Nb.resolve())!=Iw||Ob&&Qo(new Ob)!=Pw||jb&&Qo(new jb)!=Hw)&&(Qo=function(i){var e=Bl(i),r=e==PW?i.constructor:void 0,n=r?Al(r):"";if(n)switch(n){case HW:return Uw;case UW:return qw;case WW:return Iw;case YW:return Pw;case GW:return Hw}return e});var VW="[object Map]",XW="[object Set]",QW=Object.prototype,ZW=QW.hasOwnProperty;function Ww(i){if(i==null)return!0;if(Zg(i)&&(pg(i)||typeof i=="string"||typeof i.splice=="function"||Zv(i)||Kv(i)||dg(i)))return!i.length;var e=Qo(i);if(e==VW||e==XW)return!i.size;if(Qg(i))return!IW(i).length;for(var r in i)if(ZW.call(i,r))return!1;return!0}var qL="c4",KW=B(i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),"detector"),JW=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./c4Diagram-AHTNJAMY-OeJBWXHU.js");return{diagram:e}},__vite__mapDeps([8,9]));return{id:qL,diagram:i}},"loader"),tY={id:qL,detector:KW,loader:JW},eY=tY,IL="flowchart",iY=B((i,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(i)},"detector"),rY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-B1D7Ky0W.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:IL,diagram:i}},"loader"),nY={id:IL,detector:iY,loader:rY},aY=nY,PL="flowchart-v2",sY=B((i,e)=>{var r,n,a;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(i)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(i))},"detector"),oY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-B1D7Ky0W.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:PL,diagram:i}},"loader"),lY={id:PL,detector:sY,loader:oY},cY=lY,HL="er",hY=B(i=>/^\s*erDiagram/.test(i),"detector"),uY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./erDiagram-SMLLAGMA-pskr9x-V.js");return{diagram:e}},__vite__mapDeps([15,12,13,14]));return{id:HL,diagram:i}},"loader"),fY={id:HL,detector:hY,loader:uY},dY=fY,UL="gitGraph",pY=B(i=>/^\s*gitGraph/.test(i),"detector"),gY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./gitGraphDiagram-UUTBAWPF-BiOGN6We.js");return{diagram:e}},__vite__mapDeps([16,17,18,19,4,2]));return{id:UL,diagram:i}},"loader"),mY={id:UL,detector:pY,loader:gY},yY=mY,WL="gantt",xY=B(i=>/^\s*gantt/.test(i),"detector"),bY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./ganttDiagram-T4ZO3ILL-BVJZZV1M.js");return{diagram:e}},__vite__mapDeps([20,21,22]));return{id:WL,diagram:i}},"loader"),vY={id:WL,detector:xY,loader:bY},CY=vY,YL="info",kY=B(i=>/^\s*info/.test(i),"detector"),_Y=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./infoDiagram-42DDH7IO-DgJYg1X1.js");return{diagram:e}},__vite__mapDeps([23,19,4,2]));return{id:YL,diagram:i}},"loader"),SY={id:YL,detector:kY,loader:_Y},GL="pie",wY=B(i=>/^\s*pie/.test(i),"detector"),TY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./pieDiagram-DEJITSTG-vNqz64o8.js");return{diagram:e}},__vite__mapDeps([24,17,19,4,2,25]));return{id:GL,diagram:i}},"loader"),BY={id:GL,detector:wY,loader:TY},VL="quadrantChart",AY=B(i=>/^\s*quadrantChart/.test(i),"detector"),EY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./quadrantDiagram-34T5L4WZ-TuVP5Gi6.js");return{diagram:e}},__vite__mapDeps([26,21,22]));return{id:VL,diagram:i}},"loader"),MY={id:VL,detector:AY,loader:EY},LY=MY,XL="xychart",NY=B(i=>/^\s*xychart(-beta)?/.test(i),"detector"),OY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./xychartDiagram-5P7HB3ND-BJa0AHtN.js");return{diagram:e}},__vite__mapDeps([27,21,22]));return{id:XL,diagram:i}},"loader"),jY={id:XL,detector:NY,loader:OY},RY=jY,QL="requirement",DY=B(i=>/^\s*requirement(Diagram)?/.test(i),"detector"),FY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./requirementDiagram-MS252O5E-D3mS8_ke.js");return{diagram:e}},__vite__mapDeps([28,12,13]));return{id:QL,diagram:i}},"loader"),$Y={id:QL,detector:DY,loader:FY},zY=$Y,ZL="sequence",qY=B(i=>/^\s*sequenceDiagram/.test(i),"detector"),IY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./sequenceDiagram-FGHM5R23-CTYCgk5P.js");return{diagram:e}},__vite__mapDeps([29,9,18]));return{id:ZL,diagram:i}},"loader"),PY={id:ZL,detector:qY,loader:IY},HY=PY,KL="class",UY=B((i,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(i)},"detector"),WY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./classDiagram-6PBFFD2Q-HXl3A_sM.js");return{diagram:e}},__vite__mapDeps([30,31,11,9,12,13]));return{id:KL,diagram:i}},"loader"),YY={id:KL,detector:UY,loader:WY},GY=YY,JL="classDiagram",VY=B((i,e)=>{var r;return/^\s*classDiagram/.test(i)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(i)},"detector"),XY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./classDiagram-v2-HSJHXN6E-HXl3A_sM.js");return{diagram:e}},__vite__mapDeps([32,31,11,9,12,13]));return{id:JL,diagram:i}},"loader"),QY={id:JL,detector:VY,loader:XY},ZY=QY,tN="state",KY=B((i,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(i)},"detector"),JY=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./stateDiagram-FHFEXIEX-DNbP2aCg.js");return{diagram:e}},__vite__mapDeps([33,34,12,13,1,2,3,4]));return{id:tN,diagram:i}},"loader"),tG={id:tN,detector:KY,loader:JY},eG=tG,eN="stateDiagram",iG=B((i,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(i)||/^\s*stateDiagram/.test(i)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),rG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./stateDiagram-v2-QKLJ7IA2-CfN6kjo8.js");return{diagram:e}},__vite__mapDeps([35,34,12,13]));return{id:eN,diagram:i}},"loader"),nG={id:eN,detector:iG,loader:rG},aG=nG,iN="journey",sG=B(i=>/^\s*journey/.test(i),"detector"),oG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./journeyDiagram-VCZTEJTY-B3DCvb8p.js");return{diagram:e}},__vite__mapDeps([36,11,9,25]));return{id:iN,diagram:i}},"loader"),lG={id:iN,detector:sG,loader:oG},cG=lG,hG=B((i,e,r)=>{_t.debug(`rendering svg for syntax error
403
- `);const n=O7(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),TA(n,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"),rN={draw:hG},uG=rN,fG={db:{},renderer:rN,parser:{parse:B(()=>{},"parse")}},dG=fG,nN="flowchart-elk",pG=B((i,e={})=>{var r;return/^\s*flowchart-elk/.test(i)||/^\s*(flowchart|graph)/.test(i)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),gG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./flowDiagram-DWJPFMVM-B1D7Ky0W.js");return{diagram:e}},__vite__mapDeps([10,11,9,12,13,14]));return{id:nN,diagram:i}},"loader"),mG={id:nN,detector:pG,loader:gG},yG=mG,aN="timeline",xG=B(i=>/^\s*timeline/.test(i),"detector"),bG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./timeline-definition-GMOUNBTQ-DKHJd4z8.js");return{diagram:e}},__vite__mapDeps([37,25]));return{id:aN,diagram:i}},"loader"),vG={id:aN,detector:xG,loader:bG},CG=vG,sN="mindmap",kG=B(i=>/^\s*mindmap/.test(i),"detector"),_G=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./mindmap-definition-QFDTVHPH-Bw04koyq.js");return{diagram:e}},__vite__mapDeps([38,12,13]));return{id:sN,diagram:i}},"loader"),SG={id:sN,detector:kG,loader:_G},wG=SG,oN="kanban",TG=B(i=>/^\s*kanban/.test(i),"detector"),BG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./kanban-definition-6JOO6SKY-B--dN6Ma.js");return{diagram:e}},__vite__mapDeps([39,11]));return{id:oN,diagram:i}},"loader"),AG={id:oN,detector:TG,loader:BG},EG=AG,lN="sankey",MG=B(i=>/^\s*sankey(-beta)?/.test(i),"detector"),LG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./sankeyDiagram-XADWPNL6-BmVRers6.js");return{diagram:e}},[]);return{id:lN,diagram:i}},"loader"),NG={id:lN,detector:MG,loader:LG},OG=NG,cN="packet",jG=B(i=>/^\s*packet(-beta)?/.test(i),"detector"),RG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-TYMM5635-Vmo5GAAU.js");return{diagram:e}},__vite__mapDeps([40,17,19,4,2]));return{id:cN,diagram:i}},"loader"),DG={id:cN,detector:jG,loader:RG},hN="radar",FG=B(i=>/^\s*radar-beta/.test(i),"detector"),$G=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-MMDJMWI5-C9Jc19Wo.js");return{diagram:e}},__vite__mapDeps([41,17,19,4,2]));return{id:hN,diagram:i}},"loader"),zG={id:hN,detector:FG,loader:$G},uN="block",qG=B(i=>/^\s*block(-beta)?/.test(i),"detector"),IG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./blockDiagram-DXYQGD6D-B7SyUIdV.js");return{diagram:e}},__vite__mapDeps([42,11,5,1,2,14]));return{id:uN,diagram:i}},"loader"),PG={id:uN,detector:qG,loader:IG},HG=PG,fN="treeView",UG=B(i=>/^\s*treeView-beta/.test(i),"detector"),WG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-5BDNPKRD-BBYcDW2Z.js");return{diagram:e}},__vite__mapDeps([43,17,18,19,4,2]));return{id:fN,diagram:i}},"loader"),YG={id:fN,detector:UG,loader:WG},GG=YG,dN="architecture",VG=B(i=>/^\s*architecture/.test(i),"detector"),XG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./architectureDiagram-Q4EWVU46-CWmjaqno.js");return{diagram:e}},__vite__mapDeps([44,17,19,4,2,7]));return{id:dN,diagram:i}},"loader"),QG={id:dN,detector:VG,loader:XG},ZG=QG,pN="ishikawa",KG=B(i=>/^\s*ishikawa(-beta)?\b/i.test(i),"detector"),JG=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./ishikawaDiagram-UXIWVN3A-arJgr-8P.js");return{diagram:e}},[]);return{id:pN,diagram:i}},"loader"),tV={id:pN,detector:KG,loader:JG},gN="venn",eV=B(i=>/^\s*venn-beta/.test(i),"detector"),iV=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./vennDiagram-DHZGUBPP-ChotNMNq.js");return{diagram:e}},[]);return{id:gN,diagram:i}},"loader"),rV={id:gN,detector:eV,loader:iV},nV=rV,mN="treemap",aV=B(i=>/^\s*treemap/.test(i),"detector"),sV=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./diagram-G4DWMVQ6-BxHxugdp.js");return{diagram:e}},__vite__mapDeps([45,13,17,19,4,2,22]));return{id:mN,diagram:i}},"loader"),oV={id:mN,detector:aV,loader:sV},yN="wardley-beta",lV=B(i=>/^\s*wardley-beta/i.test(i),"detector"),cV=B(async()=>{const{diagram:i}=await Ce(async()=>{const{diagram:e}=await import("./wardleyDiagram-NUSXRM2D-Z6Wbiv2H.js");return{diagram:e}},__vite__mapDeps([46,17,19,4,2]));return{id:yN,diagram:i}},"loader"),hV={id:yN,detector:lV,loader:cV},uV=hV,Yw=!1,om=B(()=>{Yw||(Yw=!0,Xp("error",dG,i=>i.toLowerCase().trim()==="error"),Xp("---",{db:{clear:B(()=>{},"clear")},styles:{},renderer:{draw:B(()=>{},"draw")},parser:{parse:B(()=>{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:B(()=>null,"init")},i=>i.toLowerCase().trimStart().startsWith("---")),Dx(yG,wG,ZG),Dx(eY,EG,ZY,GY,dY,CY,SY,BY,zY,HY,cY,aY,CG,yY,aG,eG,cG,LY,OG,DG,RY,HG,GG,zG,tV,oV,nV,uV))},"addDiagrams"),fV=B(async()=>{_t.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(xl).map(async([r,{detector:n,loader:a}])=>{if(a)try{qx(r)}catch{try{const{diagram:o,id:c}=await a();Xp(c,o,n)}catch(o){throw _t.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete xl[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){_t.error(`Failed to load ${e.length} external diagrams`);for(const r of e)_t.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),dV="graphics-document document";function xN(i,e){i.attr("role",dV),e!==""&&i.attr("aria-roledescription",e)}B(xN,"setA11yDiagramInfo");function bN(i,e,r,n){if(i.insert!==void 0){if(r){const a=`chart-desc-${n}`;i.attr("aria-describedby",a),i.insert("desc",":first-child").attr("id",a).text(r)}if(e){const a=`chart-title-${n}`;i.attr("aria-labelledby",a),i.insert("title",":first-child").attr("id",a).text(e)}}}B(bN,"addSVGa11yTitleDescription");var dl,Rb=(dl=class{constructor(e,r,n,a,o){this.type=e,this.text=r,this.db=n,this.parser=a,this.renderer=o}static async fromText(e,r={}){var f,p;const n=si(),a=bv(e,n);e=DP(e)+`
404
- `;try{qx(a)}catch{const g=fF(a);if(!g)throw new fA(`Diagram ${a} not found.`);const{id:x,diagram:y}=await g();Xp(x,y)}const{db:o,parser:c,renderer:h,init:u}=qx(a);return c.parser&&(c.parser.yy=o),(f=o.clear)==null||f.call(o),u==null||u(n),r.title&&((p=o.setDiagramTitle)==null||p.call(o,r.title)),await c.parse(e),new dl(a,e,o,c,h)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},B(dl,"Diagram"),dl),Gw=[],pV=B(()=>{Gw.forEach(i=>{i()}),Gw=[]},"attachFunctions"),gV=B(i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function vN(i){const e=i.match(uA);if(!e)return{text:i,metadata:{}};let r=qq(e[1],{schema:zq})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:i.slice(e[0].length),metadata:n}}B(vN,"extractFrontMatter");var mV=B(i=>i.replace(/\r\n?/g,`
405
- `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),yV=B(i=>{const{text:e,metadata:r}=vN(i),{displayMode:n,title:a,config:o={}}=r;return n&&(o.gantt||(o.gantt={}),o.gantt.displayMode=n),{title:a,config:o,text:e}},"processFrontmatter"),xV=B(i=>{const e=Rn.detectInit(i)??{},r=Rn.detectDirective(i,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:_P(i),directive:e}},"processDirectives");function C1(i){const e=mV(i),r=yV(e),n=xV(r.text),a=n1(r.config,n.directive);return i=gV(n.text),{code:i,title:r.title,config:a}}B(C1,"preprocessDiagram");function CN(i){const e=new TextEncoder().encode(i),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}B(CN,"toBase64");var bV=5e4,vV="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",CV="sandbox",kV="loose",_V="http://www.w3.org/2000/svg",SV="http://www.w3.org/1999/xlink",wV="http://www.w3.org/1999/xhtml",TV="100%",BV="100%",AV="border:0;margin:0;",EV="margin:0",MV="allow-top-navigation-by-user-activation allow-popups",LV='The "iframe" tag is not supported by your browser.',NV=["foreignobject"],OV=["dominant-baseline"];function k1(i){const e=C1(i);return Gp(),qF(e.config??{}),e}B(k1,"processAndSetConfigs");async function kN(i,e){om();try{const{code:r,config:n}=k1(i);return{diagramType:(await SN(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}B(kN,"parse");var Vw=B((i,e,r=[])=>`
406
- .${i} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),jV=B((i,e=new Map)=>{let r="";if(i.themeCSS!==void 0&&(r+=`
407
- ${i.themeCSS}`),i.fontFamily!==void 0&&(r+=`
408
- :root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(r+=`
409
- :root { --mermaid-alt-font-family: ${i.altFontFamily}}`),e instanceof Map){const c=vr(i)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(h=>{Ww(h.styles)||c.forEach(u=>{r+=Vw(h.id,u,h.styles)}),Ww(h.textStyles)||(r+=Vw(h.id,"tspan",((h==null?void 0:h.textStyles)||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),RV=B((i,e,r,n)=>{const a=jV(i,r),o=a6(e,a,{...i.themeVariables,theme:i.theme,look:i.look},n);return Mb(RW(`${n}{${o}}`),FW)},"createUserStyles"),DV=B((i="",e,r)=>{let n=i;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=_l(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),FV=B((i="",e)=>{var a,o;const r=(o=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":BV,n=CN(`<body style="${EV}">${i}</body>`);return`<iframe style="width:${TV};height:${r};${AV}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${MV}">
410
- ${LV}
411
- </iframe>`},"putIntoIFrame"),Xw=B((i,e,r,n,a)=>{const o=i.append("div");o.attr("id",r),n&&o.attr("style",n);const c=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",_V);return a&&c.attr("xmlns:xlink",a),c.append("g"),i},"appendDivSvgG");function Db(i,e){return i.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}B(Db,"sandboxedIframe");var $V=B((i,e,r,n)=>{var a,o,c;(a=i.getElementById(e))==null||a.remove(),(o=i.getElementById(r))==null||o.remove(),(c=i.getElementById(n))==null||c.remove()},"removeExistingElements"),zV=B(async function(i,e,r){var J,W,F,U,j,I;om();const n=k1(e);e=n.code;const a=si();_t.debug(a),e.length>((a==null?void 0:a.maxTextSize)??bV)&&(e=vV);const o="#"+i,c="i"+i,h="#"+c,u="d"+i,f="#"+u,p=B(()=>{const V=Xt(x?h:f).node();V&&"remove"in V&&V.remove()},"removeTempElements");let g=Xt("body");const x=a.securityLevel===CV,y=a.securityLevel===kV,v=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),x){const H=Db(Xt(r),c);g=Xt(H.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt(r);Xw(g,i,u,`font-family: ${v}`,SV)}else{if($V(document,i,u,c),x){const H=Db(Xt("body"),c);g=Xt(H.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Xt("body");Xw(g,i,u)}let C,_;try{C=await Rb.fromText(e,{title:n.title})}catch(H){if(a.suppressErrorRendering)throw p(),H;C=await Rb.fromText("error"),_=H}const w=g.select(f).node(),T=C.type,A=w.firstChild,E=A.firstChild,N=(W=(J=C.renderer).getClasses)==null?void 0:W.call(J,e,C),R=RV(a,T,N,o),M=document.createElement("style");M.innerHTML=R,A.insertBefore(M,E);try{await C.renderer.draw(e,i,"11.14.0",C)}catch(H){throw a.suppressErrorRendering?p():uG.draw(e,i,"11.14.0"),H}const O=g.select(`${f} svg`),Y=(U=(F=C.db).getAccTitle)==null?void 0:U.call(F),$=(I=(j=C.db).getAccDescription)==null?void 0:I.call(j);wN(T,O,Y,$),g.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",wV);let q=g.select(f).node().innerHTML;if(_t.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),q=DV(q,x,ds(a.arrowMarkerAbsolute)),x){const H=g.select(f+" svg").node();q=FV(q,H)}else y||(q=yl.sanitize(q,{ADD_TAGS:NV,ADD_ATTR:OV,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(pV(),_)throw _;return p(),{diagramType:T,svg:q,bindFunctions:C.db.bindFunctions}},"render");function _N(i={}){var n;const e=Ei({},i);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),$F(e),e!=null&&e.theme&&e.theme in os?e.themeVariables=os[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=os.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?FF(e):yA();xv(r.logLevel),om()}B(_N,"initialize");var SN=B((i,e={})=>{const{code:r}=C1(i);return Rb.fromText(r,e)},"getDiagramFromText");function wN(i,e,r,n){xN(e,i),bN(e,r,n,e.attr("id"))}B(wN,"addA11yInfo");var wl=Object.freeze({render:zV,parse:kN,getDiagramFromText:SN,initialize:_N,getConfig:si,setConfig:xA,getSiteConfig:yA,updateSiteConfig:zF,reset:B(()=>{Gp()},"reset"),globalReset:B(()=>{Gp(th)},"globalReset"),defaultConfig:th});xv(si().logLevel);Gp(si());var qV=B((i,e,r)=>{_t.warn(i),r1(i)?(r&&r(i.str,i.hash),e.push({...i,message:i.str,error:i})):(r&&r(i),i instanceof Error&&e.push({str:i.message,message:i.message,hash:i.name,error:i}))},"handleError"),TN=B(async function(i={querySelector:".mermaid"}){try{await IV(i)}catch(e){if(r1(e)&&_t.error(e.str),Xr.parseError&&Xr.parseError(e),!i.suppressErrors)throw _t.error("Use the suppressErrors option to suppress these errors"),e}},"run"),IV=B(async function({postRenderCallback:i,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=wl.getConfig();_t.debug(`${i?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");_t.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(_t.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),wl.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const o=new Rn.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let c;const h=[];for(const u of Array.from(a)){if(_t.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const f=`mermaid-${o.next()}`;c=u.innerHTML,c=H5(Rn.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Rn.detectInit(c);p&&_t.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await MN(f,c,u);u.innerHTML=g,i&&await i(f),x&&x(u)}catch(g){qV(g,h,Xr.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),BN=B(function(i){wl.initialize(i)},"initialize"),PV=B(async function(i,e,r){_t.warn("mermaid.init is deprecated. Please use run instead."),i&&BN(i);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await TN(n)},"init"),HV=B(async(i,{lazyLoad:e=!0}={})=>{om(),Dx(...i),e===!1&&await fV()},"registerExternalDiagrams"),AN=B(function(){if(Xr.startOnLoad){const{startOnLoad:i}=wl.getConfig();i&&Xr.run().catch(e=>_t.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",AN,!1);var UV=B(function(i){Xr.parseError=i},"setParseErrorHandler"),wg=[],U0=!1,EN=B(async()=>{if(!U0){for(U0=!0;wg.length>0;){const i=wg.shift();if(i)try{await i()}catch(e){_t.error("Error executing queue",e)}}U0=!1}},"executeQueue"),WV=B(async(i,e)=>new Promise((r,n)=>{const a=B(()=>new Promise((o,c)=>{wl.parse(i,e).then(h=>{o(h),r(h)},h=>{var u;_t.error("Error parsing",h),(u=Xr.parseError)==null||u.call(Xr,h),c(h),n(h)})}),"performCall");wg.push(a),EN().catch(n)}),"parse"),MN=B((i,e,r)=>new Promise((n,a)=>{const o=B(()=>new Promise((c,h)=>{wl.render(i,e,r).then(u=>{c(u),n(u)},u=>{var f;_t.error("Error parsing",u),(f=Xr.parseError)==null||f.call(Xr,u),h(u),a(u)})}),"performCall");wg.push(o),EN().catch(a)}),"render"),YV=B(()=>Object.keys(xl).map(i=>({id:i})),"getRegisteredDiagramsMetadata"),Xr={startOnLoad:!0,mermaidAPI:wl,parse:WV,render:MN,init:PV,run:TN,registerExternalDiagrams:HV,registerLayoutLoaders:jL,initialize:BN,parseError:void 0,contentLoaded:AN,setParseErrorHandler:UV,detectType:bv,registerIconPacks:HH,getRegisteredDiagramsMetadata:YV},_1=Xr;/*! Check if previously processed *//*!
412
- * Wait for document loaded before starting the execution
413
- */let Qw=null;function GV(i){const e="'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif";return i==="dark"?{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#1c1f2a",primaryColor:"rgba(157, 140, 255, 0.18)",primaryTextColor:"#f5f6fa",primaryBorderColor:"#9d8cff",secondaryColor:"rgba(96, 165, 250, 0.18)",secondaryBorderColor:"#93c5fd",secondaryTextColor:"#f5f6fa",tertiaryColor:"rgba(74, 222, 128, 0.16)",tertiaryBorderColor:"#86efac",tertiaryTextColor:"#f5f6fa",noteBkgColor:"rgba(251, 191, 36, 0.18)",noteBorderColor:"#fcd34d",noteTextColor:"#fcd34d",lineColor:"#9aa0b3",textColor:"#f5f6fa",mainBkg:"rgba(157, 140, 255, 0.18)",nodeBorder:"#9d8cff",clusterBkg:"rgba(255, 255, 255, 0.04)",clusterBorder:"#3d4358",edgeLabelBackground:"#1c1f2a",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}:{startOnLoad:!1,securityLevel:"strict",theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ede9fe",primaryTextColor:"#5b21b6",primaryBorderColor:"#7b68ee",secondaryColor:"#dbeafe",secondaryBorderColor:"#1d4ed8",secondaryTextColor:"#1d4ed8",tertiaryColor:"#dcfce7",tertiaryBorderColor:"#15803d",tertiaryTextColor:"#15803d",noteBkgColor:"#fef3c7",noteBorderColor:"#a16207",noteTextColor:"#a16207",lineColor:"#646464",textColor:"#292d34",mainBkg:"#ede9fe",nodeBorder:"#7b68ee",clusterBkg:"#f7f8f8",clusterBorder:"#e8e8e8",edgeLabelBackground:"#ffffff",fontFamily:e},flowchart:{htmlLabels:!0,curve:"basis",nodeSpacing:48,rankSpacing:64,padding:12},sequence:{actorFontFamily:e,noteFontFamily:e,messageFontFamily:e}}}function LN(i){Qw!==i&&(_1.initialize(GV(i)),Qw=i)}function VV(i){const e=i.getAttribute("style");if(!e)return;const r=e.split(";").filter(n=>{var o;const a=(o=n.trim().split(":")[0])==null?void 0:o.trim().toLowerCase();return a&&a!=="fill"&&a!=="stroke"&&a!=="color"}).join(";");r.trim()?i.setAttribute("style",r):i.removeAttribute("style")}function NN(i){const e=[".node > rect",".node > polygon",".node > path",".node > circle",".node .label",".node .label *",".node foreignObject *",".cluster > rect",".cluster > polygon",".cluster-label",".cluster-label *",".cluster-label foreignObject *",".edgeLabel",".edgeLabel rect",".edgeLabel foreignObject *",".edgePath path",".marker",".arrowheadPath"];i.querySelectorAll(e.join(", ")).forEach(VV);const r=i.querySelector("style");if(r&&r.textContent){const n=r.textContent.replace(/#[\w-]+\s+\.[\w-]+\s*(?:>\s*\*|\s+span|\s+tspan)\s*\{[^}]*\}/g,"");r.textContent=n}}async function XV(i,e){i.querySelectorAll(".mermaid-rendered").forEach(o=>{const c=o.dataset.mermaidSource;if(!c)return;const h=document.createElement("pre"),u=document.createElement("code");u.className="language-mermaid",u.textContent=c,h.appendChild(u),o.replaceWith(h)});const n=i.querySelectorAll("pre > code.language-mermaid");if(n.length===0)return;let a=0;for(const o of n){const c=o.parentElement;if(!c)continue;const h=(o.textContent??"").trim();if(!h)continue;const u=`${e}-${a++}-${Date.now().toString(36)}`,f=document.createElement("div");f.className="mermaid-rendered",f.dataset.mermaidSource=h;const p=document.createElement("div");p.className="mermaid-stage",f.appendChild(p),c.replaceWith(f);try{const{svg:g}=await _1.render(u,h);p.innerHTML=g;const x=p.querySelector("svg");x&&(x.removeAttribute("height"),x.style.maxWidth="100%",x.style.height="auto",NN(x))}catch(g){const x=g instanceof Error?g.message:String(g);p.innerHTML=`<div class="mermaid-error">Diagram error: ${x.replace(/[<>&]/g,y=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[y]??y)}</div>`}}}function QV(i,e,r,n="mmd"){tt.useEffect(()=>{const a=i.current;if(!a||!e)return;LN(r);let o=!1;return queueMicrotask(()=>{o||XV(a,n)}),()=>{o=!0}},[i,e,r,n])}ae.setOptions({gfm:!0,breaks:!0});function Rf({content:i,frontmatter:e}){const r=tt.useMemo(()=>yl.sanitize(ae.parse(i)),[i]),n=tt.useRef(null),{resolved:a}=Rg();QV(n,r,a,"md-mmd");const o=e?Object.entries(e).filter(([,c])=>c!=null&&c!==""):[];return b.jsxs("div",{className:"md-preview",children:[o.length>0&&b.jsx("div",{className:"md-frontmatter",children:o.map(([c,h])=>b.jsxs("div",{className:"md-fm-row",children:[b.jsx("span",{className:"md-fm-key",children:c}),b.jsx("span",{className:"md-fm-value",children:String(h)})]},c))}),b.jsx("div",{ref:n,className:"markdown-body",dangerouslySetInnerHTML:{__html:r}})]})}function ZV({onManagePacks:i}){const{t:e}=oi(),{data:r}=$R(),n=(r==null?void 0:r.nudge)??null,a=(r==null?void 0:r.newPacks)??[],[o,c]=tt.useState(!1),h=tt.useCallback(u=>{u.key==="Escape"&&o&&c(!1)},[o]);return tt.useEffect(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),n?b.jsxs("div",{className:"update-badge",children:[b.jsxs("button",{className:"update-badge-trigger",onClick:()=>c(u=>!u),"aria-expanded":o,title:e("update.title"),children:[b.jsx("span",{className:"update-badge-dot"}),b.jsx("span",{className:"update-badge-label",children:e("update.available")})]}),o&&b.jsxs("div",{className:"update-badge-popover",children:[b.jsxs("div",{className:"update-badge-popover-header",children:[b.jsx("span",{className:"update-badge-popover-title",children:e("update.title")}),b.jsx("button",{className:"update-badge-dismiss",onClick:()=>c(!1),title:e("update.dismiss"),"aria-label":e("update.dismiss"),children:"×"})]}),b.jsx("div",{className:"update-badge-content",children:b.jsx(Rf,{content:n})}),a.length>0&&i&&b.jsx("button",{className:"update-badge-action",onClick:()=>{i(),c(!1)},children:e("update.managePacks")})]})]}):null}const zu=[.85,.9,1,1.1,1.2],ON="dreamcontext-zoom";function KV(){try{const i=localStorage.getItem(ON);if(i!==null){const e=parseFloat(i);if(zu.includes(e))return e}}catch{}return 1}function JV(i){document.documentElement.style.setProperty("--zoom",String(i))}function tX({onNavigate:i}){const{theme:e,setTheme:r,resolved:n}=Rg(),{data:a}=GB(),[o,c]=tt.useState(KV);tt.useEffect(()=>{JV(o)},[o]);const h=(a==null?void 0:a.debt)??0,u=WB(h),f=YB(h),p=()=>{r(e==="system"?"light":e==="light"?"dark":"system")},g=e==="system"?`System (${n})`:n==="dark"?"Dark":"Light",x=zu.indexOf(o),y=x>0,v=x<zu.length-1,C=_=>{const w=x+_;if(w<0||w>=zu.length)return;const T=zu[w];c(T);try{localStorage.setItem(ON,String(T))}catch{}};return b.jsxs("header",{className:"header",children:[b.jsxs("div",{className:"header-left",children:[b.jsxs("div",{className:`agent-avatar agent-avatar--${f}`,children:[b.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M14 2L24 14L14 26L4 14L14 2Z",fill:"url(#diamond-gradient)",opacity:f==="must_sleep"?.4:f==="sleepy"?.6:f==="drowsy"?.8:1}),b.jsx("path",{d:"M14 8L19 14L14 20L9 14L14 8Z",fill:"url(#diamond-inner)",opacity:f==="must_sleep"?.3:.7}),b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"diamond-gradient",x1:"4",y1:"2",x2:"24",y2:"26",gradientUnits:"userSpaceOnUse",children:[b.jsx("stop",{stopColor:"hsl(287, 100%, 33%)"}),b.jsx("stop",{offset:"1",stopColor:"hsl(311, 97%, 43%)"})]}),b.jsxs("linearGradient",{id:"diamond-inner",x1:"9",y1:"8",x2:"19",y2:"20",gradientUnits:"userSpaceOnUse",children:[b.jsx("stop",{stopColor:"hsl(276, 74%, 50%)"}),b.jsx("stop",{offset:"1",stopColor:"hsl(287, 100%, 45%)"})]})]})]}),f==="must_sleep"&&b.jsx("span",{className:"zzz",children:"zzz"})]}),b.jsxs("div",{className:"header-brand",children:[b.jsx("span",{className:"brand-name",children:"dreamcontext"}),b.jsxs("span",{className:`sleep-badge sleep-badge--${f}`,children:[u," (",h,")"]})]})]}),b.jsxs("div",{className:"header-right",children:[b.jsx(ZV,{onManagePacks:i?()=>i("packs"):void 0}),b.jsxs("div",{className:"zoom-controls",children:[b.jsx("button",{className:"zoom-btn",onClick:()=>C(-1),disabled:!y,title:"Zoom out",children:"-"}),b.jsxs("span",{className:"zoom-label",children:[Math.round(o*100),"%"]}),b.jsx("button",{className:"zoom-btn",onClick:()=>C(1),disabled:!v,title:"Zoom in",children:"+"})]}),b.jsx("button",{className:"theme-toggle",onClick:p,title:`Theme: ${g}`,children:n==="dark"?b.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 1zm0 10a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 11zm7-3a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 15 8zM5 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 5 8zm7.07-4.07a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 1 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zM6.05 10.66a.5.5 0 0 1 0 .71l-1.41 1.41a.5.5 0 0 1-.71-.71l1.41-1.41a.5.5 0 0 1 .71 0zm7.72 3.12a.5.5 0 0 1-.71 0l-1.41-1.41a.5.5 0 1 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM5.34 6.05a.5.5 0 0 1-.71 0L3.22 4.64a.5.5 0 0 1 .71-.71l1.41 1.41a.5.5 0 0 1 0 .71zM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"})}):b.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"})})})]})]})}const eX=[{labelKey:"nav.group.workspace",items:[{page:"brain",icon:"◉",labelKey:"nav.brain"},{page:"tasks",icon:"▦",labelKey:"nav.tasks"},{page:"knowledge",icon:"✦",labelKey:"nav.knowledge"},{page:"features",icon:"⚑",labelKey:"nav.features"},{page:"core",icon:"◈",labelKey:"nav.core"},{page:"council",icon:"⚔",labelKey:"nav.council"},{page:"sleep",icon:"◑",labelKey:"nav.sleep"}]},{labelKey:"nav.group.control",items:[{page:"packs",icon:"◳",labelKey:"nav.packs"},{page:"settings",icon:"⚙",labelKey:"nav.settings"}]}],jN="dreamcontext.dashboard.sidebarCollapsed";function iX(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(jN)==="1"}catch{return!1}}function rX({activePage:i,onNavigate:e}){const{t:r}=oi(),[n,a]=tt.useState(iX),o=()=>{a(h=>{const u=!h;try{window.localStorage.setItem(jN,u?"1":"0")}catch{}return u})};let c=0;return b.jsxs("nav",{className:`sidebar${n?" sidebar--collapsed":""}`,"aria-label":"Primary",children:[b.jsxs("button",{type:"button",className:"sidebar-toggle","data-testid":"sidebar-collapse",onClick:o,"aria-expanded":!n,"aria-label":r(n?"nav.expand":"nav.collapse"),title:r(n?"nav.expand":"nav.collapse"),children:[b.jsx("span",{className:"sidebar-toggle-icon",children:n?"»":"«"}),b.jsx("span",{className:"sidebar-label",children:r("nav.collapse")})]}),eX.map(h=>b.jsxs("div",{className:"sidebar-group",children:[b.jsx("span",{className:"sidebar-group-label",children:r(h.labelKey)}),b.jsx("ul",{className:"sidebar-nav",children:h.items.map(({page:u,icon:f,labelKey:p})=>{c+=1;const g=r(p);return b.jsx("li",{className:`animate-stagger animate-stagger-${c}`,children:b.jsxs("button",{className:`sidebar-item ${i===u?"sidebar-item--active":""}`,onClick:()=>e(u),title:g,"aria-current":i===u?"page":void 0,children:[b.jsx("span",{className:"sidebar-icon",children:f}),b.jsx("span",{className:"sidebar-label",children:g})]})},u)})})]},h.labelKey))]})}const RN="dreamcontext.dashboard.activePage",nX=["tasks","core","knowledge","features","sleep","brain","council","settings","packs"];function aX(){if(typeof window>"u")return"brain";try{const i=window.localStorage.getItem(RN);if(i&&nX.includes(i))return i}catch{}return"brain"}function sX({children:i}){const[e,r]=tt.useState(aX),[n,a]=tt.useState(null),[o,c]=tt.useState(0),h=tt.useCallback((p,g)=>{r(p),a(g),c(x=>x+1);try{window.localStorage.setItem(RN,p)}catch{}},[]),u=tt.useCallback(p=>{h(p,null)},[h]),f=tt.useCallback(()=>a(null),[]);return b.jsxs("div",{className:"shell",children:[b.jsx(tX,{onNavigate:u}),b.jsxs("div",{className:"shell-body",children:[b.jsx(rX,{activePage:e,onNavigate:u}),b.jsx("main",{className:"shell-main",children:i({page:e,focusId:n,nonce:o,navigate:h,clearFocus:f})})]})]})}function oX(){return zi({queryKey:["tasks"],queryFn:()=>Ie.get("/tasks"),select:i=>i.tasks})}function lX(){const i=Zr();return _a({mutationFn:e=>Ie.post("/tasks",e),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function DN(){const i=Zr();return _a({mutationFn:({slug:e,updates:r})=>Ie.patch(`/tasks/${e}`,r),onSuccess:(e,r)=>{i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:["tasks",r.slug]})}})}function cX(){const i=Zr();return _a({mutationFn:({slug:e,content:r})=>Ie.post(`/tasks/${e}/changelog`,{content:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["tasks"]})}})}function FN(){return zi({queryKey:["releases"],queryFn:()=>Ie.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"}))})}function $N(){return zi({queryKey:["releases"],queryFn:()=>Ie.get("/releases"),select:i=>i.entries.map(e=>({...e,status:e.status??"released"})).filter(e=>e.status==="planning")})}function hX(){const i=Zr();return _a({mutationFn:e=>Ie.post("/releases",{...e,status:"planning"}),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}function uX(){const i=Zr();return _a({mutationFn:({version:e,updates:r})=>Ie.patch(`/releases/${encodeURIComponent(e)}`,r),onSuccess:()=>{i.invalidateQueries({queryKey:["releases"]})}})}const zN="dreamcontext:",qN="kanban-presets",Fb=`${zN}${qN}`;function IN(i){return i?`${zN}${i}:${qN}`:Fb}function fX(i){const e=IN(i);try{const r=localStorage.getItem(e);if(r!==null){const n=JSON.parse(r);return Array.isArray(n)?n:[]}if(i){const n=localStorage.getItem(Fb);if(n!==null){localStorage.setItem(e,n),localStorage.removeItem(Fb);const a=JSON.parse(n);return Array.isArray(a)?a:[]}}}catch{}return[]}function PN(i,e){try{localStorage.setItem(IN(i),JSON.stringify(e))}catch{}}const Tg=new Map;function S1(i){let e=Tg.get(i);return e===void 0&&(e=fX(i),Tg.set(i,e)),e}const $b=new Set;function dX(i){return $b.add(i),()=>{$b.delete(i)}}function HN(){for(const i of $b)i()}function pX(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function gX(i){return tt.useSyncExternalStore(dX,()=>S1(i))}function mX(i,e,r){const n={id:pX(),name:e,filters:r},o=[...S1(i),n];return Tg.set(i,o),PN(i,o),HN(),n}function yX(i,e){const r=S1(i),n=r.filter(a=>a.id!==e);n.length!==r.length&&(Tg.set(i,n),PN(i,n),HN())}const xX=10;function Ll(i){let e=2166136261;for(let r=0;r<i.length;r++)e^=i.charCodeAt(r),e=Math.imul(e,16777619);return(e>>>0)%xX}function Df({task:i,onClick:e,onDragStart:r}){return b.jsxs("div",{className:"task-card",draggable:!0,onDragStart:r,onClick:e,role:"button",tabIndex:0,onKeyDown:n=>{n.key==="Enter"&&e()},children:[b.jsxs("div",{className:"task-card-header",children:[b.jsx("span",{className:`priority-dot priority-dot--${i.priority}`,title:`Priority: ${i.priority}`}),i.urgency&&i.urgency!=="medium"&&b.jsx("span",{className:`urgency-bar urgency-bar--${i.urgency}`,title:`Urgency: ${i.urgency}`}),b.jsx("span",{className:"task-card-name",children:i.name})]}),i.description&&b.jsxs("p",{className:"task-card-desc",children:[i.description.slice(0,100),i.description.length>100?"...":""]}),b.jsxs("div",{className:"task-card-footer",children:[i.tags.length>0&&b.jsx("div",{className:"task-card-tags",children:i.tags.slice(0,3).map(n=>b.jsx("span",{className:"task-tag","data-hue":Ll(n),children:n},n))}),b.jsx("span",{className:"task-card-date",children:i.updated_at})]})]})}function bX({label:i,color:e,tasks:r,onTaskClick:n,onDragStart:a}){const[o,c]=tt.useState(!1);return b.jsxs("div",{className:"sub-group",children:[b.jsxs("button",{className:"sub-group-header",onClick:()=>c(h=>!h),children:[b.jsx("svg",{className:`sub-group-chevron ${o?"":"sub-group-chevron--open"}`,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:b.jsx("path",{d:"M3 2L7 5L3 8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})}),e&&b.jsx("span",{className:"sub-group-dot",style:{background:e}}),b.jsx("span",{className:"sub-group-label",children:i}),b.jsx("span",{className:"sub-group-count",children:r.length})]}),!o&&b.jsx("div",{className:"sub-group-cards",children:r.map(h=>b.jsx(Df,{task:h,onClick:()=>n(h),onDragStart:u=>a(u,h)},h.slug))})]})}function Zw({title:i,status:e,tasks:r,count:n,colorVar:a,onTaskClick:o,onDrop:c,subGroups:h}){const[u,f]=tt.useState(!1),p=v=>{v.preventDefault(),v.dataTransfer.dropEffect="move",f(!0)},g=()=>{f(!1)},x=v=>{v.preventDefault(),f(!1);const C=v.dataTransfer.getData("text/plain");C&&c(C,e)},y=(v,C)=>{v.dataTransfer.setData("text/plain",C.slug),v.dataTransfer.effectAllowed="move"};return b.jsxs("div",{className:`kanban-column ${u?"kanban-column--dragover":""}`,onDragOver:p,onDragLeave:g,onDrop:x,children:[b.jsxs("div",{className:"kanban-column-header",children:[b.jsx("span",{className:"kanban-column-dot",style:{background:`var(${a})`}}),b.jsx("span",{className:"kanban-column-title",children:i}),b.jsx("span",{className:"kanban-column-count",children:n})]}),b.jsx("div",{className:"kanban-column-cards",children:h&&h.length>0?h.map(v=>b.jsx(bX,{label:v.label,color:v.color,tasks:v.tasks,onTaskClick:o,onDragStart:y},v.key)):r.map(v=>b.jsx(Df,{task:v,onClick:()=>o(v),onDragStart:C=>y(C,v)},v.slug))})]})}function kc({trigger:i,content:e,isOpen:r,onClose:n,align:a="left",width:o}){const c=tt.useRef(null),h=tt.useCallback(f=>{c.current&&!c.current.contains(f.target)&&n()},[n]),u=tt.useCallback(f=>{f.key==="Escape"&&n()},[n]);return tt.useEffect(()=>{if(r)return document.addEventListener("mousedown",h),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",u)}},[r,h,u]),b.jsxs("div",{className:"filter-popover",ref:c,children:[i,r&&b.jsx("div",{className:`filter-popover-dropdown filter-popover-dropdown--${a}`,style:o?{width:`${o}px`}:void 0,children:e})]})}function vX({open:i}){return b.jsx("svg",{className:`filter-chip-chevron ${i?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:b.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function xu({label:i,options:e,selected:r,onChange:n,isOpen:a,onToggle:o,onClose:c}){var w,T;const h=r.length>0,[u,f]=tt.useState(""),p=tt.useRef(null);tt.useEffect(()=>{a?requestAnimationFrame(()=>{var A;return(A=p.current)==null?void 0:A.focus()}):f("")},[a]);const g=u.trim()?e.filter(A=>A.label.toLowerCase().includes(u.trim().toLowerCase())):e,x=A=>{r.includes(A)?n(r.filter(E=>E!==A)):n([...r,A])},y=()=>n(e.map(A=>A.value)),v=()=>n([]),C=h?r.length<=2?r.map(A=>{var E;return((E=e.find(N=>N.value===A))==null?void 0:E.label)??A}).join(", "):`${((w=e.find(A=>A.value===r[0]))==null?void 0:w.label)??r[0]} +${r.length-1}`:i,_=e.length>5;return b.jsx(kc,{isOpen:a,onClose:c,trigger:b.jsxs("button",{className:`filter-chip ${h?"filter-chip--active":""}`,onClick:o,children:[h&&r.length===1&&b.jsx("span",{className:"filter-chip-dot",style:{background:(T=e.find(A=>A.value===r[0]))==null?void 0:T.color}}),b.jsx("span",{className:"filter-chip-label",children:C}),b.jsx(vX,{open:a})]}),content:b.jsxs("div",{className:"multi-select-list",children:[_&&b.jsx("div",{className:"multi-select-search-wrap",children:b.jsx("input",{ref:p,className:"multi-select-search",placeholder:"Search...",value:u,onChange:A=>f(A.target.value)})}),b.jsxs("div",{className:"multi-select-actions",children:[b.jsx("button",{className:"multi-select-action",onClick:y,children:"All"}),b.jsx("button",{className:"multi-select-action",onClick:v,children:"None"})]}),b.jsxs("div",{className:"multi-select-options",children:[g.map(A=>b.jsxs("label",{className:"multi-select-option",children:[b.jsx("input",{type:"checkbox",checked:r.includes(A.value),onChange:()=>x(A.value)}),A.color&&b.jsx("span",{className:"filter-option-dot",style:{background:A.color}}),b.jsx("span",{className:"filter-option-label",children:A.label})]},A.value)),g.length===0&&b.jsx("div",{className:"multi-select-no-results",children:"No matches"})]})]})})}function Kw(i){return String(i).padStart(2,"0")}function bo(i){return`${i.getFullYear()}-${Kw(i.getMonth()+1)}-${Kw(i.getDate())}`}function UN(){return bo(new Date)}function dp(i){const e=new Date;return e.setDate(e.getDate()-i),bo(e)}function CX(){const i=new Date,e=i.getDay();return i.setDate(i.getDate()-(e===0?6:e-1)),bo(i)}function kX(){const i=new Date;return i.setDate(1),bo(i)}function _X(){const i=new Date;return i.setMonth(0,1),bo(i)}function Jw(i){return new Date(i+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}function SX(){const i=UN();return[{label:"Today",from:i,to:i},{label:"Yesterday",from:dp(1),to:dp(1)},{label:"This week",from:CX(),to:i},{label:"Last 7 days",from:dp(6),to:i},{label:"This month",from:kX(),to:i},{label:"Last 30 days",from:dp(29),to:i},{label:"This year",from:_X(),to:i}]}const wX=["January","February","March","April","May","June","July","August","September","October","November","December"],TX=["Mo","Tu","We","Th","Fr","Sa","Su"];function BX({dateField:i,dateFrom:e,dateTo:r,onDateFieldChange:n,onDateFromChange:a,onDateToChange:o}){const c=new Date,[h,u]=tt.useState(()=>e?parseInt(e.slice(0,4),10):c.getFullYear()),[f,p]=tt.useState(()=>e?parseInt(e.slice(5,7),10)-1:c.getMonth()),g=tt.useMemo(SX,[]),x=tt.useMemo(()=>{const E=new Date(h,f+1,0).getDate(),N=new Date(h,f,1).getDay(),R=N===0?6:N-1,M=[],O=new Date(h,f,0).getDate();for(let $=R-1;$>=0;$--){const q=O-$,J=f===0?11:f-1,W=f===0?h-1:h;M.push({date:bo(new Date(W,J,q)),day:q,isCurrentMonth:!1})}for(let $=1;$<=E;$++)M.push({date:bo(new Date(h,f,$)),day:$,isCurrentMonth:!0});const Y=42-M.length;for(let $=1;$<=Y;$++){const q=f===11?0:f+1,J=f===11?h+1:h;M.push({date:bo(new Date(J,q,$)),day:$,isCurrentMonth:!1})}return M},[h,f]),y=E=>{!e||e&&r?(a(E),o("")):E<e?(o(e),a(E)):o(E)},v=E=>{a(E.from),o(E.to);const N=new Date(E.from+"T00:00:00");u(N.getFullYear()),p(N.getMonth())},C=()=>{a(""),o("")},_=()=>{f===0?(p(11),u(E=>E-1)):p(E=>E-1)},w=()=>{f===11?(p(0),u(E=>E+1)):p(E=>E+1)},T=UN(),A=g.find(E=>E.from===e&&E.to===r);return b.jsxs("div",{className:"mini-cal",children:[b.jsxs("div",{className:"mini-cal-field-toggle",children:[b.jsx("button",{className:`mini-cal-field-btn ${i==="updated_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("updated_at"),children:"Updated"}),b.jsx("button",{className:`mini-cal-field-btn ${i==="created_at"?"mini-cal-field-btn--active":""}`,onClick:()=>n("created_at"),children:"Created"})]}),b.jsx("div",{className:"mini-cal-presets",children:g.map(E=>b.jsx("button",{className:`mini-cal-preset ${(A==null?void 0:A.label)===E.label?"mini-cal-preset--active":""}`,onClick:()=>v(E),children:E.label},E.label))}),b.jsx("div",{className:"mini-cal-divider"}),b.jsxs("div",{className:"mini-cal-nav-row",children:[b.jsx("button",{className:"mini-cal-nav-btn",onClick:_,"aria-label":"Previous month",children:b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsx("path",{d:"M8.5 3L4.5 7L8.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),b.jsxs("span",{className:"mini-cal-month-label",children:[wX[f]," ",h]}),b.jsx("button",{className:"mini-cal-nav-btn",onClick:w,"aria-label":"Next month",children:b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsx("path",{d:"M5.5 3L9.5 7L5.5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),b.jsxs("div",{className:"mini-cal-grid",children:[TX.map(E=>b.jsx("div",{className:"mini-cal-day-label",children:E},E)),x.map((E,N)=>{const R=E.date===e,M=E.date===r,O=e&&r&&E.date>e&&E.date<r,Y=R&&!r,$=R||M,q=["mini-cal-day",!E.isCurrentMonth&&"mini-cal-day--outside",E.date===T&&"mini-cal-day--today",$&&"mini-cal-day--selected",R&&r&&"mini-cal-day--range-start",M&&e&&"mini-cal-day--range-end",O&&"mini-cal-day--in-range",Y&&"mini-cal-day--single"].filter(Boolean).join(" ");return b.jsx("button",{className:q,onClick:()=>y(E.date),children:E.day},N)})]}),(e||r)&&b.jsxs("div",{className:"mini-cal-footer",children:[b.jsxs("span",{className:"mini-cal-range-text",children:[e&&b.jsx("span",{children:Jw(e)}),e&&r&&e!==r&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"mini-cal-arrow",children:"→"}),b.jsx("span",{children:Jw(r)})]}),e&&!r&&b.jsx("span",{className:"mini-cal-hint",children:"Pick end date"})]}),b.jsx("button",{className:"mini-cal-clear-btn",onClick:C,children:"Clear"})]})]})}const Bg={priorityFilter:[],statusFilter:[],urgencyFilter:[],tagFilter:[],versionFilter:[],searchQuery:"",dateField:"updated_at",dateFrom:"",dateTo:"",minRice:null,sortField:"updated_at",groupBy:"status",subGroupBy:"none",viewMode:"kanban"};function AX(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("circle",{cx:"5.8",cy:"5.8",r:"4.3",stroke:"currentColor",strokeWidth:"1.4"}),b.jsx("path",{d:"M9 9L12.5 12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function pp({open:i}){return b.jsx("svg",{className:`filter-chip-chevron ${i?"filter-chip-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:b.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function W0(){return b.jsx("svg",{className:"filter-option-check",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsx("path",{d:"M3 7L6 10L11 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function tT(){return b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:b.jsx("path",{d:"M2.5 2.5L7.5 7.5M7.5 2.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function EX(){return b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("rect",{x:"1.5",y:"2.5",width:"11",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M1.5 5.5H12.5",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M4.5 1V3.5M9.5 1V3.5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function MX(){return b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M4 1.5V5H10V1.5",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"4",y:"7.5",width:"6",height:"3.5",rx:"0.5",stroke:"currentColor",strokeWidth:"1.2"})]})}function LX(){return b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("rect",{x:"1",y:"1",width:"3.5",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"5.25",y:"1",width:"3.5",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"9.5",y:"1",width:"3.5",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function NX(){return b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("rect",{x:"1",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"7.5",y:"1",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"1",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"7.5",y:"7.5",width:"5.5",height:"5.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]})}function OX(){return b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("circle",{cx:"3",cy:"11",r:"1.4",fill:"currentColor"}),b.jsx("circle",{cx:"6",cy:"6",r:"1.6",fill:"currentColor"}),b.jsx("circle",{cx:"10",cy:"8",r:"1.2",fill:"currentColor"}),b.jsx("circle",{cx:"11",cy:"3",r:"1",fill:"currentColor"})]})}function jX(){return b.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:b.jsx("path",{d:"M2 3.5H12M2 7H12M2 10.5H12",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function RX(){return b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("path",{d:"M2 2V12",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),b.jsx("path",{d:"M2 3H9L7 5.5L9 8H2",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}const DX=[{value:"todo",label:"To Do",color:"var(--color-status-todo)"},{value:"in_progress",label:"In Progress",color:"var(--color-status-in-progress)"},{value:"in_review",label:"In Review",color:"var(--color-status-in-review)"},{value:"completed",label:"Completed",color:"var(--color-status-completed)"}],FX=[{value:"critical",label:"Critical",color:"var(--color-priority-critical)"},{value:"high",label:"High",color:"var(--color-priority-high)"},{value:"medium",label:"Medium",color:"var(--color-priority-medium)"},{value:"low",label:"Low",color:"var(--color-priority-low)"}],$X=[{value:"critical",label:"Critical",color:"var(--color-urgency-critical)"},{value:"high",label:"High",color:"var(--color-urgency-high)"},{value:"medium",label:"Medium",color:"var(--color-urgency-medium)"},{value:"low",label:"Low",color:"var(--color-urgency-low)"}],eT=[{value:"updated_at",label:"Last updated"},{value:"created_at",label:"Date created"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"rice",label:"RICE score"},{value:"name",label:"Name"}],Y0=[{value:"status",label:"Status"},{value:"priority",label:"Priority"},{value:"urgency",label:"Urgency"},{value:"tags",label:"Tags"},{value:"version",label:"Version"},{value:"none",label:"No grouping"}];function zX(i){let e=0;return i.priorityFilter.length>0&&e++,i.statusFilter.length>0&&e++,i.urgencyFilter.length>0&&e++,i.tagFilter.length>0&&e++,i.versionFilter.length>0&&e++,i.searchQuery.trim()&&e++,(i.dateFrom||i.dateTo)&&e++,i.minRice!==null&&i.minRice!==void 0&&e++,e}function qX(i){if(!i.dateFrom&&!i.dateTo)return null;const e=new Date().toISOString().slice(0,10);if(i.dateFrom===e&&i.dateTo===e)return"Today";const r=new Date;r.setDate(r.getDate()-1);const n=r.toISOString().slice(0,10);if(i.dateFrom===n&&i.dateTo===n)return"Yesterday";if(i.dateTo===e){const a=new Date;if(a.setDate(a.getDate()-6),i.dateFrom===a.toISOString().slice(0,10))return"Last 7 days";const o=new Date;if(o.setDate(o.getDate()-29),i.dateFrom===o.toISOString().slice(0,10))return"Last 30 days"}return"Custom"}function IX({filters:i,onFilterChange:e,onClearFilters:r,onCreateClick:n,presets:a,onSavePreset:o,onLoadPreset:c,onDeletePreset:h,allTags:u,allVersions:f,onVersionManagerClick:p}){var Y,$;const{t:g}=oi(),[x,y]=tt.useState(null),[v,C]=tt.useState(""),_=zX(i),w=tt.useMemo(()=>qX(i),[i]),T=q=>y(J=>J===q?null:q),A=()=>y(null),E=(Y=eT.find(q=>q.value===i.sortField))==null?void 0:Y.label,N=($=Y0.find(q=>q.value===i.groupBy))==null?void 0:$.label,R=tt.useMemo(()=>u.map(q=>({value:q,label:q})),[u]),M=tt.useMemo(()=>f.map(q=>({value:q,label:q})),[f]),O=tt.useMemo(()=>Y0.filter(q=>q.value!==i.groupBy&&q.value!=="none").concat({value:"none",label:"No sub-group"}),[i.groupBy]);return b.jsxs("div",{className:"filter-bar",children:[b.jsxs("div",{className:"filter-search",children:[b.jsx(AX,{}),b.jsx("input",{className:"filter-search-input",placeholder:"Search tasks...",value:i.searchQuery,onChange:q=>e("searchQuery",q.target.value)}),i.searchQuery&&b.jsx("button",{className:"filter-search-clear",onClick:()=>e("searchQuery",""),children:b.jsx(tT,{})})]}),b.jsx("div",{className:"filter-bar-divider"}),b.jsx(xu,{id:"status",label:"Status",options:DX,selected:i.statusFilter,onChange:q=>e("statusFilter",q),isOpen:x==="status",onToggle:()=>T("status"),onClose:A}),b.jsx(xu,{id:"priority",label:"Priority",options:FX,selected:i.priorityFilter,onChange:q=>e("priorityFilter",q),isOpen:x==="priority",onToggle:()=>T("priority"),onClose:A}),b.jsx(xu,{id:"urgency",label:"Urgency",options:$X,selected:i.urgencyFilter,onChange:q=>e("urgencyFilter",q),isOpen:x==="urgency",onToggle:()=>T("urgency"),onClose:A}),R.length>0&&b.jsx(xu,{id:"tags",label:"Tags",options:R,selected:i.tagFilter,onChange:q=>e("tagFilter",q),isOpen:x==="tags",onToggle:()=>T("tags"),onClose:A}),M.length>0&&b.jsx(xu,{id:"version",label:"Version",options:M,selected:i.versionFilter,onChange:q=>e("versionFilter",q),isOpen:x==="version",onToggle:()=>T("version"),onClose:A}),b.jsx(kc,{isOpen:x==="date",onClose:A,width:320,trigger:b.jsxs("button",{className:`filter-chip ${w?"filter-chip--active":""}`,onClick:()=>T("date"),children:[b.jsx(EX,{}),b.jsx("span",{className:"filter-chip-label",children:w??"Date"}),b.jsx(pp,{open:x==="date"})]}),content:b.jsx(BX,{dateField:i.dateField,dateFrom:i.dateFrom,dateTo:i.dateTo,onDateFieldChange:q=>e("dateField",q),onDateFromChange:q=>e("dateFrom",q),onDateToChange:q=>e("dateTo",q)})}),b.jsx(kc,{isOpen:x==="minRice",onClose:A,width:220,trigger:b.jsxs("button",{className:`filter-chip ${i.minRice!==null?"filter-chip--active":""}`,onClick:()=>T("minRice"),children:[b.jsx("span",{className:"filter-chip-label",children:i.minRice!==null?`${g("filter.min_rice")} ≥ ${i.minRice}`:g("filter.min_rice")}),b.jsx(pp,{open:x==="minRice"})]}),content:b.jsxs("div",{className:"filter-min-rice",children:[b.jsx("label",{className:"filter-min-rice-label",htmlFor:"filter-min-rice-input",children:g("filter.min_rice")}),b.jsx("input",{id:"filter-min-rice-input",type:"number",min:"0",step:"0.1",className:"field-input",value:i.minRice??"",placeholder:"e.g. 5",onChange:q=>{const J=q.target.value.trim();if(J===""){e("minRice",null);return}const W=Number(J);e("minRice",Number.isFinite(W)?W:null)}}),i.minRice!==null&&b.jsx("button",{type:"button",className:"filter-min-rice-clear",onClick:()=>e("minRice",null),children:"Clear"})]})}),_>0&&b.jsxs("button",{className:"filter-clear-all",onClick:r,children:["Clear ",b.jsx("span",{className:"filter-clear-count",children:_})]}),b.jsx("div",{className:"filter-bar-spacer"}),b.jsxs("div",{className:"filter-view-toggle",children:[b.jsx("button",{className:`filter-view-btn ${i.viewMode==="kanban"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","kanban"),title:"Kanban view",children:b.jsx(LX,{})}),b.jsx("button",{className:`filter-view-btn ${i.viewMode==="eisenhower"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","eisenhower"),title:"Eisenhower matrix",children:b.jsx(NX,{})}),b.jsx("button",{className:`filter-view-btn ${i.viewMode==="scatter"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","scatter"),title:"RICE scatter (Impact × Effort)",children:b.jsx(OX,{})}),b.jsx("button",{className:`filter-view-btn ${i.viewMode==="list"?"filter-view-btn--active":""}`,onClick:()=>e("viewMode","list"),title:"List view",children:b.jsx(jX,{})})]}),b.jsx("div",{className:"filter-bar-divider"}),b.jsx(kc,{isOpen:x==="sort",onClose:A,align:"right",trigger:b.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("sort"),children:[b.jsx("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:b.jsx("path",{d:"M2 4H12M4 7H10M6 10H8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})}),b.jsx("span",{className:"filter-chip-label",children:E}),b.jsx(pp,{open:x==="sort"})]}),content:b.jsxs("div",{className:"filter-option-list",children:[b.jsx("div",{className:"filter-popover-section",children:"Sort by"}),eT.map(q=>b.jsxs("button",{className:`filter-option ${i.sortField===q.value?"filter-option--selected":""}`,onClick:()=>{e("sortField",q.value),A()},children:[b.jsx("span",{className:"filter-option-label",children:q.label}),i.sortField===q.value&&b.jsx(W0,{})]},q.value))]})}),b.jsx(kc,{isOpen:x==="group",onClose:A,align:"right",trigger:b.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("group"),children:[b.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none",children:[b.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"8",y:"2",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"1.5",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("rect",{x:"8",y:"8.5",width:"4.5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.2"})]}),b.jsx("span",{className:"filter-chip-label",children:N}),b.jsx(pp,{open:x==="group"})]}),content:b.jsxs("div",{className:"filter-option-list",children:[b.jsx("div",{className:"filter-popover-section",children:"Group by"}),Y0.map(q=>b.jsxs("button",{className:`filter-option ${i.groupBy===q.value?"filter-option--selected":""}`,onClick:()=>{e("groupBy",q.value),A()},children:[b.jsx("span",{className:"filter-option-label",children:q.label}),i.groupBy===q.value&&b.jsx(W0,{})]},q.value)),i.groupBy!=="none"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"filter-popover-section",style:{marginTop:"var(--space-2)"},children:"Sub-group by"}),O.map(q=>b.jsxs("button",{className:`filter-option ${i.subGroupBy===q.value?"filter-option--selected":""}`,onClick:()=>{e("subGroupBy",q.value),A()},children:[b.jsx("span",{className:"filter-option-label",children:q.label}),i.subGroupBy===q.value&&b.jsx(W0,{})]},`sub-${q.value}`))]})]})}),b.jsx("div",{className:"filter-bar-divider"}),b.jsx("button",{className:"filter-chip filter-chip--subtle",onClick:p,title:"Manage versions",children:b.jsx(RX,{})}),b.jsx(kc,{isOpen:x==="views",onClose:A,align:"right",width:220,trigger:b.jsxs("button",{className:"filter-chip filter-chip--subtle",onClick:()=>T("views"),children:[b.jsx(MX,{}),b.jsx("span",{className:"filter-chip-label",children:"Views"}),a.length>0&&b.jsx("span",{className:"filter-chip-badge",children:a.length})]}),content:b.jsxs("div",{className:"filter-views",children:[a.length===0?b.jsx("div",{className:"filter-views-empty",children:"No saved views yet"}):b.jsx("div",{className:"filter-views-list",children:a.map(q=>b.jsxs("div",{className:"filter-views-item",children:[b.jsx("button",{className:"filter-views-load",onClick:()=>{c(q),A()},children:q.name}),b.jsx("button",{className:"filter-views-delete",onClick:()=>h(q.id),children:b.jsx(tT,{})})]},q.id))}),b.jsx("div",{className:"filter-popover-divider"}),b.jsxs("div",{className:"filter-views-save",children:[b.jsx("input",{className:"filter-views-input",placeholder:"Save current view...",value:v,onChange:q=>C(q.target.value),onKeyDown:q=>{q.key==="Enter"&&v.trim()&&(o(v.trim()),C(""))}}),b.jsx("button",{className:"filter-views-save-btn",disabled:!v.trim(),onClick:()=>{v.trim()&&(o(v.trim()),C(""))},children:"Save"})]})]})}),b.jsxs("button",{className:"filter-create-btn",onClick:n,children:[b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsx("path",{d:"M7 2V12M2 7H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),g("tasks.create")]})]})}function PX({onClose:i}){const{t:e}=oi(),r=lX(),{data:n}=$N(),[a,o]=tt.useState(""),[c,h]=tt.useState(""),[u,f]=tt.useState("medium"),[p,g]=tt.useState("medium"),[x,y]=tt.useState(""),[v,C]=tt.useState(""),[_,w]=tt.useState(""),T=A=>{if(A.preventDefault(),!a.trim())return;const E=x.split(",").map(N=>N.trim()).filter(Boolean);r.mutate({name:a.trim(),description:c,priority:u,tags:E,urgency:p!=="medium"?p:void 0,why:v.trim()||void 0,version:_||void 0},{onSuccess:()=>i()})};return b.jsx("div",{className:"modal-overlay",onClick:i,children:b.jsxs("div",{className:"modal",onClick:A=>A.stopPropagation(),children:[b.jsxs("div",{className:"modal-header",children:[b.jsx("h2",{className:"modal-title",children:e("tasks.create")}),b.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),b.jsxs("form",{onSubmit:T,className:"modal-body",children:[b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:e("tasks.name")}),b.jsx("input",{className:"field-input",value:a,onChange:A=>o(A.target.value),placeholder:"e.g. Implement user auth",autoFocus:!0,required:!0})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:e("tasks.description")}),b.jsx("textarea",{className:"field-textarea",value:c,onChange:A=>h(A.target.value),placeholder:"What needs to be done?",rows:3})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:e("tasks.priority")}),b.jsxs("select",{className:"field-select",value:u,onChange:A=>f(A.target.value),children:[b.jsx("option",{value:"low",children:e("priority.low")}),b.jsx("option",{value:"medium",children:e("priority.medium")}),b.jsx("option",{value:"high",children:e("priority.high")}),b.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:"Urgency"}),b.jsxs("select",{className:"field-select",value:p,onChange:A=>g(A.target.value),children:[b.jsx("option",{value:"low",children:e("priority.low")}),b.jsx("option",{value:"medium",children:e("priority.medium")}),b.jsx("option",{value:"high",children:e("priority.high")}),b.jsx("option",{value:"critical",children:e("priority.critical")})]})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:"Version"}),b.jsxs("select",{className:"field-select",value:_,onChange:A=>w(A.target.value),children:[b.jsx("option",{value:"",children:"No version"}),(n??[]).map(A=>b.jsx("option",{value:A.version,children:A.version},A.version))]})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:"Why"}),b.jsx("textarea",{className:"field-textarea",value:v,onChange:A=>C(A.target.value),placeholder:"Why is this task needed?",rows:2})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:e("tasks.tags")}),b.jsx("input",{className:"field-input",value:x,onChange:A=>y(A.target.value),placeholder:"Comma-separated tags"})]}),b.jsxs("div",{className:"modal-actions",children:[b.jsx("button",{type:"button",className:"btn btn--ghost",onClick:i,children:e("tasks.cancel")}),b.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!a.trim()||r.isPending,children:r.isPending?"...":e("tasks.save")})]})]})]})})}var bu={exports:{}},iT;function HX(){if(iT)return bu.exports;iT=1,bu.exports=i,bu.exports.addWheelListener=i,bu.exports.removeWheelListener=e;function i(r,n,a){r.addEventListener("wheel",n,a)}function e(r,n,a){r.removeEventListener("wheel",n,a)}return bu.exports}var vu={exports:{}},G0,rT;function UX(){if(rT)return G0;rT=1;var i=4,e=.001,r=1e-7,n=10,a=11,o=1/(a-1),c=typeof Float32Array=="function";function h(C,_){return 1-3*_+3*C}function u(C,_){return 3*_-6*C}function f(C){return 3*C}function p(C,_,w){return((h(_,w)*C+u(_,w))*C+f(_))*C}function g(C,_,w){return 3*h(_,w)*C*C+2*u(_,w)*C+f(_)}function x(C,_,w,T,A){var E,N,R=0;do N=_+(w-_)/2,E=p(N,T,A)-C,E>0?w=N:_=N;while(Math.abs(E)>r&&++R<n);return N}function y(C,_,w,T){for(var A=0;A<i;++A){var E=g(_,w,T);if(E===0)return _;var N=p(_,w,T)-C;_-=N/E}return _}function v(C){return C}return G0=function(_,w,T,A){if(!(0<=_&&_<=1&&0<=T&&T<=1))throw new Error("bezier x values must be in [0, 1] range");if(_===w&&T===A)return v;for(var E=c?new Float32Array(a):new Array(a),N=0;N<a;++N)E[N]=p(N*o,_,T);function R(M){for(var O=0,Y=1,$=a-1;Y!==$&&E[Y]<=M;++Y)O+=o;--Y;var q=(M-E[Y])/(E[Y+1]-E[Y]),J=O+q*o,W=g(J,_,T);return W>=e?y(M,J,_,T):W===0?J:x(M,O,O+o,_,T)}return function(O){return O===0?0:O===1?1:p(R(O),w,A)}},G0}var nT;function WX(){if(nT)return vu.exports;nT=1;var i=UX(),e={ease:i(.25,.1,.25,1),easeIn:i(.42,0,1,1),easeOut:i(0,0,.58,1),easeInOut:i(.42,0,.58,1),linear:i(0,0,1,1)};vu.exports=r,vu.exports.makeAggregateRaf=h,vu.exports.sharedScheduler=h();function r(u,f,p){var g=Object.create(null),x=Object.create(null);p=p||{};var y=typeof p.easing=="function"?p.easing:e[p.easing];y||(p.easing&&console.warn("Unknown easing function in amator: "+p.easing),y=e.ease);var v=typeof p.step=="function"?p.step:n,C=typeof p.done=="function"?p.done:n,_=a(p.scheduler),w=Object.keys(f);w.forEach(function(Y){g[Y]=u[Y],x[Y]=f[Y]-u[Y]});var T=typeof p.duration=="number"?p.duration:400,A=Math.max(1,T*.06),E,N=0;return E=_.next(M),{cancel:R};function R(){_.cancel(E),E=0}function M(){var Y=y(N/A);N+=1,O(Y),N<=A?(E=_.next(M),v(u)):(E=0,setTimeout(function(){C(u)},0))}function O(Y){w.forEach(function($){u[$]=x[$]*Y+g[$]})}}function n(){}function a(u){if(!u){var f=typeof window<"u"&&window.requestAnimationFrame;return f?o():c()}if(typeof u.next!="function")throw new Error("Scheduler is supposed to have next(cb) function");if(typeof u.cancel!="function")throw new Error("Scheduler is supposed to have cancel(handle) function");return u}function o(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function c(){return{next:function(u){return setTimeout(u,1e3/60)},cancel:function(u){return clearTimeout(u)}}}function h(){var u=new Set,f=new Set,p=0;return{next:x,cancel:x,clearAll:g};function g(){u.clear(),f.clear(),cancelAnimationFrame(p),p=0}function x(C){f.add(C),y()}function y(){p||(p=requestAnimationFrame(v))}function v(){p=0;var C=f;f=u,u=C,u.forEach(function(_){_()}),u.clear()}}return vu.exports}var V0,aT;function YX(){if(aT)return V0;aT=1;function i(n){r(n);const a=e(n);return n.on=a.on,n.off=a.off,n.fire=a.fire,n}function e(n){let a=Object.create(null);return{on:function(o,c,h){if(typeof c!="function")throw new Error("callback is expected to be a function");let u=a[o];return u||(u=a[o]=[]),u.push({callback:c,ctx:h}),n},off:function(o,c){if(typeof o>"u")return a=Object.create(null),n;if(a[o])if(typeof c!="function")delete a[o];else{const h=a[o];for(let u=0;u<h.length;++u)h[u].callback===c&&h.splice(u,1)}return n},fire:function(o){const c=a[o];if(!c)return n;let h;arguments.length>1&&(h=Array.prototype.slice.call(arguments,1));for(let u=0;u<c.length;++u){const f=c[u];f.callback.apply(f.ctx,h)}return n}}}function r(n){if(!n)throw new Error("Eventify cannot use falsy object as events subject");const a=["on","fire","off"];for(let o=0;o<a.length;++o)if(n.hasOwnProperty(a[o]))throw new Error("Subject cannot be eventified, since it already has property '"+a[o]+"'")}return V0=i,V0}var X0,sT;function GX(){if(sT)return X0;sT=1,X0=i;function i(n,a,o){typeof o!="object"&&(o={});var c=typeof o.minVelocity=="number"?o.minVelocity:5,h=typeof o.amplitude=="number"?o.amplitude:.25,u=typeof o.cancelAnimationFrame=="function"?o.cancelAnimationFrame:e(),f=typeof o.requestAnimationFrame=="function"?o.requestAnimationFrame:r(),p,g,x=342,y,v,C,_,w,T,A,E;return{start:R,stop:O,cancel:N};function N(){u(y),u(E)}function R(){p=n(),_=A=v=w=0,g=new Date,u(y),u(E),y=f(M)}function M(){var $=Date.now(),q=$-g;g=$;var J=n(),W=J.x-p.x,F=J.y-p.y;p=J;var U=1e3/(1+q);v=.8*W*U+.2*v,w=.8*F*U+.2*w,y=f(M)}function O(){u(y),u(E);var $=n();C=$.x,T=$.y,g=Date.now(),(v<-c||v>c)&&(_=h*v,C+=_),(w<-c||w>c)&&(A=h*w,T+=A),E=f(Y)}function Y(){var $=Date.now()-g,q=!1,J=0,W=0;_&&(J=-_*Math.exp(-$/x),J>.5||J<-.5?q=!0:J=_=0),A&&(W=-A*Math.exp(-$/x),W>.5||W<-.5?q=!0:W=A=0),q&&(a(C+J,T+W),E=f(Y))}}function e(){return typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout}function r(){return typeof requestAnimationFrame=="function"?requestAnimationFrame:function(n){return setTimeout(n,16)}}return X0}var Q0,oT;function VX(){if(oT)return Q0;oT=1,Q0=i;function i(n){if(n)return{capture:r,release:r};var a,o,c,h=!1;return{capture:u,release:f};function u(p){h=!0,o=window.document.onselectstart,c=window.document.ondragstart,window.document.onselectstart=e,a=p,a.ondragstart=e}function f(){h&&(h=!1,window.document.onselectstart=o,a&&(a.ondragstart=c))}}function e(n){return n.stopPropagation(),!1}function r(){}return Q0}var Z0,lT;function XX(){if(lT)return Z0;lT=1,Z0=i;function i(){this.x=0,this.y=0,this.scale=1}return Z0}var gp={exports:{}},cT;function QX(){if(cT)return gp.exports;cT=1,gp.exports=i,gp.exports.canAttach=e;function i(r,n){if(!e(r))throw new Error("svg element is required for svg.panzoom to work");var a=r.ownerSVGElement;if(!a)throw new Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");n.disableKeyboardInteraction||a.setAttribute("tabindex",0);var o={getBBox:h,getScreenCTM:u,getOwner:c,applyTransform:p,initTransform:f};return o;function c(){return a}function h(){var g=r.getBBox();return{left:g.x,top:g.y,width:g.width,height:g.height}}function u(){var g=a.getCTM();return g||a.getScreenCTM()}function f(g){var x=r.getCTM();x===null&&(x=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix()),g.x=x.e,g.y=x.f,g.scale=x.a,a.removeAttributeNS(null,"viewBox")}function p(g){r.setAttribute("transform","matrix("+g.scale+" 0 0 "+g.scale+" "+g.x+" "+g.y+")")}}function e(r){return r&&r.ownerSVGElement&&r.getCTM}return gp.exports}var mp={exports:{}},hT;function ZX(){if(hT)return mp.exports;hT=1,mp.exports=i,mp.exports.canAttach=e;function i(r,n){var a=e(r);if(!a)throw new Error("panzoom requires DOM element to be attached to the DOM tree");var o=r.parentElement;r.scrollTop=0,n.disableKeyboardInteraction||o.setAttribute("tabindex",0);var c={getBBox:u,getOwner:h,applyTransform:f};return c;function h(){return o}function u(){return{left:0,top:0,width:r.clientWidth,height:r.clientHeight}}function f(p){r.style.transformOrigin="0 0 0",r.style.transform="matrix("+p.scale+", 0, 0, "+p.scale+", "+p.x+", "+p.y+")"}}function e(r){return r&&r.parentElement&&r.style}return mp.exports}var K0,uT;function KX(){if(uT)return K0;uT=1;var i=HX(),e=WX(),r=YX(),n=GX(),a=VX(),o=a(),c=a(!0),h=XX(),u=QX(),f=ZX(),p=1,g=1.75,x=300,y=200;K0=v;function v(M,O){O=O||{};var Y=O.controller;if(Y||(u.canAttach(M)?Y=u(M,O):f.canAttach(M)&&(Y=f(M,O))),!Y)throw new Error("Cannot create panzoom for the current type of dom element");var $=Y.getOwner(),q={x:0,y:0},J=!1,W=new h;Y.initTransform&&Y.initTransform(W);var F=typeof O.filterKey=="function"?O.filterKey:w,U=typeof O.pinchSpeed=="number"?O.pinchSpeed:1,j=O.bounds,I=typeof O.maxZoom=="number"?O.maxZoom:Number.POSITIVE_INFINITY,H=typeof O.minZoom=="number"?O.minZoom:0,V=typeof O.boundsPadding=="number"?O.boundsPadding:.05,Z=typeof O.zoomDoubleClickSpeed=="number"?O.zoomDoubleClickSpeed:g,P=O.beforeWheel||w,K=O.beforeMouseDown||w,ot=typeof O.zoomSpeed=="number"?O.zoomSpeed:p,st=C(O.transformOrigin),bt=O.enableTextSelection?c:o;T(j),O.autocenter&&wi();var kt,Lt=0,at=0,Ct=0,gt=null,Bt=new Date,Wt,Gt=!1,Zt=!1,Et,Vt,we,ni,qi,ue;"smoothScroll"in O&&!O.smoothScroll?ue=N():ue=n(Xn,Ki,O.smoothScroll);var ke,De,Ni,Pe=!1;ai();var or={dispose:Oi,moveBy:Cn,moveTo:bn,smoothMoveTo:Ss,centerOn:_s,zoomTo:Ba,zoomAbs:vn,smoothZoom:Ri,smoothZoomAbs:Se,showRectangle:Nl,pause:Wn,resume:lr,isPaused:To,getTransform:Fr,getMinZoom:mi,setMinZoom:ys,getMaxZoom:kr,setMaxZoom:Yn,getTransformOrigin:Gn,setTransformOrigin:Vn,getZoomSpeed:xs,setZoomSpeed:$r};r(or);var Un=typeof O.initialX=="number"?O.initialX:W.x,Kr=typeof O.initialY=="number"?O.initialY:W.y,Dr=typeof O.initialZoom=="number"?O.initialZoom:W.scale;return(Un!=W.x||Kr!=W.y||Dr!=W.scale)&&vn(Un,Kr,Dr),or;function Wn(){yi(),Pe=!0}function lr(){Pe&&(ai(),Pe=!1)}function To(){return Pe}function Nl(ut){var St=$.getBoundingClientRect(),wt=Zi(St.width,St.height),Nt=ut.right-ut.left,fe=ut.bottom-ut.top;if(!Number.isFinite(Nt)||!Number.isFinite(fe))throw new Error("Invalid rectangle");var _e=wt.x/Nt,$e=wt.y/fe,xi=Math.min(_e,$e);W.x=-(ut.left+Nt/2)*xi+wt.x/2,W.y=-(ut.top+fe/2)*xi+wt.y/2,W.scale=xi}function Zi(ut,St){if(Y.getScreenCTM){var wt=Y.getScreenCTM(),Nt=wt.a,fe=wt.d,_e=wt.e,$e=wt.f;q.x=ut*Nt-_e,q.y=St*fe-$e}else q.x=ut,q.y=St;return q}function wi(){var ut,St,wt=0,Nt=0,fe=vs();if(fe)wt=fe.left,Nt=fe.top,ut=fe.right-fe.left,St=fe.bottom-fe.top;else{var _e=$.getBoundingClientRect();ut=_e.width,St=_e.height}var $e=Y.getBBox();if(!($e.width===0||$e.height===0)){var xi=St/$e.height,Aa=ut/$e.width,wn=Math.min(Aa,xi);W.x=-($e.left+$e.width/2)*wn+ut/2+wt,W.y=-($e.top+$e.height/2)*wn+St/2+Nt,W.scale=wn}}function Fr(){return W}function mi(){return H}function ys(ut){H=ut}function kr(){return I}function Yn(ut){I=ut}function Gn(){return st}function Vn(ut){st=C(ut)}function xs(){return ot}function $r(ut){if(!Number.isFinite(ut))throw new Error("Zoom speed should be a number");ot=ut}function Xn(){return{x:W.x,y:W.y}}function bn(ut,St){W.x=ut,W.y=St,bs(),ia("pan"),Cs()}function Qn(ut,St){bn(W.x+ut,W.y+St)}function bs(){var ut=vs();if(ut){var St=!1,wt=Fe(),Nt=ut.left-wt.right;return Nt>0&&(W.x+=Nt,St=!0),Nt=ut.right-wt.left,Nt<0&&(W.x+=Nt,St=!0),Nt=ut.top-wt.bottom,Nt>0&&(W.y+=Nt,St=!0),Nt=ut.bottom-wt.top,Nt<0&&(W.y+=Nt,St=!0),St}}function vs(){if(j){if(typeof j=="boolean"){var ut=$.getBoundingClientRect(),St=ut.width,wt=ut.height;return{left:St*V,top:wt*V,right:St*(1-V),bottom:wt*(1-V)}}return j}}function Fe(){var ut=Y.getBBox(),St=Zn(ut.left,ut.top);return{left:St.x,top:St.y,right:ut.width*W.scale+St.x,bottom:ut.height*W.scale+St.y}}function Zn(ut,St){return{x:ut*W.scale+W.x,y:St*W.scale+W.y}}function Cs(){J=!0,kt=window.requestAnimationFrame(kn)}function ks(ut,St,wt){if(E(ut)||E(St)||E(wt))throw new Error("zoom requires valid numbers");var Nt=W.scale*wt;if(Nt<H){if(W.scale===H)return;wt=H/W.scale}if(Nt>I){if(W.scale===I)return;wt=I/W.scale}var fe=Zi(ut,St);if(W.x=fe.x-wt*(fe.x-W.x),W.y=fe.y-wt*(fe.y-W.y),j&&V===1&&H===1)W.scale*=wt,bs();else{var _e=bs();_e||(W.scale*=wt)}ia("zoom"),Cs()}function vn(ut,St,wt){var Nt=wt/W.scale;ks(ut,St,Nt)}function _s(ut){var St=ut.ownerSVGElement;if(!St)throw new Error("ui element is required to be within the scene");var wt=ut.getBoundingClientRect(),Nt=wt.left+wt.width/2,fe=wt.top+wt.height/2,_e=St.getBoundingClientRect(),$e=_e.width/2-Nt,xi=_e.height/2-fe;Cn($e,xi,!0)}function Ss(ut,St){Cn(ut-W.x,St-W.y,!0)}function Cn(ut,St,wt){if(!wt)return Qn(ut,St);ke&&ke.cancel();var Nt={x:0,y:0},fe={x:ut,y:St},_e=0,$e=0;ke=e(Nt,fe,{step:function(xi){Qn(xi.x-_e,xi.y-$e),_e=xi.x,$e=xi.y}})}function Ki(ut,St){Bs(),bn(ut,St)}function Oi(){yi()}function ai(){$.addEventListener("mousedown",At,{passive:!1}),$.addEventListener("dblclick",mt,{passive:!1}),$.addEventListener("touchstart",cr,{passive:!1}),$.addEventListener("keydown",Jn,{passive:!1}),i.addWheelListener($,ji,{passive:!1}),Cs()}function yi(){i.removeWheelListener($,ji),$.removeEventListener("mousedown",At),$.removeEventListener("keydown",Jn),$.removeEventListener("dblclick",mt),$.removeEventListener("touchstart",cr),kt&&(window.cancelAnimationFrame(kt),kt=0),ue.cancel(),Me(),Pi(),bt.release(),gh()}function kn(){J&&Kn()}function Kn(){J=!1,Y.applyTransform(W),ia("transform"),kt=0}function Jn(ut){var St=0,wt=0,Nt=0;if(ut.keyCode===38?wt=1:ut.keyCode===40?wt=-1:ut.keyCode===37?St=1:ut.keyCode===39?St=-1:ut.keyCode===189||ut.keyCode===109?Nt=1:(ut.keyCode===187||ut.keyCode===107)&&(Nt=-1),!F(ut,St,wt,Nt)){if(St||wt){ut.preventDefault(),ut.stopPropagation();var fe=$.getBoundingClientRect(),_e=Math.min(fe.width,fe.height),$e=.05,xi=_e*$e*St,Aa=_e*$e*wt;Cn(xi,Aa)}if(Nt){var wn=ph(Nt*100),_e=st?Sn():ws();Ba(_e.x,_e.y,wn)}}}function ws(){var ut=$.getBoundingClientRect();return{x:ut.width/2,y:ut.height/2}}function cr(ut){if(ta(ut),Ii(),ut.touches.length===1)return ea(ut,ut.touches[0]);ut.touches.length===2&&(qi=G(ut.touches[0],ut.touches[1]),Ni=!0,Jr())}function ta(ut){O.onTouch&&!O.onTouch(ut)||(ut.stopPropagation(),ut.preventDefault())}function Ts(ut){Ii(),!(O.onDoubleClick&&!O.onDoubleClick(ut))&&(ut.preventDefault(),ut.stopPropagation())}function ea(ut){at=new Date;var St=ut.touches[0],wt=Xe(St);Wt=wt;var Nt=Zi(wt.x,wt.y);Et=Nt.x,Vt=Nt.y,we=Et,ni=Vt,ue.cancel(),Jr()}function Jr(){Gt||(Gt=!0,document.addEventListener("touchmove",_n),document.addEventListener("touchend",jt),document.addEventListener("touchcancel",jt))}function _n(ut){if(ut.touches.length===1){ut.stopPropagation();var St=ut.touches[0],wt=Xe(St),Nt=Zi(wt.x,wt.y),fe=Nt.x-Et,_e=Nt.y-Vt;fe!==0&&_e!==0&&Bo(),Et=Nt.x,Vt=Nt.y,Cn(fe,_e)}else if(ut.touches.length===2){Ni=!0;var $e=ut.touches[0],xi=ut.touches[1],Aa=G($e,xi),wn=1+(Aa/qi-1)*U,zf=Xe($e),qf=Xe(xi);if(Et=(zf.x+qf.x)/2,Vt=(zf.y+qf.y)/2,st){var wt=Sn();Et=wt.x,Vt=wt.y}Ba(Et,Vt,wn),qi=Aa,ut.stopPropagation(),ut.preventDefault()}}function Ii(){Ct&&(clearTimeout(Ct),Ct=0)}function He(ut){if(O.onClick){Ii();var St=Et-we,wt=Vt-ni,Nt=Math.sqrt(St*St+wt*wt);Nt>5||(Ct=setTimeout(function(){Ct=0,O.onClick(ut)},x))}}function jt(ut){if(Ii(),ut.touches.length>0){var St=Xe(ut.touches[0]),wt=Zi(St.x,St.y);Et=wt.x,Vt=wt.y}else{var Nt=new Date;if(Nt-Lt<x)if(st){var St=Sn();Ri(St.x,St.y,Z)}else Ri(Wt.x,Wt.y,Z);else Nt-at<y&&He(ut);Lt=Nt,gh(),Pi()}}function G(ut,St){var wt=ut.clientX-St.clientX,Nt=ut.clientY-St.clientY;return Math.sqrt(wt*wt+Nt*Nt)}function mt(ut){Ts(ut);var St=Xe(ut);st&&(St=Sn()),Ri(St.x,St.y,Z)}function At(ut){if(Ii(),!K(ut)){if(gt=ut,Bt=new Date,Gt)return ut.stopPropagation(),!1;var St=ut.button===1&&window.event!==null||ut.button===0;if(St){ue.cancel();var wt=Xe(ut),Nt=Zi(wt.x,wt.y);return we=Et=Nt.x,ni=Vt=Nt.y,document.addEventListener("mousemove",ye),document.addEventListener("mouseup",se),bt.capture(ut.target||ut.srcElement),!1}}}function ye(ut){if(!Gt){Bo();var St=Xe(ut),wt=Zi(St.x,St.y),Nt=wt.x-Et,fe=wt.y-Vt;Et=wt.x,Vt=wt.y,Cn(Nt,fe)}}function se(){var ut=new Date;ut-Bt<y&&He(gt),bt.release(),gh(),Me()}function Me(){document.removeEventListener("mousemove",ye),document.removeEventListener("mouseup",se),Zt=!1}function Pi(){document.removeEventListener("touchmove",_n),document.removeEventListener("touchend",jt),document.removeEventListener("touchcancel",jt),Zt=!1,Ni=!1,Gt=!1}function ji(ut){if(!P(ut)){ue.cancel();var St=ut.deltaY;ut.deltaMode>0&&(St*=100);var wt=ph(St);if(wt!==1){var Nt=st?Sn():Xe(ut);Ba(Nt.x,Nt.y,wt),ut.preventDefault()}}}function Xe(ut){var St,wt,Nt=$.getBoundingClientRect();return St=ut.clientX-Nt.left,wt=ut.clientY-Nt.top,{x:St,y:wt}}function Ri(ut,St,wt){var Nt=W.scale,fe={scale:Nt},_e={scale:wt*Nt};ue.cancel(),Bs(),De=e(fe,_e,{step:function($e){vn(ut,St,$e.scale)},done:hr})}function Se(ut,St,wt){var Nt=W.scale,fe={scale:Nt},_e={scale:wt};ue.cancel(),Bs(),De=e(fe,_e,{step:function($e){vn(ut,St,$e.scale)},done:hr})}function Sn(){var ut=$.getBoundingClientRect();return{x:ut.width*st.x,y:ut.height*st.y}}function Ba(ut,St,wt){return ue.cancel(),Bs(),ks(ut,St,wt)}function Bs(){De&&(De.cancel(),De=null)}function ph(ut){var St=Math.sign(ut),wt=Math.min(.25,Math.abs(ot*ut/128));return 1-St*wt}function Bo(){Zt||(ia("panstart"),Zt=!0,ue.start())}function gh(){Zt&&(Ni||ue.stop(),ia("panend"))}function hr(){ia("zoomend")}function ia(ut){or.fire(ut,or)}}function C(M){if(M){if(typeof M=="object")return(!A(M.x)||!A(M.y))&&_(M),M;_()}}function _(M){throw console.error(M),new Error(["Cannot parse transform origin.","Some good examples:",' "center center" can be achieved with {x: 0.5, y: 0.5}',' "top center" can be achieved with {x: 0.5, y: 0}',' "bottom right" can be achieved with {x: 1, y: 1}'].join(`
414
- `))}function w(){}function T(M){var O=typeof M;if(!(O==="undefined"||O==="boolean")){var Y=A(M.left)&&A(M.top)&&A(M.bottom)&&A(M.right);if(!Y)throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}}function A(M){return Number.isFinite(M)}function E(M){return Number.isNaN?Number.isNaN(M):M!==M}function N(){return{start:w,stop:w,cancel:w}}function R(){if(typeof document>"u")return;var M=document.getElementsByTagName("script");if(!M)return;for(var O,Y=0;Y<M.length;++Y){var $=M[Y];if($.src&&$.src.match(/\bpanzoom(\.min)?\.js/)){O=$;break}}if(!O)return;var q=O.getAttribute("query");if(!q)return;var J=O.getAttribute("name")||"pz",W=Date.now();F();function F(){var I=document.querySelector(q);if(!I){var H=Date.now(),V=H-W;if(V<2e3){setTimeout(F,100);return}console.error("Cannot find the panzoom element",J);return}var Z=U(O);console.log(Z),window[J]=v(I,Z)}function U(I){for(var H=I.attributes,V={},Z=0;Z<H.length;++Z){var P=H[Z],K=j(P);K&&(V[K.name]=K.value)}return V}function j(I){if(I.name){var H=I.name[0]==="p"&&I.name[1]==="z"&&I.name[2]==="-";if(H){var V=I.name.substr(3),Z=JSON.parse(I.value);return{name:V,value:Z}}}}}return R(),K0}var JX=KX();const tQ=jg(JX);ae.setOptions({gfm:!0,breaks:!0});const eQ={"[":"]","(":")","{":"}"};function iQ(i){if(/^\s*(classDef|class|style|linkStyle|click|subgraph)\b/.test(i))return i;let e="",r=0;const n=i.length;for(;r<n;){const a=i.slice(r).match(/^(\s*[A-Za-z_]\w*\s*)([\[\(\{])/);if(!a){e+=i[r],r++;continue}const o=a[1],c=a[2],h=eQ[c],u=r+o.length+1,f=i.lastIndexOf(h);if(f<=u){e+=i[r],r++;continue}const g=i.slice(u,f).trim();if(g.startsWith('"')&&g.endsWith('"')){e+=i.slice(r,f+1),r=f+1;continue}if(g===""){e+=i.slice(r,f+1),r=f+1;continue}const x=g.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");e+=`${o}${c}"${x}"${h}`,r=f+1}return e}function rQ(i){return i.split(`
415
- `).map(iQ).join(`
416
- `)}const nQ=/^(\s*[-*+]\s+)\[( |x|X)\](\s+)(.*)$/;function aQ(i,e,r){const n=i.split(`
417
- `);let a=0,o=!1,c="";for(let h=0;h<n.length;h++){const u=n[h],f=/^(\s*)(```|~~~)/.exec(u);if(f){o?u.includes(c)&&(o=!1,c=""):(o=!0,c=f[2]);continue}if(o)continue;const p=nQ.exec(u);if(p){if(a===e){const[,g,,x,y]=p,v=r?"[x]":"[ ]";n[h]=`${g}${v}${x}${y}`;const C=/<!--\s*node:([A-Za-z0-9_-]+)\s*-->/.exec(y);return{body:n.join(`
418
- `),nodeId:C?C[1]:null}}a++}}return null}const sQ=/-->|---|==>|==|-\.|~~~|\.->/;function oQ(i,e,r){const n=r?"done":"todo",a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=new RegExp(`^(\\s*)(${a})((?:\\[[^\\]]*\\]|\\([^)]*\\)|\\{[^}]*\\})?)(\\s*:::(?:done|todo|active|blocked)\\b)?\\s*$`),c=i.split(`
419
- `);let h=!1,u="";for(let f=0;f<c.length;f++){const p=c[f];if(!h){const C=/^(\s*)(```|~~~)\s*mermaid\b/i.exec(p);C&&(h=!0,u=C[2]);continue}if(p.trim().startsWith(u)){h=!1,u="";continue}if(/^\s*(classDef|class|style|linkStyle|click|subgraph|end)\b/.test(p)||sQ.test(p))continue;const g=o.exec(p);if(!g)continue;const[,x,y,v]=g;c[f]=`${x}${y}${v??""}:::${n}`}return c.join(`
420
- `)}const lQ=[1,2,3,4,5,6,7,8,9,10],cQ=[1,2,3,4,5],hQ=[25,50,75,100],uQ=[.5,1,1.5,2,3,4,5,6,8];function fQ(i){return i==null?"":i<5?"rice-score--low":i<=15?"rice-score--mid":"rice-score--high"}function dQ({task:i,expanded:e,onToggle:r,onUpdate:n}){const{t:a}=oi(),o=i.rice,c=(o==null?void 0:o.score)??null,h=c===null?"—":String(c),u=fQ(c),f=g=>o?o[g]:null,p=(g,x)=>{const y=x===""?null:Number(x);y!==null&&!Number.isFinite(y)||y!==f(g)&&n({[g]:y})};return b.jsxs("div",{className:`rice-block ${e?"rice-block--open":""}`,children:[b.jsxs("button",{type:"button",className:"rice-header",onClick:r,"aria-expanded":e,children:[b.jsx("span",{className:"rice-header-label",children:a("rice.title")}),b.jsx("span",{className:`rice-score-badge ${u}`,title:a("rice.score"),children:h}),b.jsx("svg",{className:`rice-chevron ${e?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:b.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e&&b.jsxs("div",{className:"rice-grid",children:[b.jsxs("label",{className:"rice-field",children:[b.jsx("span",{className:"rice-field-label",children:a("rice.reach")}),b.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.reach)??"",title:a("rice.tooltip.reach"),onChange:g=>p("reach",g.target.value),children:[b.jsx("option",{value:"",children:"—"}),lQ.map(g=>b.jsx("option",{value:g,children:g},g))]})]}),b.jsxs("label",{className:"rice-field",children:[b.jsx("span",{className:"rice-field-label",children:a("rice.impact")}),b.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.impact)??"",title:a("rice.tooltip.impact"),onChange:g=>p("impact",g.target.value),children:[b.jsx("option",{value:"",children:"—"}),cQ.map(g=>b.jsx("option",{value:g,children:g},g))]})]}),b.jsxs("label",{className:"rice-field",children:[b.jsx("span",{className:"rice-field-label",children:a("rice.confidence")}),b.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.confidence)??"",title:a("rice.tooltip.confidence"),onChange:g=>p("confidence",g.target.value),children:[b.jsx("option",{value:"",children:"—"}),hQ.map(g=>b.jsxs("option",{value:g,children:[g,"%"]},g))]})]}),b.jsxs("label",{className:"rice-field",children:[b.jsx("span",{className:"rice-field-label",children:a("rice.effort")}),b.jsxs("select",{className:"field-select rice-input",value:(o==null?void 0:o.effort)??"",title:a("rice.tooltip.effort"),onChange:g=>p("effort",g.target.value),children:[b.jsx("option",{value:"",children:"—"}),uQ.map(g=>b.jsxs("option",{value:g,children:[g,"w"]},g))]})]}),o&&b.jsx("button",{type:"button",className:"rice-clear-btn",onClick:()=>n(null),children:a("rice.clear")})]})]})}function hn({label:i,children:e}){return b.jsxs("div",{className:"prop-row",children:[b.jsx("span",{className:"prop-label",children:i}),b.jsx("div",{className:"prop-value",children:e})]})}function pQ({text:i}){const[e,r]=tt.useState(!1),[n,a]=tt.useState(!1),o=tt.useRef(null);return tt.useEffect(()=>{requestAnimationFrame(()=>{const c=o.current;c&&a(c.scrollHeight>c.clientHeight+1)})},[i]),b.jsxs("span",{className:"prop-expandable",onClick:()=>r(c=>!c),children:[b.jsx("span",{ref:o,className:`prop-text ${e?"":"prop-text--clamped"}`,children:i}),n&&!e&&b.jsx("span",{className:"prop-expand-hint",children:"show more"}),e&&n&&b.jsx("span",{className:"prop-expand-hint",children:"show less"})]})}function gQ({task:i,onClose:e,initialRiceExpanded:r}){const{t:n}=oi(),{resolved:a}=Rg(),o=DN(),c=cX(),{data:h}=$N(),[u,f]=tt.useState(""),[p,g]=tt.useState(null),[x,y]=tt.useState(r??!!i.rice),[v,C]=tt.useState(!1),_=W=>{g(W.message),setTimeout(()=>g(null),5e3)},w=W=>{o.mutate({slug:i.slug,updates:{status:W}},{onError:_})},T=W=>{o.mutate({slug:i.slug,updates:{priority:W}},{onError:_})},A=W=>{o.mutate({slug:i.slug,updates:{urgency:W}},{onError:_})},E=W=>{o.mutate({slug:i.slug,updates:{version:W||null}},{onError:_})},N=W=>{o.mutate({slug:i.slug,updates:{rice:W}},{onError:_})},R=W=>{W.preventDefault(),u.trim()&&c.mutate({slug:i.slug,content:u.trim()},{onSuccess:()=>f(""),onError:_})},M=tt.useMemo(()=>i.body?ae.parse(i.body):"",[i.body]),O=tt.useRef(null),Y=tt.useRef(i.body??""),$=tt.useRef(i.body??"");tt.useEffect(()=>{Y.current=i.body??"",$.current=i.body??""},[i.body]);const q=tt.useRef(o),J=tt.useRef(_);return tt.useEffect(()=>{q.current=o,J.current=_}),tt.useEffect(()=>{const W=O.current;if(!W||!M)return;W.querySelectorAll('input[type="checkbox"]').forEach((j,I)=>{j.removeAttribute("disabled"),j.dataset.criterionIndex=String(I)});const U=j=>{const I=j.target;if(!(I instanceof HTMLInputElement)||I.type!=="checkbox")return;const H=I.dataset.criterionIndex;if(H===void 0)return;const V=Number(H),Z=I.checked,P=$.current,K=aQ(P,V,Z);if(!K)return;let ot=K.body;K.nodeId&&(ot=oQ(ot,K.nodeId,Z)),ot!==P&&($.current=ot,q.current.mutate({slug:i.slug,updates:{body:ot}},{onError:st=>{I.checked=!Z,$.current=Y.current,J.current(st)}}))};return W.addEventListener("change",U),()=>W.removeEventListener("change",U)},[M,i.slug]),tt.useEffect(()=>{const W=O.current;if(!W||!M)return;LN(a);let F=!1;const U=[];let j=!1;const I=async()=>{if(F||j)return;W.querySelectorAll(".mermaid-rendered").forEach(Z=>{const P=Z.dataset.mermaidSource;if(!P)return;const K=document.createElement("pre"),ot=document.createElement("code");ot.className="language-mermaid",ot.textContent=P,K.appendChild(ot),Z.replaceWith(K)});const V=W.querySelectorAll("pre > code.language-mermaid");if(V.length!==0){for(j=!0;U.length;){const Z=U.pop();try{Z==null||Z()}catch{}}for(let Z=0;Z<V.length&&!F;Z++){const P=V[Z],K=P.parentElement;if(!K)continue;const ot=rQ(P.textContent??""),st=`mmd-${i.slug}-${Z}-${Date.now().toString(36)}`,bt=document.createElement("div");bt.className="mermaid-rendered",bt.dataset.mermaidSource=ot;const kt=document.createElement("div");kt.className="mermaid-stage",bt.appendChild(kt);const Lt=document.createElement("div");Lt.className="mermaid-controls",Lt.innerHTML=`
421
- <button type="button" data-act="out" title="Zoom out">−</button>
422
- <button type="button" data-act="reset" title="Fit">⤢</button>
423
- <button type="button" data-act="in" title="Zoom in">+</button>
424
- `,bt.appendChild(Lt),K.replaceWith(bt);try{const{svg:at,bindFunctions:Ct}=await _1.render(st,ot);if(F)break;kt.innerHTML=at,Ct==null||Ct(kt),bt.dataset.mermaidRendered="1";const gt=kt.querySelector("svg");if(!gt)continue;NN(gt);const Bt=gt.viewBox.baseVal,Wt=Bt&&Bt.width>0?Bt.width:gt.getBoundingClientRect().width,Gt=Bt&&Bt.height>0?Bt.height:gt.getBoundingClientRect().height;gt.removeAttribute("width"),gt.removeAttribute("height"),gt.style.width=`${Wt}px`,gt.style.height=`${Gt}px`,gt.style.maxWidth="none",gt.style.transformOrigin="0 0";const Zt=tQ(gt,{maxZoom:12,minZoom:.15,bounds:!1,zoomDoubleClickSpeed:1.6,smoothScroll:!1}),Et=()=>{try{const ue=kt.getBoundingClientRect();if(ue.width===0||ue.height===0)return;const ke=32,De=Math.min((ue.width-ke)/Wt,(ue.height-ke)/Gt,1);Zt.zoomAbs(0,0,1),Zt.moveTo(0,0),Zt.zoomAbs(0,0,De);const Ni=(ue.width-Wt*De)/2,Pe=(ue.height-Gt*De)/2;Zt.moveTo(Ni,Pe)}catch{}};requestAnimationFrame(()=>requestAnimationFrame(Et));const Vt=new ResizeObserver(()=>Et());Vt.observe(kt);let we=null;const ni=ue=>{try{const ke=ue.getBoundingClientRect(),De=kt.getBoundingClientRect();if(ke.width===0)return;const Ni=ke.left+ke.width/2-De.left,Pe=ke.top+ke.height/2-De.top,or=Math.min(De.width*.6/ke.width,De.height*.6/ke.height,6),Un=Zt.getTransform(),Kr=or/Un.scale;if(Math.abs(Kr-1)<.01)return;Zt.smoothZoom(Ni,Pe,Kr)}catch{}},qi=ue=>{const ke=ue.target,De=(ke==null?void 0:ke.closest("g.node, g.cluster"))??null;if(!De){we&&(we=null,Et());return}we===De?(we=null,Et()):(we=De,ni(De))};kt.addEventListener("click",qi),gt.querySelectorAll("g.node, g.cluster").forEach(ue=>{ue.style.cursor="zoom-in"}),Lt.addEventListener("click",ue=>{ue.stopPropagation();const ke=ue.target.closest("button");if(!ke)return;const De=kt.getBoundingClientRect(),Ni=De.width/2,Pe=De.height/2,or=ke.getAttribute("data-act");or==="in"?Zt.smoothZoom(Ni,Pe,1.4):or==="out"?Zt.smoothZoom(Ni,Pe,1/1.4):or==="reset"&&(we=null,Et())}),U.push(()=>{Vt.disconnect(),kt.removeEventListener("click",qi),Zt.dispose()})}catch(at){if(F)break;const Ct=at instanceof Error?at.message:String(at);kt.innerHTML=`<pre class="mermaid-error">Mermaid render failed: ${Ct.replace(/[<>&]/g,gt=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[gt]??gt)}</pre>`}}j=!1}};I();const H=new MutationObserver(()=>{if(F||j)return;const V=W.querySelector("pre > code.language-mermaid"),Z=W.querySelector(".mermaid-rendered .mermaid-stage svg");V&&(!Z||V)&&V&&I()});return H.observe(W,{childList:!0,subtree:!0}),()=>{for(F=!0,H.disconnect();U.length;){const V=U.pop();try{V==null||V()}catch{}}}},[M,i.slug,a]),b.jsx("div",{className:`detail-overlay ${v?"detail-overlay--fullscreen":""}`,onClick:e,children:b.jsxs("div",{className:`detail-panel ${v?"detail-panel--fullscreen":""}`,onClick:W=>W.stopPropagation(),children:[b.jsxs("div",{className:"detail-header",children:[b.jsx("h2",{className:"detail-title",children:i.name}),b.jsxs("div",{className:"detail-header-actions",children:[b.jsx("button",{type:"button",className:"detail-icon-btn",onClick:()=>C(W=>!W),title:v?"Exit full-page view":"Open in full page","aria-label":v?"Exit full-page view":"Open in full page",children:v?b.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M6 3v3H3M10 3v3h3M6 13v-3H3M10 13v-3h3"})}):b.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3"})})}),b.jsx("button",{className:"modal-close",onClick:e,"aria-label":"Close",children:"×"})]})]}),b.jsxs("div",{className:"detail-body",children:[p&&b.jsx("div",{className:"error-state",style:{marginBottom:"var(--space-3)"},children:p}),b.jsxs("div",{className:"props-block",children:[b.jsx(hn,{label:"Status",children:b.jsxs("select",{className:"field-select prop-select",value:i.status,onChange:W=>w(W.target.value),children:[b.jsx("option",{value:"todo",children:n("tasks.todo")}),b.jsx("option",{value:"in_progress",children:n("tasks.in_progress")}),b.jsx("option",{value:"in_review",children:n("tasks.in_review")}),b.jsx("option",{value:"completed",children:n("tasks.completed")})]})}),b.jsx(hn,{label:n("tasks.priority"),children:b.jsxs("select",{className:"field-select prop-select",value:i.priority,onChange:W=>T(W.target.value),children:[b.jsx("option",{value:"low",children:n("priority.low")}),b.jsx("option",{value:"medium",children:n("priority.medium")}),b.jsx("option",{value:"high",children:n("priority.high")}),b.jsx("option",{value:"critical",children:n("priority.critical")})]})}),b.jsx(hn,{label:"Urgency",children:b.jsxs("select",{className:"field-select prop-select",value:i.urgency,onChange:W=>A(W.target.value),children:[b.jsx("option",{value:"low",children:n("priority.low")}),b.jsx("option",{value:"medium",children:n("priority.medium")}),b.jsx("option",{value:"high",children:n("priority.high")}),b.jsx("option",{value:"critical",children:n("priority.critical")})]})}),b.jsx(hn,{label:n("rice.title"),children:b.jsx(dQ,{task:i,expanded:x,onToggle:()=>y(W=>!W),onUpdate:N})}),i.tags.length>0&&b.jsx(hn,{label:"Tags",children:b.jsx("div",{className:"prop-tags",children:i.tags.map(W=>b.jsx("span",{className:"task-tag","data-hue":Ll(W),children:W},W))})}),i.related_feature&&b.jsx(hn,{label:"Feature",children:b.jsx("span",{className:"prop-feature",children:i.related_feature})}),b.jsx(hn,{label:"Version",children:b.jsxs("select",{className:"field-select prop-select",value:i.version??"",onChange:W=>E(W.target.value),children:[b.jsx("option",{value:"",children:"No version"}),(h??[]).map(W=>b.jsx("option",{value:W.version,children:W.version},W.version)),i.version&&!(h??[]).some(W=>W.version===i.version)&&b.jsx("option",{value:i.version,children:i.version})]})}),i.description&&b.jsx(hn,{label:"Description",children:b.jsx(pQ,{text:i.description})}),b.jsx(hn,{label:"Created",children:b.jsx("span",{className:"prop-date",children:i.created_at})}),b.jsx(hn,{label:"Updated",children:b.jsx("span",{className:"prop-date",children:i.updated_at})}),i.parent_task&&b.jsx(hn,{label:"Parent",children:b.jsx("span",{className:"prop-text",children:i.parent_task})}),b.jsx(hn,{label:"ID",children:b.jsx("code",{className:"prop-id",children:i.id})})]}),b.jsx("hr",{className:"detail-divider"}),M?b.jsx("div",{ref:O,className:"markdown-body",dangerouslySetInnerHTML:{__html:M}}):b.jsx("p",{className:"detail-empty",children:"No content."}),b.jsx("hr",{className:"detail-divider"}),b.jsxs("div",{className:"changelog-section",children:[b.jsx("h3",{className:"changelog-title",children:n("tasks.changelog")}),b.jsxs("form",{onSubmit:R,className:"changelog-add",children:[b.jsx("input",{className:"field-input",value:u,onChange:W=>f(W.target.value),placeholder:"Add a changelog entry..."}),b.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!u.trim()||c.isPending,children:c.isPending?"...":n("tasks.add_entry")})]})]})]})]})})}const mQ=["critical","high"];function Zs(i){return mQ.includes(i)}const yQ=[{key:"do",label:"Do First",subtitle:"Important & Urgent",colorVar:"--color-quadrant-do",filter:i=>Zs(i.priority)&&Zs(i.urgency)},{key:"schedule",label:"Schedule",subtitle:"Important & Not Urgent",colorVar:"--color-quadrant-schedule",filter:i=>Zs(i.priority)&&!Zs(i.urgency)},{key:"delegate",label:"Delegate",subtitle:"Less Important & Urgent",colorVar:"--color-quadrant-delegate",filter:i=>!Zs(i.priority)&&Zs(i.urgency)},{key:"eliminate",label:"Don't Do",subtitle:"Less Important & Not Urgent",colorVar:"--color-quadrant-eliminate",filter:i=>!Zs(i.priority)&&!Zs(i.urgency)}];function xQ({tasks:i,onTaskClick:e}){const r=i.filter(n=>n.status!=="completed");return b.jsxs("div",{className:"eisenhower",children:[b.jsxs("div",{className:"eisenhower-y-label",children:[b.jsx("span",{className:"eisenhower-axis-hi",children:"Important"}),b.jsx("span",{className:"eisenhower-axis-lo",children:"Less Important"})]}),b.jsx("div",{className:"eisenhower-grid",children:yQ.map(n=>{const a=r.filter(n.filter);return b.jsxs("div",{className:`eisenhower-quadrant eisenhower-quadrant--${n.key}`,children:[b.jsxs("div",{className:"eisenhower-quadrant-header",children:[b.jsx("span",{className:"eisenhower-quadrant-dot",style:{background:`var(${n.colorVar})`}}),b.jsx("span",{className:"eisenhower-quadrant-label",children:n.label}),b.jsx("span",{className:"eisenhower-quadrant-count",children:a.length})]}),b.jsx("span",{className:"eisenhower-quadrant-subtitle",children:n.subtitle}),b.jsx("div",{className:"eisenhower-quadrant-cards",children:a.map(o=>b.jsx(Df,{task:o,onClick:()=>e(o),onDragStart:()=>{}},o.slug))})]},n.key)})}),b.jsxs("div",{className:"eisenhower-x-label",children:[b.jsx("span",{className:"eisenhower-axis-hi",children:"Urgent"}),b.jsx("span",{className:"eisenhower-axis-lo",children:"Not Urgent"})]})]})}const ie={top:32,right:24,bottom:56,left:64},fT=.5,dT=8,J0=1,pT=5,bQ=2,vQ=3,CQ={todo:"--color-status-todo",in_progress:"--color-status-in-progress",in_review:"--color-status-in-review",completed:"--color-status-completed"};function tx(i){return Math.log2(Math.max(i,.01)+1)}function ex(i,e,r){return Math.max(e,Math.min(r,i))}function gT(i){const e=i.rice;return!!(e&&e.reach!==null&&e.impact!==null&&e.confidence!==null&&e.effort!==null&&e.score!==null)}function kQ({tasks:i,onTaskClick:e}){const r=tt.useRef(null),[n,a]=tt.useState({width:800,height:480}),[o,c]=tt.useState(!1),[h,u]=tt.useState(null);tt.useEffect(()=>{const $=r.current;if(!$)return;const q=new ResizeObserver(J=>{for(const W of J){const F=W.contentRect.width,U=Math.max(360,Math.min(620,F*.6));a({width:F,height:U})}});return q.observe($),()=>q.disconnect()},[]);const f=tt.useMemo(()=>i.filter($=>$.status!=="completed"),[i]),p=tt.useMemo(()=>f.filter(gT),[f]),g=tt.useMemo(()=>f.filter($=>!gT($)),[f]),x=tt.useMemo(()=>[...p].sort(($,q)=>(q.rice.score??0)-($.rice.score??0)),[p]),y=Math.max(120,n.width-ie.left-ie.right),v=Math.max(120,n.height-ie.top-ie.bottom),C=tx(fT),w=tx(dT)-C,T=$=>{const q=(tx(ex($,fT,dT))-C)/w;return ie.left+(1-q)*y},A=$=>{const q=(ex($,J0,pT)-J0)/(pT-J0);return ie.top+(1-q)*v},E=$=>6+(ex($,1,10)-1)/9*18,N=$=>Math.max(.4,$/100),R=T(bQ),M=A(vQ),O=[.5,1,2,4,8],Y=[1,2,3,4,5];return b.jsxs("div",{className:"rice-scatter",ref:r,children:[b.jsxs("svg",{className:"rice-scatter-svg",width:n.width,height:n.height,viewBox:`0 0 ${n.width} ${n.height}`,role:"img","aria-label":`RICE scatter: ${p.length} rated tasks plotted by impact and effort`,children:[b.jsx("rect",{x:ie.left,y:ie.top,width:R-ie.left,height:M-ie.top,className:"rice-quad rice-quad--big-bets"}),b.jsx("rect",{x:R,y:ie.top,width:ie.left+y-R,height:M-ie.top,className:"rice-quad rice-quad--quick-wins"}),b.jsx("rect",{x:ie.left,y:M,width:R-ie.left,height:ie.top+v-M,className:"rice-quad rice-quad--time-sinks"}),b.jsx("rect",{x:R,y:M,width:ie.left+y-R,height:ie.top+v-M,className:"rice-quad rice-quad--fill-ins"}),b.jsx("text",{x:ie.left+8,y:ie.top+18,className:"rice-quad-label",children:"Big Bets"}),b.jsx("text",{x:ie.left+y-8,y:ie.top+18,textAnchor:"end",className:"rice-quad-label",children:"Quick Wins"}),b.jsx("text",{x:ie.left+8,y:ie.top+v-6,className:"rice-quad-label",children:"Time Sinks"}),b.jsx("text",{x:ie.left+y-8,y:ie.top+v-6,textAnchor:"end",className:"rice-quad-label",children:"Fill-ins"}),b.jsx("line",{x1:R,y1:ie.top,x2:R,y2:ie.top+v,className:"rice-quad-divider"}),b.jsx("line",{x1:ie.left,y1:M,x2:ie.left+y,y2:M,className:"rice-quad-divider"}),b.jsx("line",{x1:ie.left,y1:ie.top+v,x2:ie.left+y,y2:ie.top+v,className:"rice-axis"}),b.jsx("line",{x1:ie.left,y1:ie.top,x2:ie.left,y2:ie.top+v,className:"rice-axis"}),O.map($=>b.jsxs("g",{children:[b.jsx("line",{x1:T($),y1:ie.top+v,x2:T($),y2:ie.top+v+4,className:"rice-axis"}),b.jsxs("text",{x:T($),y:ie.top+v+18,textAnchor:"middle",className:"rice-tick",children:[$,"w"]})]},`xt-${$}`)),b.jsx("text",{x:ie.left+y/2,y:ie.top+v+40,textAnchor:"middle",className:"rice-axis-label",children:"Effort (weeks) — low-effort on right"}),Y.map($=>b.jsxs("g",{children:[b.jsx("line",{x1:ie.left-4,y1:A($),x2:ie.left,y2:A($),className:"rice-axis"}),b.jsx("text",{x:ie.left-8,y:A($)+4,textAnchor:"end",className:"rice-tick",children:$})]},`yt-${$}`)),b.jsx("text",{transform:`translate(${ie.left-44}, ${ie.top+v/2}) rotate(-90)`,textAnchor:"middle",className:"rice-axis-label",children:"Impact"}),p.map($=>{const q=$.rice,J=T(q.effort),W=A(q.impact),F=E(q.reach),U=N(q.confidence),j=CQ[$.status],I=h===$.slug;return b.jsx("circle",{cx:J,cy:W,r:F,fill:`var(${j})`,fillOpacity:U,stroke:"var(--color-bg)",strokeWidth:I?2.5:1.5,className:"rice-dot",tabIndex:0,role:"button","aria-label":`${$.name}: reach ${q.reach}, impact ${q.impact}, confidence ${q.confidence}, effort ${q.effort} weeks, score ${q.score}`,onClick:()=>e($),onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),e($))},onMouseEnter:()=>u($.slug),onMouseLeave:()=>u(null),onFocus:()=>u($.slug),onBlur:()=>u(null),children:b.jsx("title",{children:`${$.name}
425
- R ${q.reach} · I ${q.impact} · C ${q.confidence}% · E ${q.effort}w
426
- Score: ${q.score}`})},$.slug)})]}),b.jsx("ol",{className:"rice-scatter-sr-list",children:x.map($=>b.jsx("li",{children:`${$.name} — score ${$.rice.score}`},$.slug))}),g.length>0&&b.jsxs("div",{className:`rice-unscored ${o?"rice-unscored--open":""}`,children:[b.jsxs("button",{type:"button",className:"rice-unscored-toggle",onClick:()=>c($=>!$),"aria-expanded":o,children:[b.jsxs("span",{children:["Unscored (",g.length,")"]}),b.jsx("svg",{className:`rice-chevron ${o?"rice-chevron--open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:b.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),o&&b.jsx("div",{className:"rice-unscored-cards",children:g.map($=>b.jsx(Df,{task:$,onClick:()=>e($),onDragStart:()=>{}},$.slug))})]})]})}function _Q({onClose:i,tasks:e}){const{data:r,isLoading:n}=FN(),a=hX(),o=uX(),[c,h]=tt.useState(""),[u,f]=tt.useState(""),p=v=>{v.preventDefault(),c.trim()&&a.mutate({version:c.trim(),summary:u.trim()||void 0},{onSuccess:()=>{h(""),f("")}})},g=v=>e.filter(C=>C.version===v).length,x=(r??[]).filter(v=>v.status==="planning"),y=(r??[]).filter(v=>v.status==="released");return b.jsx("div",{className:"modal-overlay",onClick:i,children:b.jsxs("div",{className:"modal version-manager-modal",onClick:v=>v.stopPropagation(),children:[b.jsxs("div",{className:"modal-header",children:[b.jsx("h2",{className:"modal-title",children:"Versions & Releases"}),b.jsx("button",{className:"modal-close",onClick:i,children:"×"})]}),b.jsxs("div",{className:"modal-body version-manager-body",children:[b.jsxs("div",{className:"version-stats",children:[b.jsxs("div",{className:"version-stat",children:[b.jsx("span",{className:"version-stat-count",children:x.length}),b.jsx("span",{className:"version-stat-label",children:"Planning"})]}),b.jsxs("div",{className:"version-stat",children:[b.jsx("span",{className:"version-stat-count",children:y.length}),b.jsx("span",{className:"version-stat-label",children:"Released"})]})]}),n&&b.jsx("p",{className:"version-manager-loading",children:"Loading..."}),x.length>0&&b.jsxs("div",{className:"version-section",children:[b.jsx("h3",{className:"version-section-title",children:"Planning"}),x.map(v=>{const C=g(v.version);return b.jsxs("div",{className:"version-item",children:[b.jsxs("div",{className:"version-item-info",children:[b.jsx("span",{className:"version-status-badge version-status-badge--planning",children:"planning"}),b.jsx("span",{className:"version-item-name",children:v.version}),b.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]})]}),v.summary&&b.jsx("p",{className:"version-item-desc",children:v.summary}),b.jsx("div",{className:"version-item-actions",children:b.jsx("button",{className:"btn btn--primary version-release-btn",onClick:()=>o.mutate({version:v.version,updates:{status:"released"}}),children:"Release"})})]},v.version)})]}),y.length>0&&b.jsxs("div",{className:"version-section",children:[b.jsx("h3",{className:"version-section-title",children:"Released"}),y.map(v=>{const C=g(v.version);return b.jsxs("div",{className:"version-item version-item--released",children:[b.jsxs("div",{className:"version-item-info",children:[b.jsx("span",{className:"version-status-badge version-status-badge--released",children:"released"}),b.jsx("span",{className:"version-item-name",children:v.version}),b.jsxs("span",{className:"version-item-count",children:[C," task",C!==1?"s":""]}),v.date&&b.jsx("span",{className:"version-item-date",children:v.date})]}),v.summary&&b.jsx("p",{className:"version-item-desc",children:v.summary})]},v.version)})]}),(r??[]).length===0&&!n&&b.jsx("p",{className:"version-manager-empty",children:"No versions yet. Create one below."}),b.jsxs("form",{onSubmit:p,className:"version-create-form",children:[b.jsx("h3",{className:"version-section-title",children:"New Version"}),b.jsx("input",{className:"field-input",value:c,onChange:v=>h(v.target.value),placeholder:"Version name (e.g. v0.2.0)",required:!0}),b.jsx("input",{className:"field-input",value:u,onChange:v=>f(v.target.value),placeholder:"Summary (optional)"}),b.jsx("button",{type:"submit",className:"btn btn--primary",disabled:!c.trim()||a.isPending,children:a.isPending?"...":"Create Planning Version"})]})]})]})})}const mT={critical:0,high:1,medium:2,low:3},yT={critical:0,high:1,medium:2,low:3},WN=[{key:"todo",labelKey:"tasks.todo",colorVar:"--color-status-todo"},{key:"in_progress",labelKey:"tasks.in_progress",colorVar:"--color-status-in-progress"},{key:"in_review",labelKey:"tasks.in_review",colorVar:"--color-status-in-review"},{key:"completed",labelKey:"tasks.completed",colorVar:"--color-status-completed"}],YN=[{key:"critical",label:"Critical",colorVar:"--color-priority-critical"},{key:"high",label:"High",colorVar:"--color-priority-high"},{key:"medium",label:"Medium",colorVar:"--color-priority-medium"},{key:"low",label:"Low",colorVar:"--color-priority-low"}],GN=[{key:"critical",label:"Critical",colorVar:"--color-urgency-critical"},{key:"high",label:"High",colorVar:"--color-urgency-high"},{key:"medium",label:"Medium",colorVar:"--color-urgency-medium"},{key:"low",label:"Low",colorVar:"--color-urgency-low"}];function SQ(i,e){return[...i].sort((r,n)=>{var a,o;switch(e){case"updated_at":case"created_at":return n[e].localeCompare(r[e]);case"priority":return(mT[r.priority]??9)-(mT[n.priority]??9);case"urgency":return(yT[r.urgency]??9)-(yT[n.urgency]??9);case"name":return r.name.localeCompare(n.name);case"rice":{const c=((a=r.rice)==null?void 0:a.score)??-1/0;return(((o=n.rice)==null?void 0:o.score)??-1/0)-c}}})}function wQ(i,e){let r=i;if(e.searchQuery.trim()){const n=e.searchQuery.trim().toLowerCase();r=r.filter(a=>a.name.toLowerCase().includes(n)||a.description.toLowerCase().includes(n))}if(e.statusFilter.length>0&&(r=r.filter(n=>e.statusFilter.includes(n.status))),e.priorityFilter.length>0&&(r=r.filter(n=>e.priorityFilter.includes(n.priority))),e.urgencyFilter.length>0&&(r=r.filter(n=>e.urgencyFilter.includes(n.urgency))),e.tagFilter.length>0&&(r=r.filter(n=>n.tags.some(a=>e.tagFilter.includes(a)))),e.versionFilter.length>0&&(r=r.filter(n=>n.version!==null&&e.versionFilter.includes(n.version))),e.dateFrom||e.dateTo){const n=e.dateField;e.dateFrom&&(r=r.filter(a=>a[n].slice(0,10)>=e.dateFrom)),e.dateTo&&(r=r.filter(a=>a[n].slice(0,10)<=e.dateTo))}if(e.minRice!==null&&e.minRice!==void 0){const n=e.minRice;r=r.filter(a=>{var o,c;return((o=a.rice)==null?void 0:o.score)!==null&&((c=a.rice)==null?void 0:c.score)!==void 0&&a.rice.score>=n})}return SQ(r,e.sortField)}function xT(i){const e=i,r={...Bg};for(const a of Object.keys(Bg))e[a]!==void 0&&(r[a]=e[a]);const n=["statusFilter","priorityFilter","urgencyFilter","tagFilter","versionFilter"];for(const a of n){const o=e[a];typeof o=="string"?r[a]=o.trim()?[o.trim()]:[]:Array.isArray(o)||(r[a]=[])}return r.viewMode===void 0&&(r.viewMode="kanban"),r.subGroupBy===void 0&&(r.subGroupBy="none"),r.minRice===void 0&&(r.minRice=null),r}function bT(i,e){if(e==="none")return[];switch(e){case"status":return WN.map(r=>({key:r.key,label:r.labelKey,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.status===r.key)})).filter(r=>r.tasks.length>0);case"priority":return YN.map(r=>({key:r.key,label:r.label,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.priority===r.key)})).filter(r=>r.tasks.length>0);case"urgency":return GN.map(r=>({key:r.key,label:r.label,color:`var(${r.colorVar})`,tasks:i.filter(n=>n.urgency===r.key)})).filter(r=>r.tasks.length>0);case"tags":{const r=new Map;for(const n of i)if(n.tags.length===0){const a=r.get("(untagged)")??[];a.push(n),r.set("(untagged)",a)}else for(const a of n.tags){const o=r.get(a)??[];o.push(n),r.set(a,o)}return Array.from(r.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}case"version":{const r=new Map;for(const n of i){const a=n.version??"(no version)",o=r.get(a)??[];o.push(n),r.set(a,o)}return Array.from(r.entries()).map(([n,a])=>({key:n,label:n,tasks:a}))}}return[]}function TQ(i,e){return i?`dreamcontext:${i}:${e}`:`dreamcontext:${e}`}function BQ(i,e){try{const r=localStorage.getItem(i);return r===null?e:JSON.parse(r)}catch{return e}}function AQ(i,e){try{localStorage.setItem(i,JSON.stringify(e))}catch{}}function EQ(){const{t:i}=oi(),{projectId:e}=UB(),{data:r,isLoading:n,isError:a,error:o}=oX(),{data:c}=FN(),h=DN(),[u,f]=tt.useState(!1),[p,g]=tt.useState(!1),[x,y]=tt.useState(null),v=tt.useMemo(()=>TQ(e,"kanban-filters"),[e]),[C,_]=tt.useState(()=>{const F=BQ(v,Bg);return xT(F)}),w=tt.useCallback(F=>{_(U=>{const j=typeof F=="function"?F(U):F;return AQ(v,j),j})},[v]),T=gX(e),A=tt.useCallback((F,U)=>{w(j=>({...j,[F]:U}))},[w]),E=tt.useCallback(()=>{w(F=>({...Bg,sortField:F.sortField,groupBy:F.groupBy,subGroupBy:F.subGroupBy,viewMode:F.viewMode}))},[w]),N=tt.useCallback(F=>{mX(e,F,{...C})},[C,e]),R=tt.useCallback(F=>{w(xT(F.filters))},[w]),M=tt.useCallback(F=>{yX(e,F)},[e]),O=tt.useMemo(()=>wQ(r??[],C),[r,C]),Y=tt.useMemo(()=>!x||!r?null:r.find(F=>F.slug===x)??null,[x,r]),$=tt.useMemo(()=>{const F=new Set;for(const U of r??[])for(const j of U.tags)F.add(j);return Array.from(F).sort()},[r]),q=tt.useMemo(()=>{const F=new Set;for(const U of r??[])U.version&&F.add(U.version);for(const U of c??[])F.add(U.version);return Array.from(F).sort()},[r,c]),J=(F,U,j)=>{switch(j){case"status":h.mutate({slug:F,updates:{status:U}});break;case"priority":h.mutate({slug:F,updates:{priority:U}});break;case"urgency":h.mutate({slug:F,updates:{urgency:U}});break;case"tags":{const I=(r??[]).find(H=>H.slug===F);I&&!I.tags.includes(U)&&U!=="(untagged)"&&h.mutate({slug:F,updates:{tags:[...I.tags,U]}})}break;case"version":h.mutate({slug:F,updates:{version:U==="(no version)"?null:U}});break}};if(n)return b.jsx("div",{className:"loading",children:i("common.loading")});if(a)return b.jsxs("div",{className:"error-state",children:["Failed to load tasks. ",o==null?void 0:o.message]});const W=()=>{const{groupBy:F,subGroupBy:U}=C,j=(I,H,V,Z,P)=>b.jsx(Zw,{title:typeof H=="string"&&H.includes(".")?i(H):H,status:I,tasks:Z,count:Z.length,colorVar:V,onTaskClick:K=>y(K.slug),onDrop:(K,ot)=>J(K,ot,F),staggerIndex:P+1,subGroups:U!=="none"?bT(Z,U):void 0},I);switch(F){case"status":return WN.map((I,H)=>j(I.key,I.labelKey,I.colorVar,O.filter(V=>V.status===I.key),H));case"priority":return YN.map((I,H)=>j(I.key,I.label,I.colorVar,O.filter(V=>V.priority===I.key),H));case"urgency":return GN.map((I,H)=>j(I.key,I.label,I.colorVar,O.filter(V=>V.urgency===I.key),H));case"tags":{const I=new Map;for(const H of O)if(H.tags.length===0){const V=I.get("(untagged)")??[];V.push(H),I.set("(untagged)",V)}else for(const V of H.tags){const Z=I.get(V)??[];Z.push(H),I.set(V,Z)}return Array.from(I.entries()).map(([H,V],Z)=>j(H,H,"--color-brand-vivid",V,Z))}case"version":{const I=(c??[]).filter(Z=>Z.status==="planning").map(Z=>Z.version),H=(c??[]).filter(Z=>Z.status==="released").map(Z=>Z.version),V=["(no version)",...I,...H];for(const Z of O)Z.version&&!V.includes(Z.version)&&V.push(Z.version);return V.map((Z,P)=>{const K=O.filter(ot=>(ot.version??"(no version)")===Z);return K.length===0&&Z!=="(no version)"?null:j(Z,Z,"--color-brand-mid",K,P)}).filter(Boolean)}case"none":return[b.jsx(Zw,{title:"All Tasks",status:"all",tasks:O,count:O.length,colorVar:"--color-brand-vivid",onTaskClick:I=>y(I.slug),onDrop:()=>{},subGroups:U!=="none"?bT(O,U):void 0},"all")]}};return b.jsxs("div",{className:"kanban-board",children:[b.jsx(IX,{filters:C,onFilterChange:A,onClearFilters:E,onCreateClick:()=>f(!0),presets:T,onSavePreset:N,onLoadPreset:R,onDeletePreset:M,allTags:$,allVersions:q,onVersionManagerClick:()=>g(!0)}),C.viewMode==="eisenhower"?b.jsx(xQ,{tasks:O,onTaskClick:F=>y(F.slug)}):C.viewMode==="scatter"?b.jsx(kQ,{tasks:O,onTaskClick:F=>y(F.slug)}):C.viewMode==="list"?b.jsx("div",{className:"task-list",children:O.map(F=>b.jsx(Df,{task:F,onClick:()=>y(F.slug),onDragStart:()=>{}},F.slug))}):b.jsx("div",{className:"kanban-columns",children:W()}),u&&b.jsx(PX,{onClose:()=>f(!1)}),p&&b.jsx(_Q,{onClose:()=>g(!1),tasks:r??[]}),Y&&b.jsx(gQ,{task:Y,onClose:()=>y(null)})]})}function MQ(){const{t:i}=oi();return b.jsxs("div",{children:[b.jsx("h1",{className:"page-title",children:i("tasks.title")}),b.jsx(EQ,{})]})}function LQ(){return zi({queryKey:["changelog"],queryFn:()=>Ie.get("/changelog")})}const NQ=25;function vT({entry:i}){const{t:e}=oi();return b.jsxs("div",{className:"changelog-item",children:[b.jsxs("div",{className:"changelog-meta",children:[b.jsx("span",{className:"task-tag","data-hue":Ll(i.type),children:i.type}),i.scope&&b.jsx("span",{className:"changelog-scope",children:i.scope}),i.breaking&&b.jsx("span",{className:"changelog-breaking",children:e("sleep.changelog.breaking")})]}),b.jsx("p",{className:"changelog-summary",children:i.summary}),i.description&&b.jsx("p",{className:"changelog-desc",children:i.description})]})}function OQ(i){const e=[];for(const r of i){const n=e[e.length-1];n&&n.date===r.date?n.items.push(r):e.push({date:r.date,items:[r]})}return e}function jQ(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=GB(),{data:o}=LQ();if(r||!e)return b.jsx("div",{className:"loading",children:i("common.loading")});if(n)return b.jsxs("div",{className:"error-state",children:["Failed to load sleep state. ",a==null?void 0:a.message]});const c=WB(e.debt),h=YB(e.debt),u=e.last_sleep,f=(o==null?void 0:o.entries)??[],p=u?f.filter(C=>C.date>u):[],g=u?f.filter(C=>C.date<=u):f,x=g.slice(0,NQ),y=OQ(x),v=g.length-x.length;return b.jsxs("div",{className:"sleep-page",children:[b.jsx("h1",{className:"page-title",children:i("sleep.title")}),b.jsxs("div",{className:"sleep-overview",children:[b.jsxs("div",{className:`sleep-gauge sleep-gauge--${h}`,children:[b.jsx("span",{className:"sleep-gauge-number",children:e.debt}),b.jsx("span",{className:"sleep-gauge-label",children:c})]}),b.jsxs("div",{className:"sleep-details",children:[b.jsxs("div",{className:"sleep-detail",children:[b.jsx("span",{className:"sleep-detail-label",children:i("sleep.last_sleep")}),b.jsx("span",{className:"sleep-detail-value",children:e.last_sleep??"Never"})]}),e.last_sleep_summary&&b.jsxs("div",{className:"sleep-detail",children:[b.jsx("span",{className:"sleep-detail-label",children:"Summary"}),b.jsx("span",{className:"sleep-detail-value sleep-detail-value--summary",children:e.last_sleep_summary.slice(0,200)})]})]})]}),f.length>0&&b.jsxs("div",{className:"sleep-section",children:[b.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.changelog")," (",f.length,")"]}),p.length>0&&b.jsxs("div",{className:"changelog-group changelog-group--pending",children:[b.jsxs("h3",{className:"changelog-group-title",children:[i("sleep.changelog.pending")," (",p.length,")"]}),b.jsx("div",{className:"changelog-list",children:p.map((C,_)=>b.jsx(vT,{entry:C},`p-${_}`))})]}),y.map(C=>b.jsxs("div",{className:"changelog-group",children:[b.jsx("h3",{className:"changelog-group-title changelog-group-title--day",children:C.date}),b.jsx("div",{className:"changelog-list",children:C.items.map((_,w)=>b.jsx(vT,{entry:_},`${C.date}-${w}`))})]},C.date)),v>0&&b.jsxs("p",{className:"changelog-more",children:[v," ",i("sleep.changelog.earlier")]})]}),e.sessions.length>0&&b.jsxs("div",{className:"sleep-section",children:[b.jsxs("h2",{className:"sleep-section-title",children:[i("sleep.sessions")," (",e.sessions.length,")"]}),b.jsx("div",{className:"session-list",children:e.sessions.map((C,_)=>b.jsxs("div",{className:"session-item",children:[b.jsxs("div",{className:"session-header",children:[b.jsx("span",{className:"session-time",children:C.stopped_at??"Active"}),C.score!==null&&b.jsxs("span",{className:"session-score",children:["+",C.score]}),C.change_count!==null&&b.jsxs("span",{className:"session-changes",children:[C.change_count," changes"]}),C.tool_count!=null&&b.jsxs("span",{className:"session-changes",children:[C.tool_count," tools"]})]}),C.last_assistant_message&&b.jsxs("p",{className:"session-message",children:[C.last_assistant_message.slice(0,150),C.last_assistant_message.length>150?"...":""]})]},_))})]}),e.dashboard_changes.length>0&&b.jsxs("div",{className:"sleep-section",children:[b.jsxs("h2",{className:"sleep-section-title",children:["Dashboard Changes (",e.dashboard_changes.length,")"]}),b.jsx("div",{className:"session-list",children:e.dashboard_changes.map((C,_)=>b.jsxs("div",{className:"session-item",children:[b.jsxs("div",{className:"session-header",children:[b.jsx("span",{className:"session-time",children:C.timestamp}),b.jsxs("span",{className:"session-changes",children:[C.entity," / ",C.action]})]}),b.jsx("p",{className:"session-message",children:C.summary})]},_))})]})]})}const RQ=new Set(["text","int","integer","numeric","boolean","timestamp","jsonb","json","serial","bigint","smallint","real","double","float","date","time","uuid","bytea","blob","varchar","char","array"]);function ix(i){const e=i.replace(/\(.*\)/,"").replace(/\[.*\]/,"").toLowerCase();return RQ.has(e)}function DQ(i){const{entities:e,relations:r}=FQ(i),n=$Q(i),a=new Set(e.map(p=>p.name.toLowerCase())),o=[...e,...n.filter(p=>!a.has(p.name.toLowerCase()))],c=zQ(o),h=p=>`${p.from}.${p.fromField}->${p.to}.${p.toField}`,u=new Set(r.map(h)),f=[...r,...c.filter(p=>!u.has(h(p)))];return{entities:o,relations:f}}function FQ(i){const e=[],r=[],n=i.split(`
427
- `);let a=null,o=[],c,h=!1,u=null;function f(){a&&o.length>0&&e.push({name:a,path:c,fields:o,storageType:"table",notes:[]}),a=null,c=void 0,o=[],h=!1,u=null}for(let p=0;p<n.length;p++){const g=n[p],x=g.trim();if(/^\s*--\s*\d+\.\s+\w+/.test(g)){const Y=g.match(/\/\w+\/\{[^}]+\}/);Y&&(c=Y[0]);continue}const y=x.match(/^CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?[`"']?(\w+)[`"']?\s*\(/i);if(y){f(),a=y[1],o=[],h=!0;continue}if(!h||!a)continue;if(/^\s*\)\s*;/.test(g)){f();continue}if(/^\s*--/.test(g)){const $=g.replace(/^\s*--\s?/,"").trim();if(!$||/^[═─=\-*]{3,}/.test($))continue;if($.startsWith(".")){const J=$.match(/^\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(J&&ix(J[2])&&u){const W=J[1],F=J[2].toLowerCase(),j=(J[3]||"").match(/--\s*(.+)$/),I=j?j[1].trim():void 0;o.push({name:`${u}.${W}`,type:F,description:I,isNested:!0,parentField:u})}continue}const q=$.match(/^(\w+(?:\[\])?)\.(\w+(?:\.\w+)*)\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(q&&ix(q[3])){const J=q[1].replace(/\[\]$/,""),W=q[2],F=q[3].toLowerCase(),j=(q[4]||"").match(/--\s*(.+)$/),I=j?j[1].trim():void 0;u=J,o.push({name:`${J}.${W}`,type:F,description:I,isNested:!0,parentField:J});continue}continue}if(!x)continue;const C=x.replace(/--.*$/,"").trim().replace(/,\s*$/,"").trim();if(/^(PRIMARY|FOREIGN|UNIQUE|CHECK|CONSTRAINT|INDEX)\b/i.test(C))continue;const _=C.match(/^[`"']?(\w+)[`"']?\s+(\w+(?:(?:\([^)]*\))|(?:\[[\w,\s]*\]))?)\s*(.*)/i);if(!_)continue;const w=_[1],T=_[2],A=_[3]||"";if(!ix(T))continue;const E=T.toLowerCase(),N=/PRIMARY\s+KEY/i.test(A),R=A.match(/REFERENCES\s+[`"']?(\w+)[`"']?\s*\(\s*[`"']?(\w+)[`"']?\s*\)/i);R&&r.push({from:a,fromField:w,to:R[1],toField:R[2],cardinality:"1:1"});const M=g.match(/--\s*(.+)$/),O=M?M[1].trim():void 0;(E==="jsonb"||E==="json")&&(u=w),o.push({name:w,type:E,isPrimary:N,description:O})}return f(),{entities:e,relations:r}}function $Q(i){var o,c,h,u,f;const e=[];let r=null,n=!1;const a=i.split(`
428
- `);for(let p=0;p<a.length;p++){const x=a[p].match(/^--\s?(.*)/);if(!x)continue;const y=x[1].trim();if(/^={4,}$/.test(y)){r&&r.fields.length>0&&e.push(r),r=null,n=!1;continue}if(/^[A-Z ]+\(/.test(y)&&!y.match(/^[a-z_]/))continue;const v=y.match(/^([A-Z][A-Z _]+?):\s+(\S.+)$/);if(v&&!n){const C=v[1].trim();if(C===C.toUpperCase()&&C.length>1){r&&r.fields.length>0&&e.push(r);const _=v[2].trim();r={name:C,path:_,storageType:_.endsWith(".json")?"json":"file",notes:[],fields:[]},n=!1;continue}}if(r){const C=y.match(/^(?:Created|Managed)\s+by:\s+(.+)/i);if(C){r.managedBy=C[1].trim();continue}}if(y.includes("Fields in YAML frontmatter")||y.startsWith("Schema ")){n=!0;continue}if(y==="["||y==="{"){n=!0;continue}if(!(y==="]"||y==="}"||y==="..."||y==="},")){if(r&&n){const C=y.match(/^([a-z_]\w*):\s+(.+?)(?:\s{2,}--\s+(.+))?$/);if(C){const{type:w,enumValues:T}=CT(C[2].trim(),(o=C[3])==null?void 0:o.trim());r.fields.push({name:C[1],type:w,enumValues:T,description:(c=C[3])==null?void 0:c.trim(),isPrimary:C[1]==="id"});continue}const _=y.match(/^"([a-z_]\w*)":\s+(.+?)(?:,)?(?:\s{2,}--\s+(.+))?$/);if(_){const{type:w,enumValues:T}=CT(_[2].trim(),(h=_[3])==null?void 0:h.trim());r.fields.push({name:_[1],type:w,enumValues:T,description:(u=_[3])==null?void 0:u.trim()});continue}}if(r&&y.startsWith("Body ")&&(r.notes.push(y),y.includes("sections")&&p+1<a.length)){const C=(f=a[p+1])==null?void 0:f.match(/^--\s?(.*)/);C&&/^\s*(Why|[A-Z])/.test(C[1])&&(r.notes.push(C[1].trim()),p++)}}}return r&&r.fields.length>0&&e.push(r),e}function CT(i,e){return i.includes("|")?{type:"enum",enumValues:i.split("|").map(n=>n.trim().replace(/^"|"$/g,""))}:i==="[]"?{type:e!=null&&e.includes("string")?"string[]":"array"}:i.startsWith("[")?{type:"array"}:i==="true"||i==="false"?{type:"boolean"}:i==="null"?{type:"nullable"}:/^\d+$/.test(i)?{type:"number"}:/\d{4}-\d{2}-\d{2}/.test(i.replace(/"/g,""))?{type:"date"}:{type:"string"}}function zQ(i){const e=[];for(const r of i)for(const n of r.fields)if(!n.isNested){if(n.description){const a=n.description.match(/(task|feature|knowledge)\s+IDs?/i);if(a){const o=a[1].toLowerCase(),c=i.find(h=>h.name.toLowerCase().includes(o));if(c&&c.name!==r.name){const h=c.fields.find(u=>u.isPrimary);e.push({from:r.name,fromField:n.name,to:c.name,toField:h?h.name:"_id",cardinality:n.type.includes("array")||n.type==="array"?"1:N":"1:1"})}}}if(n.name==="parent_task"||n.name==="parent_id"){const a=r.fields.find(o=>o.isPrimary);e.push({from:r.name,fromField:n.name,to:r.name,toField:a?a.name:"_id",cardinality:"1:1"})}}return e}function zb(i){return i.toLowerCase().replace(/\s+/g,"-")}function kT(i){return i==="enum"?"enum":i==="array"||i.endsWith("[]")||i.startsWith("array")?"array":i==="boolean"?"boolean":i==="nullable"?"nullable":i==="date"||i==="timestamp"?"date":i==="int"||i==="integer"||i==="numeric"||i==="serial"||i==="bigint"||i==="smallint"||i==="real"||i==="float"||i==="double"?"number":i==="jsonb"||i==="json"?"json":"string"}function qQ(i,e,r){return i.isPrimary?{icon:"PK",cls:"entity-field-icon--key"}:e.some(a=>a.from===r&&a.fromField===i.name)?{icon:"FK",cls:"entity-field-icon--ref"}:null}function IQ(i,e,r,n){if(n){const C=i.right-r.left,_=i.top+i.height*.35-r.top,w=36,T=28;return{d:`M ${C},${_} C ${C+w},${_-T*.3} ${C+w},${_-T*1.3} ${C},${_-T}`,labelX:C+w+4,labelY:_-T*.5}}const a=i.left+i.width/2-r.left,o=e.left+e.width/2-r.left,c=i.top+i.height/2-r.top,h=e.top+e.height/2-r.top,u=Math.abs(a-o),f=Math.abs(c-h);let p,g,x,y;if(u>f){a<o?(p=i.right-r.left,x=e.left-r.left):(p=i.left-r.left,x=e.right-r.left),g=c,y=h;const C=(x-p)*.4;return{d:`M ${p},${g} C ${p+C},${g} ${x-C},${y} ${x},${y}`,labelX:(p+x)/2,labelY:(g+y)/2-10}}p=a,x=o,c<h?(g=i.bottom-r.top,y=e.top-r.top):(g=i.top-r.top,y=e.bottom-r.top);const v=(y-g)*.4;return{d:`M ${p},${g} C ${p},${g+v} ${x},${y-v} ${x},${y}`,labelX:(p+x)/2,labelY:(g+y)/2-10}}function PQ({entity:i,relations:e}){const[r,n]=tt.useState(new Set),a=i.storageType==="json"?"{ }":i.storageType==="table"?"SQL":"☰",o=i.fields.filter(u=>!u.isNested),c=tt.useMemo(()=>{const u=new Map;for(const f of i.fields)if(f.isNested&&f.parentField){const p=u.get(f.parentField)||[];p.push(f),u.set(f.parentField,p)}return u},[i.fields]),h=u=>{n(f=>{const p=new Set(f);return p.has(u)?p.delete(u):p.add(u),p})};return b.jsxs("div",{className:"entity-card","data-entity":zb(i.name),children:[b.jsxs("div",{className:"entity-card-header",children:[b.jsxs("div",{className:"entity-card-title-group",children:[b.jsx("span",{className:"entity-card-category-icon",children:a}),b.jsx("span",{className:"entity-card-name",children:i.name})]}),b.jsx("span",{className:"entity-card-badge","data-storage":i.storageType,children:i.storageType})]}),i.path&&b.jsx("div",{className:"entity-card-path",title:i.path,children:i.path}),i.managedBy&&b.jsx("div",{className:"entity-card-managed",children:i.managedBy}),b.jsx("div",{className:"entity-fields",children:o.map(u=>{const f=qQ(u,e,i.name),p=kT(u.type),g=c.get(u.name),x=r.has(u.name);return b.jsxs(tt.Fragment,{children:[b.jsxs("div",{className:`entity-field${g?" entity-field--expandable":""}`,onClick:g?()=>h(u.name):void 0,children:[b.jsx("span",{className:`entity-field-icon ${(f==null?void 0:f.cls)??""}`,children:(f==null?void 0:f.icon)??""}),b.jsx("span",{className:"entity-field-name",children:u.name}),u.type==="enum"&&u.enumValues?b.jsx("span",{className:"entity-field-enum-group",children:u.enumValues.map(y=>b.jsx("span",{className:"entity-field-enum-pill",children:y},y))}):b.jsx("span",{className:"entity-field-type","data-type":p,children:u.type}),g&&b.jsxs("span",{className:"entity-field-toggle",children:[b.jsx("span",{className:`entity-field-toggle-arrow${x?" entity-field-toggle-arrow--open":""}`,children:"▶"}),b.jsx("span",{className:"entity-field-toggle-count",children:g.length})]}),!g&&u.description&&b.jsx("span",{className:"entity-field-desc",title:u.description,children:u.description})]}),g&&x&&g.map(y=>{var _;const v=kT(y.type),C=y.name.slice((((_=y.parentField)==null?void 0:_.length)??0)+1);return b.jsxs("div",{className:"entity-field entity-field--nested",children:[b.jsx("span",{className:"entity-field-icon"}),b.jsxs("span",{className:"entity-field-name entity-field-name--nested",children:[".",C]}),b.jsx("span",{className:"entity-field-type","data-type":v,children:y.type}),y.description&&b.jsx("span",{className:"entity-field-desc",title:y.description,children:y.description})]},y.name)})]},u.name)})}),i.notes.length>0&&b.jsx("div",{className:"entity-card-notes",children:i.notes.map((u,f)=>b.jsx("div",{className:"entity-card-note",children:u},f))})]})}function HQ({relations:i,entities:e}){return i.length===0?null:b.jsxs("div",{className:"sql-preview-legend",children:[b.jsx("div",{className:"sql-preview-legend-title",children:"Relationships"}),b.jsx("div",{className:"sql-preview-legend-items",children:i.map((r,n)=>{var h,u;const a=((h=e.find(f=>f.name===r.from))==null?void 0:h.name)??r.from,o=((u=e.find(f=>f.name===r.to))==null?void 0:u.name)??r.to,c=r.from===r.to;return b.jsxs("div",{className:"sql-preview-legend-item",children:[b.jsx("span",{className:"sql-preview-legend-line"}),b.jsx("span",{children:c?`${a}.${r.fromField} ↻ self`:`${a}.${r.fromField} → ${o}.${r.toField}`}),b.jsx("span",{className:"sql-preview-legend-cardinality",children:r.cardinality})]},n)})})]})}function UQ({content:i}){const e=tt.useRef(null),[r,n]=tt.useState([]),[a,o]=tt.useState({width:0,height:0}),c=tt.useMemo(()=>DQ(i),[i]),h=tt.useCallback(()=>{const u=e.current;if(!u||c.relations.length===0){n([]);return}const f=u.getBoundingClientRect();o({width:u.scrollWidth,height:u.scrollHeight});const p=[];for(const g of c.relations){const x=u.querySelector(`[data-entity="${zb(g.from)}"]`),y=u.querySelector(`[data-entity="${zb(g.to)}"]`);if(!x||!y)continue;const v=x.getBoundingClientRect(),C=y.getBoundingClientRect(),{d:_,labelX:w,labelY:T}=IQ(v,C,f,g.from===g.to);p.push({d:_,labelX:w,labelY:T,label:g.cardinality})}n(p)},[c]);return tt.useEffect(()=>{const u=requestAnimationFrame(h),f=new ResizeObserver(h);return e.current&&f.observe(e.current),()=>{cancelAnimationFrame(u),f.disconnect()}},[h]),c.entities.length===0?b.jsx("div",{className:"sql-preview",children:b.jsx("div",{className:"sql-preview-empty",children:"No schema entities found in this file."})}):b.jsxs("div",{className:"sql-preview",ref:e,children:[b.jsxs("svg",{className:"sql-preview-svg",width:a.width||"100%",height:a.height||"100%",viewBox:a.width?`0 0 ${a.width} ${a.height}`:void 0,children:[b.jsx("defs",{children:b.jsx("marker",{id:"rel-arrowhead",viewBox:"0 0 10 7",refX:"9",refY:"3.5",markerWidth:"8",markerHeight:"6",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",className:"sql-preview-arrowhead"})})}),r.map((u,f)=>b.jsxs("g",{children:[b.jsx("path",{d:u.d,className:"sql-preview-line",markerEnd:"url(#rel-arrowhead)"}),b.jsx("rect",{className:"sql-preview-line-label-bg",x:u.labelX-12,y:u.labelY-7,width:24,height:14}),b.jsx("text",{className:"sql-preview-line-label",x:u.labelX,y:u.labelY+4,textAnchor:"middle",children:u.label})]},f))]}),b.jsx("div",{className:"sql-preview-grid",children:c.entities.map(u=>b.jsx(PQ,{entity:u,relations:c.relations},u.name))}),b.jsx(HQ,{relations:c.relations,entities:c.entities})]})}const WQ={feat:"type--feat",fix:"type--fix",refactor:"type--refactor",chore:"type--chore",docs:"type--docs",test:"type--test",perf:"type--perf"};function qb({type:i}){return b.jsx("span",{className:`json-type-badge ${WQ[i]??""}`,children:i})}function Ib(){return b.jsx("span",{className:"json-breaking-badge",children:"BREAKING"})}function YQ({data:i}){const[e,r]=tt.useState("all"),[n,a]=tt.useState(new Set),o=tt.useMemo(()=>{const u=e==="all"?i:i.filter(p=>p.type===e),f=new Map;for(let p=0;p<u.length;p++){const g=u[p],x=f.get(g.date)||[];x.push({entry:g,index:p}),f.set(g.date,x)}return f},[i,e]),c=u=>{a(f=>{const p=new Set(f);return p.has(u)?p.delete(u):p.add(u),p})},h=tt.useMemo(()=>{const u={};for(const f of i)u[f.type]=(u[f.type]||0)+1;return u},[i]);return b.jsxs("div",{className:"json-preview",children:[b.jsx("div",{className:"json-preview-header",children:b.jsxs("div",{className:"json-preview-stats",children:[b.jsxs("span",{className:"json-preview-total",children:[i.length," entries"]}),Object.entries(h).sort((u,f)=>f[1]-u[1]).map(([u,f])=>b.jsxs("button",{className:`json-stat-chip ${e===u?"json-stat-chip--active":""}`,onClick:()=>r(p=>p===u?"all":u),children:[b.jsx(qb,{type:u})," ",f]},u))]})}),b.jsx("div",{className:"json-timeline",children:Array.from(o.entries()).map(([u,f])=>b.jsxs("div",{className:"json-date-group",children:[b.jsxs("div",{className:"json-date-marker",children:[b.jsx("span",{className:"json-date-dot"}),b.jsx("span",{className:"json-date-label",children:u}),b.jsx("span",{className:"json-date-count",children:f.length})]}),b.jsx("div",{className:"json-date-entries",children:f.map(({entry:p,index:g})=>{const x=n.has(g),y=p.scope.length>50?p.scope.slice(0,47)+"...":p.scope;return b.jsxs("div",{className:`json-entry ${x?"json-entry--expanded":""}`,onClick:()=>c(g),children:[b.jsxs("div",{className:"json-entry-header",children:[b.jsx(qb,{type:p.type}),p.breaking&&b.jsx(Ib,{}),b.jsx("span",{className:"json-entry-scope",title:p.scope,children:y})]}),b.jsx("div",{className:`json-entry-desc ${x?"":"json-entry-desc--clamped"}`,children:p.description})]},g)})})]},u))})]})}function GQ({data:i}){const[e,r]=tt.useState(new Set([0])),n=a=>{r(o=>{const c=new Set(o);return c.has(a)?c.delete(a):c.add(a),c})};return b.jsxs("div",{className:"json-preview",children:[b.jsx("div",{className:"json-preview-header",children:b.jsxs("span",{className:"json-preview-total",children:[i.length," release",i.length!==1?"s":""]})}),b.jsx("div",{className:"json-releases",children:i.map((a,o)=>{var h,u,f,p;const c=e.has(o);return b.jsxs("div",{className:`json-release ${c?"json-release--expanded":""}`,children:[b.jsxs("div",{className:"json-release-header",onClick:()=>n(o),children:[b.jsx("span",{className:"json-release-version",children:a.version}),b.jsx("span",{className:"json-release-date",children:a.date}),a.breaking&&b.jsx(Ib,{}),b.jsxs("span",{className:"json-release-meta",children:[(h=a.features)!=null&&h.length?`${a.features.length} features`:"",(u=a.features)!=null&&u.length&&((f=a.tasks)!=null&&f.length)?" / ":"",(p=a.tasks)!=null&&p.length?`${a.tasks.length} task${a.tasks.length!==1?"s":""}`:""]}),b.jsx("span",{className:`json-release-chevron ${c?"json-release-chevron--open":""}`,children:"▶"})]}),c&&b.jsxs("div",{className:"json-release-body",children:[b.jsx("div",{className:"json-release-summary",children:a.summary}),a.features&&a.features.length>0&&b.jsxs("div",{className:"json-release-section",children:[b.jsx("div",{className:"json-release-section-title",children:"Features"}),b.jsx("div",{className:"json-release-ids",children:a.features.map(g=>b.jsx("span",{className:"json-id-chip json-id-chip--feature",children:g},g))})]}),a.tasks&&a.tasks.length>0&&b.jsxs("div",{className:"json-release-section",children:[b.jsx("div",{className:"json-release-section-title",children:"Tasks"}),b.jsx("div",{className:"json-release-ids",children:a.tasks.map(g=>b.jsx("span",{className:"json-id-chip json-id-chip--task",children:g},g))})]}),a.changelog&&a.changelog.length>0&&b.jsxs("div",{className:"json-release-section",children:[b.jsxs("div",{className:"json-release-section-title",children:["Changelog (",a.changelog.length,")"]}),b.jsx("div",{className:"json-release-changelog",children:a.changelog.map((g,x)=>b.jsxs("div",{className:"json-release-cl-entry",children:[b.jsx(qb,{type:g.type}),g.breaking&&b.jsx(Ib,{}),b.jsx("span",{className:"json-release-cl-scope",children:g.scope}),b.jsx("span",{className:"json-release-cl-desc",children:g.description})]},x))})]})]})]},a.version)})})]})}function VQ({data:i,filename:e}){var a,o,c;if(!Array.isArray(i)||i.length===0)return b.jsx("div",{className:"json-preview",children:b.jsx("div",{className:"json-preview-empty",children:"No data found in this file."})});const r=e.toLowerCase().includes("changelog"),n=e.toLowerCase().includes("release");return r&&((a=i[0])!=null&&a.type)&&((o=i[0])!=null&&o.description)?b.jsx(YQ,{data:i}):n&&((c=i[0])!=null&&c.version)?b.jsx(GQ,{data:i}):b.jsxs("div",{className:"json-preview",children:[b.jsx("div",{className:"json-preview-header",children:b.jsxs("span",{className:"json-preview-total",children:[i.length," items"]})}),b.jsx("div",{className:"json-generic-list",children:i.map((h,u)=>b.jsx("pre",{className:"json-generic-item",children:JSON.stringify(h,null,2)},u))})]})}function XQ(i){return i.endsWith(".sql")||i.endsWith(".json")||i.endsWith(".md")}function QQ(){const{t:i}=oi(),e=Zr(),[r,n]=tt.useState(null),[a,o]=tt.useState(null),[c,h]=tt.useState(!1),[u,f]=tt.useState("preview"),{data:p,isLoading:g,isError:x,error:y}=zi({queryKey:["core"],queryFn:()=>Ie.get("/core")}),{data:v}=zi({queryKey:["core",r],queryFn:()=>Ie.get(`/core/${r}`),enabled:!!r}),C=_a({mutationFn:({filename:E,content:N})=>Ie.put(`/core/${E}`,{content:N}),onSuccess:()=>{e.invalidateQueries({queryKey:["core"]}),h(!1)}}),_=()=>{(v==null?void 0:v.content)!==void 0&&(o(v.content),h(!0))},w=()=>{r&&a!==null&&C.mutate({filename:r,content:a})};if(g)return b.jsx("div",{className:"loading",children:i("common.loading")});if(x)return b.jsxs("div",{className:"error-state",children:["Failed to load core files. ",y==null?void 0:y.message]});const T=(p==null?void 0:p.files)??[],A=()=>{if(!r||!v)return null;if(u==="preview"){if(r.endsWith(".sql")&&v.content)return b.jsx(UQ,{content:v.content});if(r.endsWith(".json")&&v.data)return b.jsx(VQ,{data:v.data,filename:r});if(r.endsWith(".md")&&v.content)return b.jsx(Rf,{content:v.content,frontmatter:v.frontmatter})}return b.jsx("pre",{className:"core-viewer-content",children:v.content??JSON.stringify(v.data,null,2)})};return b.jsxs("div",{className:"core-page",children:[b.jsx("h1",{className:"page-title",children:i("core.title")}),b.jsxs("div",{className:"core-layout",children:[b.jsx("div",{className:"core-list",children:T.map((E,N)=>b.jsxs("button",{className:`core-list-item ${r===E.filename?"core-list-item--active":""} animate-stagger animate-stagger-${Math.min(N+1,8)}`,onClick:()=>{n(E.filename),h(!1),f("preview")},children:[b.jsx("span",{className:"core-list-name",children:E.name}),b.jsx("span",{className:"core-list-type",children:E.type})]},E.filename))}),b.jsxs("div",{className:"core-detail",children:[!r&&b.jsx("div",{className:"core-empty",children:"Select a file to view."}),r&&v&&!c&&b.jsxs("div",{className:"core-viewer",children:[b.jsxs("div",{className:"core-viewer-header",children:[b.jsx("h2",{className:"core-viewer-title",children:v.filename}),b.jsxs("div",{className:"core-viewer-actions",children:[XQ(r)&&b.jsxs("div",{className:"core-tabs",children:[b.jsx("button",{className:`core-tab ${u==="file"?"core-tab--active":""}`,onClick:()=>f("file"),children:"File"}),b.jsx("button",{className:`core-tab ${u==="preview"?"core-tab--active":""}`,onClick:()=>f("preview"),children:"Preview"})]}),v.type==="markdown"&&b.jsx("button",{className:"btn btn--ghost",onClick:_,children:"Edit"})]})]}),A()]}),r&&c&&b.jsxs("div",{className:"core-editor",children:[b.jsxs("div",{className:"core-editor-header",children:[b.jsxs("h2",{className:"core-viewer-title",children:["Editing: ",r]}),b.jsxs("div",{className:"core-editor-actions",children:[b.jsx("button",{className:"btn btn--ghost",onClick:()=>h(!1),children:"Cancel"}),b.jsx("button",{className:"btn btn--primary",onClick:w,disabled:C.isPending,children:C.isPending?"Saving...":"Save"})]})]}),b.jsxs("div",{className:"core-editor-split",children:[b.jsx("textarea",{className:"core-editor-textarea",value:a??"",onChange:E=>o(E.target.value)}),b.jsx("pre",{className:"core-editor-preview",children:a})]})]})]})]})]})}function ZQ(){return zi({queryKey:["knowledge"],queryFn:()=>Ie.get("/knowledge"),select:i=>i.entries})}function KQ(i){return zi({queryKey:["knowledge",i],queryFn:()=>Ie.get(`/knowledge/${i}`),select:e=>e.entry,enabled:!!i})}function JQ(){const i=Zr();return _a({mutationFn:({slug:e,pinned:r})=>Ie.patch(`/knowledge/${e}`,{pinned:r}),onSuccess:()=>{i.invalidateQueries({queryKey:["knowledge"]})}})}function tZ(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=ZQ(),o=JQ(),[c,h]=tt.useState(""),[u,f]=tt.useState(null),[p,g]=tt.useState("preview"),{data:x}=KQ(u??""),y=tt.useMemo(()=>{if(!e)return[];if(!c.trim())return e;const v=c.toLowerCase();return e.filter(C=>C.name.toLowerCase().includes(v)||C.description.toLowerCase().includes(v)||C.tags.some(_=>_.toLowerCase().includes(v)))},[e,c]);return r?b.jsx("div",{className:"loading",children:i("common.loading")}):n?b.jsxs("div",{className:"error-state",children:["Failed to load knowledge. ",a==null?void 0:a.message]}):b.jsxs("div",{className:"knowledge-page",children:[b.jsx("h1",{className:"page-title",children:i("knowledge.title")}),b.jsx("input",{className:"knowledge-search",placeholder:i("knowledge.search"),value:c,onChange:v=>h(v.target.value)}),b.jsxs("div",{className:"knowledge-layout",children:[b.jsxs("div",{className:"knowledge-list",children:[y.length===0&&b.jsx("div",{className:"core-empty",children:i("common.empty")}),y.map(v=>b.jsxs("button",{className:`knowledge-card ${u===v.slug?"knowledge-card--active":""}`,onClick:()=>{f(v.slug),g("preview")},children:[b.jsxs("div",{className:"knowledge-card-header",children:[b.jsx("span",{className:"knowledge-card-name",children:v.name}),b.jsx("button",{className:`pin-btn ${v.pinned?"pin-btn--active":""}`,onClick:C=>{C.stopPropagation(),o.mutate({slug:v.slug,pinned:!v.pinned})},title:v.pinned?i("knowledge.unpin"):i("knowledge.pin"),children:v.pinned?"◆":"◇"})]}),v.description&&b.jsx("p",{className:"knowledge-card-desc",children:v.description}),b.jsx("div",{className:"knowledge-card-tags",children:v.tags.map(C=>b.jsx("span",{className:"task-tag","data-hue":Ll(C),children:C},C))})]},v.slug))]}),b.jsxs("div",{className:"knowledge-detail",children:[!u&&b.jsx("div",{className:"core-empty",children:"Select a knowledge file to view."}),u&&x&&b.jsxs("div",{className:"core-viewer",children:[b.jsxs("div",{className:"core-viewer-header",children:[b.jsx("h2",{className:"core-viewer-title",children:x.name}),b.jsx("div",{className:"core-viewer-actions",children:b.jsxs("div",{className:"core-tabs",children:[b.jsx("button",{className:`core-tab ${p==="file"?"core-tab--active":""}`,onClick:()=>g("file"),children:"File"}),b.jsx("button",{className:`core-tab ${p==="preview"?"core-tab--active":""}`,onClick:()=>g("preview"),children:"Preview"})]})})]}),p==="preview"&&x.content?b.jsx(Rf,{content:x.content}):b.jsx("pre",{className:"core-viewer-content",children:x.content})]})]})]})]})}function eZ(){const{t:i}=oi(),[e,r]=tt.useState(null),[n,a]=tt.useState("preview"),{data:o,isLoading:c,isError:h,error:u}=zi({queryKey:["features"],queryFn:()=>Ie.get("/features")}),{data:f}=zi({queryKey:["features",e],queryFn:()=>Ie.get(`/features/${e}`),enabled:!!e,select:g=>g.feature});if(c)return b.jsx("div",{className:"loading",children:i("common.loading")});if(h)return b.jsxs("div",{className:"error-state",children:["Failed to load features. ",u==null?void 0:u.message]});const p=(o==null?void 0:o.features)??[];return b.jsxs("div",{className:"features-page",children:[b.jsx("h1",{className:"page-title",children:i("features.title")}),b.jsxs("div",{className:"features-layout",children:[b.jsxs("div",{className:"features-list",children:[p.length===0&&b.jsx("div",{className:"core-empty",children:i("common.empty")}),p.map((g,x)=>b.jsxs("button",{className:`feature-card ${e===g.slug?"feature-card--active":""} animate-stagger animate-stagger-${Math.min(x+1,8)}`,onClick:()=>{r(g.slug),a("preview")},children:[b.jsxs("div",{className:"feature-card-header",children:[b.jsx("span",{className:"feature-card-name",children:g.slug}),b.jsx("span",{className:`feature-status feature-status--${g.status}`,children:g.status})]}),b.jsx("div",{className:"knowledge-card-tags",children:g.tags.map(y=>b.jsx("span",{className:"task-tag","data-hue":Ll(y),children:y},y))})]},g.slug))]}),b.jsxs("div",{className:"features-detail",children:[!e&&b.jsx("div",{className:"core-empty",children:"Select a feature to view."}),e&&f&&b.jsxs("div",{className:"core-viewer",children:[b.jsxs("div",{className:"core-viewer-header",children:[b.jsx("h2",{className:"core-viewer-title",children:f.slug}),b.jsx("div",{className:"core-viewer-actions",children:b.jsxs("div",{className:"core-tabs",children:[b.jsx("button",{className:`core-tab ${n==="file"?"core-tab--active":""}`,onClick:()=>a("file"),children:"File"}),b.jsx("button",{className:`core-tab ${n==="preview"?"core-tab--active":""}`,onClick:()=>a("preview"),children:"Preview"})]})})]}),b.jsxs("div",{className:"feature-meta",children:[b.jsxs("span",{children:["Status: ",f.status]}),b.jsxs("span",{children:["Created: ",f.created]}),b.jsxs("span",{children:["Updated: ",f.updated]})]}),f.related_tasks.length>0&&b.jsxs("div",{className:"feature-tasks",children:["Related tasks: ",f.related_tasks.join(", ")]}),n==="preview"&&f.content?b.jsx(Rf,{content:f.content}):b.jsx("div",{className:"feature-viewer",children:f.sections.map(g=>b.jsxs("div",{className:"feature-section",children:[b.jsx("h3",{className:"feature-section-title",children:g}),b.jsx("pre",{className:"feature-section-content",children:f.sectionContents[g]||"(empty)"})]},g))})]})]})]})]})}function iZ(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function rZ(i,e,r){return e=uZ(e),e in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function _T(i,e){return sZ(i)||iZ(i,e)||VN(i,e)||cZ()}function nZ(i){return aZ(i)||oZ(i)||VN(i)||lZ()}function aZ(i){if(Array.isArray(i))return Pb(i)}function sZ(i){if(Array.isArray(i))return i}function oZ(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function VN(i,e){if(i){if(typeof i=="string")return Pb(i,e);var r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pb(i,e)}}function Pb(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=i[r];return n}function lZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
429
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
430
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hZ(i,e){if(typeof i!="object"||i===null)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function uZ(i){var e=hZ(i,"string");return typeof e=="symbol"?e:String(e)}var fZ=function(e,r){var n=new Set(r);return Object.assign.apply(Object,[{}].concat(nZ(Object.entries(e).filter(function(a){var o=_T(a,1),c=o[0];return!n.has(c)}).map(function(a){var o=_T(a,2),c=o[0],h=o[1];return rZ({},c,h)}))))};function Hb(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function dZ(i){if(Array.isArray(i))return i}function pZ(i){if(Array.isArray(i))return Hb(i)}function gZ(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function mZ(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function yZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
431
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
432
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bZ(i,e){return dZ(i)||mZ(i,e)||XN(i,e)||yZ()}function ST(i){return pZ(i)||gZ(i)||XN(i)||xZ()}function XN(i,e){if(i){if(typeof i=="string")return Hb(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hb(i,e):void 0}}function vZ(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.wrapperElementType,n=r===void 0?"div":r,a=e.nodeMapper,o=a===void 0?function(p){return p}:a,c=e.methodNames,h=c===void 0?[]:c,u=e.initPropNames,f=u===void 0?[]:u;return tt.forwardRef(function(p,g){var x=tt.useRef(),y=tt.useMemo(function(){var _=Object.fromEntries(f.filter(function(w){return p.hasOwnProperty(w)}).map(function(w){return[w,p[w]]}));return i(_)},[]);wT(function(){y(o(x.current))},tt.useLayoutEffect),wT(function(){return y._destructor instanceof Function?y._destructor:void 0});var v=tt.useCallback(function(_){for(var w=arguments.length,T=new Array(w>1?w-1:0),A=1;A<w;A++)T[A-1]=arguments[A];return y[_]instanceof Function?y[_].apply(y,T):void 0},[y]),C=tt.useRef({});return Object.keys(fZ(p,[].concat(ST(h),ST(f)))).filter(function(_){return C.current[_]!==p[_]}).forEach(function(_){return v(_,p[_])}),C.current=p,tt.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(_){return[_,function(){for(var w=arguments.length,T=new Array(w),A=0;A<w;A++)T[A]=arguments[A];return v.apply(void 0,[_].concat(T))}]}))},[v]),I4.createElement(n,{ref:x})})}function wT(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.useEffect,r=tt.useRef(),n=tt.useRef(!1),a=tt.useRef(!1),o=tt.useState(0),c=bZ(o,2);c[0];var h=c[1];n.current&&(a.current=!0),e(function(){return n.current||(r.current=i(),n.current=!0),h(function(u){return u+1}),function(){a.current&&r.current&&r.current()}},[])}var CZ="[object Symbol]";function kZ(i){return typeof i=="symbol"||hh(i)&&Bl(i)==CZ}var _Z=/\s/;function SZ(i){for(var e=i.length;e--&&_Z.test(i.charAt(e)););return e}var wZ=/^\s+/;function TZ(i){return i&&i.slice(0,SZ(i)+1).replace(wZ,"")}var TT=NaN,BZ=/^[-+]0x[0-9a-f]+$/i,AZ=/^0b[01]+$/i,EZ=/^0o[0-7]+$/i,MZ=parseInt;function BT(i){if(typeof i=="number")return i;if(kZ(i))return TT;if(qn(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=qn(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=TZ(i);var r=AZ.test(i);return r||EZ.test(i)?MZ(i.slice(2),r?2:8):BZ.test(i)?TT:+i}var rx=function(){return Hn.Date.now()},LZ="Expected a function",NZ=Math.max,OZ=Math.min;function QN(i,e,r){var n,a,o,c,h,u,f=0,p=!1,g=!1,x=!0;if(typeof i!="function")throw new TypeError(LZ);e=BT(e)||0,qn(r)&&(p=!!r.leading,g="maxWait"in r,o=g?NZ(BT(r.maxWait)||0,e):o,x="trailing"in r?!!r.trailing:x);function y(R){var M=n,O=a;return n=a=void 0,f=R,c=i.apply(O,M),c}function v(R){return f=R,h=setTimeout(w,e),p?y(R):c}function C(R){var M=R-u,O=R-f,Y=e-M;return g?OZ(Y,o-O):Y}function _(R){var M=R-u,O=R-f;return u===void 0||M>=e||M<0||g&&O>=o}function w(){var R=rx();if(_(R))return T(R);h=setTimeout(w,C(R))}function T(R){return h=void 0,x&&n?y(R):(n=a=void 0,c)}function A(){h!==void 0&&clearTimeout(h),f=0,n=u=a=h=void 0}function E(){return h===void 0?c:T(rx())}function N(){var R=rx(),M=_(R);if(n=arguments,a=this,u=R,M){if(h===void 0)return v(u);if(g)return clearTimeout(h),h=setTimeout(w,e),y(u)}return h===void 0&&(h=setTimeout(w,e)),c}return N.cancel=A,N.flush=E,N}var jZ="Expected a function";function RZ(i,e,r){var n=!0,a=!0;if(typeof i!="function")throw new TypeError(jZ);return qn(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),QN(i,e,{leading:n,maxWait:e,trailing:a})}var fl=Object.freeze({Linear:Object.freeze({None:function(i){return i},In:function(i){return i},Out:function(i){return i},InOut:function(i){return i}}),Quadratic:Object.freeze({In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}}),Cubic:Object.freeze({In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}}),Quartic:Object.freeze({In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}}),Quintic:Object.freeze({In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}}),Sinusoidal:Object.freeze({In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}}),Exponential:Object.freeze({In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}}),Circular:Object.freeze({In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}}),Elastic:Object.freeze({In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(i){var e=1.70158;return i===1?1:i*i*((e+1)*i-e)},Out:function(i){var e=1.70158;return i===0?0:--i*i*((e+1)*i+e)+1},InOut:function(i){var e=2.5949095;return(i*=2)<1?.5*(i*i*((e+1)*i-e)):.5*((i-=2)*i*((e+1)*i+e)+2)}}),Bounce:Object.freeze({In:function(i){return 1-fl.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?fl.Bounce.In(i*2)*.5:fl.Bounce.Out(i*2-1)*.5+.5}}),generatePow:function(i){return i===void 0&&(i=4),i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(e){return Math.pow(e,i)},Out:function(e){return 1-Math.pow(1-e,i)},InOut:function(e){return e<.5?Math.pow(e*2,i)/2:(1-Math.pow(2-e*2,i))/2+.5}}}}),qu=function(){return performance.now()},ZN=(function(){function i(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return i.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(r){return e._tweens[r]})},i.prototype.removeAll=function(){this._tweens={}},i.prototype.add=function(){for(var e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var c=o[a];(e=c._group)===null||e===void 0||e.remove(c),c._group=this,this._tweens[c.getId()]=c,this._tweensAddedDuringUpdate[c.getId()]=c}},i.prototype.remove=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var n=0,a=e;n<a.length;n++){var o=a[n];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},i.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},i.prototype.update=function(e,r){e===void 0&&(e=qu()),r===void 0&&(r=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var o=this._tweens[n[a]],c=!r;o&&o.update(e,c)===!1&&!r&&this.remove(o)}n=Object.keys(this._tweensAddedDuringUpdate)}},i})(),Ub={Linear:function(i,e){var r=i.length-1,n=r*e,a=Math.floor(n),o=Ub.Utils.Linear;return e<0?o(i[0],i[1],n):e>1?o(i[r],i[r-1],r-n):o(i[a],i[a+1>r?r:a+1],n-a)},Utils:{Linear:function(i,e,r){return(e-i)*r+i}}},KN=(function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i})(),Wb=new ZN,AT=(function(){function i(e,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=fl.Linear.None,this._interpolationFunction=Ub.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=KN.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=Wb,Wb.add(this))}return i.prototype.getId=function(){return this._id},i.prototype.isPlaying=function(){return this._isPlaying},i.prototype.isPaused=function(){return this._isPaused},i.prototype.getDuration=function(){return this._duration},i.prototype.to=function(e,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},i.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},i.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},i.prototype.start=function(e,r){if(e===void 0&&(e=qu()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},i.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},i.prototype._setupProperties=function(e,r,n,a,o){for(var c in n){var h=e[c],u=Array.isArray(h),f=u?"array":typeof h,p=!u&&Array.isArray(n[c]);if(!(f==="undefined"||f==="function")){if(p){var g=n[c];if(g.length===0)continue;for(var x=[h],y=0,v=g.length;y<v;y+=1){var C=this._handleRelativeValue(h,g[y]);if(isNaN(C)){p=!1,console.warn("Found invalid interpolation list. Skipping.");break}x.push(C)}p&&(n[c]=x)}if((f==="object"||u)&&h&&!p){r[c]=u?[]:{};var _=h;for(var w in _)r[c][w]=_[w];a[c]=u?[]:{};var g=n[c];if(!this._isDynamic){var T={};for(var w in g)T[w]=g[w];n[c]=g=T}this._setupProperties(_,r[c],g,a[c],o)}else(typeof r[c]>"u"||o)&&(r[c]=h),u||(r[c]*=1),p?a[c]=n[c].slice().reverse():a[c]=r[c]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},i.prototype.pause=function(e){return e===void 0&&(e=qu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},i.prototype.resume=function(e){return e===void 0&&(e=qu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},i.prototype.stopChainedTweens=function(){for(var e=0,r=this._chainedTweens.length;e<r;e++)this._chainedTweens[e].stop();return this},i.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},i.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},i.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},i.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},i.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},i.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},i.prototype.easing=function(e){return e===void 0&&(e=fl.Linear.None),this._easingFunction=e,this},i.prototype.interpolation=function(e){return e===void 0&&(e=Ub.Linear),this._interpolationFunction=e,this},i.prototype.chain=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this._chainedTweens=e,this},i.prototype.onStart=function(e){return this._onStartCallback=e,this},i.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},i.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},i.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},i.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},i.prototype.onStop=function(e){return this._onStopCallback=e,this},i.prototype.update=function(e,r){var n=this,a;if(e===void 0&&(e=qu()),r===void 0&&(r=i.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var c=e-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),u=this._duration+this._repeat*h,f=function(){if(n._duration===0||c>u)return 1;var C=Math.trunc(c/h),_=c-C*h,w=Math.min(_/n._duration,1);return w===0&&c===n._duration?1:w},p=f(),g=this._easingFunction(p);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,p),this._duration===0||c>=this._duration)if(this._repeat>0){var x=Math.min(Math.trunc((c-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=x);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*x,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,v=this._chainedTweens.length;y<v;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},i.prototype._updateProperties=function(e,r,n,a){for(var o in n)if(r[o]!==void 0){var c=r[o]||0,h=n[o],u=Array.isArray(e[o]),f=Array.isArray(h),p=!u&&f;p?e[o]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(e[o],c,h,a):(h=this._handleRelativeValue(c,h),typeof h=="number"&&(e[o]=c+(h-c)*a))}},i.prototype._handleRelativeValue=function(e,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?e+parseFloat(r):parseFloat(r)},i.prototype._swapEndStartRepeatValues=function(e){var r=this._valuesStartRepeat[e],n=this._valuesEnd[e];typeof n=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(n):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=r},i.autoStartOnUpdate=!1,i})();KN.nextId;var ka=Wb;ka.getAll.bind(ka);ka.removeAll.bind(ka);ka.add.bind(ka);ka.remove.bind(ka);ka.update.bind(ka);function ET(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function DZ(i){if(Array.isArray(i))return i}function FZ(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function $Z(i,e,r){return Object.defineProperty(i,"prototype",{writable:!1}),i}function zZ(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function qZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
433
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IZ(i,e){return DZ(i)||zZ(i,e)||PZ(i,e)||qZ()}function PZ(i,e){if(i){if(typeof i=="string")return ET(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ET(i,e):void 0}}var HZ=$Z(function i(e,r){var n=r.default,a=n===void 0?null:n,o=r.triggerUpdate,c=o===void 0?!0:o,h=r.onChange,u=h===void 0?function(f,p){}:h;FZ(this,i),this.name=e,this.defaultVal=a,this.triggerUpdate=c,this.onChange=u});function w1(i){var e=i.stateInit,r=e===void 0?function(){return{}}:e,n=i.props,a=n===void 0?{}:n,o=i.methods,c=o===void 0?{}:o,h=i.aliases,u=h===void 0?{}:h,f=i.init,p=f===void 0?function(){}:f,g=i.update,x=g===void 0?function(){}:g,y=Object.keys(a).map(function(v){return new HZ(v,a[v])});return function v(){for(var C=arguments.length,_=new Array(C),w=0;w<C;w++)_[w]=arguments[w];var T=!!(this instanceof v&&this.constructor),A=T?_.shift():void 0,E=_[0],N=E===void 0?{}:E,R=Object.assign({},r instanceof Function?r(N):r,{initialised:!1}),M={};function O(q){return Y(q,N),$(),O}var Y=function(J,W){p.call(O,J,R,W),R.initialised=!0},$=QN(function(){R.initialised&&(x.call(O,R,M),M={})},1);return y.forEach(function(q){O[q.name]=J(q);function J(W){var F=W.name,U=W.triggerUpdate,j=U===void 0?!1:U,I=W.onChange,H=I===void 0?function(P,K){}:I,V=W.defaultVal,Z=V===void 0?null:V;return function(P){var K=R[F];if(!arguments.length)return K;var ot=P===void 0?Z:P;return R[F]=ot,H.call(O,ot,R,K),!M.hasOwnProperty(F)&&(M[F]=K),j&&$(),O}}}),Object.keys(c).forEach(function(q){O[q]=function(){for(var J,W=arguments.length,F=new Array(W),U=0;U<W;U++)F[U]=arguments[U];return(J=c[q]).call.apply(J,[O,R].concat(F))}}),Object.entries(u).forEach(function(q){var J=IZ(q,2),W=J[0],F=J[1];return O[W]=O[F]}),O.resetProps=function(){return y.forEach(function(q){O[q.name](q.defaultVal)}),O},O.resetProps(),R._rerender=$,T&&A&&O(A),O}}var Ne=(function(i){return typeof i=="function"?i:typeof i=="string"?function(e){return e[i]}:function(e){return i}});function Ag(i){"@babel/helpers - typeof";return Ag=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ag(i)}var UZ=/^\s+/,WZ=/\s+$/;function Pt(i,e){if(i=i||"",e=e||{},i instanceof Pt)return i;if(!(this instanceof Pt))return new Pt(i,e);var r=YZ(i);this._originalInput=i,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}Pt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),r,n,a,o,c,h;return r=e.r/255,n=e.g/255,a=e.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?c=n/12.92:c=Math.pow((n+.055)/1.055,2.4),a<=.03928?h=a/12.92:h=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*c+.0722*h},setAlpha:function(e){return this._a=JN(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=LT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=LT(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=MT(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=MT(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),a=Math.round(e.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return NT(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return QZ(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ii(this._r,255)*100)+"%",g:Math.round(ii(this._g,255)*100)+"%",b:Math.round(ii(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ii(this._r,255)*100)+"%, "+Math.round(ii(this._g,255)*100)+"%, "+Math.round(ii(this._b,255)*100)+"%)":"rgba("+Math.round(ii(this._r,255)*100)+"%, "+Math.round(ii(this._g,255)*100)+"%, "+Math.round(ii(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:lK[NT(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+OT(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var o=Pt(e);n="#"+OT(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var n=!1,a=this._a<1&&this._a>=0,o=!r&&a&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Pt(this.toString())},_applyModification:function(e,r){var n=e.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(tK,arguments)},brighten:function(){return this._applyModification(eK,arguments)},darken:function(){return this._applyModification(iK,arguments)},desaturate:function(){return this._applyModification(ZZ,arguments)},saturate:function(){return this._applyModification(KZ,arguments)},greyscale:function(){return this._applyModification(JZ,arguments)},spin:function(){return this._applyModification(rK,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(sK,arguments)},complement:function(){return this._applyCombination(nK,arguments)},monochromatic:function(){return this._applyCombination(oK,arguments)},splitcomplement:function(){return this._applyCombination(aK,arguments)},triad:function(){return this._applyCombination(jT,[3])},tetrad:function(){return this._applyCombination(jT,[4])}};Pt.fromRatio=function(i,e){if(Ag(i)=="object"){var r={};for(var n in i)i.hasOwnProperty(n)&&(n==="a"?r[n]=i[n]:r[n]=Iu(i[n]));i=r}return Pt(i,e)};function YZ(i){var e={r:0,g:0,b:0},r=1,n=null,a=null,o=null,c=!1,h=!1;return typeof i=="string"&&(i=fK(i)),Ag(i)=="object"&&(Va(i.r)&&Va(i.g)&&Va(i.b)?(e=GZ(i.r,i.g,i.b),c=!0,h=String(i.r).substr(-1)==="%"?"prgb":"rgb"):Va(i.h)&&Va(i.s)&&Va(i.v)?(n=Iu(i.s),a=Iu(i.v),e=XZ(i.h,n,a),c=!0,h="hsv"):Va(i.h)&&Va(i.s)&&Va(i.l)&&(n=Iu(i.s),o=Iu(i.l),e=VZ(i.h,n,o),c=!0,h="hsl"),i.hasOwnProperty("a")&&(r=i.a)),r=JN(r),{ok:c,format:i.format||h,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function GZ(i,e,r){return{r:ii(i,255)*255,g:ii(e,255)*255,b:ii(r,255)*255}}function MT(i,e,r){i=ii(i,255),e=ii(e,255),r=ii(r,255);var n=Math.max(i,e,r),a=Math.min(i,e,r),o,c,h=(n+a)/2;if(n==a)o=c=0;else{var u=n-a;switch(c=h>.5?u/(2-n-a):u/(n+a),n){case i:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-i)/u+2;break;case r:o=(i-e)/u+4;break}o/=6}return{h:o,s:c,l:h}}function VZ(i,e,r){var n,a,o;i=ii(i,360),e=ii(e,100),r=ii(r,100);function c(f,p,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?f+(p-f)*6*g:g<1/2?p:g<2/3?f+(p-f)*(2/3-g)*6:f}if(e===0)n=a=o=r;else{var h=r<.5?r*(1+e):r+e-r*e,u=2*r-h;n=c(u,h,i+1/3),a=c(u,h,i),o=c(u,h,i-1/3)}return{r:n*255,g:a*255,b:o*255}}function LT(i,e,r){i=ii(i,255),e=ii(e,255),r=ii(r,255);var n=Math.max(i,e,r),a=Math.min(i,e,r),o,c,h=n,u=n-a;if(c=n===0?0:u/n,n==a)o=0;else{switch(n){case i:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-i)/u+2;break;case r:o=(i-e)/u+4;break}o/=6}return{h:o,s:c,v:h}}function XZ(i,e,r){i=ii(i,360)*6,e=ii(e,100),r=ii(r,100);var n=Math.floor(i),a=i-n,o=r*(1-e),c=r*(1-a*e),h=r*(1-(1-a)*e),u=n%6,f=[r,c,o,o,h,r][u],p=[h,r,r,c,o,o][u],g=[o,o,h,r,r,c][u];return{r:f*255,g:p*255,b:g*255}}function NT(i,e,r,n){var a=[Dn(Math.round(i).toString(16)),Dn(Math.round(e).toString(16)),Dn(Math.round(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function QZ(i,e,r,n,a){var o=[Dn(Math.round(i).toString(16)),Dn(Math.round(e).toString(16)),Dn(Math.round(r).toString(16)),Dn(tO(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function OT(i,e,r,n){var a=[Dn(tO(n)),Dn(Math.round(i).toString(16)),Dn(Math.round(e).toString(16)),Dn(Math.round(r).toString(16))];return a.join("")}Pt.equals=function(i,e){return!i||!e?!1:Pt(i).toRgbString()==Pt(e).toRgbString()};Pt.random=function(){return Pt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function ZZ(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.s-=e/100,r.s=lm(r.s),Pt(r)}function KZ(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.s+=e/100,r.s=lm(r.s),Pt(r)}function JZ(i){return Pt(i).desaturate(100)}function tK(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.l+=e/100,r.l=lm(r.l),Pt(r)}function eK(i,e){e=e===0?0:e||10;var r=Pt(i).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),Pt(r)}function iK(i,e){e=e===0?0:e||10;var r=Pt(i).toHsl();return r.l-=e/100,r.l=lm(r.l),Pt(r)}function rK(i,e){var r=Pt(i).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,Pt(r)}function nK(i){var e=Pt(i).toHsl();return e.h=(e.h+180)%360,Pt(e)}function jT(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Pt(i).toHsl(),n=[Pt(i)],a=360/e,o=1;o<e;o++)n.push(Pt({h:(r.h+o*a)%360,s:r.s,l:r.l}));return n}function aK(i){var e=Pt(i).toHsl(),r=e.h;return[Pt(i),Pt({h:(r+72)%360,s:e.s,l:e.l}),Pt({h:(r+216)%360,s:e.s,l:e.l})]}function sK(i,e,r){e=e||6,r=r||30;var n=Pt(i).toHsl(),a=360/r,o=[Pt(i)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,o.push(Pt(n));return o}function oK(i,e){e=e||6;for(var r=Pt(i).toHsv(),n=r.h,a=r.s,o=r.v,c=[],h=1/e;e--;)c.push(Pt({h:n,s:a,v:o})),o=(o+h)%1;return c}Pt.mix=function(i,e,r){r=r===0?0:r||50;var n=Pt(i).toRgb(),a=Pt(e).toRgb(),o=r/100,c={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return Pt(c)};Pt.readability=function(i,e){var r=Pt(i),n=Pt(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};Pt.isReadable=function(i,e,r){var n=Pt.readability(i,e),a,o;switch(o=!1,a=dK(r),a.level+a.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};Pt.mostReadable=function(i,e,r){var n=null,a=0,o,c,h,u;r=r||{},c=r.includeFallbackColors,h=r.level,u=r.size;for(var f=0;f<e.length;f++)o=Pt.readability(i,e[f]),o>a&&(a=o,n=Pt(e[f]));return Pt.isReadable(i,n,{level:h,size:u})||!c?n:(r.includeFallbackColors=!1,Pt.mostReadable(i,["#fff","#000"],r))};var Yb=Pt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",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:"f00",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",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},lK=Pt.hexNames=cK(Yb);function cK(i){var e={};for(var r in i)i.hasOwnProperty(r)&&(e[i[r]]=r);return e}function JN(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function ii(i,e){hK(i)&&(i="100%");var r=uK(i);return i=Math.min(e,Math.max(0,parseFloat(i))),r&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function lm(i){return Math.min(1,Math.max(0,i))}function Vr(i){return parseInt(i,16)}function hK(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function uK(i){return typeof i=="string"&&i.indexOf("%")!=-1}function Dn(i){return i.length==1?"0"+i:""+i}function Iu(i){return i<=1&&(i=i*100+"%"),i}function tO(i){return Math.round(parseFloat(i)*255).toString(16)}function RT(i){return Vr(i)/255}var En=(function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+i+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Va(i){return!!En.CSS_UNIT.exec(i)}function fK(i){i=i.replace(UZ,"").replace(WZ,"").toLowerCase();var e=!1;if(Yb[i])i=Yb[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=En.rgb.exec(i))?{r:r[1],g:r[2],b:r[3]}:(r=En.rgba.exec(i))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=En.hsl.exec(i))?{h:r[1],s:r[2],l:r[3]}:(r=En.hsla.exec(i))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=En.hsv.exec(i))?{h:r[1],s:r[2],v:r[3]}:(r=En.hsva.exec(i))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=En.hex8.exec(i))?{r:Vr(r[1]),g:Vr(r[2]),b:Vr(r[3]),a:RT(r[4]),format:e?"name":"hex8"}:(r=En.hex6.exec(i))?{r:Vr(r[1]),g:Vr(r[2]),b:Vr(r[3]),format:e?"name":"hex"}:(r=En.hex4.exec(i))?{r:Vr(r[1]+""+r[1]),g:Vr(r[2]+""+r[2]),b:Vr(r[3]+""+r[3]),a:RT(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=En.hex3.exec(i))?{r:Vr(r[1]+""+r[1]),g:Vr(r[2]+""+r[2]),b:Vr(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function dK(i){var e,r;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),r=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}function Gb(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function pK(i){if(Array.isArray(i))return Gb(i)}function eO(i,e,r){if(typeof i=="function"?i===e:i.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function gK(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mK(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function un(i,e){return i.get(eO(i,e))}function DT(i,e,r){gK(i,e),e.set(i,r)}function FT(i,e,r){return i.set(eO(i,e),r),r}function yK(i,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,_K(n.key),n)}}function xK(i,e,r){return e&&yK(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function bK(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function vK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
434
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CK(i){return pK(i)||bK(i)||SK(i)||vK()}function kK(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function _K(i){var e=kK(i,"string");return typeof e=="symbol"?e:e+""}function SK(i,e){if(i){if(typeof i=="string")return Gb(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gb(i,e):void 0}}var wK=123,TK=function(e){return"#".concat(Math.min(e,Math.pow(2,24)).toString(16).padStart(6,"0"))},iO=function(e,r,n){return(e<<16)+(r<<8)+n},BK=function(e){var r=Pt(e).toRgb(),n=r.r,a=r.g,o=r.b;return iO(n,a,o)},$T=function(e,r){return e*wK%Math.pow(2,r)},Yo=new WeakMap,Xa=new WeakMap,AK=(function(){function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;mK(this,i),DT(this,Yo,void 0),DT(this,Xa,void 0),FT(Xa,this,e),this.reset()}return xK(i,[{key:"reset",value:function(){FT(Yo,this,["__reserved for background__"])}},{key:"register",value:function(r){if(un(Yo,this).length>=Math.pow(2,24-un(Xa,this)))return null;var n=un(Yo,this).length,a=$T(n,un(Xa,this)),o=TK(n+(a<<24-un(Xa,this)));return un(Yo,this).push(r),o}},{key:"lookup",value:function(r){if(!r)return null;var n=typeof r=="string"?BK(r):iO.apply(void 0,CK(r));if(!n)return null;var a=n&Math.pow(2,24-un(Xa,this))-1,o=n>>24-un(Xa,this)&Math.pow(2,un(Xa,this))-1;return $T(a,un(Xa,this))!==o||a>=un(Yo,this).length?null:un(Yo,this)[a]}}])})(),Ff,ri,rO,nO,ro,zT,aO,sO,nx,$p,Qu,oO,T1,Vb,Xb,Eg={},Mg=[],EK=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cm=Array.isArray;function xa(i,e){for(var r in e)i[r]=e[r];return i}function B1(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function MK(i,e,r){var n,a,o,c={};for(o in e)o=="key"?n=e[o]:o=="ref"?a=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?Ff.call(arguments,2):r),typeof i=="function"&&i.defaultProps!=null)for(o in i.defaultProps)c[o]===void 0&&(c[o]=i.defaultProps[o]);return Zu(i,c,n,a,null)}function Zu(i,e,r,n,a){var o={type:i,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++rO,__i:-1,__u:0};return a==null&&ri.vnode!=null&&ri.vnode(o),o}function hm(i){return i.children}function zp(i,e){this.props=i,this.context=e}function oh(i,e){if(e==null)return i.__?oh(i.__,i.__i+1):null;for(var r;e<i.__k.length;e++)if((r=i.__k[e])!=null&&r.__e!=null)return r.__e;return typeof i.type=="function"?oh(i):null}function LK(i){if(i.__P&&i.__d){var e=i.__v,r=e.__e,n=[],a=[],o=xa({},e);o.__v=e.__v+1,ri.vnode&&ri.vnode(o),A1(i.__P,o,e,i.__n,i.__P.namespaceURI,32&e.__u?[r]:null,n,r??oh(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,uO(n,o,a),e.__e=e.__=null,o.__e!=r&&lO(o)}}function lO(i){if((i=i.__)!=null&&i.__c!=null)return i.__e=i.__c.base=null,i.__k.some(function(e){if(e!=null&&e.__e!=null)return i.__e=i.__c.base=e.__e}),lO(i)}function qT(i){(!i.__d&&(i.__d=!0)&&ro.push(i)&&!Lg.__r++||zT!=ri.debounceRendering)&&((zT=ri.debounceRendering)||aO)(Lg)}function Lg(){try{for(var i,e=1;ro.length;)ro.length>e&&ro.sort(sO),i=ro.shift(),e=ro.length,LK(i)}finally{ro.length=Lg.__r=0}}function cO(i,e,r,n,a,o,c,h,u,f,p){var g,x,y,v,C,_,w,T=n&&n.__k||Mg,A=e.length;for(u=NK(r,e,T,u,A),g=0;g<A;g++)(y=r.__k[g])!=null&&(x=y.__i!=-1&&T[y.__i]||Eg,y.__i=g,_=A1(i,y,x,a,o,c,h,u,f,p),v=y.__e,y.ref&&x.ref!=y.ref&&(x.ref&&E1(x.ref,null,y),p.push(y.ref,y.__c||v,y)),C==null&&v!=null&&(C=v),(w=!!(4&y.__u))||x.__k===y.__k?(u=hO(y,u,i,w),w&&x.__e&&(x.__e=null)):typeof y.type=="function"&&_!==void 0?u=_:v&&(u=v.nextSibling),y.__u&=-7);return r.__e=C,u}function NK(i,e,r,n,a){var o,c,h,u,f,p=r.length,g=p,x=0;for(i.__k=new Array(a),o=0;o<a;o++)(c=e[o])!=null&&typeof c!="boolean"&&typeof c!="function"?(typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?c=i.__k[o]=Zu(null,c,null,null,null):cm(c)?c=i.__k[o]=Zu(hm,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?c=i.__k[o]=Zu(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):i.__k[o]=c,u=o+x,c.__=i,c.__b=i.__b+1,h=null,(f=c.__i=OK(c,r,u,g))!=-1&&(g--,(h=r[f])&&(h.__u|=2)),h==null||h.__v==null?(f==-1&&(a>p?x--:a<p&&x++),typeof c.type!="function"&&(c.__u|=4)):f!=u&&(f==u-1?x--:f==u+1?x++:(f>u?x--:x++,c.__u|=4))):i.__k[o]=null;if(g)for(o=0;o<p;o++)(h=r[o])!=null&&(2&h.__u)==0&&(h.__e==n&&(n=oh(h)),dO(h,h));return n}function hO(i,e,r,n){var a,o;if(typeof i.type=="function"){for(a=i.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=i,e=hO(a[o],e,r,n));return e}i.__e!=e&&(n&&(e&&i.type&&!e.parentNode&&(e=oh(i)),r.insertBefore(i.__e,e||null)),e=i.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function OK(i,e,r,n){var a,o,c,h=i.key,u=i.type,f=e[r],p=f!=null&&(2&f.__u)==0;if(f===null&&h==null||p&&h==f.key&&u==f.type)return r;if(n>(p?1:0)){for(a=r-1,o=r+1;a>=0||o<e.length;)if((f=e[c=a>=0?a--:o++])!=null&&(2&f.__u)==0&&h==f.key&&u==f.type)return c}return-1}function IT(i,e,r){e[0]=="-"?i.setProperty(e,r??""):i[e]=r==null?"":typeof r!="number"||EK.test(e)?r:r+"px"}function yp(i,e,r,n,a){var o,c;t:if(e=="style")if(typeof r=="string")i.style.cssText=r;else{if(typeof n=="string"&&(i.style.cssText=n=""),n)for(e in n)r&&e in r||IT(i.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||IT(i.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(oO,"$1")),c=e.toLowerCase(),e=c in i||e=="onFocusOut"||e=="onFocusIn"?c.slice(2):e.slice(2),i.l||(i.l={}),i.l[e+o]=r,r?n?r[Qu]=n[Qu]:(r[Qu]=T1,i.addEventListener(e,o?Xb:Vb,o)):i.removeEventListener(e,o?Xb:Vb,o);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in i)try{i[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?i.removeAttribute(e):i.setAttribute(e,e=="popover"&&r==1?"":r))}}function PT(i){return function(e){if(this.l){var r=this.l[e.type+i];if(e[$p]==null)e[$p]=T1++;else if(e[$p]<r[Qu])return;return r(ri.event?ri.event(e):e)}}}function A1(i,e,r,n,a,o,c,h,u,f){var p,g,x,y,v,C,_,w,T,A,E,N,R,M,O,Y=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),o=[h=e.__e=r.__e]),(p=ri.__b)&&p(e);t:if(typeof Y=="function")try{if(w=e.props,T=Y.prototype&&Y.prototype.render,A=(p=Y.contextType)&&n[p.__c],E=p?A?A.props.value:p.__:n,r.__c?_=(g=e.__c=r.__c).__=g.__E:(T?e.__c=g=new Y(w,E):(e.__c=g=new zp(w,E),g.constructor=Y,g.render=RK),A&&A.sub(g),g.state||(g.state={}),g.__n=n,x=g.__d=!0,g.__h=[],g._sb=[]),T&&g.__s==null&&(g.__s=g.state),T&&Y.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=xa({},g.__s)),xa(g.__s,Y.getDerivedStateFromProps(w,g.__s))),y=g.props,v=g.state,g.__v=e,x)T&&Y.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),T&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(T&&Y.getDerivedStateFromProps==null&&w!==y&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(w,E),e.__v==r.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(w,g.__s,E)===!1){e.__v!=r.__v&&(g.props=w,g.state=g.__s,g.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function($){$&&($.__=e)}),Mg.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&c.push(g);break t}g.componentWillUpdate!=null&&g.componentWillUpdate(w,g.__s,E),T&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(y,v,C)})}if(g.context=E,g.props=w,g.__P=i,g.__e=!1,N=ri.__r,R=0,T)g.state=g.__s,g.__d=!1,N&&N(e),p=g.render(g.props,g.state,g.context),Mg.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,N&&N(e),p=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++R<25);g.state=g.__s,g.getChildContext!=null&&(n=xa(xa({},n),g.getChildContext())),T&&!x&&g.getSnapshotBeforeUpdate!=null&&(C=g.getSnapshotBeforeUpdate(y,v)),M=p!=null&&p.type===hm&&p.key==null?fO(p.props.children):p,h=cO(i,cm(M)?M:[M],e,r,n,a,o,c,h,u,f),g.base=e.__e,e.__u&=-161,g.__h.length&&c.push(g),_&&(g.__E=g.__=null)}catch($){if(e.__v=null,u||o!=null)if($.then){for(e.__u|=u?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;o[o.indexOf(h)]=null,e.__e=h}else{for(O=o.length;O--;)B1(o[O]);Qb(e)}else e.__e=r.__e,e.__k=r.__k,$.then||Qb(e);ri.__e($,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):h=e.__e=jK(r.__e,e,r,n,a,o,c,u,f);return(p=ri.diffed)&&p(e),128&e.__u?void 0:h}function Qb(i){i&&(i.__c&&(i.__c.__e=!0),i.__k&&i.__k.some(Qb))}function uO(i,e,r){for(var n=0;n<r.length;n++)E1(r[n],r[++n],r[++n]);ri.__c&&ri.__c(e,i),i.some(function(a){try{i=a.__h,a.__h=[],i.some(function(o){o.call(a)})}catch(o){ri.__e(o,a.__v)}})}function fO(i){return typeof i!="object"||i==null||i.__b>0?i:cm(i)?i.map(fO):xa({},i)}function jK(i,e,r,n,a,o,c,h,u){var f,p,g,x,y,v,C,_=r.props||Eg,w=e.props,T=e.type;if(T=="svg"?a="http://www.w3.org/2000/svg":T=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(f=0;f<o.length;f++)if((y=o[f])&&"setAttribute"in y==!!T&&(T?y.localName==T:y.nodeType==3)){i=y,o[f]=null;break}}if(i==null){if(T==null)return document.createTextNode(w);i=document.createElementNS(a,T,w.is&&w),h&&(ri.__m&&ri.__m(e,o),h=!1),o=null}if(T==null)_===w||h&&i.data==w||(i.data=w);else{if(o=o&&Ff.call(i.childNodes),!h&&o!=null)for(_={},f=0;f<i.attributes.length;f++)_[(y=i.attributes[f]).name]=y.value;for(f in _)y=_[f],f=="dangerouslySetInnerHTML"?g=y:f=="children"||f in w||f=="value"&&"defaultValue"in w||f=="checked"&&"defaultChecked"in w||yp(i,f,null,y,a);for(f in w)y=w[f],f=="children"?x=y:f=="dangerouslySetInnerHTML"?p=y:f=="value"?v=y:f=="checked"?C=y:h&&typeof y!="function"||_[f]===y||yp(i,f,y,_[f],a);if(p)h||g&&(p.__html==g.__html||p.__html==i.innerHTML)||(i.innerHTML=p.__html),e.__k=[];else if(g&&(i.innerHTML=""),cO(e.type=="template"?i.content:i,cm(x)?x:[x],e,r,n,T=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,c,o?o[0]:r.__k&&oh(r,0),h,u),o!=null)for(f=o.length;f--;)B1(o[f]);h||(f="value",T=="progress"&&v==null?i.removeAttribute("value"):v!=null&&(v!==i[f]||T=="progress"&&!v||T=="option"&&v!=_[f])&&yp(i,f,v,_[f],a),f="checked",C!=null&&C!=i[f]&&yp(i,f,C,_[f],a))}return i}function E1(i,e,r){try{if(typeof i=="function"){var n=typeof i.__u=="function";n&&i.__u(),n&&e==null||(i.__u=i(e))}else i.current=e}catch(a){ri.__e(a,r)}}function dO(i,e,r){var n,a;if(ri.unmount&&ri.unmount(i),(n=i.ref)&&(n.current&&n.current!=i.__e||E1(n,null,e)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){ri.__e(o,e)}n.base=n.__P=null}if(n=i.__k)for(a=0;a<n.length;a++)n[a]&&dO(n[a],e,r||typeof i.type!="function");r||B1(i.__e),i.__c=i.__=i.__e=void 0}function RK(i,e,r){return this.constructor(i,r)}function DK(i,e,r){var n,a,o,c;e==document&&(e=document.documentElement),ri.__&&ri.__(i,e),a=(n=!1)?null:e.__k,o=[],c=[],A1(e,i=e.__k=MK(hm,null,[i]),a||Eg,Eg,e.namespaceURI,a?null:e.firstChild?Ff.call(e.childNodes):null,o,a?a.__e:e.firstChild,n,c),uO(o,i,c)}function pO(i,e,r){var n,a,o,c,h=xa({},i.props);for(o in i.type&&i.type.defaultProps&&(c=i.type.defaultProps),e)o=="key"?n=e[o]:o=="ref"?a=e[o]:h[o]=e[o]===void 0&&c!=null?c[o]:e[o];return arguments.length>2&&(h.children=arguments.length>3?Ff.call(arguments,2):r),Zu(i.type,h,n||i.key,a||i.ref,null)}Ff=Mg.slice,ri={__e:function(i,e,r,n){for(var a,o,c;e=e.__;)if((a=e.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(i)),c=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(i,n||{}),c=a.__d),c)return a.__E=a}catch(h){i=h}throw i}},rO=0,nO=function(i){return i!=null&&i.constructor===void 0},zp.prototype.setState=function(i,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=xa({},this.state),typeof i=="function"&&(i=i(xa({},r),this.props)),i&&xa(r,i),i!=null&&this.__v&&(e&&this._sb.push(e),qT(this))},zp.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),qT(this))},zp.prototype.render=hm,ro=[],aO=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sO=function(i,e){return i.__v.__b-e.__v.__b},Lg.__r=0,nx=Math.random().toString(8),$p="__d"+nx,Qu="__a"+nx,oO=/(PointerCapture)$|Capture$/i,T1=0,Vb=PT(!1),Xb=PT(!0);function HT(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function FK(i){if(Array.isArray(i))return i}function $K(i,e,r){return(e=UK(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function zK(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function qK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
435
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UT(i,e){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),r.push.apply(r,n)}return r}function IK(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?UT(Object(r),!0).forEach(function(n){$K(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):UT(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function PK(i,e){return FK(i)||zK(i,e)||WK(i,e)||qK()}function HK(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function UK(i){var e=HK(i,"string");return typeof e=="symbol"?e:e+""}function Ng(i){"@babel/helpers - typeof";return Ng=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ng(i)}function WK(i,e){if(i){if(typeof i=="string")return HT(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?HT(i,e):void 0}}var Zb=function(e){if(Ng(e)!=="object")return e;var r=pO(e);if(r.props){var n;r.props=IK({},r.props),r!=null&&(n=r.props)!==null&&n!==void 0&&n.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Zb):Zb(r.props.children))}return r},YK=function(e){return nO(pO(e))},GK=function(e,r){delete r.__k,DK(Zb(e),r)};function VK(i,e){e===void 0&&(e={});var r=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}}var XK=`.float-tooltip-kap {
436
- position: absolute;
437
- width: max-content; /* prevent shrinking near right edge */
438
- max-width: max(50%, 150px);
439
- padding: 3px 5px;
440
- border-radius: 3px;
441
- font: 12px sans-serif;
442
- color: #eee;
443
- background: rgba(0,0,0,0.6);
444
- pointer-events: none;
445
- }
446
- `;VK(XK);var QK=w1({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.style,o=a===void 0?{}:a,c=!!e&&Ng(e)==="object"&&!!e.node&&typeof e.node=="function",h=Xt(c?e.node():e);h.style("position")==="static"&&h.style("position","relative"),r.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(f){var p=PK(f,2),g=p[0],x=p[1];return r.tooltipEl.style(g,x)}),r.tooltipEl.style("left","-10000px").style("display","none");var u="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,h.on("mousemove.".concat(u),function(f){r.mouseInside=!0;var p=da(f),g=h.node(),x=g.offsetWidth,y=g.offsetHeight,v=[r.offsetX===null||r.offsetX===void 0?"-".concat(p[0]/x*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?y>130&&y-p[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",p[0]+"px").style("top",p[1]+"px").style("transform","translate(".concat(v.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(u),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(u),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(e){e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):typeof e.content=="string"?e.tooltipEl.html(e.content):YK(e.content)?(e.tooltipEl.text(""),GK(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});function ZK(i,e,r){var n,a=1;i==null&&(i=0),e==null&&(e=0),r==null&&(r=0);function o(){var c,h=n.length,u,f=0,p=0,g=0;for(c=0;c<h;++c)u=n[c],f+=u.x||0,p+=u.y||0,g+=u.z||0;for(f=(f/h-i)*a,p=(p/h-e)*a,g=(g/h-r)*a,c=0;c<h;++c)u=n[c],f&&(u.x-=f),p&&(u.y-=p),g&&(u.z-=g)}return o.initialize=function(c){n=c},o.x=function(c){return arguments.length?(i=+c,o):i},o.y=function(c){return arguments.length?(e=+c,o):e},o.z=function(c){return arguments.length?(r=+c,o):r},o.strength=function(c){return arguments.length?(a=+c,o):a},o}function KK(i){const e=+this._x.call(null,i);return gO(this.cover(e),e,i)}function gO(i,e,r){if(isNaN(e))return i;var n,a=i._root,o={data:r},c=i._x0,h=i._x1,u,f,p,g,x;if(!a)return i._root=o,i;for(;a.length;)if((p=e>=(u=(c+h)/2))?c=u:h=u,n=a,!(a=a[g=+p]))return n[g]=o,i;if(f=+i._x.call(null,a.data),e===f)return o.next=a,n?n[g]=o:i._root=o,i;do n=n?n[g]=new Array(2):i._root=new Array(2),(p=e>=(u=(c+h)/2))?c=u:h=u;while((g=+p)==(x=+(f>=u)));return n[x]=a,n[g]=o,i}function JK(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e);let n=1/0,a=-1/0;for(let o=0,c;o<e;++o)isNaN(c=+this._x.call(null,i[o]))||(r[o]=c,c<n&&(n=c),c>a&&(a=c));if(n>a)return this;this.cover(n).cover(a);for(let o=0;o<e;++o)gO(this,r[o],i[o]);return this}function tJ(i){if(isNaN(i=+i))return this;var e=this._x0,r=this._x1;if(isNaN(e))r=(e=Math.floor(i))+1;else{for(var n=r-e||1,a=this._root,o,c;e>i||i>=r;)switch(c=+(i<e),o=new Array(2),o[c]=a,a=o,n*=2,c){case 0:r=e+n;break;case 1:e=r-n;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._x1=r,this}function eJ(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function iJ(i){return arguments.length?this.cover(+i[0][0]).cover(+i[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function cs(i,e,r){this.node=i,this.x0=e,this.x1=r}function rJ(i,e){var r,n=this._x0,a,o,c=this._x1,h=[],u=this._root,f,p;for(u&&h.push(new cs(u,n,c)),e==null?e=1/0:(n=i-e,c=i+e);f=h.pop();)if(!(!(u=f.node)||(a=f.x0)>c||(o=f.x1)<n))if(u.length){var g=(a+o)/2;h.push(new cs(u[1],g,o),new cs(u[0],a,g)),(p=+(i>=g))&&(f=h[h.length-1],h[h.length-1]=h[h.length-1-p],h[h.length-1-p]=f)}else{var x=Math.abs(i-+this._x.call(null,u.data));x<e&&(e=x,n=i-x,c=i+x,r=u.data)}return r}function nJ(i){if(isNaN(u=+this._x.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._x1,u,f,p,g,x;if(!r)return this;if(r.length)for(;;){if((p=u>=(f=(c+h)/2))?c=f:h=f,e=r,!(r=r[g=+p]))return this;if(!r.length)break;e[g+1&1]&&(n=e,x=g)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[g]=o:delete e[g],(r=e[0]||e[1])&&r===(e[1]||e[0])&&!r.length&&(n?n[x]=r:this._root=r),this):(this._root=o,this)}function aJ(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function sJ(){return this._root}function oJ(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function lJ(i){var e=[],r,n=this._root,a,o,c;for(n&&e.push(new cs(n,this._x0,this._x1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.x1)&&n.length){var h=(o+c)/2;(a=n[1])&&e.push(new cs(a,h,c)),(a=n[0])&&e.push(new cs(a,o,h))}return this}function cJ(i){var e=[],r=[],n;for(this._root&&e.push(new cs(this._root,this._x0,this._x1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.x1,u=(c+h)/2;(o=a[0])&&e.push(new cs(o,c,u)),(o=a[1])&&e.push(new cs(o,u,h))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.x1);return this}function hJ(i){return i[0]}function uJ(i){return arguments.length?(this._x=i,this):this._x}function M1(i,e){var r=new L1(e??hJ,NaN,NaN);return i==null?r:r.addAll(i)}function L1(i,e,r){this._x=i,this._x0=e,this._x1=r,this._root=void 0}function WT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Rr=M1.prototype=L1.prototype;Rr.copy=function(){var i=new L1(this._x,this._x0,this._x1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=WT(e),i;for(r=[{source:e,target:i._root=new Array(2)}];e=r.pop();)for(var a=0;a<2;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(2)}):e.target[a]=WT(n));return i};Rr.add=KK;Rr.addAll=JK;Rr.cover=tJ;Rr.data=eJ;Rr.extent=iJ;Rr.find=rJ;Rr.remove=nJ;Rr.removeAll=aJ;Rr.root=sJ;Rr.size=oJ;Rr.visit=lJ;Rr.visitAfter=cJ;Rr.x=uJ;function fJ(i){const e=+this._x.call(null,i),r=+this._y.call(null,i),n=+this._z.call(null,i);return mO(this.cover(e,r,n),e,r,n,i)}function mO(i,e,r,n,a){if(isNaN(e)||isNaN(r)||isNaN(n))return i;var o,c=i._root,h={data:a},u=i._x0,f=i._y0,p=i._z0,g=i._x1,x=i._y1,y=i._z1,v,C,_,w,T,A,E,N,R,M,O;if(!c)return i._root=h,i;for(;c.length;)if((E=e>=(v=(u+g)/2))?u=v:g=v,(N=r>=(C=(f+x)/2))?f=C:x=C,(R=n>=(_=(p+y)/2))?p=_:y=_,o=c,!(c=c[M=R<<2|N<<1|E]))return o[M]=h,i;if(w=+i._x.call(null,c.data),T=+i._y.call(null,c.data),A=+i._z.call(null,c.data),e===w&&r===T&&n===A)return h.next=c,o?o[M]=h:i._root=h,i;do o=o?o[M]=new Array(8):i._root=new Array(8),(E=e>=(v=(u+g)/2))?u=v:g=v,(N=r>=(C=(f+x)/2))?f=C:x=C,(R=n>=(_=(p+y)/2))?p=_:y=_;while((M=R<<2|N<<1|E)===(O=(A>=_)<<2|(T>=C)<<1|w>=v));return o[O]=c,o[M]=h,i}function dJ(i){Array.isArray(i)||(i=Array.from(i));const e=i.length,r=new Float64Array(e),n=new Float64Array(e),a=new Float64Array(e);let o=1/0,c=1/0,h=1/0,u=-1/0,f=-1/0,p=-1/0;for(let g=0,x,y,v,C;g<e;++g)isNaN(y=+this._x.call(null,x=i[g]))||isNaN(v=+this._y.call(null,x))||isNaN(C=+this._z.call(null,x))||(r[g]=y,n[g]=v,a[g]=C,y<o&&(o=y),y>u&&(u=y),v<c&&(c=v),v>f&&(f=v),C<h&&(h=C),C>p&&(p=C));if(o>u||c>f||h>p)return this;this.cover(o,c,h).cover(u,f,p);for(let g=0;g<e;++g)mO(this,r[g],n[g],a[g],i[g]);return this}function pJ(i,e,r){if(isNaN(i=+i)||isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,a=this._y0,o=this._z0,c=this._x1,h=this._y1,u=this._z1;if(isNaN(n))c=(n=Math.floor(i))+1,h=(a=Math.floor(e))+1,u=(o=Math.floor(r))+1;else{for(var f=c-n||1,p=this._root,g,x;n>i||i>=c||a>e||e>=h||o>r||r>=u;)switch(x=(r<o)<<2|(e<a)<<1|i<n,g=new Array(8),g[x]=p,p=g,f*=2,x){case 0:c=n+f,h=a+f,u=o+f;break;case 1:n=c-f,h=a+f,u=o+f;break;case 2:c=n+f,a=h-f,u=o+f;break;case 3:n=c-f,a=h-f,u=o+f;break;case 4:c=n+f,h=a+f,o=u-f;break;case 5:n=c-f,h=a+f,o=u-f;break;case 6:c=n+f,a=h-f,o=u-f;break;case 7:n=c-f,a=h-f,o=u-f;break}this._root&&this._root.length&&(this._root=p)}return this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this}function gJ(){var i=[];return this.visit(function(e){if(!e.length)do i.push(e.data);while(e=e.next)}),i}function mJ(i){return arguments.length?this.cover(+i[0][0],+i[0][1],+i[0][2]).cover(+i[1][0],+i[1][1],+i[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Ve(i,e,r,n,a,o,c){this.node=i,this.x0=e,this.y0=r,this.z0=n,this.x1=a,this.y1=o,this.z1=c}function yJ(i,e,r,n){var a,o=this._x0,c=this._y0,h=this._z0,u,f,p,g,x,y,v=this._x1,C=this._y1,_=this._z1,w=[],T=this._root,A,E;for(T&&w.push(new Ve(T,o,c,h,v,C,_)),n==null?n=1/0:(o=i-n,c=e-n,h=r-n,v=i+n,C=e+n,_=r+n,n*=n);A=w.pop();)if(!(!(T=A.node)||(u=A.x0)>v||(f=A.y0)>C||(p=A.z0)>_||(g=A.x1)<o||(x=A.y1)<c||(y=A.z1)<h))if(T.length){var N=(u+g)/2,R=(f+x)/2,M=(p+y)/2;w.push(new Ve(T[7],N,R,M,g,x,y),new Ve(T[6],u,R,M,N,x,y),new Ve(T[5],N,f,M,g,R,y),new Ve(T[4],u,f,M,N,R,y),new Ve(T[3],N,R,p,g,x,M),new Ve(T[2],u,R,p,N,x,M),new Ve(T[1],N,f,p,g,R,M),new Ve(T[0],u,f,p,N,R,M)),(E=(r>=M)<<2|(e>=R)<<1|i>=N)&&(A=w[w.length-1],w[w.length-1]=w[w.length-1-E],w[w.length-1-E]=A)}else{var O=i-+this._x.call(null,T.data),Y=e-+this._y.call(null,T.data),$=r-+this._z.call(null,T.data),q=O*O+Y*Y+$*$;if(q<n){var J=Math.sqrt(n=q);o=i-J,c=e-J,h=r-J,v=i+J,C=e+J,_=r+J,a=T.data}}return a}const xJ=(i,e,r,n,a,o)=>Math.sqrt((i-n)**2+(e-a)**2+(r-o)**2);function bJ(i,e,r,n){const a=[],o=i-n,c=e-n,h=r-n,u=i+n,f=e+n,p=r+n;return this.visit((g,x,y,v,C,_,w)=>{if(!g.length)do{const T=g.data;xJ(i,e,r,this._x(T),this._y(T),this._z(T))<=n&&a.push(T)}while(g=g.next);return x>u||y>f||v>p||C<o||_<c||w<h}),a}function vJ(i){if(isNaN(x=+this._x.call(null,i))||isNaN(y=+this._y.call(null,i))||isNaN(v=+this._z.call(null,i)))return this;var e,r=this._root,n,a,o,c=this._x0,h=this._y0,u=this._z0,f=this._x1,p=this._y1,g=this._z1,x,y,v,C,_,w,T,A,E,N,R;if(!r)return this;if(r.length)for(;;){if((T=x>=(C=(c+f)/2))?c=C:f=C,(A=y>=(_=(h+p)/2))?h=_:p=_,(E=v>=(w=(u+g)/2))?u=w:g=w,e=r,!(r=r[N=E<<2|A<<1|T]))return this;if(!r.length)break;(e[N+1&7]||e[N+2&7]||e[N+3&7]||e[N+4&7]||e[N+5&7]||e[N+6&7]||e[N+7&7])&&(n=e,R=N)}for(;r.data!==i;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):e?(o?e[N]=o:delete e[N],(r=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&r===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[R]=r:this._root=r),this):(this._root=o,this)}function CJ(i){for(var e=0,r=i.length;e<r;++e)this.remove(i[e]);return this}function kJ(){return this._root}function _J(){var i=0;return this.visit(function(e){if(!e.length)do++i;while(e=e.next)}),i}function SJ(i){var e=[],r,n=this._root,a,o,c,h,u,f,p;for(n&&e.push(new Ve(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=e.pop();)if(!i(n=r.node,o=r.x0,c=r.y0,h=r.z0,u=r.x1,f=r.y1,p=r.z1)&&n.length){var g=(o+u)/2,x=(c+f)/2,y=(h+p)/2;(a=n[7])&&e.push(new Ve(a,g,x,y,u,f,p)),(a=n[6])&&e.push(new Ve(a,o,x,y,g,f,p)),(a=n[5])&&e.push(new Ve(a,g,c,y,u,x,p)),(a=n[4])&&e.push(new Ve(a,o,c,y,g,x,p)),(a=n[3])&&e.push(new Ve(a,g,x,h,u,f,y)),(a=n[2])&&e.push(new Ve(a,o,x,h,g,f,y)),(a=n[1])&&e.push(new Ve(a,g,c,h,u,x,y)),(a=n[0])&&e.push(new Ve(a,o,c,h,g,x,y))}return this}function wJ(i){var e=[],r=[],n;for(this._root&&e.push(new Ve(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=e.pop();){var a=n.node;if(a.length){var o,c=n.x0,h=n.y0,u=n.z0,f=n.x1,p=n.y1,g=n.z1,x=(c+f)/2,y=(h+p)/2,v=(u+g)/2;(o=a[0])&&e.push(new Ve(o,c,h,u,x,y,v)),(o=a[1])&&e.push(new Ve(o,x,h,u,f,y,v)),(o=a[2])&&e.push(new Ve(o,c,y,u,x,p,v)),(o=a[3])&&e.push(new Ve(o,x,y,u,f,p,v)),(o=a[4])&&e.push(new Ve(o,c,h,v,x,y,g)),(o=a[5])&&e.push(new Ve(o,x,h,v,f,y,g)),(o=a[6])&&e.push(new Ve(o,c,y,v,x,p,g)),(o=a[7])&&e.push(new Ve(o,x,y,v,f,p,g))}r.push(n)}for(;n=r.pop();)i(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function TJ(i){return i[0]}function BJ(i){return arguments.length?(this._x=i,this):this._x}function AJ(i){return i[1]}function EJ(i){return arguments.length?(this._y=i,this):this._y}function MJ(i){return i[2]}function LJ(i){return arguments.length?(this._z=i,this):this._z}function N1(i,e,r,n){var a=new O1(e??TJ,r??AJ,n??MJ,NaN,NaN,NaN,NaN,NaN,NaN);return i==null?a:a.addAll(i)}function O1(i,e,r,n,a,o,c,h,u){this._x=i,this._y=e,this._z=r,this._x0=n,this._y0=a,this._z0=o,this._x1=c,this._y1=h,this._z1=u,this._root=void 0}function YT(i){for(var e={data:i.data},r=e;i=i.next;)r=r.next={data:i.data};return e}var Qi=N1.prototype=O1.prototype;Qi.copy=function(){var i=new O1(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,r,n;if(!e)return i;if(!e.length)return i._root=YT(e),i;for(r=[{source:e,target:i._root=new Array(8)}];e=r.pop();)for(var a=0;a<8;++a)(n=e.source[a])&&(n.length?r.push({source:n,target:e.target[a]=new Array(8)}):e.target[a]=YT(n));return i};Qi.add=fJ;Qi.addAll=dJ;Qi.cover=pJ;Qi.data=gJ;Qi.extent=mJ;Qi.find=yJ;Qi.findAllWithinRadius=bJ;Qi.remove=vJ;Qi.removeAll=CJ;Qi.root=kJ;Qi.size=_J;Qi.visit=SJ;Qi.visitAfter=wJ;Qi.x=BJ;Qi.y=EJ;Qi.z=LJ;function Li(i){return function(){return i}}function gn(i){return(i()-.5)*1e-6}function ax(i){return i.x+i.vx}function GT(i){return i.y+i.vy}function NJ(i){return i.z+i.vz}function OJ(i){var e,r,n,a,o=1,c=1;typeof i!="function"&&(i=Li(i==null?1:+i));function h(){for(var p,g=e.length,x,y,v,C,_,w,T,A=0;A<c;++A)for(x=(r===1?M1(e,ax):r===2?Ov(e,ax,GT):r===3?N1(e,ax,GT,NJ):null).visitAfter(u),p=0;p<g;++p)y=e[p],w=n[y.index],T=w*w,v=y.x+y.vx,r>1&&(C=y.y+y.vy),r>2&&(_=y.z+y.vz),x.visit(E);function E(N,R,M,O,Y,$,q){var J=[R,M,O,Y,$,q],W=J[0],F=J[1],U=J[2],j=J[r],I=J[r+1],H=J[r+2],V=N.data,Z=N.r,P=w+Z;if(V){if(V.index>y.index){var K=v-V.x-V.vx,ot=r>1?C-V.y-V.vy:0,st=r>2?_-V.z-V.vz:0,bt=K*K+ot*ot+st*st;bt<P*P&&(K===0&&(K=gn(a),bt+=K*K),r>1&&ot===0&&(ot=gn(a),bt+=ot*ot),r>2&&st===0&&(st=gn(a),bt+=st*st),bt=(P-(bt=Math.sqrt(bt)))/bt*o,y.vx+=(K*=bt)*(P=(Z*=Z)/(T+Z)),r>1&&(y.vy+=(ot*=bt)*P),r>2&&(y.vz+=(st*=bt)*P),V.vx-=K*(P=1-P),r>1&&(V.vy-=ot*P),r>2&&(V.vz-=st*P))}return}return W>v+P||j<v-P||r>1&&(F>C+P||I<C-P)||r>2&&(U>_+P||H<_-P)}}function u(p){if(p.data)return p.r=n[p.data.index];for(var g=p.r=0;g<Math.pow(2,r);++g)p[g]&&p[g].r>p.r&&(p.r=p[g].r)}function f(){if(e){var p,g=e.length,x;for(n=new Array(g),p=0;p<g;++p)x=e[p],n[x.index]=+i(x,p,e)}}return h.initialize=function(p,...g){e=p,a=g.find(x=>typeof x=="function")||Math.random,r=g.find(x=>[1,2,3].includes(x))||2,f()},h.iterations=function(p){return arguments.length?(c=+p,h):c},h.strength=function(p){return arguments.length?(o=+p,h):o},h.radius=function(p){return arguments.length?(i=typeof p=="function"?p:Li(+p),f(),h):i},h}function jJ(i){return i.index}function VT(i,e){var r=i.get(e);if(!r)throw new Error("node not found: "+e);return r}function RJ(i){var e=jJ,r=x,n,a=Li(30),o,c,h,u,f,p,g=1;i==null&&(i=[]);function x(w){return 1/Math.min(u[w.source.index],u[w.target.index])}function y(w){for(var T=0,A=i.length;T<g;++T)for(var E=0,N,R,M,O=0,Y=0,$=0,q,J;E<A;++E)N=i[E],R=N.source,M=N.target,O=M.x+M.vx-R.x-R.vx||gn(p),h>1&&(Y=M.y+M.vy-R.y-R.vy||gn(p)),h>2&&($=M.z+M.vz-R.z-R.vz||gn(p)),q=Math.sqrt(O*O+Y*Y+$*$),q=(q-o[E])/q*w*n[E],O*=q,Y*=q,$*=q,M.vx-=O*(J=f[E]),h>1&&(M.vy-=Y*J),h>2&&(M.vz-=$*J),R.vx+=O*(J=1-J),h>1&&(R.vy+=Y*J),h>2&&(R.vz+=$*J)}function v(){if(c){var w,T=c.length,A=i.length,E=new Map(c.map((R,M)=>[e(R,M,c),R])),N;for(w=0,u=new Array(T);w<A;++w)N=i[w],N.index=w,typeof N.source!="object"&&(N.source=VT(E,N.source)),typeof N.target!="object"&&(N.target=VT(E,N.target)),u[N.source.index]=(u[N.source.index]||0)+1,u[N.target.index]=(u[N.target.index]||0)+1;for(w=0,f=new Array(A);w<A;++w)N=i[w],f[w]=u[N.source.index]/(u[N.source.index]+u[N.target.index]);n=new Array(A),C(),o=new Array(A),_()}}function C(){if(c)for(var w=0,T=i.length;w<T;++w)n[w]=+r(i[w],w,i)}function _(){if(c)for(var w=0,T=i.length;w<T;++w)o[w]=+a(i[w],w,i)}return y.initialize=function(w,...T){c=w,p=T.find(A=>typeof A=="function")||Math.random,h=T.find(A=>[1,2,3].includes(A))||2,v()},y.links=function(w){return arguments.length?(i=w,v(),y):i},y.id=function(w){return arguments.length?(e=w,y):e},y.iterations=function(w){return arguments.length?(g=+w,y):g},y.strength=function(w){return arguments.length?(r=typeof w=="function"?w:Li(+w),C(),y):r},y.distance=function(w){return arguments.length?(a=typeof w=="function"?w:Li(+w),_(),y):a},y}const DJ=1664525,FJ=1013904223,XT=4294967296;function $J(){let i=1;return()=>(i=(DJ*i+FJ)%XT)/XT}var QT=3;function sx(i){return i.x}function ZT(i){return i.y}function zJ(i){return i.z}var qJ=10,IJ=Math.PI*(3-Math.sqrt(5)),PJ=Math.PI*20/(9+Math.sqrt(221));function HJ(i,e){e=e||2;var r=Math.min(QT,Math.max(1,Math.round(e))),n,a=1,o=.001,c=1-Math.pow(o,1/300),h=0,u=.6,f=new Map,p=Mv(y),g=Tf("tick","end"),x=$J();i==null&&(i=[]);function y(){v(),g.call("tick",n),a<o&&(p.stop(),g.call("end",n))}function v(w){var T,A=i.length,E;w===void 0&&(w=1);for(var N=0;N<w;++N)for(a+=(h-a)*c,f.forEach(function(R){R(a)}),T=0;T<A;++T)E=i[T],E.fx==null?E.x+=E.vx*=u:(E.x=E.fx,E.vx=0),r>1&&(E.fy==null?E.y+=E.vy*=u:(E.y=E.fy,E.vy=0)),r>2&&(E.fz==null?E.z+=E.vz*=u:(E.z=E.fz,E.vz=0));return n}function C(){for(var w=0,T=i.length,A;w<T;++w){if(A=i[w],A.index=w,A.fx!=null&&(A.x=A.fx),A.fy!=null&&(A.y=A.fy),A.fz!=null&&(A.z=A.fz),isNaN(A.x)||r>1&&isNaN(A.y)||r>2&&isNaN(A.z)){var E=qJ*(r>2?Math.cbrt(.5+w):r>1?Math.sqrt(.5+w):w),N=w*IJ,R=w*PJ;r===1?A.x=E:r===2?(A.x=E*Math.cos(N),A.y=E*Math.sin(N)):(A.x=E*Math.sin(N)*Math.cos(R),A.y=E*Math.cos(N),A.z=E*Math.sin(N)*Math.sin(R))}(isNaN(A.vx)||r>1&&isNaN(A.vy)||r>2&&isNaN(A.vz))&&(A.vx=0,r>1&&(A.vy=0),r>2&&(A.vz=0))}}function _(w){return w.initialize&&w.initialize(i,x,r),w}return C(),n={tick:v,restart:function(){return p.restart(y),n},stop:function(){return p.stop(),n},numDimensions:function(w){return arguments.length?(r=Math.min(QT,Math.max(1,Math.round(w))),f.forEach(_),n):r},nodes:function(w){return arguments.length?(i=w,C(),f.forEach(_),n):i},alpha:function(w){return arguments.length?(a=+w,n):a},alphaMin:function(w){return arguments.length?(o=+w,n):o},alphaDecay:function(w){return arguments.length?(c=+w,n):+c},alphaTarget:function(w){return arguments.length?(h=+w,n):h},velocityDecay:function(w){return arguments.length?(u=1-w,n):1-u},randomSource:function(w){return arguments.length?(x=w,f.forEach(_),n):x},force:function(w,T){return arguments.length>1?(T==null?f.delete(w):f.set(w,_(T)),n):f.get(w)},find:function(){var w=Array.prototype.slice.call(arguments),T=w.shift()||0,A=(r>1?w.shift():null)||0,E=(r>2?w.shift():null)||0,N=w.shift()||1/0,R=0,M=i.length,O,Y,$,q,J,W;for(N*=N,R=0;R<M;++R)J=i[R],O=T-J.x,Y=A-(J.y||0),$=E-(J.z||0),q=O*O+Y*Y+$*$,q<N&&(W=J,N=q);return W},on:function(w,T){return arguments.length>1?(g.on(w,T),n):g.on(w)}}}function UJ(){var i,e,r,n,a,o=Li(-30),c,h=1,u=1/0,f=.81;function p(v){var C,_=i.length,w=(e===1?M1(i,sx):e===2?Ov(i,sx,ZT):e===3?N1(i,sx,ZT,zJ):null).visitAfter(x);for(a=v,C=0;C<_;++C)r=i[C],w.visit(y)}function g(){if(i){var v,C=i.length,_;for(c=new Array(C),v=0;v<C;++v)_=i[v],c[_.index]=+o(_,v,i)}}function x(v){var C=0,_,w,T=0,A,E,N,R,M=v.length;if(M){for(A=E=N=R=0;R<M;++R)(_=v[R])&&(w=Math.abs(_.value))&&(C+=_.value,T+=w,A+=w*(_.x||0),E+=w*(_.y||0),N+=w*(_.z||0));C*=Math.sqrt(4/M),v.x=A/T,e>1&&(v.y=E/T),e>2&&(v.z=N/T)}else{_=v,_.x=_.data.x,e>1&&(_.y=_.data.y),e>2&&(_.z=_.data.z);do C+=c[_.data.index];while(_=_.next)}v.value=C}function y(v,C,_,w,T){if(!v.value)return!0;var A=[_,w,T][e-1],E=v.x-r.x,N=e>1?v.y-r.y:0,R=e>2?v.z-r.z:0,M=A-C,O=E*E+N*N+R*R;if(M*M/f<O)return O<u&&(E===0&&(E=gn(n),O+=E*E),e>1&&N===0&&(N=gn(n),O+=N*N),e>2&&R===0&&(R=gn(n),O+=R*R),O<h&&(O=Math.sqrt(h*O)),r.vx+=E*v.value*a/O,e>1&&(r.vy+=N*v.value*a/O),e>2&&(r.vz+=R*v.value*a/O)),!0;if(v.length||O>=u)return;(v.data!==r||v.next)&&(E===0&&(E=gn(n),O+=E*E),e>1&&N===0&&(N=gn(n),O+=N*N),e>2&&R===0&&(R=gn(n),O+=R*R),O<h&&(O=Math.sqrt(h*O)));do v.data!==r&&(M=c[v.data.index]*a/O,r.vx+=E*M,e>1&&(r.vy+=N*M),e>2&&(r.vz+=R*M));while(v=v.next)}return p.initialize=function(v,...C){i=v,n=C.find(_=>typeof _=="function")||Math.random,e=C.find(_=>[1,2,3].includes(_))||2,g()},p.strength=function(v){return arguments.length?(o=typeof v=="function"?v:Li(+v),g(),p):o},p.distanceMin=function(v){return arguments.length?(h=v*v,p):Math.sqrt(h)},p.distanceMax=function(v){return arguments.length?(u=v*v,p):Math.sqrt(u)},p.theta=function(v){return arguments.length?(f=v*v,p):Math.sqrt(f)},p}function WJ(i,e,r,n){var a,o,c=Li(.1),h,u;typeof i!="function"&&(i=Li(+i)),e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function f(g){for(var x=0,y=a.length;x<y;++x){var v=a[x],C=v.x-e||1e-6,_=(v.y||0)-r||1e-6,w=(v.z||0)-n||1e-6,T=Math.sqrt(C*C+_*_+w*w),A=(u[x]-T)*h[x]*g/T;v.vx+=C*A,o>1&&(v.vy+=_*A),o>2&&(v.vz+=w*A)}}function p(){if(a){var g,x=a.length;for(h=new Array(x),u=new Array(x),g=0;g<x;++g)u[g]=+i(a[g],g,a),h[g]=isNaN(u[g])?0:+c(a[g],g,a)}}return f.initialize=function(g,...x){a=g,o=x.find(y=>[1,2,3].includes(y))||2,p()},f.strength=function(g){return arguments.length?(c=typeof g=="function"?g:Li(+g),p(),f):c},f.radius=function(g){return arguments.length?(i=typeof g=="function"?g:Li(+g),p(),f):i},f.x=function(g){return arguments.length?(e=+g,f):e},f.y=function(g){return arguments.length?(r=+g,f):r},f.z=function(g){return arguments.length?(n=+g,f):n},f}function YJ(i){var e=Li(.1),r,n,a;typeof i!="function"&&(i=Li(i==null?0:+i));function o(h){for(var u=0,f=r.length,p;u<f;++u)p=r[u],p.vx+=(a[u]-p.x)*n[u]*h}function c(){if(r){var h,u=r.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+i(r[h],h,r))?0:+e(r[h],h,r)}}return o.initialize=function(h){r=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:Li(+h),c(),o):e},o.x=function(h){return arguments.length?(i=typeof h=="function"?h:Li(+h),c(),o):i},o}function GJ(i){var e=Li(.1),r,n,a;typeof i!="function"&&(i=Li(i==null?0:+i));function o(h){for(var u=0,f=r.length,p;u<f;++u)p=r[u],p.vy+=(a[u]-p.y)*n[u]*h}function c(){if(r){var h,u=r.length;for(n=new Array(u),a=new Array(u),h=0;h<u;++h)n[h]=isNaN(a[h]=+i(r[h],h,r))?0:+e(r[h],h,r)}}return o.initialize=function(h){r=h,c()},o.strength=function(h){return arguments.length?(e=typeof h=="function"?h:Li(+h),c(),o):e},o.y=function(h){return arguments.length?(i=typeof h=="function"?h:Li(+h),c(),o):i},o}const{abs:Cu,cos:Qa,sin:mc,acos:VJ,atan2:ku,sqrt:Ks,pow:fn}=Math;function _u(i){return i<0?-fn(-i,1/3):fn(i,1/3)}const yO=Math.PI,xp=2*yO,Js=yO/2,XJ=1e-6,ox=Number.MAX_SAFE_INTEGER||9007199254740991,lx=Number.MIN_SAFE_INTEGER||-9007199254740991,QJ={x:0,y:0,z:0},Tt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(i,e){const r=e(i);let n=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(n+=r.z*r.z),Ks(n)},compute:function(i,e,r){if(i===0)return e[0].t=0,e[0];const n=e.length-1;if(i===1)return e[n].t=1,e[n];const a=1-i;let o=e;if(n===0)return e[0].t=i,e[0];if(n===1){const h={x:a*o[0].x+i*o[1].x,y:a*o[0].y+i*o[1].y,t:i};return r&&(h.z=a*o[0].z+i*o[1].z),h}if(n<4){let h=a*a,u=i*i,f,p,g,x=0;n===2?(o=[o[0],o[1],o[2],QJ],f=h,p=a*i*2,g=u):n===3&&(f=h*a,p=h*i*3,g=a*u*3,x=i*u);const y={x:f*o[0].x+p*o[1].x+g*o[2].x+x*o[3].x,y:f*o[0].y+p*o[1].y+g*o[2].y+x*o[3].y,t:i};return r&&(y.z=f*o[0].z+p*o[1].z+g*o[2].z+x*o[3].z),y}const c=JSON.parse(JSON.stringify(e));for(;c.length>1;){for(let h=0;h<c.length-1;h++)c[h]={x:c[h].x+(c[h+1].x-c[h].x)*i,y:c[h].y+(c[h+1].y-c[h].y)*i},typeof c[h].z<"u"&&(c[h].z=c[h].z+(c[h+1].z-c[h].z)*i);c.splice(c.length-1,1)}return c[0].t=i,c[0]},computeWithRatios:function(i,e,r,n){const a=1-i,o=r,c=e;let h=o[0],u=o[1],f=o[2],p=o[3],g;if(h*=a,u*=i,c.length===2)return g=h+u,{x:(h*c[0].x+u*c[1].x)/g,y:(h*c[0].y+u*c[1].y)/g,z:n?(h*c[0].z+u*c[1].z)/g:!1,t:i};if(h*=a,u*=2*a,f*=i*i,c.length===3)return g=h+u+f,{x:(h*c[0].x+u*c[1].x+f*c[2].x)/g,y:(h*c[0].y+u*c[1].y+f*c[2].y)/g,z:n?(h*c[0].z+u*c[1].z+f*c[2].z)/g:!1,t:i};if(h*=a,u*=1.5*a,f*=3*a,p*=i*i*i,c.length===4)return g=h+u+f+p,{x:(h*c[0].x+u*c[1].x+f*c[2].x+p*c[3].x)/g,y:(h*c[0].y+u*c[1].y+f*c[2].y+p*c[3].y)/g,z:n?(h*c[0].z+u*c[1].z+f*c[2].z+p*c[3].z)/g:!1,t:i}},derive:function(i,e){const r=[];for(let n=i,a=n.length,o=a-1;a>1;a--,o--){const c=[];for(let h=0,u;h<o;h++)u={x:o*(n[h+1].x-n[h].x),y:o*(n[h+1].y-n[h].y)},e&&(u.z=o*(n[h+1].z-n[h].z)),c.push(u);r.push(c),n=c}return r},between:function(i,e,r){return e<=i&&i<=r||Tt.approximately(i,e)||Tt.approximately(i,r)},approximately:function(i,e,r){return Cu(i-e)<=(r||XJ)},length:function(i){const r=Tt.Tvalues.length;let n=0;for(let a=0,o;a<r;a++)o=.5*Tt.Tvalues[a]+.5,n+=Tt.Cvalues[a]*Tt.arcfn(o,i);return .5*n},map:function(i,e,r,n,a){const o=r-e,c=a-n,h=i-e,u=h/o;return n+c*u},lerp:function(i,e,r){const n={x:e.x+i*(r.x-e.x),y:e.y+i*(r.y-e.y)};return e.z!==void 0&&r.z!==void 0&&(n.z=e.z+i*(r.z-e.z)),n},pointToString:function(i){let e=i.x+"/"+i.y;return typeof i.z<"u"&&(e+="/"+i.z),e},pointsToString:function(i){return"["+i.map(Tt.pointToString).join(", ")+"]"},copy:function(i){return JSON.parse(JSON.stringify(i))},angle:function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=r.x-i.x,c=r.y-i.y,h=n*c-a*o,u=n*o+a*c;return ku(h,u)},round:function(i,e){const r=""+i,n=r.indexOf(".");return parseFloat(r.substring(0,n+1+e))},dist:function(i,e){const r=i.x-e.x,n=i.y-e.y;return Ks(r*r+n*n)},closest:function(i,e){let r=fn(2,63),n,a;return i.forEach(function(o,c){a=Tt.dist(e,o),a<r&&(r=a,n=c)}),{mdist:r,mpos:n}},abcratio:function(i,e){if(e!==2&&e!==3)return!1;if(typeof i>"u")i=.5;else if(i===0||i===1)return i;const r=fn(i,e)+fn(1-i,e),n=r-1;return Cu(n/r)},projectionratio:function(i,e){if(e!==2&&e!==3)return!1;if(typeof i>"u")i=.5;else if(i===0||i===1)return i;const r=fn(1-i,e),n=fn(i,e)+r;return r/n},lli8:function(i,e,r,n,a,o,c,h){const u=(i*n-e*r)*(a-c)-(i-r)*(a*h-o*c),f=(i*n-e*r)*(o-h)-(e-n)*(a*h-o*c),p=(i-r)*(o-h)-(e-n)*(a-c);return p==0?!1:{x:u/p,y:f/p}},lli4:function(i,e,r,n){const a=i.x,o=i.y,c=e.x,h=e.y,u=r.x,f=r.y,p=n.x,g=n.y;return Tt.lli8(a,o,c,h,u,f,p,g)},lli:function(i,e){return Tt.lli4(i,i.c,e,e.c)},makeline:function(i,e){return new Ke(i.x,i.y,(i.x+e.x)/2,(i.y+e.y)/2,e.x,e.y)},findbbox:function(i){let e=ox,r=ox,n=lx,a=lx;return i.forEach(function(o){const c=o.bbox();e>c.x.min&&(e=c.x.min),r>c.y.min&&(r=c.y.min),n<c.x.max&&(n=c.x.max),a<c.y.max&&(a=c.y.max)}),{x:{min:e,mid:(e+n)/2,max:n,size:n-e},y:{min:r,mid:(r+a)/2,max:a,size:a-r}}},shapeintersections:function(i,e,r,n,a){if(!Tt.bboxoverlap(e,n))return[];const o=[],c=[i.startcap,i.forward,i.back,i.endcap],h=[r.startcap,r.forward,r.back,r.endcap];return c.forEach(function(u){u.virtual||h.forEach(function(f){if(f.virtual)return;const p=u.intersects(f,a);p.length>0&&(p.c1=u,p.c2=f,p.s1=i,p.s2=r,o.push(p))})}),o},makeshape:function(i,e,r){const n=e.points.length,a=i.points.length,o=Tt.makeline(e.points[n-1],i.points[0]),c=Tt.makeline(i.points[a-1],e.points[0]),h={startcap:o,forward:i,back:e,endcap:c,bbox:Tt.findbbox([o,i,e,c])};return h.intersections=function(u){return Tt.shapeintersections(h,h.bbox,u,u.bbox,r)},h},getminmax:function(i,e,r){if(!r)return{min:0,max:0};let n=ox,a=lx,o,c;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let h=0,u=r.length;h<u;h++)o=r[h],c=i.get(o),c[e]<n&&(n=c[e]),c[e]>a&&(a=c[e]);return{min:n,mid:(n+a)/2,max:a,size:a-n}},align:function(i,e){const r=e.p1.x,n=e.p1.y,a=-ku(e.p2.y-n,e.p2.x-r),o=function(c){return{x:(c.x-r)*Qa(a)-(c.y-n)*mc(a),y:(c.x-r)*mc(a)+(c.y-n)*Qa(a)}};return i.map(o)},roots:function(i,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=i.length-1,n=Tt.align(i,e),a=function(M){return 0<=M&&M<=1};if(r===2){const M=n[0].y,O=n[1].y,Y=n[2].y,$=M-2*O+Y;if($!==0){const q=-Ks(O*O-M*Y),J=-M+O,W=-(q+J)/$,F=-(-q+J)/$;return[W,F].filter(a)}else if(O!==Y&&$===0)return[(2*O-Y)/(2*O-2*Y)].filter(a);return[]}const o=n[0].y,c=n[1].y,h=n[2].y,u=n[3].y;let f=-o+3*c-3*h+u,p=3*o-6*c+3*h,g=-3*o+3*c,x=o;if(Tt.approximately(f,0)){if(Tt.approximately(p,0))return Tt.approximately(g,0)?[]:[-x/g].filter(a);const M=Ks(g*g-4*p*x),O=2*p;return[(M-g)/O,(-g-M)/O].filter(a)}p/=f,g/=f,x/=f;const y=(3*g-p*p)/3,v=y/3,C=(2*p*p*p-9*p*g+27*x)/27,_=C/2,w=_*_+v*v*v;let T,A,E,N,R;if(w<0){const M=-y/3,O=M*M*M,Y=Ks(O),$=-C/(2*Y),q=$<-1?-1:$>1?1:$,J=VJ(q),W=_u(Y),F=2*W;return E=F*Qa(J/3)-p/3,N=F*Qa((J+xp)/3)-p/3,R=F*Qa((J+2*xp)/3)-p/3,[E,N,R].filter(a)}else{if(w===0)return T=_<0?_u(-_):-_u(_),E=2*T-p/3,N=-T-p/3,[E,N].filter(a);{const M=Ks(w);return T=_u(-_+M),A=_u(_+M),[T-A-p/3].filter(a)}}},droots:function(i){if(i.length===3){const e=i[0],r=i[1],n=i[2],a=e-2*r+n;if(a!==0){const o=-Ks(r*r-e*n),c=-e+r,h=-(o+c)/a,u=-(-o+c)/a;return[h,u]}else if(r!==n&&a===0)return[(2*r-n)/(2*(r-n))];return[]}if(i.length===2){const e=i[0],r=i[1];return e!==r?[e/(e-r)]:[]}return[]},curvature:function(i,e,r,n,a){let o,c,h,u,f=0,p=0;const g=Tt.compute(i,e),x=Tt.compute(i,r),y=g.x*g.x+g.y*g.y;if(n?(o=Ks(fn(g.y*x.z-x.y*g.z,2)+fn(g.z*x.x-x.z*g.x,2)+fn(g.x*x.y-x.x*g.y,2)),c=fn(y+g.z*g.z,3/2)):(o=g.x*x.y-g.y*x.x,c=fn(y,3/2)),o===0||c===0)return{k:0,r:0};if(f=o/c,p=c/o,!a){const v=Tt.curvature(i-.001,e,r,n,!0).k,C=Tt.curvature(i+.001,e,r,n,!0).k;u=(C-f+(f-v))/2,h=(Cu(C-f)+Cu(f-v))/2}return{k:f,r:p,dk:u,adk:h}},inflections:function(i){if(i.length<4)return[];const e=Tt.align(i,{p1:i[0],p2:i.slice(-1)[0]}),r=e[2].x*e[1].y,n=e[3].x*e[1].y,a=e[1].x*e[2].y,o=e[3].x*e[2].y,c=18*(-3*r+2*n+3*a-o),h=18*(3*r-n-3*a),u=18*(a-r);if(Tt.approximately(c,0)){if(!Tt.approximately(h,0)){let x=-u/h;if(0<=x&&x<=1)return[x]}return[]}const f=2*c;if(Tt.approximately(f,0))return[];const p=h*h-4*c*u;if(p<0)return[];const g=Math.sqrt(p);return[(g-h)/f,-(h+g)/f].filter(function(x){return 0<=x&&x<=1})},bboxoverlap:function(i,e){const r=["x","y"],n=r.length;for(let a=0,o,c,h,u;a<n;a++)if(o=r[a],c=i[o].mid,h=e[o].mid,u=(i[o].size+e[o].size)/2,Cu(c-h)>=u)return!1;return!0},expandbox:function(i,e){e.x.min<i.x.min&&(i.x.min=e.x.min),e.y.min<i.y.min&&(i.y.min=e.y.min),e.z&&e.z.min<i.z.min&&(i.z.min=e.z.min),e.x.max>i.x.max&&(i.x.max=e.x.max),e.y.max>i.y.max&&(i.y.max=e.y.max),e.z&&e.z.max>i.z.max&&(i.z.max=e.z.max),i.x.mid=(i.x.min+i.x.max)/2,i.y.mid=(i.y.min+i.y.max)/2,i.z&&(i.z.mid=(i.z.min+i.z.max)/2),i.x.size=i.x.max-i.x.min,i.y.size=i.y.max-i.y.min,i.z&&(i.z.size=i.z.max-i.z.min)},pairiteration:function(i,e,r){const n=i.bbox(),a=e.bbox(),o=1e5,c=r||.5;if(n.x.size+n.y.size<c&&a.x.size+a.y.size<c)return[(o*(i._t1+i._t2)/2|0)/o+"/"+(o*(e._t1+e._t2)/2|0)/o];let h=i.split(.5),u=e.split(.5),f=[{left:h.left,right:u.left},{left:h.left,right:u.right},{left:h.right,right:u.right},{left:h.right,right:u.left}];f=f.filter(function(g){return Tt.bboxoverlap(g.left.bbox(),g.right.bbox())});let p=[];return f.length===0||(f.forEach(function(g){p=p.concat(Tt.pairiteration(g.left,g.right,c))}),p=p.filter(function(g,x){return p.indexOf(g)===x})),p},getccenter:function(i,e,r){const n=e.x-i.x,a=e.y-i.y,o=r.x-e.x,c=r.y-e.y,h=n*Qa(Js)-a*mc(Js),u=n*mc(Js)+a*Qa(Js),f=o*Qa(Js)-c*mc(Js),p=o*mc(Js)+c*Qa(Js),g=(i.x+e.x)/2,x=(i.y+e.y)/2,y=(e.x+r.x)/2,v=(e.y+r.y)/2,C=g+h,_=x+u,w=y+f,T=v+p,A=Tt.lli8(g,x,C,_,y,v,w,T),E=Tt.dist(A,i);let N=ku(i.y-A.y,i.x-A.x),R=ku(e.y-A.y,e.x-A.x),M=ku(r.y-A.y,r.x-A.x),O;return N<M?((N>R||R>M)&&(N+=xp),N>M&&(O=M,M=N,N=O)):M<R&&R<N?(O=M,M=N,N=O):M+=xp,A.s=N,A.e=M,A.r=E,A},numberSort:function(i,e){return i-e}};class Ku{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return Tt.pointsToString(e.points)}).join(", ")+"]"}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,r){return e+r})}curve(e){return this.curves[e]}bbox(){const e=this.curves;for(var r=e[0].bbox(),n=1;n<e.length;n++)Tt.expandbox(r,e[n].bbox());return r}offset(e){const r=[];return this.curves.forEach(function(n){r.push(...n.offset(e))}),new Ku(r)}}const{abs:Su,min:KT,max:JT,cos:ZJ,sin:KJ,acos:JJ,sqrt:wu}=Math,ttt=Math.PI;class Ke{constructor(e){let r=e&&e.forEach?e:Array.from(arguments).slice(),n=!1;if(typeof r[0]=="object"){n=r.length;const y=[];r.forEach(function(v){["x","y","z"].forEach(function(C){typeof v[C]<"u"&&y.push(v[C])})}),r=y}let a=!1;const o=r.length;if(n){if(n>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const c=this._3d=!a&&(o===9||o===12)||e&&e[0]&&typeof e[0].z<"u",h=this.points=[];for(let y=0,v=c?3:2;y<o;y+=v){var u={x:r[y],y:r[y+1]};c&&(u.z=r[y+2]),h.push(u)}const f=this.order=h.length-1,p=this.dims=["x","y"];c&&p.push("z"),this.dimlen=p.length;const g=Tt.align(h,{p1:h[0],p2:h[f]}),x=Tt.dist(h[0],h[f]);this._linear=g.reduce((y,v)=>y+Su(v.y),0)<x/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,r,n,a){if(typeof a>"u"&&(a=.5),a===0)return new Ke(r,r,n);if(a===1)return new Ke(e,r,r);const o=Ke.getABC(2,e,r,n,a);return new Ke(e,o.A,n)}static cubicFromPoints(e,r,n,a,o){typeof a>"u"&&(a=.5);const c=Ke.getABC(3,e,r,n,a);typeof o>"u"&&(o=Tt.dist(r,c.C));const h=o*(1-a)/a,u=Tt.dist(e,n),f=(n.x-e.x)/u,p=(n.y-e.y)/u,g=o*f,x=o*p,y=h*f,v=h*p,C={x:r.x-g,y:r.y-x},_={x:r.x+y,y:r.y+v},w=c.A,T={x:w.x+(C.x-w.x)/(1-a),y:w.y+(C.y-w.y)/(1-a)},A={x:w.x+(_.x-w.x)/a,y:w.y+(_.y-w.y)/a},E={x:e.x+(T.x-e.x)/a,y:e.y+(T.y-e.y)/a},N={x:n.x+(A.x-n.x)/(1-a),y:n.y+(A.y-n.y)/(1-a)};return new Ke(e,E,N,n)}static getUtils(){return Tt}getUtils(){return Ke.getUtils()}static get PolyBezier(){return Ku}valueOf(){return this.toString()}toString(){return Tt.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,r=e[0].x,n=e[0].y,a=["M",r,n,this.order===2?"Q":"C"];for(let o=1,c=e.length;o<c;o++)a.push(e[o].x),a.push(e[o].y);return a.join(" ")}setRatios(e){if(e.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=e,this._lut=[]}verify(){const e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,r){return""+r+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=Tt.derive(this.points,this._3d),this.computedirection()}computedirection(){const e=this.points,r=Tt.angle(e[0],e[this.order],e[1]);this.clockwise=r>0}length(){return Tt.length(this.derivative.bind(this))}static getABC(e=2,r,n,a,o=.5){const c=Tt.projectionratio(o,e),h=1-c,u={x:c*r.x+h*a.x,y:c*r.y+h*a.y},f=Tt.abcratio(o,e);return{A:{x:n.x+(n.x-u.x)/f,y:n.y+(n.y-u.y)/f},B:n,C:u,S:r,E:a}}getABC(e,r){r=r||this.get(e);let n=this.points[0],a=this.points[this.order];return Ke.getABC(this.order,n,r,a,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let r=0,n,a;r<e;r++)a=r/(e-1),n=this.compute(a),n.t=a,this._lut.push(n);return this._lut}on(e,r){r=r||5;const n=this.getLUT(),a=[];for(let o=0,c,h=0;o<n.length;o++)c=n[o],Tt.dist(c,e)<r&&(a.push(c),h+=o/n.length);return a.length?t/=a.length:!1}project(e){const r=this.getLUT(),n=r.length-1,a=Tt.closest(r,e),o=a.mpos,c=(o-1)/n,h=(o+1)/n,u=.1/n;let f=a.mdist,p=c,g=p,x;f+=1;for(let y;p<h+u;p+=u)x=this.compute(p),y=Tt.dist(e,x),y<f&&(f=y,g=p);return g=g<0?0:g>1?1:g,x=this.compute(g),x.t=g,x.d=f,x}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Tt.computeWithRatios(e,this.points,this.ratios,this._3d):Tt.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,r=[e[0]],n=e.length;for(let a=1,o,c;a<n;a++)o=e[a],c=e[a-1],r[a]={x:(n-a)/n*o.x+a/n*c.x,y:(n-a)/n*o.y+a/n*c.y};return r[n]=e[n-1],new Ke(r)}derivative(e){return Tt.compute(e,this.dpoints[0],this._3d)}dderivative(e){return Tt.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new Ke(Tt.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return Tt.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Tt.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){const r=this.derivative(e),n=wu(r.x*r.x+r.y*r.y);return{t:e,x:-r.y/n,y:r.x/n}}__normal3(e){const r=this.derivative(e),n=this.derivative(e+.01),a=wu(r.x*r.x+r.y*r.y+r.z*r.z),o=wu(n.x*n.x+n.y*n.y+n.z*n.z);r.x/=a,r.y/=a,r.z/=a,n.x/=o,n.y/=o,n.z/=o;const c={x:n.y*r.z-n.z*r.y,y:n.z*r.x-n.x*r.z,z:n.x*r.y-n.y*r.x},h=wu(c.x*c.x+c.y*c.y+c.z*c.z);c.x/=h,c.y/=h,c.z/=h;const u=[c.x*c.x,c.x*c.y-c.z,c.x*c.z+c.y,c.x*c.y+c.z,c.y*c.y,c.y*c.z-c.x,c.x*c.z-c.y,c.y*c.z+c.x,c.z*c.z];return{t:e,x:u[0]*r.x+u[1]*r.y+u[2]*r.z,y:u[3]*r.x+u[4]*r.y+u[5]*r.z,z:u[6]*r.x+u[7]*r.y+u[8]*r.z}}hull(e){let r=this.points,n=[],a=[],o=0;for(a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],this.order===3&&(a[o++]=r[3]);r.length>1;){n=[];for(let c=0,h,u=r.length-1;c<u;c++)h=Tt.lerp(e,r[c],r[c+1]),a[o++]=h,n.push(h);r=n}return a}split(e,r){if(e===0&&r)return this.split(r).left;if(r===1)return this.split(e).right;const n=this.hull(e),a={left:this.order===2?new Ke([n[0],n[3],n[5]]):new Ke([n[0],n[4],n[7],n[9]]),right:this.order===2?new Ke([n[5],n[4],n[2]]):new Ke([n[9],n[8],n[6],n[3]]),span:n};return a.left._t1=Tt.map(0,0,1,this._t1,this._t2),a.left._t2=Tt.map(e,0,1,this._t1,this._t2),a.right._t1=Tt.map(e,0,1,this._t1,this._t2),a.right._t2=Tt.map(1,0,1,this._t1,this._t2),r?(r=Tt.map(r,e,1,0,1),a.right.split(r).left):a}extrema(){const e={};let r=[];return this.dims.forEach((function(n){let a=function(c){return c[n]},o=this.dpoints[0].map(a);e[n]=Tt.droots(o),this.order===3&&(o=this.dpoints[1].map(a),e[n]=e[n].concat(Tt.droots(o))),e[n]=e[n].filter(function(c){return c>=0&&c<=1}),r=r.concat(e[n].sort(Tt.numberSort))}).bind(this)),e.values=r.sort(Tt.numberSort).filter(function(n,a){return r.indexOf(n)===a}),e}bbox(){const e=this.extrema(),r={};return this.dims.forEach((function(n){r[n]=Tt.getminmax(this,n,e[n])}).bind(this)),r}overlaps(e){const r=this.bbox(),n=e.bbox();return Tt.bboxoverlap(r,n)}offset(e,r){if(typeof r<"u"){const n=this.get(e),a=this.normal(e),o={c:n,n:a,x:n.x+a.x*r,y:n.y+a.y*r};return this._3d&&(o.z=n.z+a.z*r),o}if(this._linear){const n=this.normal(0),a=this.points.map(function(o){const c={x:o.x+e*n.x,y:o.y+e*n.y};return o.z&&n.z&&(c.z=o.z+e*n.z),c});return[new Ke(a)]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(this.order===3){const a=Tt.angle(this.points[0],this.points[3],this.points[1]),o=Tt.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&o<0||a<0&&o>0)return!1}const e=this.normal(0),r=this.normal(1);let n=e.x*r.x+e.y*r.y;return this._3d&&(n+=e.z*r.z),Su(JJ(n))<ttt/3}reduce(){let e,r=0,n=0,a=.01,o,c=[],h=[],u=this.extrema().values;for(u.indexOf(0)===-1&&(u=[0].concat(u)),u.indexOf(1)===-1&&u.push(1),r=u[0],e=1;e<u.length;e++)n=u[e],o=this.split(r,n),o._t1=r,o._t2=n,c.push(o),r=n;return c.forEach(function(f){for(r=0,n=0;n<=1;)for(n=r+a;n<=1+a;n+=a)if(o=f.split(r,n),!o.simple()){if(n-=a,Su(r-n)<a)return[];o=f.split(r,n),o._t1=Tt.map(r,0,1,f._t1,f._t2),o._t2=Tt.map(n,0,1,f._t1,f._t2),h.push(o),r=n;break}r<1&&(o=f.split(r,1),o._t1=Tt.map(r,0,1,f._t1,f._t2),o._t2=f._t2,h.push(o))}),h}translate(e,r,n){n=typeof n=="number"?n:r;const a=this.order;let o=this.points.map((c,h)=>(1-h/a)*r+h/a*n);return new Ke(this.points.map((c,h)=>({x:c.x+e.x*o[h],y:c.y+e.y*o[h]})))}scale(e){const r=this.order;let n=!1;if(typeof e=="function"&&(n=e),n&&r===2)return this.raise().scale(n);const a=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const c=n?n(0):e,h=n?n(1):e,u=[this.offset(0,10),this.offset(1,10)],f=[],p=Tt.lli4(u[0],u[0].c,u[1],u[1].c);if(!p)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(g){const x=f[g*r]=Tt.copy(o[g*r]);x.x+=(g?h:c)*u[g].n.x,x.y+=(g?h:c)*u[g].n.y}),n?([0,1].forEach(function(g){if(!(r===2&&g)){var x=o[g+1],y={x:x.x-p.x,y:x.y-p.y},v=n?n((g+1)/r):e;n&&!a&&(v=-v);var C=wu(y.x*y.x+y.y*y.y);y.x/=C,y.y/=C,f[g+1]={x:x.x+v*y.x,y:x.y+v*y.y}}}),new Ke(f)):([0,1].forEach(g=>{if(r===2&&g)return;const x=f[g*r],y=this.derivative(g),v={x:x.x+y.x,y:x.y+y.y};f[g+1]=Tt.lli4(x,v,p,o[g+1])}),new Ke(f))}outline(e,r,n,a){if(r=r===void 0?e:r,this._linear){const N=this.normal(0),R=this.points[0],M=this.points[this.points.length-1];let O,Y,$;n===void 0&&(n=e,a=r),O={x:R.x+N.x*e,y:R.y+N.y*e},$={x:M.x+N.x*n,y:M.y+N.y*n},Y={x:(O.x+$.x)/2,y:(O.y+$.y)/2};const q=[O,Y,$];O={x:R.x-N.x*r,y:R.y-N.y*r},$={x:M.x-N.x*a,y:M.y-N.y*a},Y={x:(O.x+$.x)/2,y:(O.y+$.y)/2};const J=[$,Y,O],W=Tt.makeline(J[2],q[0]),F=Tt.makeline(q[2],J[0]),U=[W,new Ke(q),F,new Ke(J)];return new Ku(U)}const o=this.reduce(),c=o.length,h=[];let u=[],f,p=0,g=this.length();const x=typeof n<"u"&&typeof a<"u";function y(N,R,M,O,Y){return function($){const q=O/M,J=(O+Y)/M,W=R-N;return Tt.map($,0,1,N+q*W,N+J*W)}}o.forEach(function(N){const R=N.length();x?(h.push(N.scale(y(e,n,g,p,R))),u.push(N.scale(y(-r,-a,g,p,R)))):(h.push(N.scale(e)),u.push(N.scale(-r))),p+=R}),u=u.map(function(N){return f=N.points,f[3]?N.points=[f[3],f[2],f[1],f[0]]:N.points=[f[2],f[1],f[0]],N}).reverse();const v=h[0].points[0],C=h[c-1].points[h[c-1].points.length-1],_=u[c-1].points[u[c-1].points.length-1],w=u[0].points[0],T=Tt.makeline(_,v),A=Tt.makeline(C,w),E=[T].concat(h).concat([A]).concat(u);return new Ku(E)}outlineshapes(e,r,n){r=r||e;const a=this.outline(e,r).curves,o=[];for(let c=1,h=a.length;c<h/2;c++){const u=Tt.makeshape(a[c],a[h-c],n);u.startcap.virtual=c>1,u.endcap.virtual=c<h/2-1,o.push(u)}return o}intersects(e,r){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof Ke&&(e=e.reduce()),this.curveintersects(this.reduce(),e,r)):this.selfintersects(r)}lineIntersects(e){const r=KT(e.p1.x,e.p2.x),n=KT(e.p1.y,e.p2.y),a=JT(e.p1.x,e.p2.x),o=JT(e.p1.y,e.p2.y);return Tt.roots(this.points,e).filter(c=>{var h=this.get(c);return Tt.between(h.x,r,a)&&Tt.between(h.y,n,o)})}selfintersects(e){const r=this.reduce(),n=r.length-2,a=[];for(let o=0,c,h,u;o<n;o++)h=r.slice(o,o+1),u=r.slice(o+2),c=this.curveintersects(h,u,e),a.push(...c);return a}curveintersects(e,r,n){const a=[];e.forEach(function(c){r.forEach(function(h){c.overlaps(h)&&a.push({left:c,right:h})})});let o=[];return a.forEach(function(c){const h=Tt.pairiteration(c.left,c.right,n);h.length>0&&(o=o.concat(h))}),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,r,n,a){const o=(a-n)/4,c=this.get(n+o),h=this.get(a-o),u=Tt.dist(e,r),f=Tt.dist(e,c),p=Tt.dist(e,h);return Su(f-u)+Su(p-u)}_iterate(e,r){let n=0,a=1,o;do{o=0,a=1;let c=this.get(n),h,u,f,p,g=!1,x=!1,y,v=a,C=1;do if(x=g,p=f,v=(n+a)/2,h=this.get(v),u=this.get(a),f=Tt.getccenter(c,h,u),f.interval={start:n,end:a},g=this._error(f,c,n,a)<=e,y=x&&!g,y||(C=a),g){if(a>=1){if(f.interval.end=C=1,p=f,a>1){let w={x:f.x+f.r*ZJ(f.e),y:f.y+f.r*KJ(f.e)};f.e+=Tt.angle({x:f.x,y:f.y},w,this.get(1))}break}a=a+(a-n)/2}else a=v;while(!y&&o++<100);if(o>=100)break;p=p||f,r.push(p),n=C}while(a<1);return r}}function Kb(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function ett(i){if(Array.isArray(i))return i}function itt(i){if(Array.isArray(i))return Kb(i)}function rtt(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function ntt(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function att(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
447
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function stt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
448
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ott(i,e){if(i==null)return{};var r,n,a=ltt(i,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(n=0;n<o.length;n++)r=o[n],e.includes(r)||{}.propertyIsEnumerable.call(i,r)&&(a[r]=i[r])}return a}function ltt(i,e){if(i==null)return{};var r={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.includes(n))continue;r[n]=i[n]}return r}function ctt(i,e){return ett(i)||ntt(i,e)||xO(i,e)||att()}function htt(i){return itt(i)||rtt(i)||xO(i)||stt()}function utt(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function ftt(i){var e=utt(i,"string");return typeof e=="symbol"?e:e+""}function xO(i,e){if(i){if(typeof i=="string")return Kb(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kb(i,e):void 0}}var dtt=(function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(e instanceof Array?e.length?e:[void 0]:[e]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),o=i.reduce(function(h,u){var f=h,p=u;return a.forEach(function(g,x){var y=g.keyAccessor,v=g.isProp,C;if(v){var _=p,w=_[y],T=ott(_,[y].map(ftt));C=w,p=T}else C=y(p,x);x+1<a.length?(f.hasOwnProperty(C)||(f[C]={}),f=f[C]):r?(f.hasOwnProperty(C)||(f[C]=[]),f[C].push(p)):f[C]=p}),h},{});r instanceof Function&&(function h(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;f===a.length?Object.keys(u).forEach(function(p){return u[p]=r(u[p])}):Object.values(u).forEach(function(p){return h(p,f+1)})})(o);var c=o;return n&&(c=[],(function h(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];f.length===a.length?c.push({keys:f,vals:u}):Object.entries(u).forEach(function(p){var g=ctt(p,2),x=g[0],y=g[1];return h(y,[].concat(htt(f),[x]))})})(o),e instanceof Array&&e.length===0&&c.length===1&&(c[0].keys=[])),c});function ptt(i,e){e===void 0&&(e={});var r=e.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",r==="top"&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}}var gtt=`.force-graph-container canvas {
449
- display: block;
450
- user-select: none;
451
- outline: none;
452
- -webkit-tap-highlight-color: transparent;
453
- }
454
-
455
- .force-graph-container .clickable {
456
- cursor: pointer;
457
- }
458
-
459
- .force-graph-container .grabbable {
460
- cursor: move;
461
- cursor: grab;
462
- cursor: -moz-grab;
463
- cursor: -webkit-grab;
464
- }
465
-
466
- .force-graph-container .grabbable:active {
467
- cursor: grabbing;
468
- cursor: -moz-grabbing;
469
- cursor: -webkit-grabbing;
470
- }
471
- `;ptt(gtt);function Jb(i,e){(e==null||e>i.length)&&(e=i.length);for(var r=0,n=Array(e);r<e;r++)n[r]=i[r];return n}function mtt(i){if(Array.isArray(i))return i}function ytt(i){if(Array.isArray(i))return Jb(i)}function tB(i,e,r){if(bO())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(i.bind.apply(i,n));return a}function yf(i,e,r){return(e=_tt(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r,i}function bO(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bO=function(){return!!i})()}function xtt(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function btt(i,e){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var n,a,o,c,h=[],u=!0,f=!1;try{if(o=(r=r.call(i)).next,e!==0)for(;!(u=(n=o.call(r)).done)&&(h.push(n.value),h.length!==e);u=!0);}catch(p){f=!0,a=p}finally{try{if(!u&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(f)throw a}}return h}}function vtt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
472
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ctt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
473
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eB(i,e){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),r.push.apply(r,n)}return r}function yc(i){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eB(Object(r),!0).forEach(function(n){yf(i,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):eB(Object(r)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(r,n))})}return i}function Ju(i,e){return mtt(i)||btt(i,e)||vO(i,e)||vtt()}function mn(i){return ytt(i)||xtt(i)||vO(i)||Ctt()}function ktt(i,e){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var n=r.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function _tt(i){var e=ktt(i,"string");return typeof e=="symbol"?e:e+""}function tv(i){"@babel/helpers - typeof";return tv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tv(i)}function vO(i,e){if(i){if(typeof i=="string")return Jb(i,e);var r={}.toString.call(i).slice(8,-1);return r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set"?Array.from(i):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jb(i,e):void 0}}var Stt=iE(f7);function iB(i,e,r){!e||typeof r!="string"||i.filter(function(n){return!n[r]}).forEach(function(n){n[r]=Stt(e(n))})}function wtt(i,e){var r=i.nodes,n=i.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.nodeFilter,c=o===void 0?function(){return!0}:o,h=a.onLoopError,u=h===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:h,f={};r.forEach(function(y){return f[e(y)]={data:y,out:[],depth:-1,skip:!c(y)}}),n.forEach(function(y){var v=y.source,C=y.target,_=E(v),w=E(C);if(!f.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!f.hasOwnProperty(w))throw"Missing target node with id: ".concat(w);var T=f[_],A=f[w];T.out.push(A);function E(N){return tv(N)==="object"?e(N):N}});var p=[];x(Object.values(f));var g=Object.assign.apply(Object,[{}].concat(mn(Object.entries(f).filter(function(y){var v=Ju(y,2),C=v[1];return!C.skip}).map(function(y){var v=Ju(y,2),C=v[0],_=v[1];return yf({},C,_.depth)}))));return g;function x(y){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var E=y[w];if(v.indexOf(E)!==-1){var N=[].concat(mn(v.slice(v.indexOf(E))),[E]).map(function(R){return e(R.data)});return p.some(function(R){return R.length===N.length&&R.every(function(M,O){return M===N[O]})})||(p.push(N),u(N)),1}C>E.depth&&(E.depth=C,x(E.out,[].concat(mn(v),[E]),C+(E.skip?0:1)))},w=0,T=y.length;w<T;w++)_()}}var Ttt=2,tr=function(e,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},rB=function(e,r){if(!r.isShadow){var n=Ne(r.linkDirectionalParticles);r.graphData.links.forEach(function(a){var o=Math.round(Math.abs(n(a)));o?a.__photons=mn(Array(o)).map(function(){return{}}):delete a.__photons})}},Og=w1({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,r){r.engineRunning=!1,rB(e,r)}},dagMode:{onChange:function(e,r){!e&&(r.graphData.nodes||[]).forEach(function(n){return n.fx=n.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:tr},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:tr},nodeColor:{default:"color",triggerUpdate:!1,onChange:tr},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:tr},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:tr},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:tr},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:tr},linkColor:{default:"color",triggerUpdate:!1,onChange:tr},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:tr},linkWidth:{default:1,triggerUpdate:!1,onChange:tr},linkCurvature:{default:0,triggerUpdate:!1,onChange:tr},linkCanvasObject:{triggerUpdate:!1,onChange:tr},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:tr},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:tr},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:tr},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:tr},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:rB},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,r){r.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,r,n){return n===void 0?e.forceLayout.force(r):(e.forceLayout.force(r,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&r(),a(),!e.isShadow&&o(),!e.isShadow&&c(),n(),this;function r(){e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick()))}function n(){var h=Ne(e.nodeVisibility),u=Ne(e.nodeVal),f=Ne(e.nodeColor),p=Ne(e.nodeCanvasObjectMode),g=e.ctx,x=e.isShadow/e.globalScale,y=e.graphData.nodes.filter(h);g.save(),y.forEach(function(v){var C=p(v);if(e.nodeCanvasObject&&(C==="before"||C==="replace")&&(e.nodeCanvasObject(v,g,e.globalScale),C==="replace")){g.restore();return}var _=Math.sqrt(Math.max(0,u(v)||1))*e.nodeRelSize+x;g.beginPath(),g.arc(v.x,v.y,_,0,2*Math.PI,!1),g.fillStyle=f(v)||"rgba(31, 120, 180, 0.92)",g.fill(),e.nodeCanvasObject&&C==="after"&&e.nodeCanvasObject(v,e.ctx,e.globalScale)}),g.restore()}function a(){var h=Ne(e.linkVisibility),u=Ne(e.linkColor),f=Ne(e.linkWidth),p=Ne(e.linkLineDash),g=Ne(e.linkCurvature),x=Ne(e.linkCanvasObjectMode),y=e.ctx,v=e.isShadow*2,C=e.graphData.links.filter(h);C.forEach(R);var _=[],w=[],T=C;if(e.linkCanvasObject){var A=[],E=[];C.forEach(function(M){return({before:_,after:w,replace:A}[x(M)]||E).push(M)}),T=[].concat(mn(_),w,E),_=_.concat(A)}y.save(),_.forEach(function(M){return e.linkCanvasObject(M,y,e.globalScale)}),y.restore();var N=dtt(T,[u,f,p]);y.save(),Object.entries(N).forEach(function(M){var O=Ju(M,2),Y=O[0],$=O[1],q=!Y||Y==="undefined"?"rgba(0,0,0,0.15)":Y;Object.entries($).forEach(function(J){var W=Ju(J,2),F=W[0],U=W[1],j=(F||1)/e.globalScale+v;Object.entries(U).forEach(function(I){var H=Ju(I,2);H[0];var V=H[1],Z=p(V[0]);y.beginPath(),V.forEach(function(P){var K=P.source,ot=P.target;if(!(!K||!ot||!K.hasOwnProperty("x")||!ot.hasOwnProperty("x"))){y.moveTo(K.x,K.y);var st=P.__controlPoints;st?y[st.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,mn(st).concat([ot.x,ot.y])):y.lineTo(ot.x,ot.y)}}),y.strokeStyle=q,y.lineWidth=j,y.setLineDash(Z||[]),y.stroke()})})}),y.restore(),y.save(),w.forEach(function(M){return e.linkCanvasObject(M,y,e.globalScale)}),y.restore();function R(M){var O=g(M);if(!O){M.__controlPoints=null;return}var Y=M.source,$=M.target;if(!(!Y||!$||!Y.hasOwnProperty("x")||!$.hasOwnProperty("x"))){var q=Math.sqrt(Math.pow($.x-Y.x,2)+Math.pow($.y-Y.y,2));if(q>0){var J=Math.atan2($.y-Y.y,$.x-Y.x),W=q*O,F={x:(Y.x+$.x)/2+W*Math.cos(J-Math.PI/2),y:(Y.y+$.y)/2+W*Math.sin(J-Math.PI/2)};M.__controlPoints=[F.x,F.y]}else{var U=O*70;M.__controlPoints=[$.x,$.y-U,$.x+U,$.y]}}}}function o(){var h=1.6,u=.2,f=Ne(e.linkDirectionalArrowLength),p=Ne(e.linkDirectionalArrowRelPos),g=Ne(e.linkVisibility),x=Ne(e.linkDirectionalArrowColor||e.linkColor),y=Ne(e.nodeVal),v=e.ctx;v.save(),e.graphData.links.filter(g).forEach(function(C){var _=f(C);if(!(!_||_<0)){var w=C.source,T=C.target;if(!(!w||!T||!w.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var A=Math.sqrt(Math.max(0,y(w)||1))*e.nodeRelSize,E=Math.sqrt(Math.max(0,y(T)||1))*e.nodeRelSize,N=Math.min(1,Math.max(0,p(C))),R=x(C)||"rgba(0,0,0,0.28)",M=_/h/2,O=C.__controlPoints&&tB(Ke,[w.x,w.y].concat(mn(C.__controlPoints),[T.x,T.y])),Y=O?function(j){return O.get(j)}:function(j){return{x:w.x+(T.x-w.x)*j||0,y:w.y+(T.y-w.y)*j||0}},$=O?O.length():Math.sqrt(Math.pow(T.x-w.x,2)+Math.pow(T.y-w.y,2)),q=A+_+($-A-E-_)*N,J=Y(q/$),W=Y((q-_)/$),F=Y((q-_*(1-u))/$),U=Math.atan2(J.y-W.y,J.x-W.x)-Math.PI/2;v.beginPath(),v.moveTo(J.x,J.y),v.lineTo(W.x+M*Math.cos(U),W.y+M*Math.sin(U)),v.lineTo(F.x,F.y),v.lineTo(W.x-M*Math.cos(U),W.y-M*Math.sin(U)),v.fillStyle=R,v.fill()}}}),v.restore()}function c(){var h=Ne(e.linkDirectionalParticles),u=Ne(e.linkDirectionalParticleSpeed),f=Ne(e.linkDirectionalParticleOffset),p=Ne(e.linkDirectionalParticleWidth),g=Ne(e.linkVisibility),x=Ne(e.linkDirectionalParticleColor||e.linkColor),y=e.ctx;y.save(),e.graphData.links.filter(g).forEach(function(v){var C=h(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,w=v.target;if(!(!_||!w||!_.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var T=u(v),A=Math.abs(f(v)),E=v.__photons||[],N=Math.max(0,p(v)/2)/Math.sqrt(e.globalScale),R=x(v)||"rgba(0,0,0,0.28)";y.fillStyle=R;var M=v.__controlPoints?tB(Ke,[_.x,_.y].concat(mn(v.__controlPoints),[w.x,w.y])):null,O=0,Y=!1;E.forEach(function($){var q=!!$.__singleHop;if($.hasOwnProperty("__progressRatio")||($.__progressRatio=q?T<0?1:0:(O+A)/C),!q&&O++,$.__progressRatio+=T,$.__progressRatio>=1||$.__progressRatio<0)if(!q)$.__progressRatio=$.__progressRatio%1,$.__progressRatio<0&&$.__progressRatio++;else{Y=!0;return}var J=$.__progressRatio,W=M?M.get(J):{x:_.x+(w.x-_.x)*J||0,y:_.y+(w.y-_.y)*J||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(W.x,W.y,v,y,e.globalScale):(y.beginPath(),y.arc(W.x,W.y,N,0,2*Math.PI,!1),y.fill())}),Y&&(v.__photons=v.__photons.filter(function($){return!$.__singleHop||$.__progressRatio<=1&&$.__progressRatio>=0}))}}}),y.restore()}},emitParticle:function(e,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:HJ().force("link",RJ()).force("charge",UJ()).force("center",ZK()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,r){r.ctx=e},update:function(e,r){e.engineRunning=!1,e.onUpdate(),e.nodeAutoColorBy!==null&&iB(e.graphData.nodes,Ne(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&iB(e.graphData.links,Ne(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(x){x.source=x[e.linkSource],x.target=x[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id(function(x){return x[e.nodeId]}).links(e.graphData.links);var a=e.dagMode&&wtt(e.graphData,function(x){return x[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),o=Math.max.apply(Math,mn(Object.values(a||[]))),c=e.dagLevelDistance||e.graphData.nodes.length/(o||1)*Ttt*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var h=["lr","rl"].includes(r.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(x){return delete x[h]})}if(["lr","rl","td","bu"].includes(e.dagMode)){var u=["rl","bu"].includes(e.dagMode),f=function(y){return(a[y[e.nodeId]]-o/2)*c*(u?-1:1)},p=["lr","rl"].includes(e.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(x){return x[p]=f(x)})}e.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?WJ(function(x){var y=a[x[e.nodeId]]||-1;return(e.dagMode==="radialin"?o-y:y)*c}).strength(function(x){return e.dagNodeFilter(x)?1:0}):null);for(var g=0;g<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);g++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function CO(i,e){var r=i instanceof Array?i:[i],n=new e;return n._destructor&&n._destructor(),{linkProp:function(o){return{default:n[o](),onChange:function(h,u){r.forEach(function(f){return u[f][o](h)})},triggerUpdate:!1}},linkMethod:function(o){return function(c){for(var h=arguments.length,u=new Array(h>1?h-1:0),f=1;f<h;f++)u[f-1]=arguments[f];var p=[];return r.forEach(function(g){var x=c[g],y=x[o].apply(x,u);y!==x&&p.push(y)}),p.length?p[0]:this}}}}var Btt=800,Att=4,Ett=5,kO=CO("forceGraph",Og),Mtt=CO(["forceGraph","shadowGraph"],Og),Ltt=Object.assign.apply(Object,mn(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(i){return yf({},i,kO.linkProp(i))})).concat(mn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(i){return yf({},i,Mtt.linkProp(i))})))),Ntt=Object.assign.apply(Object,mn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(i){return yf({},i,kO.linkMethod(i))})));function cx(i){if(i.canvas){var e=i.canvas.width,r=i.canvas.height;e===300&&r===150&&(e=r=0);var n=window.devicePixelRatio;e/=n,r/=n,[i.canvas,i.shadowCanvas].forEach(function(o){o.style.width="".concat(i.width,"px"),o.style.height="".concat(i.height,"px"),o.width=i.width*n,o.height=i.height*n,!e&&!r&&o.getContext("2d").scale(n,n)});var a=fa(i.canvas).k;i.zoom.translateBy(i.zoom.__baseElem,(i.width-e)/2/a,(i.height-r)/2/a),i.needsRedraw=!0}}function _O(i){var e=window.devicePixelRatio;i.setTransform(e,0,0,e,0,0)}function nB(i,e,r){i.save(),_O(i),i.clearRect(0,0,e,r),i.restore()}var Ott=w1({props:yc({width:{default:window.innerWidth,onChange:function(e,r){return cx(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,r){return cx(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,r){[e.nodes,e.links].every(function(a){return(a||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(n),r.forceGraph.graphData(e),r.shadowGraph.graphData(e);function n(a){var o=a.type,c=a.objs;c.filter(function(h){if(!h.hasOwnProperty("__indexColor"))return!0;var u=r.colorTracker.lookup(h.__indexColor);return!u||!u.hasOwnProperty("d")||u.d!==h}).forEach(function(h){h.__indexColor=r.colorTracker.register({type:o,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(e,r){r.canvas&&e&&(r.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,r){r.shadowGraph.nodeCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,r){r.shadowGraph.linkCanvasObject(e?function(n,a,o){return e(n,n.__indexColor,a,o)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,r){r.zoom.scaleExtent([e,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Ltt),aliases:{stopAnimation:"pauseAnimation"},methods:yc({graph2ScreenCoords:function(e,r,n){var a=fa(e.canvas);return{x:r*a.k+a.x,y:n*a.k+a.y}},screen2GraphCoords:function(e,r,n){var a=fa(e.canvas);return{x:(r-a.x)/a.k,y:(n-a.y)/a.k}},centerAt:function(e,r,n,a){if(!e.canvas)return null;if(r!==void 0||n!==void 0){var o=Object.assign({},r!==void 0?{x:r}:{},n!==void 0?{y:n}:{});return a?e.tweenGroup.add(new AT(c()).to(o,a).easing(fl.Quadratic.Out).onUpdate(h).onComplete(function(){e.tweenGroup.remove(this)}).start()):h(o),this}return c();function c(){var u=fa(e.canvas);return{x:(e.width/2-u.x)/u.k,y:(e.height/2-u.y)/u.k}}function h(u){var f=u.x,p=u.y;e.zoom.translateTo(e.zoom.__baseElem,f===void 0?c().x:f,p===void 0?c().y:p),e.needsRedraw=!0}},zoom:function(e,r,n){if(!e.canvas)return null;if(r!==void 0)return n?e.tweenGroup.add(new AT({k:a()}).to({k:r},n).easing(fl.Quadratic.Out).onUpdate(function(c){var h=c.k;return o(h)}).onComplete(function(){e.tweenGroup.remove(this)}).start()):o(r),this;return a();function a(){return fa(e.canvas).k}function o(c){e.zoom.scaleTo(e.zoom.__baseElem,c),e.needsRedraw=!0}},zoomToFit:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var h=this.getGraphBbox.apply(this,o);if(h){var u={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},f=Math.max(1e-12,Math.min(1e12,(e.width-n*2)/(h.x[1]-h.x[0]),(e.height-n*2)/(h.y[1]-h.y[0])));this.centerAt(u.x,u.y,r),this.zoom(f,r)}return this},getGraphBbox:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},n=Ne(e.nodeVal),a=function(h){return Math.sqrt(Math.max(0,n(h)||1))*e.nodeRelSize},o=e.graphData.nodes.filter(r).map(function(c){return{x:c.x,y:c.y,r:a(c)}});return o.length?{x:[fS(o,function(c){return c.x-c.r}),uS(o,function(c){return c.x+c.r})],y:[fS(o,function(c){return c.y-c.r}),uS(o,function(c){return c.y+c.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Ntt),stateInit:function(){return{lastSetZoom:1,zoom:N7(),forceGraph:new Og,shadowGraph:new Og().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new AK,tweenGroup:new ZN}},init:function(e,r){var n=this;e.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",e.appendChild(a),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),a.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var o=r.canvas.getContext("2d"),c=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),h={x:-1e12,y:-1e12},u=function(){var g=null,x=window.devicePixelRatio,y=h.x>0&&h.y>0?c.getImageData(h.x*x,h.y*x,1,1):null;return y&&(g=r.colorTracker.lookup(y.data)),g};Xt(r.canvas).call(l$().subject(function(){if(!r.enableNodeDrag)return null;var p=u();return p&&p.type==="Node"?p.d:null}).on("start",function(p){var g=p.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},p.active||(g.fx=g.x,g.fy=g.y),r.canvas.classList.add("grabbable")}).on("drag",function(p){var g=p.subject,x=g.__initialDragPos,y=p,v=fa(r.canvas).k,C={x:x.x+(y.x-x.x)/v-g.x,y:x.y+(y.y-x.y)/v-g.y};["x","y"].forEach(function(_){return g["f".concat(_)]=g[_]=x[_]+(y[_]-x[_])/v}),!(!g.__dragged&&Ett>=Math.sqrt(v6(["x","y"].map(function(_){return Math.pow(p[_]-x[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,g.__dragged=!0,r.onNodeDrag(g,C))}).on("end",function(p){var g=p.subject,x=g.__initialDragPos,y={x:g.x-x.x,y:g.y-x.y};x.fx===void 0&&(g.fx=void 0),x.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,r.onNodeDragEnd(g,y))})),r.zoom(r.zoom.__baseElem=Xt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(p){return!p.button&&r.enableZoomPanInteraction&&(p.type!=="wheel"||Ne(r.enableZoomInteraction)(p))&&(p.type==="wheel"||Ne(r.enablePanInteraction)(p))}).on("zoom",function(p){var g=p.transform;[o,c].forEach(function(x){_O(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(yc(yc({},g),n.centerAt())),r.needsRedraw=!0}).on("end",function(p){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(yc(yc({},p.transform),n.centerAt()))}),cx(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){fa(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=Att/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new QK(a),["pointermove","pointerdown"].forEach(function(p){return a.addEventListener(p,function(g){p==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=g),!r.isPointerDragging&&g.type==="pointermove"&&r.onBackgroundClick&&(g.pressure>0||r.isPointerPressed)&&(g.pointerType==="mouse"||g.movementX===void 0||[g.movementX,g.movementY].some(function(v){return Math.abs(v)>1}))&&(r.isPointerDragging=!0);var x=y(a);h.x=g.pageX-x.left,h.y=g.pageY-x.top;function y(v){var C=v.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,w=window.pageYOffset||document.documentElement.scrollTop;return{top:C.top+w,left:C.left+_}}},{passive:!0})}),a.addEventListener("pointerup",function(p){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var g=[p,r.pointerDownEvent];requestAnimationFrame(function(){if(p.button===0)if(r.hoverObj){var x=r["on".concat(r.hoverObj.type,"Click")];x&&x.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,g);if(p.button===2)if(r.hoverObj){var y=r["on".concat(r.hoverObj.type,"RightClick")];y&&y.apply(void 0,[r.hoverObj.d].concat(g))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(p){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(p.preventDefault(),!1)}),r.forceGraph(o),r.shadowGraph(c);var f=RZ(function(){nB(c,r.width,r.height),r.shadowGraph.linkWidth(function(g){return Ne(r.linkWidth)(g)+r.linkHoverPrecision});var p=fa(r.canvas);r.shadowGraph.globalScale(p.k).tickFrame()},Btt);r.flushShadowCanvas=f.flush,(this._animationCycle=function p(){var g=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(A){return A.__photons&&A.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var x=r.isPointerDragging?null:u();if(x!==r.hoverObj){var y=r.hoverObj,v=y?y.type:null,C=x?x.type:null;if(v&&v!==C){var _=r["on".concat(v,"Hover")];_&&_(null,y.d)}if(C){var w=r["on".concat(C,"Hover")];w&&w(x.d,v===C?y.d:null)}r.tooltip.content(x&&Ne(r["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),r.canvas.classList[(x&&r["on".concat(C,"Click")]||!x&&r.onBackgroundClick)&&Ne(r.showPointerCursor)(x==null?void 0:x.d)?"add":"remove"]("clickable"),r.hoverObj=x}g&&f()}if(g){nB(o,r.width,r.height);var T=fa(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(o,T),r.forceGraph.globalScale(T).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(o,T)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(p)})()},update:function(e){}}),hx={exports:{}},ux,aB;function jtt(){if(aB)return ux;aB=1;var i="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ux=i,ux}var fx,sB;function Rtt(){if(sB)return fx;sB=1;var i=jtt();function e(){}function r(){}return r.resetWarningCache=e,fx=function(){function n(c,h,u,f,p,g){if(g!==i){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:e};return o.PropTypes=o,o},fx}var oB;function Dtt(){return oB||(oB=1,hx.exports=Rtt()()),hx.exports}var Ftt=Dtt();const it=jg(Ftt),um={width:it.number,height:it.number,graphData:it.shape({nodes:it.arrayOf(it.object).isRequired,links:it.arrayOf(it.object).isRequired}),backgroundColor:it.string,nodeRelSize:it.number,nodeId:it.string,nodeLabel:it.oneOfType([it.string,it.func]),nodeVal:it.oneOfType([it.number,it.string,it.func]),nodeVisibility:it.oneOfType([it.bool,it.string,it.func]),nodeColor:it.oneOfType([it.string,it.func]),nodeAutoColorBy:it.oneOfType([it.string,it.func]),onNodeHover:it.func,onNodeClick:it.func,linkSource:it.string,linkTarget:it.string,linkLabel:it.oneOfType([it.string,it.func]),linkVisibility:it.oneOfType([it.bool,it.string,it.func]),linkColor:it.oneOfType([it.string,it.func]),linkAutoColorBy:it.oneOfType([it.string,it.func]),linkWidth:it.oneOfType([it.number,it.string,it.func]),linkCurvature:it.oneOfType([it.number,it.string,it.func]),linkDirectionalArrowLength:it.oneOfType([it.number,it.string,it.func]),linkDirectionalArrowColor:it.oneOfType([it.string,it.func]),linkDirectionalArrowRelPos:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticles:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleSpeed:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleOffset:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleWidth:it.oneOfType([it.number,it.string,it.func]),linkDirectionalParticleColor:it.oneOfType([it.string,it.func]),onLinkHover:it.func,onLinkClick:it.func,dagMode:it.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:it.number,dagNodeFilter:it.func,onDagError:it.func,d3AlphaMin:it.number,d3AlphaDecay:it.number,d3VelocityDecay:it.number,warmupTicks:it.number,cooldownTicks:it.number,cooldownTime:it.number,onEngineTick:it.func,onEngineStop:it.func,getGraphBbox:it.func},SO={zoomToFit:it.func,onNodeRightClick:it.func,onNodeDrag:it.func,onNodeDragEnd:it.func,onLinkRightClick:it.func,linkHoverPrecision:it.number,onBackgroundClick:it.func,onBackgroundRightClick:it.func,showPointerCursor:it.oneOfType([it.bool,it.func]),enablePointerInteraction:it.bool,enableNodeDrag:it.bool},j1={showNavInfo:it.bool,nodeOpacity:it.number,nodeResolution:it.number,nodeThreeObject:it.oneOfType([it.object,it.string,it.func]),nodeThreeObjectExtend:it.oneOfType([it.bool,it.string,it.func]),nodePositionUpdate:it.func,linkOpacity:it.number,linkResolution:it.number,linkCurveRotation:it.oneOfType([it.number,it.string,it.func]),linkMaterial:it.oneOfType([it.object,it.string,it.func]),linkThreeObject:it.oneOfType([it.object,it.string,it.func]),linkThreeObjectExtend:it.oneOfType([it.bool,it.string,it.func]),linkPositionUpdate:it.func,linkDirectionalArrowResolution:it.number,linkDirectionalParticleResolution:it.number,linkDirectionalParticleThreeObject:it.oneOfType([it.object,it.string,it.func]),forceEngine:it.oneOf(["d3","ngraph"]),ngraphPhysics:it.object,numDimensions:it.oneOf([1,2,3])},$tt=Object.assign({},um,SO,{linkLineDash:it.oneOfType([it.arrayOf(it.number),it.string,it.func]),nodeCanvasObjectMode:it.oneOfType([it.string,it.func]),nodeCanvasObject:it.func,nodePointerAreaPaint:it.func,linkCanvasObjectMode:it.oneOfType([it.string,it.func]),linkCanvasObject:it.func,linkPointerAreaPaint:it.func,linkDirectionalParticleCanvasObject:it.func,autoPauseRedraw:it.bool,minZoom:it.number,maxZoom:it.number,enableZoomInteraction:it.oneOfType([it.bool,it.func]),enablePanInteraction:it.oneOfType([it.bool,it.func]),onZoom:it.func,onZoomEnd:it.func,onRenderFramePre:it.func,onRenderFramePost:it.func});Object.assign({},um,SO,j1,{enableNavigationControls:it.bool,controlType:it.oneOf(["trackball","orbit","fly"]),rendererConfig:it.object,extraRenderers:it.arrayOf(it.shape({render:it.func.isRequired}))});Object.assign({},um,j1,{nodeDesc:it.oneOfType([it.string,it.func]),linkDesc:it.oneOfType([it.string,it.func])});Object.assign({},um,j1,{markerAttrs:it.object,yOffset:it.number,glScale:it.number});const R1=vZ(Ott,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});R1.displayName="ForceGraph2D";R1.propTypes=$tt;function ztt(){return zi({queryKey:["graph"],queryFn:()=>Ie.get("/graph"),staleTime:3e4})}const dx="dreamcontext:";function qtt(i,e){const{projectId:r}=UB(),n=r?`${dx}${r}:${i}`:`${dx}${i}`,[a,o]=tt.useState(()=>{try{const h=localStorage.getItem(n);if(h!==null)return JSON.parse(h);if(r){const u=`${dx}${i}`,f=localStorage.getItem(u);if(f!==null)return localStorage.setItem(n,f),localStorage.removeItem(u),JSON.parse(f)}}catch{}return e}),c=tt.useCallback(h=>{o(u=>{const f=typeof h=="function"?h(u):h;try{localStorage.setItem(n,JSON.stringify(f))}catch{}return f})},[n]);return[a,c]}const lB={filters:{search:"",showTags:!0,showOrphans:!0,showAttachments:!1,existingFilesOnly:!1},groups:[],display:{view:"2d",arrows:!1,textFadeThreshold:.85,nodeSize:.5,linkThickness:.5},forces:{centerStrength:.7,repelStrength:.35,linkStrength:.9,linkDistance:.35}};function Itt(i){return{centerStrength:.05+i.centerStrength*.45,repelStrength:-(30+i.repelStrength*240),linkStrength:.1+i.linkStrength*1.2,linkDistance:20+i.linkDistance*180}}function Ptt(){const[i,e]=qtt("brain:settings:v1",lB),r=tt.useCallback((o,c)=>{e(h=>({...h,[o]:{...h[o],...c}}))},[e]),n=tt.useCallback(o=>{e(c=>({...c,groups:o}))},[e]),a=tt.useCallback(()=>{e(lB)},[e]);return{settings:i,patch:r,setGroups:n,reset:a}}function Htt(i){const e=[];let r=0;for(;r<i.length;){const n=i[r];if(/\s/.test(n)){r++;continue}if(n==="("){e.push({type:"LPAREN"}),r++;continue}if(n===")"){e.push({type:"RPAREN"}),r++;continue}if(n==="-"&&r+1<i.length&&!/\s/.test(i[r+1])){e.push({type:"NOT"}),r++;continue}if(n==='"'){let h=r+1,u="";for(;h<i.length&&i[h]!=='"';)i[h]==="\\"&&h+1<i.length?(u+=i[h+1],h+=2):(u+=i[h],h++);e.push({type:"PHRASE",value:u}),r=h+1;continue}if(n==="/"){let h=r+1,u="";for(;h<i.length&&i[h]!=="/";)i[h]==="\\"&&h+1<i.length?(u+=i[h]+i[h+1],h+=2):(u+=i[h],h++);if(h<i.length){e.push({type:"REGEX",value:u}),r=h+1;continue}}let a=r;for(;a<i.length&&!/[\s()]/.test(i[a])&&i[a]!=='"';)a++;const o=i.slice(r,a),c=o.match(/^(tag|path|file|content):(.*)$/i);c?e.push({type:"OP",value:c[1].toLowerCase(),arg:c[2]}):o.toUpperCase()==="OR"?e.push({type:"OR"}):o.toUpperCase()==="AND"||o.length>0&&e.push({type:"WORD",value:o}),r=a}return e}class Utt{constructor(e){Ht(this,"pos",0);this.tokens=e}parse(){return this.parseOr()}parseOr(){var r;let e=this.parseAnd();for(;((r=this.peek())==null?void 0:r.type)==="OR";){this.pos++;const n=this.parseAnd();e.type==="or"?e.children.push(n):e={type:"or",children:[e,n]}}return e}parseAnd(){var r,n;const e=[];for(;this.pos<this.tokens.length&&((r=this.peek())==null?void 0:r.type)!=="RPAREN"&&((n=this.peek())==null?void 0:n.type)!=="OR";){const a=this.parseTerm();a&&e.push(a)}return e.length===0?{type:"and",children:[]}:e.length===1?e[0]:{type:"and",children:e}}parseTerm(){var a;const e=this.peek();if(!e)return null;let r=!1;e.type==="NOT"&&(r=!0,this.pos++);const n=this.peek();if(!n)return null;if(n.type==="LPAREN"){this.pos++;const o=this.parseOr();return((a=this.peek())==null?void 0:a.type)==="RPAREN"&&this.pos++,r?wO(o):o}if(n.type==="WORD")return this.pos++,{type:"word",value:n.value.toLowerCase(),negated:r};if(n.type==="PHRASE")return this.pos++,{type:"phrase",value:n.value.toLowerCase(),negated:r};if(n.type==="REGEX"){this.pos++;try{return{type:"regex",value:new RegExp(n.value,"i"),negated:r}}catch{return null}}return n.type==="OP"?(this.pos++,{type:"op",op:n.value,arg:n.arg.toLowerCase(),negated:r}):(this.pos++,null)}peek(){return this.tokens[this.pos]}}function wO(i){return i.type==="and"||i.type==="or"?{...i,children:i.children.map(wO)}:{...i,negated:!i.negated}}function cB(i){const e=i.trim();if(!e)return{match:()=>!0,raw:"",isEmpty:!0};const r=Htt(e),n=new Utt(r).parse();return{match:a=>ev(n,a),raw:e,isEmpty:!1}}function ev(i,e){switch(i.type){case"and":return i.children.every(r=>ev(r,e));case"or":return i.children.some(r=>ev(r,e));case"word":return bp(hB(e,i.value),i.negated);case"phrase":return bp(hB(e,i.value),i.negated);case"regex":return bp(Wtt(e,i.value),i.negated);case"op":return bp(Ytt(e,i.op,i.arg),i.negated)}}function bp(i,e){return e?!i:i}function TO(i){return[i.label,i.path,i.id,i.meta.description??"",...i.meta.tags??[]].join(" ").toLowerCase()}function hB(i,e){return TO(i).includes(e)}function Wtt(i,e){return e.test(TO(i))}function Ytt(i,e,r){var a;const n=r.toLowerCase();switch(e){case"path":return i.path.toLowerCase().includes(n);case"file":return(((a=i.path.split("/").pop())==null?void 0:a.toLowerCase())??i.label.toLowerCase()).includes(n);case"tag":{const o=n.replace(/^#/,"");return(i.meta.tags??[]).some(c=>c.toLowerCase()===o)||i.group==="tag"&&i.label.toLowerCase().replace(/^#/,"")===o}case"content":return(i.meta.description??"").toLowerCase().includes(n);default:return!1}}const vp={filters:"Filters",groups:"Groups",display:"Display",forces:"Forces"},px=["#10b981","#4fb3e6","#a78bfa","#f59e0b","#ef4444","#e11d74","#9ca3af","#eab308","#22d3ee","#f472b6"];function Gtt({settings:i,patch:e,setGroups:r,reset:n,onClose:a}){const[o,c]=tt.useState({filters:!0,groups:!0,display:!0,forces:!0}),h=u=>c(f=>({...f,[u]:!f[u]}));return b.jsxs("aside",{className:"brain-settings",children:[b.jsxs("div",{className:"brain-settings-header",children:[b.jsx("span",{className:"brain-settings-title",children:"Graph settings"}),b.jsxs("div",{className:"brain-settings-header-actions",children:[b.jsx("button",{className:"brain-settings-mini-btn",onClick:n,title:"Restore default settings",children:"↻"}),b.jsx("button",{className:"brain-settings-mini-btn",onClick:a,title:"Close",children:"×"})]})]}),b.jsxs("div",{className:"brain-settings-body",children:[b.jsxs(Cp,{label:vp.filters,open:o.filters,onToggle:()=>h("filters"),children:[b.jsx("label",{className:"brain-settings-label",children:"Search files"}),b.jsx("input",{type:"search",className:"brain-settings-input",placeholder:"Search…",value:i.filters.search,onChange:u=>e("filters",{search:u.target.value})}),b.jsxs("p",{className:"brain-settings-hint",children:["Operators: ",b.jsx("code",{children:"tag:"})," ",b.jsx("code",{children:"path:"})," ",b.jsx("code",{children:"file:"})," ",b.jsx("code",{children:"-not"})," ",b.jsx("code",{children:"OR"})," ",b.jsx("code",{children:'"phrase"'})," ",b.jsx("code",{children:"/regex/"})]}),b.jsx(Tu,{label:"Tags",checked:i.filters.showTags,onChange:u=>e("filters",{showTags:u})}),b.jsx(Tu,{label:"Attachments",checked:i.filters.showAttachments,onChange:u=>e("filters",{showAttachments:u})}),b.jsx(Tu,{label:"Existing files only",checked:i.filters.existingFilesOnly,onChange:u=>e("filters",{existingFilesOnly:u})}),b.jsx(Tu,{label:"Orphans",checked:i.filters.showOrphans,onChange:u=>e("filters",{showOrphans:u})})]}),b.jsx(Cp,{label:vp.groups,open:o.groups,onToggle:()=>h("groups"),children:b.jsx(Xtt,{groups:i.groups,onChange:r})}),b.jsxs(Cp,{label:vp.display,open:o.display,onToggle:()=>h("display"),children:[b.jsx(Vtt,{label:"View",value:i.display.view==="3d"?"3d":"2d",options:[{value:"2d",label:"2D"},{value:"3d",label:"3D"}],onChange:u=>e("display",{view:u})}),b.jsx(Tu,{label:"Arrows",checked:i.display.arrows,onChange:u=>e("display",{arrows:u})}),b.jsx(Go,{label:"Text fade threshold",value:i.display.textFadeThreshold,onChange:u=>e("display",{textFadeThreshold:u})}),b.jsx(Go,{label:"Node size",value:i.display.nodeSize,onChange:u=>e("display",{nodeSize:u})}),b.jsx(Go,{label:"Link thickness",value:i.display.linkThickness,onChange:u=>e("display",{linkThickness:u})})]}),b.jsxs(Cp,{label:vp.forces,open:o.forces,onToggle:()=>h("forces"),children:[b.jsx(Go,{label:"Center force",value:i.forces.centerStrength,onChange:u=>e("forces",{centerStrength:u})}),b.jsx(Go,{label:"Repel force",value:i.forces.repelStrength,onChange:u=>e("forces",{repelStrength:u})}),b.jsx(Go,{label:"Link force",value:i.forces.linkStrength,onChange:u=>e("forces",{linkStrength:u})}),b.jsx(Go,{label:"Link distance",value:i.forces.linkDistance,onChange:u=>e("forces",{linkDistance:u})})]})]})]})}function Cp({label:i,open:e,onToggle:r,children:n}){return b.jsxs("div",{className:`brain-section ${e?"brain-section--open":""}`,children:[b.jsxs("button",{className:"brain-section-header",onClick:r,type:"button",children:[b.jsx("span",{className:"brain-section-caret",children:e?"▾":"▸"}),b.jsx("span",{children:i})]}),e&&b.jsx("div",{className:"brain-section-body",children:n})]})}function Tu({label:i,checked:e,onChange:r}){return b.jsxs("label",{className:"brain-toggle-row",children:[b.jsx("span",{children:i}),b.jsx("span",{className:`brain-toggle ${e?"brain-toggle--on":""}`,onClick:()=>r(!e),children:b.jsx("span",{className:"brain-toggle-knob"})})]})}function Vtt({label:i,value:e,options:r,onChange:n}){return b.jsxs("div",{className:"brain-segmented-row",children:[b.jsx("span",{className:"brain-segmented-label",children:i}),b.jsx("div",{className:"brain-segmented",role:"tablist",children:r.map(a=>b.jsx("button",{type:"button",role:"tab","aria-selected":e===a.value,className:`brain-segmented-btn ${e===a.value?"brain-segmented-btn--active":""}`,onClick:()=>n(a.value),children:a.label},a.value))})]})}function Go({label:i,value:e,onChange:r}){return b.jsxs("label",{className:"brain-slider-row",children:[b.jsx("span",{className:"brain-slider-label-text",children:i}),b.jsx("input",{type:"range",min:0,max:1,step:.01,value:e,onChange:n=>r(parseFloat(n.target.value))})]})}function Xtt({groups:i,onChange:e}){const[r,n]=tt.useState(""),[a,o]=tt.useState(null),c=()=>{const f=r.trim();if(!f)return;const p=`grp_${Math.random().toString(36).slice(2,8)}`;e([...i,{id:p,query:f,color:px[i.length%px.length]}]),n("")},h=(f,p)=>{e(i.map(g=>g.id===f?{...g,...p}:g))},u=f=>e(i.filter(p=>p.id!==f));return b.jsxs(b.Fragment,{children:[i.length===0&&b.jsxs("p",{className:"brain-settings-hint",children:["Color nodes that match a query. First matching group wins. Example:"," ",b.jsx("code",{children:"tag:#architecture"})]}),b.jsx("div",{className:"brain-groups-list",children:i.map(f=>b.jsxs("div",{className:"brain-group-row",children:[b.jsx("button",{className:"brain-group-color",style:{background:f.color},onClick:()=>o(a===f.id?null:f.id),title:"Pick color"}),b.jsx("input",{className:"brain-settings-input brain-group-input",value:f.query,onChange:p=>h(f.id,{query:p.target.value})}),b.jsx("button",{className:"brain-settings-mini-btn",onClick:()=>u(f.id),title:"Remove group",children:"×"}),a===f.id&&b.jsx("div",{className:"brain-swatch-picker",children:px.map(p=>b.jsx("button",{className:"brain-swatch",style:{background:p},onClick:()=>{h(f.id,{color:p}),o(null)}},p))})]},f.id))}),b.jsxs("div",{className:"brain-group-add",children:[b.jsx("input",{className:"brain-settings-input",placeholder:"New group query…",value:r,onChange:f=>n(f.target.value),onKeyDown:f=>{f.key==="Enter"&&c()}}),b.jsx("button",{className:"brain-settings-btn",onClick:c,disabled:!r.trim(),children:"New group"})]})]})}function Qtt(i){return zi({queryKey:["graph","content",(i==null?void 0:i.path)??null],queryFn:()=>{if(!i||!i.path)throw new Error("No path for node");return Ie.get(`/graph/content?path=${encodeURIComponent(i.path)}`)},enabled:!!(i&&i.path),staleTime:3e4})}const uB={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},Ztt={soul:"Soul",user:"User",memory:"Memory",core:"Core",feature:"Feature",task:"Task",knowledge:"Knowledge",release:"Release",inbox:"Inbox",tag:"Tag"},Ktt={related_feature:"feature",parent_task:"parent",release_includes:"released",sibling_core:"spine",has_tag:"tag"};function Jtt(i){return i==="task"?"tasks":i==="feature"?"features":i==="knowledge"?"knowledge":i==="soul"||i==="user"||i==="memory"||i==="core"?"core":null}function tet({node:i,onClose:e,onSelectRelated:r,relatedNodes:n,inDegree:a,totalDegree:o,onNavigate:c}){const h=!!(i!=null&&i.path),u=Qtt(h?i:null);if(!i)return b.jsx("aside",{className:"brain-drawer"});const f=Jtt(i.group),p=u.data;return b.jsxs("aside",{className:"brain-drawer brain-drawer--open",children:[b.jsx("button",{className:"brain-drawer-close",onClick:e,"aria-label":"Close",children:"×"}),b.jsxs("div",{className:"brain-drawer-header",children:[b.jsxs("span",{className:"brain-drawer-group-badge",children:[b.jsx("span",{className:"brain-related-dot",style:{background:uB[i.group]}}),Ztt[i.group]]}),b.jsx("h2",{className:"brain-drawer-title",children:i.label}),i.path&&b.jsx("span",{className:"brain-drawer-id",children:i.path})]}),b.jsxs("div",{className:"brain-drawer-body",children:[h&&u.isLoading&&b.jsx("p",{className:"brain-description",children:"Loading…"}),h&&u.error&&b.jsxs("p",{className:"brain-description",children:["Failed to load file: ",String(u.error)]}),(p==null?void 0:p.type)==="markdown"&&b.jsx(Rf,{content:p.content,frontmatter:p.frontmatter}),(p==null?void 0:p.type)==="json"&&b.jsx("pre",{className:"brain-codeblock",children:p.data!==void 0?JSON.stringify(p.data,null,2):p.raw??"(empty)"}),(p==null?void 0:p.type)==="text"&&b.jsx("pre",{className:"brain-codeblock",children:p.content}),!h&&i.group==="tag"&&b.jsxs("p",{className:"brain-description",children:["Tag ",b.jsxs("code",{children:["#",i.label.replace(/^#/,"")]})," — ",n.length," ",n.length===1?"file":"files"," reference this tag."]}),!h&&i.group!=="tag"&&b.jsx("p",{className:"brain-description",children:i.meta.description??"No file content."}),n.length>0&&b.jsxs("section",{className:"brain-drawer-section",children:[b.jsxs("h3",{className:"brain-drawer-section-title",children:["Connections (",n.length,") · in ",a," · total ",o]}),b.jsx("div",{className:"brain-related-list",children:n.map(({node:g,kind:x})=>b.jsxs("button",{className:"brain-related-item",onClick:()=>r(g.id),children:[b.jsx("span",{className:"brain-related-dot",style:{background:uB[g.group]}}),b.jsx("span",{children:g.label}),b.jsx("span",{className:"brain-related-kind",children:Ktt[x]??x})]},`${g.id}-${x}`))})]})]}),f&&c&&b.jsx("div",{className:"brain-drawer-footer",children:b.jsxs("button",{className:"brain-btn",onClick:()=>c(f,i.id),children:["Open in ",f.charAt(0).toUpperCase()+f.slice(1)," to edit →"]})})]})}const eet=tt.lazy(()=>Ce(()=>import("./BrainCanvas3D-1HMiA14F.js"),[]).then(i=>({default:i.BrainCanvas3D}))),iet={soul:"#4fb3e6",user:"#4fb3e6",memory:"#4fb3e6",core:"#4fb3e6",feature:"#10b981",task:"#f59e0b",knowledge:"#a78bfa",release:"#e11d74",inbox:"#9ca3af",tag:"#10b981"},ret={soul:"#0d7bb8",user:"#0d7bb8",memory:"#0d7bb8",core:"#0d7bb8",feature:"#047857",task:"#b45309",knowledge:"#6d28d9",release:"#be185d",inbox:"#475569",tag:"#047857"};function fB(i){return typeof i=="string"?i:i.id}function BO(i){const e=i.group==="soul"?8:i.group==="user"||i.group==="memory"?6:i.group==="tag"?3:4,r=i.__inDegree??0;return e+Math.min(14,r*1.2)}function dB(i,e){return Math.sqrt(BO(i)*e)*3}function net(i,e,r){for(const{group:n,parsed:a}of e)if(a.match(i))return n.color;return r[i.group]}function aet({onNavigate:i}){const{data:e,isLoading:r,error:n}=ztt(),a=Zr(),{settings:o,patch:c,setGroups:h,reset:u}=Ptt(),{resolved:f}=Rg(),p=f==="dark",g=p?iet:ret,x=tt.useRef(null),y=tt.useRef(void 0),[v,C]=tt.useState({w:0,h:0}),[_,w]=tt.useState(null),[T,A]=tt.useState(null),[E,N]=tt.useState(!0),R=tt.useRef(!1);tt.useEffect(()=>{if(!x.current)return;const at=x.current,Ct=()=>C({w:at.clientWidth,h:at.clientHeight});Ct();const gt=new ResizeObserver(Ct);return gt.observe(at),()=>gt.disconnect()},[]);const M=tt.useMemo(()=>cB(o.filters.search),[o.filters.search]),O=tt.useMemo(()=>o.groups.map(at=>({group:at,parsed:cB(at.query)})).filter(({parsed:at})=>!at.isEmpty),[o.groups]),{filteredData:Y,neighborsById:$,totalDegreeById:q,inDegreeById:J}=tt.useMemo(()=>{if(!e)return{filteredData:{nodes:[],links:[]},neighborsById:new Map,totalDegreeById:new Map,inDegreeById:new Map};const at=new Map,Ct=new Map;for(const Et of e.nodes)at.set(Et.id,0),Ct.set(Et.id,0);for(const Et of e.links){const Vt=typeof Et.source=="string"?Et.source:Et.source.id,we=typeof Et.target=="string"?Et.target:Et.target.id;at.set(we,(at.get(we)??0)+1),Ct.set(Vt,(Ct.get(Vt)??0)+1),Ct.set(we,(Ct.get(we)??0)+1)}const gt=Et=>(Ct.get(Et)??0)===0,Bt=[],Wt=new Set;for(const Et of e.nodes){if(!o.filters.showTags&&Et.group==="tag"||!o.filters.showOrphans&&gt(Et.id)||!M.isEmpty&&!M.match(Et))continue;const Vt={...Et};Vt.__inDegree=at.get(Et.id)??0,Vt.__totalDegree=Ct.get(Et.id)??0,Vt.__color=net(Et,O,g),Bt.push(Vt),Wt.add(Et.id)}const Gt=[],Zt=new Map;for(const Et of Bt)Zt.set(Et.id,new Set);for(const Et of e.links){const Vt=typeof Et.source=="string"?Et.source:Et.source.id,we=typeof Et.target=="string"?Et.target:Et.target.id;!Wt.has(Vt)||!Wt.has(we)||(Gt.push({source:Vt,target:we,kind:Et.kind}),Zt.get(Vt).add(we),Zt.get(we).add(Vt))}return{filteredData:{nodes:Bt,links:Gt},neighborsById:Zt,totalDegreeById:Ct,inDegreeById:at}},[e,o.filters,M,O]),W=tt.useMemo(()=>Itt(o.forces),[o.forces]),F=.4+o.display.nodeSize*2.2;tt.useEffect(()=>{var Wt,Gt,Zt,Et,Vt,we,ni,qi,ue;const at=y.current;if(!at)return;const Ct=(Wt=at.d3Force)==null?void 0:Wt.call(at,"charge");Ct!=null&&Ct.strength&&Ct.strength(W.repelStrength),Ct!=null&&Ct.distanceMax&&Ct.distanceMax(420);const gt=(Gt=at.d3Force)==null?void 0:Gt.call(at,"link");gt&&((Zt=gt.strength)==null||Zt.call(gt,W.linkStrength),(Et=gt.distance)==null||Et.call(gt,W.linkDistance));const Bt=(Vt=at.d3Force)==null?void 0:Vt.call(at,"center");Bt!=null&&Bt.strength&&Bt.strength(W.centerStrength),(we=at.d3Force)==null||we.call(at,"collide",OJ().radius(ke=>dB(ke,F)+4).strength(.9).iterations(2)),(ni=at.d3Force)==null||ni.call(at,"x",YJ(0).strength(W.centerStrength*.4)),(qi=at.d3Force)==null||qi.call(at,"y",GJ(0).strength(W.centerStrength*.4)),(ue=at.d3ReheatSimulation)==null||ue.call(at)},[W,F,Y]),tt.useEffect(()=>{R.current=!1},[e==null?void 0:e.nodes.length]),tt.useEffect(()=>{if(!e||!Y.nodes.length)return;const at=[];return[800,1600,2600].forEach(Ct=>{at.push(setTimeout(()=>{var Bt;if(R.current)return;const gt=y.current;gt&&((Bt=gt.zoomToFit)==null||Bt.call(gt,500,80),Ct>=2600&&(R.current=!0))},Ct))}),()=>at.forEach(clearTimeout)},[e,Y.nodes.length]);const U=tt.useMemo(()=>Y.nodes.find(at=>at.id===_)??null,[Y,_]),j=tt.useMemo(()=>{if(!U||!e)return[];const at=[],Ct=new Map(e.nodes.map(gt=>[gt.id,gt]));for(const gt of e.links){const Bt=typeof gt.source=="string"?gt.source:gt.source.id,Wt=typeof gt.target=="string"?gt.target:gt.target.id;if(Bt===U.id){const Gt=Ct.get(Wt);Gt&&at.push({node:Gt,kind:gt.kind})}else if(Wt===U.id){const Gt=Ct.get(Bt);Gt&&at.push({node:Gt,kind:gt.kind})}}return at},[e,U]),I=at=>{w(at.id);const Ct=y.current;Ct&&typeof at.x=="number"&&typeof at.y=="number"&&(Ct.centerAt(at.x,at.y,400),Ct.zoom(Math.max(Ct.zoom(),2.2),400))},H=()=>a.invalidateQueries({queryKey:["graph"]});tt.useEffect(()=>{const at=Ct=>{var Wt;if((Wt=Ct.target)!=null&&Wt.matches("input,textarea"))return;const gt=y.current;if(!gt)return;const Bt=gt.zoom();if(Ct.key==="+"||Ct.key==="=")gt.zoom(Bt*1.2,200);else if(Ct.key==="-"||Ct.key==="_")gt.zoom(Bt/1.2,200);else if(Ct.key.startsWith("Arrow")){const Gt=Ct.shiftKey?120:40,Zt=gt.centerAt();let Et=0,Vt=0;Ct.key==="ArrowUp"?Vt=-Gt:Ct.key==="ArrowDown"?Vt=Gt:Ct.key==="ArrowLeft"?Et=-Gt:Ct.key==="ArrowRight"&&(Et=Gt),gt.centerAt(((Zt==null?void 0:Zt.x)??0)+Et/Bt,((Zt==null?void 0:Zt.y)??0)+Vt/Bt,150)}};return window.addEventListener("keydown",at),()=>window.removeEventListener("keydown",at)},[]);const V=T??_,Z=V?$.get(V)??new Set:null,P=at=>!V||at===V?!1:!(Z!=null&&Z.has(at)),K=at=>{const Ct=at.__color??g[at.group];return P(at.id)?set(Ct,p?.18:.3):Ct},ot=at=>{const Ct=fB(at.source),gt=fB(at.target);return V?Ct===V||gt===V?p?"rgba(220, 225, 240, 0.85)":"rgba(30, 35, 50, 0.85)":p?"rgba(140, 150, 170, 0.07)":"rgba(60, 65, 80, 0.06)":p?"rgba(140, 150, 170, 0.35)":"rgba(60, 65, 80, 0.28)"},st=.5+o.display.linkThickness*2.5,bt=at=>at.kind==="sibling_core"||at.kind==="release_includes"?st*1.3:st,kt=at=>BO(at)*F,Lt=(1-o.display.textFadeThreshold)*.8;return b.jsxs("div",{className:"brain-page",children:[b.jsxs("header",{className:"brain-header",children:[b.jsxs("h1",{className:"brain-title",children:[b.jsx("span",{className:"brain-title-mark",children:"◉"}),"Brain"]}),e&&b.jsxs("span",{className:"brain-stats",children:[Y.nodes.length,"/",e.nodes.length," nodes · ",Y.links.length," links"]}),b.jsxs("div",{className:"brain-header-actions",children:[b.jsx("button",{className:"brain-btn",onClick:H,title:"Refresh",children:"↻"}),b.jsx("button",{className:`brain-btn ${E?"brain-btn--active":""}`,onClick:()=>N(at=>!at),title:"Graph settings",children:"⚙"})]})]}),b.jsxs("div",{className:"brain-canvas-wrap",ref:x,onPointerLeave:()=>A(null),onPointerDown:()=>A(null),children:[E&&b.jsx(Gtt,{settings:o,patch:c,setGroups:h,reset:u,onClose:()=>N(!1)}),r&&b.jsx("div",{className:"brain-loading",children:"Loading brain…"}),n&&b.jsxs("div",{className:"brain-empty",children:["Failed to load graph: ",String(n)]}),e&&Y.nodes.length===0&&!r&&b.jsx("div",{className:"brain-empty",children:"No nodes match the current filters."}),e&&Y.nodes.length>0&&v.w>0&&o.display.view!=="3d"&&b.jsx(R1,{ref:y,graphData:Y,width:v.w,height:v.h,backgroundColor:p?"#151518":"#ffffff",nodeId:"id",nodeLabel:at=>at.label,nodeColor:at=>K(at),nodeVal:at=>kt(at),nodeRelSize:3,linkColor:at=>ot(at),linkWidth:at=>bt(at),linkDirectionalArrowLength:at=>o.display.arrows?3.5:0,linkDirectionalArrowRelPos:.94,linkDirectionalArrowColor:()=>p?"rgba(180, 185, 200, 0.6)":"rgba(60, 65, 80, 0.55)",onNodeClick:at=>I(at),onNodeHover:at=>A(at?at.id:null),onNodeDrag:()=>A(null),onZoom:()=>A(null),onBackgroundClick:()=>{w(null),A(null)},onEngineStop:()=>{var Ct;if(R.current)return;const at=y.current;at&&((Ct=at.zoomToFit)==null||Ct.call(at,600,80),R.current=!0)},cooldownTicks:160,d3AlphaDecay:.025,d3VelocityDecay:.28,enableNodeDrag:!0,nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(at,Ct,gt)=>{if(!(at.id===T||at.id===_||V&&(Z==null?void 0:Z.has(at.id)))&&gt<Lt)return;const Wt=at.label,Gt=Math.max(10,13/Math.max(gt,.7));Ct.font=`${Gt}px -apple-system, BlinkMacSystemFont, 'Visby CF', sans-serif`,Ct.textAlign="center",Ct.textBaseline="top";const Zt=dB(at,F),Et=(at.y??0)+Zt+3,Vt=P(at.id);p?Ct.fillStyle=Vt?"rgba(200, 210, 225, 0.3)":"rgba(235, 240, 250, 0.95)":Ct.fillStyle=Vt?"rgba(60, 65, 80, 0.3)":"rgba(20, 24, 36, 0.92)",Ct.fillText(Wt,at.x??0,Et)}}),e&&Y.nodes.length>0&&v.w>0&&o.display.view==="3d"&&b.jsx(tt.Suspense,{fallback:b.jsx("div",{className:"brain-loading",children:"Loading 3D engine…"}),children:b.jsx(eet,{graphData:Y,width:v.w,height:v.h,isDark:p,nodeColor:K,nodeVal:kt,linkColor:ot,linkWidth:bt,showArrows:o.display.arrows,forces:W,nodeSizeScale:F,isDimmed:P,neighborsById:$,onNodeClick:I,onNodeHover:at=>A(at?at.id:null),onBackgroundClick:()=>{w(null),A(null)}})}),b.jsx(tet,{node:U,onClose:()=>w(null),onSelectRelated:at=>w(at),relatedNodes:j,inDegree:U?J.get(U.id)??0:0,totalDegree:U?q.get(U.id)??0:0,onNavigate:i})]})]})}function set(i,e){const r=i.replace("#",""),n=parseInt(r,16),a=n>>16&255,o=n>>8&255,c=n&255;return`rgba(${a}, ${o}, ${c}, ${e})`}function oet(){return zi({queryKey:["council"],queryFn:()=>Ie.get("/council"),select:i=>i.debates})}function cet(i){return zi({queryKey:["council",i],queryFn:()=>Ie.get(`/council/${i}`),select:e=>e.debate,enabled:!!i})}function AO(i){if(!i)return null;const e=i.split(`
474
- `)[0].trim();if(!e)return null;const n=e.replace(/^(recommend(?:ed|ing)?|i\s+(?:would\s+)?recommend|proposal|my\s+position|conclusion|verdict)\s*[:\-—]?\s*/i,"").replace(/\.$/,"").split(/\s+/).slice(0,3).join(" ");return(n.length>18?n.slice(0,17).trimEnd()+"…":n).toUpperCase()}function het(i){if(!i)return"other";const e=i.toLowerCase();return/\b(go\b|ship|launch|proceed|approve|yes|adopt|migrate\b)/.test(e)?"go":/\b(defer|postpone|delay|wait|later|q[2-9]|next\s+(?:quarter|year))/.test(e)?"defer":/\b(no-go|no\b|reject|abandon|stop|cancel|block)/.test(e)?"hold":/\b(pivot|phased|poc|proof.?of.?concept|pilot|partial|subset|scope\s+down)/.test(e)?"pivot":"other"}function EO(i,e){return i.rounds.find(r=>r.round===e)??null}function MO(i){if(!i.reactions)return 0;const e=(i.reactions.match(/\*\*[a-z][a-z0-9-]+\*\*/g)??[]).length;return e>0?e:(i.reactions.match(/^####\s+/gm)??[]).length}function uet(i,e){if(!i.reactions)return[];const r=new Set(e),n=[],a=/\*\*([a-z][a-z0-9-]+)\*\*/g;let o;for(;(o=a.exec(i.reactions))!==null;)r.has(o[1])&&!n.includes(o[1])&&n.push(o[1]);return n}function fet(i){return i.openQuestions?(i.openQuestions.match(/^\s*[-*\d]/gm)??[]).length:0}function det(i){const e=i.frontmatter.rounds_planned||i.personas.reduce((c,h)=>Math.max(c,...h.rounds.map(u=>u.round),0),0),r=i.personas.length,n=i.personas.reduce((c,h)=>c+h.rounds.reduce((u,f)=>u+MO(f),0),0);let a=0,o=0;if(i.finalReport){const c=i.finalReport.content,h=c.match(/##\s+Open\s+risks\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);h&&(a=(h[1].match(/^\s*[-*]/gm)??[]).length);const u=c.match(/##\s+Minority\s+views\s*\n([\s\S]*?)(?=^##\s+|\Z)/im);if(u){const f=u[1].trim();f.length>0&&!/\(none\)|n\/?a/i.test(f)&&(o=Math.max(1,(f.match(/^\s*[-*]/gm)??[]).length))}}return{rounds:e,personas:r,pushbacks:n,openRisks:a,minorityViews:o}}function pet(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return e%360}const pB=["◈","◉","◎","◆","◇","✦","✧","❖","⬡","⬢","▲","▼","●","■","◐","◑","◒","◓"];function get(i){let e=0;for(let r=0;r<i.length;r++)e=e*31+i.charCodeAt(r)>>>0;return pB[e%pB.length]}function met(i){const e=(i||"").toLowerCase();return e.includes("opus")?245:e.includes("sonnet")?195:e.includes("haiku")?160:280}function yet(i){const e={verdict:"",appendix:null,sections:[]},r=/^##\s+(.+?)\s*\n([\s\S]*?)(?=^##\s+|\Z)/gim;let n;for(;(n=r.exec(i))!==null;){const a=n[1].trim(),o=n[2].trim();if(!e.verdict&&/^verdict\b/i.test(a)){e.verdict=o;continue}if(/^appendix\b/i.test(a)){e.appendix||(e.appendix={heading:a,body:o});continue}e.sections.push({heading:a,body:o})}return e}function $f({slug:i,size:e=36,title:r,onClick:n}){const a=pet(i),o=`linear-gradient(135deg, hsl(${a} 72% 52%), hsl(${(a+36)%360} 72% 44%))`,c=get(i);return b.jsx("span",{className:"council-avatar",onClick:n,title:r??i,style:{width:e,height:e,fontSize:e*.45,background:o,cursor:n?"pointer":"default"},"aria-label":i,children:c})}const xet=[{value:"all",label:"All"},{value:"in_progress",label:"In progress"},{value:"synthesizing",label:"Synthesizing"},{value:"complete",label:"Complete"},{value:"promoted",label:"Promoted"}];function bet(i,e,r){var a;if(r!=="all"&&(r==="in_progress"&&!i.status.endsWith("_running")||r==="synthesizing"&&i.status!=="synthesizing"||r==="complete"&&i.status!=="complete"||r==="promoted"&&!i.promoted_to_knowledge))return!1;if(!e.trim())return!0;const n=e.trim().toLowerCase();return!!((i.topic||"").toLowerCase().includes(n)||i.id.toLowerCase().includes(n)||(a=i.personaSlugs)!=null&&a.some(o=>o.toLowerCase().includes(n)))}function vet(i){return i==="complete"?"council-hall-status--complete":i==="synthesizing"?"council-hall-status--synth":i.endsWith("_running")?"council-hall-status--running":"council-hall-status--pending"}function Cet(i){return i==="complete"?"Complete":i==="synthesizing"?"Synthesizing":i.endsWith("_running")?"In progress":"Pending"}function ket({debates:i,onOpen:e}){const{t:r}=oi(),[n,a]=tt.useState(""),[o,c]=tt.useState("all"),h=tt.useMemo(()=>i.filter(u=>bet(u,n,o)),[i,n,o]);return b.jsxs("div",{className:"council-hall",children:[b.jsxs("div",{className:"council-hall-bar",children:[b.jsxs("label",{className:"council-hall-search",children:[b.jsx("span",{"aria-hidden":!0,children:"🔍"}),b.jsx("input",{type:"search",value:n,onChange:u=>a(u.target.value),placeholder:r("council.search.placeholder")})]}),b.jsx("select",{className:"council-hall-filter",value:o,onChange:u=>c(u.target.value),"aria-label":r("council.filter.status"),children:xet.map(u=>b.jsx("option",{value:u.value,children:u.label},u.value))}),b.jsxs("span",{className:"council-hall-count",children:[h.length," / ",i.length]})]}),h.length===0?b.jsx("div",{className:"council-empty",children:r("council.empty.list")}):b.jsx("div",{className:"council-hall-grid",children:h.map(u=>b.jsxs("button",{type:"button",className:"council-hall-card",onClick:()=>e(u.id),children:[b.jsxs("div",{className:"council-hall-card-head",children:[b.jsxs("span",{className:`council-hall-status ${vet(u.status)}`,children:[b.jsx("span",{className:"council-hall-status-dot"}),Cet(u.status)]}),b.jsxs("span",{className:"council-hall-rounds",children:["R",u.current_round,"/",u.rounds_planned]})]}),b.jsx("h3",{className:"council-hall-topic",children:u.topic||u.id}),b.jsxs("div",{className:"council-hall-foot",children:[u.personaSlugs&&u.personaSlugs.length>0&&b.jsxs("div",{className:"council-hall-avatars","aria-label":`${u.personaSlugs.length} personas`,children:[u.personaSlugs.slice(0,6).map((f,p)=>b.jsx("span",{className:"council-hall-avatar-wrap",style:{zIndex:10-p},children:b.jsx($f,{slug:f,size:20})},f)),u.personaSlugs.length>6&&b.jsxs("span",{className:"council-hall-avatar-more",children:["+",u.personaSlugs.length-6]})]}),b.jsx("span",{className:"council-hall-date",children:u.updated_at||u.created_at}),u.promoted_to_knowledge&&b.jsx("span",{className:"council-hall-promoted",title:"Promoted to knowledge",children:"📜"})]})]},u.id))})]})}function _et(i){var e,r;if(i==="complete")return{label:"Complete",tone:"complete"};if(i==="synthesizing")return{label:"Synthesizing",tone:"synth"};if(/_running$/.test(i)){const n=(e=i.match(/^round_(\d+)_running$/))==null?void 0:e[1];return{label:n?`Round ${n} running`:"Running",tone:"running"}}if(/_complete$/.test(i)){const n=(r=i.match(/^round_(\d+)_complete$/))==null?void 0:r[1];return{label:n?`Round ${n} done`:"Round done",tone:"pending"}}return i==="created"?{label:"Created",tone:"pending"}:{label:i,tone:"pending"}}function wet({status:i,size:e="md"}){const{label:r,tone:n}=_et(i);return b.jsxs("span",{className:`council-status council-status--${n} council-status--${e}`,children:[b.jsx("span",{className:"council-status-dot"}),r]})}function Bu({value:i,label:e,tone:r="default"}){return b.jsxs("div",{className:`council-stat-tile council-stat-tile--${r}`,children:[b.jsx("div",{className:"council-stat-value",children:i}),b.jsx("div",{className:"council-stat-label",children:e})]})}function Tet({debate:i,onCiteJump:e,onAgentJump:r}){const{t:n}=oi(),a=tt.useMemo(()=>det(i),[i]),o=i.finalReport?yet(i.finalReport.content):null,c=i.personas.map(u=>u.slug),h=u=>{const f=u.toLowerCase();return/\b(risk|danger|warning|caveat)/.test(f)?"council-ov-card--risks":/\b(minority|dissent|objection)/.test(f)?"council-ov-card--minority":/^why\b/.test(f)?"council-ov-card--why":""};return b.jsxs("div",{className:"council-ov",children:[b.jsxs("section",{className:"council-ov-problem",children:[b.jsx("div",{className:"council-ov-label",children:"Problem"}),b.jsx("h2",{className:"council-ov-topic",children:i.frontmatter.topic||i.frontmatter.id}),i.frontmatter.promoted_to_knowledge&&b.jsxs("div",{className:"council-ov-promoted",children:[b.jsx("span",{children:"📜"}),b.jsxs("span",{children:["Promoted to knowledge: ",b.jsx("code",{children:i.frontmatter.promoted_to_knowledge})]})]})]}),!o&&b.jsxs("section",{className:"council-ov-pending",children:[b.jsx("div",{className:"council-ov-label",children:n("council.verdict.awaitingSynthesis")}),b.jsx("p",{children:n("council.verdict.synthPending")}),i.roundLog&&b.jsxs("div",{className:"council-roundlog",children:[b.jsx("h4",{children:"Round log"}),b.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:ae.parse(i.roundLog)}})]})]}),o&&b.jsxs(b.Fragment,{children:[b.jsxs("section",{className:"council-ov-verdict",children:[b.jsx("div",{className:"council-ov-label",children:"Verdict"}),b.jsx("div",{className:"council-ov-verdict-text",dangerouslySetInnerHTML:{__html:ae.parse(o.verdict||"*No verdict section found.*")}})]}),b.jsxs("div",{className:"council-ov-stats",children:[b.jsx(Bu,{value:a.rounds,label:"rounds"}),b.jsx(Bu,{value:a.personas,label:"personas"}),b.jsx(Bu,{value:a.pushbacks,label:"pushbacks"}),b.jsx(Bu,{value:a.openRisks,label:"open risks",tone:"warning"}),b.jsx(Bu,{value:a.minorityViews,label:"dissent",tone:"dissent"})]}),o.sections.length>0&&b.jsx("div",{className:"council-ov-sections",children:o.sections.map(u=>b.jsxs("section",{className:`council-ov-card ${h(u.heading)}`,children:[b.jsx("h3",{children:u.heading}),b.jsx(Bet,{text:u.body,knownSlugs:c,onCiteJump:e,onAgentJump:r})]},u.heading))}),o.appendix&&b.jsxs("details",{className:"council-ov-appendix",children:[b.jsx("summary",{children:o.appendix.heading}),b.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:ae.parse(o.appendix.body)}})]})]})]})}function Bet({text:i,knownSlugs:e,onCiteJump:r,onAgentJump:n}){const a=[],o=new Set(e);let c=i.replace(/([a-z][a-z0-9-]+)\s+in\s+R(\d+)/g,(x,y,v)=>{if(!o.has(y))return x;const C=a.length;return a.push({slug:y,round:Number(v)}),`\0CITE${C}\0`});const h=[];c=c.replace(/\*\*([a-z][a-z0-9-]+)\*\*/g,(x,y)=>{if(!o.has(y))return x;const v=h.length;return h.push(y),`\0AGENT${v}\0`});const f=ae.parse(c).split(/\u0000(CITE|AGENT)(\d+)\u0000/),p=[];let g=0;for(;g<f.length;){const x=f[g];if(g+2<f.length&&(f[g+1]==="CITE"||f[g+1]==="AGENT")){p.push(b.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`));const y=f[g+1],v=Number(f[g+2]);if(y==="CITE"){const C=a[v];p.push(b.jsxs("button",{type:"button",className:"council-cite-chip",onClick:()=>r(C.slug,C.round),children:[b.jsx($f,{slug:C.slug,size:14}),b.jsx("span",{children:C.slug}),b.jsxs("span",{className:"council-cite-round",children:["R",C.round]})]},`c-${g}`))}else{const C=h[v];p.push(b.jsx("button",{type:"button",className:"council-inline-slug",onClick:()=>n(C),children:C},`a-${g}`))}g+=3}else p.push(b.jsx("span",{dangerouslySetInnerHTML:{__html:x}},`h-${g}`)),g+=1}return b.jsx("div",{className:"council-sheet-prose council-citation-prose",children:p})}function LO({model:i}){const e=met(i),r=i?i.charAt(0).toUpperCase()+i.slice(1):"unknown";return b.jsx("span",{className:"council-model-badge",style:{background:`hsl(${e} 85% 55% / 0.14)`,color:`hsl(${e} 85% 40%)`,borderColor:`hsl(${e} 85% 55% / 0.35)`},title:`Model: ${r}`,children:r})}function Aet(i,e){if(!e.trim())return!0;const r=e.trim().toLowerCase();if(i.slug.toLowerCase().includes(r))return!0;for(const n of i.rounds)if([n.executiveSummary,n.position,n.reasoning,n.reactions,n.openQuestions].filter(Boolean).join(`
475
- `).toLowerCase().includes(r))return!0;return!1}function D1(i,e){if(!e.trim())return i;const n=e.trim().replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return i.replace(new RegExp(`(${n})`,"gi"),"<mark>$1</mark>")}function Eet({debate:i,focusSlug:e}){const{t:r}=oi(),[n,a]=tt.useState(""),[o,c]=tt.useState(()=>new Set),h=tt.useRef(null),u=tt.useMemo(()=>i.personas.filter(p=>Aet(p,n)),[i.personas,n]);tt.useEffect(()=>{if(!e)return;c(g=>{const x=new Set(g);return x.delete(e),x});const p=setTimeout(()=>{var x;const g=(x=h.current)==null?void 0:x.querySelector(`[data-agent="${e}"]`);g==null||g.scrollIntoView({behavior:"smooth",block:"start"})},30);return()=>clearTimeout(p)},[e]);const f=p=>{c(g=>{const x=new Set(g);return x.has(p)?x.delete(p):x.add(p),x})};return b.jsxs("div",{className:"council-transcript",ref:h,children:[b.jsxs("div",{className:"council-transcript-searchbar",children:[b.jsxs("label",{className:"council-transcript-search",children:[b.jsx("span",{"aria-hidden":!0,children:"🔍"}),b.jsx("input",{type:"search",value:n,onChange:p=>a(p.target.value),placeholder:r("council.search.transcript")})]}),b.jsxs("span",{className:"council-transcript-count",children:[u.length," of ",i.personas.length," persona",i.personas.length===1?"":"s"]})]}),b.jsxs("div",{className:"council-transcript-body",children:[u.length===0&&b.jsx("div",{className:"council-empty",children:"No personas match this search."}),u.map(p=>b.jsx(Met,{persona:p,query:n,collapsed:o.has(p.slug),highlighted:e===p.slug,onToggle:()=>f(p.slug)},p.slug))]})]})}function Met({persona:i,query:e,collapsed:r,highlighted:n,onToggle:a}){return b.jsxs("article",{className:`council-transcript-block ${n?"is-highlighted":""}`,"data-agent":i.slug,children:[b.jsxs("header",{className:"council-transcript-block-head",onClick:a,children:[b.jsxs("div",{className:"council-transcript-block-title",children:[b.jsx($f,{slug:i.slug,size:24}),b.jsxs("div",{children:[b.jsx("h3",{className:"council-transcript-block-name",children:i.slug}),b.jsxs("div",{className:"council-transcript-block-meta",children:[b.jsx(LO,{model:i.frontmatter.model}),i.frontmatter.aspects.slice(0,4).map(o=>b.jsx("span",{className:"council-aspect",children:o},o))]})]})]}),b.jsx("span",{className:`council-transcript-chev ${r?"":"is-open"}`,"aria-hidden":!0,children:"▸"})]}),!r&&b.jsxs("div",{className:"council-transcript-block-body",children:[i.persona&&b.jsxs("section",{className:"council-sheet-section",children:[b.jsx("h4",{children:"Persona prompt"}),b.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:D1(ae.parse(i.persona),e)}})]}),i.rounds.length===0&&b.jsx("div",{className:"council-sheet-empty",children:"No rounds submitted."}),i.rounds.slice().sort((o,c)=>c.round-o.round).map(o=>b.jsx(Let,{round:o,crossContext:i.crossContext[o.round]??null,query:e},o.round)),i.researches.length>0&&b.jsxs("section",{className:"council-sheet-section",children:[b.jsx("h4",{children:"Research notes"}),b.jsx("ul",{className:"council-research-list",children:i.researches.map(o=>b.jsxs("li",{children:[b.jsx("span",{className:"council-research-topic",children:o.topic}),b.jsx("span",{className:"council-research-date",children:o.added_at})]},o.slug))})]})]})]})}function Let({round:i,crossContext:e,query:r}){const n=AO(i.position);return b.jsxs("section",{className:"council-round-panel",children:[b.jsxs("header",{className:"council-round-panel-head",children:[b.jsxs("h4",{className:"council-round-panel-title",children:["Round ",i.round]}),n&&b.jsx("span",{className:"council-chip-pos",children:n})]}),e&&b.jsxs("blockquote",{className:"council-crosscontext",children:[b.jsx("strong",{children:"Cross-context loaded"}),b.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:D1(ae.parse(e),r)}})]}),i.executiveSummary&&b.jsx(Au,{title:"Executive summary",body:i.executiveSummary,query:r}),i.position&&b.jsx(Au,{title:"Position",body:i.position,query:r}),i.reasoning&&b.jsx(Au,{title:"Reasoning",body:i.reasoning,query:r}),i.reactions&&b.jsx(Au,{title:"Reactions to peers",body:i.reactions,query:r}),i.openQuestions&&b.jsx(Au,{title:"Open questions",body:i.openQuestions,query:r})]})}function Au({title:i,body:e,query:r}){const n=D1(ae.parse(e),r);return b.jsxs("div",{className:"council-round-sub",children:[b.jsx("h5",{className:"council-round-sub-title",children:i}),b.jsx("div",{className:"council-sheet-prose",dangerouslySetInnerHTML:{__html:n}})]})}function NO(i,e){return e.trim()?i?[i.executiveSummary,i.position,i.reasoning].filter(Boolean).join(`
476
- `).toLowerCase().includes(e.trim().toLowerCase()):!1:!0}function Net({debate:i,query:e,onQueryChange:r,selected:n,onSelectCell:a,onClearSelection:o}){const c=tt.useRef(null),h=tt.useMemo(()=>Array.from({length:Math.max(1,i.frontmatter.rounds_planned)},(p,g)=>g+1),[i.frontmatter.rounds_planned]),u=tt.useMemo(()=>i.personas.map(p=>p.slug),[i.personas]),f=tt.useMemo(()=>{if(!e.trim())return null;let p=0;for(const g of i.personas)for(const x of h)NO(EO(g,x),e)&&p++;return p},[e,i,h]);return tt.useEffect(()=>{if(!n)return;const p=g=>{const x=g.target;if(x&&["INPUT","TEXTAREA"].includes(x.tagName))return;if(g.key==="Escape"){o();return}const y=i.personas.findIndex(C=>C.slug===n.slug);if(y===-1)return;const v=i.frontmatter.rounds_planned;g.key==="ArrowRight"&&n.round<v?(g.preventDefault(),a(n.slug,n.round+1)):g.key==="ArrowLeft"&&n.round>1?(g.preventDefault(),a(n.slug,n.round-1)):g.key==="ArrowDown"&&y<i.personas.length-1?(g.preventDefault(),a(i.personas[y+1].slug,n.round)):g.key==="ArrowUp"&&y>0&&(g.preventDefault(),a(i.personas[y-1].slug,n.round))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,i,o,a]),tt.useEffect(()=>{if(!n||!c.current)return;const p=c.current.querySelector(`[data-persona="${n.slug}"][data-round="${n.round}"]`);p==null||p.scrollIntoView({behavior:"smooth",block:"center"})},[n]),b.jsxs("div",{className:"council-matrix",children:[b.jsxs("div",{className:"council-matrix-bar",children:[b.jsxs("label",{className:"council-matrix-search-input",children:[b.jsx("span",{className:"council-matrix-search-icon","aria-hidden":!0,children:"🔍"}),b.jsx("input",{type:"search",value:e,onChange:p=>r(p.target.value),placeholder:"Filter cells by text…"}),e&&b.jsx("button",{type:"button",className:"council-matrix-search-clear",onClick:()=>r(""),children:"×"})]}),f!=null&&b.jsxs("span",{className:"council-matrix-count",children:[f," match",f===1?"":"es"]})]}),b.jsx("div",{className:"council-matrix-scroll",ref:c,children:b.jsxs("div",{className:"council-matrix-grid",style:{gridTemplateColumns:`180px repeat(${h.length}, minmax(220px, 1fr))`},children:[b.jsx("div",{className:"council-matrix-corner","aria-hidden":!0}),h.map(p=>{const g=i.frontmatter.status===`round_${p}_running`,x=i.frontmatter.current_round>=p&&!g;return b.jsxs("div",{className:`council-round-head ${g?"is-running":""} ${x?"is-done":""}`,children:["Round ",p]},`h-${p}`)}),i.personas.map(p=>b.jsx(Oet,{persona:p,rounds:h,debate:i,query:e,selected:n,knownSlugs:u,onSelectCell:a},p.slug))]})})]})}function Oet({persona:i,rounds:e,debate:r,query:n,selected:a,knownSlugs:o,onSelectCell:c}){return b.jsxs(b.Fragment,{children:[b.jsxs("aside",{className:"council-matrix-row-head",children:[b.jsx($f,{slug:i.slug,size:22}),b.jsxs("div",{className:"council-matrix-row-id",children:[b.jsx("div",{className:"council-matrix-row-name",children:i.slug}),b.jsx(LO,{model:i.frontmatter.model})]})]}),e.map(h=>{const u=EO(i,h),f=r.frontmatter.status===`round_${h}_running`,p=!!a&&a.slug===i.slug&&a.round===h,g=NO(u,n),x=!!n.trim()&&!g;return b.jsx(jet,{personaSlug:i.slug,round:h,data:u,isRunning:f,active:p,dimmed:x,knownSlugs:o,onSelect:c},h)})]})}function jet({personaSlug:i,round:e,data:r,isRunning:n,active:a,dimmed:o,knownSlugs:c,onSelect:h}){if(!r)return b.jsx("div",{className:`council-cell council-cell--empty ${n?"council-cell--pending":""} ${o?"is-dimmed":""}`,"data-persona":i,"data-round":e,children:b.jsx("span",{className:"council-cell-empty-label",children:n?"awaiting…":"— silent —"})});const u=AO(r.position),f=het(r.position),p=MO(r),g=fet(r),x=uet(r,c);return b.jsxs("button",{type:"button",className:`council-cell council-cell--${f} ${a?"is-active":""} ${o?"is-dimmed":""}`,"data-persona":i,"data-round":e,onClick:()=>h(i,e),children:[b.jsxs("div",{className:"council-cell-top",children:[u&&b.jsx("span",{className:`council-chip-pos council-chip-pos--${f}`,children:u}),(p>0||g>0)&&b.jsxs("span",{className:"council-cell-meta",children:[p>0&&b.jsxs(b.Fragment,{children:["↯ ",p]}),p>0&&g>0&&b.jsx("span",{children:" · "}),g>0&&b.jsxs(b.Fragment,{children:["? ",g]})]})]}),!a&&r.executiveSummary&&b.jsx("p",{className:"council-cell-exec",children:r.executiveSummary}),a&&b.jsxs("div",{className:"council-cell-full",children:[r.executiveSummary&&b.jsx(Eu,{title:"Executive summary",children:b.jsx("p",{children:r.executiveSummary})}),r.position&&b.jsx(Eu,{title:"Position",children:b.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.position)}})}),r.reasoning&&b.jsx(Eu,{title:"Reasoning",children:b.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.reasoning)}})}),r.reactions&&b.jsxs(Eu,{title:"Reactions to peers",children:[b.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.reactions)}}),x.length>0&&b.jsx("div",{className:"council-cell-react-chips",children:x.map(y=>b.jsxs("span",{className:"council-cell-react-chip",children:[b.jsx($f,{slug:y,size:14}),b.jsx("span",{children:y})]},y))})]}),r.openQuestions&&b.jsx(Eu,{title:"Open questions",children:b.jsx("div",{dangerouslySetInnerHTML:{__html:ae.parse(r.openQuestions)}})})]})]})}function Eu({title:i,children:e}){return b.jsxs("section",{className:"council-cell-sub",children:[b.jsx("h5",{children:i}),b.jsx("div",{className:"council-cell-sub-body",children:e})]})}function gB(i){return i==="complete"||i==="synthesizing"?"overview":"matrix"}function Ret({debate:i,onBack:e}){const{t:r}=oi(),[n,a]=tt.useState(()=>gB(i.frontmatter.status)),[o,c]=tt.useState(""),[h,u]=tt.useState(null),[f,p]=tt.useState(null);tt.useEffect(()=>{a(gB(i.frontmatter.status)),c(""),u(null),p(null)},[i.frontmatter.id]);const g=(v,C)=>{a("matrix"),u({slug:v,round:C})},x=v=>{a("agents"),p(v)},y=()=>{var v;return(v=navigator.clipboard)==null?void 0:v.writeText(i.frontmatter.id).catch(()=>{})};return b.jsxs("div",{className:"council-detail",children:[b.jsxs("header",{className:"council-detail-head",children:[b.jsxs("button",{type:"button",className:"council-detail-back",onClick:e,children:["← ",r("council.title")]}),b.jsxs("div",{className:"council-detail-meta",children:[b.jsx(wet,{status:i.frontmatter.status}),b.jsxs("span",{className:"council-detail-rounds",children:["R",i.frontmatter.current_round,"/",i.frontmatter.rounds_planned]}),b.jsx("span",{className:"council-session-dot",children:"·"}),b.jsx("span",{className:"council-detail-date",children:i.frontmatter.created_at}),b.jsx("span",{className:"council-session-dot",children:"·"}),b.jsx("button",{type:"button",className:"council-session-id",onClick:y,title:"Copy debate id",children:i.frontmatter.id})]})]}),b.jsxs("nav",{className:"council-tabs",role:"tablist",children:[b.jsx(gx,{active:n==="overview",onClick:()=>a("overview"),label:"Overview"}),b.jsx(gx,{active:n==="agents",onClick:()=>a("agents"),label:"Agents"}),b.jsx(gx,{active:n==="matrix",onClick:()=>a("matrix"),label:"Matrix"})]}),b.jsxs("div",{className:"council-detail-body",children:[n==="overview"&&b.jsx(Tet,{debate:i,onCiteJump:g,onAgentJump:x}),n==="agents"&&b.jsx(Eet,{debate:i,focusSlug:f}),n==="matrix"&&b.jsx(Net,{debate:i,query:o,onQueryChange:c,selected:h,onSelectCell:(v,C)=>u({slug:v,round:C}),onClearSelection:()=>u(null)})]})]})}function gx({active:i,onClick:e,label:r}){return b.jsx("button",{type:"button",role:"tab","aria-selected":i,className:`council-tab ${i?"is-active":""}`,onClick:e,children:r})}function Det(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=oet(),[o,c]=tt.useState(null),{data:h,isLoading:u}=cet(o);return r?b.jsx("div",{className:"loading",children:i("common.loading")}):n?b.jsxs("div",{className:"error-state",children:["Failed to load council sessions. ",a==null?void 0:a.message]}):o?b.jsxs("div",{className:"council-page council-page--detail",children:[u&&b.jsx("div",{className:"loading",children:"Loading session…"}),h&&b.jsx(Ret,{debate:h,onBack:()=>c(null)})]}):b.jsxs("div",{className:"council-page",children:[b.jsx("h1",{className:"page-title",children:i("council.title")}),b.jsx(ket,{debates:e??[],onOpen:c})]})}function Fet(){return zi({queryKey:["config"],queryFn:()=>Ie.get("/config"),select:i=>i.config})}function $et(){const i=Zr();return _a({mutationFn:e=>Ie.patch("/config",e),onSuccess:()=>{i.invalidateQueries({queryKey:["config"]})}})}const zet=[{id:"claude",labelKey:"settings.platform.claude"},{id:"codex",labelKey:"settings.platform.codex"}],mB={platforms:[]};function qet(){const{t:i}=oi(),{data:e,isLoading:r,isError:n}=Fet(),a=$et(),[o,c]=tt.useState(mB.platforms),[h,u]=tt.useState(!1),[f,p]=tt.useState(!1);if(tt.useEffect(()=>{c((e??mB).platforms),u(!1),p(!1)},[e]),r)return b.jsx("div",{className:"loading",children:i("common.loading")});if(n)return b.jsx("div",{className:"error-state",children:i("common.error")});const g=y=>{c(v=>{const C=v.includes(y)?v.filter(_=>_!==y):[...v,y];return u(!0),p(!1),C})},x=()=>{a.mutate({platforms:o},{onSuccess:()=>{u(!1),p(!0)}})};return b.jsxs("div",{className:"settings-page",children:[b.jsxs("div",{className:"settings-header",children:[b.jsx("h1",{className:"page-title",children:i("settings.title")}),b.jsxs("div",{className:"settings-save-row",children:[f&&!h&&b.jsx("span",{className:"settings-saved",children:i("settings.saved")}),a.isError&&b.jsx("span",{className:"settings-error",children:i("common.error")}),b.jsx("button",{className:"btn btn--primary",onClick:x,disabled:!h||a.isPending,children:a.isPending?i("settings.saving"):i("settings.save")})]})]}),e===null&&b.jsx("div",{className:"settings-empty-notice",children:i("settings.no_config")}),b.jsxs("section",{className:"settings-section",children:[b.jsx("h2",{className:"settings-section-title",children:i("settings.platforms")}),b.jsx("div",{className:"settings-checkboxes",children:zet.map(({id:y,labelKey:v})=>b.jsxs("label",{className:"settings-checkbox-label",children:[b.jsx("input",{type:"checkbox",className:"settings-checkbox",checked:o.includes(y),onChange:()=>g(y)}),b.jsx("span",{children:i(v)})]},y))})]})]})}function Iet(){return zi({queryKey:["packs"],queryFn:()=>Ie.get("/packs")})}function Pet(){const i=Zr();return _a({mutationFn:e=>Ie.post(`/packs/${encodeURIComponent(e)}/install`,{}),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function Het(){const i=Zr();return _a({mutationFn:e=>Ie.del(`/packs/${encodeURIComponent(e)}`),onSuccess:()=>{i.invalidateQueries({queryKey:["packs"]})}})}function Uet(i){return"base"in i}function OO({item:i,onActionDone:e}){const{t:r}=oi(),n=Pet(),a=Het(),o=i.installed,c=o?a:n,h=c.isPending,u=c.isError,f=r(o?"packs.action.remove":"packs.action.install"),p=r(o?"packs.action.removing":"packs.action.installing"),g=h?p:f,x=y=>{y.stopPropagation(),y.preventDefault(),!h&&c.mutate(i.name,{onSuccess:()=>e==null?void 0:e()})};return b.jsxs("div",{className:"packs-card-actions",children:[b.jsx("button",{type:"button",className:`packs-action-btn btn btn--ghost${o?" packs-action-btn--danger":""}`,onClick:x,disabled:h,"aria-invalid":u||void 0,"aria-busy":h||void 0,children:g}),u&&b.jsx("span",{className:"packs-action-error",role:"alert",children:r("packs.action.error")})]})}function Wet({item:i,onClose:e}){const{t:r}=oi(),n=tt.useCallback(a=>{a.target===a.currentTarget&&e()},[e]);return tt.useEffect(()=>{const a=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),b.jsx("div",{className:"packs-modal-overlay",onClick:n,"aria-modal":"true",role:"dialog","aria-label":i.name,children:b.jsxs("div",{className:"packs-modal-panel",children:[b.jsxs("div",{className:"packs-modal-header",children:[b.jsxs("div",{className:"packs-modal-title-row",children:[b.jsx("h2",{className:"packs-modal-name",children:i.name}),i.installed&&b.jsx("span",{className:"packs-installed-pill",children:r("settings.packs.installed")})]}),b.jsxs("div",{className:"packs-modal-header-actions",children:[b.jsx(OO,{item:i,onActionDone:e}),b.jsx("button",{className:"packs-modal-close btn btn--ghost",type:"button",onClick:e,"aria-label":r("packs.detail.close"),children:r("packs.detail.close")})]})]}),i.description&&b.jsx("p",{className:"packs-modal-desc",children:i.description}),i.tags.length>0&&b.jsx("div",{className:"packs-modal-tags",children:i.tags.map(a=>b.jsx("span",{className:"task-tag","data-hue":Ll(a),children:a},a))}),Uet(i)&&b.jsxs(b.Fragment,{children:[i.base&&b.jsxs("div",{className:"packs-modal-section",children:[b.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.base")}),b.jsx("p",{className:"packs-modal-mono",children:i.base})]}),i.subSkills.length>0&&b.jsxs("div",{className:"packs-modal-section",children:[b.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.subskills")}),b.jsx("ul",{className:"packs-modal-subskills",children:i.subSkills.map(a=>b.jsxs("li",{className:"packs-modal-subskill",children:[b.jsx("span",{className:"packs-modal-subskill-name",children:a.name}),a.description&&b.jsx("span",{className:"packs-modal-subskill-desc",children:a.description})]},a.name))})]}),i.relatedAgents&&i.relatedAgents.length>0&&b.jsxs("div",{className:"packs-modal-section",children:[b.jsx("h3",{className:"packs-modal-section-title",children:r("packs.detail.agents")}),b.jsx("ul",{className:"packs-modal-agents",children:i.relatedAgents.map(a=>b.jsx("li",{className:"packs-modal-agent",children:a},a))})]})]})]})})}function yB({item:i,onClick:e}){const{t:r}=oi(),n=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e(i))};return b.jsxs("div",{className:"packs-card packs-card--clickable",role:"button",tabIndex:0,onClick:()=>e(i),onKeyDown:n,"aria-label":i.name,children:[b.jsxs("div",{className:"packs-card-header",children:[b.jsx("span",{className:"packs-card-name",children:i.name}),i.installed&&b.jsx("span",{className:"packs-installed-pill",children:r("settings.packs.installed")})]}),i.description&&b.jsx("p",{className:"packs-card-desc",children:i.description}),i.tags.length>0&&b.jsx("div",{className:"packs-card-tags",children:i.tags.map(a=>b.jsx("span",{className:"task-tag","data-hue":Ll(a),children:a},a))}),b.jsx(OO,{item:i})]})}function Yet(){const{t:i}=oi(),{data:e,isLoading:r,isError:n,error:a}=Iet(),[o,c]=tt.useState(null);if(r)return b.jsx("div",{className:"loading",children:i("common.loading")});if(n)return b.jsxs("div",{className:"error-state",children:[i("common.error")," ",a==null?void 0:a.message]});const h=(e==null?void 0:e.packs)??[],u=(e==null?void 0:e.standalone)??[];return b.jsxs("div",{className:"packs-page",children:[b.jsx("h1",{className:"page-title",children:i("packs.title")}),h.length===0&&u.length===0&&b.jsx("div",{className:"packs-empty",children:i("common.empty")}),h.length>0&&b.jsxs("section",{className:"packs-section",children:[b.jsx("h2",{className:"packs-section-title",children:i("packs.section.packs")}),b.jsx("div",{className:"packs-grid",children:h.map(f=>b.jsx(yB,{item:f,onClick:c},f.name))})]}),u.length>0&&b.jsxs("section",{className:"packs-section",children:[b.jsx("h2",{className:"packs-section-title",children:i("packs.section.standalone")}),b.jsx("div",{className:"packs-grid",children:u.map(f=>b.jsx(yB,{item:f,onClick:c},f.name))})]}),o!==null&&b.jsx(Wet,{item:o,onClose:()=>c(null)})]})}const Get=new xR({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0},mutations:{retry:0}}});function Vet({nav:i}){const e=(r,n)=>{const a={tasks:"tasks",features:"features",knowledge:"knowledge",core:"core"};i.navigate(a[r],n)};switch(i.page){case"brain":return b.jsx(aet,{onNavigate:e});case"tasks":return b.jsx(MQ,{});case"sleep":return b.jsx(jQ,{});case"core":return b.jsx(QQ,{});case"knowledge":return b.jsx(tZ,{});case"features":return b.jsx(eZ,{});case"council":return b.jsx(Det,{});case"settings":return b.jsx(qet,{});case"packs":return b.jsx(Yet,{})}}class Xet extends tt.Component{constructor(){super(...arguments);Ht(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?b.jsxs("div",{className:"error-boundary",children:[b.jsx("h1",{children:"Something went wrong."}),b.jsx("p",{children:this.state.error.message}),b.jsx("button",{onClick:()=>window.location.reload(),children:"Reload"})]}):this.props.children}}function Qet(){return b.jsx(Xet,{children:b.jsx(bR,{client:Get,children:b.jsx(FR,{children:b.jsx(LR,{children:b.jsx(OR,{children:b.jsx(sX,{children:i=>b.jsx(Vet,{nav:i})})})})})})})}V4.createRoot(document.getElementById("root")).render(b.jsx(tt.StrictMode,{children:b.jsx(Qet,{})}));export{BA as $,rit as A,yo as B,rF as C,si as D,p6 as E,n1 as F,mA as G,AP as H,O7 as I,zq as J,xF as K,ef as L,eit as M,Kg as N,VF as O,wA as P,sS as Q,y7 as R,Zx as S,BP as T,Sf as U,In as V,pt as W,ft as X,i6 as Y,bP as Z,B as _,l6 as a,K9 as a$,d7 as a0,OS as a1,NS as a2,fit as a3,oit as a4,hit as a5,cit as a6,ait as a7,Rv as a8,uit as a9,PU as aA,IU as aB,iE as aC,h7 as aD,WH as aE,hA as aF,p7 as aG,tit as aH,Zg as aI,pg as aJ,kZ as aK,b5 as aL,jg as aM,Nf as aN,HH as aO,PH as aP,u7 as aQ,Av as aR,io as aS,sf as aT,_S as aU,w$ as aV,GI as aW,y5 as aX,h5 as aY,Z9 as aZ,ug as a_,sit as aa,dc as ab,pit as ac,dit as ad,lit as ae,mU as af,ML as ag,Lit as ah,Iq as ai,vr as aj,gs as ak,uu as al,a1 as am,w5 as an,_l as ao,E5 as ap,re as aq,va as ar,Dt as as,xW as at,Mit as au,Nit as av,Ait as aw,qt as ax,Eit as ay,GU as az,o6 as b,So as b$,hh as b0,Qo as b1,PI as b2,tw as b3,qn as b4,J9 as b5,Zv as b6,Q9 as b7,iI as b8,ch as b9,ZK as bA,Pt as bB,f7 as bC,QK as bD,ZN as bE,AT as bF,fl as bG,vZ as bH,it as bI,tt as bJ,OJ as bK,YJ as bL,GJ as bM,b as bN,BT as bO,pP as bP,oP as bQ,mP as bR,Gg as bS,V9 as bT,Qv as bU,m5 as bV,xP as bW,JI as bX,IW as bY,Mf as bZ,dg as b_,YI as ba,gP as bb,oI as bc,lP as bd,Xv as be,Ww as bf,$t as bg,M5 as bh,jr as bi,x$ as bj,Bv as bk,PA as bl,Af as bm,WA as bn,nit as bo,fS as bp,uS as bq,iF as br,Li as bs,YX as bt,Ne as bu,w1 as bv,WJ as bw,HJ as bx,RJ as by,UJ as bz,Ae as c,XS as c0,Kv as c1,f5 as c2,Ob as c3,Ket as c4,Ce as c5,Xt as d,TA as e,Ei as f,h6 as g,fs as h,zn as i,Uq as j,wf as k,_t as l,B5 as m,iit as n,jit as o,u6 as p,f6 as q,Oit as r,c6 as s,qq as t,Rn as u,DU as v,LP as w,git as x,yl as y,s6 as z};