@aggroot-team/aggroot 1.10.6 → 1.10.8

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 (58) hide show
  1. package/dist/index.cjs +841 -826
  2. package/dist/native/better_sqlite3.node +0 -0
  3. package/package.json +156 -157
  4. package/share/agents/agent-coder.json +4 -4
  5. package/share/agents/agent-devops.json +15 -1
  6. package/share/agents/agent-meeting-export.json +33 -38
  7. package/share/scripts/_utils.py +1 -1
  8. package/share/web/dist/assets/{arc-B6muhbY_.js → arc-fXO6JDqX.js} +1 -1
  9. package/share/web/dist/assets/{architectureDiagram-3BPJPVTR-DJ9cgQMo.js → architectureDiagram-3BPJPVTR-DxcpEXLn.js} +1 -1
  10. package/share/web/dist/assets/{blockDiagram-GPEHLZMM-3TSaM49r.js → blockDiagram-GPEHLZMM-BN2eZ-xm.js} +1 -1
  11. package/share/web/dist/assets/{c4Diagram-AAUBKEIU-D5W-EiaZ.js → c4Diagram-AAUBKEIU-JRmRJKkJ.js} +1 -1
  12. package/share/web/dist/assets/channel-DGK42hKg.js +1 -0
  13. package/share/web/dist/assets/{chunk-2J33WTMH-B5D6r5YR.js → chunk-2J33WTMH-DMkMc_hI.js} +1 -1
  14. package/share/web/dist/assets/{chunk-4BX2VUAB-DqUq_8zk.js → chunk-4BX2VUAB-D0c16Fhz.js} +1 -1
  15. package/share/web/dist/assets/{chunk-55IACEB6-CAWNr4-g.js → chunk-55IACEB6-Bp7DxFLI.js} +1 -1
  16. package/share/web/dist/assets/{chunk-727SXJPM-CP7XrNMz.js → chunk-727SXJPM-BCU3ZyVW.js} +1 -1
  17. package/share/web/dist/assets/{chunk-AQP2D5EJ-BeGUiFeO.js → chunk-AQP2D5EJ-oez5bIeI.js} +1 -1
  18. package/share/web/dist/assets/{chunk-FMBD7UC4-BArzyAmU.js → chunk-FMBD7UC4-CIBaidtH.js} +1 -1
  19. package/share/web/dist/assets/{chunk-ND2GUHAM-D1hRuBfF.js → chunk-ND2GUHAM-PkA6pN2P.js} +1 -1
  20. package/share/web/dist/assets/{chunk-QZHKN3VN-Bsne3J2q.js → chunk-QZHKN3VN-C37DcwmC.js} +1 -1
  21. package/share/web/dist/assets/classDiagram-4FO5ZUOK--vHwBNPw.js +1 -0
  22. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2--vHwBNPw.js +1 -0
  23. package/share/web/dist/assets/{cose-bilkent-S5V4N54A-DKqnlQHP.js → cose-bilkent-S5V4N54A-CQgwlca2.js} +1 -1
  24. package/share/web/dist/assets/{dagre-BM42HDAG-T0muUpSx.js → dagre-BM42HDAG-sUMyJAls.js} +1 -1
  25. package/share/web/dist/assets/{diagram-2AECGRRQ-DF97RON9.js → diagram-2AECGRRQ-CP7tYbxz.js} +1 -1
  26. package/share/web/dist/assets/{diagram-5GNKFQAL-CO0LSEnt.js → diagram-5GNKFQAL-606wazRy.js} +1 -1
  27. package/share/web/dist/assets/{diagram-KO2AKTUF-BeUvdtva.js → diagram-KO2AKTUF-DpiAKbQ5.js} +1 -1
  28. package/share/web/dist/assets/{diagram-LMA3HP47-gtSx4MhZ.js → diagram-LMA3HP47-jiVuRqH3.js} +1 -1
  29. package/share/web/dist/assets/{diagram-OG6HWLK6-CGvTzwl5.js → diagram-OG6HWLK6-D3L4JEr9.js} +1 -1
  30. package/share/web/dist/assets/{erDiagram-TEJ5UH35-DAS50JTz.js → erDiagram-TEJ5UH35-BUUeM_17.js} +1 -1
  31. package/share/web/dist/assets/{flowDiagram-I6XJVG4X-DeE-378s.js → flowDiagram-I6XJVG4X-DXxxC6-Y.js} +1 -1
  32. package/share/web/dist/assets/{ganttDiagram-6RSMTGT7-Dewf3yPU.js → ganttDiagram-6RSMTGT7-vFOdB4g6.js} +1 -1
  33. package/share/web/dist/assets/{gitGraphDiagram-PVQCEYII-DsSOgbbA.js → gitGraphDiagram-PVQCEYII-Cbv14T1p.js} +1 -1
  34. package/share/web/dist/assets/index-BtDxhUsK.js +470 -0
  35. package/share/web/dist/assets/{infoDiagram-5YYISTIA-DAt_731A.js → infoDiagram-5YYISTIA-DKfXN1Q4.js} +1 -1
  36. package/share/web/dist/assets/{ishikawaDiagram-YF4QCWOH-C1m5tBb_.js → ishikawaDiagram-YF4QCWOH-BUAJVJ0L.js} +1 -1
  37. package/share/web/dist/assets/{journeyDiagram-JHISSGLW-BJfVYlQ1.js → journeyDiagram-JHISSGLW-CD69hEtn.js} +1 -1
  38. package/share/web/dist/assets/{kanban-definition-UN3LZRKU-BjTvHNu5.js → kanban-definition-UN3LZRKU-RwQ4LJ5Y.js} +1 -1
  39. package/share/web/dist/assets/{linear-C3h9k4xJ.js → linear-D56dd0EU.js} +1 -1
  40. package/share/web/dist/assets/{mindmap-definition-RKZ34NQL-p8Q0AQcY.js → mindmap-definition-RKZ34NQL-D_hyFkAT.js} +1 -1
  41. package/share/web/dist/assets/{pieDiagram-4H26LBE5-GT_zaKLe.js → pieDiagram-4H26LBE5-dBwJf4Dk.js} +1 -1
  42. package/share/web/dist/assets/{quadrantDiagram-W4KKPZXB-C6hG_nqx.js → quadrantDiagram-W4KKPZXB-DcAx6yGv.js} +1 -1
  43. package/share/web/dist/assets/{requirementDiagram-4Y6WPE33-CHrdt67q.js → requirementDiagram-4Y6WPE33-CZQSL1Vf.js} +1 -1
  44. package/share/web/dist/assets/{sankeyDiagram-5OEKKPKP-Dz_VzhnN.js → sankeyDiagram-5OEKKPKP-CF7UNS_0.js} +1 -1
  45. package/share/web/dist/assets/{sequenceDiagram-3UESZ5HK-CpUTpqpu.js → sequenceDiagram-3UESZ5HK-BJSZSgBk.js} +1 -1
  46. package/share/web/dist/assets/{stateDiagram-AJRCARHV-CrsERnzj.js → stateDiagram-AJRCARHV-CcBxRhZT.js} +1 -1
  47. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-CQHde_6r.js +1 -0
  48. package/share/web/dist/assets/{timeline-definition-PNZ67QCA-Dj9KPhNj.js → timeline-definition-PNZ67QCA-DyU6yuwC.js} +1 -1
  49. package/share/web/dist/assets/{vennDiagram-CIIHVFJN-BF-ujuZh.js → vennDiagram-CIIHVFJN-CEXHS9af.js} +1 -1
  50. package/share/web/dist/assets/{wardley-L42UT6IY-CpAmwqP3.js → wardley-L42UT6IY-C_q2cv86.js} +1 -1
  51. package/share/web/dist/assets/{wardleyDiagram-YWT4CUSO-BVUZJ1m9.js → wardleyDiagram-YWT4CUSO-CH3SP6Qc.js} +1 -1
  52. package/share/web/dist/assets/{xychartDiagram-2RQKCTM6-Dv8I6EB4.js → xychartDiagram-2RQKCTM6-BgAa35a3.js} +1 -1
  53. package/share/web/dist/index.html +1 -1
  54. package/share/web/dist/assets/channel-DEd6pDos.js +0 -1
  55. package/share/web/dist/assets/classDiagram-4FO5ZUOK-BXOtSyo7.js +0 -1
  56. package/share/web/dist/assets/classDiagram-v2-Q7XG4LA2-BXOtSyo7.js +0 -1
  57. package/share/web/dist/assets/index-Dp3Aw-fx.js +0 -470
  58. package/share/web/dist/assets/stateDiagram-v2-BHNVJYJU-D73MkSbN.js +0 -1
@@ -1,470 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-T0muUpSx.js","assets/graph-BEmEBUp_.js","assets/layout-Bw0msyOw.js","assets/cose-bilkent-S5V4N54A-DKqnlQHP.js","assets/cytoscape.esm-LDYqcvCF.js","assets/c4Diagram-AAUBKEIU-D5W-EiaZ.js","assets/chunk-ND2GUHAM-D1hRuBfF.js","assets/flowDiagram-I6XJVG4X-DeE-378s.js","assets/chunk-FMBD7UC4-BArzyAmU.js","assets/chunk-55IACEB6-CAWNr4-g.js","assets/chunk-2J33WTMH-B5D6r5YR.js","assets/channel-DEd6pDos.js","assets/erDiagram-TEJ5UH35-DAS50JTz.js","assets/gitGraphDiagram-PVQCEYII-DsSOgbbA.js","assets/chunk-4BX2VUAB-DqUq_8zk.js","assets/chunk-QZHKN3VN-Bsne3J2q.js","assets/wardley-L42UT6IY-CpAmwqP3.js","assets/ganttDiagram-6RSMTGT7-Dewf3yPU.js","assets/linear-C3h9k4xJ.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-CrowFXzY.js","assets/infoDiagram-5YYISTIA-DAt_731A.js","assets/pieDiagram-4H26LBE5-GT_zaKLe.js","assets/arc-B6muhbY_.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-C6hG_nqx.js","assets/xychartDiagram-2RQKCTM6-Dv8I6EB4.js","assets/requirementDiagram-4Y6WPE33-CHrdt67q.js","assets/sequenceDiagram-3UESZ5HK-CpUTpqpu.js","assets/classDiagram-4FO5ZUOK-BXOtSyo7.js","assets/chunk-727SXJPM-CP7XrNMz.js","assets/classDiagram-v2-Q7XG4LA2-BXOtSyo7.js","assets/stateDiagram-AJRCARHV-CrsERnzj.js","assets/chunk-AQP2D5EJ-BeGUiFeO.js","assets/stateDiagram-v2-BHNVJYJU-D73MkSbN.js","assets/journeyDiagram-JHISSGLW-BJfVYlQ1.js","assets/timeline-definition-PNZ67QCA-Dj9KPhNj.js","assets/mindmap-definition-RKZ34NQL-p8Q0AQcY.js","assets/kanban-definition-UN3LZRKU-BjTvHNu5.js","assets/sankeyDiagram-5OEKKPKP-Dz_VzhnN.js","assets/diagram-LMA3HP47-gtSx4MhZ.js","assets/diagram-2AECGRRQ-DF97RON9.js","assets/blockDiagram-GPEHLZMM-3TSaM49r.js","assets/diagram-5GNKFQAL-CO0LSEnt.js","assets/architectureDiagram-3BPJPVTR-DJ9cgQMo.js","assets/diagram-KO2AKTUF-BeUvdtva.js","assets/diagram-OG6HWLK6-CGvTzwl5.js","assets/wardleyDiagram-YWT4CUSO-BVUZJ1m9.js"])))=>i.map(i=>d[i]);
2
- var iA=Object.defineProperty;var rA=(e,t,i)=>t in e?iA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Lt=(e,t,i)=>rA(e,typeof t!="symbol"?t+"":t,i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=i(s);fetch(s.href,l)}})();function Rm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},qo={};/**
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 z1;function aA(){if(z1)return qo;z1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var h in s)h!=="key"&&(l[h]=s[h])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:l}}return qo.Fragment=t,qo.jsx=i,qo.jsxs=i,qo}var N1;function nA(){return N1||(N1=1,Xp.exports=aA()),Xp.exports}var L=nA(),Vp={exports:{}},jt={};/**
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 q1;function sA(){if(q1)return jt;q1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=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 m(q){return q===null||typeof q!="object"?null:(q=x&&q[x]||q["@@iterator"],typeof q=="function"?q:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function T(q,it,ut){this.props=q,this.context=it,this.refs=k,this.updater=ut||v}T.prototype.isReactComponent={},T.prototype.setState=function(q,it){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,it,"setState")},T.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function _(){}_.prototype=T.prototype;function B(q,it,ut){this.props=q,this.context=it,this.refs=k,this.updater=ut||v}var O=B.prototype=new _;O.constructor=B,C(O,T.prototype),O.isPureReactComponent=!0;var D=Array.isArray;function N(){}var H={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function Z(q,it,ut){var dt=ut.ref;return{$$typeof:e,type:q,key:it,ref:dt!==void 0?dt:null,props:ut}}function P(q,it){return Z(q.type,it,q.props)}function W(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function et(q){var it={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(ut){return it[ut]})}var tt=/\/+/g;function X(q,it){return typeof q=="object"&&q!==null&&q.key!=null?et(""+q.key):it.toString(36)}function Y(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(N,N):(q.status="pending",q.then(function(it){q.status==="pending"&&(q.status="fulfilled",q.value=it)},function(it){q.status==="pending"&&(q.status="rejected",q.reason=it)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function M(q,it,ut,dt,yt){var xt=typeof q;(xt==="undefined"||xt==="boolean")&&(q=null);var Rt=!1;if(q===null)Rt=!0;else switch(xt){case"bigint":case"string":case"number":Rt=!0;break;case"object":switch(q.$$typeof){case e:case t:Rt=!0;break;case p:return Rt=q._init,M(Rt(q._payload),it,ut,dt,yt)}}if(Rt)return yt=yt(q),Rt=dt===""?"."+X(q,0):dt,D(yt)?(ut="",Rt!=null&&(ut=Rt.replace(tt,"$&/")+"/"),M(yt,it,ut,"",function(U){return U})):yt!=null&&(W(yt)&&(yt=P(yt,ut+(yt.key==null||q&&q.key===yt.key?"":(""+yt.key).replace(tt,"$&/")+"/")+Rt)),it.push(yt)),1;Rt=0;var Ft=dt===""?".":dt+":";if(D(q))for(var Ut=0;Ut<q.length;Ut++)dt=q[Ut],xt=Ft+X(dt,Ut),Rt+=M(dt,it,ut,xt,yt);else if(Ut=m(q),typeof Ut=="function")for(q=Ut.call(q),Ut=0;!(dt=q.next()).done;)dt=dt.value,xt=Ft+X(dt,Ut++),Rt+=M(dt,it,ut,xt,yt);else if(xt==="object"){if(typeof q.then=="function")return M(Y(q),it,ut,dt,yt);throw it=String(q),Error("Objects are not valid as a React child (found: "+(it==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":it)+"). If you meant to render a collection of children, use an array instead.")}return Rt}function I(q,it,ut){if(q==null)return q;var dt=[],yt=0;return M(q,dt,"","",function(xt){return it.call(ut,xt,yt++)}),dt}function $(q){if(q._status===-1){var it=q._result;it=it(),it.then(function(ut){(q._status===0||q._status===-1)&&(q._status=1,q._result=ut)},function(ut){(q._status===0||q._status===-1)&&(q._status=2,q._result=ut)}),q._status===-1&&(q._status=0,q._result=it)}if(q._status===1)return q._result.default;throw q._result}var F=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var it=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(it))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},Q={map:I,forEach:function(q,it,ut){I(q,function(){it.apply(this,arguments)},ut)},count:function(q){var it=0;return I(q,function(){it++}),it},toArray:function(q){return I(q,function(it){return it})||[]},only:function(q){if(!W(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return jt.Activity=g,jt.Children=Q,jt.Component=T,jt.Fragment=i,jt.Profiler=s,jt.PureComponent=B,jt.StrictMode=a,jt.Suspense=u,jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,jt.__COMPILER_RUNTIME={__proto__:null,c:function(q){return H.H.useMemoCache(q)}},jt.cache=function(q){return function(){return q.apply(null,arguments)}},jt.cacheSignal=function(){return null},jt.cloneElement=function(q,it,ut){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var dt=C({},q.props),yt=q.key;if(it!=null)for(xt in it.key!==void 0&&(yt=""+it.key),it)!R.call(it,xt)||xt==="key"||xt==="__self"||xt==="__source"||xt==="ref"&&it.ref===void 0||(dt[xt]=it[xt]);var xt=arguments.length-2;if(xt===1)dt.children=ut;else if(1<xt){for(var Rt=Array(xt),Ft=0;Ft<xt;Ft++)Rt[Ft]=arguments[Ft+2];dt.children=Rt}return Z(q.type,yt,dt)},jt.createContext=function(q){return q={$$typeof:c,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:l,_context:q},q},jt.createElement=function(q,it,ut){var dt,yt={},xt=null;if(it!=null)for(dt in it.key!==void 0&&(xt=""+it.key),it)R.call(it,dt)&&dt!=="key"&&dt!=="__self"&&dt!=="__source"&&(yt[dt]=it[dt]);var Rt=arguments.length-2;if(Rt===1)yt.children=ut;else if(1<Rt){for(var Ft=Array(Rt),Ut=0;Ut<Rt;Ut++)Ft[Ut]=arguments[Ut+2];yt.children=Ft}if(q&&q.defaultProps)for(dt in Rt=q.defaultProps,Rt)yt[dt]===void 0&&(yt[dt]=Rt[dt]);return Z(q,xt,yt)},jt.createRef=function(){return{current:null}},jt.forwardRef=function(q){return{$$typeof:h,render:q}},jt.isValidElement=W,jt.lazy=function(q){return{$$typeof:p,_payload:{_status:-1,_result:q},_init:$}},jt.memo=function(q,it){return{$$typeof:f,type:q,compare:it===void 0?null:it}},jt.startTransition=function(q){var it=H.T,ut={};H.T=ut;try{var dt=q(),yt=H.S;yt!==null&&yt(ut,dt),typeof dt=="object"&&dt!==null&&typeof dt.then=="function"&&dt.then(N,F)}catch(xt){F(xt)}finally{it!==null&&ut.types!==null&&(it.types=ut.types),H.T=it}},jt.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},jt.use=function(q){return H.H.use(q)},jt.useActionState=function(q,it,ut){return H.H.useActionState(q,it,ut)},jt.useCallback=function(q,it){return H.H.useCallback(q,it)},jt.useContext=function(q){return H.H.useContext(q)},jt.useDebugValue=function(){},jt.useDeferredValue=function(q,it){return H.H.useDeferredValue(q,it)},jt.useEffect=function(q,it){return H.H.useEffect(q,it)},jt.useEffectEvent=function(q){return H.H.useEffectEvent(q)},jt.useId=function(){return H.H.useId()},jt.useImperativeHandle=function(q,it,ut){return H.H.useImperativeHandle(q,it,ut)},jt.useInsertionEffect=function(q,it){return H.H.useInsertionEffect(q,it)},jt.useLayoutEffect=function(q,it){return H.H.useLayoutEffect(q,it)},jt.useMemo=function(q,it){return H.H.useMemo(q,it)},jt.useOptimistic=function(q,it){return H.H.useOptimistic(q,it)},jt.useReducer=function(q,it,ut){return H.H.useReducer(q,it,ut)},jt.useRef=function(q){return H.H.useRef(q)},jt.useState=function(q){return H.H.useState(q)},jt.useSyncExternalStore=function(q,it,ut){return H.H.useSyncExternalStore(q,it,ut)},jt.useTransition=function(){return H.H.useTransition()},jt.version="19.2.6",jt}var I1;function Om(){return I1||(I1=1,Vp.exports=sA()),Vp.exports}var z=Om();const lA=Rm(z);var Zp={exports:{}},Io={},Qp={exports:{}},Kp={};/**
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 H1;function oA(){return H1||(H1=1,(function(e){function t(M,I){var $=M.length;M.push(I);t:for(;0<$;){var F=$-1>>>1,Q=M[F];if(0<s(Q,I))M[F]=I,M[$]=Q,$=F;else break t}}function i(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var I=M[0],$=M.pop();if($!==I){M[0]=$;t:for(var F=0,Q=M.length,q=Q>>>1;F<q;){var it=2*(F+1)-1,ut=M[it],dt=it+1,yt=M[dt];if(0>s(ut,$))dt<Q&&0>s(yt,ut)?(M[F]=yt,M[dt]=$,F=dt):(M[F]=ut,M[it]=$,F=it);else if(dt<Q&&0>s(yt,$))M[F]=yt,M[dt]=$,F=dt;else break t}}return I}function s(M,I){var $=M.sortIndex-I.sortIndex;return $!==0?$:M.id-I.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var u=[],f=[],p=1,g=null,x=3,m=!1,v=!1,C=!1,k=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function O(M){for(var I=i(f);I!==null;){if(I.callback===null)a(f);else if(I.startTime<=M)a(f),I.sortIndex=I.expirationTime,t(u,I);else break;I=i(f)}}function D(M){if(C=!1,O(M),!v)if(i(u)!==null)v=!0,N||(N=!0,et());else{var I=i(f);I!==null&&Y(D,I.startTime-M)}}var N=!1,H=-1,R=5,Z=-1;function P(){return k?!0:!(e.unstable_now()-Z<R)}function W(){if(k=!1,N){var M=e.unstable_now();Z=M;var I=!0;try{t:{v=!1,C&&(C=!1,_(H),H=-1),m=!0;var $=x;try{e:{for(O(M),g=i(u);g!==null&&!(g.expirationTime>M&&P());){var F=g.callback;if(typeof F=="function"){g.callback=null,x=g.priorityLevel;var Q=F(g.expirationTime<=M);if(M=e.unstable_now(),typeof Q=="function"){g.callback=Q,O(M),I=!0;break e}g===i(u)&&a(u),O(M)}else a(u);g=i(u)}if(g!==null)I=!0;else{var q=i(f);q!==null&&Y(D,q.startTime-M),I=!1}}break t}finally{g=null,x=$,m=!1}I=void 0}}finally{I?et():N=!1}}}var et;if(typeof B=="function")et=function(){B(W)};else if(typeof MessageChannel<"u"){var tt=new MessageChannel,X=tt.port2;tt.port1.onmessage=W,et=function(){X.postMessage(null)}}else et=function(){T(W,0)};function Y(M,I){H=T(function(){M(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(M){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var $=x;x=I;try{return M()}finally{x=$}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(M,I){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var $=x;x=M;try{return I()}finally{x=$}},e.unstable_scheduleCallback=function(M,I,$){var F=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?F+$:F):$=F,M){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=$+Q,M={id:p++,callback:I,priorityLevel:M,startTime:$,expirationTime:Q,sortIndex:-1},$>F?(M.sortIndex=$,t(f,M),i(u)===null&&M===i(f)&&(C?(_(H),H=-1):C=!0,Y(D,$-F))):(M.sortIndex=Q,t(u,M),v||m||(v=!0,N||(N=!0,et()))),M},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(M){var I=x;return function(){var $=x;x=I;try{return M.apply(this,arguments)}finally{x=$}}}})(Kp)),Kp}var j1;function cA(){return j1||(j1=1,Qp.exports=oA()),Qp.exports}var Jp={exports:{}},di={};/**
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 U1;function hA(){if(U1)return di;U1=1;var e=Om();function t(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 i(){}var a={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(u,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:u,containerInfo:f,implementation:p}}var c=e.__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 di.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,di.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(t(299));return l(u,f,null,p)},di.flushSync=function(u){var f=c.T,p=a.p;try{if(c.T=null,a.p=2,u)return u()}finally{c.T=f,a.p=p,a.d.f()}},di.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(u,f))},di.prefetchDNS=function(u){typeof u=="string"&&a.d.D(u)},di.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,m=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:m}):p==="script"&&a.d.X(u,{crossOrigin:g,integrity:x,fetchPriority:m,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},di.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);a.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&&a.d.M(u)},di.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);a.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})}},di.preloadModule=function(u,f){if(typeof u=="string")if(f){var p=h(f.as,f.crossOrigin);a.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 a.d.m(u)},di.requestFormReset=function(u){a.d.r(u)},di.unstable_batchedUpdates=function(u,f){return u(f)},di.useFormState=function(u,f,p){return c.H.useFormState(u,f,p)},di.useFormStatus=function(){return c.H.useHostTransitionStatus()},di.version="19.2.6",di}var P1;function uA(){if(P1)return Jp.exports;P1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jp.exports=hA(),Jp.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 W1;function dA(){if(W1)return Io;W1=1;var e=cA(),t=Om(),i=uA();function a(r){var n="https://react.dev/errors/"+r;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var n=r,o=r;if(r.alternate)for(;n.return;)n=n.return;else{r=n;do n=r,(n.flags&4098)!==0&&(o=n.return),r=n.return;while(r)}return n.tag===3?o:null}function c(r){if(r.tag===13){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function h(r){if(r.tag===31){var n=r.memoizedState;if(n===null&&(r=r.alternate,r!==null&&(n=r.memoizedState)),n!==null)return n.dehydrated}return null}function u(r){if(l(r)!==r)throw Error(a(188))}function f(r){var n=r.alternate;if(!n){if(n=l(r),n===null)throw Error(a(188));return n!==r?null:r}for(var o=r,d=n;;){var y=o.return;if(y===null)break;var b=y.alternate;if(b===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===o)return u(y),r;if(b===d)return u(y),n;b=b.sibling}throw Error(a(188))}if(o.return!==d.return)o=y,d=b;else{for(var w=!1,A=y.child;A;){if(A===o){w=!0,o=y,d=b;break}if(A===d){w=!0,d=y,o=b;break}A=A.sibling}if(!w){for(A=b.child;A;){if(A===o){w=!0,o=b,d=y;break}if(A===d){w=!0,d=b,o=y;break}A=A.sibling}if(!w)throw Error(a(189))}}if(o.alternate!==d)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:n}function p(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r;for(r=r.child;r!==null;){if(n=p(r),n!==null)return n;r=r.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),B=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function et(r){return r===null||typeof r!="object"?null:(r=W&&r[W]||r["@@iterator"],typeof r=="function"?r:null)}var tt=Symbol.for("react.client.reference");function X(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===tt?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case C:return"Fragment";case T:return"Profiler";case k:return"StrictMode";case D:return"Suspense";case N:return"SuspenseList";case Z:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case v:return"Portal";case B:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case O:var n=r.render;return r=r.displayName,r||(r=n.displayName||n.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case H:return n=r.displayName||null,n!==null?n:X(r.type)||"Memo";case R:n=r._payload,r=r._init;try{return X(r(n))}catch{}}return null}var Y=Array.isArray,M=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},F=[],Q=-1;function q(r){return{current:r}}function it(r){0>Q||(r.current=F[Q],F[Q]=null,Q--)}function ut(r,n){Q++,F[Q]=r.current,r.current=n}var dt=q(null),yt=q(null),xt=q(null),Rt=q(null);function Ft(r,n){switch(ut(xt,n),ut(yt,r),ut(dt,null),n.nodeType){case 9:case 11:r=(r=n.documentElement)&&(r=r.namespaceURI)?s1(r):0;break;default:if(r=n.tagName,n=n.namespaceURI)n=s1(n),r=l1(n,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}it(dt),ut(dt,r)}function Ut(){it(dt),it(yt),it(xt)}function U(r){r.memoizedState!==null&&ut(Rt,r);var n=dt.current,o=l1(n,r.type);n!==o&&(ut(yt,r),ut(dt,o))}function ct(r){yt.current===r&&(it(dt),it(yt)),Rt.current===r&&(it(Rt),Do._currentValue=$)}var Ct,Ot;function Jt(r){if(Ct===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Ct=n&&n[1]||"",Ot=-1<o.stack.indexOf(`
43
- at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
44
- `+Ct+r+Ot}var me=!1;function Ht(r,n){if(!r||me)return"";me=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(n){var gt=function(){throw Error()};if(Object.defineProperty(gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(gt,[])}catch(ot){var nt=ot}Reflect.construct(r,[],gt)}else{try{gt.call()}catch(ot){nt=ot}r.call(gt.prototype)}}else{try{throw Error()}catch(ot){nt=ot}(gt=r())&&typeof gt.catch=="function"&&gt.catch(function(){})}}catch(ot){if(ot&&nt&&typeof ot.stack=="string")return[ot.stack,nt.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),w=b[0],A=b[1];if(w&&A){var G=w.split(`
45
- `),at=A.split(`
46
- `);for(y=d=0;d<G.length&&!G[d].includes("DetermineComponentFrameRoot");)d++;for(;y<at.length&&!at[y].includes("DetermineComponentFrameRoot");)y++;if(d===G.length||y===at.length)for(d=G.length-1,y=at.length-1;1<=d&&0<=y&&G[d]!==at[y];)y--;for(;1<=d&&0<=y;d--,y--)if(G[d]!==at[y]){if(d!==1||y!==1)do if(d--,y--,0>y||G[d]!==at[y]){var ht=`
47
- `+G[d].replace(" at new "," at ");return r.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",r.displayName)),ht}while(1<=d&&0<=y);break}}}finally{me=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?Jt(o):""}function Ae(r,n){switch(r.tag){case 26:case 27:case 5:return Jt(r.type);case 16:return Jt("Lazy");case 13:return r.child!==n&&n!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return Ht(r.type,!1);case 11:return Ht(r.type.render,!1);case 1:return Ht(r.type,!0);case 31:return Jt("Activity");default:return""}}function De(r){try{var n="",o=null;do n+=Ae(r,o),o=r,r=r.return;while(r);return n}catch(d){return`
48
- Error generating stack: `+d.message+`
49
- `+d.stack}}var Je=Object.prototype.hasOwnProperty,Kr=e.unstable_scheduleCallback,Ki=e.unstable_cancelCallback,pr=e.unstable_shouldYield,us=e.unstable_requestPaint,ci=e.unstable_now,qc=e.unstable_getCurrentPriorityLevel,Wl=e.unstable_ImmediatePriority,ds=e.unstable_UserBlockingPriority,Dr=e.unstable_NormalPriority,Ma=e.unstable_LowPriority,qi=e.unstable_IdlePriority,Yl=e.log,Ic=e.unstable_setDisableYieldValue,Ra=null,ti=null;function gr(r){if(typeof Yl=="function"&&Ic(r),ti&&typeof ti.setStrictMode=="function")try{ti.setStrictMode(Ra,r)}catch{}}var Ze=Math.clz32?Math.clz32:Oa,fs=Math.log,Ji=Math.LN2;function Oa(r){return r>>>=0,r===0?32:31-(fs(r)/Ji|0)|0}var Fa=256,Da=262144,ps=4194304;function mr(r){var n=r&42;if(n!==0)return n;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function $a(r,n,o){var d=r.pendingLanes;if(d===0)return 0;var y=0,b=r.suspendedLanes,w=r.pingedLanes;r=r.warmLanes;var A=d&134217727;return A!==0?(d=A&~b,d!==0?y=mr(d):(w&=A,w!==0?y=mr(w):o||(o=A&~r,o!==0&&(y=mr(o))))):(A=d&~b,A!==0?y=mr(A):w!==0?y=mr(w):o||(o=d&~r,o!==0&&(y=mr(o)))),y===0?0:n!==0&&n!==y&&(n&b)===0&&(b=y&-y,o=n&-n,b>=o||b===32&&(o&4194048)!==0)?n:y}function wn(r,n){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&n)===0}function _n(r,n){switch(r){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Hc(){var r=ps;return ps<<=1,(ps&62914560)===0&&(ps=4194304),r}function Gl(r){for(var n=[],o=0;31>o;o++)n.push(r);return n}function ve(r,n){r.pendingLanes|=n,n!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function za(r,n,o,d,y,b){var w=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var A=r.entanglements,G=r.expirationTimes,at=r.hiddenUpdates;for(o=w&~o;0<o;){var ht=31-Ze(o),gt=1<<ht;A[ht]=0,G[ht]=-1;var nt=at[ht];if(nt!==null)for(at[ht]=null,ht=0;ht<nt.length;ht++){var ot=nt[ht];ot!==null&&(ot.lane&=-536870913)}o&=~gt}d!==0&&jc(r,d,0),b!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=b&~(w&~n))}function jc(r,n,o){r.pendingLanes|=n,r.suspendedLanes&=~n;var d=31-Ze(n);r.entangledLanes|=n,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function Xl(r,n){var o=r.entangledLanes|=n;for(r=r.entanglements;o;){var d=31-Ze(o),y=1<<d;y&n|r[d]&n&&(r[d]|=n),o&=~y}}function gs(r,n){var o=n&-n;return o=(o&42)!==0?1:ms(o),(o&(r.suspendedLanes|n))!==0?0:o}function ms(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function ys(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Uc(){var r=I.p;return r!==0?r:(r=window.event,r===void 0?32:A1(r.type))}function _i(r,n){var o=I.p;try{return I.p=r,n()}finally{I.p=o}}var hi=Math.random().toString(36).slice(2),qe="__reactFiber$"+hi,ei="__reactProps$"+hi,Jr="__reactContainer$"+hi,Na="__reactEvents$"+hi,Vl="__reactListeners$"+hi,xs="__reactHandles$"+hi,tr="__reactResources$"+hi,qa="__reactMarker$"+hi;function bs(r){delete r[qe],delete r[ei],delete r[Na],delete r[Vl],delete r[xs]}function Ia(r){var n=r[qe];if(n)return n;for(var o=r.parentNode;o;){if(n=o[Jr]||o[qe]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(r=p1(r);r!==null;){if(o=r[qe])return o;r=p1(r)}return n}r=o,o=r.parentNode}return null}function ta(r){if(r=r[qe]||r[Jr]){var n=r.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return r}return null}function Ha(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r.stateNode;throw Error(a(33))}function $r(r){var n=r[tr];return n||(n=r[tr]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ee(r){r[qa]=!0}var wt=new Set,j={};function ft(r,n){bt(r,n),bt(r+"Capture",n)}function bt(r,n){for(j[r]=n,r=0;r<n.length;r++)wt.add(n[r])}var ce=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]*$"),ae={},ke={};function Bi(r){return Je.call(ke,r)?!0:Je.call(ae,r)?!1:ce.test(r)?ke[r]=!0:(ae[r]=!0,!1)}function xi(r,n,o){if(Bi(n))if(o===null)r.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(n);return;case"boolean":var d=n.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(n);return}}r.setAttribute(n,""+o)}}function ui(r,n,o){if(o===null)r.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(n);return}r.setAttribute(n,""+o)}}function Ii(r,n,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(n,o,""+d)}}function he(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Zl(r){var n=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Pc(r,n,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,n);if(!r.hasOwnProperty(n)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,b=d.set;return Object.defineProperty(r,n,{configurable:!0,get:function(){return y.call(this)},set:function(w){o=""+w,b.call(this,w)}}),Object.defineProperty(r,n,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){r._valueTracker=null,delete r[n]}}}}function Id(r){if(!r._valueTracker){var n=Zl(r)?"checked":"value";r._valueTracker=Pc(r,n,""+r[n])}}function Jy(r){if(!r)return!1;var n=r._valueTracker;if(!n)return!0;var o=n.getValue(),d="";return r&&(d=Zl(r)?r.checked?"true":"false":r.value),r=d,r!==o?(n.setValue(r),!0):!1}function Wc(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var ZB=/[\n"\\]/g;function er(r){return r.replace(ZB,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Hd(r,n,o,d,y,b,w,A){r.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.type=w:r.removeAttribute("type"),n!=null?w==="number"?(n===0&&r.value===""||r.value!=n)&&(r.value=""+he(n)):r.value!==""+he(n)&&(r.value=""+he(n)):w!=="submit"&&w!=="reset"||r.removeAttribute("value"),n!=null?jd(r,w,he(n)):o!=null?jd(r,w,he(o)):d!=null&&r.removeAttribute("value"),y==null&&b!=null&&(r.defaultChecked=!!b),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.name=""+he(A):r.removeAttribute("name")}function t0(r,n,o,d,y,b,w,A){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),n!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||n!=null)){Id(r);return}o=o!=null?""+he(o):"",n=n!=null?""+he(n):o,A||n===r.value||(r.value=n),r.defaultValue=n}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=A?r.checked:!!d,r.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(r.name=w),Id(r)}function jd(r,n,o){n==="number"&&Wc(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function Cs(r,n,o,d){if(r=r.options,n){n={};for(var y=0;y<o.length;y++)n["$"+o[y]]=!0;for(o=0;o<r.length;o++)y=n.hasOwnProperty("$"+r[o].value),r[o].selected!==y&&(r[o].selected=y),y&&d&&(r[o].defaultSelected=!0)}else{for(o=""+he(o),n=null,y=0;y<r.length;y++){if(r[y].value===o){r[y].selected=!0,d&&(r[y].defaultSelected=!0);return}n!==null||r[y].disabled||(n=r[y])}n!==null&&(n.selected=!0)}}function e0(r,n,o){if(n!=null&&(n=""+he(n),n!==r.value&&(r.value=n),o==null)){r.defaultValue!==n&&(r.defaultValue=n);return}r.defaultValue=o!=null?""+he(o):""}function i0(r,n,o,d){if(n==null){if(d!=null){if(o!=null)throw Error(a(92));if(Y(d)){if(1<d.length)throw Error(a(93));d=d[0]}o=d}o==null&&(o=""),n=o}o=he(n),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),Id(r)}function vs(r,n){if(n){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=n;return}}r.textContent=n}var QB=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 r0(r,n,o){var d=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(n,""):n==="float"?r.cssFloat="":r[n]="":d?r.setProperty(n,o):typeof o!="number"||o===0||QB.has(n)?n==="float"?r.cssFloat=o:r[n]=(""+o).trim():r[n]=o+"px"}function a0(r,n,o){if(n!=null&&typeof n!="object")throw Error(a(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||n!=null&&n.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var y in n)d=n[y],n.hasOwnProperty(y)&&o[y]!==d&&r0(r,y,d)}else for(var b in n)n.hasOwnProperty(b)&&r0(r,b,n[b])}function Ud(r){if(r.indexOf("-")===-1)return!1;switch(r){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 KB=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"]]),JB=/^[\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 Yc(r){return JB.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ea(){}var Pd=null;function Wd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ks=null,Ss=null;function n0(r){var n=ta(r);if(n&&(r=n.stateNode)){var o=r[ei]||null;t:switch(r=n.stateNode,n.type){case"input":if(Hd(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+er(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var d=o[n];if(d!==r&&d.form===r.form){var y=d[ei]||null;if(!y)throw Error(a(90));Hd(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(n=0;n<o.length;n++)d=o[n],d.form===r.form&&Jy(d)}break t;case"textarea":e0(r,o.value,o.defaultValue);break t;case"select":n=o.value,n!=null&&Cs(r,!!o.multiple,n,!1)}}}var Yd=!1;function s0(r,n,o){if(Yd)return r(n,o);Yd=!0;try{var d=r(n);return d}finally{if(Yd=!1,(ks!==null||Ss!==null)&&(Oh(),ks&&(n=ks,r=Ss,Ss=ks=null,n0(n),r)))for(n=0;n<r.length;n++)n0(r[n])}}function Ql(r,n){var o=r.stateNode;if(o===null)return null;var d=o[ei]||null;if(d===null)return null;o=d[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break t;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,n,typeof o));return o}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=!1;if(ia)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Gd=!1}var ja=null,Xd=null,Gc=null;function l0(){if(Gc)return Gc;var r,n=Xd,o=n.length,d,y="value"in ja?ja.value:ja.textContent,b=y.length;for(r=0;r<o&&n[r]===y[r];r++);var w=o-r;for(d=1;d<=w&&n[o-d]===y[b-d];d++);return Gc=y.slice(r,1<d?1-d:void 0)}function Xc(r){var n=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&n===13&&(r=13)):r=n,r===10&&(r=13),32<=r||r===13?r:0}function Vc(){return!0}function o0(){return!1}function Ei(r){function n(o,d,y,b,w){this._reactName=o,this._targetInst=y,this.type=d,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(o=r[A],this[A]=o?o(b):b[A]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Vc:o0,this.isPropagationStopped=o0,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Vc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Vc)},persist:function(){},isPersistent:Vc}),n}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=Ei(Bn),Jl=g({},Bn,{view:0,detail:0}),tE=Ei(Jl),Vd,Zd,to,Qc=g({},Jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==to&&(to&&r.type==="mousemove"?(Vd=r.screenX-to.screenX,Zd=r.screenY-to.screenY):Zd=Vd=0,to=r),Vd)},movementY:function(r){return"movementY"in r?r.movementY:Zd}}),c0=Ei(Qc),eE=g({},Qc,{dataTransfer:0}),iE=Ei(eE),rE=g({},Jl,{relatedTarget:0}),Qd=Ei(rE),aE=g({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),nE=Ei(aE),sE=g({},Bn,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),lE=Ei(sE),oE=g({},Bn,{data:0}),h0=Ei(oE),cE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hE={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"},uE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dE(r){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(r):(r=uE[r])?!!n[r]:!1}function Kd(){return dE}var fE=g({},Jl,{key:function(r){if(r.key){var n=cE[r.key]||r.key;if(n!=="Unidentified")return n}return r.type==="keypress"?(r=Xc(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?hE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(r){return r.type==="keypress"?Xc(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Xc(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),pE=Ei(fE),gE=g({},Qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),u0=Ei(gE),mE=g({},Jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),yE=Ei(mE),xE=g({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),bE=Ei(xE),CE=g({},Qc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),vE=Ei(CE),kE=g({},Bn,{newState:0,oldState:0}),SE=Ei(kE),TE=[9,13,27,32],Jd=ia&&"CompositionEvent"in window,eo=null;ia&&"documentMode"in document&&(eo=document.documentMode);var wE=ia&&"TextEvent"in window&&!eo,d0=ia&&(!Jd||eo&&8<eo&&11>=eo),f0=" ",p0=!1;function g0(r,n){switch(r){case"keyup":return TE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ts=!1;function _E(r,n){switch(r){case"compositionend":return m0(n);case"keypress":return n.which!==32?null:(p0=!0,f0);case"textInput":return r=n.data,r===f0&&p0?null:r;default:return null}}function BE(r,n){if(Ts)return r==="compositionend"||!Jd&&g0(r,n)?(r=l0(),Gc=Xd=ja=null,Ts=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return d0&&n.locale!=="ko"?null:n.data;default:return null}}var EE={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 y0(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n==="input"?!!EE[r.type]:n==="textarea"}function x0(r,n,o,d){ks?Ss?Ss.push(d):Ss=[d]:ks=d,n=Ih(n,"onChange"),0<n.length&&(o=new Zc("onChange","change",null,o,d),r.push({event:o,listeners:n}))}var io=null,ro=null;function LE(r){t1(r,0)}function Kc(r){var n=Ha(r);if(Jy(n))return r}function b0(r,n){if(r==="change")return n}var C0=!1;if(ia){var tf;if(ia){var ef="oninput"in document;if(!ef){var v0=document.createElement("div");v0.setAttribute("oninput","return;"),ef=typeof v0.oninput=="function"}tf=ef}else tf=!1;C0=tf&&(!document.documentMode||9<document.documentMode)}function k0(){io&&(io.detachEvent("onpropertychange",S0),ro=io=null)}function S0(r){if(r.propertyName==="value"&&Kc(ro)){var n=[];x0(n,ro,r,Wd(r)),s0(LE,n)}}function AE(r,n,o){r==="focusin"?(k0(),io=n,ro=o,io.attachEvent("onpropertychange",S0)):r==="focusout"&&k0()}function ME(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Kc(ro)}function RE(r,n){if(r==="click")return Kc(n)}function OE(r,n){if(r==="input"||r==="change")return Kc(n)}function FE(r,n){return r===n&&(r!==0||1/r===1/n)||r!==r&&n!==n}var Hi=typeof Object.is=="function"?Object.is:FE;function ao(r,n){if(Hi(r,n))return!0;if(typeof r!="object"||r===null||typeof n!="object"||n===null)return!1;var o=Object.keys(r),d=Object.keys(n);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!Je.call(n,y)||!Hi(r[y],n[y]))return!1}return!0}function T0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function w0(r,n){var o=T0(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=n&&d>=n)return{node:o,offset:n-r};r=d}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=T0(o)}}function _0(r,n){return r&&n?r===n?!0:r&&r.nodeType===3?!1:n&&n.nodeType===3?_0(r,n.parentNode):"contains"in r?r.contains(n):r.compareDocumentPosition?!!(r.compareDocumentPosition(n)&16):!1:!1}function B0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var n=Wc(r.document);n instanceof r.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)r=n.contentWindow;else break;n=Wc(r.document)}return n}function rf(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n&&(n==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||n==="textarea"||r.contentEditable==="true")}var DE=ia&&"documentMode"in document&&11>=document.documentMode,ws=null,af=null,no=null,nf=!1;function E0(r,n,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;nf||ws==null||ws!==Wc(d)||(d=ws,"selectionStart"in d&&rf(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),no&&ao(no,d)||(no=d,d=Ih(af,"onSelect"),0<d.length&&(n=new Zc("onSelect","select",null,n,o),r.push({event:n,listeners:d}),n.target=ws)))}function En(r,n){var o={};return o[r.toLowerCase()]=n.toLowerCase(),o["Webkit"+r]="webkit"+n,o["Moz"+r]="moz"+n,o}var _s={animationend:En("Animation","AnimationEnd"),animationiteration:En("Animation","AnimationIteration"),animationstart:En("Animation","AnimationStart"),transitionrun:En("Transition","TransitionRun"),transitionstart:En("Transition","TransitionStart"),transitioncancel:En("Transition","TransitionCancel"),transitionend:En("Transition","TransitionEnd")},sf={},L0={};ia&&(L0=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function Ln(r){if(sf[r])return sf[r];if(!_s[r])return r;var n=_s[r],o;for(o in n)if(n.hasOwnProperty(o)&&o in L0)return sf[r]=n[o];return r}var A0=Ln("animationend"),M0=Ln("animationiteration"),R0=Ln("animationstart"),$E=Ln("transitionrun"),zE=Ln("transitionstart"),NE=Ln("transitioncancel"),O0=Ln("transitionend"),F0=new Map,lf="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(" ");lf.push("scrollEnd");function yr(r,n){F0.set(r,n),ft(n,[r])}var Jc=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},ir=[],Bs=0,of=0;function th(){for(var r=Bs,n=of=Bs=0;n<r;){var o=ir[n];ir[n++]=null;var d=ir[n];ir[n++]=null;var y=ir[n];ir[n++]=null;var b=ir[n];if(ir[n++]=null,d!==null&&y!==null){var w=d.pending;w===null?y.next=y:(y.next=w.next,w.next=y),d.pending=y}b!==0&&D0(o,y,b)}}function eh(r,n,o,d){ir[Bs++]=r,ir[Bs++]=n,ir[Bs++]=o,ir[Bs++]=d,of|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function cf(r,n,o,d){return eh(r,n,o,d),ih(r)}function An(r,n){return eh(r,null,null,n),ih(r)}function D0(r,n,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var y=!1,b=r.return;b!==null;)b.childLanes|=o,d=b.alternate,d!==null&&(d.childLanes|=o),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(y=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,y&&n!==null&&(y=31-Ze(o),r=b.hiddenUpdates,d=r[y],d===null?r[y]=[n]:d.push(n),n.lane=o|536870912),b):null}function ih(r){if(50<Eo)throw Eo=0,xp=null,Error(a(185));for(var n=r.return;n!==null;)r=n,n=r.return;return r.tag===3?r.stateNode:null}var Es={};function qE(r,n,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ji(r,n,o,d){return new qE(r,n,o,d)}function hf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ra(r,n){var o=r.alternate;return o===null?(o=ji(r.tag,n,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=n,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,n=r.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function $0(r,n){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=n,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,n=o.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),r}function rh(r,n,o,d,y,b){var w=0;if(d=r,typeof r=="function")hf(r)&&(w=1);else if(typeof r=="string")w=PL(r,o,dt.current)?26:r==="html"||r==="head"||r==="body"?27:5;else t:switch(r){case Z:return r=ji(31,o,n,y),r.elementType=Z,r.lanes=b,r;case C:return Mn(o.children,y,b,n);case k:w=8,y|=24;break;case T:return r=ji(12,o,n,y|2),r.elementType=T,r.lanes=b,r;case D:return r=ji(13,o,n,y),r.elementType=D,r.lanes=b,r;case N:return r=ji(19,o,n,y),r.elementType=N,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case B:w=10;break t;case _:w=9;break t;case O:w=11;break t;case H:w=14;break t;case R:w=16,d=null;break t}w=29,o=Error(a(130,r===null?"null":typeof r,"")),d=null}return n=ji(w,o,n,y),n.elementType=r,n.type=d,n.lanes=b,n}function Mn(r,n,o,d){return r=ji(7,r,d,n),r.lanes=o,r}function uf(r,n,o){return r=ji(6,r,null,n),r.lanes=o,r}function z0(r){var n=ji(18,null,null,0);return n.stateNode=r,n}function df(r,n,o){return n=ji(4,r.children!==null?r.children:[],r.key,n),n.lanes=o,n.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},n}var N0=new WeakMap;function rr(r,n){if(typeof r=="object"&&r!==null){var o=N0.get(r);return o!==void 0?o:(n={value:r,source:n,stack:De(n)},N0.set(r,n),n)}return{value:r,source:n,stack:De(n)}}var Ls=[],As=0,ah=null,so=0,ar=[],nr=0,Ua=null,zr=1,Nr="";function aa(r,n){Ls[As++]=so,Ls[As++]=ah,ah=r,so=n}function q0(r,n,o){ar[nr++]=zr,ar[nr++]=Nr,ar[nr++]=Ua,Ua=r;var d=zr;r=Nr;var y=32-Ze(d)-1;d&=~(1<<y),o+=1;var b=32-Ze(n)+y;if(30<b){var w=y-y%5;b=(d&(1<<w)-1).toString(32),d>>=w,y-=w,zr=1<<32-Ze(n)+y|o<<y|d,Nr=b+r}else zr=1<<b|o<<y|d,Nr=r}function ff(r){r.return!==null&&(aa(r,1),q0(r,1,0))}function pf(r){for(;r===ah;)ah=Ls[--As],Ls[As]=null,so=Ls[--As],Ls[As]=null;for(;r===Ua;)Ua=ar[--nr],ar[nr]=null,Nr=ar[--nr],ar[nr]=null,zr=ar[--nr],ar[nr]=null}function I0(r,n){ar[nr++]=zr,ar[nr++]=Nr,ar[nr++]=Ua,zr=n.id,Nr=n.overflow,Ua=r}var ii=null,Se=null,te=!1,Pa=null,sr=!1,gf=Error(a(519));function Wa(r){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw lo(rr(n,r)),gf}function H0(r){var n=r.stateNode,o=r.type,d=r.memoizedProps;switch(n[qe]=r,n[ei]=d,o){case"dialog":Zt("cancel",n),Zt("close",n);break;case"iframe":case"object":case"embed":Zt("load",n);break;case"video":case"audio":for(o=0;o<Ao.length;o++)Zt(Ao[o],n);break;case"source":Zt("error",n);break;case"img":case"image":case"link":Zt("error",n),Zt("load",n);break;case"details":Zt("toggle",n);break;case"input":Zt("invalid",n),t0(n,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Zt("invalid",n);break;case"textarea":Zt("invalid",n),i0(n,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||d.suppressHydrationWarning===!0||a1(n.textContent,o)?(d.popover!=null&&(Zt("beforetoggle",n),Zt("toggle",n)),d.onScroll!=null&&Zt("scroll",n),d.onScrollEnd!=null&&Zt("scrollend",n),d.onClick!=null&&(n.onclick=ea),n=!0):n=!1,n||Wa(r,!0)}function j0(r){for(ii=r.return;ii;)switch(ii.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:ii=ii.return}}function Ms(r){if(r!==ii)return!1;if(!te)return j0(r),te=!0,!1;var n=r.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||Op(r.type,r.memoizedProps)),o=!o),o&&Se&&Wa(r),j0(r),n===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Se=f1(r)}else if(n===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Se=f1(r)}else n===27?(n=Se,sn(r.type)?(r=Np,Np=null,Se=r):Se=n):Se=ii?or(r.stateNode.nextSibling):null;return!0}function Rn(){Se=ii=null,te=!1}function mf(){var r=Pa;return r!==null&&(Ri===null?Ri=r:Ri.push.apply(Ri,r),Pa=null),r}function lo(r){Pa===null?Pa=[r]:Pa.push(r)}var yf=q(null),On=null,na=null;function Ya(r,n,o){ut(yf,n._currentValue),n._currentValue=o}function sa(r){r._currentValue=yf.current,it(yf)}function xf(r,n,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&n)!==n?(r.childLanes|=n,d!==null&&(d.childLanes|=n)):d!==null&&(d.childLanes&n)!==n&&(d.childLanes|=n),r===o)break;r=r.return}}function bf(r,n,o,d){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var b=y.dependencies;if(b!==null){var w=y.child;b=b.firstContext;t:for(;b!==null;){var A=b;b=y;for(var G=0;G<n.length;G++)if(A.context===n[G]){b.lanes|=o,A=b.alternate,A!==null&&(A.lanes|=o),xf(b.return,o,r),d||(w=null);break t}b=A.next}}else if(y.tag===18){if(w=y.return,w===null)throw Error(a(341));w.lanes|=o,b=w.alternate,b!==null&&(b.lanes|=o),xf(w,o,r),w=null}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===r){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}}function Rs(r,n,o,d){r=null;for(var y=n,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var w=y.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var A=y.type;Hi(y.pendingProps.value,w.value)||(r!==null?r.push(A):r=[A])}}else if(y===Rt.current){if(w=y.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push(Do):r=[Do])}y=y.return}r!==null&&bf(n,r,o,d),n.flags|=262144}function nh(r){for(r=r.firstContext;r!==null;){if(!Hi(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Fn(r){On=r,na=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function ri(r){return U0(On,r)}function sh(r,n){return On===null&&Fn(r),U0(r,n)}function U0(r,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},na===null){if(r===null)throw Error(a(308));na=n,r.dependencies={lanes:0,firstContext:n},r.flags|=524288}else na=na.next=n;return o}var IE=typeof AbortController<"u"?AbortController:function(){var r=[],n=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){n.aborted=!0,r.forEach(function(o){return o()})}},HE=e.unstable_scheduleCallback,jE=e.unstable_NormalPriority,Ie={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cf(){return{controller:new IE,data:new Map,refCount:0}}function oo(r){r.refCount--,r.refCount===0&&HE(jE,function(){r.controller.abort()})}var co=null,vf=0,Os=0,Fs=null;function UE(r,n){if(co===null){var o=co=[];vf=0,Os=Tp(),Fs={status:"pending",value:void 0,then:function(d){o.push(d)}}}return vf++,n.then(P0,P0),n}function P0(){if(--vf===0&&co!==null){Fs!==null&&(Fs.status="fulfilled");var r=co;co=null,Os=0,Fs=null;for(var n=0;n<r.length;n++)(0,r[n])()}}function PE(r,n){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return r.then(function(){d.status="fulfilled",d.value=n;for(var y=0;y<o.length;y++)(0,o[y])(n)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}var W0=M.S;M.S=function(r,n){Eb=ci(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&UE(r,n),W0!==null&&W0(r,n)};var Dn=q(null);function kf(){var r=Dn.current;return r!==null?r:Ce.pooledCache}function lh(r,n){n===null?ut(Dn,Dn.current):ut(Dn,n.pool)}function Y0(){var r=kf();return r===null?null:{parent:Ie._currentValue,pool:r}}var Ds=Error(a(460)),Sf=Error(a(474)),oh=Error(a(542)),ch={then:function(){}};function G0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function X0(r,n,o){switch(o=r[o],o===void 0?r.push(n):o!==n&&(n.then(ea,ea),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,Z0(r),r;default:if(typeof n.status=="string")n.then(ea,ea);else{if(r=Ce,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=n,r.status="pending",r.then(function(d){if(n.status==="pending"){var y=n;y.status="fulfilled",y.value=d}},function(d){if(n.status==="pending"){var y=n;y.status="rejected",y.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,Z0(r),r}throw zn=n,Ds}}function $n(r){try{var n=r._init;return n(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(zn=o,Ds):o}}var zn=null;function V0(){if(zn===null)throw Error(a(459));var r=zn;return zn=null,r}function Z0(r){if(r===Ds||r===oh)throw Error(a(483))}var $s=null,ho=0;function hh(r){var n=ho;return ho+=1,$s===null&&($s=[]),X0($s,r,n)}function uo(r,n){n=n.props.ref,r.ref=n!==void 0?n:null}function uh(r,n){throw n.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(n),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":r)))}function Q0(r){function n(J,V){if(r){var rt=J.deletions;rt===null?(J.deletions=[V],J.flags|=16):rt.push(V)}}function o(J,V){if(!r)return null;for(;V!==null;)n(J,V),V=V.sibling;return null}function d(J){for(var V=new Map;J!==null;)J.key!==null?V.set(J.key,J):V.set(J.index,J),J=J.sibling;return V}function y(J,V){return J=ra(J,V),J.index=0,J.sibling=null,J}function b(J,V,rt){return J.index=rt,r?(rt=J.alternate,rt!==null?(rt=rt.index,rt<V?(J.flags|=67108866,V):rt):(J.flags|=67108866,V)):(J.flags|=1048576,V)}function w(J){return r&&J.alternate===null&&(J.flags|=67108866),J}function A(J,V,rt,pt){return V===null||V.tag!==6?(V=uf(rt,J.mode,pt),V.return=J,V):(V=y(V,rt),V.return=J,V)}function G(J,V,rt,pt){var Mt=rt.type;return Mt===C?ht(J,V,rt.props.children,pt,rt.key):V!==null&&(V.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===R&&$n(Mt)===V.type)?(V=y(V,rt.props),uo(V,rt),V.return=J,V):(V=rh(rt.type,rt.key,rt.props,null,J.mode,pt),uo(V,rt),V.return=J,V)}function at(J,V,rt,pt){return V===null||V.tag!==4||V.stateNode.containerInfo!==rt.containerInfo||V.stateNode.implementation!==rt.implementation?(V=df(rt,J.mode,pt),V.return=J,V):(V=y(V,rt.children||[]),V.return=J,V)}function ht(J,V,rt,pt,Mt){return V===null||V.tag!==7?(V=Mn(rt,J.mode,pt,Mt),V.return=J,V):(V=y(V,rt),V.return=J,V)}function gt(J,V,rt){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=uf(""+V,J.mode,rt),V.return=J,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case m:return rt=rh(V.type,V.key,V.props,null,J.mode,rt),uo(rt,V),rt.return=J,rt;case v:return V=df(V,J.mode,rt),V.return=J,V;case R:return V=$n(V),gt(J,V,rt)}if(Y(V)||et(V))return V=Mn(V,J.mode,rt,null),V.return=J,V;if(typeof V.then=="function")return gt(J,hh(V),rt);if(V.$$typeof===B)return gt(J,sh(J,V),rt);uh(J,V)}return null}function nt(J,V,rt,pt){var Mt=V!==null?V.key:null;if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return Mt!==null?null:A(J,V,""+rt,pt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case m:return rt.key===Mt?G(J,V,rt,pt):null;case v:return rt.key===Mt?at(J,V,rt,pt):null;case R:return rt=$n(rt),nt(J,V,rt,pt)}if(Y(rt)||et(rt))return Mt!==null?null:ht(J,V,rt,pt,null);if(typeof rt.then=="function")return nt(J,V,hh(rt),pt);if(rt.$$typeof===B)return nt(J,V,sh(J,rt),pt);uh(J,rt)}return null}function ot(J,V,rt,pt,Mt){if(typeof pt=="string"&&pt!==""||typeof pt=="number"||typeof pt=="bigint")return J=J.get(rt)||null,A(V,J,""+pt,Mt);if(typeof pt=="object"&&pt!==null){switch(pt.$$typeof){case m:return J=J.get(pt.key===null?rt:pt.key)||null,G(V,J,pt,Mt);case v:return J=J.get(pt.key===null?rt:pt.key)||null,at(V,J,pt,Mt);case R:return pt=$n(pt),ot(J,V,rt,pt,Mt)}if(Y(pt)||et(pt))return J=J.get(rt)||null,ht(V,J,pt,Mt,null);if(typeof pt.then=="function")return ot(J,V,rt,hh(pt),Mt);if(pt.$$typeof===B)return ot(J,V,rt,sh(V,pt),Mt);uh(V,pt)}return null}function kt(J,V,rt,pt){for(var Mt=null,ne=null,Bt=V,Yt=V=0,Kt=null;Bt!==null&&Yt<rt.length;Yt++){Bt.index>Yt?(Kt=Bt,Bt=null):Kt=Bt.sibling;var se=nt(J,Bt,rt[Yt],pt);if(se===null){Bt===null&&(Bt=Kt);break}r&&Bt&&se.alternate===null&&n(J,Bt),V=b(se,V,Yt),ne===null?Mt=se:ne.sibling=se,ne=se,Bt=Kt}if(Yt===rt.length)return o(J,Bt),te&&aa(J,Yt),Mt;if(Bt===null){for(;Yt<rt.length;Yt++)Bt=gt(J,rt[Yt],pt),Bt!==null&&(V=b(Bt,V,Yt),ne===null?Mt=Bt:ne.sibling=Bt,ne=Bt);return te&&aa(J,Yt),Mt}for(Bt=d(Bt);Yt<rt.length;Yt++)Kt=ot(Bt,J,Yt,rt[Yt],pt),Kt!==null&&(r&&Kt.alternate!==null&&Bt.delete(Kt.key===null?Yt:Kt.key),V=b(Kt,V,Yt),ne===null?Mt=Kt:ne.sibling=Kt,ne=Kt);return r&&Bt.forEach(function(un){return n(J,un)}),te&&aa(J,Yt),Mt}function $t(J,V,rt,pt){if(rt==null)throw Error(a(151));for(var Mt=null,ne=null,Bt=V,Yt=V=0,Kt=null,se=rt.next();Bt!==null&&!se.done;Yt++,se=rt.next()){Bt.index>Yt?(Kt=Bt,Bt=null):Kt=Bt.sibling;var un=nt(J,Bt,se.value,pt);if(un===null){Bt===null&&(Bt=Kt);break}r&&Bt&&un.alternate===null&&n(J,Bt),V=b(un,V,Yt),ne===null?Mt=un:ne.sibling=un,ne=un,Bt=Kt}if(se.done)return o(J,Bt),te&&aa(J,Yt),Mt;if(Bt===null){for(;!se.done;Yt++,se=rt.next())se=gt(J,se.value,pt),se!==null&&(V=b(se,V,Yt),ne===null?Mt=se:ne.sibling=se,ne=se);return te&&aa(J,Yt),Mt}for(Bt=d(Bt);!se.done;Yt++,se=rt.next())se=ot(Bt,J,Yt,se.value,pt),se!==null&&(r&&se.alternate!==null&&Bt.delete(se.key===null?Yt:se.key),V=b(se,V,Yt),ne===null?Mt=se:ne.sibling=se,ne=se);return r&&Bt.forEach(function(eA){return n(J,eA)}),te&&aa(J,Yt),Mt}function be(J,V,rt,pt){if(typeof rt=="object"&&rt!==null&&rt.type===C&&rt.key===null&&(rt=rt.props.children),typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case m:t:{for(var Mt=rt.key;V!==null;){if(V.key===Mt){if(Mt=rt.type,Mt===C){if(V.tag===7){o(J,V.sibling),pt=y(V,rt.props.children),pt.return=J,J=pt;break t}}else if(V.elementType===Mt||typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===R&&$n(Mt)===V.type){o(J,V.sibling),pt=y(V,rt.props),uo(pt,rt),pt.return=J,J=pt;break t}o(J,V);break}else n(J,V);V=V.sibling}rt.type===C?(pt=Mn(rt.props.children,J.mode,pt,rt.key),pt.return=J,J=pt):(pt=rh(rt.type,rt.key,rt.props,null,J.mode,pt),uo(pt,rt),pt.return=J,J=pt)}return w(J);case v:t:{for(Mt=rt.key;V!==null;){if(V.key===Mt)if(V.tag===4&&V.stateNode.containerInfo===rt.containerInfo&&V.stateNode.implementation===rt.implementation){o(J,V.sibling),pt=y(V,rt.children||[]),pt.return=J,J=pt;break t}else{o(J,V);break}else n(J,V);V=V.sibling}pt=df(rt,J.mode,pt),pt.return=J,J=pt}return w(J);case R:return rt=$n(rt),be(J,V,rt,pt)}if(Y(rt))return kt(J,V,rt,pt);if(et(rt)){if(Mt=et(rt),typeof Mt!="function")throw Error(a(150));return rt=Mt.call(rt),$t(J,V,rt,pt)}if(typeof rt.then=="function")return be(J,V,hh(rt),pt);if(rt.$$typeof===B)return be(J,V,sh(J,rt),pt);uh(J,rt)}return typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint"?(rt=""+rt,V!==null&&V.tag===6?(o(J,V.sibling),pt=y(V,rt),pt.return=J,J=pt):(o(J,V),pt=uf(rt,J.mode,pt),pt.return=J,J=pt),w(J)):o(J,V)}return function(J,V,rt,pt){try{ho=0;var Mt=be(J,V,rt,pt);return $s=null,Mt}catch(Bt){if(Bt===Ds||Bt===oh)throw Bt;var ne=ji(29,Bt,null,J.mode);return ne.lanes=pt,ne.return=J,ne}finally{}}}var Nn=Q0(!0),K0=Q0(!1),Ga=!1;function Tf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wf(r,n){r=r.updateQueue,n.updateQueue===r&&(n.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Xa(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Va(r,n,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(ue&2)!==0){var y=d.pending;return y===null?n.next=n:(n.next=y.next,y.next=n),d.pending=n,n=ih(r),D0(r,null,o),n}return eh(r,d,n,o),ih(r)}function fo(r,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var d=n.lanes;d&=r.pendingLanes,o|=d,n.lanes=o,Xl(r,o)}}function _f(r,n){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var y=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};b===null?y=b=w:b=b.next=w,o=o.next}while(o!==null);b===null?y=b=n:b=b.next=n}else y=b=n;o={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=n:r.next=n,o.lastBaseUpdate=n}var Bf=!1;function po(){if(Bf){var r=Fs;if(r!==null)throw r}}function go(r,n,o,d){Bf=!1;var y=r.updateQueue;Ga=!1;var b=y.firstBaseUpdate,w=y.lastBaseUpdate,A=y.shared.pending;if(A!==null){y.shared.pending=null;var G=A,at=G.next;G.next=null,w===null?b=at:w.next=at,w=G;var ht=r.alternate;ht!==null&&(ht=ht.updateQueue,A=ht.lastBaseUpdate,A!==w&&(A===null?ht.firstBaseUpdate=at:A.next=at,ht.lastBaseUpdate=G))}if(b!==null){var gt=y.baseState;w=0,ht=at=G=null,A=b;do{var nt=A.lane&-536870913,ot=nt!==A.lane;if(ot?(Qt&nt)===nt:(d&nt)===nt){nt!==0&&nt===Os&&(Bf=!0),ht!==null&&(ht=ht.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});t:{var kt=r,$t=A;nt=n;var be=o;switch($t.tag){case 1:if(kt=$t.payload,typeof kt=="function"){gt=kt.call(be,gt,nt);break t}gt=kt;break t;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=$t.payload,nt=typeof kt=="function"?kt.call(be,gt,nt):kt,nt==null)break t;gt=g({},gt,nt);break t;case 2:Ga=!0}}nt=A.callback,nt!==null&&(r.flags|=64,ot&&(r.flags|=8192),ot=y.callbacks,ot===null?y.callbacks=[nt]:ot.push(nt))}else ot={lane:nt,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ht===null?(at=ht=ot,G=gt):ht=ht.next=ot,w|=nt;if(A=A.next,A===null){if(A=y.shared.pending,A===null)break;ot=A,A=ot.next,ot.next=null,y.lastBaseUpdate=ot,y.shared.pending=null}}while(!0);ht===null&&(G=gt),y.baseState=G,y.firstBaseUpdate=at,y.lastBaseUpdate=ht,b===null&&(y.shared.lanes=0),tn|=w,r.lanes=w,r.memoizedState=gt}}function J0(r,n){if(typeof r!="function")throw Error(a(191,r));r.call(n)}function tx(r,n){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)J0(o[r],n)}var zs=q(null),dh=q(0);function ex(r,n){r=ga,ut(dh,r),ut(zs,n),ga=r|n.baseLanes}function Ef(){ut(dh,ga),ut(zs,zs.current)}function Lf(){ga=dh.current,it(zs),it(dh)}var Ui=q(null),lr=null;function Za(r){var n=r.alternate;ut($e,$e.current&1),ut(Ui,r),lr===null&&(n===null||zs.current!==null||n.memoizedState!==null)&&(lr=r)}function Af(r){ut($e,$e.current),ut(Ui,r),lr===null&&(lr=r)}function ix(r){r.tag===22?(ut($e,$e.current),ut(Ui,r),lr===null&&(lr=r)):Qa()}function Qa(){ut($e,$e.current),ut(Ui,Ui.current)}function Pi(r){it(Ui),lr===r&&(lr=null),it($e)}var $e=q(0);function fh(r){for(var n=r;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||$p(o)||zp(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var la=0,Pt=null,ye=null,He=null,ph=!1,Ns=!1,qn=!1,gh=0,mo=0,qs=null,WE=0;function Me(){throw Error(a(321))}function Mf(r,n){if(n===null)return!1;for(var o=0;o<n.length&&o<r.length;o++)if(!Hi(r[o],n[o]))return!1;return!0}function Rf(r,n,o,d,y,b){return la=b,Pt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=r===null||r.memoizedState===null?qx:Gf,qn=!1,b=o(d,y),qn=!1,Ns&&(b=ax(n,o,d,y)),rx(r),b}function rx(r){M.H=bo;var n=ye!==null&&ye.next!==null;if(la=0,He=ye=Pt=null,ph=!1,mo=0,qs=null,n)throw Error(a(300));r===null||je||(r=r.dependencies,r!==null&&nh(r)&&(je=!0))}function ax(r,n,o,d){Pt=r;var y=0;do{if(Ns&&(qs=null),mo=0,Ns=!1,25<=y)throw Error(a(301));if(y+=1,He=ye=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}M.H=Ix,b=n(o,d)}while(Ns);return b}function YE(){var r=M.H,n=r.useState()[0];return n=typeof n.then=="function"?yo(n):n,r=r.useState()[0],(ye!==null?ye.memoizedState:null)!==r&&(Pt.flags|=1024),n}function Of(){var r=gh!==0;return gh=0,r}function Ff(r,n,o){n.updateQueue=r.updateQueue,n.flags&=-2053,r.lanes&=~o}function Df(r){if(ph){for(r=r.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}ph=!1}la=0,He=ye=Pt=null,Ns=!1,mo=gh=0,qs=null}function bi(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Pt.memoizedState=He=r:He=He.next=r,He}function ze(){if(ye===null){var r=Pt.alternate;r=r!==null?r.memoizedState:null}else r=ye.next;var n=He===null?Pt.memoizedState:He.next;if(n!==null)He=n,ye=r;else{if(r===null)throw Pt.alternate===null?Error(a(467)):Error(a(310));ye=r,r={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},He===null?Pt.memoizedState=He=r:He=He.next=r}return He}function mh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yo(r){var n=mo;return mo+=1,qs===null&&(qs=[]),r=X0(qs,r,n),n=Pt,(He===null?n.memoizedState:He.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?qx:Gf),r}function yh(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return yo(r);if(r.$$typeof===B)return ri(r)}throw Error(a(438,String(r)))}function $f(r){var n=null,o=Pt.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var d=Pt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(n={data:d.data.map(function(y){return y.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=mh(),Pt.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(r),d=0;d<r;d++)o[d]=P;return n.index++,o}function oa(r,n){return typeof n=="function"?n(r):n}function xh(r){var n=ze();return zf(n,ye,r)}function zf(r,n,o){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=o;var y=r.baseQueue,b=d.pending;if(b!==null){if(y!==null){var w=y.next;y.next=b.next,b.next=w}n.baseQueue=y=b,d.pending=null}if(b=r.baseState,y===null)r.memoizedState=b;else{n=y.next;var A=w=null,G=null,at=n,ht=!1;do{var gt=at.lane&-536870913;if(gt!==at.lane?(Qt&gt)===gt:(la&gt)===gt){var nt=at.revertLane;if(nt===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null}),gt===Os&&(ht=!0);else if((la&nt)===nt){at=at.next,nt===Os&&(ht=!0);continue}else gt={lane:0,revertLane:at.revertLane,gesture:null,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null},G===null?(A=G=gt,w=b):G=G.next=gt,Pt.lanes|=nt,tn|=nt;gt=at.action,qn&&o(b,gt),b=at.hasEagerState?at.eagerState:o(b,gt)}else nt={lane:gt,revertLane:at.revertLane,gesture:at.gesture,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null},G===null?(A=G=nt,w=b):G=G.next=nt,Pt.lanes|=gt,tn|=gt;at=at.next}while(at!==null&&at!==n);if(G===null?w=b:G.next=A,!Hi(b,r.memoizedState)&&(je=!0,ht&&(o=Fs,o!==null)))throw o;r.memoizedState=b,r.baseState=w,r.baseQueue=G,d.lastRenderedState=b}return y===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Nf(r){var n=ze(),o=n.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var d=o.dispatch,y=o.pending,b=n.memoizedState;if(y!==null){o.pending=null;var w=y=y.next;do b=r(b,w.action),w=w.next;while(w!==y);Hi(b,n.memoizedState)||(je=!0),n.memoizedState=b,n.baseQueue===null&&(n.baseState=b),o.lastRenderedState=b}return[b,d]}function nx(r,n,o){var d=Pt,y=ze(),b=te;if(b){if(o===void 0)throw Error(a(407));o=o()}else o=n();var w=!Hi((ye||y).memoizedState,o);if(w&&(y.memoizedState=o,je=!0),y=y.queue,Hf(ox.bind(null,d,y,r),[r]),y.getSnapshot!==n||w||He!==null&&He.memoizedState.tag&1){if(d.flags|=2048,Is(9,{destroy:void 0},lx.bind(null,d,y,o,n),null),Ce===null)throw Error(a(349));b||(la&127)!==0||sx(d,n,o)}return o}function sx(r,n,o){r.flags|=16384,r={getSnapshot:n,value:o},n=Pt.updateQueue,n===null?(n=mh(),Pt.updateQueue=n,n.stores=[r]):(o=n.stores,o===null?n.stores=[r]:o.push(r))}function lx(r,n,o,d){n.value=o,n.getSnapshot=d,cx(n)&&hx(r)}function ox(r,n,o){return o(function(){cx(n)&&hx(r)})}function cx(r){var n=r.getSnapshot;r=r.value;try{var o=n();return!Hi(r,o)}catch{return!0}}function hx(r){var n=An(r,2);n!==null&&Oi(n,r,2)}function qf(r){var n=bi();if(typeof r=="function"){var o=r;if(r=o(),qn){gr(!0);try{o()}finally{gr(!1)}}}return n.memoizedState=n.baseState=r,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:r},n}function ux(r,n,o,d){return r.baseState=o,zf(r,ye,typeof d=="function"?d:oa)}function GE(r,n,o,d,y){if(vh(r))throw Error(a(485));if(r=n.action,r!==null){var b={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){b.listeners.push(w)}};M.T!==null?o(!0):b.isTransition=!1,d(b),o=n.pending,o===null?(b.next=n.pending=b,dx(n,b)):(b.next=o.next,n.pending=o.next=b)}}function dx(r,n){var o=n.action,d=n.payload,y=r.state;if(n.isTransition){var b=M.T,w={};M.T=w;try{var A=o(y,d),G=M.S;G!==null&&G(w,A),fx(r,n,A)}catch(at){If(r,n,at)}finally{b!==null&&w.types!==null&&(b.types=w.types),M.T=b}}else try{b=o(y,d),fx(r,n,b)}catch(at){If(r,n,at)}}function fx(r,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){px(r,n,d)},function(d){return If(r,n,d)}):px(r,n,o)}function px(r,n,o){n.status="fulfilled",n.value=o,gx(n),r.state=o,n=r.pending,n!==null&&(o=n.next,o===n?r.pending=null:(o=o.next,n.next=o,dx(r,o)))}function If(r,n,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do n.status="rejected",n.reason=o,gx(n),n=n.next;while(n!==d)}r.action=null}function gx(r){r=r.listeners;for(var n=0;n<r.length;n++)(0,r[n])()}function mx(r,n){return n}function yx(r,n){if(te){var o=Ce.formState;if(o!==null){t:{var d=Pt;if(te){if(Se){e:{for(var y=Se,b=sr;y.nodeType!==8;){if(!b){y=null;break e}if(y=or(y.nextSibling),y===null){y=null;break e}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){Se=or(y.nextSibling),d=y.data==="F!";break t}}Wa(d)}d=!1}d&&(n=o[0])}}return o=bi(),o.memoizedState=o.baseState=n,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mx,lastRenderedState:n},o.queue=d,o=$x.bind(null,Pt,d),d.dispatch=o,d=qf(!1),b=Yf.bind(null,Pt,!1,d.queue),d=bi(),y={state:n,dispatch:null,action:r,pending:null},d.queue=y,o=GE.bind(null,Pt,y,b,o),y.dispatch=o,d.memoizedState=r,[n,o,!1]}function xx(r){var n=ze();return bx(n,ye,r)}function bx(r,n,o){if(n=zf(r,n,mx)[0],r=xh(oa)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var d=yo(n)}catch(w){throw w===Ds?oh:w}else d=n;n=ze();var y=n.queue,b=y.dispatch;return o!==n.memoizedState&&(Pt.flags|=2048,Is(9,{destroy:void 0},XE.bind(null,y,o),null)),[d,b,r]}function XE(r,n){r.action=n}function Cx(r){var n=ze(),o=ye;if(o!==null)return bx(n,o,r);ze(),n=n.memoizedState,o=ze();var d=o.queue.dispatch;return o.memoizedState=r,[n,d,!1]}function Is(r,n,o,d){return r={tag:r,create:o,deps:d,inst:n,next:null},n=Pt.updateQueue,n===null&&(n=mh(),Pt.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,n.lastEffect=r),r}function vx(){return ze().memoizedState}function bh(r,n,o,d){var y=bi();Pt.flags|=r,y.memoizedState=Is(1|n,{destroy:void 0},o,d===void 0?null:d)}function Ch(r,n,o,d){var y=ze();d=d===void 0?null:d;var b=y.memoizedState.inst;ye!==null&&d!==null&&Mf(d,ye.memoizedState.deps)?y.memoizedState=Is(n,b,o,d):(Pt.flags|=r,y.memoizedState=Is(1|n,b,o,d))}function kx(r,n){bh(8390656,8,r,n)}function Hf(r,n){Ch(2048,8,r,n)}function VE(r){Pt.flags|=4;var n=Pt.updateQueue;if(n===null)n=mh(),Pt.updateQueue=n,n.events=[r];else{var o=n.events;o===null?n.events=[r]:o.push(r)}}function Sx(r){var n=ze().memoizedState;return VE({ref:n,nextImpl:r}),function(){if((ue&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function Tx(r,n){return Ch(4,2,r,n)}function wx(r,n){return Ch(4,4,r,n)}function _x(r,n){if(typeof n=="function"){r=r();var o=n(r);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return r=r(),n.current=r,function(){n.current=null}}function Bx(r,n,o){o=o!=null?o.concat([r]):null,Ch(4,4,_x.bind(null,n,r),o)}function jf(){}function Ex(r,n){var o=ze();n=n===void 0?null:n;var d=o.memoizedState;return n!==null&&Mf(n,d[1])?d[0]:(o.memoizedState=[r,n],r)}function Lx(r,n){var o=ze();n=n===void 0?null:n;var d=o.memoizedState;if(n!==null&&Mf(n,d[1]))return d[0];if(d=r(),qn){gr(!0);try{r()}finally{gr(!1)}}return o.memoizedState=[d,n],d}function Uf(r,n,o){return o===void 0||(la&1073741824)!==0&&(Qt&261930)===0?r.memoizedState=n:(r.memoizedState=o,r=Ab(),Pt.lanes|=r,tn|=r,o)}function Ax(r,n,o,d){return Hi(o,n)?o:zs.current!==null?(r=Uf(r,o,d),Hi(r,n)||(je=!0),r):(la&42)===0||(la&1073741824)!==0&&(Qt&261930)===0?(je=!0,r.memoizedState=o):(r=Ab(),Pt.lanes|=r,tn|=r,n)}function Mx(r,n,o,d,y){var b=I.p;I.p=b!==0&&8>b?b:8;var w=M.T,A={};M.T=A,Yf(r,!1,n,o);try{var G=y(),at=M.S;if(at!==null&&at(A,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ht=PE(G,d);xo(r,n,ht,Gi(r))}else xo(r,n,d,Gi(r))}catch(gt){xo(r,n,{then:function(){},status:"rejected",reason:gt},Gi())}finally{I.p=b,w!==null&&A.types!==null&&(w.types=A.types),M.T=w}}function ZE(){}function Pf(r,n,o,d){if(r.tag!==5)throw Error(a(476));var y=Rx(r).queue;Mx(r,y,n,$,o===null?ZE:function(){return Ox(r),o(d)})}function Rx(r){var n=r.memoizedState;if(n!==null)return n;n={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:$},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:o},next:null},r.memoizedState=n,r=r.alternate,r!==null&&(r.memoizedState=n),n}function Ox(r){var n=Rx(r);n.next===null&&(n=r.alternate.memoizedState),xo(r,n.next.queue,{},Gi())}function Wf(){return ri(Do)}function Fx(){return ze().memoizedState}function Dx(){return ze().memoizedState}function QE(r){for(var n=r.return;n!==null;){switch(n.tag){case 24:case 3:var o=Gi();r=Xa(o);var d=Va(n,r,o);d!==null&&(Oi(d,n,o),fo(d,n,o)),n={cache:Cf()},r.payload=n;return}n=n.return}}function KE(r,n,o){var d=Gi();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},vh(r)?zx(n,o):(o=cf(r,n,o,d),o!==null&&(Oi(o,r,d),Nx(o,n,d)))}function $x(r,n,o){var d=Gi();xo(r,n,o,d)}function xo(r,n,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(vh(r))zx(n,y);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var w=n.lastRenderedState,A=b(w,o);if(y.hasEagerState=!0,y.eagerState=A,Hi(A,w))return eh(r,n,y,0),Ce===null&&th(),!1}catch{}finally{}if(o=cf(r,n,y,d),o!==null)return Oi(o,r,d),Nx(o,n,d),!0}return!1}function Yf(r,n,o,d){if(d={lane:2,revertLane:Tp(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},vh(r)){if(n)throw Error(a(479))}else n=cf(r,o,d,2),n!==null&&Oi(n,r,2)}function vh(r){var n=r.alternate;return r===Pt||n!==null&&n===Pt}function zx(r,n){Ns=ph=!0;var o=r.pending;o===null?n.next=n:(n.next=o.next,o.next=n),r.pending=n}function Nx(r,n,o){if((o&4194048)!==0){var d=n.lanes;d&=r.pendingLanes,o|=d,n.lanes=o,Xl(r,o)}}var bo={readContext:ri,use:yh,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};bo.useEffectEvent=Me;var qx={readContext:ri,use:yh,useCallback:function(r,n){return bi().memoizedState=[r,n===void 0?null:n],r},useContext:ri,useEffect:kx,useImperativeHandle:function(r,n,o){o=o!=null?o.concat([r]):null,bh(4194308,4,_x.bind(null,n,r),o)},useLayoutEffect:function(r,n){return bh(4194308,4,r,n)},useInsertionEffect:function(r,n){bh(4,2,r,n)},useMemo:function(r,n){var o=bi();n=n===void 0?null:n;var d=r();if(qn){gr(!0);try{r()}finally{gr(!1)}}return o.memoizedState=[d,n],d},useReducer:function(r,n,o){var d=bi();if(o!==void 0){var y=o(n);if(qn){gr(!0);try{o(n)}finally{gr(!1)}}}else y=n;return d.memoizedState=d.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},d.queue=r,r=r.dispatch=KE.bind(null,Pt,r),[d.memoizedState,r]},useRef:function(r){var n=bi();return r={current:r},n.memoizedState=r},useState:function(r){r=qf(r);var n=r.queue,o=$x.bind(null,Pt,n);return n.dispatch=o,[r.memoizedState,o]},useDebugValue:jf,useDeferredValue:function(r,n){var o=bi();return Uf(o,r,n)},useTransition:function(){var r=qf(!1);return r=Mx.bind(null,Pt,r.queue,!0,!1),bi().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,n,o){var d=Pt,y=bi();if(te){if(o===void 0)throw Error(a(407));o=o()}else{if(o=n(),Ce===null)throw Error(a(349));(Qt&127)!==0||sx(d,n,o)}y.memoizedState=o;var b={value:o,getSnapshot:n};return y.queue=b,kx(ox.bind(null,d,b,r),[r]),d.flags|=2048,Is(9,{destroy:void 0},lx.bind(null,d,b,o,n),null),o},useId:function(){var r=bi(),n=Ce.identifierPrefix;if(te){var o=Nr,d=zr;o=(d&~(1<<32-Ze(d)-1)).toString(32)+o,n="_"+n+"R_"+o,o=gh++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=WE++,n="_"+n+"r_"+o.toString(32)+"_";return r.memoizedState=n},useHostTransitionStatus:Wf,useFormState:yx,useActionState:yx,useOptimistic:function(r){var n=bi();n.memoizedState=n.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Yf.bind(null,Pt,!0,o),o.dispatch=n,[r,n]},useMemoCache:$f,useCacheRefresh:function(){return bi().memoizedState=QE.bind(null,Pt)},useEffectEvent:function(r){var n=bi(),o={impl:r};return n.memoizedState=o,function(){if((ue&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Gf={readContext:ri,use:yh,useCallback:Ex,useContext:ri,useEffect:Hf,useImperativeHandle:Bx,useInsertionEffect:Tx,useLayoutEffect:wx,useMemo:Lx,useReducer:xh,useRef:vx,useState:function(){return xh(oa)},useDebugValue:jf,useDeferredValue:function(r,n){var o=ze();return Ax(o,ye.memoizedState,r,n)},useTransition:function(){var r=xh(oa)[0],n=ze().memoizedState;return[typeof r=="boolean"?r:yo(r),n]},useSyncExternalStore:nx,useId:Fx,useHostTransitionStatus:Wf,useFormState:xx,useActionState:xx,useOptimistic:function(r,n){var o=ze();return ux(o,ye,r,n)},useMemoCache:$f,useCacheRefresh:Dx};Gf.useEffectEvent=Sx;var Ix={readContext:ri,use:yh,useCallback:Ex,useContext:ri,useEffect:Hf,useImperativeHandle:Bx,useInsertionEffect:Tx,useLayoutEffect:wx,useMemo:Lx,useReducer:Nf,useRef:vx,useState:function(){return Nf(oa)},useDebugValue:jf,useDeferredValue:function(r,n){var o=ze();return ye===null?Uf(o,r,n):Ax(o,ye.memoizedState,r,n)},useTransition:function(){var r=Nf(oa)[0],n=ze().memoizedState;return[typeof r=="boolean"?r:yo(r),n]},useSyncExternalStore:nx,useId:Fx,useHostTransitionStatus:Wf,useFormState:Cx,useActionState:Cx,useOptimistic:function(r,n){var o=ze();return ye!==null?ux(o,ye,r,n):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:$f,useCacheRefresh:Dx};Ix.useEffectEvent=Sx;function Xf(r,n,o,d){n=r.memoizedState,o=o(d,n),o=o==null?n:g({},n,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var Vf={enqueueSetState:function(r,n,o){r=r._reactInternals;var d=Gi(),y=Xa(d);y.payload=n,o!=null&&(y.callback=o),n=Va(r,y,d),n!==null&&(Oi(n,r,d),fo(n,r,d))},enqueueReplaceState:function(r,n,o){r=r._reactInternals;var d=Gi(),y=Xa(d);y.tag=1,y.payload=n,o!=null&&(y.callback=o),n=Va(r,y,d),n!==null&&(Oi(n,r,d),fo(n,r,d))},enqueueForceUpdate:function(r,n){r=r._reactInternals;var o=Gi(),d=Xa(o);d.tag=2,n!=null&&(d.callback=n),n=Va(r,d,o),n!==null&&(Oi(n,r,o),fo(n,r,o))}};function Hx(r,n,o,d,y,b,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,b,w):n.prototype&&n.prototype.isPureReactComponent?!ao(o,d)||!ao(y,b):!0}function jx(r,n,o,d){r=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,d),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,d),n.state!==r&&Vf.enqueueReplaceState(n,n.state,null)}function In(r,n){var o=n;if("ref"in n){o={};for(var d in n)d!=="ref"&&(o[d]=n[d])}if(r=r.defaultProps){o===n&&(o=g({},o));for(var y in r)o[y]===void 0&&(o[y]=r[y])}return o}function Ux(r){Jc(r)}function Px(r){console.error(r)}function Wx(r){Jc(r)}function kh(r,n){try{var o=r.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(d){setTimeout(function(){throw d})}}function Yx(r,n,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Zf(r,n,o){return o=Xa(o),o.tag=3,o.payload={element:null},o.callback=function(){kh(r,n)},o}function Gx(r){return r=Xa(r),r.tag=3,r}function Xx(r,n,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var b=d.value;r.payload=function(){return y(b)},r.callback=function(){Yx(n,o,d)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(r.callback=function(){Yx(n,o,d),typeof y!="function"&&(en===null?en=new Set([this]):en.add(this));var A=d.stack;this.componentDidCatch(d.value,{componentStack:A!==null?A:""})})}function JE(r,n,o,d,y){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(n=o.alternate,n!==null&&Rs(n,o,y,!0),o=Ui.current,o!==null){switch(o.tag){case 31:case 13:return lr===null?Fh():o.alternate===null&&Re===0&&(Re=3),o.flags&=-257,o.flags|=65536,o.lanes=y,d===ch?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([d]):n.add(d),vp(r,d,y)),!1;case 22:return o.flags|=65536,d===ch?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([d]):o.add(d)),vp(r,d,y)),!1}throw Error(a(435,o.tag))}return vp(r,d,y),Fh(),!1}if(te)return n=Ui.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=y,d!==gf&&(r=Error(a(422),{cause:d}),lo(rr(r,o)))):(d!==gf&&(n=Error(a(423),{cause:d}),lo(rr(n,o))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,d=rr(d,o),y=Zf(r.stateNode,d,y),_f(r,y),Re!==4&&(Re=2)),!1;var b=Error(a(520),{cause:d});if(b=rr(b,o),Bo===null?Bo=[b]:Bo.push(b),Re!==4&&(Re=2),n===null)return!0;d=rr(d,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,r=y&-y,o.lanes|=r,r=Zf(o.stateNode,d,r),_f(o,r),!1;case 1:if(n=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(en===null||!en.has(b))))return o.flags|=65536,y&=-y,o.lanes|=y,y=Gx(y),Xx(y,r,o,d),_f(o,y),!1}o=o.return}while(o!==null);return!1}var Qf=Error(a(461)),je=!1;function ai(r,n,o,d){n.child=r===null?K0(n,null,o,d):Nn(n,r.child,o,d)}function Vx(r,n,o,d,y){o=o.render;var b=n.ref;if("ref"in d){var w={};for(var A in d)A!=="ref"&&(w[A]=d[A])}else w=d;return Fn(n),d=Rf(r,n,o,w,b,y),A=Of(),r!==null&&!je?(Ff(r,n,y),ca(r,n,y)):(te&&A&&ff(n),n.flags|=1,ai(r,n,d,y),n.child)}function Zx(r,n,o,d,y){if(r===null){var b=o.type;return typeof b=="function"&&!hf(b)&&b.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=b,Qx(r,n,b,d,y)):(r=rh(o.type,null,d,n,n.mode,y),r.ref=n.ref,r.return=n,n.child=r)}if(b=r.child,!np(r,y)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:ao,o(w,d)&&r.ref===n.ref)return ca(r,n,y)}return n.flags|=1,r=ra(b,d),r.ref=n.ref,r.return=n,n.child=r}function Qx(r,n,o,d,y){if(r!==null){var b=r.memoizedProps;if(ao(b,d)&&r.ref===n.ref)if(je=!1,n.pendingProps=d=b,np(r,y))(r.flags&131072)!==0&&(je=!0);else return n.lanes=r.lanes,ca(r,n,y)}return Kf(r,n,o,d,y)}function Kx(r,n,o,d){var y=d.children,b=r!==null?r.memoizedState:null;if(r===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((n.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,r!==null){for(d=n.child=r.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~b}else d=0,n.child=null;return Jx(r,n,b,o,d)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},r!==null&&lh(n,b!==null?b.cachePool:null),b!==null?ex(n,b):Ef(),ix(n);else return d=n.lanes=536870912,Jx(r,n,b!==null?b.baseLanes|o:o,o,d)}else b!==null?(lh(n,b.cachePool),ex(n,b),Qa(),n.memoizedState=null):(r!==null&&lh(n,null),Ef(),Qa());return ai(r,n,y,o),n.child}function Co(r,n){return r!==null&&r.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jx(r,n,o,d,y){var b=kf();return b=b===null?null:{parent:Ie._currentValue,pool:b},n.memoizedState={baseLanes:o,cachePool:b},r!==null&&lh(n,null),Ef(),ix(n),r!==null&&Rs(r,n,d,!0),n.childLanes=y,null}function Sh(r,n){return n=wh({mode:n.mode,children:n.children},r.mode),n.ref=r.ref,r.child=n,n.return=r,n}function tb(r,n,o){return Nn(n,r.child,null,o),r=Sh(n,n.pendingProps),r.flags|=2,Pi(n),n.memoizedState=null,r}function tL(r,n,o){var d=n.pendingProps,y=(n.flags&128)!==0;if(n.flags&=-129,r===null){if(te){if(d.mode==="hidden")return r=Sh(n,d),n.lanes=536870912,Co(null,r);if(Af(n),(r=Se)?(r=d1(r,sr),r=r!==null&&r.data==="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Ua!==null?{id:zr,overflow:Nr}:null,retryLane:536870912,hydrationErrors:null},o=z0(r),o.return=n,n.child=o,ii=n,Se=null)):r=null,r===null)throw Wa(n);return n.lanes=536870912,null}return Sh(n,d)}var b=r.memoizedState;if(b!==null){var w=b.dehydrated;if(Af(n),y)if(n.flags&256)n.flags&=-257,n=tb(r,n,o);else if(n.memoizedState!==null)n.child=r.child,n.flags|=128,n=null;else throw Error(a(558));else if(je||Rs(r,n,o,!1),y=(o&r.childLanes)!==0,je||y){if(d=Ce,d!==null&&(w=gs(d,o),w!==0&&w!==b.retryLane))throw b.retryLane=w,An(r,w),Oi(d,r,w),Qf;Fh(),n=tb(r,n,o)}else r=b.treeContext,Se=or(w.nextSibling),ii=n,te=!0,Pa=null,sr=!1,r!==null&&I0(n,r),n=Sh(n,d),n.flags|=4096;return n}return r=ra(r.child,{mode:d.mode,children:d.children}),r.ref=n.ref,n.child=r,r.return=n,r}function Th(r,n){var o=n.ref;if(o===null)r!==null&&r.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(n.flags|=4194816)}}function Kf(r,n,o,d,y){return Fn(n),o=Rf(r,n,o,d,void 0,y),d=Of(),r!==null&&!je?(Ff(r,n,y),ca(r,n,y)):(te&&d&&ff(n),n.flags|=1,ai(r,n,o,y),n.child)}function eb(r,n,o,d,y,b){return Fn(n),n.updateQueue=null,o=ax(n,d,o,y),rx(r),d=Of(),r!==null&&!je?(Ff(r,n,b),ca(r,n,b)):(te&&d&&ff(n),n.flags|=1,ai(r,n,o,b),n.child)}function ib(r,n,o,d,y){if(Fn(n),n.stateNode===null){var b=Es,w=o.contextType;typeof w=="object"&&w!==null&&(b=ri(w)),b=new o(d,b),n.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Vf,n.stateNode=b,b._reactInternals=n,b=n.stateNode,b.props=d,b.state=n.memoizedState,b.refs={},Tf(n),w=o.contextType,b.context=typeof w=="object"&&w!==null?ri(w):Es,b.state=n.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Xf(n,o,w,d),b.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&Vf.enqueueReplaceState(b,b.state,null),go(n,d,b,y),po(),b.state=n.memoizedState),typeof b.componentDidMount=="function"&&(n.flags|=4194308),d=!0}else if(r===null){b=n.stateNode;var A=n.memoizedProps,G=In(o,A);b.props=G;var at=b.context,ht=o.contextType;w=Es,typeof ht=="object"&&ht!==null&&(w=ri(ht));var gt=o.getDerivedStateFromProps;ht=typeof gt=="function"||typeof b.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,ht||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A||at!==w)&&jx(n,b,d,w),Ga=!1;var nt=n.memoizedState;b.state=nt,go(n,d,b,y),po(),at=n.memoizedState,A||nt!==at||Ga?(typeof gt=="function"&&(Xf(n,o,gt,d),at=n.memoizedState),(G=Ga||Hx(n,o,G,d,nt,at,w))?(ht||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(n.flags|=4194308)):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=d,n.memoizedState=at),b.props=d,b.state=at,b.context=w,d=G):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),d=!1)}else{b=n.stateNode,wf(r,n),w=n.memoizedProps,ht=In(o,w),b.props=ht,gt=n.pendingProps,nt=b.context,at=o.contextType,G=Es,typeof at=="object"&&at!==null&&(G=ri(at)),A=o.getDerivedStateFromProps,(at=typeof A=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==gt||nt!==G)&&jx(n,b,d,G),Ga=!1,nt=n.memoizedState,b.state=nt,go(n,d,b,y),po();var ot=n.memoizedState;w!==gt||nt!==ot||Ga||r!==null&&r.dependencies!==null&&nh(r.dependencies)?(typeof A=="function"&&(Xf(n,o,A,d),ot=n.memoizedState),(ht=Ga||Hx(n,o,ht,d,nt,ot,G)||r!==null&&r.dependencies!==null&&nh(r.dependencies))?(at||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,ot,G),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,ot,G)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=1024),n.memoizedProps=d,n.memoizedState=ot),b.props=d,b.state=ot,b.context=G,d=ht):(typeof b.componentDidUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&nt===r.memoizedState||(n.flags|=1024),d=!1)}return b=d,Th(r,n),d=(n.flags&128)!==0,b||d?(b=n.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:b.render(),n.flags|=1,r!==null&&d?(n.child=Nn(n,r.child,null,y),n.child=Nn(n,null,o,y)):ai(r,n,o,y),n.memoizedState=b.state,r=n.child):r=ca(r,n,y),r}function rb(r,n,o,d){return Rn(),n.flags|=256,ai(r,n,o,d),n.child}var Jf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tp(r){return{baseLanes:r,cachePool:Y0()}}function ep(r,n,o){return r=r!==null?r.childLanes&~o:0,n&&(r|=Yi),r}function ab(r,n,o){var d=n.pendingProps,y=!1,b=(n.flags&128)!==0,w;if((w=b)||(w=r!==null&&r.memoizedState===null?!1:($e.current&2)!==0),w&&(y=!0,n.flags&=-129),w=(n.flags&32)!==0,n.flags&=-33,r===null){if(te){if(y?Za(n):Qa(),(r=Se)?(r=d1(r,sr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Ua!==null?{id:zr,overflow:Nr}:null,retryLane:536870912,hydrationErrors:null},o=z0(r),o.return=n,n.child=o,ii=n,Se=null)):r=null,r===null)throw Wa(n);return zp(r)?n.lanes=32:n.lanes=536870912,null}var A=d.children;return d=d.fallback,y?(Qa(),y=n.mode,A=wh({mode:"hidden",children:A},y),d=Mn(d,y,o,null),A.return=n,d.return=n,A.sibling=d,n.child=A,d=n.child,d.memoizedState=tp(o),d.childLanes=ep(r,w,o),n.memoizedState=Jf,Co(null,d)):(Za(n),ip(n,A))}var G=r.memoizedState;if(G!==null&&(A=G.dehydrated,A!==null)){if(b)n.flags&256?(Za(n),n.flags&=-257,n=rp(r,n,o)):n.memoizedState!==null?(Qa(),n.child=r.child,n.flags|=128,n=null):(Qa(),A=d.fallback,y=n.mode,d=wh({mode:"visible",children:d.children},y),A=Mn(A,y,o,null),A.flags|=2,d.return=n,A.return=n,d.sibling=A,n.child=d,Nn(n,r.child,null,o),d=n.child,d.memoizedState=tp(o),d.childLanes=ep(r,w,o),n.memoizedState=Jf,n=Co(null,d));else if(Za(n),zp(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var at=w.dgst;w=at,d=Error(a(419)),d.stack="",d.digest=w,lo({value:d,source:null,stack:null}),n=rp(r,n,o)}else if(je||Rs(r,n,o,!1),w=(o&r.childLanes)!==0,je||w){if(w=Ce,w!==null&&(d=gs(w,o),d!==0&&d!==G.retryLane))throw G.retryLane=d,An(r,d),Oi(w,r,d),Qf;$p(A)||Fh(),n=rp(r,n,o)}else $p(A)?(n.flags|=192,n.child=r.child,n=null):(r=G.treeContext,Se=or(A.nextSibling),ii=n,te=!0,Pa=null,sr=!1,r!==null&&I0(n,r),n=ip(n,d.children),n.flags|=4096);return n}return y?(Qa(),A=d.fallback,y=n.mode,G=r.child,at=G.sibling,d=ra(G,{mode:"hidden",children:d.children}),d.subtreeFlags=G.subtreeFlags&65011712,at!==null?A=ra(at,A):(A=Mn(A,y,o,null),A.flags|=2),A.return=n,d.return=n,d.sibling=A,n.child=d,Co(null,d),d=n.child,A=r.child.memoizedState,A===null?A=tp(o):(y=A.cachePool,y!==null?(G=Ie._currentValue,y=y.parent!==G?{parent:G,pool:G}:y):y=Y0(),A={baseLanes:A.baseLanes|o,cachePool:y}),d.memoizedState=A,d.childLanes=ep(r,w,o),n.memoizedState=Jf,Co(r.child,d)):(Za(n),o=r.child,r=o.sibling,o=ra(o,{mode:"visible",children:d.children}),o.return=n,o.sibling=null,r!==null&&(w=n.deletions,w===null?(n.deletions=[r],n.flags|=16):w.push(r)),n.child=o,n.memoizedState=null,o)}function ip(r,n){return n=wh({mode:"visible",children:n},r.mode),n.return=r,r.child=n}function wh(r,n){return r=ji(22,r,null,n),r.lanes=0,r}function rp(r,n,o){return Nn(n,r.child,null,o),r=ip(n,n.pendingProps.children),r.flags|=2,n.memoizedState=null,r}function nb(r,n,o){r.lanes|=n;var d=r.alternate;d!==null&&(d.lanes|=n),xf(r.return,n,o)}function ap(r,n,o,d,y,b){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:b}:(w.isBackwards=n,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=o,w.tailMode=y,w.treeForkCount=b)}function sb(r,n,o){var d=n.pendingProps,y=d.revealOrder,b=d.tail;d=d.children;var w=$e.current,A=(w&2)!==0;if(A?(w=w&1|2,n.flags|=128):w&=1,ut($e,w),ai(r,n,d,o),d=te?so:0,!A&&r!==null&&(r.flags&128)!==0)t:for(r=n.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&nb(r,o,n);else if(r.tag===19)nb(r,o,n);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break t;for(;r.sibling===null;){if(r.return===null||r.return===n)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(o=n.child,y=null;o!==null;)r=o.alternate,r!==null&&fh(r)===null&&(y=o),o=o.sibling;o=y,o===null?(y=n.child,n.child=null):(y=o.sibling,o.sibling=null),ap(n,!1,y,o,b,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=n.child,n.child=null;y!==null;){if(r=y.alternate,r!==null&&fh(r)===null){n.child=y;break}r=y.sibling,y.sibling=o,o=y,y=r}ap(n,!0,o,null,b,d);break;case"together":ap(n,!1,null,null,void 0,d);break;default:n.memoizedState=null}return n.child}function ca(r,n,o){if(r!==null&&(n.dependencies=r.dependencies),tn|=n.lanes,(o&n.childLanes)===0)if(r!==null){if(Rs(r,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(r!==null&&n.child!==r.child)throw Error(a(153));if(n.child!==null){for(r=n.child,o=ra(r,r.pendingProps),n.child=o,o.return=n;r.sibling!==null;)r=r.sibling,o=o.sibling=ra(r,r.pendingProps),o.return=n;o.sibling=null}return n.child}function np(r,n){return(r.lanes&n)!==0?!0:(r=r.dependencies,!!(r!==null&&nh(r)))}function eL(r,n,o){switch(n.tag){case 3:Ft(n,n.stateNode.containerInfo),Ya(n,Ie,r.memoizedState.cache),Rn();break;case 27:case 5:U(n);break;case 4:Ft(n,n.stateNode.containerInfo);break;case 10:Ya(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Af(n),null;break;case 13:var d=n.memoizedState;if(d!==null)return d.dehydrated!==null?(Za(n),n.flags|=128,null):(o&n.child.childLanes)!==0?ab(r,n,o):(Za(n),r=ca(r,n,o),r!==null?r.sibling:null);Za(n);break;case 19:var y=(r.flags&128)!==0;if(d=(o&n.childLanes)!==0,d||(Rs(r,n,o,!1),d=(o&n.childLanes)!==0),y){if(d)return sb(r,n,o);n.flags|=128}if(y=n.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ut($e,$e.current),d)break;return null;case 22:return n.lanes=0,Kx(r,n,o,n.pendingProps);case 24:Ya(n,Ie,r.memoizedState.cache)}return ca(r,n,o)}function lb(r,n,o){if(r!==null)if(r.memoizedProps!==n.pendingProps)je=!0;else{if(!np(r,o)&&(n.flags&128)===0)return je=!1,eL(r,n,o);je=(r.flags&131072)!==0}else je=!1,te&&(n.flags&1048576)!==0&&q0(n,so,n.index);switch(n.lanes=0,n.tag){case 16:t:{var d=n.pendingProps;if(r=$n(n.elementType),n.type=r,typeof r=="function")hf(r)?(d=In(r,d),n.tag=1,n=ib(null,n,r,d,o)):(n.tag=0,n=Kf(null,n,r,d,o));else{if(r!=null){var y=r.$$typeof;if(y===O){n.tag=11,n=Vx(null,n,r,d,o);break t}else if(y===H){n.tag=14,n=Zx(null,n,r,d,o);break t}}throw n=X(r)||r,Error(a(306,n,""))}}return n;case 0:return Kf(r,n,n.type,n.pendingProps,o);case 1:return d=n.type,y=In(d,n.pendingProps),ib(r,n,d,y,o);case 3:t:{if(Ft(n,n.stateNode.containerInfo),r===null)throw Error(a(387));d=n.pendingProps;var b=n.memoizedState;y=b.element,wf(r,n),go(n,d,null,o);var w=n.memoizedState;if(d=w.cache,Ya(n,Ie,d),d!==b.cache&&bf(n,[Ie],o,!0),po(),d=w.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:w.cache},n.updateQueue.baseState=b,n.memoizedState=b,n.flags&256){n=rb(r,n,d,o);break t}else if(d!==y){y=rr(Error(a(424)),n),lo(y),n=rb(r,n,d,o);break t}else{switch(r=n.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Se=or(r.firstChild),ii=n,te=!0,Pa=null,sr=!0,o=K0(n,null,d,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Rn(),d===y){n=ca(r,n,o);break t}ai(r,n,d,o)}n=n.child}return n;case 26:return Th(r,n),r===null?(o=x1(n.type,null,n.pendingProps,null))?n.memoizedState=o:te||(o=n.type,r=n.pendingProps,d=Hh(xt.current).createElement(o),d[qe]=n,d[ei]=r,ni(d,o,r),Ee(d),n.stateNode=d):n.memoizedState=x1(n.type,r.memoizedProps,n.pendingProps,r.memoizedState),null;case 27:return U(n),r===null&&te&&(d=n.stateNode=g1(n.type,n.pendingProps,xt.current),ii=n,sr=!0,y=Se,sn(n.type)?(Np=y,Se=or(d.firstChild)):Se=y),ai(r,n,n.pendingProps.children,o),Th(r,n),r===null&&(n.flags|=4194304),n.child;case 5:return r===null&&te&&((y=d=Se)&&(d=ML(d,n.type,n.pendingProps,sr),d!==null?(n.stateNode=d,ii=n,Se=or(d.firstChild),sr=!1,y=!0):y=!1),y||Wa(n)),U(n),y=n.type,b=n.pendingProps,w=r!==null?r.memoizedProps:null,d=b.children,Op(y,b)?d=null:w!==null&&Op(y,w)&&(n.flags|=32),n.memoizedState!==null&&(y=Rf(r,n,YE,null,null,o),Do._currentValue=y),Th(r,n),ai(r,n,d,o),n.child;case 6:return r===null&&te&&((r=o=Se)&&(o=RL(o,n.pendingProps,sr),o!==null?(n.stateNode=o,ii=n,Se=null,r=!0):r=!1),r||Wa(n)),null;case 13:return ab(r,n,o);case 4:return Ft(n,n.stateNode.containerInfo),d=n.pendingProps,r===null?n.child=Nn(n,null,d,o):ai(r,n,d,o),n.child;case 11:return Vx(r,n,n.type,n.pendingProps,o);case 7:return ai(r,n,n.pendingProps,o),n.child;case 8:return ai(r,n,n.pendingProps.children,o),n.child;case 12:return ai(r,n,n.pendingProps.children,o),n.child;case 10:return d=n.pendingProps,Ya(n,n.type,d.value),ai(r,n,d.children,o),n.child;case 9:return y=n.type._context,d=n.pendingProps.children,Fn(n),y=ri(y),d=d(y),n.flags|=1,ai(r,n,d,o),n.child;case 14:return Zx(r,n,n.type,n.pendingProps,o);case 15:return Qx(r,n,n.type,n.pendingProps,o);case 19:return sb(r,n,o);case 31:return tL(r,n,o);case 22:return Kx(r,n,o,n.pendingProps);case 24:return Fn(n),d=ri(Ie),r===null?(y=kf(),y===null&&(y=Ce,b=Cf(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=o),y=b),n.memoizedState={parent:d,cache:y},Tf(n),Ya(n,Ie,y)):((r.lanes&o)!==0&&(wf(r,n),go(n,null,null,o),po()),y=r.memoizedState,b=n.memoizedState,y.parent!==d?(y={parent:d,cache:d},n.memoizedState=y,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=y),Ya(n,Ie,d)):(d=b.cache,Ya(n,Ie,d),d!==y.cache&&bf(n,[Ie],o,!0))),ai(r,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function ha(r){r.flags|=4}function sp(r,n,o,d,y){if((n=(r.mode&32)!==0)&&(n=!1),n){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(Fb())r.flags|=8192;else throw zn=ch,Sf}else r.flags&=-16777217}function ob(r,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!S1(n))if(Fb())r.flags|=8192;else throw zn=ch,Sf}function _h(r,n){n!==null&&(r.flags|=4),r.flags&16384&&(n=r.tag!==22?Hc():536870912,r.lanes|=n,Ps|=n)}function vo(r,n){if(!te)switch(r.tailMode){case"hidden":n=r.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?n||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Te(r){var n=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(n)for(var y=r.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=d,r.childLanes=o,n}function iL(r,n,o){var d=n.pendingProps;switch(pf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Te(n),null;case 1:return Te(n),null;case 3:return o=n.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),n.memoizedState.cache!==d&&(n.flags|=2048),sa(Ie),Ut(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Ms(n)?ha(n):r===null||r.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,mf())),Te(n),null;case 26:var y=n.type,b=n.memoizedState;return r===null?(ha(n),b!==null?(Te(n),ob(n,b)):(Te(n),sp(n,y,null,d,o))):b?b!==r.memoizedState?(ha(n),Te(n),ob(n,b)):(Te(n),n.flags&=-16777217):(r=r.memoizedProps,r!==d&&ha(n),Te(n),sp(n,y,r,d,o)),null;case 27:if(ct(n),o=xt.current,y=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==d&&ha(n);else{if(!d){if(n.stateNode===null)throw Error(a(166));return Te(n),null}r=dt.current,Ms(n)?H0(n):(r=g1(y,d,o),n.stateNode=r,ha(n))}return Te(n),null;case 5:if(ct(n),y=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==d&&ha(n);else{if(!d){if(n.stateNode===null)throw Error(a(166));return Te(n),null}if(b=dt.current,Ms(n))H0(n);else{var w=Hh(xt.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?w.createElement(y,{is:d.is}):w.createElement(y)}}b[qe]=n,b[ei]=d;t:for(w=n.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===n)break t;for(;w.sibling===null;){if(w.return===null||w.return===n)break t;w=w.return}w.sibling.return=w.return,w=w.sibling}n.stateNode=b;t:switch(ni(b,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break t;case"img":d=!0;break t;default:d=!1}d&&ha(n)}}return Te(n),sp(n,n.type,r===null?null:r.memoizedProps,n.pendingProps,o),null;case 6:if(r&&n.stateNode!=null)r.memoizedProps!==d&&ha(n);else{if(typeof d!="string"&&n.stateNode===null)throw Error(a(166));if(r=xt.current,Ms(n)){if(r=n.stateNode,o=n.memoizedProps,d=null,y=ii,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}r[qe]=n,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||a1(r.nodeValue,o)),r||Wa(n,!0)}else r=Hh(r).createTextNode(d),r[qe]=n,n.stateNode=r}return Te(n),null;case 31:if(o=n.memoizedState,r===null||r.memoizedState!==null){if(d=Ms(n),o!==null){if(r===null){if(!d)throw Error(a(318));if(r=n.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[qe]=n}else Rn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Te(n),r=!1}else o=mf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return n.flags&256?(Pi(n),n):(Pi(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Te(n),null;case 13:if(d=n.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=Ms(n),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(a(318));if(y=n.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(a(317));y[qe]=n}else Rn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Te(n),y=!1}else y=mf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return n.flags&256?(Pi(n),n):(Pi(n),null)}return Pi(n),(n.flags&128)!==0?(n.lanes=o,n):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=n.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==y&&(d.flags|=2048)),o!==r&&o&&(n.child.flags|=8192),_h(n,n.updateQueue),Te(n),null);case 4:return Ut(),r===null&&Ep(n.stateNode.containerInfo),Te(n),null;case 10:return sa(n.type),Te(n),null;case 19:if(it($e),d=n.memoizedState,d===null)return Te(n),null;if(y=(n.flags&128)!==0,b=d.rendering,b===null)if(y)vo(d,!1);else{if(Re!==0||r!==null&&(r.flags&128)!==0)for(r=n.child;r!==null;){if(b=fh(r),b!==null){for(n.flags|=128,vo(d,!1),r=b.updateQueue,n.updateQueue=r,_h(n,r),n.subtreeFlags=0,r=o,o=n.child;o!==null;)$0(o,r),o=o.sibling;return ut($e,$e.current&1|2),te&&aa(n,d.treeForkCount),n.child}r=r.sibling}d.tail!==null&&ci()>Mh&&(n.flags|=128,y=!0,vo(d,!1),n.lanes=4194304)}else{if(!y)if(r=fh(b),r!==null){if(n.flags|=128,y=!0,r=r.updateQueue,n.updateQueue=r,_h(n,r),vo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!te)return Te(n),null}else 2*ci()-d.renderingStartTime>Mh&&o!==536870912&&(n.flags|=128,y=!0,vo(d,!1),n.lanes=4194304);d.isBackwards?(b.sibling=n.child,n.child=b):(r=d.last,r!==null?r.sibling=b:n.child=b,d.last=b)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=ci(),r.sibling=null,o=$e.current,ut($e,y?o&1|2:o&1),te&&aa(n,d.treeForkCount),r):(Te(n),null);case 22:case 23:return Pi(n),Lf(),d=n.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(n.flags|=8192):d&&(n.flags|=8192),d?(o&536870912)!==0&&(n.flags&128)===0&&(Te(n),n.subtreeFlags&6&&(n.flags|=8192)):Te(n),o=n.updateQueue,o!==null&&_h(n,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==o&&(n.flags|=2048),r!==null&&it(Dn),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),sa(Ie),Te(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function rL(r,n){switch(pf(n),n.tag){case 1:return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 3:return sa(Ie),Ut(),r=n.flags,(r&65536)!==0&&(r&128)===0?(n.flags=r&-65537|128,n):null;case 26:case 27:case 5:return ct(n),null;case 31:if(n.memoizedState!==null){if(Pi(n),n.alternate===null)throw Error(a(340));Rn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 13:if(Pi(n),r=n.memoizedState,r!==null&&r.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Rn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 19:return it($e),null;case 4:return Ut(),null;case 10:return sa(n.type),null;case 22:case 23:return Pi(n),Lf(),r!==null&&it(Dn),r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 24:return sa(Ie),null;case 25:return null;default:return null}}function cb(r,n){switch(pf(n),n.tag){case 3:sa(Ie),Ut();break;case 26:case 27:case 5:ct(n);break;case 4:Ut();break;case 31:n.memoizedState!==null&&Pi(n);break;case 13:Pi(n);break;case 19:it($e);break;case 10:sa(n.type);break;case 22:case 23:Pi(n),Lf(),r!==null&&it(Dn);break;case 24:sa(Ie)}}function ko(r,n){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&r)===r){d=void 0;var b=o.create,w=o.inst;d=b(),w.destroy=d}o=o.next}while(o!==y)}}catch(A){ge(n,n.return,A)}}function Ka(r,n,o){try{var d=n.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var b=y.next;d=b;do{if((d.tag&r)===r){var w=d.inst,A=w.destroy;if(A!==void 0){w.destroy=void 0,y=n;var G=o,at=A;try{at()}catch(ht){ge(y,G,ht)}}}d=d.next}while(d!==b)}}catch(ht){ge(n,n.return,ht)}}function hb(r){var n=r.updateQueue;if(n!==null){var o=r.stateNode;try{tx(n,o)}catch(d){ge(r,r.return,d)}}}function ub(r,n,o){o.props=In(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){ge(r,n,d)}}function So(r,n){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(y){ge(r,n,y)}}function qr(r,n){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(y){ge(r,n,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(y){ge(r,n,y)}else o.current=null}function db(r){var n=r.type,o=r.memoizedProps,d=r.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break t;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(y){ge(r,r.return,y)}}function lp(r,n,o){try{var d=r.stateNode;wL(d,r.type,o,n),d[ei]=n}catch(y){ge(r,r.return,y)}}function fb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&sn(r.type)||r.tag===4}function op(r){t:for(;;){for(;r.sibling===null;){if(r.return===null||fb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&sn(r.type)||r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function cp(r,n,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(r),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=ea));else if(d!==4&&(d===27&&sn(r.type)&&(o=r.stateNode,n=null),r=r.child,r!==null))for(cp(r,n,o),r=r.sibling;r!==null;)cp(r,n,o),r=r.sibling}function Bh(r,n,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,n?o.insertBefore(r,n):o.appendChild(r);else if(d!==4&&(d===27&&sn(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(Bh(r,n,o),r=r.sibling;r!==null;)Bh(r,n,o),r=r.sibling}function pb(r){var n=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,y=n.attributes;y.length;)n.removeAttributeNode(y[0]);ni(n,d,o),n[qe]=r,n[ei]=o}catch(b){ge(r,r.return,b)}}var ua=!1,Ue=!1,hp=!1,gb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function aL(r,n){if(r=r.containerInfo,Mp=Xh,r=B0(r),rf(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else t:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var y=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break t}var w=0,A=-1,G=-1,at=0,ht=0,gt=r,nt=null;e:for(;;){for(var ot;gt!==o||y!==0&&gt.nodeType!==3||(A=w+y),gt!==b||d!==0&&gt.nodeType!==3||(G=w+d),gt.nodeType===3&&(w+=gt.nodeValue.length),(ot=gt.firstChild)!==null;)nt=gt,gt=ot;for(;;){if(gt===r)break e;if(nt===o&&++at===y&&(A=w),nt===b&&++ht===d&&(G=w),(ot=gt.nextSibling)!==null)break;gt=nt,nt=gt.parentNode}gt=ot}o=A===-1||G===-1?null:{start:A,end:G}}else o=null}o=o||{start:0,end:0}}else o=null;for(Rp={focusedElem:r,selectionRange:o},Xh=!1,Qe=n;Qe!==null;)if(n=Qe,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,Qe=r;else for(;Qe!==null;){switch(n=Qe,b=n.alternate,r=n.flags,n.tag){case 0:if((r&4)!==0&&(r=n.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)y=r[o],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,o=n,y=b.memoizedProps,b=b.memoizedState,d=o.stateNode;try{var kt=In(o.type,y);r=d.getSnapshotBeforeUpdate(kt,b),d.__reactInternalSnapshotBeforeUpdate=r}catch($t){ge(o,o.return,$t)}}break;case 3:if((r&1024)!==0){if(r=n.stateNode.containerInfo,o=r.nodeType,o===9)Dp(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Dp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=n.sibling,r!==null){r.return=n.return,Qe=r;break}Qe=n.return}}function mb(r,n,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:fa(r,o),d&4&&ko(5,o);break;case 1:if(fa(r,o),d&4)if(r=o.stateNode,n===null)try{r.componentDidMount()}catch(w){ge(o,o.return,w)}else{var y=In(o.type,n.memoizedProps);n=n.memoizedState;try{r.componentDidUpdate(y,n,r.__reactInternalSnapshotBeforeUpdate)}catch(w){ge(o,o.return,w)}}d&64&&hb(o),d&512&&So(o,o.return);break;case 3:if(fa(r,o),d&64&&(r=o.updateQueue,r!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{tx(r,n)}catch(w){ge(o,o.return,w)}}break;case 27:n===null&&d&4&&pb(o);case 26:case 5:fa(r,o),n===null&&d&4&&db(o),d&512&&So(o,o.return);break;case 12:fa(r,o);break;case 31:fa(r,o),d&4&&bb(r,o);break;case 13:fa(r,o),d&4&&Cb(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=fL.bind(null,o),OL(r,o))));break;case 22:if(d=o.memoizedState!==null||ua,!d){n=n!==null&&n.memoizedState!==null||Ue,y=ua;var b=Ue;ua=d,(Ue=n)&&!b?pa(r,o,(o.subtreeFlags&8772)!==0):fa(r,o),ua=y,Ue=b}break;case 30:break;default:fa(r,o)}}function yb(r){var n=r.alternate;n!==null&&(r.alternate=null,yb(n)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(n=r.stateNode,n!==null&&bs(n)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var we=null,Li=!1;function da(r,n,o){for(o=o.child;o!==null;)xb(r,n,o),o=o.sibling}function xb(r,n,o){if(ti&&typeof ti.onCommitFiberUnmount=="function")try{ti.onCommitFiberUnmount(Ra,o)}catch{}switch(o.tag){case 26:Ue||qr(o,n),da(r,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ue||qr(o,n);var d=we,y=Li;sn(o.type)&&(we=o.stateNode,Li=!1),da(r,n,o),Ro(o.stateNode),we=d,Li=y;break;case 5:Ue||qr(o,n);case 6:if(d=we,y=Li,we=null,da(r,n,o),we=d,Li=y,we!==null)if(Li)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(o.stateNode)}catch(b){ge(o,n,b)}else try{we.removeChild(o.stateNode)}catch(b){ge(o,n,b)}break;case 18:we!==null&&(Li?(r=we,h1(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Ks(r)):h1(we,o.stateNode));break;case 4:d=we,y=Li,we=o.stateNode.containerInfo,Li=!0,da(r,n,o),we=d,Li=y;break;case 0:case 11:case 14:case 15:Ka(2,o,n),Ue||Ka(4,o,n),da(r,n,o);break;case 1:Ue||(qr(o,n),d=o.stateNode,typeof d.componentWillUnmount=="function"&&ub(o,n,d)),da(r,n,o);break;case 21:da(r,n,o);break;case 22:Ue=(d=Ue)||o.memoizedState!==null,da(r,n,o),Ue=d;break;default:da(r,n,o)}}function bb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Ks(r)}catch(o){ge(n,n.return,o)}}}function Cb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Ks(r)}catch(o){ge(n,n.return,o)}}function nL(r){switch(r.tag){case 31:case 13:case 19:var n=r.stateNode;return n===null&&(n=r.stateNode=new gb),n;case 22:return r=r.stateNode,n=r._retryCache,n===null&&(n=r._retryCache=new gb),n;default:throw Error(a(435,r.tag))}}function Eh(r,n){var o=nL(r);n.forEach(function(d){if(!o.has(d)){o.add(d);var y=pL.bind(null,r,d);d.then(y,y)}})}function Ai(r,n){var o=n.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=o[d],b=r,w=n,A=w;t:for(;A!==null;){switch(A.tag){case 27:if(sn(A.type)){we=A.stateNode,Li=!1;break t}break;case 5:we=A.stateNode,Li=!1;break t;case 3:case 4:we=A.stateNode.containerInfo,Li=!0;break t}A=A.return}if(we===null)throw Error(a(160));xb(b,w,y),we=null,Li=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)vb(n,r),n=n.sibling}var xr=null;function vb(r,n){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Ai(n,r),Mi(r),d&4&&(Ka(3,r,r.return),ko(3,r),Ka(5,r,r.return));break;case 1:Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),d&64&&ua&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var y=xr;if(Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),d&4){var b=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){t:{d=r.type,o=r.memoizedProps,y=y.ownerDocument||y;e:switch(d){case"title":b=y.getElementsByTagName("title")[0],(!b||b[qa]||b[qe]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(d),y.head.insertBefore(b,y.querySelector("head > title"))),ni(b,d,o),b[qe]=r,Ee(b),d=b;break t;case"link":var w=v1("link","href",y).get(d+(o.href||""));if(w){for(var A=0;A<w.length;A++)if(b=w[A],b.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&b.getAttribute("rel")===(o.rel==null?null:o.rel)&&b.getAttribute("title")===(o.title==null?null:o.title)&&b.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(A,1);break e}}b=y.createElement(d),ni(b,d,o),y.head.appendChild(b);break;case"meta":if(w=v1("meta","content",y).get(d+(o.content||""))){for(A=0;A<w.length;A++)if(b=w[A],b.getAttribute("content")===(o.content==null?null:""+o.content)&&b.getAttribute("name")===(o.name==null?null:o.name)&&b.getAttribute("property")===(o.property==null?null:o.property)&&b.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&b.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(A,1);break e}}b=y.createElement(d),ni(b,d,o),y.head.appendChild(b);break;default:throw Error(a(468,d))}b[qe]=r,Ee(b),d=b}r.stateNode=d}else k1(y,r.type,r.stateNode);else r.stateNode=C1(y,d,r.memoizedProps);else b!==d?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,d===null?k1(y,r.type,r.stateNode):C1(y,d,r.memoizedProps)):d===null&&r.stateNode!==null&&lp(r,r.memoizedProps,o.memoizedProps)}break;case 27:Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),o!==null&&d&4&&lp(r,r.memoizedProps,o.memoizedProps);break;case 5:if(Ai(n,r),Mi(r),d&512&&(Ue||o===null||qr(o,o.return)),r.flags&32){y=r.stateNode;try{vs(y,"")}catch(kt){ge(r,r.return,kt)}}d&4&&r.stateNode!=null&&(y=r.memoizedProps,lp(r,y,o!==null?o.memoizedProps:y)),d&1024&&(hp=!0);break;case 6:if(Ai(n,r),Mi(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch(kt){ge(r,r.return,kt)}}break;case 3:if(Ph=null,y=xr,xr=jh(n.containerInfo),Ai(n,r),xr=y,Mi(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Ks(n.containerInfo)}catch(kt){ge(r,r.return,kt)}hp&&(hp=!1,kb(r));break;case 4:d=xr,xr=jh(r.stateNode.containerInfo),Ai(n,r),Mi(r),xr=d;break;case 12:Ai(n,r),Mi(r);break;case 31:Ai(n,r),Mi(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Eh(r,d)));break;case 13:Ai(n,r),Mi(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ah=ci()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Eh(r,d)));break;case 22:y=r.memoizedState!==null;var G=o!==null&&o.memoizedState!==null,at=ua,ht=Ue;if(ua=at||y,Ue=ht||G,Ai(n,r),Ue=ht,ua=at,Mi(r),d&8192)t:for(n=r.stateNode,n._visibility=y?n._visibility&-2:n._visibility|1,y&&(o===null||G||ua||Ue||Hn(r)),o=null,n=r;;){if(n.tag===5||n.tag===26){if(o===null){G=o=n;try{if(b=G.stateNode,y)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{A=G.stateNode;var gt=G.memoizedProps.style,nt=gt!=null&&gt.hasOwnProperty("display")?gt.display:null;A.style.display=nt==null||typeof nt=="boolean"?"":(""+nt).trim()}}catch(kt){ge(G,G.return,kt)}}}else if(n.tag===6){if(o===null){G=n;try{G.stateNode.nodeValue=y?"":G.memoizedProps}catch(kt){ge(G,G.return,kt)}}}else if(n.tag===18){if(o===null){G=n;try{var ot=G.stateNode;y?u1(ot,!0):u1(G.stateNode,!1)}catch(kt){ge(G,G.return,kt)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===r)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break t;for(;n.sibling===null;){if(n.return===null||n.return===r)break t;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,Eh(r,o))));break;case 19:Ai(n,r),Mi(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Eh(r,d)));break;case 30:break;case 21:break;default:Ai(n,r),Mi(r)}}function Mi(r){var n=r.flags;if(n&2){try{for(var o,d=r.return;d!==null;){if(fb(d)){o=d;break}d=d.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var y=o.stateNode,b=op(r);Bh(r,b,y);break;case 5:var w=o.stateNode;o.flags&32&&(vs(w,""),o.flags&=-33);var A=op(r);Bh(r,A,w);break;case 3:case 4:var G=o.stateNode.containerInfo,at=op(r);cp(r,at,G);break;default:throw Error(a(161))}}catch(ht){ge(r,r.return,ht)}r.flags&=-3}n&4096&&(r.flags&=-4097)}function kb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var n=r;kb(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),r=r.sibling}}function fa(r,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)mb(r,n.alternate,n),n=n.sibling}function Hn(r){for(r=r.child;r!==null;){var n=r;switch(n.tag){case 0:case 11:case 14:case 15:Ka(4,n,n.return),Hn(n);break;case 1:qr(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&ub(n,n.return,o),Hn(n);break;case 27:Ro(n.stateNode);case 26:case 5:qr(n,n.return),Hn(n);break;case 22:n.memoizedState===null&&Hn(n);break;case 30:Hn(n);break;default:Hn(n)}r=r.sibling}}function pa(r,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var d=n.alternate,y=r,b=n,w=b.flags;switch(b.tag){case 0:case 11:case 15:pa(y,b,o),ko(4,b);break;case 1:if(pa(y,b,o),d=b,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(at){ge(d,d.return,at)}if(d=b,y=d.updateQueue,y!==null){var A=d.stateNode;try{var G=y.shared.hiddenCallbacks;if(G!==null)for(y.shared.hiddenCallbacks=null,y=0;y<G.length;y++)J0(G[y],A)}catch(at){ge(d,d.return,at)}}o&&w&64&&hb(b),So(b,b.return);break;case 27:pb(b);case 26:case 5:pa(y,b,o),o&&d===null&&w&4&&db(b),So(b,b.return);break;case 12:pa(y,b,o);break;case 31:pa(y,b,o),o&&w&4&&bb(y,b);break;case 13:pa(y,b,o),o&&w&4&&Cb(y,b);break;case 22:b.memoizedState===null&&pa(y,b,o),So(b,b.return);break;case 30:break;default:pa(y,b,o)}n=n.sibling}}function up(r,n){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&oo(o))}function dp(r,n){r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&oo(r))}function br(r,n,o,d){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Sb(r,n,o,d),n=n.sibling}function Sb(r,n,o,d){var y=n.flags;switch(n.tag){case 0:case 11:case 15:br(r,n,o,d),y&2048&&ko(9,n);break;case 1:br(r,n,o,d);break;case 3:br(r,n,o,d),y&2048&&(r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&oo(r)));break;case 12:if(y&2048){br(r,n,o,d),r=n.stateNode;try{var b=n.memoizedProps,w=b.id,A=b.onPostCommit;typeof A=="function"&&A(w,n.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(G){ge(n,n.return,G)}}else br(r,n,o,d);break;case 31:br(r,n,o,d);break;case 13:br(r,n,o,d);break;case 23:break;case 22:b=n.stateNode,w=n.alternate,n.memoizedState!==null?b._visibility&2?br(r,n,o,d):To(r,n):b._visibility&2?br(r,n,o,d):(b._visibility|=2,Hs(r,n,o,d,(n.subtreeFlags&10256)!==0||!1)),y&2048&&up(w,n);break;case 24:br(r,n,o,d),y&2048&&dp(n.alternate,n);break;default:br(r,n,o,d)}}function Hs(r,n,o,d,y){for(y=y&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var b=r,w=n,A=o,G=d,at=w.flags;switch(w.tag){case 0:case 11:case 15:Hs(b,w,A,G,y),ko(8,w);break;case 23:break;case 22:var ht=w.stateNode;w.memoizedState!==null?ht._visibility&2?Hs(b,w,A,G,y):To(b,w):(ht._visibility|=2,Hs(b,w,A,G,y)),y&&at&2048&&up(w.alternate,w);break;case 24:Hs(b,w,A,G,y),y&&at&2048&&dp(w.alternate,w);break;default:Hs(b,w,A,G,y)}n=n.sibling}}function To(r,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=r,d=n,y=d.flags;switch(d.tag){case 22:To(o,d),y&2048&&up(d.alternate,d);break;case 24:To(o,d),y&2048&&dp(d.alternate,d);break;default:To(o,d)}n=n.sibling}}var wo=8192;function js(r,n,o){if(r.subtreeFlags&wo)for(r=r.child;r!==null;)Tb(r,n,o),r=r.sibling}function Tb(r,n,o){switch(r.tag){case 26:js(r,n,o),r.flags&wo&&r.memoizedState!==null&&WL(o,xr,r.memoizedState,r.memoizedProps);break;case 5:js(r,n,o);break;case 3:case 4:var d=xr;xr=jh(r.stateNode.containerInfo),js(r,n,o),xr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=wo,wo=16777216,js(r,n,o),wo=d):js(r,n,o));break;default:js(r,n,o)}}function wb(r){var n=r.alternate;if(n!==null&&(r=n.child,r!==null)){n.child=null;do n=r.sibling,r.sibling=null,r=n;while(r!==null)}}function _o(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var d=n[o];Qe=d,Bb(d,r)}wb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)_b(r),r=r.sibling}function _b(r){switch(r.tag){case 0:case 11:case 15:_o(r),r.flags&2048&&Ka(9,r,r.return);break;case 3:_o(r);break;case 12:_o(r);break;case 22:var n=r.stateNode;r.memoizedState!==null&&n._visibility&2&&(r.return===null||r.return.tag!==13)?(n._visibility&=-3,Lh(r)):_o(r);break;default:_o(r)}}function Lh(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var d=n[o];Qe=d,Bb(d,r)}wb(r)}for(r=r.child;r!==null;){switch(n=r,n.tag){case 0:case 11:case 15:Ka(8,n,n.return),Lh(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Lh(n));break;default:Lh(n)}r=r.sibling}}function Bb(r,n){for(;Qe!==null;){var o=Qe;switch(o.tag){case 0:case 11:case 15:Ka(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:oo(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,Qe=d;else t:for(o=r;Qe!==null;){d=Qe;var y=d.sibling,b=d.return;if(yb(d),d===o){Qe=null;break t}if(y!==null){y.return=b,Qe=y;break t}Qe=b}}}var sL={getCacheForType:function(r){var n=ri(Ie),o=n.data.get(r);return o===void 0&&(o=r(),n.data.set(r,o)),o},cacheSignal:function(){return ri(Ie).controller.signal}},lL=typeof WeakMap=="function"?WeakMap:Map,ue=0,Ce=null,Vt=null,Qt=0,pe=0,Wi=null,Ja=!1,Us=!1,fp=!1,ga=0,Re=0,tn=0,jn=0,pp=0,Yi=0,Ps=0,Bo=null,Ri=null,gp=!1,Ah=0,Eb=0,Mh=1/0,Rh=null,en=null,Ye=0,rn=null,Ws=null,ma=0,mp=0,yp=null,Lb=null,Eo=0,xp=null;function Gi(){return(ue&2)!==0&&Qt!==0?Qt&-Qt:M.T!==null?Tp():Uc()}function Ab(){if(Yi===0)if((Qt&536870912)===0||te){var r=Da;Da<<=1,(Da&3932160)===0&&(Da=262144),Yi=r}else Yi=536870912;return r=Ui.current,r!==null&&(r.flags|=32),Yi}function Oi(r,n,o){(r===Ce&&(pe===2||pe===9)||r.cancelPendingCommit!==null)&&(Ys(r,0),an(r,Qt,Yi,!1)),ve(r,o),((ue&2)===0||r!==Ce)&&(r===Ce&&((ue&2)===0&&(jn|=o),Re===4&&an(r,Qt,Yi,!1)),Ir(r))}function Mb(r,n,o){if((ue&6)!==0)throw Error(a(327));var d=!o&&(n&127)===0&&(n&r.expiredLanes)===0||wn(r,n),y=d?hL(r,n):Cp(r,n,!0),b=d;do{if(y===0){Us&&!d&&an(r,n,0,!1);break}else{if(o=r.current.alternate,b&&!oL(o)){y=Cp(r,n,!1),b=!1;continue}if(y===2){if(b=n,r.errorRecoveryDisabledLanes&b)var w=0;else w=r.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){n=w;t:{var A=r;y=Bo;var G=A.current.memoizedState.isDehydrated;if(G&&(Ys(A,w).flags|=256),w=Cp(A,w,!1),w!==2){if(fp&&!G){A.errorRecoveryDisabledLanes|=b,jn|=b,y=4;break t}b=Ri,Ri=y,b!==null&&(Ri===null?Ri=b:Ri.push.apply(Ri,b))}y=w}if(b=!1,y!==2)continue}}if(y===1){Ys(r,0),an(r,n,0,!0);break}t:{switch(d=r,b=y,b){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:an(d,n,Yi,!Ja);break t;case 2:Ri=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(y=Ah+300-ci(),10<y)){if(an(d,n,Yi,!Ja),$a(d,0,!0)!==0)break t;ma=n,d.timeoutHandle=o1(Rb.bind(null,d,o,Ri,Rh,gp,n,Yi,jn,Ps,Ja,b,"Throttled",-0,0),y);break t}Rb(d,o,Ri,Rh,gp,n,Yi,jn,Ps,Ja,b,null,-0,0)}}break}while(!0);Ir(r)}function Rb(r,n,o,d,y,b,w,A,G,at,ht,gt,nt,ot){if(r.timeoutHandle=-1,gt=n.subtreeFlags,gt&8192||(gt&16785408)===16785408){gt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},Tb(n,b,gt);var kt=(b&62914560)===b?Ah-ci():(b&4194048)===b?Eb-ci():0;if(kt=YL(gt,kt),kt!==null){ma=b,r.cancelPendingCommit=kt(Ib.bind(null,r,n,b,o,d,y,w,A,G,ht,gt,null,nt,ot)),an(r,b,w,!at);return}}Ib(r,n,b,o,d,y,w,A,G)}function oL(r){for(var n=r;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],b=y.getSnapshot;y=y.value;try{if(!Hi(b(),y))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===r)break;for(;n.sibling===null;){if(n.return===null||n.return===r)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function an(r,n,o,d){n&=~pp,n&=~jn,r.suspendedLanes|=n,r.pingedLanes&=~n,d&&(r.warmLanes|=n),d=r.expirationTimes;for(var y=n;0<y;){var b=31-Ze(y),w=1<<b;d[b]=-1,y&=~w}o!==0&&jc(r,o,n)}function Oh(){return(ue&6)===0?(Lo(0),!1):!0}function bp(){if(Vt!==null){if(pe===0)var r=Vt.return;else r=Vt,na=On=null,Df(r),$s=null,ho=0,r=Vt;for(;r!==null;)cb(r.alternate,r),r=r.return;Vt=null}}function Ys(r,n){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,EL(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),ma=0,bp(),Ce=r,Vt=o=ra(r.current,null),Qt=n,pe=0,Wi=null,Ja=!1,Us=wn(r,n),fp=!1,Ps=Yi=pp=jn=tn=Re=0,Ri=Bo=null,gp=!1,(n&8)!==0&&(n|=n&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=n;0<d;){var y=31-Ze(d),b=1<<y;n|=r[y],d&=~b}return ga=n,th(),o}function Ob(r,n){Pt=null,M.H=bo,n===Ds||n===oh?(n=V0(),pe=3):n===Sf?(n=V0(),pe=4):pe=n===Qf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Wi=n,Vt===null&&(Re=1,kh(r,rr(n,r.current)))}function Fb(){var r=Ui.current;return r===null?!0:(Qt&4194048)===Qt?lr===null:(Qt&62914560)===Qt||(Qt&536870912)!==0?r===lr:!1}function Db(){var r=M.H;return M.H=bo,r===null?bo:r}function $b(){var r=M.A;return M.A=sL,r}function Fh(){Re=4,Ja||(Qt&4194048)!==Qt&&Ui.current!==null||(Us=!0),(tn&134217727)===0&&(jn&134217727)===0||Ce===null||an(Ce,Qt,Yi,!1)}function Cp(r,n,o){var d=ue;ue|=2;var y=Db(),b=$b();(Ce!==r||Qt!==n)&&(Rh=null,Ys(r,n)),n=!1;var w=Re;t:do try{if(pe!==0&&Vt!==null){var A=Vt,G=Wi;switch(pe){case 8:bp(),w=6;break t;case 3:case 2:case 9:case 6:Ui.current===null&&(n=!0);var at=pe;if(pe=0,Wi=null,Gs(r,A,G,at),o&&Us){w=0;break t}break;default:at=pe,pe=0,Wi=null,Gs(r,A,G,at)}}cL(),w=Re;break}catch(ht){Ob(r,ht)}while(!0);return n&&r.shellSuspendCounter++,na=On=null,ue=d,M.H=y,M.A=b,Vt===null&&(Ce=null,Qt=0,th()),w}function cL(){for(;Vt!==null;)zb(Vt)}function hL(r,n){var o=ue;ue|=2;var d=Db(),y=$b();Ce!==r||Qt!==n?(Rh=null,Mh=ci()+500,Ys(r,n)):Us=wn(r,n);t:do try{if(pe!==0&&Vt!==null){n=Vt;var b=Wi;e:switch(pe){case 1:pe=0,Wi=null,Gs(r,n,b,1);break;case 2:case 9:if(G0(b)){pe=0,Wi=null,Nb(n);break}n=function(){pe!==2&&pe!==9||Ce!==r||(pe=7),Ir(r)},b.then(n,n);break t;case 3:pe=7;break t;case 4:pe=5;break t;case 7:G0(b)?(pe=0,Wi=null,Nb(n)):(pe=0,Wi=null,Gs(r,n,b,7));break;case 5:var w=null;switch(Vt.tag){case 26:w=Vt.memoizedState;case 5:case 27:var A=Vt;if(w?S1(w):A.stateNode.complete){pe=0,Wi=null;var G=A.sibling;if(G!==null)Vt=G;else{var at=A.return;at!==null?(Vt=at,Dh(at)):Vt=null}break e}}pe=0,Wi=null,Gs(r,n,b,5);break;case 6:pe=0,Wi=null,Gs(r,n,b,6);break;case 8:bp(),Re=6;break t;default:throw Error(a(462))}}uL();break}catch(ht){Ob(r,ht)}while(!0);return na=On=null,M.H=d,M.A=y,ue=o,Vt!==null?0:(Ce=null,Qt=0,th(),Re)}function uL(){for(;Vt!==null&&!pr();)zb(Vt)}function zb(r){var n=lb(r.alternate,r,ga);r.memoizedProps=r.pendingProps,n===null?Dh(r):Vt=n}function Nb(r){var n=r,o=n.alternate;switch(n.tag){case 15:case 0:n=eb(o,n,n.pendingProps,n.type,void 0,Qt);break;case 11:n=eb(o,n,n.pendingProps,n.type.render,n.ref,Qt);break;case 5:Df(n);default:cb(o,n),n=Vt=$0(n,ga),n=lb(o,n,ga)}r.memoizedProps=r.pendingProps,n===null?Dh(r):Vt=n}function Gs(r,n,o,d){na=On=null,Df(n),$s=null,ho=0;var y=n.return;try{if(JE(r,y,n,o,Qt)){Re=1,kh(r,rr(o,r.current)),Vt=null;return}}catch(b){if(y!==null)throw Vt=y,b;Re=1,kh(r,rr(o,r.current)),Vt=null;return}n.flags&32768?(te||d===1?r=!0:Us||(Qt&536870912)!==0?r=!1:(Ja=r=!0,(d===2||d===9||d===3||d===6)&&(d=Ui.current,d!==null&&d.tag===13&&(d.flags|=16384))),qb(n,r)):Dh(n)}function Dh(r){var n=r;do{if((n.flags&32768)!==0){qb(n,Ja);return}r=n.return;var o=iL(n.alternate,n,ga);if(o!==null){Vt=o;return}if(n=n.sibling,n!==null){Vt=n;return}Vt=n=r}while(n!==null);Re===0&&(Re=5)}function qb(r,n){do{var o=rL(r.alternate,r);if(o!==null){o.flags&=32767,Vt=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(r=r.sibling,r!==null)){Vt=r;return}Vt=r=o}while(r!==null);Re=6,Vt=null}function Ib(r,n,o,d,y,b,w,A,G){r.cancelPendingCommit=null;do $h();while(Ye!==0);if((ue&6)!==0)throw Error(a(327));if(n!==null){if(n===r.current)throw Error(a(177));if(b=n.lanes|n.childLanes,b|=of,za(r,o,b,w,A,G),r===Ce&&(Vt=Ce=null,Qt=0),Ws=n,rn=r,ma=o,mp=b,yp=y,Lb=d,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,gL(Dr,function(){return Wb(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||d){d=M.T,M.T=null,y=I.p,I.p=2,w=ue,ue|=4;try{aL(r,n,o)}finally{ue=w,I.p=y,M.T=d}}Ye=1,Hb(),jb(),Ub()}}function Hb(){if(Ye===1){Ye=0;var r=rn,n=Ws,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var d=I.p;I.p=2;var y=ue;ue|=4;try{vb(n,r);var b=Rp,w=B0(r.containerInfo),A=b.focusedElem,G=b.selectionRange;if(w!==A&&A&&A.ownerDocument&&_0(A.ownerDocument.documentElement,A)){if(G!==null&&rf(A)){var at=G.start,ht=G.end;if(ht===void 0&&(ht=at),"selectionStart"in A)A.selectionStart=at,A.selectionEnd=Math.min(ht,A.value.length);else{var gt=A.ownerDocument||document,nt=gt&&gt.defaultView||window;if(nt.getSelection){var ot=nt.getSelection(),kt=A.textContent.length,$t=Math.min(G.start,kt),be=G.end===void 0?$t:Math.min(G.end,kt);!ot.extend&&$t>be&&(w=be,be=$t,$t=w);var J=w0(A,$t),V=w0(A,be);if(J&&V&&(ot.rangeCount!==1||ot.anchorNode!==J.node||ot.anchorOffset!==J.offset||ot.focusNode!==V.node||ot.focusOffset!==V.offset)){var rt=gt.createRange();rt.setStart(J.node,J.offset),ot.removeAllRanges(),$t>be?(ot.addRange(rt),ot.extend(V.node,V.offset)):(rt.setEnd(V.node,V.offset),ot.addRange(rt))}}}}for(gt=[],ot=A;ot=ot.parentNode;)ot.nodeType===1&&gt.push({element:ot,left:ot.scrollLeft,top:ot.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<gt.length;A++){var pt=gt[A];pt.element.scrollLeft=pt.left,pt.element.scrollTop=pt.top}}Xh=!!Mp,Rp=Mp=null}finally{ue=y,I.p=d,M.T=o}}r.current=n,Ye=2}}function jb(){if(Ye===2){Ye=0;var r=rn,n=Ws,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var d=I.p;I.p=2;var y=ue;ue|=4;try{mb(r,n.alternate,n)}finally{ue=y,I.p=d,M.T=o}}Ye=3}}function Ub(){if(Ye===4||Ye===3){Ye=0,us();var r=rn,n=Ws,o=ma,d=Lb;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ye=5:(Ye=0,Ws=rn=null,Pb(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(en=null),ys(o),n=n.stateNode,ti&&typeof ti.onCommitFiberRoot=="function")try{ti.onCommitFiberRoot(Ra,n,void 0,(n.current.flags&128)===128)}catch{}if(d!==null){n=M.T,y=I.p,I.p=2,M.T=null;try{for(var b=r.onRecoverableError,w=0;w<d.length;w++){var A=d[w];b(A.value,{componentStack:A.stack})}}finally{M.T=n,I.p=y}}(ma&3)!==0&&$h(),Ir(r),y=r.pendingLanes,(o&261930)!==0&&(y&42)!==0?r===xp?Eo++:(Eo=0,xp=r):Eo=0,Lo(0)}}function Pb(r,n){(r.pooledCacheLanes&=n)===0&&(n=r.pooledCache,n!=null&&(r.pooledCache=null,oo(n)))}function $h(){return Hb(),jb(),Ub(),Wb()}function Wb(){if(Ye!==5)return!1;var r=rn,n=mp;mp=0;var o=ys(ma),d=M.T,y=I.p;try{I.p=32>o?32:o,M.T=null,o=yp,yp=null;var b=rn,w=ma;if(Ye=0,Ws=rn=null,ma=0,(ue&6)!==0)throw Error(a(331));var A=ue;if(ue|=4,_b(b.current),Sb(b,b.current,w,o),ue=A,Lo(0,!1),ti&&typeof ti.onPostCommitFiberRoot=="function")try{ti.onPostCommitFiberRoot(Ra,b)}catch{}return!0}finally{I.p=y,M.T=d,Pb(r,n)}}function Yb(r,n,o){n=rr(o,n),n=Zf(r.stateNode,n,2),r=Va(r,n,2),r!==null&&(ve(r,2),Ir(r))}function ge(r,n,o){if(r.tag===3)Yb(r,r,o);else for(;n!==null;){if(n.tag===3){Yb(n,r,o);break}else if(n.tag===1){var d=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(en===null||!en.has(d))){r=rr(o,r),o=Gx(2),d=Va(n,o,2),d!==null&&(Xx(o,d,n,r),ve(d,2),Ir(d));break}}n=n.return}}function vp(r,n,o){var d=r.pingCache;if(d===null){d=r.pingCache=new lL;var y=new Set;d.set(n,y)}else y=d.get(n),y===void 0&&(y=new Set,d.set(n,y));y.has(o)||(fp=!0,y.add(o),r=dL.bind(null,r,n,o),n.then(r,r))}function dL(r,n,o){var d=r.pingCache;d!==null&&d.delete(n),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,Ce===r&&(Qt&o)===o&&(Re===4||Re===3&&(Qt&62914560)===Qt&&300>ci()-Ah?(ue&2)===0&&Ys(r,0):pp|=o,Ps===Qt&&(Ps=0)),Ir(r)}function Gb(r,n){n===0&&(n=Hc()),r=An(r,n),r!==null&&(ve(r,n),Ir(r))}function fL(r){var n=r.memoizedState,o=0;n!==null&&(o=n.retryLane),Gb(r,o)}function pL(r,n){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,y=r.memoizedState;y!==null&&(o=y.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(n),Gb(r,o)}function gL(r,n){return Kr(r,n)}var zh=null,Xs=null,kp=!1,Nh=!1,Sp=!1,nn=0;function Ir(r){r!==Xs&&r.next===null&&(Xs===null?zh=Xs=r:Xs=Xs.next=r),Nh=!0,kp||(kp=!0,yL())}function Lo(r,n){if(!Sp&&Nh){Sp=!0;do for(var o=!1,d=zh;d!==null;){if(r!==0){var y=d.pendingLanes;if(y===0)var b=0;else{var w=d.suspendedLanes,A=d.pingedLanes;b=(1<<31-Ze(42|r)+1)-1,b&=y&~(w&~A),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,Qb(d,b))}else b=Qt,b=$a(d,d===Ce?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||wn(d,b)||(o=!0,Qb(d,b));d=d.next}while(o);Sp=!1}}function mL(){Xb()}function Xb(){Nh=kp=!1;var r=0;nn!==0&&BL()&&(r=nn);for(var n=ci(),o=null,d=zh;d!==null;){var y=d.next,b=Vb(d,n);b===0?(d.next=null,o===null?zh=y:o.next=y,y===null&&(Xs=o)):(o=d,(r!==0||(b&3)!==0)&&(Nh=!0)),d=y}Ye!==0&&Ye!==5||Lo(r),nn!==0&&(nn=0)}function Vb(r,n){for(var o=r.suspendedLanes,d=r.pingedLanes,y=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var w=31-Ze(b),A=1<<w,G=y[w];G===-1?((A&o)===0||(A&d)!==0)&&(y[w]=_n(A,n)):G<=n&&(r.expiredLanes|=A),b&=~A}if(n=Ce,o=Qt,o=$a(r,r===n?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===n&&(pe===2||pe===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Ki(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||wn(r,o)){if(n=o&-o,n===r.callbackPriority)return n;switch(d!==null&&Ki(d),ys(o)){case 2:case 8:o=ds;break;case 32:o=Dr;break;case 268435456:o=qi;break;default:o=Dr}return d=Zb.bind(null,r),o=Kr(o,d),r.callbackPriority=n,r.callbackNode=o,n}return d!==null&&d!==null&&Ki(d),r.callbackPriority=2,r.callbackNode=null,2}function Zb(r,n){if(Ye!==0&&Ye!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if($h()&&r.callbackNode!==o)return null;var d=Qt;return d=$a(r,r===Ce?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(Mb(r,d,n),Vb(r,ci()),r.callbackNode!=null&&r.callbackNode===o?Zb.bind(null,r):null)}function Qb(r,n){if($h())return null;Mb(r,n,!0)}function yL(){LL(function(){(ue&6)!==0?Kr(Wl,mL):Xb()})}function Tp(){if(nn===0){var r=Os;r===0&&(r=Fa,Fa<<=1,(Fa&261888)===0&&(Fa=256)),nn=r}return nn}function Kb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Yc(""+r)}function Jb(r,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,r.id&&o.setAttribute("form",r.id),n.parentNode.insertBefore(o,n),r=new FormData(r),o.parentNode.removeChild(o),r}function xL(r,n,o,d,y){if(n==="submit"&&o&&o.stateNode===y){var b=Kb((y[ei]||null).action),w=d.submitter;w&&(n=(n=w[ei]||null)?Kb(n.formAction):w.getAttribute("formAction"),n!==null&&(b=n,w=null));var A=new Zc("action","action",null,d,y);r.push({event:A,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(nn!==0){var G=w?Jb(y,w):new FormData(y);Pf(o,{pending:!0,data:G,method:y.method,action:b},null,G)}}else typeof b=="function"&&(A.preventDefault(),G=w?Jb(y,w):new FormData(y),Pf(o,{pending:!0,data:G,method:y.method,action:b},b,G))},currentTarget:y}]})}}for(var wp=0;wp<lf.length;wp++){var _p=lf[wp],bL=_p.toLowerCase(),CL=_p[0].toUpperCase()+_p.slice(1);yr(bL,"on"+CL)}yr(A0,"onAnimationEnd"),yr(M0,"onAnimationIteration"),yr(R0,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr($E,"onTransitionRun"),yr(zE,"onTransitionStart"),yr(NE,"onTransitionCancel"),yr(O0,"onTransitionEnd"),bt("onMouseEnter",["mouseout","mouseover"]),bt("onMouseLeave",["mouseout","mouseover"]),bt("onPointerEnter",["pointerout","pointerover"]),bt("onPointerLeave",["pointerout","pointerover"]),ft("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ft("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ft("onBeforeInput",["compositionend","keypress","textInput","paste"]),ft("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ft("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ft("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ao="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(" "),vL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ao));function t1(r,n){n=(n&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],y=d.event;d=d.listeners;t:{var b=void 0;if(n)for(var w=d.length-1;0<=w;w--){var A=d[w],G=A.instance,at=A.currentTarget;if(A=A.listener,G!==b&&y.isPropagationStopped())break t;b=A,y.currentTarget=at;try{b(y)}catch(ht){Jc(ht)}y.currentTarget=null,b=G}else for(w=0;w<d.length;w++){if(A=d[w],G=A.instance,at=A.currentTarget,A=A.listener,G!==b&&y.isPropagationStopped())break t;b=A,y.currentTarget=at;try{b(y)}catch(ht){Jc(ht)}y.currentTarget=null,b=G}}}}function Zt(r,n){var o=n[Na];o===void 0&&(o=n[Na]=new Set);var d=r+"__bubble";o.has(d)||(e1(n,r,2,!1),o.add(d))}function Bp(r,n,o){var d=0;n&&(d|=4),e1(o,r,d,n)}var qh="_reactListening"+Math.random().toString(36).slice(2);function Ep(r){if(!r[qh]){r[qh]=!0,wt.forEach(function(o){o!=="selectionchange"&&(vL.has(o)||Bp(o,!1,r),Bp(o,!0,r))});var n=r.nodeType===9?r:r.ownerDocument;n===null||n[qh]||(n[qh]=!0,Bp("selectionchange",!1,n))}}function e1(r,n,o,d){switch(A1(n)){case 2:var y=VL;break;case 8:y=ZL;break;default:y=Up}o=y.bind(null,n,o,r),y=void 0,!Gd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(y=!0),d?y!==void 0?r.addEventListener(n,o,{capture:!0,passive:y}):r.addEventListener(n,o,!0):y!==void 0?r.addEventListener(n,o,{passive:y}):r.addEventListener(n,o,!1)}function Lp(r,n,o,d,y){var b=d;if((n&1)===0&&(n&2)===0&&d!==null)t:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var A=d.stateNode.containerInfo;if(A===y)break;if(w===4)for(w=d.return;w!==null;){var G=w.tag;if((G===3||G===4)&&w.stateNode.containerInfo===y)return;w=w.return}for(;A!==null;){if(w=Ia(A),w===null)return;if(G=w.tag,G===5||G===6||G===26||G===27){d=b=w;continue t}A=A.parentNode}}d=d.return}s0(function(){var at=b,ht=Wd(o),gt=[];t:{var nt=F0.get(r);if(nt!==void 0){var ot=Zc,kt=r;switch(r){case"keypress":if(Xc(o)===0)break t;case"keydown":case"keyup":ot=pE;break;case"focusin":kt="focus",ot=Qd;break;case"focusout":kt="blur",ot=Qd;break;case"beforeblur":case"afterblur":ot=Qd;break;case"click":if(o.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ot=c0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ot=iE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ot=yE;break;case A0:case M0:case R0:ot=nE;break;case O0:ot=bE;break;case"scroll":case"scrollend":ot=tE;break;case"wheel":ot=vE;break;case"copy":case"cut":case"paste":ot=lE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ot=u0;break;case"toggle":case"beforetoggle":ot=SE}var $t=(n&4)!==0,be=!$t&&(r==="scroll"||r==="scrollend"),J=$t?nt!==null?nt+"Capture":null:nt;$t=[];for(var V=at,rt;V!==null;){var pt=V;if(rt=pt.stateNode,pt=pt.tag,pt!==5&&pt!==26&&pt!==27||rt===null||J===null||(pt=Ql(V,J),pt!=null&&$t.push(Mo(V,pt,rt))),be)break;V=V.return}0<$t.length&&(nt=new ot(nt,kt,null,o,ht),gt.push({event:nt,listeners:$t}))}}if((n&7)===0){t:{if(nt=r==="mouseover"||r==="pointerover",ot=r==="mouseout"||r==="pointerout",nt&&o!==Pd&&(kt=o.relatedTarget||o.fromElement)&&(Ia(kt)||kt[Jr]))break t;if((ot||nt)&&(nt=ht.window===ht?ht:(nt=ht.ownerDocument)?nt.defaultView||nt.parentWindow:window,ot?(kt=o.relatedTarget||o.toElement,ot=at,kt=kt?Ia(kt):null,kt!==null&&(be=l(kt),$t=kt.tag,kt!==be||$t!==5&&$t!==27&&$t!==6)&&(kt=null)):(ot=null,kt=at),ot!==kt)){if($t=c0,pt="onMouseLeave",J="onMouseEnter",V="mouse",(r==="pointerout"||r==="pointerover")&&($t=u0,pt="onPointerLeave",J="onPointerEnter",V="pointer"),be=ot==null?nt:Ha(ot),rt=kt==null?nt:Ha(kt),nt=new $t(pt,V+"leave",ot,o,ht),nt.target=be,nt.relatedTarget=rt,pt=null,Ia(ht)===at&&($t=new $t(J,V+"enter",kt,o,ht),$t.target=rt,$t.relatedTarget=be,pt=$t),be=pt,ot&&kt)e:{for($t=kL,J=ot,V=kt,rt=0,pt=J;pt;pt=$t(pt))rt++;pt=0;for(var Mt=V;Mt;Mt=$t(Mt))pt++;for(;0<rt-pt;)J=$t(J),rt--;for(;0<pt-rt;)V=$t(V),pt--;for(;rt--;){if(J===V||V!==null&&J===V.alternate){$t=J;break e}J=$t(J),V=$t(V)}$t=null}else $t=null;ot!==null&&i1(gt,nt,ot,$t,!1),kt!==null&&be!==null&&i1(gt,be,kt,$t,!0)}}t:{if(nt=at?Ha(at):window,ot=nt.nodeName&&nt.nodeName.toLowerCase(),ot==="select"||ot==="input"&&nt.type==="file")var ne=b0;else if(y0(nt))if(C0)ne=OE;else{ne=ME;var Bt=AE}else ot=nt.nodeName,!ot||ot.toLowerCase()!=="input"||nt.type!=="checkbox"&&nt.type!=="radio"?at&&Ud(at.elementType)&&(ne=b0):ne=RE;if(ne&&(ne=ne(r,at))){x0(gt,ne,o,ht);break t}Bt&&Bt(r,nt,at),r==="focusout"&&at&&nt.type==="number"&&at.memoizedProps.value!=null&&jd(nt,"number",nt.value)}switch(Bt=at?Ha(at):window,r){case"focusin":(y0(Bt)||Bt.contentEditable==="true")&&(ws=Bt,af=at,no=null);break;case"focusout":no=af=ws=null;break;case"mousedown":nf=!0;break;case"contextmenu":case"mouseup":case"dragend":nf=!1,E0(gt,o,ht);break;case"selectionchange":if(DE)break;case"keydown":case"keyup":E0(gt,o,ht)}var Yt;if(Jd)t:{switch(r){case"compositionstart":var Kt="onCompositionStart";break t;case"compositionend":Kt="onCompositionEnd";break t;case"compositionupdate":Kt="onCompositionUpdate";break t}Kt=void 0}else Ts?g0(r,o)&&(Kt="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Kt="onCompositionStart");Kt&&(d0&&o.locale!=="ko"&&(Ts||Kt!=="onCompositionStart"?Kt==="onCompositionEnd"&&Ts&&(Yt=l0()):(ja=ht,Xd="value"in ja?ja.value:ja.textContent,Ts=!0)),Bt=Ih(at,Kt),0<Bt.length&&(Kt=new h0(Kt,r,null,o,ht),gt.push({event:Kt,listeners:Bt}),Yt?Kt.data=Yt:(Yt=m0(o),Yt!==null&&(Kt.data=Yt)))),(Yt=wE?_E(r,o):BE(r,o))&&(Kt=Ih(at,"onBeforeInput"),0<Kt.length&&(Bt=new h0("onBeforeInput","beforeinput",null,o,ht),gt.push({event:Bt,listeners:Kt}),Bt.data=Yt)),xL(gt,r,at,o,ht)}t1(gt,n)})}function Mo(r,n,o){return{instance:r,listener:n,currentTarget:o}}function Ih(r,n){for(var o=n+"Capture",d=[];r!==null;){var y=r,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Ql(r,o),y!=null&&d.unshift(Mo(r,y,b)),y=Ql(r,n),y!=null&&d.push(Mo(r,y,b))),r.tag===3)return d;r=r.return}return[]}function kL(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function i1(r,n,o,d,y){for(var b=n._reactName,w=[];o!==null&&o!==d;){var A=o,G=A.alternate,at=A.stateNode;if(A=A.tag,G!==null&&G===d)break;A!==5&&A!==26&&A!==27||at===null||(G=at,y?(at=Ql(o,b),at!=null&&w.unshift(Mo(o,at,G))):y||(at=Ql(o,b),at!=null&&w.push(Mo(o,at,G)))),o=o.return}w.length!==0&&r.push({event:n,listeners:w})}var SL=/\r\n?/g,TL=/\u0000|\uFFFD/g;function r1(r){return(typeof r=="string"?r:""+r).replace(SL,`
50
- `).replace(TL,"")}function a1(r,n){return n=r1(n),r1(r)===n}function xe(r,n,o,d,y,b){switch(o){case"children":typeof d=="string"?n==="body"||n==="textarea"&&d===""||vs(r,d):(typeof d=="number"||typeof d=="bigint")&&n!=="body"&&vs(r,""+d);break;case"className":ui(r,"class",d);break;case"tabIndex":ui(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":ui(r,o,d);break;case"style":a0(r,d,b);break;case"data":if(n!=="object"){ui(r,"data",d);break}case"src":case"href":if(d===""&&(n!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Yc(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"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 b=="function"&&(o==="formAction"?(n!=="input"&&xe(r,n,"name",y.name,y,null),xe(r,n,"formEncType",y.formEncType,y,null),xe(r,n,"formMethod",y.formMethod,y,null),xe(r,n,"formTarget",y.formTarget,y,null)):(xe(r,n,"encType",y.encType,y,null),xe(r,n,"method",y.method,y,null),xe(r,n,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Yc(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=ea);break;case"onScroll":d!=null&&Zt("scroll",r);break;case"onScrollEnd":d!=null&&Zt("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=Yc(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":Zt("beforetoggle",r),Zt("toggle",r),xi(r,"popover",d);break;case"xlinkActuate":Ii(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Ii(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Ii(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Ii(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Ii(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Ii(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Ii(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Ii(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Ii(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":xi(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=KB.get(o)||o,xi(r,o,d))}}function Ap(r,n,o,d,y,b){switch(o){case"style":a0(r,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof d=="string"?vs(r,d):(typeof d=="number"||typeof d=="bigint")&&vs(r,""+d);break;case"onScroll":d!=null&&Zt("scroll",r);break;case"onScrollEnd":d!=null&&Zt("scrollend",r);break;case"onClick":d!=null&&(r.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!j.hasOwnProperty(o))t:{if(o[0]==="o"&&o[1]==="n"&&(y=o.endsWith("Capture"),n=o.slice(2,y?o.length-7:void 0),b=r[ei]||null,b=b!=null?b[o]:null,typeof b=="function"&&r.removeEventListener(n,b,y),typeof d=="function")){typeof b!="function"&&b!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(n,d,y);break t}o in r?r[o]=d:d===!0?r.setAttribute(o,""):xi(r,o,d)}}}function ni(r,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Zt("error",r),Zt("load",r);var d=!1,y=!1,b;for(b in o)if(o.hasOwnProperty(b)){var w=o[b];if(w!=null)switch(b){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:xe(r,n,b,w,o,null)}}y&&xe(r,n,"srcSet",o.srcSet,o,null),d&&xe(r,n,"src",o.src,o,null);return;case"input":Zt("invalid",r);var A=b=w=y=null,G=null,at=null;for(d in o)if(o.hasOwnProperty(d)){var ht=o[d];if(ht!=null)switch(d){case"name":y=ht;break;case"type":w=ht;break;case"checked":G=ht;break;case"defaultChecked":at=ht;break;case"value":b=ht;break;case"defaultValue":A=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(a(137,n));break;default:xe(r,n,d,ht,o,null)}}t0(r,b,A,G,at,w,y,!1);return;case"select":Zt("invalid",r),d=w=b=null;for(y in o)if(o.hasOwnProperty(y)&&(A=o[y],A!=null))switch(y){case"value":b=A;break;case"defaultValue":w=A;break;case"multiple":d=A;default:xe(r,n,y,A,o,null)}n=b,o=w,r.multiple=!!d,n!=null?Cs(r,!!d,n,!1):o!=null&&Cs(r,!!d,o,!0);return;case"textarea":Zt("invalid",r),b=y=d=null;for(w in o)if(o.hasOwnProperty(w)&&(A=o[w],A!=null))switch(w){case"value":d=A;break;case"defaultValue":y=A;break;case"children":b=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(a(91));break;default:xe(r,n,w,A,o,null)}i0(r,d,y,b);return;case"option":for(G in o)if(o.hasOwnProperty(G)&&(d=o[G],d!=null))switch(G){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:xe(r,n,G,d,o,null)}return;case"dialog":Zt("beforetoggle",r),Zt("toggle",r),Zt("cancel",r),Zt("close",r);break;case"iframe":case"object":Zt("load",r);break;case"video":case"audio":for(d=0;d<Ao.length;d++)Zt(Ao[d],r);break;case"image":Zt("error",r),Zt("load",r);break;case"details":Zt("toggle",r);break;case"embed":case"source":case"link":Zt("error",r),Zt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(at in o)if(o.hasOwnProperty(at)&&(d=o[at],d!=null))switch(at){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:xe(r,n,at,d,o,null)}return;default:if(Ud(n)){for(ht in o)o.hasOwnProperty(ht)&&(d=o[ht],d!==void 0&&Ap(r,n,ht,d,o,void 0));return}}for(A in o)o.hasOwnProperty(A)&&(d=o[A],d!=null&&xe(r,n,A,d,o,null))}function wL(r,n,o,d){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,w=null,A=null,G=null,at=null,ht=null;for(ot in o){var gt=o[ot];if(o.hasOwnProperty(ot)&&gt!=null)switch(ot){case"checked":break;case"value":break;case"defaultValue":G=gt;default:d.hasOwnProperty(ot)||xe(r,n,ot,null,d,gt)}}for(var nt in d){var ot=d[nt];if(gt=o[nt],d.hasOwnProperty(nt)&&(ot!=null||gt!=null))switch(nt){case"type":b=ot;break;case"name":y=ot;break;case"checked":at=ot;break;case"defaultChecked":ht=ot;break;case"value":w=ot;break;case"defaultValue":A=ot;break;case"children":case"dangerouslySetInnerHTML":if(ot!=null)throw Error(a(137,n));break;default:ot!==gt&&xe(r,n,nt,ot,d,gt)}}Hd(r,w,A,G,at,ht,b,y);return;case"select":ot=w=A=nt=null;for(b in o)if(G=o[b],o.hasOwnProperty(b)&&G!=null)switch(b){case"value":break;case"multiple":ot=G;default:d.hasOwnProperty(b)||xe(r,n,b,null,d,G)}for(y in d)if(b=d[y],G=o[y],d.hasOwnProperty(y)&&(b!=null||G!=null))switch(y){case"value":nt=b;break;case"defaultValue":A=b;break;case"multiple":w=b;default:b!==G&&xe(r,n,y,b,d,G)}n=A,o=w,d=ot,nt!=null?Cs(r,!!o,nt,!1):!!d!=!!o&&(n!=null?Cs(r,!!o,n,!0):Cs(r,!!o,o?[]:"",!1));return;case"textarea":ot=nt=null;for(A in o)if(y=o[A],o.hasOwnProperty(A)&&y!=null&&!d.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:xe(r,n,A,null,d,y)}for(w in d)if(y=d[w],b=o[w],d.hasOwnProperty(w)&&(y!=null||b!=null))switch(w){case"value":nt=y;break;case"defaultValue":ot=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==b&&xe(r,n,w,y,d,b)}e0(r,nt,ot);return;case"option":for(var kt in o)if(nt=o[kt],o.hasOwnProperty(kt)&&nt!=null&&!d.hasOwnProperty(kt))switch(kt){case"selected":r.selected=!1;break;default:xe(r,n,kt,null,d,nt)}for(G in d)if(nt=d[G],ot=o[G],d.hasOwnProperty(G)&&nt!==ot&&(nt!=null||ot!=null))switch(G){case"selected":r.selected=nt&&typeof nt!="function"&&typeof nt!="symbol";break;default:xe(r,n,G,nt,d,ot)}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 $t in o)nt=o[$t],o.hasOwnProperty($t)&&nt!=null&&!d.hasOwnProperty($t)&&xe(r,n,$t,null,d,nt);for(at in d)if(nt=d[at],ot=o[at],d.hasOwnProperty(at)&&nt!==ot&&(nt!=null||ot!=null))switch(at){case"children":case"dangerouslySetInnerHTML":if(nt!=null)throw Error(a(137,n));break;default:xe(r,n,at,nt,d,ot)}return;default:if(Ud(n)){for(var be in o)nt=o[be],o.hasOwnProperty(be)&&nt!==void 0&&!d.hasOwnProperty(be)&&Ap(r,n,be,void 0,d,nt);for(ht in d)nt=d[ht],ot=o[ht],!d.hasOwnProperty(ht)||nt===ot||nt===void 0&&ot===void 0||Ap(r,n,ht,nt,d,ot);return}}for(var J in o)nt=o[J],o.hasOwnProperty(J)&&nt!=null&&!d.hasOwnProperty(J)&&xe(r,n,J,null,d,nt);for(gt in d)nt=d[gt],ot=o[gt],!d.hasOwnProperty(gt)||nt===ot||nt==null&&ot==null||xe(r,n,gt,nt,d,ot)}function n1(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _L(){if(typeof performance.getEntriesByType=="function"){for(var r=0,n=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var y=o[d],b=y.transferSize,w=y.initiatorType,A=y.duration;if(b&&A&&n1(w)){for(w=0,A=y.responseEnd,d+=1;d<o.length;d++){var G=o[d],at=G.startTime;if(at>A)break;var ht=G.transferSize,gt=G.initiatorType;ht&&n1(gt)&&(G=G.responseEnd,w+=ht*(G<A?1:(A-at)/(G-at)))}if(--d,n+=8*(b+w)/(y.duration/1e3),r++,10<r)break}}if(0<r)return n/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Mp=null,Rp=null;function Hh(r){return r.nodeType===9?r:r.ownerDocument}function s1(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function l1(r,n){if(r===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&n==="foreignObject"?0:r}function Op(r,n){return r==="textarea"||r==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Fp=null;function BL(){var r=window.event;return r&&r.type==="popstate"?r===Fp?!1:(Fp=r,!0):(Fp=null,!1)}var o1=typeof setTimeout=="function"?setTimeout:void 0,EL=typeof clearTimeout=="function"?clearTimeout:void 0,c1=typeof Promise=="function"?Promise:void 0,LL=typeof queueMicrotask=="function"?queueMicrotask:typeof c1<"u"?function(r){return c1.resolve(null).then(r).catch(AL)}:o1;function AL(r){setTimeout(function(){throw r})}function sn(r){return r==="head"}function h1(r,n){var o=n,d=0;do{var y=o.nextSibling;if(r.removeChild(o),y&&y.nodeType===8)if(o=y.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(y),Ks(n);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")Ro(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,Ro(o);for(var b=o.firstChild;b;){var w=b.nextSibling,A=b.nodeName;b[qa]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=w}}else o==="body"&&Ro(r.ownerDocument.body);o=y}while(o);Ks(n)}function u1(r,n){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function Dp(r){var n=r.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Dp(o),bs(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function ML(r,n,o,d){for(;r.nodeType===1;){var y=o;if(r.nodeName.toLowerCase()!==n.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[qa])switch(n){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(n==="input"&&r.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=or(r.nextSibling),r===null)break}return null}function RL(r,n,o){if(n==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=or(r.nextSibling),r===null))return null;return r}function d1(r,n){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!n||(r=or(r.nextSibling),r===null))return null;return r}function $p(r){return r.data==="$?"||r.data==="$~"}function zp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function OL(r,n){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=n;else if(r.data!=="$?"||o.readyState!=="loading")n();else{var d=function(){n(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function or(r){for(;r!=null;r=r.nextSibling){var n=r.nodeType;if(n===1||n===3)break;if(n===8){if(n=r.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return r}var Np=null;function f1(r){r=r.nextSibling;for(var n=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(n===0)return or(r.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}r=r.nextSibling}return null}function p1(r){r=r.previousSibling;for(var n=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return r;n--}else o!=="/$"&&o!=="/&"||n++}r=r.previousSibling}return null}function g1(r,n,o){switch(n=Hh(o),r){case"html":if(r=n.documentElement,!r)throw Error(a(452));return r;case"head":if(r=n.head,!r)throw Error(a(453));return r;case"body":if(r=n.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function Ro(r){for(var n=r.attributes;n.length;)r.removeAttributeNode(n[0]);bs(r)}var cr=new Map,m1=new Set;function jh(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ya=I.d;I.d={f:FL,r:DL,D:$L,C:zL,L:NL,m:qL,X:HL,S:IL,M:jL};function FL(){var r=ya.f(),n=Oh();return r||n}function DL(r){var n=ta(r);n!==null&&n.tag===5&&n.type==="form"?Ox(n):ya.r(r)}var Vs=typeof document>"u"?null:document;function y1(r,n,o){var d=Vs;if(d&&typeof n=="string"&&n){var y=er(n);y='link[rel="'+r+'"][href="'+y+'"]',typeof o=="string"&&(y+='[crossorigin="'+o+'"]'),m1.has(y)||(m1.add(y),r={rel:r,crossOrigin:o,href:n},d.querySelector(y)===null&&(n=d.createElement("link"),ni(n,"link",r),Ee(n),d.head.appendChild(n)))}}function $L(r){ya.D(r),y1("dns-prefetch",r,null)}function zL(r,n){ya.C(r,n),y1("preconnect",r,n)}function NL(r,n,o){ya.L(r,n,o);var d=Vs;if(d&&r&&n){var y='link[rel="preload"][as="'+er(n)+'"]';n==="image"&&o&&o.imageSrcSet?(y+='[imagesrcset="'+er(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(y+='[imagesizes="'+er(o.imageSizes)+'"]')):y+='[href="'+er(r)+'"]';var b=y;switch(n){case"style":b=Zs(r);break;case"script":b=Qs(r)}cr.has(b)||(r=g({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:r,as:n},o),cr.set(b,r),d.querySelector(y)!==null||n==="style"&&d.querySelector(Oo(b))||n==="script"&&d.querySelector(Fo(b))||(n=d.createElement("link"),ni(n,"link",r),Ee(n),d.head.appendChild(n)))}}function qL(r,n){ya.m(r,n);var o=Vs;if(o&&r){var d=n&&typeof n.as=="string"?n.as:"script",y='link[rel="modulepreload"][as="'+er(d)+'"][href="'+er(r)+'"]',b=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Qs(r)}if(!cr.has(b)&&(r=g({rel:"modulepreload",href:r},n),cr.set(b,r),o.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Fo(b)))return}d=o.createElement("link"),ni(d,"link",r),Ee(d),o.head.appendChild(d)}}}function IL(r,n,o){ya.S(r,n,o);var d=Vs;if(d&&r){var y=$r(d).hoistableStyles,b=Zs(r);n=n||"default";var w=y.get(b);if(!w){var A={loading:0,preload:null};if(w=d.querySelector(Oo(b)))A.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":n},o),(o=cr.get(b))&&qp(r,o);var G=w=d.createElement("link");Ee(G),ni(G,"link",r),G._p=new Promise(function(at,ht){G.onload=at,G.onerror=ht}),G.addEventListener("load",function(){A.loading|=1}),G.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Uh(w,n,d)}w={type:"stylesheet",instance:w,count:1,state:A},y.set(b,w)}}}function HL(r,n){ya.X(r,n);var o=Vs;if(o&&r){var d=$r(o).hoistableScripts,y=Qs(r),b=d.get(y);b||(b=o.querySelector(Fo(y)),b||(r=g({src:r,async:!0},n),(n=cr.get(y))&&Ip(r,n),b=o.createElement("script"),Ee(b),ni(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(y,b))}}function jL(r,n){ya.M(r,n);var o=Vs;if(o&&r){var d=$r(o).hoistableScripts,y=Qs(r),b=d.get(y);b||(b=o.querySelector(Fo(y)),b||(r=g({src:r,async:!0,type:"module"},n),(n=cr.get(y))&&Ip(r,n),b=o.createElement("script"),Ee(b),ni(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(y,b))}}function x1(r,n,o,d){var y=(y=xt.current)?jh(y):null;if(!y)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=Zs(o.href),o=$r(y).hoistableStyles,d=o.get(n),d||(d={type:"style",instance:null,count:0,state:null},o.set(n,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Zs(o.href);var b=$r(y).hoistableStyles,w=b.get(r);if(w||(y=y.ownerDocument||y,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,w),(b=y.querySelector(Oo(r)))&&!b._p&&(w.instance=b,w.state.loading=5),cr.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},cr.set(r,o),b||UL(y,r,o,w.state))),n&&d===null)throw Error(a(528,""));return w}if(n&&d!==null)throw Error(a(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Qs(o),o=$r(y).hoistableScripts,d=o.get(n),d||(d={type:"script",instance:null,count:0,state:null},o.set(n,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Zs(r){return'href="'+er(r)+'"'}function Oo(r){return'link[rel="stylesheet"]['+r+"]"}function b1(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function UL(r,n,o,d){r.querySelector('link[rel="preload"][as="style"]['+n+"]")?d.loading=1:(n=r.createElement("link"),d.preload=n,n.addEventListener("load",function(){return d.loading|=1}),n.addEventListener("error",function(){return d.loading|=2}),ni(n,"link",o),Ee(n),r.head.appendChild(n))}function Qs(r){return'[src="'+er(r)+'"]'}function Fo(r){return"script[async]"+r}function C1(r,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var d=r.querySelector('style[data-href~="'+er(o.href)+'"]');if(d)return n.instance=d,Ee(d),d;var y=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Ee(d),ni(d,"style",y),Uh(d,o.precedence,r),n.instance=d;case"stylesheet":y=Zs(o.href);var b=r.querySelector(Oo(y));if(b)return n.state.loading|=4,n.instance=b,Ee(b),b;d=b1(o),(y=cr.get(y))&&qp(d,y),b=(r.ownerDocument||r).createElement("link"),Ee(b);var w=b;return w._p=new Promise(function(A,G){w.onload=A,w.onerror=G}),ni(b,"link",d),n.state.loading|=4,Uh(b,o.precedence,r),n.instance=b;case"script":return b=Qs(o.src),(y=r.querySelector(Fo(b)))?(n.instance=y,Ee(y),y):(d=o,(y=cr.get(b))&&(d=g({},o),Ip(d,y)),r=r.ownerDocument||r,y=r.createElement("script"),Ee(y),ni(y,"link",d),r.head.appendChild(y),n.instance=y);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(d=n.instance,n.state.loading|=4,Uh(d,o.precedence,r));return n.instance}function Uh(r,n,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,b=y,w=0;w<d.length;w++){var A=d[w];if(A.dataset.precedence===n)b=A;else if(b!==y)break}b?b.parentNode.insertBefore(r,b.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(r,n.firstChild))}function qp(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.title==null&&(r.title=n.title)}function Ip(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.integrity==null&&(r.integrity=n.integrity)}var Ph=null;function v1(r,n,o){if(Ph===null){var d=new Map,y=Ph=new Map;y.set(o,d)}else y=Ph,d=y.get(o),d||(d=new Map,y.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),y=0;y<o.length;y++){var b=o[y];if(!(b[qa]||b[qe]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(n)||"";w=r+w;var A=d.get(w);A?A.push(b):d.set(w,[b])}}return d}function k1(r,n,o){r=r.ownerDocument||r,r.head.insertBefore(o,n==="title"?r.querySelector("head > title"):null)}function PL(r,n,o){if(o===1||n.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return r=n.disabled,typeof n.precedence=="string"&&r==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function S1(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function WL(r,n,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var y=Zs(d.href),b=n.querySelector(Oo(y));if(b){n=b._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(r.count++,r=Wh.bind(r),n.then(r,r)),o.state.loading|=4,o.instance=b,Ee(b);return}b=n.ownerDocument||n,d=b1(d),(y=cr.get(y))&&qp(d,y),b=b.createElement("link"),Ee(b);var w=b;w._p=new Promise(function(A,G){w.onload=A,w.onerror=G}),ni(b,"link",d),o.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=Wh.bind(r),n.addEventListener("load",o),n.addEventListener("error",o))}}var Hp=0;function YL(r,n){return r.stylesheets&&r.count===0&&Gh(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&Gh(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+n);0<r.imgBytes&&Hp===0&&(Hp=62500*_L());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Gh(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>Hp?50:800)+n);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function Wh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gh(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Yh=null;function Gh(r,n){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Yh=new Map,n.forEach(GL,r),Yh=null,Wh.call(r))}function GL(r,n){if(!(n.state.loading&4)){var o=Yh.get(r);if(o)var d=o.get(null);else{o=new Map,Yh.set(r,o);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var w=y[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),d=w)}d&&o.set(null,d)}y=n.instance,w=y.getAttribute("data-precedence"),b=o.get(w)||d,b===d&&o.set(null,y),o.set(w,y),this.count++,d=Wh.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),b?b.parentNode.insertBefore(y,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),n.state.loading|=4}}var Do={$$typeof:B,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function XL(r,n,o,d,y,b,w,A,G){this.tag=1,this.containerInfo=r,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=Gl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.hiddenUpdates=Gl(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function T1(r,n,o,d,y,b,w,A,G,at,ht,gt){return r=new XL(r,n,o,w,G,at,ht,gt,A),n=1,b===!0&&(n|=24),b=ji(3,null,null,n),r.current=b,b.stateNode=r,n=Cf(),n.refCount++,r.pooledCache=n,n.refCount++,b.memoizedState={element:d,isDehydrated:o,cache:n},Tf(b),r}function w1(r){return r?(r=Es,r):Es}function _1(r,n,o,d,y,b){y=w1(y),d.context===null?d.context=y:d.pendingContext=y,d=Xa(n),d.payload={element:o},b=b===void 0?null:b,b!==null&&(d.callback=b),o=Va(r,d,n),o!==null&&(Oi(o,r,n),fo(o,r,n))}function B1(r,n){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<n?o:n}}function jp(r,n){B1(r,n),(r=r.alternate)&&B1(r,n)}function E1(r){if(r.tag===13||r.tag===31){var n=An(r,67108864);n!==null&&Oi(n,r,67108864),jp(r,67108864)}}function L1(r){if(r.tag===13||r.tag===31){var n=Gi();n=ms(n);var o=An(r,n);o!==null&&Oi(o,r,n),jp(r,n)}}var Xh=!0;function VL(r,n,o,d){var y=M.T;M.T=null;var b=I.p;try{I.p=2,Up(r,n,o,d)}finally{I.p=b,M.T=y}}function ZL(r,n,o,d){var y=M.T;M.T=null;var b=I.p;try{I.p=8,Up(r,n,o,d)}finally{I.p=b,M.T=y}}function Up(r,n,o,d){if(Xh){var y=Pp(d);if(y===null)Lp(r,n,d,Vh,o),M1(r,d);else if(KL(y,r,n,o,d))d.stopPropagation();else if(M1(r,d),n&4&&-1<QL.indexOf(r)){for(;y!==null;){var b=ta(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=mr(b.pendingLanes);if(w!==0){var A=b;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var G=1<<31-Ze(w);A.entanglements[1]|=G,w&=~G}Ir(b),(ue&6)===0&&(Mh=ci()+500,Lo(0))}}break;case 31:case 13:A=An(b,2),A!==null&&Oi(A,b,2),Oh(),jp(b,2)}if(b=Pp(d),b===null&&Lp(r,n,d,Vh,o),b===y)break;y=b}y!==null&&d.stopPropagation()}else Lp(r,n,d,null,o)}}function Pp(r){return r=Wd(r),Wp(r)}var Vh=null;function Wp(r){if(Vh=null,r=Ia(r),r!==null){var n=l(r);if(n===null)r=null;else{var o=n.tag;if(o===13){if(r=c(n),r!==null)return r;r=null}else if(o===31){if(r=h(n),r!==null)return r;r=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;r=null}else n!==r&&(r=null)}}return Vh=r,null}function A1(r){switch(r){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(qc()){case Wl:return 2;case ds:return 8;case Dr:case Ma:return 32;case qi:return 268435456;default:return 32}default:return 32}}var Yp=!1,ln=null,on=null,cn=null,$o=new Map,zo=new Map,hn=[],QL="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 M1(r,n){switch(r){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":$o.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(n.pointerId)}}function No(r,n,o,d,y,b){return r===null||r.nativeEvent!==b?(r={blockedOn:n,domEventName:o,eventSystemFlags:d,nativeEvent:b,targetContainers:[y]},n!==null&&(n=ta(n),n!==null&&E1(n)),r):(r.eventSystemFlags|=d,n=r.targetContainers,y!==null&&n.indexOf(y)===-1&&n.push(y),r)}function KL(r,n,o,d,y){switch(n){case"focusin":return ln=No(ln,r,n,o,d,y),!0;case"dragenter":return on=No(on,r,n,o,d,y),!0;case"mouseover":return cn=No(cn,r,n,o,d,y),!0;case"pointerover":var b=y.pointerId;return $o.set(b,No($o.get(b)||null,r,n,o,d,y)),!0;case"gotpointercapture":return b=y.pointerId,zo.set(b,No(zo.get(b)||null,r,n,o,d,y)),!0}return!1}function R1(r){var n=Ia(r.target);if(n!==null){var o=l(n);if(o!==null){if(n=o.tag,n===13){if(n=c(o),n!==null){r.blockedOn=n,_i(r.priority,function(){L1(o)});return}}else if(n===31){if(n=h(o),n!==null){r.blockedOn=n,_i(r.priority,function(){L1(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Zh(r){if(r.blockedOn!==null)return!1;for(var n=r.targetContainers;0<n.length;){var o=Pp(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Pd=d,o.target.dispatchEvent(d),Pd=null}else return n=ta(o),n!==null&&E1(n),r.blockedOn=o,!1;n.shift()}return!0}function O1(r,n,o){Zh(r)&&o.delete(n)}function JL(){Yp=!1,ln!==null&&Zh(ln)&&(ln=null),on!==null&&Zh(on)&&(on=null),cn!==null&&Zh(cn)&&(cn=null),$o.forEach(O1),zo.forEach(O1)}function Qh(r,n){r.blockedOn===n&&(r.blockedOn=null,Yp||(Yp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,JL)))}var Kh=null;function F1(r){Kh!==r&&(Kh=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kh===r&&(Kh=null);for(var n=0;n<r.length;n+=3){var o=r[n],d=r[n+1],y=r[n+2];if(typeof d!="function"){if(Wp(d||o)===null)continue;break}var b=ta(o);b!==null&&(r.splice(n,3),n-=3,Pf(b,{pending:!0,data:y,method:o.method,action:d},d,y))}}))}function Ks(r){function n(G){return Qh(G,r)}ln!==null&&Qh(ln,r),on!==null&&Qh(on,r),cn!==null&&Qh(cn,r),$o.forEach(n),zo.forEach(n);for(var o=0;o<hn.length;o++){var d=hn[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<hn.length&&(o=hn[0],o.blockedOn===null);)R1(o),o.blockedOn===null&&hn.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var y=o[d],b=o[d+1],w=y[ei]||null;if(typeof b=="function")w||F1(o);else if(w){var A=null;if(b&&b.hasAttribute("formAction")){if(y=b,w=b[ei]||null)A=w.formAction;else if(Wp(y)!==null)continue}else A=w.action;typeof A=="function"?o[d+1]=A:(o.splice(d,3),d-=3),F1(o)}}}function D1(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return y=w})},focusReset:"manual",scroll:"manual"})}function n(){y!==null&&(y(),y=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),y!==null&&(y(),y=null)}}}function Gp(r){this._internalRoot=r}Jh.prototype.render=Gp.prototype.render=function(r){var n=this._internalRoot;if(n===null)throw Error(a(409));var o=n.current,d=Gi();_1(o,d,r,n,null,null)},Jh.prototype.unmount=Gp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var n=r.containerInfo;_1(r.current,2,null,r,null,null),Oh(),n[Jr]=null}};function Jh(r){this._internalRoot=r}Jh.prototype.unstable_scheduleHydration=function(r){if(r){var n=Uc();r={blockedOn:null,target:r,priority:n};for(var o=0;o<hn.length&&n!==0&&n<hn[o].priority;o++);hn.splice(o,0,r),o===0&&R1(r)}};var $1=t.version;if($1!=="19.2.6")throw Error(a(527,$1,"19.2.6"));I.findDOMNode=function(r){var n=r._reactInternals;if(n===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(n),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var tA={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{Ra=tu.inject(tA),ti=tu}catch{}}return Io.createRoot=function(r,n){if(!s(r))throw Error(a(299));var o=!1,d="",y=Ux,b=Px,w=Wx;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(d=n.identifierPrefix),n.onUncaughtError!==void 0&&(y=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(w=n.onRecoverableError)),n=T1(r,1,!1,null,null,o,d,null,y,b,w,D1),r[Jr]=n.current,Ep(r),new Gp(n)},Io.hydrateRoot=function(r,n,o){if(!s(r))throw Error(a(299));var d=!1,y="",b=Ux,w=Px,A=Wx,G=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(y=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(A=o.onRecoverableError),o.formState!==void 0&&(G=o.formState)),n=T1(r,1,!0,n,o??null,d,y,G,b,w,A,D1),n.context=w1(null),o=n.current,d=Gi(),d=ms(d),y=Xa(d),y.callback=null,Va(o,y,d),o=d,n.current.lanes=o,ve(n,o),Ir(n),r[Jr]=n.current,Ep(r),new Jh(n)},Io.version="19.2.6",Io}var Y1;function fA(){if(Y1)return Zp.exports;Y1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=dA(),Zp.exports}var pA=fA();const gA=Rm(pA);/**
51
- * react-router v7.15.1
52
- *
53
- * Copyright (c) Remix Software Inc.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE.md file in the root directory of this source tree.
57
- *
58
- * @license MIT
59
- */var G1="popstate";function X1(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function mA(e={}){function t(a,s){var f;let l=(f=s.state)==null?void 0:f.masked,{pathname:c,search:h,hash:u}=l||a.location;return _g("",{pathname:c,search:h,hash:u},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function i(a,s){return typeof s=="string"?s:pc(s)}return xA(t,i,null,e)}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ar(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yA(){return Math.random().toString(36).substring(2,10)}function V1(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function _g(e,t,i=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?zl(t):t,state:i,key:t&&t.key||a||yA(),mask:s}}function pc({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function zl(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function xA(e,t,i,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,h="POP",u=null,f=p();f==null&&(f=0,c.replaceState({...c.state,idx:f},""));function p(){return(c.state||{idx:null}).idx}function g(){h="POP";let k=p(),T=k==null?null:k-f;f=k,u&&u({action:h,location:C.location,delta:T})}function x(k,T){h="PUSH";let _=X1(k)?k:_g(C.location,k,T);f=p()+1;let B=V1(_,f),O=C.createHref(_.mask||_);try{c.pushState(B,"",O)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;s.location.assign(O)}l&&u&&u({action:h,location:C.location,delta:1})}function m(k,T){h="REPLACE";let _=X1(k)?k:_g(C.location,k,T);f=p();let B=V1(_,f),O=C.createHref(_.mask||_);c.replaceState(B,"",O),l&&u&&u({action:h,location:C.location,delta:0})}function v(k){return bA(k)}let C={get action(){return h},get location(){return e(s,c)},listen(k){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(G1,g),u=k,()=>{s.removeEventListener(G1,g),u=null}},createHref(k){return t(s,k)},createURL:v,encodeLocation(k){let T=v(k);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:x,replace:m,go(k){return c.go(k)}};return C}function bA(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Be(i,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:pc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function X2(e,t,i="/"){return CA(e,t,i,!1)}function CA(e,t,i,a,s){let l=typeof t=="string"?zl(t):t,c=wa(l.pathname||"/",i);if(c==null)return null;let h=vA(e),u=null,f=OA(c);for(let p=0;u==null&&p<h.length;++p)u=MA(h[p],f,a);return u}function vA(e){let t=V2(e);return kA(t),t}function V2(e,t=[],i=[],a="",s=!1){let l=(c,h,u=s,f)=>{let p={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(a)&&u)return;Be(p.relativePath.startsWith(a),`Absolute route path "${p.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(a.length)}let g=Br([a,p.relativePath]),x=i.concat(p);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),V2(c.children,t,x,g,u)),!(c.path==null&&!c.index)&&t.push({path:g,score:LA(g,c.index),routesMeta:x})};return e.forEach((c,h)=>{var u;if(c.path===""||!((u=c.path)!=null&&u.includes("?")))l(c,h);else for(let f of Z2(c.path))l(c,h,!0,f)}),t}function Z2(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,s=i.endsWith("?"),l=i.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let c=Z2(a.join("/")),h=[];return h.push(...c.map(u=>u===""?l:[l,u].join("/"))),s&&h.push(...c),h.map(u=>e.startsWith("/")&&u===""?"/":u)}function kA(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:AA(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var SA=/^:[\w-]+$/,TA=3,wA=2,_A=1,BA=10,EA=-2,Z1=e=>e==="*";function LA(e,t){let i=e.split("/"),a=i.length;return i.some(Z1)&&(a+=EA),t&&(a+=wA),i.filter(s=>!Z1(s)).reduce((s,l)=>s+(SA.test(l)?TA:l===""?_A:BA),a)}function AA(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function MA(e,t,i=!1){let{routesMeta:a}=e,s={},l="/",c=[];for(let h=0;h<a.length;++h){let u=a[h],f=h===a.length-1,p=l==="/"?t:t.slice(l.length)||"/",g=Ou({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},p),x=u.route;if(!g&&f&&i&&!a[a.length-1].route.index&&(g=Ou({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Br([l,g.pathname]),pathnameBase:zA(Br([l,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(l=Br([l,g.pathnameBase]))}return c}function Ou(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=RA(e.path,e.caseSensitive,e.end),s=t.match(i);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:a.reduce((f,{paramName:p,isOptional:g},x)=>{if(p==="*"){let v=h[x]||"";c=l.slice(0,l.length-v.length).replace(/(.)\/+$/,"$1")}const m=h[x];return g&&!m?f[p]=void 0:f[p]=(m||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:c,pattern:e}}function RA(e,t=!1,i=!0){Ar(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,h,u,f,p)=>{if(a.push({paramName:h,isOptional:u!=null}),u){let g=p.charAt(f+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function OA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ar(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function wa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}var FA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function DA(e,t="/"){let{pathname:i,search:a="",hash:s=""}=typeof e=="string"?zl(e):e,l;return i?(i=Q2(i),i.startsWith("/")?l=Q1(i.substring(1),"/"):l=Q1(i,t)):l=t,{pathname:l,search:NA(a),hash:qA(s)}}function Q1(e,t){let i=Fu(t).split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function tg(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $A(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Fm(e){let t=$A(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function gd(e,t,i,a=!1){let s;typeof e=="string"?s=zl(e):(s={...e},Be(!s.pathname||!s.pathname.includes("?"),tg("?","pathname","search",s)),Be(!s.pathname||!s.pathname.includes("#"),tg("#","pathname","hash",s)),Be(!s.search||!s.search.includes("#"),tg("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,h;if(c==null)h=i;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}h=g>=0?t[g]:"/"}let u=DA(s,h),f=c&&c!=="/"&&c.endsWith("/"),p=(l||c===".")&&i.endsWith("/");return!u.pathname.endsWith("/")&&(f||p)&&(u.pathname+="/"),u}var Q2=e=>e.replace(/\/\/+/g,"/"),Br=e=>Q2(e.join("/")),Fu=e=>e.replace(/\/+$/,""),zA=e=>Fu(e).replace(/^\/*/,"/"),NA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,IA=class{constructor(e,t,i,a=!1){this.status=e,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function HA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jA(e){let t=e.map(i=>i.route.path).filter(Boolean);return Br(t)||"/"}var K2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J2(e,t){let i=e;if(typeof i!="string"||!FA.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,s=!1;if(K2)try{let l=new URL(window.location.href),c=i.startsWith("//")?new URL(l.protocol+i):new URL(i),h=wa(c.pathname,t);c.origin===l.origin&&h!=null?i=h+c.search+c.hash:s=!0}catch{Ar(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tv=["POST","PUT","PATCH","DELETE"];new Set(tv);var UA=["GET",...tv];new Set(UA);var Nl=z.createContext(null);Nl.displayName="DataRouter";var md=z.createContext(null);md.displayName="DataRouterState";var ev=z.createContext(!1);function PA(){return z.useContext(ev)}var iv=z.createContext({isTransitioning:!1});iv.displayName="ViewTransition";var WA=z.createContext(new Map);WA.displayName="Fetchers";var YA=z.createContext(null);YA.displayName="Await";var Qi=z.createContext(null);Qi.displayName="Navigation";var Bc=z.createContext(null);Bc.displayName="Location";var fr=z.createContext({outlet:null,matches:[],isDataRoute:!1});fr.displayName="Route";var Dm=z.createContext(null);Dm.displayName="RouteError";var rv="REACT_ROUTER_ERROR",GA="REDIRECT",XA="ROUTE_ERROR_RESPONSE";function VA(e){if(e.startsWith(`${rv}:${GA}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ZA(e){if(e.startsWith(`${rv}:${XA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new IA(t.status,t.statusText,t.data)}catch{}}function QA(e,{relative:t}={}){Be(ql(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=z.useContext(Qi),{hash:s,pathname:l,search:c}=Ec(e,{relative:t}),h=l;return i!=="/"&&(h=l==="/"?i:Br([i,l])),a.createHref({pathname:h,search:c,hash:s})}function ql(){return z.useContext(Bc)!=null}function Rr(){return Be(ql(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(Bc).location}var av="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nv(e){z.useContext(Qi).static||z.useLayoutEffect(e)}function os(){let{isDataRoute:e}=z.useContext(fr);return e?d3():KA()}function KA(){Be(ql(),"useNavigate() may be used only in the context of a <Router> component.");let e=z.useContext(Nl),{basename:t,navigator:i}=z.useContext(Qi),{matches:a}=z.useContext(fr),{pathname:s}=Rr(),l=JSON.stringify(Fm(a)),c=z.useRef(!1);return nv(()=>{c.current=!0}),z.useCallback((u,f={})=>{if(Ar(c.current,av),!c.current)return;if(typeof u=="number"){i.go(u);return}let p=gd(u,JSON.parse(l),s,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Br([t,p.pathname])),(f.replace?i.replace:i.push)(p,f.state,f)},[t,i,l,s,e])}var JA=z.createContext(null);function t3(e){let t=z.useContext(fr).outlet;return z.useMemo(()=>t&&z.createElement(JA.Provider,{value:e},t),[t,e])}function sv(){let{matches:e}=z.useContext(fr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Ec(e,{relative:t}={}){let{matches:i}=z.useContext(fr),{pathname:a}=Rr(),s=JSON.stringify(Fm(i));return z.useMemo(()=>gd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function e3(e,t){return lv(e,t)}function lv(e,t,i){var k;Be(ql(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=z.useContext(Qi),{matches:s}=z.useContext(fr),l=s[s.length-1],c=l?l.params:{},h=l?l.pathname:"/",u=l?l.pathnameBase:"/",f=l&&l.route;{let T=f&&f.path||"";cv(h,!f||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
-
61
- Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let p=Rr(),g;if(t){let T=typeof t=="string"?zl(t):t;Be(u==="/"||((k=T.pathname)==null?void 0:k.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${T.pathname}" was given in the \`location\` prop.`),g=T}else g=p;let x=g.pathname||"/",m=x;if(u!=="/"){let T=u.replace(/^\//,"").split("/");m="/"+x.replace(/^\//,"").split("/").slice(T.length).join("/")}let v=i&&i.state.matches.length?i.state.matches.map(T=>Object.assign(T,{route:i.manifest[T.route.id]||T.route})):X2(e,{pathname:m});Ar(f||v!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ar(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=s3(v&&v.map(T=>Object.assign({},T,{params:Object.assign({},c,T.params),pathname:Br([u,a.encodeLocation?a.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?u:Br([u,a.encodeLocation?a.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),s,i);return t&&C?z.createElement(Bc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},C):C}function i3(){let e=u3(),t=HA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:l},"ErrorBoundary")," or"," ",z.createElement("code",{style:l},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),i?z.createElement("pre",{style:s},i):null,c)}var r3=z.createElement(i3,null),ov=class extends z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=ZA(e.digest);i&&(e=i)}let t=e!==void 0?z.createElement(fr.Provider,{value:this.props.routeContext},z.createElement(Dm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?z.createElement(a3,{error:e},t):t}};ov.contextType=ev;var eg=new WeakMap;function a3({children:e,error:t}){let{basename:i}=z.useContext(Qi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=VA(t.digest);if(a){let s=eg.get(t);if(s)throw s;let l=J2(a.location,i);if(K2&&!eg.get(t))if(l.isExternal||a.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw eg.set(t,c),c}return z.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function n3({routeContext:e,match:t,children:i}){let a=z.useContext(Nl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),z.createElement(fr.Provider,{value:e},i)}function s3(e,t=[],i){let a=i==null?void 0:i.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,l=a==null?void 0:a.errors;if(l!=null){let p=s.findIndex(g=>g.route.id&&(l==null?void 0:l[g.route.id])!==void 0);Be(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let c=!1,h=-1;if(i&&a){c=a.renderFallback;for(let p=0;p<s.length;p++){let g=s[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=p),g.route.id){let{loaderData:x,errors:m}=a,v=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!m||m[g.route.id]===void 0);if(g.route.lazy||v){i.isStatic&&(c=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let u=i==null?void 0:i.onError,f=a&&u?(p,g)=>{var x,m;u(p,{location:a.location,params:((m=(x=a.matches)==null?void 0:x[0])==null?void 0:m.params)??{},pattern:jA(a.matches),errorInfo:g})}:void 0;return s.reduceRight((p,g,x)=>{let m,v=!1,C=null,k=null;a&&(m=l&&g.route.id?l[g.route.id]:void 0,C=g.route.errorElement||r3,c&&(h<0&&x===0?(cv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,k=null):h===x&&(v=!0,k=g.route.hydrateFallbackElement||null)));let T=t.concat(s.slice(0,x+1)),_=()=>{let B;return m?B=C:v?B=k:g.route.Component?B=z.createElement(g.route.Component,null):g.route.element?B=g.route.element:B=p,z.createElement(n3,{match:g,routeContext:{outlet:p,matches:T,isDataRoute:a!=null},children:B})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?z.createElement(ov,{location:a.location,revalidation:a.revalidation,component:C,error:m,children:_(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:f}):_()},null)}function $m(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l3(e){let t=z.useContext(Nl);return Be(t,$m(e)),t}function o3(e){let t=z.useContext(md);return Be(t,$m(e)),t}function c3(e){let t=z.useContext(fr);return Be(t,$m(e)),t}function zm(e){let t=c3(e),i=t.matches[t.matches.length-1];return Be(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function h3(){return zm("useRouteId")}function u3(){var a;let e=z.useContext(Dm),t=o3("useRouteError"),i=zm("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[i]}function d3(){let{router:e}=l3("useNavigate"),t=zm("useNavigate"),i=z.useRef(!1);return nv(()=>{i.current=!0}),z.useCallback(async(s,l={})=>{Ar(i.current,av),i.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var K1={};function cv(e,t,i){!t&&!K1[e]&&(K1[e]=!0,Ar(!1,i))}z.memo(f3);function f3({routes:e,manifest:t,future:i,state:a,isStatic:s,onError:l}){return lv(e,void 0,{manifest:t,state:a,isStatic:s,onError:l})}function p3({to:e,replace:t,state:i,relative:a}){Be(ql(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=z.useContext(Qi);Ar(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=z.useContext(fr),{pathname:c}=Rr(),h=os(),u=gd(e,Fm(l),c,a==="path"),f=JSON.stringify(u);return z.useEffect(()=>{h(JSON.parse(f),{replace:t,state:i,relative:a})},[h,f,a,t,i]),null}function g3(e){return t3(e.context)}function Ca(e){Be(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function m3({basename:e="/",children:t=null,location:i,navigationType:a="POP",navigator:s,static:l=!1,useTransitions:c}){Be(!ql(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),u=z.useMemo(()=>({basename:h,navigator:s,static:l,useTransitions:c,future:{}}),[h,s,l,c]);typeof i=="string"&&(i=zl(i));let{pathname:f="/",search:p="",hash:g="",state:x=null,key:m="default",mask:v}=i,C=z.useMemo(()=>{let k=wa(f,h);return k==null?null:{location:{pathname:k,search:p,hash:g,state:x,key:m,mask:v},navigationType:a}},[h,f,p,g,x,m,a,v]);return Ar(C!=null,`<Router basename="${h}"> is not able to match the URL "${f}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:z.createElement(Qi.Provider,{value:u},z.createElement(Bc.Provider,{children:t,value:C}))}function y3({children:e,location:t}){return e3(Bg(e),t)}function Bg(e,t=[]){let i=[];return z.Children.forEach(e,(a,s)=>{if(!z.isValidElement(a))return;let l=[...t,s];if(a.type===z.Fragment){i.push.apply(i,Bg(a.props.children,l));return}Be(a.type===Ca,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||l.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=Bg(a.props.children,l)),i.push(c)}),i}var yu="get",xu="application/x-www-form-urlencoded";function yd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function x3(e){return yd(e)&&e.tagName.toLowerCase()==="button"}function b3(e){return yd(e)&&e.tagName.toLowerCase()==="form"}function C3(e){return yd(e)&&e.tagName.toLowerCase()==="input"}function v3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function k3(e,t){return e.button===0&&(!t||t==="_self")&&!v3(e)}var eu=null;function S3(){if(eu===null)try{new FormData(document.createElement("form"),0),eu=!1}catch{eu=!0}return eu}var T3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ig(e){return e!=null&&!T3.has(e)?(Ar(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xu}"`),null):e}function w3(e,t){let i,a,s,l,c;if(b3(e)){let h=e.getAttribute("action");a=h?wa(h,t):null,i=e.getAttribute("method")||yu,s=ig(e.getAttribute("enctype"))||xu,l=new FormData(e)}else if(x3(e)||C3(e)&&(e.type==="submit"||e.type==="image")){let h=e.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||h.getAttribute("action");if(a=u?wa(u,t):null,i=e.getAttribute("formmethod")||h.getAttribute("method")||yu,s=ig(e.getAttribute("formenctype"))||ig(h.getAttribute("enctype"))||xu,l=new FormData(h,e),!S3()){let{name:f,type:p,value:g}=e;if(p==="image"){let x=f?`${f}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else f&&l.append(f,g)}}else{if(yd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=yu,a=null,s=xu,c=e}return l&&s==="text/plain"&&(c=l,l=void 0),{action:a,method:i.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hv(e,t,i,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&wa(s.pathname,t)==="/"?s.pathname=`${Fu(t)}/_root.${a}`:s.pathname=`${Fu(s.pathname)}.${a}`,s}async function _3(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function B3(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function E3(e,t,i){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await _3(l,i);return c.links?c.links():[]}return[]}));return R3(a.flat(1).filter(B3).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function J1(e,t,i,a,s,l){let c=(u,f)=>i[f]?u.route.id!==i[f].route.id:!0,h=(u,f)=>{var p;return i[f].pathname!==u.pathname||((p=i[f].route.path)==null?void 0:p.endsWith("*"))&&i[f].params["*"]!==u.params["*"]};return l==="assets"?t.filter((u,f)=>c(u,f)||h(u,f)):l==="data"?t.filter((u,f)=>{var g;let p=a.routes[u.route.id];if(!p||!p.hasLoader)return!1;if(c(u,f)||h(u,f))return!0;if(u.route.shouldRevalidate){let x=u.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=i[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function L3(e,t,{includeHydrateFallback:i}={}){return A3(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function A3(e){return[...new Set(e)]}function M3(e){let t={},i=Object.keys(e).sort();for(let a of i)t[a]=e[a];return t}function R3(e,t){let i=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(M3(s));return i.has(l)||(i.add(l),a.push({key:l,link:s})),a},[])}function qm(){let e=z.useContext(Nl);return Nm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function O3(){let e=z.useContext(md);return Nm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Im=z.createContext(void 0);Im.displayName="FrameworkContext";function Hm(){let e=z.useContext(Im);return Nm(e,"You must render this element inside a <HydratedRouter> element"),e}function F3(e,t){let i=z.useContext(Im),[a,s]=z.useState(!1),[l,c]=z.useState(!1),{onFocus:h,onBlur:u,onMouseEnter:f,onMouseLeave:p,onTouchStart:g}=t,x=z.useRef(null);z.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=T=>{T.forEach(_=>{c(_.isIntersecting)})},k=new IntersectionObserver(C,{threshold:.5});return x.current&&k.observe(x.current),()=>{k.disconnect()}}},[e]),z.useEffect(()=>{if(a){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[a]);let m=()=>{s(!0)},v=()=>{s(!1),c(!1)};return i?e!=="intent"?[l,x,{}]:[l,x,{onFocus:Ho(h,m),onBlur:Ho(u,v),onMouseEnter:Ho(f,m),onMouseLeave:Ho(p,v),onTouchStart:Ho(g,m)}]:[!1,x,{}]}function Ho(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function D3({page:e,...t}){let i=PA(),{router:a}=qm(),s=z.useMemo(()=>X2(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?i?z.createElement(z3,{page:e,matches:s,...t}):z.createElement(N3,{page:e,matches:s,...t}):null}function $3(e){let{manifest:t,routeModules:i}=Hm(),[a,s]=z.useState([]);return z.useEffect(()=>{let l=!1;return E3(e,t,i).then(c=>{l||s(c)}),()=>{l=!0}},[e,t,i]),a}function z3({page:e,matches:t,...i}){let a=Rr(),{future:s}=Hm(),{basename:l}=qm(),c=z.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let h=hv(e,l,s.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,f=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?u=!0:f.push(p.route.id);return u&&f.length>0&&h.searchParams.set("_routes",f.join(",")),[h.pathname+h.search]},[l,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return z.createElement(z.Fragment,null,c.map(h=>z.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function N3({page:e,matches:t,...i}){let a=Rr(),{future:s,manifest:l,routeModules:c}=Hm(),{basename:h}=qm(),{loaderData:u,matches:f}=O3(),p=z.useMemo(()=>J1(e,t,f,l,a,"data"),[e,t,f,l,a]),g=z.useMemo(()=>J1(e,t,f,l,a,"assets"),[e,t,f,l,a]),x=z.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let C=new Set,k=!1;if(t.forEach(_=>{var O;let B=l.routes[_.route.id];!B||!B.hasLoader||(!p.some(D=>D.route.id===_.route.id)&&_.route.id in u&&((O=c[_.route.id])!=null&&O.shouldRevalidate)||B.hasClientLoader?k=!0:C.add(_.route.id))}),C.size===0)return[];let T=hv(e,h,s.unstable_trailingSlashAwareDataRequests,"data");return k&&C.size>0&&T.searchParams.set("_routes",t.filter(_=>C.has(_.route.id)).map(_=>_.route.id).join(",")),[T.pathname+T.search]},[h,s.unstable_trailingSlashAwareDataRequests,u,a,l,p,t,e,c]),m=z.useMemo(()=>L3(g,l),[g,l]),v=$3(g);return z.createElement(z.Fragment,null,x.map(C=>z.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...i})),m.map(C=>z.createElement("link",{key:C,rel:"modulepreload",href:C,...i})),v.map(({key:C,link:k})=>z.createElement("link",{key:C,nonce:i.nonce,...k,crossOrigin:k.crossOrigin??i.crossOrigin})))}function q3(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var I3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{I3&&(window.__reactRouterVersion="7.15.1")}catch{}function H3({basename:e,children:t,useTransitions:i,window:a}){let s=z.useRef();s.current==null&&(s.current=mA({window:a,v5Compat:!0}));let l=s.current,[c,h]=z.useState({action:l.action,location:l.location}),u=z.useCallback(f=>{i===!1?h(f):z.startTransition(()=>h(f))},[i]);return z.useLayoutEffect(()=>l.listen(u),[l,u]),z.createElement(m3,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:i})}var uv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dv=z.forwardRef(function({onClick:t,discover:i="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,mask:h,state:u,target:f,to:p,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:m,...v},C){let{basename:k,navigator:T,useTransitions:_}=z.useContext(Qi),B=typeof p=="string"&&uv.test(p),O=J2(p,k);p=O.to;let D=QA(p,{relative:s}),N=Rr(),H=null;if(h){let Y=gd(h,[],N.mask?N.mask.pathname:"/",!0);k!=="/"&&(Y.pathname=Y.pathname==="/"?k:Br([k,Y.pathname])),H=T.createHref(Y)}let[R,Z,P]=F3(a,v),W=P3(p,{replace:c,mask:h,state:u,target:f,preventScrollReset:g,relative:s,viewTransition:x,defaultShouldRevalidate:m,useTransitions:_});function et(Y){t&&t(Y),Y.defaultPrevented||W(Y)}let tt=!(O.isExternal||l),X=z.createElement("a",{...v,...P,href:(tt?H:void 0)||O.absoluteURL||D,onClick:tt?et:t,ref:q3(C,Z),target:f,"data-discover":!B&&i==="render"?"true":void 0});return R&&!B?z.createElement(z.Fragment,null,X,z.createElement(D3,{page:D})):X});dv.displayName="Link";var fv=z.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:h,children:u,...f},p){let g=Ec(c,{relative:f.relative}),x=Rr(),m=z.useContext(md),{navigator:v,basename:C}=z.useContext(Qi),k=m!=null&&V3(g)&&h===!0,T=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,_=x.pathname,B=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(_=_.toLowerCase(),B=B?B.toLowerCase():null,T=T.toLowerCase()),B&&C&&(B=wa(B,C)||B);const O=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let D=_===T||!s&&_.startsWith(T)&&_.charAt(O)==="/",N=B!=null&&(B===T||!s&&B.startsWith(T)&&B.charAt(T.length)==="/"),H={isActive:D,isPending:N,isTransitioning:k},R=D?t:void 0,Z;typeof a=="function"?Z=a(H):Z=[a,D?"active":null,N?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let P=typeof l=="function"?l(H):l;return z.createElement(dv,{...f,"aria-current":R,className:Z,ref:p,style:P,to:c,viewTransition:h},typeof u=="function"?u(H):u)});fv.displayName="NavLink";var j3=z.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:a,replace:s,state:l,method:c=yu,action:h,onSubmit:u,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x,...m},v)=>{let{useTransitions:C}=z.useContext(Qi),k=G3(),T=X3(h,{relative:f}),_=c.toLowerCase()==="get"?"get":"post",B=typeof h=="string"&&uv.test(h),O=D=>{if(u&&u(D),D.defaultPrevented)return;D.preventDefault();let N=D.nativeEvent.submitter,H=(N==null?void 0:N.getAttribute("formmethod"))||c,R=()=>k(N||D.currentTarget,{fetcherKey:t,method:H,navigate:i,replace:s,state:l,relative:f,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x});C&&i!==!1?z.startTransition(()=>R()):R()};return z.createElement("form",{ref:v,method:_,action:T,onSubmit:a?u:O,...m,"data-discover":!B&&e==="render"?"true":void 0})});j3.displayName="Form";function U3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pv(e){let t=z.useContext(Nl);return Be(t,U3(e)),t}function P3(e,{target:t,replace:i,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:u,useTransitions:f}={}){let p=os(),g=Rr(),x=Ec(e,{relative:c});return z.useCallback(m=>{if(k3(m,t)){m.preventDefault();let v=i!==void 0?i:pc(g)===pc(x),C=()=>p(e,{replace:v,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:h,defaultShouldRevalidate:u});f?z.startTransition(()=>C()):C()}},[g,p,x,i,a,s,t,e,l,c,h,u,f])}var W3=0,Y3=()=>`__${String(++W3)}__`;function G3(){let{router:e}=pv("useSubmit"),{basename:t}=z.useContext(Qi),i=h3(),a=e.fetch,s=e.navigate;return z.useCallback(async(l,c={})=>{let{action:h,method:u,encType:f,formData:p,body:g}=w3(l,t);if(c.navigate===!1){let x=c.fetcherKey||Y3();await a(x,i,c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||u,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||h,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:g,formMethod:c.method||u,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,i])}function X3(e,{relative:t}={}){let{basename:i}=z.useContext(Qi),a=z.useContext(fr);Be(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Ec(e||".",{relative:t})},c=Rr();if(e==null){l.search=c.search;let h=new URLSearchParams(l.search),u=h.getAll("index");if(u.some(p=>p==="")){h.delete("index"),u.filter(g=>g).forEach(g=>h.append("index",g));let p=h.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(l.pathname=l.pathname==="/"?i:Br([i,l.pathname])),pc(l)}function V3(e,{relative:t}={}){let i=z.useContext(iv);Be(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=pv("useViewTransitionState"),s=Ec(e,{relative:t});if(!i.isTransitioning)return!1;let l=wa(i.currentLocation.pathname,a)||i.currentLocation.pathname,c=wa(i.nextLocation.pathname,a)||i.nextLocation.pathname;return Ou(s.pathname,c)!=null||Ou(s.pathname,l)!=null}const Z3="",Q3=`ws://${window.location.host}`;class K3{constructor(t=Z3,i=Q3){Lt(this,"baseUrl");Lt(this,"wsBaseUrl");Lt(this,"apiKey");Lt(this,"ws",null);Lt(this,"wsHandlers",new Map);this.baseUrl=t,this.wsBaseUrl=i,this.apiKey=""}setApiKey(t){this.apiKey=t}headers(){const t={"Content-Type":"application/json"};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}authHeaders(){const t={};return this.apiKey&&(t.Authorization=`Bearer ${this.apiKey}`),t}async health(){return(await fetch(`${this.baseUrl}/health`)).json()}async chatCompletions(t){var l,c,h,u,f,p,g;if(t.stream)return this.chatCompletionsSSE(t);const i=await fetch(`${this.baseUrl}/v1/chat/completions`,{method:"POST",headers:this.headers(),body:JSON.stringify({model:t.model??"aggroot",messages:t.messages,stream:!1,chatId:t.chatId}),signal:t.signal});if(!i.ok){const x=await i.json().catch(()=>({error:{message:i.statusText}}));(c=t.onError)==null||c.call(t,((l=x.error)==null?void 0:l.message)??"Request failed");return}const a=await i.json(),s={v:1,id:a.id,type:"stream.content",payload:{content:((f=(u=(h=a.choices)==null?void 0:h[0])==null?void 0:u.message)==null?void 0:f.content)??"",messageId:a.id},ts:Date.now(),sessionId:t.chatId??""};(p=t.onChunk)==null||p.call(t,s),(g=t.onDone)==null||g.call(t)}async chatCompletionsSSE(t){var h,u,f,p,g,x,m,v,C,k,T,_,B,O,D,N,H;const i=await fetch(`${this.baseUrl}/v1/chat/completions`,{method:"POST",headers:this.headers(),body:JSON.stringify({model:t.model??"aggroot",messages:t.messages,stream:!0,chatId:t.chatId}),signal:t.signal});if(!i.ok){const R=await i.json().catch(()=>({error:{message:i.statusText}}));(u=t.onError)==null||u.call(t,((h=R.error)==null?void 0:h.message)??"Request failed");return}const a=(f=i.body)==null?void 0:f.getReader();if(!a){(p=t.onError)==null||p.call(t,"No response body");return}const s=new TextDecoder;let l="",c="";for(;;){const{done:R,value:Z}=await a.read();if(R)break;l+=s.decode(Z,{stream:!0});const P=l.split(`
62
- `);l=P.pop()??"";for(const W of P)if(W.startsWith("event: "))c=W.slice(7).trim();else if(W.startsWith("data: ")){const et=W.slice(6).trim();if(et==="[DONE]"){(g=t.onDone)==null||g.call(t);return}try{const tt=JSON.parse(et);if(c==="tool_result")(x=t.onToolResult)==null||x.call(t,tt);else if(c==="status")(m=t.onStatus)==null||m.call(t,tt);else if(c==="subagent")(v=t.onSubagent)==null||v.call(t,tt);else if(c==="tool_use")(C=t.onToolUse)==null||C.call(t,tt);else{const X=(T=(k=tt.choices)==null?void 0:k[0])==null?void 0:T.delta;if(X){if(X.content){const Y={v:1,id:tt.id,type:"stream.content",payload:{content:X.content,messageId:tt.id},ts:(tt.created??0)*1e3,sessionId:t.chatId??""};(_=t.onChunk)==null||_.call(t,Y)}if(X.reasoning_content){const Y={v:1,id:tt.id,type:"stream.reasoning",payload:{content:X.reasoning_content,messageId:tt.id},ts:(tt.created??0)*1e3,sessionId:t.chatId??""};(B=t.onChunk)==null||B.call(t,Y)}if(X.tool_calls)for(const Y of X.tool_calls){const M={v:1,id:tt.id,type:"stream.tool_call",payload:{toolCallId:Y.id,toolName:(O=Y.function)==null?void 0:O.name,argsPreview:(D=Y.function)==null?void 0:D.arguments,riskLevel:"safe"},ts:(tt.created??0)*1e3,sessionId:t.chatId??""};(N=t.onChunk)==null||N.call(t,M)}}}}catch{}c=""}else W.trim()===""&&(c="")}(H=t.onDone)==null||H.call(t)}async listSessions(){return((await(await fetch(`${this.baseUrl}/api/sessions`,{headers:this.authHeaders()})).json()).sessions??[]).map(s=>({id:s.id??s.sessionId,name:s.name,agentName:s.agentName??s.agentType,agentType:s.agentType??s.agentName,messageCount:s.messageCount??0,createdAt:s.createdAt}))}async createSession(t,i){const s=await(await fetch(`${this.baseUrl}/api/sessions`,{method:"POST",headers:this.headers(),body:JSON.stringify({name:t,agentType:i})})).json();return{id:s.id??s.sessionId,name:s.name,agentName:s.agentName??s.agentType,agentType:s.agentType??s.agentName,createdAt:s.createdAt}}async listModels(){return(await(await fetch(`${this.baseUrl}/v1/models`,{headers:this.authHeaders()})).json()).data??[]}async switchModel(t){return(await fetch(`${this.baseUrl}/api/models/switch`,{method:"POST",headers:this.headers(),body:JSON.stringify({modelId:t})})).json()}async getStatus(){return(await fetch(`${this.baseUrl}/api/status`,{headers:this.authHeaders()})).json()}async deleteSession(t){var a;const i=await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"DELETE",headers:this.authHeaders()});if(!i.ok){const s=await i.json().catch(()=>({error:{message:i.statusText}}));throw new Error(((a=s.error)==null?void 0:a.message)??`Delete failed: ${i.status}`)}return i.json()}async deleteAllSessions(){var i;const t=await fetch(`${this.baseUrl}/api/sessions`,{method:"DELETE",headers:this.authHeaders()});if(!t.ok){const a=await t.json().catch(()=>({error:{message:t.statusText}}));throw new Error(((i=a.error)==null?void 0:i.message)??`Delete all failed: ${t.status}`)}return t.json()}async clearSession(t){var a;const i=await fetch(`${this.baseUrl}/api/sessions/${t}/clear`,{method:"POST",headers:this.authHeaders()});if(!i.ok){const s=await i.json().catch(()=>({error:{message:i.statusText}}));throw new Error(((a=s.error)==null?void 0:a.message)??`Clear failed: ${i.status}`)}return i.json()}async renameSession(t,i){return(await fetch(`${this.baseUrl}/api/sessions/${t}`,{method:"PATCH",headers:this.headers(),body:JSON.stringify({name:i})})).json()}async activateSession(t){return(await fetch(`${this.baseUrl}/api/sessions/${t}/activate`,{method:"POST",headers:this.authHeaders()})).json()}async fetchMessages(t){return(await(await fetch(`${this.baseUrl}/api/sessions/${t}/messages`,{headers:this.authHeaders()})).json()).messages??[]}async listAgents(){return(await fetch(`${this.baseUrl}/api/agents`,{headers:this.authHeaders()})).json()}async switchAgent(t){return(await fetch(`${this.baseUrl}/api/agents/switch`,{method:"POST",headers:this.headers(),body:JSON.stringify({agentName:t})})).json()}async getSettings(){return(await fetch(`${this.baseUrl}/api/settings`,{headers:this.authHeaders()})).json()}async updateSettings(t){return(await fetch(`${this.baseUrl}/api/settings`,{method:"PATCH",headers:this.headers(),body:JSON.stringify(t)})).json()}async addCustomModel(t){return(await fetch(`${this.baseUrl}/api/custom-models`,{method:"POST",headers:this.headers(),body:JSON.stringify(t)})).json()}async removeCustomModel(t){return(await fetch(`${this.baseUrl}/api/custom-models/${encodeURIComponent(t)}`,{method:"DELETE",headers:this.authHeaders()})).json()}async abort(){return(await fetch(`${this.baseUrl}/api/abort`,{method:"POST",headers:this.authHeaders()})).json()}async respondApproval(t,i){await fetch(`${this.baseUrl}/api/approval/respond`,{method:"POST",headers:this.headers(),body:JSON.stringify({requestId:t,approved:i})})}connectWebSocket(t,i){const a=`${this.wsBaseUrl}/ws`,s=new WebSocket(a);return this.ws=s,s.onopen=()=>{this.wsHandlers.set(t,i)},s.onmessage=l=>{try{const c=JSON.parse(l.data);i(c)}catch{}},s.onclose=()=>{this.wsHandlers.delete(t),this.ws=null},()=>{s.close()}}sendWebSocketMessage(t,i){if(!this.ws||this.ws.readyState!==WebSocket.OPEN)return;const a={v:1,id:`msg_${Date.now()}`,type:"chat.send",payload:{message:i},ts:Date.now(),sessionId:t};this.ws.send(JSON.stringify(a))}async transcribeAudio(t,i){var s;const a=await fetch(`${this.baseUrl}/api/audio/transcribe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audio:t,language:i})});if(!a.ok){const l=await a.json().catch(()=>({error:{message:"Transcription failed"}}));throw new Error(((s=l.error)==null?void 0:s.message)||"Transcription failed")}return a.json()}async synthesizeAudio(t,i){var s;const a=await fetch(`${this.baseUrl}/api/audio/synthesize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t,...i})});if(!a.ok){const l=await a.json().catch(()=>({error:{message:"Synthesis failed"}}));throw new Error(((s=l.error)==null?void 0:s.message)||"Synthesis failed")}return a.arrayBuffer()}async listMeetings(){const t=await fetch(`${this.baseUrl}/api/meetings`,{headers:this.authHeaders()});if(!t.ok)throw new Error("Failed to list meetings");return t.json()}async createMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings`,{method:"POST",headers:this.headers(),body:JSON.stringify({title:t})});if(!i.ok)throw new Error("Failed to create meeting");return i.json()}async getMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings/${t}`,{headers:this.authHeaders()});if(!i.ok)throw new Error("Failed to get meeting");return i.json()}async stopMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings/${t}/stop`,{method:"POST",headers:this.authHeaders()});if(!i.ok)throw new Error("Failed to stop meeting");return i.json()}async appendMeetingTranscript(t,i){const a=await fetch(`${this.baseUrl}/api/meetings/${t}/transcript`,{method:"POST",headers:this.headers(),body:JSON.stringify({text:i})});if(!a.ok)throw new Error("Failed to append transcript");return a.json()}async deleteMeeting(t){const i=await fetch(`${this.baseUrl}/api/meetings/${t}`,{method:"DELETE",headers:this.authHeaders()});if(!i.ok)throw new Error("Failed to delete meeting");return i.json()}async exportMeeting(t,i){var s;const a=await fetch(`${this.baseUrl}/api/meetings/${t}/export?format=${i}`,{headers:this.authHeaders()});if(!a.ok){const l=await a.json().catch(()=>({error:{message:"Export failed"}}));throw new Error(((s=l.error)==null?void 0:s.message)||"Export failed")}return a.blob()}async exportMeetingAI(t,i,a){var C,k,T,_;const s=await fetch(`${this.baseUrl}/api/meetings/${t}/export-ai`,{method:"POST",headers:this.headers(),body:JSON.stringify({format:i}),signal:a==null?void 0:a.signal});if(!s.ok){const B=await s.json().catch(()=>({error:{message:"AI export failed"}}));throw new Error(((C=B.error)==null?void 0:C.message)||"AI export failed")}const l=(k=s.body)==null?void 0:k.getReader();if(!l)throw new Error("No response body for SSE stream");const c=new TextDecoder;let h="",u=null,f="",p=null,g=[];for(;;){const{done:B,value:O}=await l.read();if(B)break;h+=c.decode(O,{stream:!0});const D=h.split(`
63
- `);h=D.pop()??"";for(const N of D)if(N.startsWith("event: "))f=N.slice(7).trim();else if(N.startsWith("data: "))g.push(N.slice(6));else if(N.trim()===""){if(g.length>0){const H=g.join("");g=[];try{const R=JSON.parse(H);f==="status"?(T=a==null?void 0:a.onStatus)==null||T.call(a,R):f==="error"?(p=R.message||"AI export failed",(_=a==null?void 0:a.onError)==null||_.call(a,p)):f==="result"&&(u=R)}catch{}}f=""}}if(g.length>0){const B=g.join("");try{const O=JSON.parse(B);f==="result"?u=O:f==="error"&&(p=O.message||"AI export failed")}catch{}}if(p)throw new Error(p);if(!(u!=null&&u.data))throw new Error("AI export did not return file data");const x=atob(u.data),m=new Uint8Array(x.length);for(let B=0;B<x.length;B++)m[B]=x.charCodeAt(B);const v=u.format==="pptx"?"application/vnd.openxmlformats-officedocument.presentationml.presentation":"application/vnd.openxmlformats-officedocument.wordprocessingml.document";return new Blob([m],{type:v})}async summarizeMeeting(t,i){var g,x,m,v;const a=await fetch(`${this.baseUrl}/api/meetings/${t}/summarize`,{method:"POST",headers:this.headers(),signal:i==null?void 0:i.signal});if(!a.ok){const C=await a.json().catch(()=>({error:{message:"Summarize failed"}}));throw new Error(((g=C.error)==null?void 0:g.message)||"Summarize failed")}const s=(x=a.body)==null?void 0:x.getReader();if(!s)throw new Error("No response body");const l=new TextDecoder;let c="",h="",u=[],f="",p=null;for(;;){const{done:C,value:k}=await s.read();if(C)break;c+=l.decode(k,{stream:!0});const T=c.split(`
64
- `);c=T.pop()??"";for(const _ of T)if(_.startsWith("event: "))h=_.slice(7).trim();else if(_.startsWith("data: "))u.push(_.slice(6));else if(_.trim()===""){if(u.length>0){const B=u.join("");u=[];try{const O=JSON.parse(B);h==="status"?(m=i==null?void 0:i.onStatus)==null||m.call(i,O):h==="error"?(p=O.message||"Summarize failed",(v=i==null?void 0:i.onError)==null||v.call(i,p)):h==="result"&&(f=O.aiSummary||"")}catch{}}h=""}}if(p)throw new Error(p);return f}async getAudioSettings(){const t=await fetch(`${this.baseUrl}/api/audio/settings`,{headers:this.authHeaders()});if(!t.ok)throw new Error("Failed to get audio settings");return t.json()}async updateAudioSettings(t){const i=await fetch(`${this.baseUrl}/api/audio/settings`,{method:"PATCH",headers:this.headers(),body:JSON.stringify(t)});if(!i.ok)throw new Error("Failed to update audio settings");return i.json()}}const Wt=new K3,gv=z.createContext({currentSession:null,contextPercentage:0,status:null,setCurrentSession:()=>{},refreshStatus:async()=>{},getMessageCache:()=>[],setMessageCache:()=>{},clearMessageCache:()=>{}});function xd(){return z.useContext(gv)}function J3({children:e}){const[t,i]=z.useState(null),[a,s]=z.useState(null),[l,c]=z.useState(0),h=os(),u=Rr(),f=z.useRef(!1),p=z.useRef(new Map),g=z.useCallback(C=>p.current.get(C)??[],[]),x=z.useCallback((C,k)=>{p.current.set(C,k)},[]),m=z.useCallback(C=>{p.current.delete(C)},[]),v=z.useCallback(async()=>{try{const C=await Wt.getStatus();i(C),c(C.contextPercentage??0),C.currentSession?(s({id:C.currentSession.id,name:C.currentSession.name,messageCount:C.currentSession.messageCount}),f.current||(f.current=!0,u.pathname==="/chat"&&h(`/chat/${C.currentSession.id}`,{replace:!0}))):f.current=!0}catch{}},[h,u.pathname]);return z.useEffect(()=>{v();const C=setInterval(v,3e3);return()=>clearInterval(C)},[v]),L.jsx(gv.Provider,{value:{currentSession:a,contextPercentage:l,status:t,setCurrentSession:s,refreshStatus:v,getMessageCache:g,setMessageCache:x,clearMessageCache:m},children:e})}const tM=[{to:"/chat",label:"Chat",icon:"💬"},{to:"/sessions",label:"Sessions",icon:"📋"},{to:"/meetings",label:"Meetings",icon:"🎙️"},{to:"/settings",label:"Settings",icon:"⚙️"}];function eM(){const{currentSession:e,contextPercentage:t,status:i,setCurrentSession:a,refreshStatus:s}=xd(),l=os(),c=t??0,h=c>50?"var(--safe)":c>20?"var(--moderate)":"var(--dangerous)";return L.jsxs("div",{style:{display:"flex",height:"100vh"},children:[L.jsxs("nav",{style:{width:220,minWidth:220,background:"var(--bg-secondary)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",padding:"12px 0"},children:[L.jsxs("div",{style:{padding:"12px 16px",fontSize:18,fontWeight:700,borderBottom:"1px solid var(--border)",marginBottom:8},children:[L.jsx("span",{className:"gradient-text",children:"AggRoot"}),L.jsxs("span",{style:{fontSize:11,fontWeight:400,color:"var(--text-tertiary)",marginLeft:6},children:["v","1.10.5"]})]}),tM.map(u=>L.jsxs(fv,{to:u.to,style:({isActive:f})=>({display:"flex",alignItems:"center",gap:10,padding:"10px 16px",color:f?"var(--text-primary)":"var(--text-secondary)",background:f?"var(--bg-hover)":"transparent",textDecoration:"none",fontSize:14,borderLeft:f?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.15s"}),children:[L.jsx("span",{children:u.icon}),L.jsx("span",{children:u.label})]},u.to)),L.jsx("div",{style:{flex:1}}),L.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--border)",fontSize:12,color:"var(--text-muted)"},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:10},children:[L.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i?"var(--emerald)":"var(--text-muted)",boxShadow:i?"0 0 6px var(--emerald)":"none"}}),i?"Connected":"Disconnected"]}),e?L.jsxs("div",{onClick:()=>l(`/chat/${e.id}`),style:{padding:"8px 10px",background:"var(--accent-soft)",borderRadius:"var(--radius)",cursor:"pointer",transition:"background 0.15s",marginBottom:8,border:"1px solid rgba(99, 102, 241, 0.15)"},onMouseEnter:u=>u.currentTarget.style.background="var(--bg-hover)",onMouseLeave:u=>u.currentTarget.style.background="var(--accent-soft)",children:[L.jsx("div",{style:{fontSize:10,color:"var(--accent)",marginBottom:2,fontWeight:600},children:"Current Session"}),L.jsx("div",{style:{color:"var(--text-secondary)",fontSize:12,fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),L.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:[e.messageCount," messages"]})]}):L.jsx("div",{style:{padding:"8px 10px",background:"var(--bg-tertiary)",borderRadius:"var(--radius)",marginBottom:8,fontSize:12,color:"var(--text-muted)"},children:"No active session"}),(i==null?void 0:i.model)&&L.jsxs("div",{style:{marginBottom:8},children:[L.jsx("div",{style:{height:4,background:"rgba(255,255,255,0.05)",borderRadius:2,overflow:"hidden"},children:L.jsx("div",{style:{height:"100%",width:`${c}%`,background:"linear-gradient(90deg, var(--emerald), var(--amber), var(--rose))",borderRadius:2,transition:"width 0.3s",boxShadow:`0 0 8px ${c>50?"var(--emerald)":c>20?"var(--amber)":"var(--rose)"}`}})}),L.jsxs("div",{style:{fontSize:10,marginTop:2,color:h,fontWeight:500},children:["Context: ",c,"%"]})]})]})]}),L.jsx("main",{style:{flex:1,overflow:"auto",background:"var(--bg-primary)"},children:L.jsx(g3,{})})]})}function mv(){const[e,t]=z.useState(!1),[i,a]=z.useState(!1),[s,l]=z.useState(""),[c,h]=z.useState(null),u=z.useRef(null),f=z.useRef(null),p=z.useRef([]),g=z.useRef(null),x=z.useRef(null),m=z.useRef(null),v=z.useRef(""),C=z.useCallback(()=>{const H=v.current;return H?(v.current="",H):""},[]),k=z.useRef({ttsProvider:"edge",ttsVoice:"zh-CN-XiaoxiaoNeural",ttsRate:"+0%"}),T=z.useCallback(H=>{k.current={...k.current,...H}},[]),_=z.useCallback(async()=>{try{h(null),l(""),v.current="";const H=window.SpeechRecognition||window.webkitSpeechRecognition;if(H){const R=new H;R.continuous=!0,R.interimResults=!0,R.lang="zh-CN",R.onresult=Z=>{let P="",W="";for(let et=Z.resultIndex;et<Z.results.length;et++)Z.results[et].isFinal?P+=Z.results[et][0].transcript:W+=Z.results[et][0].transcript;P&&(v.current+=P),l(v.current+W)},R.onerror=Z=>{console.error("[useVoice] Speech recognition error:",Z.error),Z.error==="not-allowed"?h("Microphone access denied"):Z.error!=="aborted"&&h(`Speech recognition error: ${Z.error}`),t(!1),m.current=null},R.onend=()=>{if(m.current)try{R.start()}catch{}},m.current=R,R.start(),t(!0)}else{const R=await navigator.mediaDevices.getUserMedia({audio:!0});f.current=R;const Z=new MediaRecorder(R,{mimeType:MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm"});u.current=Z,p.current=[],Z.ondataavailable=W=>{W.data.size>0&&p.current.push(W.data)},Z.start(1e3);const P=setInterval(async()=>{if(p.current.length===0)return;const W=new Blob(p.current,{type:"audio/webm"});p.current=[];try{const et=await W.arrayBuffer(),tt=new Uint8Array(et);let X="";for(let I=0;I<tt.byteLength;I++)X+=String.fromCharCode(tt[I]);const Y=window.btoa(X),M=await Wt.transcribeAudio(Y);M.text&&l(I=>I?I+" "+M.text:M.text)}catch{}},5e3);Z._chunkTimer=P,t(!0)}}catch(H){h(H instanceof Error?H.message:"Failed to start recording")}},[]),B=z.useCallback(()=>{if(m.current){const R=m.current;m.current=null;try{R.stop()}catch{}}const H=u.current;if(H&&H.state!=="inactive"){const R=H._chunkTimer;R&&clearInterval(R),H.stop()}f.current&&(f.current.getTracks().forEach(R=>R.stop()),f.current=null),u.current=null,t(!1)},[]),O=z.useCallback(()=>{g.current&&(window.speechSynthesis.cancel(),g.current=null),x.current&&(x.current.pause(),x.current.src="",x.current=null),a(!1)},[]),D=z.useCallback(async H=>{O();const R=k.current;if(R.ttsProvider==="edge")try{const P=await Wt.synthesizeAudio(H,{voice:R.ttsVoice,rate:R.ttsRate}),W=new Blob([P],{type:"audio/mpeg"}),et=URL.createObjectURL(W),tt=new Audio(et);x.current=tt,a(!0),tt.onended=()=>{a(!1),URL.revokeObjectURL(et),x.current=null},tt.onerror=()=>{a(!1),URL.revokeObjectURL(et),x.current=null},await tt.play();return}catch(P){console.warn("[useVoice] Edge TTS failed, falling back to browser:",P)}if(!("speechSynthesis"in window)){h("Speech not supported in this browser");return}const Z=new SpeechSynthesisUtterance(H);if(g.current=Z,R.ttsRate){const P=parseFloat(R.ttsRate);isNaN(P)||(Z.rate=P)}Z.onend=()=>{a(!1),g.current=null},Z.onerror=()=>{a(!1),g.current=null},a(!0),window.speechSynthesis.speak(Z)},[O]),N=z.useCallback(()=>l(""),[]);return{isRecording:e,isPlaying:i,transcript:s,error:c,startRecording:_,stopRecording:B,speak:D,stopSpeaking:O,clearTranscript:N,drainFinalized:C,updateSettings:T}}function iM(e){const{getMessageCache:t,setMessageCache:i,clearMessageCache:a,refreshStatus:s}=xd(),l=e??"__default__",[c,h]=z.useState(()=>t(l)),[u,f]=z.useState(!1),[p,g]=z.useState(!1),[x,m]=z.useState(null),[v,C]=z.useState([]),[k,T]=z.useState(null),_=z.useRef(null),B=z.useRef(null),O=z.useRef(l),D=z.useRef(new Set),N=W=>{if(W.includes(`
65
- `))return W;let et=W;return et=et.replace(/(#{1,6})([^\s#\n\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,"$1 $2"),et=et.replace(/(-)(?=[^\s\-])/g,"$1 "),et=et.replace(/([^\n])(#{1,6}\s)/g,`$1
66
-
67
- $2`),et=et.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
68
- `),et=et.replace(/([^\n])(- (?!-))/g,`$1
69
- $2`),et=et.replace(/([^\n])(\d+\.\s)/g,`$1
70
- $2`),et=et.replace(/([^\n])(```|~~~)/g,`$1
71
- $2`),et=et.replace(/([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gu,`$1
72
- $2`),et},H=W=>{var X;const et=[];let tt=null;for(const Y of W)if(Y.role!=="system"){if(Y.role==="user")tt&&(et.push(tt),tt=null),et.push({id:Y.id,role:"user",content:Y.content??"",timestamp:Y.timestamp});else if(Y.role==="assistant")tt&&et.push(tt),tt={id:Y.id,role:"assistant",content:N(Y.content??""),reasoning:void 0,toolCalls:((X=Y.toolCalls)==null?void 0:X.map(M=>{var I,$,F;return{id:M.id??"",name:((I=M.function)==null?void 0:I.name)??M.name??"",argsPreview:typeof(($=M.function)==null?void 0:$.arguments)=="string"?M.function.arguments:JSON.stringify(((F=M.function)==null?void 0:F.arguments)??M.args??""),riskLevel:"safe"}}))??[],timestamp:Y.timestamp};else if(Y.role==="tool"&&tt){const M=Y.toolCallId;if(M&&tt.toolCalls){const I=tt.toolCalls.find($=>$.id===M);I&&(I.result=Y.content??void 0,I.success=!0)}}}return tt&&et.push(tt),et};z.useEffect(()=>{if(!e)return;(async()=>{const et=t(l);if(et.length>0){l!==O.current&&(O.current=l,h(et),m(null),C([]),T(null));return}if(!D.current.has(e)){D.current.add(e),g(!0);try{const tt=await Wt.fetchMessages(e);if(tt.length>0){const X=H(tt);h(X),i(l,X)}}catch{}g(!1)}})()},[l,e,t,i]),z.useEffect(()=>{if(l!==O.current){O.current=l;const W=t(l);h(W),m(null),C([]),T(null)}},[l,t]),z.useEffect(()=>{i(l,c)},[c,l,i]);const R=z.useCallback(async W=>{if(!W.trim()||u)return;m(null),C([]),T({phase:"thinking",text:"Thinking...",startTime:Date.now()});const et=new AbortController;B.current=et;const tt={id:`user_${Date.now()}`,role:"user",content:W,timestamp:Date.now()};h(I=>[...I,tt]);const X=`asst_${Date.now()}`;_.current=X;const Y={id:X,role:"assistant",content:"",isStreaming:!0,timestamp:Date.now()};h(I=>[...I,Y]),f(!0);const M=()=>{f(!1),T(null),C([]),B.current=null};try{const I=[...c,tt].map($=>({role:$.role,content:$.content}));await Wt.chatCompletions({messages:I,stream:!0,chatId:e,signal:et.signal,onChunk:$=>{if($.type==="stream.content"){const F=$.payload.content??"";h(Q=>Q.map(q=>q.id===X?{...q,content:q.content+F}:q)),T({phase:"generating",text:"Generating...",startTime:Date.now()})}else if($.type==="stream.reasoning"){const F=$.payload.content??"";h(Q=>Q.map(q=>q.id===X?{...q,reasoning:(q.reasoning??"")+F}:q)),T(Q=>(Q==null?void 0:Q.phase)!=="tool_calling"?{phase:"thinking",text:"Thinking...",startTime:(Q==null?void 0:Q.startTime)??Date.now()}:Q)}else if($.type==="stream.tool_call"){const F=$.payload;h(Q=>Q.map(q=>q.id===X?{...q,toolCalls:[...q.toolCalls??[],{id:F.toolCallId,name:F.toolName,argsPreview:F.argsPreview,riskLevel:F.riskLevel}]}:q)),T({phase:"tool_calling",text:`Calling ${F.toolName}...`,startTime:Date.now()})}else if($.type==="stream.error"){const F=$.payload.content??"Error";m(F)}},onToolResult:$=>{h(F=>F.map(Q=>{var q;return Q.id===X?{...Q,toolCalls:(q=Q.toolCalls)==null?void 0:q.map(it=>it.id===$.toolCallId||it.name===$.toolName?{...it,result:$.stdout||$.result||$.stderr||"",stdout:$.stdout??void 0,stderr:$.stderr??void 0,success:$.success,duration:$.duration}:it)}:Q}))},onStatus:$=>{$.toolName?T({phase:"tool_calling",text:`${$.toolName}: ${$.content}`,startTime:Date.now()}):T({phase:"thinking",text:$.content,startTime:Date.now()})},onSubagent:$=>{const F=$,Q=F.type,q=F.subAgentId;Q==="started"?(C(it=>[...it,{id:q,name:F.subAgentName??F.name??"SubAgent",task:F.task??"",status:"running",toolCount:0,lines:[],startTime:Date.now()}]),T({phase:"tool_calling",text:`SubAgent: ${F.subAgentName??F.name??"running"}...`,startTime:Date.now()})):Q==="tool_use"?C(it=>it.map(ut=>ut.id===q?{...ut,toolCount:ut.toolCount+1,lines:[...ut.lines,`🔧 ${F.toolName??"tool"}`]}:ut)):Q==="tool_result"?C(it=>it.map(ut=>ut.id===q?{...ut,lines:[...ut.lines,`✓ ${F.toolName??"tool"} (${F.duration??0}ms)`]}:ut)):Q==="completed"&&C([])},onDone:()=>{h($=>$.map(F=>F.id===X?{...F,isStreaming:!1}:F)),M(),s()},onError:$=>{m($),h(F=>F.map(Q=>Q.id===X?{...Q,isStreaming:!1,content:`Error: ${$}`}:Q)),M()}})}catch(I){if(I instanceof Error&&I.name==="AbortError"){h(F=>F.map(Q=>Q.id===X?{...Q,isStreaming:!1}:Q)),M();return}const $=I instanceof Error?I.message:String(I);m($),M()}},[c,u,e]),Z=z.useCallback(()=>{h([]),a(l),m(null),C([]),T(null)},[l,a]),P=z.useCallback(async()=>{B.current&&B.current.abort();try{await Wt.abort()}catch{}},[]);return{messages:c,isLoading:u,isHistoryLoading:p,error:x,sendMessage:R,clearMessages:Z,abortChat:P,subAgents:v,thinkingStatus:k}}function rM(){const[e,t]=z.useState([]),[i,a]=z.useState(!1),s=z.useCallback(async()=>{a(!0);try{const g=await Wt.listSessions();t(g)}catch{}a(!1)},[]),l=z.useCallback(async(g,x)=>{const m=await Wt.createSession(g,x);return t(v=>[...v,m]),await s(),m},[s]),c=z.useCallback(async g=>{t(x=>x.filter(m=>m.id!==g));try{await Wt.deleteSession(g)}catch(x){const m=await Wt.listSessions();throw t(m),x}},[]),h=z.useCallback(async()=>{t([]);try{return(await Wt.deleteAllSessions()).deletedCount}catch(g){const x=await Wt.listSessions();throw t(x),g}},[]),u=z.useCallback(async g=>{await Wt.clearSession(g)},[]),f=z.useCallback(async(g,x)=>{await Wt.renameSession(g,x),t(m=>m.map(v=>v.id===g?{...v,name:x}:v))},[]),p=z.useCallback(async g=>{await Wt.activateSession(g)},[]);return{sessions:e,isLoading:i,fetchSessions:s,createSession:l,deleteSession:c,deleteAllSessions:h,clearSession:u,renameSession:f,activateSession:p}}function jm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var cs=jm();function yv(e){cs=e}var Gn={exec:()=>null};function Js(e){let t=[];return i=>{let a=Math.max(0,Math.min(3,i-1)),s=t[a];return s||(s=e(a),t[a]=s),s}}function re(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(gi.caret,"$1"),i=i.replace(s,c),a},getRegex:()=>new RegExp(i,t)};return a}var aM=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),gi={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Js(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Js(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Js(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Js(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Js(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Js(e=>new RegExp(`^ {0,${e}}>`))},nM=/^(?:[ \t]*(?:\n|$))+/,sM=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lM=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oM=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Um=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,xv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bv=re(xv).replace(/bull/g,Um).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(),cM=re(xv).replace(/bull/g,Um).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(),Pm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,hM=/^[^\n]+/,Wm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,uM=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dM=re(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Um).getRegex(),bd="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",Ym=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fM=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",Ym).replace("tag",bd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Cv=re(Pm).replace("hr",Lc).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bd).getRegex(),pM=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Cv).getRegex(),Gm={blockquote:pM,code:sM,def:uM,fences:lM,heading:oM,hr:Lc,html:fM,lheading:bv,list:dM,newline:nM,paragraph:Cv,table:Gn,text:hM},tC=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lc).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bd).getRegex(),gM={...Gm,lheading:cM,table:tC,paragraph:re(Pm).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",tC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bd).getRegex()},mM={...Gm,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ym).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:Gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(Pm).replace("hr",Lc).replace("heading",` *#{1,6} *[^
73
- ]`).replace("lheading",bv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},yM=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vv=/^( {2,}|\\)\n(?!\s*$)/,bM=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Il=/[\p{P}\p{S}]/u,Cd=/[\s\p{P}\p{S}]/u,Xm=/[^\s\p{P}\p{S}]/u,CM=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Cd).getRegex(),kv=/(?!~)[\p{P}\p{S}]/u,vM=/(?!~)[\s\p{P}\p{S}]/u,kM=/(?:[^\s\p{P}\p{S}]|~)/u,SM=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",aM?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Sv=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,TM=re(Sv,"u").replace(/punct/g,Il).getRegex(),wM=re(Sv,"u").replace(/punct/g,kv).getRegex(),Tv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_M=re(Tv,"gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,Cd).replace(/punct/g,Il).getRegex(),BM=re(Tv,"gu").replace(/notPunctSpace/g,kM).replace(/punctSpace/g,vM).replace(/punct/g,kv).getRegex(),EM=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,Cd).replace(/punct/g,Il).getRegex(),LM=re(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Il).getRegex(),AM="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",MM=re(AM,"gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,Cd).replace(/punct/g,Il).getRegex(),RM=re(/\\(punct)/,"gu").replace(/punct/g,Il).getRegex(),OM=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(),FM=re(Ym).replace("(?:-->|$)","-->").getRegex(),DM=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",FM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Du=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,$M=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Du).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wv=re(/^!?\[(label)\]\[(ref)\]/).replace("label",Du).replace("ref",Wm).getRegex(),_v=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wm).getRegex(),zM=re("reflink|nolink(?!\\()","g").replace("reflink",wv).replace("nolink",_v).getRegex(),eC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Vm={_backpedal:Gn,anyPunctuation:RM,autolink:OM,blockSkip:SM,br:vv,code:xM,del:Gn,delLDelim:Gn,delRDelim:Gn,emStrongLDelim:TM,emStrongRDelimAst:_M,emStrongRDelimUnd:EM,escape:yM,link:$M,nolink:_v,punctuation:CM,reflink:wv,reflinkSearch:zM,tag:DM,text:bM,url:Gn},NM={...Vm,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",Du).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Du).getRegex()},Eg={...Vm,emStrongRDelimAst:BM,emStrongLDelim:wM,delLDelim:LM,delRDelim:MM,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",eC).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:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",eC).getRegex()},qM={...Eg,br:re(vv).replace("{2,}","*").getRegex(),text:re(Eg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},iu={normal:Gm,gfm:gM,pedantic:mM},jo={normal:Vm,gfm:Eg,breaks:qM,pedantic:NM},IM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},iC=e=>IM[e];function Hr(e,t){if(t){if(gi.escapeTest.test(e))return e.replace(gi.escapeReplace,iC)}else if(gi.escapeTestNoEncode.test(e))return e.replace(gi.escapeReplaceNoEncode,iC);return e}function rC(e){try{e=encodeURI(e).replace(gi.percentDecode,"%")}catch{return null}return e}function aC(e,t){var l;let i=e.replace(gi.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(gi.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(gi.slashPipe,"|");return a}function dn(e,t,i){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function nC(e){let t=e.split(`
74
- `),i=t.length-1;for(;i>=0&&gi.blankLine.test(t[i]);)i--;return t.length-i<=2?e:t.slice(0,i+1).join(`
75
- `)}function HM(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function jM(e,t=0){let i=t,a="";for(let s of e)if(s===" "){let l=4-i%4;a+=" ".repeat(l),i+=l}else a+=s,i++;return a}function sC(e,t,i,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,u}function UM(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
76
- `).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
77
- `)}var $u=class{constructor(t){Lt(this,"options");Lt(this,"rules");Lt(this,"lexer");this.options=t||cs}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=this.options.pedantic?i[0]:nC(i[0]),s=a.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a,codeBlockStyle:"indented",text:s}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],s=UM(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let s=dn(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:dn(i[0],`
78
- `),depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:dn(i[0],`
79
- `)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=dn(i[0],`
80
- `).split(`
81
- `),s="",l="",c=[];for(;a.length>0;){let h=!1,u=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))u.push(a[f]),h=!0;else if(!h)u.push(a[f]);else break;a=a.slice(f);let p=u.join(`
82
- `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
83
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
84
- ${p}`:p,l=l?`${l}
85
- ${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,a.length===0)break;let m=c.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let v=m,C=v.raw+`
86
- `+a.join(`
87
- `),k=this.blockquote(C);c[c.length-1]=k,s=s.substring(0,s.length-v.raw.length)+k.raw,l=l.substring(0,l.length-v.text.length)+k.text;break}else if((m==null?void 0:m.type)==="list"){let v=m,C=v.raw+`
88
- `+a.join(`
89
- `),k=this.list(C);c[c.length-1]=k,s=s.substring(0,s.length-m.raw.length)+k.raw,l=l.substring(0,l.length-v.raw.length)+k.raw,a=C.substring(c.at(-1).raw.length).split(`
90
- `);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=jM(i[2].split(`
91
- `,1)[0],i[1].length),m=t.split(`
92
- `,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=i[1].length+1:(C=x.search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=i[1].length),v&&this.rules.other.blankLine.test(m)&&(p+=m+`
93
- `,t=t.substring(m.length+1),f=!0),!f){let k=this.rules.other.nextBulletRegex(C),T=this.rules.other.hrRegex(C),_=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),O=this.rules.other.htmlBeginRegex(C),D=this.rules.other.blockquoteBeginRegex(C);for(;t;){let N=t.split(`
94
- `,1)[0],H;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),H=m):H=m.replace(this.rules.other.tabCharGlobal," "),_.test(m)||B.test(m)||O.test(m)||D.test(m)||k.test(m)||T.test(m))break;if(H.search(this.rules.other.nonSpaceChar)>=C||!m.trim())g+=`
95
- `+H.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(x)||B.test(x)||T.test(x))break;g+=`
96
- `+m}v=!m.trim(),p+=N+`
97
- `,t=t.substring(N.length+1),x=H.slice(C)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0)),l.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),l.raw+=p}let u=l.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f of l.items){this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]);let p=f.tokens[0];if(f.task&&((p==null?void 0:p.type)==="text"||(p==null?void 0:p.type)==="paragraph")){f.text=f.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let x=this.lexer.inlineQueue.length-1;x>=0;x--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[x].src)){this.lexer.inlineQueue[x].src=this.lexer.inlineQueue[x].src.replace(this.rules.other.listReplaceTask,"");break}let g=this.rules.other.listTaskCheckbox.exec(f.raw);if(g){let x={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};f.checked=x.checked,l.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=x.raw+f.tokens[0].raw,f.tokens[0].text=x.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(x)):f.tokens.unshift({type:"paragraph",raw:x.raw,text:x.raw,tokens:[x]}):f.tokens.unshift(x)}}else f.task&&(f.task=!1);if(!l.loose){let g=f.tokens.filter(m=>m.type==="space"),x=g.length>0&&g.some(m=>this.rules.other.anyLine.test(m.raw));l.loose=x}}if(l.loose)for(let f of l.items){f.loose=!0;for(let p of f.tokens)p.type==="text"&&(p.type="paragraph")}return l}}html(t){let i=this.rules.block.html.exec(t);if(i){let a=nC(i[0]);return{type:"html",block:!0,raw:a,pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:a}}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:dn(i[0],`
98
- `),href:s,title:l}}}table(t){var h;let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=aC(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
99
- `):[],c={type:"table",raw:dn(i[0],`
100
- `),header:[],align:[],rows:[]};if(a.length===s.length){for(let u of s)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<a.length;u++)c.header.push({text:a[u],tokens:this.lexer.inline(a[u]),header:!0,align:c.align[u]});for(let u of l)c.rows.push(aC(u,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i){let a=i[1].trim();return{type:"heading",raw:dn(i[0],`
101
- `),depth:i[2].charAt(0)==="="?1:2,text:a,tokens:this.lexer.inline(a)}}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
102
- `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=dn(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=HM(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let s=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),sC(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return sC(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,u=l,f=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(s=p.exec(i))!==null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(h=[...c].length,s[3]||s[4]){u+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);let g=[...s[0]][0].length,x=t.slice(0,l+s.index+g+h);if(Math.min(l,h)%2){let v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}let m=x.slice(2,-2);return{type:"strong",raw:x,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t,i,a=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,u=l,f=this.rules.inline.delRDelim;for(f.lastIndex=0,i=i.slice(-1*t.length+l);(s=f.exec(i))!==null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c||(h=[...c].length,h!==l))continue;if(s[3]||s[4]){u+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u);let p=[...s[0]][0].length,g=t.slice(0,l+s.index+p+h),x=g.slice(l,-l);return{type:"del",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,s;return i[2]==="@"?(a=i[1],s="mailto:"+a):(a=i[1],s=a),{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let i;if(i=this.rules.inline.url.exec(t)){let s,l;if(i[2]==="@")s=i[0],l="mailto:"+s;else{let c;do c=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(c!==i[0]);s=i[0],i[1]==="www."?l="http://"+i[0]:l=i[0]}return{type:"link",raw:i[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},vr=class Lg{constructor(t){Lt(this,"tokens");Lt(this,"options");Lt(this,"state");Lt(this,"inlineQueue");Lt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||cs,this.options.tokenizer=this.options.tokenizer||new $u,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:gi,block:iu.normal,inline:jo.normal};this.options.pedantic?(i.block=iu.pedantic,i.inline=jo.pedantic):this.options.gfm&&(i.block=iu.gfm,this.options.breaks?i.inline=jo.breaks:i.inline=jo.gfm),this.tokenizer.rules=i}static get rules(){return{block:iu,inline:jo}}static lex(t,i){return new Lg(i).lex(t)}static lexInline(t,i){return new Lg(i).inlineTokens(t)}lex(t){t=t.replace(gi.carriageReturn,`
103
- `),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){var l,c,h;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(gi.tabCharGlobal," ").replace(gi.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let u;if((c=(l=this.options.extensions)==null?void 0:l.block)!=null&&c.some(p=>(u=p.call({lexer:this},t,i))?(t=t.substring(u.raw.length),i.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);let p=i.at(-1);u.raw.length===1&&p!==void 0?p.raw+=`
104
- `:i.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
105
- `)?"":`
106
- `)+u.raw,p.text+=`
107
- `+u.text,this.inlineQueue.at(-1).src=p.text):i.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
108
- `)?"":`
109
- `)+u.raw,p.text+=`
110
- `+u.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},i.push(u));continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),i.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),i.push(u);continue}let f=t;if((h=this.options.extensions)!=null&&h.startBlock){let p=1/0,g=t.slice(1),x;this.options.extensions.startBlock.forEach(m=>{x=m.call({lexer:this},g),typeof x=="number"&&x>=0&&(p=Math.min(p,x))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(this.state.top&&(u=this.tokenizer.paragraph(f))){let p=i.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
111
- `)?"":`
112
- `)+u.raw,p.text+=`
113
- `+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(u),a=f.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
114
- `)?"":`
115
- `)+u.raw,p.text+=`
116
- `+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(u);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){var f,p,g,x,m;this.tokenizer.lexer=this;let a=t,s=null;if(this.tokens.links){let v=Object.keys(this.tokens.links);if(v.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)v.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((p=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:p.call({lexer:this},a))??a;let c=!1,h="",u=1/0;for(;t;){if(t.length<u)u=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(h=""),c=!1;let v;if((x=(g=this.options.extensions)==null?void 0:g.inline)!=null&&x.some(k=>(v=k.call({lexer:this},t,i))?(t=t.substring(v.raw.length),i.push(v),!0):!1))continue;if(v=this.tokenizer.escape(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.tag(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.link(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(v.raw.length);let k=i.at(-1);v.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=v.raw,k.text+=v.text):i.push(v);continue}if(v=this.tokenizer.emStrong(t,a,h)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.codespan(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.br(t)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.del(t,a,h)){t=t.substring(v.raw.length),i.push(v);continue}if(v=this.tokenizer.autolink(t)){t=t.substring(v.raw.length),i.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(t))){t=t.substring(v.raw.length),i.push(v);continue}let C=t;if((m=this.options.extensions)!=null&&m.startInline){let k=1/0,T=t.slice(1),_;this.options.extensions.startInline.forEach(B=>{_=B.call({lexer:this},T),typeof _=="number"&&_>=0&&(k=Math.min(k,_))}),k<1/0&&k>=0&&(C=t.substring(0,k+1))}if(v=this.tokenizer.inlineText(C)){t=t.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(h=v.raw.slice(-1)),c=!0;let k=i.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=v.raw,k.text+=v.text):i.push(v);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return i}infiniteLoopError(t){let i="Infinite loop on byte: "+t;if(this.options.silent)console.error(i);else throw new Error(i)}},zu=class{constructor(t){Lt(this,"options");Lt(this,"parser");this.options=t||cs}space(t){return""}code({text:t,lang:i,escaped:a}){var c;let s=(c=(i||"").match(gi.notSpaceStart))==null?void 0:c[0],l=t.replace(gi.endingNewline,"")+`
117
- `;return s?'<pre><code class="language-'+Hr(s)+'">'+(a?l:Hr(l,!0))+`</code></pre>
118
- `:"<pre><code>"+(a?l:Hr(l,!0))+`</code></pre>
119
- `}blockquote({tokens:t}){return`<blockquote>
120
- ${this.parser.parse(t)}</blockquote>
121
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
122
- `}hr(t){return`<hr>
123
- `}list(t){let i=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let u=t.items[h];s+=this.listitem(u)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
124
- `+s+"</"+l+`>
125
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
126
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
127
- `}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
128
- <thead>
129
- `+i+`</thead>
130
- `+s+`</table>
131
- `}tablerow({text:t}){return`<tr>
132
- ${t}</tr>
133
- `}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
134
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Hr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let s=this.parser.parseInline(a),l=rC(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Hr(i)+'"'),c+=">"+s+"</a>",c}image({href:t,title:i,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=rC(t);if(l===null)return Hr(a);t=l;let c=`<img src="${t}" alt="${Hr(a)}"`;return i&&(c+=` title="${Hr(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Hr(t.text)}},Zm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},kr=class Ag{constructor(t){Lt(this,"options");Lt(this,"renderer");Lt(this,"textRenderer");this.options=t||cs,this.options.renderer=this.options.renderer||new zu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zm}static parse(t,i){return new Ag(i).parse(t)}static parseInline(t,i){return new Ag(i).parseInline(t)}parse(t){var a,s;this.renderer.parser=this;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[c.type]){let u=c,f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){i+=f||"";continue}}let h=c;switch(h.type){case"space":{i+=this.renderer.space(h);break}case"hr":{i+=this.renderer.hr(h);break}case"heading":{i+=this.renderer.heading(h);break}case"code":{i+=this.renderer.code(h);break}case"table":{i+=this.renderer.table(h);break}case"blockquote":{i+=this.renderer.blockquote(h);break}case"list":{i+=this.renderer.list(h);break}case"checkbox":{i+=this.renderer.checkbox(h);break}case"html":{i+=this.renderer.html(h);break}case"def":{i+=this.renderer.def(h);break}case"paragraph":{i+=this.renderer.paragraph(h);break}case"text":{i+=this.renderer.text(h);break}default:{let u='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return i}parseInline(t,i=this.renderer){var s,l;this.renderer.parser=this;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[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)){a+=f||"";continue}}let u=h;switch(u.type){case"escape":{a+=i.text(u);break}case"html":{a+=i.html(u);break}case"link":{a+=i.link(u);break}case"image":{a+=i.image(u);break}case"checkbox":{a+=i.checkbox(u);break}case"strong":{a+=i.strong(u);break}case"em":{a+=i.em(u);break}case"codespan":{a+=i.codespan(u);break}case"br":{a+=i.br(u);break}case"del":{a+=i.del(u);break}case"text":{a+=i.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 a}},gu,Ko=(gu=class{constructor(t){Lt(this,"options");Lt(this,"block");this.options=t||cs}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?vr.lex:vr.lexInline}provideParser(t=this.block){return t?kr.parse:kr.parseInline}},Lt(gu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Lt(gu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),gu),PM=class{constructor(...t){Lt(this,"defaults",jm());Lt(this,"options",this.setOptions);Lt(this,"parse",this.parseMarkdown(!0));Lt(this,"parseInline",this.parseMarkdown(!1));Lt(this,"Parser",kr);Lt(this,"Renderer",zu);Lt(this,"TextRenderer",Zm);Lt(this,"Lexer",vr);Lt(this,"Tokenizer",$u);Lt(this,"Hooks",Ko);this.use(...t)}walkTokens(t,i){var s,l;let a=[];for(let c of t)switch(a=a.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)a=a.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let f of u)a=a.concat(this.walkTokens(f.tokens,i));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,i));break}default:{let h=c;(l=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let f=h[u].flat(1/0);a=a.concat(this.walkTokens(f,i))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let u=l.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),s.extensions=i),a.renderer){let l=this.defaults.renderer||new zu(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new $u(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new Ko;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=a.hooks[h],f=l[h];Ko.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&Ko.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(l,p);return f.call(l,x)})();let g=u.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),l&&(u=u.concat(l.call(this,h))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return vr.lex(t,i??this.defaults)}parser(t,i){return kr.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let s={...a},l={...this.defaults,...s},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.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 i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,u=await(l.hooks?await l.hooks.provideLexer(t):t?vr.lex:vr.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(u):u;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser(t):t?kr.parse:kr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer(t):t?vr.lex:vr.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let u=(l.hooks?l.hooks.provideParser(t):t?kr.parse:kr.parseInline)(h,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
135
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Hr(a.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(a);throw a}}},ts=new PM;function de(e,t){return ts.parse(e,t)}de.options=de.setOptions=function(e){return ts.setOptions(e),de.defaults=ts.defaults,yv(de.defaults),de};de.getDefaults=jm;de.defaults=cs;de.use=function(...e){return ts.use(...e),de.defaults=ts.defaults,yv(de.defaults),de};de.walkTokens=function(e,t){return ts.walkTokens(e,t)};de.parseInline=ts.parseInline;de.Parser=kr;de.parser=kr.parse;de.Renderer=zu;de.TextRenderer=Zm;de.Lexer=vr;de.lexer=vr.lex;de.Tokenizer=$u;de.Hooks=Ko;de.parse=de;de.options;de.setOptions;de.use;de.walkTokens;de.parseInline;kr.parse;vr.lex;const WM="modulepreload",YM=function(e){return"/"+e},lC={},ie=function(t,i,a){let s=Promise.resolve();if(i&&i.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"));s=c(i.map(f=>{if(f=YM(f),f in lC)return;lC[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":WM,p||(x.as="script"),x.crossOrigin="",x.href=f,u&&x.setAttribute("nonce",u),document.head.appendChild(x),p)return new Promise((m,v)=>{x.addEventListener("load",m),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return s.then(c=>{for(const h of c||[])h.status==="rejected"&&l(h.reason);return t().catch(l)})};var bu={exports:{}},GM=bu.exports,oC;function XM(){return oC||(oC=1,(function(e,t){(function(i,a){e.exports=a()})(GM,(function(){var i=1e3,a=6e4,s=36e5,l="millisecond",c="second",h="minute",u="hour",f="day",p="week",g="month",x="quarter",m="year",v="date",C="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,_={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(X){var Y=["th","st","nd","rd"],M=X%100;return"["+X+(Y[(M-20)%10]||Y[M]||Y[0])+"]"}},B=function(X,Y,M){var I=String(X);return!I||I.length>=Y?X:""+Array(Y+1-I.length).join(M)+X},O={s:B,z:function(X){var Y=-X.utcOffset(),M=Math.abs(Y),I=Math.floor(M/60),$=M%60;return(Y<=0?"+":"-")+B(I,2,"0")+":"+B($,2,"0")},m:function X(Y,M){if(Y.date()<M.date())return-X(M,Y);var I=12*(M.year()-Y.year())+(M.month()-Y.month()),$=Y.clone().add(I,g),F=M-$<0,Q=Y.clone().add(I+(F?-1:1),g);return+(-(I+(M-$)/(F?$-Q:Q-$))||0)},a:function(X){return X<0?Math.ceil(X)||0:Math.floor(X)},p:function(X){return{M:g,y:m,w:p,d:f,D:v,h:u,m:h,s:c,ms:l,Q:x}[X]||String(X||"").toLowerCase().replace(/s$/,"")},u:function(X){return X===void 0}},D="en",N={};N[D]=_;var H="$isDayjsObject",R=function(X){return X instanceof et||!(!X||!X[H])},Z=function X(Y,M,I){var $;if(!Y)return D;if(typeof Y=="string"){var F=Y.toLowerCase();N[F]&&($=F),M&&(N[F]=M,$=F);var Q=Y.split("-");if(!$&&Q.length>1)return X(Q[0])}else{var q=Y.name;N[q]=Y,$=q}return!I&&$&&(D=$),$||!I&&D},P=function(X,Y){if(R(X))return X.clone();var M=typeof Y=="object"?Y:{};return M.date=X,M.args=arguments,new et(M)},W=O;W.l=Z,W.i=R,W.w=function(X,Y){return P(X,{locale:Y.$L,utc:Y.$u,x:Y.$x,$offset:Y.$offset})};var et=(function(){function X(M){this.$L=Z(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[H]=!0}var Y=X.prototype;return Y.parse=function(M){this.$d=(function(I){var $=I.date,F=I.utc;if($===null)return new Date(NaN);if(W.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Q=$.match(k);if(Q){var q=Q[2]-1||0,it=(Q[7]||"0").substring(0,3);return F?new Date(Date.UTC(Q[1],q,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,it)):new Date(Q[1],q,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,it)}}return new Date($)})(M),this.init()},Y.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},Y.$utils=function(){return W},Y.isValid=function(){return this.$d.toString()!==C},Y.isSame=function(M,I){var $=P(M);return this.startOf(I)<=$&&$<=this.endOf(I)},Y.isAfter=function(M,I){return P(M)<this.startOf(I)},Y.isBefore=function(M,I){return this.endOf(I)<P(M)},Y.$g=function(M,I,$){return W.u(M)?this[I]:this.set($,M)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(M,I){var $=this,F=!!W.u(I)||I,Q=W.p(M),q=function(Ut,U){var ct=W.w($.$u?Date.UTC($.$y,U,Ut):new Date($.$y,U,Ut),$);return F?ct:ct.endOf(f)},it=function(Ut,U){return W.w($.toDate()[Ut].apply($.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(U)),$)},ut=this.$W,dt=this.$M,yt=this.$D,xt="set"+(this.$u?"UTC":"");switch(Q){case m:return F?q(1,0):q(31,11);case g:return F?q(1,dt):q(0,dt+1);case p:var Rt=this.$locale().weekStart||0,Ft=(ut<Rt?ut+7:ut)-Rt;return q(F?yt-Ft:yt+(6-Ft),dt);case f:case v:return it(xt+"Hours",0);case u:return it(xt+"Minutes",1);case h:return it(xt+"Seconds",2);case c:return it(xt+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(M){return this.startOf(M,!1)},Y.$set=function(M,I){var $,F=W.p(M),Q="set"+(this.$u?"UTC":""),q=($={},$[f]=Q+"Date",$[v]=Q+"Date",$[g]=Q+"Month",$[m]=Q+"FullYear",$[u]=Q+"Hours",$[h]=Q+"Minutes",$[c]=Q+"Seconds",$[l]=Q+"Milliseconds",$)[F],it=F===f?this.$D+(I-this.$W):I;if(F===g||F===m){var ut=this.clone().set(v,1);ut.$d[q](it),ut.init(),this.$d=ut.set(v,Math.min(this.$D,ut.daysInMonth())).$d}else q&&this.$d[q](it);return this.init(),this},Y.set=function(M,I){return this.clone().$set(M,I)},Y.get=function(M){return this[W.p(M)]()},Y.add=function(M,I){var $,F=this;M=Number(M);var Q=W.p(I),q=function(dt){var yt=P(F);return W.w(yt.date(yt.date()+Math.round(dt*M)),F)};if(Q===g)return this.set(g,this.$M+M);if(Q===m)return this.set(m,this.$y+M);if(Q===f)return q(1);if(Q===p)return q(7);var it=($={},$[h]=a,$[u]=s,$[c]=i,$)[Q]||1,ut=this.$d.getTime()+M*it;return W.w(ut,this)},Y.subtract=function(M,I){return this.add(-1*M,I)},Y.format=function(M){var I=this,$=this.$locale();if(!this.isValid())return $.invalidDate||C;var F=M||"YYYY-MM-DDTHH:mm:ssZ",Q=W.z(this),q=this.$H,it=this.$m,ut=this.$M,dt=$.weekdays,yt=$.months,xt=$.meridiem,Rt=function(U,ct,Ct,Ot){return U&&(U[ct]||U(I,F))||Ct[ct].slice(0,Ot)},Ft=function(U){return W.s(q%12||12,U,"0")},Ut=xt||function(U,ct,Ct){var Ot=U<12?"AM":"PM";return Ct?Ot.toLowerCase():Ot};return F.replace(T,(function(U,ct){return ct||(function(Ct){switch(Ct){case"YY":return String(I.$y).slice(-2);case"YYYY":return W.s(I.$y,4,"0");case"M":return ut+1;case"MM":return W.s(ut+1,2,"0");case"MMM":return Rt($.monthsShort,ut,yt,3);case"MMMM":return Rt(yt,ut);case"D":return I.$D;case"DD":return W.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Rt($.weekdaysMin,I.$W,dt,2);case"ddd":return Rt($.weekdaysShort,I.$W,dt,3);case"dddd":return dt[I.$W];case"H":return String(q);case"HH":return W.s(q,2,"0");case"h":return Ft(1);case"hh":return Ft(2);case"a":return Ut(q,it,!0);case"A":return Ut(q,it,!1);case"m":return String(it);case"mm":return W.s(it,2,"0");case"s":return String(I.$s);case"ss":return W.s(I.$s,2,"0");case"SSS":return W.s(I.$ms,3,"0");case"Z":return Q}return null})(U)||Q.replace(":","")}))},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(M,I,$){var F,Q=this,q=W.p(I),it=P(M),ut=(it.utcOffset()-this.utcOffset())*a,dt=this-it,yt=function(){return W.m(Q,it)};switch(q){case m:F=yt()/12;break;case g:F=yt();break;case x:F=yt()/3;break;case p:F=(dt-ut)/6048e5;break;case f:F=(dt-ut)/864e5;break;case u:F=dt/s;break;case h:F=dt/a;break;case c:F=dt/i;break;default:F=dt}return $?F:W.a(F)},Y.daysInMonth=function(){return this.endOf(g).$D},Y.$locale=function(){return N[this.$L]},Y.locale=function(M,I){if(!M)return this.$L;var $=this.clone(),F=Z(M,I,!0);return F&&($.$L=F),$},Y.clone=function(){return W.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},X})(),tt=et.prototype;return P.prototype=tt,[["$ms",l],["$s",c],["$m",h],["$H",u],["$W",f],["$M",g],["$y",m],["$D",v]].forEach((function(X){tt[X[1]]=function(Y){return this.$g(Y,X[0],X[1])}})),P.extend=function(X,Y){return X.$i||(X(Y,et,P),X.$i=!0),P},P.locale=Z,P.isDayjs=R,P.unix=function(X){return P(1e3*X)},P.en=N[D],P.Ls=N,P.p={},P}))})(bu)),bu.exports}var VM=XM();const ZM=Rm(VM);var Bv=Object.defineProperty,S=(e,t)=>Bv(e,"name",{value:t,configurable:!0}),QM=(e,t)=>{for(var i in t)Bv(e,i,{get:t[i],enumerable:!0})},xa={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},mt={trace:S((...e)=>{},"trace"),debug:S((...e)=>{},"debug"),info:S((...e)=>{},"info"),warn:S((...e)=>{},"warn"),error:S((...e)=>{},"error"),fatal:S((...e)=>{},"fatal")},Qm=S(function(e="fatal"){let t=xa.fatal;typeof e=="string"?e.toLowerCase()in xa&&(t=xa[e]):typeof e=="number"&&(t=e),mt.trace=()=>{},mt.debug=()=>{},mt.info=()=>{},mt.warn=()=>{},mt.error=()=>{},mt.fatal=()=>{},t<=xa.fatal&&(mt.fatal=console.error?console.error.bind(console,hr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",hr("FATAL"))),t<=xa.error&&(mt.error=console.error?console.error.bind(console,hr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",hr("ERROR"))),t<=xa.warn&&(mt.warn=console.warn?console.warn.bind(console,hr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",hr("WARN"))),t<=xa.info&&(mt.info=console.info?console.info.bind(console,hr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",hr("INFO"))),t<=xa.debug&&(mt.debug=console.debug?console.debug.bind(console,hr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",hr("DEBUG"))),t<=xa.trace&&(mt.trace=console.debug?console.debug.bind(console,hr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",hr("TRACE")))},"setLogLevel"),hr=S(e=>`%c${ZM().format("ss.SSS")} : ${e} : `,"format");const Cu={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e),hsl2rgb:({h:e,s:t,l:i},a)=>{if(!t)return i*2.55;e/=360,t/=100,i/=100;const s=i<.5?i*(1+t):i+t-i*t,l=2*i-s;switch(a){case"r":return Cu.hue2rgb(l,s,e+1/3)*255;case"g":return Cu.hue2rgb(l,s,e)*255;case"b":return Cu.hue2rgb(l,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:i},a)=>{e/=255,t/=255,i/=255;const s=Math.max(e,t,i),l=Math.min(e,t,i),c=(s+l)/2;if(a==="l")return c*100;if(s===l)return 0;const h=s-l,u=c>.5?h/(2-s-l):h/(s+l);if(a==="s")return u*100;switch(s){case e:return((t-i)/h+(t<i?6:0))*60;case t:return((i-e)/h+2)*60;case i:return((e-t)/h+4)*60;default:return-1}}},KM={clamp:(e,t,i)=>t>i?Math.min(t,Math.max(i,e)):Math.min(i,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},JM={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},It={channel:Cu,lang:KM,unit:JM},pn={};for(let e=0;e<=255;e++)pn[e]=It.unit.dec2hex(e);const fi={ALL:0,RGB:1,HSL:2};class t5{constructor(){this.type=fi.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=fi.ALL}is(t){return this.type===t}}class e5{constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new t5}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=fi.ALL,this}_ensureHSL(){const t=this.data,{h:i,s:a,l:s}=t;i===void 0&&(t.h=It.channel.rgb2hsl(t,"h")),a===void 0&&(t.s=It.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=It.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:i,g:a,b:s}=t;i===void 0&&(t.r=It.channel.hsl2rgb(t,"r")),a===void 0&&(t.g=It.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=It.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,i=t.r;return!this.type.is(fi.HSL)&&i!==void 0?i:(this._ensureHSL(),It.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,i=t.g;return!this.type.is(fi.HSL)&&i!==void 0?i:(this._ensureHSL(),It.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,i=t.b;return!this.type.is(fi.HSL)&&i!==void 0?i:(this._ensureHSL(),It.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,i=t.h;return!this.type.is(fi.RGB)&&i!==void 0?i:(this._ensureRGB(),It.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,i=t.s;return!this.type.is(fi.RGB)&&i!==void 0?i:(this._ensureRGB(),It.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,i=t.l;return!this.type.is(fi.RGB)&&i!==void 0?i:(this._ensureRGB(),It.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(fi.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(fi.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(fi.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(fi.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(fi.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(fi.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const vd=new e5({r:0,g:0,b:0,a:0},"transparent"),dl={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(dl.re);if(!t)return;const i=t[1],a=parseInt(i,16),s=i.length,l=s%4===0,c=s>4,h=c?1:17,u=c?8:4,f=l?0:-1,p=c?255:15;return vd.set({r:(a>>u*(f+3)&p)*h,g:(a>>u*(f+2)&p)*h,b:(a>>u*(f+1)&p)*h,a:l?(a&p)*h/255:1},e)},stringify:e=>{const{r:t,g:i,b:a,a:s}=e;return s<1?`#${pn[Math.round(t)]}${pn[Math.round(i)]}${pn[Math.round(a)]}${pn[Math.round(s*255)]}`:`#${pn[Math.round(t)]}${pn[Math.round(i)]}${pn[Math.round(a)]}`}},Xn={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Xn.hueRe);if(t){const[,i,a]=t;switch(a){case"grad":return It.channel.clamp.h(parseFloat(i)*.9);case"rad":return It.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return It.channel.clamp.h(parseFloat(i)*360)}}return It.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const i=e.match(Xn.re);if(!i)return;const[,a,s,l,c,h]=i;return vd.set({h:Xn._hue2deg(a),s:It.channel.clamp.s(parseFloat(s)),l:It.channel.clamp.l(parseFloat(l)),a:c?It.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:i,l:a,a:s}=e;return s<1?`hsla(${It.lang.round(t)}, ${It.lang.round(i)}%, ${It.lang.round(a)}%, ${s})`:`hsl(${It.lang.round(t)}, ${It.lang.round(i)}%, ${It.lang.round(a)}%)`}},oc={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=oc.colors[e];if(t)return dl.parse(t)},stringify:e=>{const t=dl.stringify(e);for(const i in oc.colors)if(oc.colors[i]===t)return i}},Jo={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const i=e.match(Jo.re);if(!i)return;const[,a,s,l,c,h,u,f,p]=i;return vd.set({r:It.channel.clamp.r(s?parseFloat(a)*2.55:parseFloat(a)),g:It.channel.clamp.g(c?parseFloat(l)*2.55:parseFloat(l)),b:It.channel.clamp.b(u?parseFloat(h)*2.55:parseFloat(h)),a:f?It.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{const{r:t,g:i,b:a,a:s}=e;return s<1?`rgba(${It.lang.round(t)}, ${It.lang.round(i)}, ${It.lang.round(a)}, ${It.lang.round(s)})`:`rgb(${It.lang.round(t)}, ${It.lang.round(i)}, ${It.lang.round(a)})`}},Gr={format:{keyword:oc,hex:dl,rgb:Jo,rgba:Jo,hsl:Xn,hsla:Xn},parse:e=>{if(typeof e!="string")return e;const t=dl.parse(e)||Jo.parse(e)||Xn.parse(e)||oc.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(fi.HSL)||e.data.r===void 0?Xn.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Jo.stringify(e):dl.stringify(e)},Ev=(e,t)=>{const i=Gr.parse(e);for(const a in t)i[a]=It.channel.clamp[a](t[a]);return Gr.stringify(i)},xn=(e,t,i=0,a=1)=>{if(typeof e!="number")return Ev(e,{a:t});const s=vd.set({r:It.channel.clamp.r(e),g:It.channel.clamp.g(t),b:It.channel.clamp.b(i),a:It.channel.clamp.a(a)});return Gr.stringify(s)},i5=e=>{const{r:t,g:i,b:a}=Gr.parse(e),s=.2126*It.channel.toLinear(t)+.7152*It.channel.toLinear(i)+.0722*It.channel.toLinear(a);return It.lang.round(s)},r5=e=>i5(e)>=.5,Or=e=>!r5(e),Lv=(e,t,i)=>{const a=Gr.parse(e),s=a[t],l=It.channel.clamp[t](s+i);return s!==l&&(a[t]=l),Gr.stringify(a)},st=(e,t)=>Lv(e,"l",t),lt=(e,t)=>Lv(e,"l",-t),E=(e,t)=>{const i=Gr.parse(e),a={};for(const s in t)t[s]&&(a[s]=i[s]+t[s]);return Ev(e,a)},a5=(e,t,i=50)=>{const{r:a,g:s,b:l,a:c}=Gr.parse(e),{r:h,g:u,b:f,a:p}=Gr.parse(t),g=i/100,x=g*2-1,m=c-p,C=((x*m===-1?x:(x+m)/(1+x*m))+1)/2,k=1-C,T=a*C+h*k,_=s*C+u*k,B=l*C+f*k,O=c*g+p*(1-g);return xn(T,_,B,O)},K=(e,t=100)=>{const i=Gr.parse(e);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,a5(i,e,t)};/*! @license DOMPurify 3.4.6 | (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.6/LICENSE */function cC(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function n5(e){if(Array.isArray(e))return e}function s5(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a,s,l,c,h=[],u=!0,f=!1;try{if(l=(i=i.call(e)).next,t!==0)for(;!(u=(a=l.call(i)).done)&&(h.push(a.value),h.length!==t);u=!0);}catch(p){f=!0,s=p}finally{try{if(!u&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw s}}return h}}function l5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
136
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o5(e,t){return n5(e)||s5(e,t)||c5(e,t)||l5()}function c5(e,t){if(e){if(typeof e=="string")return cC(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?cC(e,t):void 0}}const Av=Object.entries,hC=Object.setPrototypeOf,h5=Object.isFrozen,u5=Object.getPrototypeOf,d5=Object.getOwnPropertyDescriptor;let Ti=Object.freeze,ur=Object.seal,sl=Object.create,Mv=typeof Reflect<"u"&&Reflect,Mg=Mv.apply,Rg=Mv.construct;Ti||(Ti=function(t){return t});ur||(ur=function(t){return t});Mg||(Mg=function(t,i){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return t.apply(i,s)});Rg||(Rg=function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return new t(...a)});const tl=We(Array.prototype.forEach),f5=We(Array.prototype.lastIndexOf),uC=We(Array.prototype.pop),el=We(Array.prototype.push),p5=We(Array.prototype.splice),vi=Array.isArray,tc=We(String.prototype.toLowerCase),rg=We(String.prototype.toString),dC=We(String.prototype.match),il=We(String.prototype.replace),fC=We(String.prototype.indexOf),g5=We(String.prototype.trim),m5=We(Number.prototype.toString),y5=We(Boolean.prototype.toString),pC=typeof BigInt>"u"?null:We(BigInt.prototype.toString),gC=typeof Symbol>"u"?null:We(Symbol.prototype.toString),Fe=We(Object.prototype.hasOwnProperty),Uo=We(Object.prototype.toString),si=We(RegExp.prototype.test),Po=x5(TypeError);function We(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return Mg(e,t,a)}}function x5(e){return function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return Rg(e,i)}}function Gt(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tc;if(hC&&hC(e,null),!vi(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const l=i(s);l!==s&&(h5(t)||(t[a]=l),s=l)}e[s]=!0}return e}function b5(e){for(let t=0;t<e.length;t++)Fe(e,t)||(e[t]=null);return e}function Di(e){const t=sl(null);for(const a of Av(e)){var i=o5(a,2);const s=i[0],l=i[1];Fe(e,s)&&(vi(l)?t[s]=b5(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=Di(l):t[s]=l)}return t}function C5(e){switch(typeof e){case"string":return e;case"number":return m5(e);case"boolean":return y5(e);case"bigint":return pC?pC(e):"0";case"symbol":return gC?gC(e):"Symbol()";case"undefined":return Uo(e);case"function":case"object":{if(e===null)return Uo(e);const t=e,i=jr(t,"toString");if(typeof i=="function"){const a=i(t);return typeof a=="string"?a:Uo(a)}return Uo(e)}default:return Uo(e)}}function jr(e,t){for(;e!==null;){const a=d5(e,t);if(a){if(a.get)return We(a.get);if(typeof a.value=="function")return We(a.value)}e=u5(e)}function i(){return null}return i}function v5(e){try{return si(e,""),!0}catch{return!1}}const mC=Ti(["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"]),ag=Ti(["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"]),ng=Ti(["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"]),k5=Ti(["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"]),sg=Ti(["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"]),S5=Ti(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),yC=Ti(["#text"]),xC=Ti(["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"]),lg=Ti(["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"]),bC=Ti(["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"]),ru=Ti(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),T5=ur(/{{[\w\W]*|^[\w\W]*}}/g),w5=ur(/<%[\w\W]*|^[\w\W]*%>/g),_5=ur(/\${[\w\W]*/g),B5=ur(/^data-[\-\w.\u00B7-\uFFFF]+$/),E5=ur(/^aria-[\-\w]+$/),CC=ur(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),L5=ur(/^(?:\w+script|data):/i),A5=ur(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),M5=ur(/^html$/i),R5=ur(/^[a-z][.\w]*(-[.\w]+)+$/i),fn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},O5=function(){return typeof window>"u"?null:window},F5=function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";i&&i.hasAttribute(s)&&(a=i.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},vC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Rv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O5();const t=wt=>Rv(wt);if(t.version="3.4.6",t.removed=[],!e||!e.document||e.document.nodeType!==fn.document||!e.Element)return t.isSupported=!1,t;let i=e.document;const a=i,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,h=e.Element,u=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,g=e.trustedTypes,x=h.prototype,m=jr(x,"cloneNode"),v=jr(x,"remove"),C=jr(x,"nextSibling"),k=jr(x,"childNodes"),T=jr(x,"parentNode"),_=jr(x,"shadowRoot"),B=jr(x,"attributes"),O=c&&c.prototype?jr(c.prototype,"nodeType"):null,D=c&&c.prototype?jr(c.prototype,"nodeName"):null;if(typeof l=="function"){const wt=i.createElement("template");wt.content&&wt.content.ownerDocument&&(i=wt.content.ownerDocument)}let N,H="";const R=i,Z=R.implementation,P=R.createNodeIterator,W=R.createDocumentFragment,et=R.getElementsByTagName,tt=a.importNode;let X=vC();t.isSupported=typeof Av=="function"&&typeof T=="function"&&Z&&Z.createHTMLDocument!==void 0;const Y=T5,M=w5,I=_5,$=B5,F=E5,Q=L5,q=A5,it=R5;let ut=CC,dt=null;const yt=Gt({},[...mC,...ag,...ng,...sg,...yC]);let xt=null;const Rt=Gt({},[...xC,...lg,...bC,...ru]);let Ft=Object.seal(sl(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}})),Ut=null,U=null;const ct=Object.seal(sl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ct=!0,Ot=!0,Jt=!1,me=!0,Ht=!1,Ae=!0,De=!1,Je=!1,Kr=!1,Ki=!1,pr=!1,us=!1,ci=!0,qc=!1;const Wl="user-content-";let ds=!0,Dr=!1,Ma={},qi=null;const Yl=Gt({},["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 Ic=null;const Ra=Gt({},["audio","video","img","source","image","track"]);let ti=null;const gr=Gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",fs="http://www.w3.org/2000/svg",Ji="http://www.w3.org/1999/xhtml";let Oa=Ji,Fa=!1,Da=null;const ps=Gt({},[Ze,fs,Ji],rg);let mr=Gt({},["mi","mo","mn","ms","mtext"]),$a=Gt({},["annotation-xml"]);const wn=Gt({},["title","style","font","a","script"]);let _n=null;const Hc=["application/xhtml+xml","text/html"],Gl="text/html";let ve=null,za=null;const jc=i.createElement("form"),Xl=function(j){return j instanceof RegExp||j instanceof Function},gs=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(za&&za===j)return;(!j||typeof j!="object")&&(j={}),j=Di(j),_n=Hc.indexOf(j.PARSER_MEDIA_TYPE)===-1?Gl:j.PARSER_MEDIA_TYPE,ve=_n==="application/xhtml+xml"?rg:tc,dt=Fe(j,"ALLOWED_TAGS")&&vi(j.ALLOWED_TAGS)?Gt({},j.ALLOWED_TAGS,ve):yt,xt=Fe(j,"ALLOWED_ATTR")&&vi(j.ALLOWED_ATTR)?Gt({},j.ALLOWED_ATTR,ve):Rt,Da=Fe(j,"ALLOWED_NAMESPACES")&&vi(j.ALLOWED_NAMESPACES)?Gt({},j.ALLOWED_NAMESPACES,rg):ps,ti=Fe(j,"ADD_URI_SAFE_ATTR")&&vi(j.ADD_URI_SAFE_ATTR)?Gt(Di(gr),j.ADD_URI_SAFE_ATTR,ve):gr,Ic=Fe(j,"ADD_DATA_URI_TAGS")&&vi(j.ADD_DATA_URI_TAGS)?Gt(Di(Ra),j.ADD_DATA_URI_TAGS,ve):Ra,qi=Fe(j,"FORBID_CONTENTS")&&vi(j.FORBID_CONTENTS)?Gt({},j.FORBID_CONTENTS,ve):Yl,Ut=Fe(j,"FORBID_TAGS")&&vi(j.FORBID_TAGS)?Gt({},j.FORBID_TAGS,ve):Di({}),U=Fe(j,"FORBID_ATTR")&&vi(j.FORBID_ATTR)?Gt({},j.FORBID_ATTR,ve):Di({}),Ma=Fe(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?Di(j.USE_PROFILES):j.USE_PROFILES:!1,Ct=j.ALLOW_ARIA_ATTR!==!1,Ot=j.ALLOW_DATA_ATTR!==!1,Jt=j.ALLOW_UNKNOWN_PROTOCOLS||!1,me=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ht=j.SAFE_FOR_TEMPLATES||!1,Ae=j.SAFE_FOR_XML!==!1,De=j.WHOLE_DOCUMENT||!1,Ki=j.RETURN_DOM||!1,pr=j.RETURN_DOM_FRAGMENT||!1,us=j.RETURN_TRUSTED_TYPE||!1,Kr=j.FORCE_BODY||!1,ci=j.SANITIZE_DOM!==!1,qc=j.SANITIZE_NAMED_PROPS||!1,ds=j.KEEP_CONTENT!==!1,Dr=j.IN_PLACE||!1,ut=v5(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:CC,Oa=typeof j.NAMESPACE=="string"?j.NAMESPACE:Ji,mr=Fe(j,"MATHML_TEXT_INTEGRATION_POINTS")&&j.MATHML_TEXT_INTEGRATION_POINTS&&typeof j.MATHML_TEXT_INTEGRATION_POINTS=="object"?Di(j.MATHML_TEXT_INTEGRATION_POINTS):Gt({},["mi","mo","mn","ms","mtext"]),$a=Fe(j,"HTML_INTEGRATION_POINTS")&&j.HTML_INTEGRATION_POINTS&&typeof j.HTML_INTEGRATION_POINTS=="object"?Di(j.HTML_INTEGRATION_POINTS):Gt({},["annotation-xml"]);const ft=Fe(j,"CUSTOM_ELEMENT_HANDLING")&&j.CUSTOM_ELEMENT_HANDLING&&typeof j.CUSTOM_ELEMENT_HANDLING=="object"?Di(j.CUSTOM_ELEMENT_HANDLING):sl(null);if(Ft=sl(null),Fe(ft,"tagNameCheck")&&Xl(ft.tagNameCheck)&&(Ft.tagNameCheck=ft.tagNameCheck),Fe(ft,"attributeNameCheck")&&Xl(ft.attributeNameCheck)&&(Ft.attributeNameCheck=ft.attributeNameCheck),Fe(ft,"allowCustomizedBuiltInElements")&&typeof ft.allowCustomizedBuiltInElements=="boolean"&&(Ft.allowCustomizedBuiltInElements=ft.allowCustomizedBuiltInElements),Ht&&(Ot=!1),pr&&(Ki=!0),Ma&&(dt=Gt({},yC),xt=sl(null),Ma.html===!0&&(Gt(dt,mC),Gt(xt,xC)),Ma.svg===!0&&(Gt(dt,ag),Gt(xt,lg),Gt(xt,ru)),Ma.svgFilters===!0&&(Gt(dt,ng),Gt(xt,lg),Gt(xt,ru)),Ma.mathMl===!0&&(Gt(dt,sg),Gt(xt,bC),Gt(xt,ru))),ct.tagCheck=null,ct.attributeCheck=null,Fe(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?ct.tagCheck=j.ADD_TAGS:vi(j.ADD_TAGS)&&(dt===yt&&(dt=Di(dt)),Gt(dt,j.ADD_TAGS,ve))),Fe(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?ct.attributeCheck=j.ADD_ATTR:vi(j.ADD_ATTR)&&(xt===Rt&&(xt=Di(xt)),Gt(xt,j.ADD_ATTR,ve))),Fe(j,"ADD_URI_SAFE_ATTR")&&vi(j.ADD_URI_SAFE_ATTR)&&Gt(ti,j.ADD_URI_SAFE_ATTR,ve),Fe(j,"FORBID_CONTENTS")&&vi(j.FORBID_CONTENTS)&&(qi===Yl&&(qi=Di(qi)),Gt(qi,j.FORBID_CONTENTS,ve)),Fe(j,"ADD_FORBID_CONTENTS")&&vi(j.ADD_FORBID_CONTENTS)&&(qi===Yl&&(qi=Di(qi)),Gt(qi,j.ADD_FORBID_CONTENTS,ve)),ds&&(dt["#text"]=!0),De&&Gt(dt,["html","head","body"]),dt.table&&(Gt(dt,["tbody"]),delete Ut.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Po('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Po('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=j.TRUSTED_TYPES_POLICY,H=N.createHTML("")}else N===void 0&&(N=F5(g,s)),N!==null&&typeof H=="string"&&(H=N.createHTML(""));Ti&&Ti(j),za=j},ms=Gt({},[...ag,...ng,...k5]),ys=Gt({},[...sg,...S5]),Uc=function(j){let ft=T(j);(!ft||!ft.tagName)&&(ft={namespaceURI:Oa,tagName:"template"});const bt=tc(j.tagName),ce=tc(ft.tagName);return Da[j.namespaceURI]?j.namespaceURI===fs?ft.namespaceURI===Ji?bt==="svg":ft.namespaceURI===Ze?bt==="svg"&&(ce==="annotation-xml"||mr[ce]):!!ms[bt]:j.namespaceURI===Ze?ft.namespaceURI===Ji?bt==="math":ft.namespaceURI===fs?bt==="math"&&$a[ce]:!!ys[bt]:j.namespaceURI===Ji?ft.namespaceURI===fs&&!$a[ce]||ft.namespaceURI===Ze&&!mr[ce]?!1:!ys[bt]&&(wn[bt]||!ms[bt]):!!(_n==="application/xhtml+xml"&&Da[j.namespaceURI]):!1},_i=function(j){el(t.removed,{element:j});try{T(j).removeChild(j)}catch{v(j)}},hi=function(j,ft){try{el(t.removed,{attribute:ft.getAttributeNode(j),from:ft})}catch{el(t.removed,{attribute:null,from:ft})}if(ft.removeAttribute(j),j==="is")if(Ki||pr)try{_i(ft)}catch{}else try{ft.setAttribute(j,"")}catch{}},qe=function(j){let ft=null,bt=null;if(Kr)j="<remove></remove>"+j;else{const ke=dC(j,/^[\r\n\t ]+/);bt=ke&&ke[0]}_n==="application/xhtml+xml"&&Oa===Ji&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const ce=N?N.createHTML(j):j;if(Oa===Ji)try{ft=new p().parseFromString(ce,_n)}catch{}if(!ft||!ft.documentElement){ft=Z.createDocument(Oa,"template",null);try{ft.documentElement.innerHTML=Fa?H:ce}catch{}}const ae=ft.body||ft.documentElement;return j&&bt&&ae.insertBefore(i.createTextNode(bt),ae.childNodes[0]||null),Oa===Ji?et.call(ft,De?"html":"body")[0]:De?ft.documentElement:ae},ei=function(j){return P.call(j.ownerDocument||j,j,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Jr=function(j){j.normalize();const ft=P.call(j.ownerDocument||j,j,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let bt=ft.nextNode();for(;bt;){let ce=bt.data;tl([Y,M,I],ae=>{ce=il(ce,ae," ")}),bt.data=ce,bt=ft.nextNode()}},Na=function(j){const ft=D?D(j):null;return typeof ft!="string"||ve(ft)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==B(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.childNodes!==k(j)},Vl=function(j){if(!O||typeof j!="object"||j===null)return!1;try{return O(j)===fn.documentFragment}catch{return!1}},xs=function(j){if(!O||typeof j!="object"||j===null)return!1;try{return typeof O(j)=="number"}catch{return!1}};function tr(wt,j,ft){tl(wt,bt=>{bt.call(t,j,ft,za)})}const qa=function(j){let ft=null;if(tr(X.beforeSanitizeElements,j,null),Na(j))return _i(j),!0;const bt=ve(j.nodeName);if(tr(X.uponSanitizeElement,j,{tagName:bt,allowedTags:dt}),Ae&&j.hasChildNodes()&&!xs(j.firstElementChild)&&si(/<[/\w!]/g,j.innerHTML)&&si(/<[/\w!]/g,j.textContent)||Ae&&j.namespaceURI===Ji&&bt==="style"&&xs(j.firstElementChild)||j.nodeType===fn.progressingInstruction||Ae&&j.nodeType===fn.comment&&si(/<[/\w]/g,j.data))return _i(j),!0;if(Ut[bt]||!(ct.tagCheck instanceof Function&&ct.tagCheck(bt))&&!dt[bt]){if(!Ut[bt]&&ta(bt)&&(Ft.tagNameCheck instanceof RegExp&&si(Ft.tagNameCheck,bt)||Ft.tagNameCheck instanceof Function&&Ft.tagNameCheck(bt)))return!1;if(ds&&!qi[bt]){const ae=T(j)||j.parentNode,ke=k(j)||j.childNodes;if(ke&&ae){const Bi=ke.length;for(let xi=Bi-1;xi>=0;--xi){const ui=m(ke[xi],!0);ae.insertBefore(ui,C(j))}}}return _i(j),!0}return(O?O(j):j.nodeType)===fn.element&&!Uc(j)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&si(/<\/no(script|embed|frames)/i,j.innerHTML)?(_i(j),!0):(Ht&&j.nodeType===fn.text&&(ft=j.textContent,tl([Y,M,I],ae=>{ft=il(ft,ae," ")}),j.textContent!==ft&&(el(t.removed,{element:j.cloneNode()}),j.textContent=ft)),tr(X.afterSanitizeElements,j,null),!1)},bs=function(j,ft,bt){if(U[ft]||ci&&(ft==="id"||ft==="name")&&(bt in i||bt in jc))return!1;const ce=xt[ft]||ct.attributeCheck instanceof Function&&ct.attributeCheck(ft,j);if(!(Ot&&!U[ft]&&si($,ft))){if(!(Ct&&si(F,ft))){if(!ce||U[ft]){if(!(ta(j)&&(Ft.tagNameCheck instanceof RegExp&&si(Ft.tagNameCheck,j)||Ft.tagNameCheck instanceof Function&&Ft.tagNameCheck(j))&&(Ft.attributeNameCheck instanceof RegExp&&si(Ft.attributeNameCheck,ft)||Ft.attributeNameCheck instanceof Function&&Ft.attributeNameCheck(ft,j))||ft==="is"&&Ft.allowCustomizedBuiltInElements&&(Ft.tagNameCheck instanceof RegExp&&si(Ft.tagNameCheck,bt)||Ft.tagNameCheck instanceof Function&&Ft.tagNameCheck(bt))))return!1}else if(!ti[ft]){if(!si(ut,il(bt,q,""))){if(!((ft==="src"||ft==="xlink:href"||ft==="href")&&j!=="script"&&fC(bt,"data:")===0&&Ic[j])){if(!(Jt&&!si(Q,il(bt,q,"")))){if(bt)return!1}}}}}}return!0},Ia=Gt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ta=function(j){return!Ia[tc(j)]&&si(it,j)},Ha=function(j){tr(X.beforeSanitizeAttributes,j,null);const ft=j.attributes;if(!ft||Na(j))return;const bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt,forceKeepAttr:void 0};let ce=ft.length;for(;ce--;){const ae=ft[ce],ke=ae.name,Bi=ae.namespaceURI,xi=ae.value,ui=ve(ke),Ii=xi;let he=ke==="value"?Ii:g5(Ii);if(bt.attrName=ui,bt.attrValue=he,bt.keepAttr=!0,bt.forceKeepAttr=void 0,tr(X.uponSanitizeAttribute,j,bt),he=bt.attrValue,qc&&(ui==="id"||ui==="name")&&fC(he,Wl)!==0&&(hi(ke,j),he=Wl+he),Ae&&si(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,he)){hi(ke,j);continue}if(ui==="attributename"&&dC(he,"href")){hi(ke,j);continue}if(bt.forceKeepAttr)continue;if(!bt.keepAttr){hi(ke,j);continue}if(!me&&si(/\/>/i,he)){hi(ke,j);continue}Ht&&tl([Y,M,I],Pc=>{he=il(he,Pc," ")});const Zl=ve(j.nodeName);if(!bs(Zl,ui,he)){hi(ke,j);continue}if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Bi)switch(g.getAttributeType(Zl,ui)){case"TrustedHTML":{he=N.createHTML(he);break}case"TrustedScriptURL":{he=N.createScriptURL(he);break}}if(he!==Ii)try{Bi?j.setAttributeNS(Bi,ke,he):j.setAttribute(ke,he),Na(j)?_i(j):uC(t.removed)}catch{hi(ke,j)}}tr(X.afterSanitizeAttributes,j,null)},$r=function(j){let ft=null;const bt=ei(j);for(tr(X.beforeSanitizeShadowDOM,j,null);ft=bt.nextNode();)tr(X.uponSanitizeShadowNode,ft,null),qa(ft),Ha(ft),Vl(ft.content)&&$r(ft.content);tr(X.afterSanitizeShadowDOM,j,null)},Ee=function(j){if((O?O(j):j.nodeType)===fn.element){const ae=_?_(j):j.shadowRoot;Vl(ae)&&(Ee(ae),$r(ae))}const bt=k?k(j):j.childNodes;if(!bt)return;const ce=[];tl(bt,ae=>{el(ce,ae)});for(const ae of ce)Ee(ae)};return t.sanitize=function(wt){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft=null,bt=null,ce=null,ae=null;if(Fa=!wt,Fa&&(wt="<!-->"),typeof wt!="string"&&!xs(wt)&&(wt=C5(wt),typeof wt!="string"))throw Po("dirty is not a string, aborting");if(!t.isSupported)return wt;if(Je||gs(j),t.removed=[],typeof wt=="string"&&(Dr=!1),Dr){const xi=D?D(wt):wt.nodeName;if(typeof xi=="string"){const ui=ve(xi);if(!dt[ui]||Ut[ui])throw Po("root node is forbidden and cannot be sanitized in-place")}if(Na(wt))throw Po("root node is clobbered and cannot be sanitized in-place");Ee(wt)}else if(xs(wt))ft=qe("<!---->"),bt=ft.ownerDocument.importNode(wt,!0),bt.nodeType===fn.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?ft=bt:ft.appendChild(bt),Ee(bt);else{if(!Ki&&!Ht&&!De&&wt.indexOf("<")===-1)return N&&us?N.createHTML(wt):wt;if(ft=qe(wt),!ft)return Ki?null:us?H:""}ft&&Kr&&_i(ft.firstChild);const ke=ei(Dr?wt:ft);for(;ce=ke.nextNode();)qa(ce),Ha(ce),Vl(ce.content)&&$r(ce.content);if(Dr)return Ht&&Jr(wt),wt;if(Ki){if(Ht&&Jr(ft),pr)for(ae=W.call(ft.ownerDocument);ft.firstChild;)ae.appendChild(ft.firstChild);else ae=ft;return(xt.shadowroot||xt.shadowrootmode)&&(ae=tt.call(a,ae,!0)),ae}let Bi=De?ft.outerHTML:ft.innerHTML;return De&&dt["!doctype"]&&ft.ownerDocument&&ft.ownerDocument.doctype&&ft.ownerDocument.doctype.name&&si(M5,ft.ownerDocument.doctype.name)&&(Bi="<!DOCTYPE "+ft.ownerDocument.doctype.name+`>
137
- `+Bi),Ht&&tl([Y,M,I],xi=>{Bi=il(Bi,xi," ")}),N&&us?N.createHTML(Bi):Bi},t.setConfig=function(){let wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gs(wt),Je=!0},t.clearConfig=function(){za=null,Je=!1},t.isValidAttribute=function(wt,j,ft){za||gs({});const bt=ve(wt),ce=ve(j);return bs(bt,ce,ft)},t.addHook=function(wt,j){typeof j=="function"&&el(X[wt],j)},t.removeHook=function(wt,j){if(j!==void 0){const ft=f5(X[wt],j);return ft===-1?void 0:p5(X[wt],ft,1)[0]}return uC(X[wt])},t.removeHooks=function(wt){X[wt]=[]},t.removeAllHooks=function(){X=vC()},t}var Ll=Rv(),Ov=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,cc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,D5=/\s*%%.*\n/gm,gl,Fv=(gl=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},S(gl,"UnknownDiagramError"),gl),es={},Km=S(function(e,t){e=e.replace(Ov,"").replace(cc,"").replace(D5,`
138
- `);for(const[i,{detector:a}]of Object.entries(es))if(a(e,t))return i;throw new Fv(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Og=S((...e)=>{for(const{id:t,detector:i,loader:a}of e)Dv(t,i,a)},"registerLazyLoadedDiagrams"),Dv=S((e,t,i)=>{es[e]&&mt.warn(`Detector with key ${e} already exists. Overwriting.`),es[e]={detector:t,loader:i},mt.debug(`Detector with key ${e} added${i?" with loader":""}`)},"addDetector"),$5=S(e=>es[e].loader,"getDiagramLoader"),Fg=S((e,t,{depth:i=2,clobber:a=!1}={})=>{const s={depth:i,clobber:a};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(l=>Fg(e,l,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(l=>{e.includes(l)||e.push(l)}),e):e===void 0||i<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(l=>{typeof t[l]=="object"&&t[l]!==null&&(e[l]===void 0||typeof e[l]=="object")?(e[l]===void 0&&(e[l]=Array.isArray(t[l])?[]:{}),e[l]=Fg(e[l],t[l],{depth:i-1,clobber:a})):(a||typeof e[l]!="object"&&typeof t[l]!="object")&&(e[l]=t[l])}),e)},"assignWithDepth"),Xe=Fg,Vr="#ffffff",Zr="#f2f2f2",qt=S((e,t)=>t?E(e,{s:-40,l:10}):E(e,{s:-40,l:-10}),"mkBorder"),ml,z5=(ml=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 i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,B,O,D,N,H,R,Z,P,W,et,tt,X,Y,M,I,$,F;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||st(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||lt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||lt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||st(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=lt(this["cScale"+Q],75);else for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScale"+Q]=lt(this["cScale"+Q],25);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleInv"+Q]=this["cScaleInv"+Q]||K(this["cScale"+Q]);for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this.darkMode?this["cScalePeer"+Q]=this["cScalePeer"+Q]||st(this["cScale"+Q],10):this["cScalePeer"+Q]=this["cScalePeer"+Q]||lt(this["cScale"+Q],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Q=0;Q<this.THEME_COLOR_LIMIT;Q++)this["cScaleLabel"+Q]=this["cScaleLabel"+Q]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Q=0;Q<5;Q++)this["surface"+Q]=this["surface"+Q]||E(this.mainBkg,{h:180,s:-15,l:t*(5+Q*3)}),this["surfacePeer"+Q]=this["surfacePeer"+Q]||E(this.mainBkg,{h:180,s:-15,l:t*(8+Q*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((i=this.radar)==null?void 0:i.axisColor)||this.lineColor,axisStrokeWidth:((a=this.radar)==null?void 0:a.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((l=this.radar)==null?void 0:l.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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((x=this.wardley)==null?void 0:x.backgroundColor)||this.background,axisColor:((m=this.wardley)==null?void 0:m.axisColor)||this.lineColor,axisTextColor:((v=this.wardley)==null?void 0:v.axisTextColor)||this.primaryTextColor,gridColor:((C=this.wardley)==null?void 0:C.gridColor)||this.gridColor,componentFill:((k=this.wardley)==null?void 0:k.componentFill)||this.background,componentStroke:((T=this.wardley)==null?void 0:T.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:((B=this.wardley)==null?void 0:B.linkStroke)||this.lineColor,evolutionStroke:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((D=this.wardley)==null?void 0:D.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((H=this.wardley)==null?void 0:H.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((Z=this.xyChart)==null?void 0:Z.titleColor)||this.primaryTextColor,dataLabelColor:((P=this.xyChart)==null?void 0:P.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((W=this.xyChart)==null?void 0:W.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((et=this.xyChart)==null?void 0:et.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((tt=this.xyChart)==null?void 0:tt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((X=this.xyChart)==null?void 0:X.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((M=this.xyChart)==null?void 0:M.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((I=this.xyChart)==null?void 0:I.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.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?lt(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(ml,"Theme"),ml),N5=S(e=>{const t=new z5;return t.calculate(e),t},"getThemeVariables"),yl,q5=(yl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=xn(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=lt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=lt(this.sectionBkgColor,10),this.taskBorderColor=xn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=xn(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||st(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||lt(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 t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,B,O,D,N,H,R,Z,P,W,et,tt,X,Y,M,I,$;this.secondBkg=st(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=st(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=st(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=K(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330});for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||K(this["cScale"+F]);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScalePeer"+F]=this["cScalePeer"+F]||st(this["cScale"+F],10);for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||E(this.mainBkg,{h:30,s:-30,l:-(-10+F*4)}),this["surfacePeer"+F]=this["surfacePeer"+F]||E(this.mainBkg,{h:30,s:-30,l:-(-7+F*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.scaleLabelColor;for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["pie"+F]=this["cScale"+F];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 F=0;F<8;F++)this["venn"+(F+1)]=this["venn"+(F+1)]??st(this["cScale"+F],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((a=this.xyChart)==null?void 0:a.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((O=this.radar)==null?void 0:O.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((H=this.wardley)==null?void 0:H.backgroundColor)||this.background,axisColor:((R=this.wardley)==null?void 0:R.axisColor)||this.lineColor,axisTextColor:((Z=this.wardley)==null?void 0:Z.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((W=this.wardley)==null?void 0:W.componentFill)||this.mainBkg,componentStroke:((et=this.wardley)==null?void 0:et.componentStroke)||this.lineColor,componentLabelColor:((tt=this.wardley)==null?void 0:tt.componentLabelColor)||this.primaryTextColor,linkStroke:((X=this.wardley)==null?void 0:X.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((M=this.wardley)==null?void 0:M.annotationStroke)||this.lineColor,annotationTextColor:((I=this.wardley)==null?void 0:I.annotationTextColor)||this.primaryTextColor,annotationFill:(($=this.wardley)==null?void 0:$.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=st(this.secondaryColor,20),this.git1=st(this.pie2||this.secondaryColor,20),this.git2=st(this.pie3||this.tertiaryColor,20),this.git3=st(this.pie4||E(this.primaryColor,{h:-30}),20),this.git4=st(this.pie5||E(this.primaryColor,{h:-60}),20),this.git5=st(this.pie6||E(this.primaryColor,{h:-90}),10),this.git6=st(this.pie7||E(this.primaryColor,{h:60}),10),this.git7=st(this.pie8||E(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||st("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||st("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||st("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||st("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||st(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||st(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||st(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||st(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(yl,"Theme"),yl),I5=S(e=>{const t=new q5;return t.calculate(e),t},"getThemeVariables"),xl,H5=(xl=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=E(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=qt(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=xn(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 t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,B,O,D,N,H,R,Z,P,W,et,tt,X,Y,M,I,$;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||lt(this.tertiaryColor,40);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScale"+F]=lt(this["cScale"+F],10),this["cScalePeer"+F]=this["cScalePeer"+F]||lt(this["cScale"+F],25);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||E(this["cScale"+F],{h:180});for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||E(this.mainBkg,{h:30,l:-(5+F*5)}),this["surfacePeer"+F]=this["surfacePeer"+F]||E(this.mainBkg,{h:30,l:-(7+F*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||K(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||K(this.labelTextColor);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||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||st(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||st(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||E(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-30}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||E(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||E(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??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((l=this.radar)==null?void 0:l.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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((x=this.wardley)==null?void 0:x.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((v=this.wardley)==null?void 0:v.gridColor)||this.gridColor,componentFill:((C=this.wardley)==null?void 0:C.componentFill)||this.background,componentStroke:((k=this.wardley)==null?void 0:k.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((_=this.wardley)==null?void 0:_.linkStroke)||this.lineColor,evolutionStroke:((B=this.wardley)==null?void 0:B.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((O=this.wardley)==null?void 0:O.annotationStroke)||this.lineColor,annotationTextColor:((D=this.wardley)==null?void 0:D.annotationTextColor)||this.primaryTextColor,annotationFill:((N=this.wardley)==null?void 0:N.annotationFill)||this.background},this.xyChart={backgroundColor:((H=this.xyChart)==null?void 0:H.backgroundColor)||this.background,titleColor:((R=this.xyChart)==null?void 0:R.titleColor)||this.primaryTextColor,dataLabelColor:((Z=this.xyChart)==null?void 0:Z.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((W=this.xyChart)==null?void 0:W.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((et=this.xyChart)==null?void 0:et.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((tt=this.xyChart)==null?void 0:tt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((X=this.xyChart)==null?void 0:X.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(($=this.xyChart)==null?void 0:$.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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||lt(K(this.git0),25),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(Object.keys(this).forEach(a=>{this[a]==="calculated"&&(this[a]=void 0)}),typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(xl,"Theme"),xl),j5=S(e=>{const t=new H5;return t.calculate(e),t},"getThemeVariables"),bl,U5=(bl=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=st("#cde498",10),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.primaryColor),this.lineColor=K(this.background),this.textColor=K(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 t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,B,O,D,N,H,R,Z,P,W,et,tt,X,Y,M,I,$;this.actorBorder=lt(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||lt(this.tertiaryColor,40);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScale"+F]=lt(this["cScale"+F],10),this["cScalePeer"+F]=this["cScalePeer"+F]||lt(this["cScale"+F],25);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||E(this["cScale"+F],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.scaleLabelColor;for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||E(this.mainBkg,{h:30,s:-30,l:-(5+F*5)}),this["surfacePeer"+F]=this["surfacePeer"+F]||E(this.mainBkg,{h:30,s:-30,l:-(8+F*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||st(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||st(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{l:-30}),this.pie5=this.pie5||E(this.secondaryColor,{l:-30}),this.pie6=this.pie6||E(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||E(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??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((l=this.radar)==null?void 0:l.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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((x=this.wardley)==null?void 0:x.axisColor)||this.lineColor,axisTextColor:((m=this.wardley)==null?void 0:m.axisTextColor)||this.primaryTextColor,gridColor:((v=this.wardley)==null?void 0:v.gridColor)||this.gridColor,componentFill:((C=this.wardley)==null?void 0:C.componentFill)||this.background,componentStroke:((k=this.wardley)==null?void 0:k.componentStroke)||this.lineColor,componentLabelColor:((T=this.wardley)==null?void 0:T.componentLabelColor)||this.primaryTextColor,linkStroke:((_=this.wardley)==null?void 0:_.linkStroke)||this.lineColor,evolutionStroke:((B=this.wardley)==null?void 0:B.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((O=this.wardley)==null?void 0:O.annotationStroke)||this.lineColor,annotationTextColor:((D=this.wardley)==null?void 0:D.annotationTextColor)||this.primaryTextColor,annotationFill:((N=this.wardley)==null?void 0:N.annotationFill)||this.background},this.xyChart={backgroundColor:((H=this.xyChart)==null?void 0:H.backgroundColor)||this.background,titleColor:((R=this.xyChart)==null?void 0:R.titleColor)||this.primaryTextColor,dataLabelColor:((Z=this.xyChart)==null?void 0:Z.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((W=this.xyChart)==null?void 0:W.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((et=this.xyChart)==null?void 0:et.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((tt=this.xyChart)==null?void 0:tt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((X=this.xyChart)==null?void 0:X.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(($=this.xyChart)==null?void 0:$.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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(bl,"Theme"),bl),P5=S(e=>{const t=new U5;return t.calculate(e),t},"getThemeVariables"),Cl,W5=(Cl=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=st(this.contrast,55),this.background="#ffffff",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(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||st(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 t,i,a,s,l,c,h,u,f,p,g,x,m,v,C,k,T,_,B,O,D,N,H,R,Z,P,W,et,tt,X,Y,M,I,$;this.secondBkg=st(this.contrast,55),this.border2=this.contrast,this.actorBorder=st(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 F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||K(this["cScale"+F]);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this.darkMode?this["cScalePeer"+F]=this["cScalePeer"+F]||st(this["cScale"+F],10):this["cScalePeer"+F]=this["cScalePeer"+F]||lt(this["cScale"+F],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.scaleLabelColor;for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||E(this.mainBkg,{l:-(5+F*5)}),this["surfacePeer"+F]=this["surfacePeer"+F]||E(this.mainBkg,{l:-(8+F*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=st(this.contrast,30),this.sectionBkgColor2=st(this.contrast,30),this.taskBorderColor=lt(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=st(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=lt(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(this.secondaryColor,{h:128});for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["pie"+F]=this["cScale"+F];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 F=0;F<8;F++)this["venn"+(F+1)]=this["venn"+(F+1)]??this["cScale"+F];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,dataLabelColor:((a=this.xyChart)==null?void 0:a.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((v=this.radar)==null?void 0:v.axisStrokeWidth)||2,axisLabelFontSize:((C=this.radar)==null?void 0:C.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((O=this.radar)==null?void 0:O.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((H=this.wardley)==null?void 0:H.backgroundColor)||this.background,axisColor:((R=this.wardley)==null?void 0:R.axisColor)||this.lineColor,axisTextColor:((Z=this.wardley)==null?void 0:Z.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:((W=this.wardley)==null?void 0:W.componentFill)||this.background,componentStroke:((et=this.wardley)==null?void 0:et.componentStroke)||this.lineColor,componentLabelColor:((tt=this.wardley)==null?void 0:tt.componentLabelColor)||this.primaryTextColor,linkStroke:((X=this.wardley)==null?void 0:X.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((M=this.wardley)==null?void 0:M.annotationStroke)||this.lineColor,annotationTextColor:((I=this.wardley)==null?void 0:I.annotationTextColor)||this.primaryTextColor,annotationFill:(($=this.wardley)==null?void 0:$.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=lt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||E(this.primaryColor,{h:-30}),this.git4=this.pie5||E(this.primaryColor,{h:-60}),this.git5=this.pie6||E(this.primaryColor,{h:-90}),this.git6=this.pie7||E(this.primaryColor,{h:60}),this.git7=this.pie8||E(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Cl,"Theme"),Cl),Y5=S(e=>{const t=new W5;return t.calculate(e),t},"getThemeVariables"),vl,G5=(vl=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=qt(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 l,c,h,u,f,p,g,x,m,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=E(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||st(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||a,this.cScale3=this.cScale3||E(t,{h:30}),this.cScale4=this.cScale4||E(t,{h:60}),this.cScale5=this.cScale5||E(t,{h:90}),this.cScale6=this.cScale6||E(t,{h:120}),this.cScale7=this.cScale7||E(t,{h:150}),this.cScale8=this.cScale8||E(t,{h:210,l:150}),this.cScale9=this.cScale9||E(t,{h:270}),this.cScale10=this.cScale10||E(t,{h:300}),this.cScale11=this.cScale11||E(t,{h:330}),this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||K(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||st(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||lt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||E(this.mainBkg,{h:180,s:-15,l:s*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||E(this.mainBkg,{h:180,s:-15,l:s*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||E(t,{h:64}),this.fillType3=this.fillType3||E(i,{h:64}),this.fillType4=this.fillType4||E(t,{h:-64}),this.fillType5=this.fillType5||E(i,{h:-64}),this.fillType6=this.fillType6||E(t,{h:128}),this.fillType7=this.fillType7||E(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||E(t,{l:-10}),this.pie5=this.pie5||E(i,{l:-10}),this.pie6=this.pie6||E(a,{l:-10}),this.pie7=this.pie7||E(t,{h:60,l:-10}),this.pie8=this.pie8||E(t,{h:-60,l:-10}),this.pie9=this.pie9||E(t,{h:120,l:0}),this.pie10=this.pie10||E(t,{h:60,l:-20}),this.pie11=this.pie11||E(t,{h:-60,l:-20}),this.pie12=this.pie12||E(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||E(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((l=this.xyChart)==null?void 0:l.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:((m=this.xyChart)==null?void 0:m.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||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||E(t,{h:-30}),this.git4=this.git4||E(t,{h:-60}),this.git5=this.git5||E(t,{h:-90}),this.git6=this.git6||E(t,{h:60}),this.git7=this.git7||E(t,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(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||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(vl,"Theme"),vl),X5=S(e=>{const t=new G5;return t.calculate(e),t},"getThemeVariables"),kl,V5=(kl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor=K(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 i,a,s,l,c,h,u,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||st(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||lt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||E(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||E(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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?lt(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=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(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||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(kl,"Theme"),kl),Z5=S(e=>{const t=new V5;return t.calculate(e),t},"getThemeVariables"),Sl,Q5=(Sl=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=qt("#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 l,c,h,u,f,p,g,x,m,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=E(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||st(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=this.mainBkg;if(this.darkMode)for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],75);else for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=lt(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||K(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||st(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||lt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||E(this.mainBkg,{h:180,s:-15,l:s*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||E(this.mainBkg,{h:180,s:-15,l:s*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||E(t,{h:64}),this.fillType3=this.fillType3||E(i,{h:64}),this.fillType4=this.fillType4||E(t,{h:-64}),this.fillType5=this.fillType5||E(i,{h:-64}),this.fillType6=this.fillType6||E(t,{h:128}),this.fillType7=this.fillType7||E(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||E(t,{l:-10}),this.pie5=this.pie5||E(i,{l:-10}),this.pie6=this.pie6||E(a,{l:-10}),this.pie7=this.pie7||E(t,{h:60,l:-10}),this.pie8=this.pie8||E(t,{h:-60,l:-10}),this.pie9=this.pie9||E(t,{h:120,l:0}),this.pie10=this.pie10||E(t,{h:60,l:-20}),this.pie11=this.pie11||E(t,{h:-60,l:-20}),this.pie12=this.pie12||E(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||E(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((l=this.xyChart)==null?void 0:l.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:((m=this.xyChart)==null?void 0:m.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||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||E(t,{h:-30}),this.git4=this.git4||E(t,{h:-60}),this.git5=this.git5||E(t,{h:-90}),this.git6=this.git6||E(t,{h:60}),this.git7=this.git7||E(t,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(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||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Sl,"Theme"),Sl),K5=S(e=>{const t=new Q5;return t.calculate(e),t},"getThemeVariables"),Tl,J5=(Tl=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor=K(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 i,a,s,l,c,h,u,f,p,g,x;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||st(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=lt(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||lt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||E(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||E(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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?lt(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(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||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(Tl,"Theme"),Tl),tR=S(e=>{const t=new J5;return t.calculate(e),t},"getThemeVariables"),wl,eR=(wl=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=qt(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 l,c,h,u,f,p,g,x,m,v,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor);const t="#ECECFE",i="#E9E9F1",a=E(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||a,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||st(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||K(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||st(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||lt(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||E(this.mainBkg,{h:180,s:-15,l:s*(5+k*3)}),this["surfacePeer"+k]=this["surfacePeer"+k]||E(this.mainBkg,{h:180,s:-15,l:s*(8+k*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||i,this.fillType2=this.fillType2||E(t,{h:64}),this.fillType3=this.fillType3||E(i,{h:64}),this.fillType4=this.fillType4||E(t,{h:-64}),this.fillType5=this.fillType5||E(i,{h:-64}),this.fillType6=this.fillType6||E(t,{h:128}),this.fillType7=this.fillType7||E(i,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||i,this.pie3=this.pie3||a,this.pie4=this.pie4||E(t,{l:-10}),this.pie5=this.pie5||E(i,{l:-10}),this.pie6=this.pie6||E(a,{l:-10}),this.pie7=this.pie7||E(t,{h:60,l:-10}),this.pie8=this.pie8||E(t,{h:-60,l:-10}),this.pie9=this.pie9||E(t,{h:120,l:0}),this.pie10=this.pie10||E(t,{h:60,l:-20}),this.pie11=this.pie11||E(t,{h:-60,l:-20}),this.pie12=this.pie12||E(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||E(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((l=this.xyChart)==null?void 0:l.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:((m=this.xyChart)==null?void 0:m.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||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||i,this.git2=this.git2||a,this.git3=this.git3||E(t,{h:-30}),this.git4=this.git4||E(t,{h:-60}),this.git5=this.git5||E(t,{h:-90}),this.git6=this.git6||E(t,{h:60}),this.git7=this.git7||E(t,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(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||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(wl,"Theme"),wl),iR=S(e=>{const t=new eR;return t.calculate(e),t},"getThemeVariables"),_l,rR=(_l=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=qt(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(K("#323D47"),10),this.border1="#ccc",this.border2=xn(255,255,255,.25),this.arrowheadColor=K(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 i,a,s,l,c,h,u,f,p,g,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||qt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||qt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||qt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||qt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(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?lt(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||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(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||st(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 m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||st(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||lt(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=lt(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||E(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||E(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Or(this.quadrant1Fill)?st(this.quadrant1Fill):lt(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.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?lt(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(this.primaryColor,{h:120}),this.darkMode?(this.git0=st(this.git0,25),this.git1=st(this.git1,25),this.git2=st(this.git2,25),this.git3=st(this.git3,25),this.git4=st(this.git4,25),this.git5=st(this.git5,25),this.git6=st(this.git6,25),this.git7=st(this.git7,25)):(this.git0=lt(this.git0,25),this.git1=lt(this.git1,25),this.git2=lt(this.git2,25),this.git3=lt(this.git3,25),this.git4=lt(this.git4,25),this.git5=lt(this.git5,25),this.git6=lt(this.git6,25),this.git7=lt(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(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||Vr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zr}calculate(t){if(typeof t!="object"){this.updateColors();return}const i=Object.keys(t);i.forEach(a=>{this[a]=t[a]}),this.updateColors(),i.forEach(a=>{this[a]=t[a]})}},S(_l,"Theme"),_l),aR=S(e=>{const t=new rR;return t.calculate(e),t},"getThemeVariables"),Sa={base:{getThemeVariables:N5},dark:{getThemeVariables:I5},default:{getThemeVariables:j5},forest:{getThemeVariables:P5},neutral:{getThemeVariables:Y5},neo:{getThemeVariables:X5},"neo-dark":{getThemeVariables:Z5},redux:{getThemeVariables:K5},"redux-dark":{getThemeVariables:tR},"redux-color":{getThemeVariables:iR},"redux-dark-color":{getThemeVariables:aR}},Ci={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,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},$v={...Ci,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Sa.default.getThemeVariables(),sequence:{...Ci.sequence,messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:S(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:S(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ci.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ci.c4,useWidth:void 0,personFont:S(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ci.flowchart,inheritDir:!1},external_personFont:S(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:S(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:S(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:S(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:S(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:S(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:S(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:S(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:S(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:S(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:S(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:S(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:S(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:S(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:S(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:S(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:S(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:S(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:S(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:S(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:S(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ci.pie,useWidth:984},xyChart:{...Ci.xyChart,useWidth:void 0},requirement:{...Ci.requirement,useWidth:void 0},packet:{...Ci.packet},eventmodeling:{...Ci.eventmodeling},treeView:{...Ci.treeView,useWidth:void 0},radar:{...Ci.radar},ishikawa:{...Ci.ishikawa},sankey:{...Ci.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Ci.venn}},zv=S((e,t="")=>Object.keys(e).reduce((i,a)=>Array.isArray(e[a])?i:typeof e[a]=="object"&&e[a]!==null?[...i,t+a,...zv(e[a],"")]:[...i,t+a],[]),"keyify"),nR=new Set(zv($v,"")),Nv=$v,Nu=S(e=>{if(mt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Nu(t));return}for(const t of Object.keys(e)){if(mt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nR.has(t)||e[t]==null){mt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const a=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!a.test(e[t][s]))&&(mt.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else mt.debug("sanitizing object",t),Nu(e[t]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const a of i)t.includes(a)&&(mt.debug("sanitizing css option",t),e[t]=qv(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const i=e.themeVariables[t];i!=null&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}mt.debug("After sanitization",e)}},"sanitizeDirective"),qv=S(e=>{let t=0,i=0;for(const a of e){if(t<i)return"{ /* ERROR: Unbalanced CSS */ }";a==="{"?t++:a==="}"&&i++}return t!==i?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Al=Object.freeze(Nv),Ea=S(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),$i=Xe({},Al),qu,is=[],hc=Xe({},Al),kd=S((e,t)=>{let i=Xe({},e),a={};for(const s of t)jv(s),a=Xe(a,s);if(i=Xe(i,a),a.theme&&a.theme in Sa){const s=Xe({},qu),l=Xe(s.themeVariables||{},a.themeVariables);i.theme&&i.theme in Sa&&(i.themeVariables=Sa[i.theme].getThemeVariables(l))}return hc=i,Pv(hc),hc},"updateCurrentConfig"),sR=S(e=>($i=Xe({},Al),$i=Xe($i,e),e.theme&&Sa[e.theme]&&($i.themeVariables=Sa[e.theme].getThemeVariables(e.themeVariables)),kd($i,is),$i),"setSiteConfig"),lR=S(e=>{qu=Xe({},e)},"saveConfigFromInitialize"),oR=S(e=>($i=Xe($i,e),kd($i,is),$i),"updateSiteConfig"),Iv=S(()=>Xe({},$i),"getSiteConfig"),Hv=S(e=>(Pv(e),Xe(hc,e),Le()),"setConfig"),Le=S(()=>Xe({},hc),"getConfig"),jv=S(e=>{e&&(["secure",...$i.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(mt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&jv(e[t])}))},"sanitize"),cR=S(e=>{var t;Nu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),is.push(e),kd($i,is)},"addDirective"),Iu=S((e=$i)=>{is=[],kd(e,is)},"reset"),hR={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."},kC={},Uv=S(e=>{kC[e]||(mt.warn(hR[e]),kC[e]=!0)},"issueWarning"),Pv=S(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Uv("LAZY_LOAD_DEPRECATED")},"checkConfig"),Y7=S(()=>{let e={};qu&&(e=Xe(e,qu));for(const t of is)e=Xe(e,t);return e},"getUserDefinedConfig"),wi=S(e=>{var t,i;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Uv("FLOWCHART_HTML_LABELS_DEPRECATED"),Ea(e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ac=/<br\s*\/?>/gi,uR=S(e=>e?Gv(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),dR=(()=>{let e=!1;return()=>{e||(Wv(),e=!0)}})();function Wv(){const e="data-temp-href-target";Ll.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ll.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}S(Wv,"setupDompurifyHooks");var Yv=S(e=>(dR(),Ll.sanitize(e)),"removeScript"),SC=S((e,t)=>{if(wi(t)){const i=t.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?e=Yv(e):i!=="loose"&&(e=Gv(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=mR(e))}return e},"sanitizeMore"),Mr=S((e,t)=>e&&(t.dompurifyConfig?e=Ll.sanitize(SC(e,t),t.dompurifyConfig).toString():e=Ll.sanitize(SC(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),fR=S((e,t)=>typeof e=="string"?Mr(e,t):e.flat().map(i=>Mr(i,t)),"sanitizeTextOrArray"),pR=S(e=>Ac.test(e),"hasBreaks"),gR=S(e=>e.split(Ac),"splitBreaks"),mR=S(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Gv=S(e=>e.replace(Ac,"#br#"),"breakToPlaceholder"),yR=S(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),xR=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),bR=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),TC=S(function(e){const t=e.split(/(,)/),i=[];for(let a=0;a<t.length;a++){let s=t[a];if(s===","&&a>0&&a+1<t.length){const l=t[a-1],c=t[a+1];CR(l,c)&&(s=l+","+c,a++,i.pop())}i.push(vR(s))}return i.join("")},"parseGenericTypes"),Dg=S((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),CR=S((e,t)=>{const i=Dg(e,"~"),a=Dg(t,"~");return i===1&&a===1},"shouldCombineSets"),vR=S(e=>{const t=Dg(e,"~");let i=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),i=!0);const a=[...e];let s=a.indexOf("~"),l=a.lastIndexOf("~");for(;s!==-1&&l!==-1&&s!==l;)a[s]="<",a[l]=">",s=a.indexOf("~"),l=a.lastIndexOf("~");return i&&a.unshift("~"),a.join("")},"processSet"),wC=S(()=>window.MathMLElement!==void 0,"isMathMLSupported"),$g=/\$\$(.*)\$\$/g,gc=S(e=>{var t;return(((t=e.match($g))==null?void 0:t.length)??0)>0},"hasKatex"),G7=S(async(e,t)=>{const i=document.createElement("div");i.innerHTML=await Xv(e,t),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const a=document.querySelector("body");a==null||a.insertAdjacentElement("beforeend",i);const s={width:i.clientWidth,height:i.clientHeight};return i.remove(),s},"calculateMathMLDimensions"),kR=S(async(e,t)=>{if(!gc(e))return e;if(!(wC()||t.legacyMathML||t.forceLegacyMathML))return e.replace($g,"MathML is unsupported in this environment.");{const{default:i}=await ie(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),a=t.forceLegacyMathML||!wC()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ac).map(s=>gc(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace($g,(s,l)=>i.renderToString(l,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Xv=S(async(e,t)=>Mr(await kR(e,t),t),"renderKatexSanitized"),Mc={getRows:uR,sanitizeText:Mr,sanitizeTextOrArray:fR,hasBreaks:pR,splitBreaks:gR,lineBreakRegex:Ac,removeScript:Yv,getUrl:yR,evaluate:Ea,getMax:xR,getMin:bR},SR=S(function(e,t){for(let i of t)e.attr(i[0],i[1])},"d3Attrs"),TR=S(function(e,t,i){let a=new Map;return i?(a.set("width","100%"),a.set("style",`max-width: ${t}px;`)):(a.set("height",e),a.set("width",t)),a},"calculateSvgSizeAttrs"),Vv=S(function(e,t,i,a){const s=TR(t,i,a);SR(e,s)},"configureSvgSize"),wR=S(function(e,t,i,a){const s=t.node().getBBox(),l=s.width,c=s.height;mt.info(`SVG bounds: ${l}x${c}`,s);let h=0,u=0;mt.info(`Graph bounds: ${h}x${u}`,e),h=l+i*2,u=c+i*2,mt.info(`Calculated bounds: ${h}x${u}`),Vv(t,u,h,a);const f=`${s.x-i} ${s.y-i} ${s.width+2*i} ${s.height+2*i}`;t.attr("viewBox",f)},"setupGraphViewbox"),vu={};function zg(e){return[...e.cssRules].map(t=>t.cssText).join(`
139
- `)}S(zg,"cssStyleSheetToString");var _R=S((e,t,i,a)=>{let s="";return e in vu&&vu[e]?s=vu[e]({...i,svgId:a}):mt.warn(`No theme found for ${e}`),` & {
140
- font-family: ${i.fontFamily};
141
- font-size: ${i.fontSize};
142
- fill: ${i.textColor}
143
- }
144
- @keyframes edge-animation-frame {
145
- from {
146
- stroke-dashoffset: 0;
147
- }
148
- }
149
- @keyframes dash {
150
- to {
151
- stroke-dashoffset: 0;
152
- }
153
- }
154
- & .edge-animation-slow {
155
- stroke-dasharray: 9,5 !important;
156
- stroke-dashoffset: 900;
157
- animation: dash 50s linear infinite;
158
- stroke-linecap: round;
159
- }
160
- & .edge-animation-fast {
161
- stroke-dasharray: 9,5 !important;
162
- stroke-dashoffset: 900;
163
- animation: dash 20s linear infinite;
164
- stroke-linecap: round;
165
- }
166
- /* Classes common for multiple diagrams */
167
-
168
- & .error-icon {
169
- fill: ${i.errorBkgColor};
170
- }
171
- & .error-text {
172
- fill: ${i.errorTextColor};
173
- stroke: ${i.errorTextColor};
174
- }
175
-
176
- & .edge-thickness-normal {
177
- stroke-width: ${i.strokeWidth??1}px;
178
- }
179
- & .edge-thickness-thick {
180
- stroke-width: 3.5px
181
- }
182
- & .edge-pattern-solid {
183
- stroke-dasharray: 0;
184
- }
185
- & .edge-thickness-invisible {
186
- stroke-width: 0;
187
- fill: none;
188
- }
189
- & .edge-pattern-dashed{
190
- stroke-dasharray: 3;
191
- }
192
- .edge-pattern-dotted {
193
- stroke-dasharray: 2;
194
- }
195
-
196
- & .marker {
197
- fill: ${i.lineColor};
198
- stroke: ${i.lineColor};
199
- }
200
- & .marker.cross {
201
- stroke: ${i.lineColor};
202
- }
203
-
204
- & svg {
205
- font-family: ${i.fontFamily};
206
- font-size: ${i.fontSize};
207
- }
208
- & p {
209
- margin: 0
210
- }
211
-
212
- ${s}
213
- .node .neo-node {
214
- stroke: ${i.nodeBorder};
215
- }
216
-
217
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
218
- stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
219
- filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
220
- }
221
-
222
-
223
- [data-look="neo"].node path {
224
- stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
225
- stroke-width: ${i.strokeWidth??1}px;
226
- }
227
-
228
- [data-look="neo"].node .outer-path {
229
- filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
230
- }
231
-
232
- [data-look="neo"].node .neo-line path {
233
- stroke: ${i.nodeBorder};
234
- filter: none;
235
- }
236
-
237
- [data-look="neo"].node circle{
238
- stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
239
- filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
240
- }
241
-
242
- [data-look="neo"].node circle .state-start{
243
- fill: #000000;
244
- }
245
-
246
- [data-look="neo"].icon-shape .icon {
247
- fill: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
248
- filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
249
- }
250
-
251
- [data-look="neo"].icon-shape .icon-neo path {
252
- stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
253
- filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
254
- }
255
-
256
- ${t}
257
- `},"getStyles"),BR=S((e,t)=>{t!==void 0&&(vu[e]=t)},"addStylesForDiagram"),ER=_R,Zv={};QM(Zv,{clear:()=>LR,getAccDescription:()=>OR,getAccTitle:()=>MR,getDiagramTitle:()=>DR,setAccDescription:()=>RR,setAccTitle:()=>AR,setDiagramTitle:()=>FR});var Jm="",ty="",ey="",iy=S(e=>Mr(e,Le()),"sanitizeText"),LR=S(()=>{Jm="",ey="",ty=""},"clear"),AR=S(e=>{Jm=iy(e).replace(/^\s+/g,"")},"setAccTitle"),MR=S(()=>Jm,"getAccTitle"),RR=S(e=>{ey=iy(e).replace(/\n\s+/g,`
258
- `)},"setAccDescription"),OR=S(()=>ey,"getAccDescription"),FR=S(e=>{ty=iy(e)},"setDiagramTitle"),DR=S(()=>ty,"getDiagramTitle"),_C=mt,$R=Qm,le=Le,X7=Hv,V7=Al,ry=S(e=>Mr(e,le()),"sanitizeText"),zR=wR,NR=S(()=>Zv,"getCommonDb"),Hu={},ju=S((e,t,i)=>{var a;Hu[e]&&_C.warn(`Diagram with id ${e} already registered. Overwriting.`),Hu[e]=t,i&&Dv(e,i),BR(e,t.styles),(a=t.injectUtils)==null||a.call(t,_C,$R,le,ry,zR,NR(),()=>{})},"registerDiagram"),Ng=S(e=>{if(e in Hu)return Hu[e];throw new qR(e)},"getDiagram"),Bl,qR=(Bl=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},S(Bl,"DiagramNotFoundError"),Bl),IR={value:()=>{}};function Qv(){for(var e=0,t=arguments.length,i={},a;e<t;++e){if(!(a=arguments[e]+"")||a in i||/[\s.]/.test(a))throw new Error("illegal type: "+a);i[a]=[]}return new ku(i)}function ku(e){this._=e}function HR(e,t){return e.trim().split(/^|\s+/).map(function(i){var a="",s=i.indexOf(".");if(s>=0&&(a=i.slice(s+1),i=i.slice(0,s)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:a}})}ku.prototype=Qv.prototype={constructor:ku,on:function(e,t){var i=this._,a=HR(e+"",i),s,l=-1,c=a.length;if(arguments.length<2){for(;++l<c;)if((s=(e=a[l]).type)&&(s=jR(i[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<c;)if(s=(e=a[l]).type)i[s]=BC(i[s],e.name,t);else if(t==null)for(s in i)i[s]=BC(i[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new ku(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var i=new Array(s),a=0,s,l;a<s;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],a=0,s=l.length;a<s;++a)l[a].value.apply(t,i)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],s=0,l=a.length;s<l;++s)a[s].value.apply(t,i)}};function jR(e,t){for(var i=0,a=e.length,s;i<a;++i)if((s=e[i]).name===t)return s.value}function BC(e,t,i){for(var a=0,s=e.length;a<s;++a)if(e[a].name===t){e[a]=IR,e=e.slice(0,a).concat(e.slice(a+1));break}return i!=null&&e.push({name:t,value:i}),e}var qg="http://www.w3.org/1999/xhtml";const EC={svg:"http://www.w3.org/2000/svg",xhtml:qg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Sd(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),EC.hasOwnProperty(t)?{space:EC[t],local:e}:e}function UR(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===qg&&t.documentElement.namespaceURI===qg?t.createElement(e):t.createElementNS(i,e)}}function PR(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Kv(e){var t=Sd(e);return(t.local?PR:UR)(t)}function WR(){}function ay(e){return e==null?WR:function(){return this.querySelector(e)}}function YR(e){typeof e!="function"&&(e=ay(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=new Array(c),u,f,p=0;p<c;++p)(u=l[p])&&(f=e.call(u,u.__data__,p,l))&&("__data__"in u&&(f.__data__=u.__data__),h[p]=f);return new Zi(a,this._parents)}function GR(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function XR(){return[]}function Jv(e){return e==null?XR:function(){return this.querySelectorAll(e)}}function VR(e){return function(){return GR(e.apply(this,arguments))}}function ZR(e){typeof e=="function"?e=VR(e):e=Jv(e);for(var t=this._groups,i=t.length,a=[],s=[],l=0;l<i;++l)for(var c=t[l],h=c.length,u,f=0;f<h;++f)(u=c[f])&&(a.push(e.call(u,u.__data__,f,c)),s.push(u));return new Zi(a,s)}function tk(e){return function(){return this.matches(e)}}function ek(e){return function(t){return t.matches(e)}}var QR=Array.prototype.find;function KR(e){return function(){return QR.call(this.children,e)}}function JR(){return this.firstElementChild}function t4(e){return this.select(e==null?JR:KR(typeof e=="function"?e:ek(e)))}var e4=Array.prototype.filter;function i4(){return Array.from(this.children)}function r4(e){return function(){return e4.call(this.children,e)}}function a4(e){return this.selectAll(e==null?i4:r4(typeof e=="function"?e:ek(e)))}function n4(e){typeof e!="function"&&(e=tk(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=[],u,f=0;f<c;++f)(u=l[f])&&e.call(u,u.__data__,f,l)&&h.push(u);return new Zi(a,this._parents)}function ik(e){return new Array(e.length)}function s4(){return new Zi(this._enter||this._groups.map(ik),this._parents)}function Uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Uu.prototype={constructor:Uu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function l4(e){return function(){return e}}function o4(e,t,i,a,s,l){for(var c=0,h,u=t.length,f=l.length;c<f;++c)(h=t[c])?(h.__data__=l[c],a[c]=h):i[c]=new Uu(e,l[c]);for(;c<u;++c)(h=t[c])&&(s[c]=h)}function c4(e,t,i,a,s,l,c){var h,u,f=new Map,p=t.length,g=l.length,x=new Array(p),m;for(h=0;h<p;++h)(u=t[h])&&(x[h]=m=c.call(u,u.__data__,h,t)+"",f.has(m)?s[h]=u:f.set(m,u));for(h=0;h<g;++h)m=c.call(e,l[h],h,l)+"",(u=f.get(m))?(a[h]=u,u.__data__=l[h],f.delete(m)):i[h]=new Uu(e,l[h]);for(h=0;h<p;++h)(u=t[h])&&f.get(x[h])===u&&(s[h]=u)}function h4(e){return e.__data__}function u4(e,t){if(!arguments.length)return Array.from(this,h4);var i=t?c4:o4,a=this._parents,s=this._groups;typeof e!="function"&&(e=l4(e));for(var l=s.length,c=new Array(l),h=new Array(l),u=new Array(l),f=0;f<l;++f){var p=a[f],g=s[f],x=g.length,m=d4(e.call(p,p&&p.__data__,f,a)),v=m.length,C=h[f]=new Array(v),k=c[f]=new Array(v),T=u[f]=new Array(x);i(p,g,C,k,T,m,t);for(var _=0,B=0,O,D;_<v;++_)if(O=C[_]){for(_>=B&&(B=_+1);!(D=k[B])&&++B<v;);O._next=D||null}}return c=new Zi(c,a),c._enter=h,c._exit=u,c}function d4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f4(){return new Zi(this._exit||this._groups.map(ik),this._parents)}function p4(e,t,i){var a=this.enter(),s=this,l=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),i==null?l.remove():i(l),a&&s?a.merge(s).order():s}function g4(e){for(var t=e.selection?e.selection():e,i=this._groups,a=t._groups,s=i.length,l=a.length,c=Math.min(s,l),h=new Array(s),u=0;u<c;++u)for(var f=i[u],p=a[u],g=f.length,x=h[u]=new Array(g),m,v=0;v<g;++v)(m=f[v]||p[v])&&(x[v]=m);for(;u<s;++u)h[u]=i[u];return new Zi(h,this._parents)}function m4(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var a=e[t],s=a.length-1,l=a[s],c;--s>=0;)(c=a[s])&&(l&&c.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(c,l),l=c);return this}function y4(e){e||(e=x4);function t(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var i=this._groups,a=i.length,s=new Array(a),l=0;l<a;++l){for(var c=i[l],h=c.length,u=s[l]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(u[p]=f);u.sort(t)}return new Zi(s,this._parents).order()}function x4(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function b4(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function C4(){return Array.from(this)}function v4(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],s=0,l=a.length;s<l;++s){var c=a[s];if(c)return c}return null}function k4(){let e=0;for(const t of this)++e;return e}function S4(){return!this.node()}function T4(e){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var s=t[i],l=0,c=s.length,h;l<c;++l)(h=s[l])&&e.call(h,h.__data__,l,s);return this}function w4(e){return function(){this.removeAttribute(e)}}function _4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B4(e,t){return function(){this.setAttribute(e,t)}}function E4(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function L4(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function A4(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function M4(e,t){var i=Sd(e);if(arguments.length<2){var a=this.node();return i.local?a.getAttributeNS(i.space,i.local):a.getAttribute(i)}return this.each((t==null?i.local?_4:w4:typeof t=="function"?i.local?A4:L4:i.local?E4:B4)(i,t))}function rk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function R4(e){return function(){this.style.removeProperty(e)}}function O4(e,t,i){return function(){this.style.setProperty(e,t,i)}}function F4(e,t,i){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,i)}}function D4(e,t,i){return arguments.length>1?this.each((t==null?R4:typeof t=="function"?F4:O4)(e,t,i??"")):Ml(this.node(),e)}function Ml(e,t){return e.style.getPropertyValue(t)||rk(e).getComputedStyle(e,null).getPropertyValue(t)}function $4(e){return function(){delete this[e]}}function z4(e,t){return function(){this[e]=t}}function N4(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function q4(e,t){return arguments.length>1?this.each((t==null?$4:typeof t=="function"?N4:z4)(e,t)):this.node()[e]}function ak(e){return e.trim().split(/^|\s+/)}function ny(e){return e.classList||new nk(e)}function nk(e){this._node=e,this._names=ak(e.getAttribute("class")||"")}nk.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function sk(e,t){for(var i=ny(e),a=-1,s=t.length;++a<s;)i.add(t[a])}function lk(e,t){for(var i=ny(e),a=-1,s=t.length;++a<s;)i.remove(t[a])}function I4(e){return function(){sk(this,e)}}function H4(e){return function(){lk(this,e)}}function j4(e,t){return function(){(t.apply(this,arguments)?sk:lk)(this,e)}}function U4(e,t){var i=ak(e+"");if(arguments.length<2){for(var a=ny(this.node()),s=-1,l=i.length;++s<l;)if(!a.contains(i[s]))return!1;return!0}return this.each((typeof t=="function"?j4:t?I4:H4)(i,t))}function P4(){this.textContent=""}function W4(e){return function(){this.textContent=e}}function Y4(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function G4(e){return arguments.length?this.each(e==null?P4:(typeof e=="function"?Y4:W4)(e)):this.node().textContent}function X4(){this.innerHTML=""}function V4(e){return function(){this.innerHTML=e}}function Z4(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Q4(e){return arguments.length?this.each(e==null?X4:(typeof e=="function"?Z4:V4)(e)):this.node().innerHTML}function K4(){this.nextSibling&&this.parentNode.appendChild(this)}function J4(){return this.each(K4)}function tO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function eO(){return this.each(tO)}function iO(e){var t=typeof e=="function"?e:Kv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function rO(){return null}function aO(e,t){var i=typeof e=="function"?e:Kv(e),a=t==null?rO:typeof t=="function"?t:ay(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),a.apply(this,arguments)||null)})}function nO(){var e=this.parentNode;e&&e.removeChild(this)}function sO(){return this.each(nO)}function lO(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oO(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cO(e){return this.select(e?oO:lO)}function hO(e){return arguments.length?this.property("__data__",e):this.node().__data__}function uO(e){return function(t){e.call(this,t,this.__data__)}}function dO(e){return e.trim().split(/^|\s+/).map(function(t){var i="",a=t.indexOf(".");return a>=0&&(i=t.slice(a+1),t=t.slice(0,a)),{type:t,name:i}})}function fO(e){return function(){var t=this.__on;if(t){for(var i=0,a=-1,s=t.length,l;i<s;++i)l=t[i],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++a]=l;++a?t.length=a:delete this.__on}}}function pO(e,t,i){return function(){var a=this.__on,s,l=uO(t);if(a){for(var c=0,h=a.length;c<h;++c)if((s=a[c]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=i),s.value=t;return}}this.addEventListener(e.type,l,i),s={type:e.type,name:e.name,value:t,listener:l,options:i},a?a.push(s):this.__on=[s]}}function gO(e,t,i){var a=dO(e+""),s,l=a.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(s=0,p=h[u];s<l;++s)if((c=a[s]).type===p.type&&c.name===p.name)return p.value}return}for(h=t?pO:fO,s=0;s<l;++s)this.each(h(a[s],t,i));return this}function ok(e,t,i){var a=rk(e),s=a.CustomEvent;typeof s=="function"?s=new s(t,i):(s=a.document.createEvent("Event"),i?(s.initEvent(t,i.bubbles,i.cancelable),s.detail=i.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function mO(e,t){return function(){return ok(this,e,t)}}function yO(e,t){return function(){return ok(this,e,t.apply(this,arguments))}}function xO(e,t){return this.each((typeof t=="function"?yO:mO)(e,t))}function*bO(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],s=0,l=a.length,c;s<l;++s)(c=a[s])&&(yield c)}var ck=[null];function Zi(e,t){this._groups=e,this._parents=t}function Rc(){return new Zi([[document.documentElement]],ck)}function CO(){return this}Zi.prototype=Rc.prototype={constructor:Zi,select:YR,selectAll:ZR,selectChild:t4,selectChildren:a4,filter:n4,data:u4,enter:s4,exit:f4,join:p4,merge:g4,selection:CO,order:m4,sort:y4,call:b4,nodes:C4,node:v4,size:k4,empty:S4,each:T4,attr:M4,style:D4,property:q4,classed:U4,text:G4,html:Q4,raise:J4,lower:eO,append:iO,insert:aO,remove:sO,clone:cO,datum:hO,on:gO,dispatch:xO,[Symbol.iterator]:bO};function Xt(e){return typeof e=="string"?new Zi([[document.querySelector(e)]],[document.documentElement]):new Zi([[e]],ck)}function sy(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function hk(e,t){var i=Object.create(e.prototype);for(var a in t)i[a]=t[a];return i}function Oc(){}var mc=.7,Pu=1/mc,fl="\\s*([+-]?\\d+)\\s*",yc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vO=/^#([0-9a-f]{3,8})$/,kO=new RegExp(`^rgb\\(${fl},${fl},${fl}\\)$`),SO=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),TO=new RegExp(`^rgba\\(${fl},${fl},${fl},${yc}\\)$`),wO=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${yc}\\)$`),_O=new RegExp(`^hsl\\(${yc},${Yr},${Yr}\\)$`),BO=new RegExp(`^hsla\\(${yc},${Yr},${Yr},${yc}\\)$`),LC={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};sy(Oc,xc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:AC,formatHex:AC,formatHex8:EO,formatHsl:LO,formatRgb:MC,toString:MC});function AC(){return this.rgb().formatHex()}function EO(){return this.rgb().formatHex8()}function LO(){return uk(this).formatHsl()}function MC(){return this.rgb().formatRgb()}function xc(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=vO.exec(e))?(i=t[1].length,t=parseInt(t[1],16),i===6?RC(t):i===3?new Ni(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):i===8?au(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):i===4?au(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=kO.exec(e))?new Ni(t[1],t[2],t[3],1):(t=SO.exec(e))?new Ni(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=TO.exec(e))?au(t[1],t[2],t[3],t[4]):(t=wO.exec(e))?au(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_O.exec(e))?DC(t[1],t[2]/100,t[3]/100,1):(t=BO.exec(e))?DC(t[1],t[2]/100,t[3]/100,t[4]):LC.hasOwnProperty(e)?RC(LC[e]):e==="transparent"?new Ni(NaN,NaN,NaN,0):null}function RC(e){return new Ni(e>>16&255,e>>8&255,e&255,1)}function au(e,t,i,a){return a<=0&&(e=t=i=NaN),new Ni(e,t,i,a)}function AO(e){return e instanceof Oc||(e=xc(e)),e?(e=e.rgb(),new Ni(e.r,e.g,e.b,e.opacity)):new Ni}function Ig(e,t,i,a){return arguments.length===1?AO(e):new Ni(e,t,i,a??1)}function Ni(e,t,i,a){this.r=+e,this.g=+t,this.b=+i,this.opacity=+a}sy(Ni,Ig,hk(Oc,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new Ni(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mc:Math.pow(mc,e),new Ni(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ni(Kn(this.r),Kn(this.g),Kn(this.b),Wu(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:OC,formatHex:OC,formatHex8:MO,formatRgb:FC,toString:FC}));function OC(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}`}function MO(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}${Vn((isNaN(this.opacity)?1:this.opacity)*255)}`}function FC(){const e=Wu(this.opacity);return`${e===1?"rgb(":"rgba("}${Kn(this.r)}, ${Kn(this.g)}, ${Kn(this.b)}${e===1?")":`, ${e})`}`}function Wu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vn(e){return e=Kn(e),(e<16?"0":"")+e.toString(16)}function DC(e,t,i,a){return a<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new wr(e,t,i,a)}function uk(e){if(e instanceof wr)return new wr(e.h,e.s,e.l,e.opacity);if(e instanceof Oc||(e=xc(e)),!e)return new wr;if(e instanceof wr)return e;e=e.rgb();var t=e.r/255,i=e.g/255,a=e.b/255,s=Math.min(t,i,a),l=Math.max(t,i,a),c=NaN,h=l-s,u=(l+s)/2;return h?(t===l?c=(i-a)/h+(i<a)*6:i===l?c=(a-t)/h+2:c=(t-i)/h+4,h/=u<.5?l+s:2-l-s,c*=60):h=u>0&&u<1?0:c,new wr(c,h,u,e.opacity)}function RO(e,t,i,a){return arguments.length===1?uk(e):new wr(e,t,i,a??1)}function wr(e,t,i,a){this.h=+e,this.s=+t,this.l=+i,this.opacity=+a}sy(wr,RO,hk(Oc,{brighter(e){return e=e==null?Pu:Math.pow(Pu,e),new wr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mc:Math.pow(mc,e),new wr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,a=i+(i<.5?i:1-i)*t,s=2*i-a;return new Ni(og(e>=240?e-240:e+120,s,a),og(e,s,a),og(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new wr($C(this.h),nu(this.s),nu(this.l),Wu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Wu(this.opacity);return`${e===1?"hsl(":"hsla("}${$C(this.h)}, ${nu(this.s)*100}%, ${nu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $C(e){return e=(e||0)%360,e<0?e+360:e}function nu(e){return Math.max(0,Math.min(1,e||0))}function og(e,t,i){return(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)*255}const ly=e=>()=>e;function dk(e,t){return function(i){return e+i*t}}function OO(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(a){return Math.pow(e+a*t,i)}}function Z7(e,t){var i=t-e;return i?dk(e,i>180||i<-180?i-360*Math.round(i/360):i):ly(isNaN(e)?t:e)}function FO(e){return(e=+e)==1?fk:function(t,i){return i-t?OO(t,i,e):ly(isNaN(t)?i:t)}}function fk(e,t){var i=t-e;return i?dk(e,i):ly(isNaN(e)?t:e)}const zC=(function e(t){var i=FO(t);function a(s,l){var c=i((s=Ig(s)).r,(l=Ig(l)).r),h=i(s.g,l.g),u=i(s.b,l.b),f=fk(s.opacity,l.opacity);return function(p){return s.r=c(p),s.g=h(p),s.b=u(p),s.opacity=f(p),s+""}}return a.gamma=e,a})(1);function gn(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}var Hg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cg=new RegExp(Hg.source,"g");function DO(e){return function(){return e}}function $O(e){return function(t){return e(t)+""}}function zO(e,t){var i=Hg.lastIndex=cg.lastIndex=0,a,s,l,c=-1,h=[],u=[];for(e=e+"",t=t+"";(a=Hg.exec(e))&&(s=cg.exec(t));)(l=s.index)>i&&(l=t.slice(i,l),h[c]?h[c]+=l:h[++c]=l),(a=a[0])===(s=s[0])?h[c]?h[c]+=s:h[++c]=s:(h[++c]=null,u.push({i:c,x:gn(a,s)})),i=cg.lastIndex;return i<t.length&&(l=t.slice(i),h[c]?h[c]+=l:h[++c]=l),h.length<2?u[0]?$O(u[0].x):DO(t):(t=u.length,function(f){for(var p=0,g;p<t;++p)h[(g=u[p]).i]=g.x(f);return h.join("")})}var NC=180/Math.PI,jg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pk(e,t,i,a,s,l){var c,h,u;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(u=e*i+t*a)&&(i-=e*u,a-=t*u),(h=Math.sqrt(i*i+a*a))&&(i/=h,a/=h,u/=h),e*a<t*i&&(e=-e,t=-t,u=-u,c=-c),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*NC,skewX:Math.atan(u)*NC,scaleX:c,scaleY:h}}var su;function NO(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?jg:pk(t.a,t.b,t.c,t.d,t.e,t.f)}function qO(e){return e==null||(su||(su=document.createElementNS("http://www.w3.org/2000/svg","g")),su.setAttribute("transform",e),!(e=su.transform.baseVal.consolidate()))?jg:(e=e.matrix,pk(e.a,e.b,e.c,e.d,e.e,e.f))}function gk(e,t,i,a){function s(f){return f.length?f.pop()+" ":""}function l(f,p,g,x,m,v){if(f!==g||p!==x){var C=m.push("translate(",null,t,null,i);v.push({i:C-4,x:gn(f,g)},{i:C-2,x:gn(p,x)})}else(g||x)&&m.push("translate("+g+t+x+i)}function c(f,p,g,x){f!==p?(f-p>180?p+=360:p-f>180&&(f+=360),x.push({i:g.push(s(g)+"rotate(",null,a)-2,x:gn(f,p)})):p&&g.push(s(g)+"rotate("+p+a)}function h(f,p,g,x){f!==p?x.push({i:g.push(s(g)+"skewX(",null,a)-2,x:gn(f,p)}):p&&g.push(s(g)+"skewX("+p+a)}function u(f,p,g,x,m,v){if(f!==g||p!==x){var C=m.push(s(m)+"scale(",null,",",null,")");v.push({i:C-4,x:gn(f,g)},{i:C-2,x:gn(p,x)})}else(g!==1||x!==1)&&m.push(s(m)+"scale("+g+","+x+")")}return function(f,p){var g=[],x=[];return f=e(f),p=e(p),l(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(m){for(var v=-1,C=x.length,k;++v<C;)g[(k=x[v]).i]=k.x(m);return g.join("")}}}var IO=gk(NO,"px, ","px)","deg)"),HO=gk(qO,", ",")",")"),Rl=0,ec=0,Wo=0,mk=1e3,Yu,ic,Gu=0,rs=0,Td=0,bc=typeof performance=="object"&&performance.now?performance:Date,yk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function oy(){return rs||(yk(jO),rs=bc.now()+Td)}function jO(){rs=0}function Xu(){this._call=this._time=this._next=null}Xu.prototype=xk.prototype={constructor:Xu,restart:function(e,t,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?oy():+i)+(t==null?0:+t),!this._next&&ic!==this&&(ic?ic._next=this:Yu=this,ic=this),this._call=e,this._time=i,Ug()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ug())}};function xk(e,t,i){var a=new Xu;return a.restart(e,t,i),a}function UO(){oy(),++Rl;for(var e=Yu,t;e;)(t=rs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Rl}function qC(){rs=(Gu=bc.now())+Td,Rl=ec=0;try{UO()}finally{Rl=0,WO(),rs=0}}function PO(){var e=bc.now(),t=e-Gu;t>mk&&(Td-=t,Gu=e)}function WO(){for(var e,t=Yu,i,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(i=t._next,t._next=null,t=e?e._next=i:Yu=i);ic=e,Ug(a)}function Ug(e){if(!Rl){ec&&(ec=clearTimeout(ec));var t=e-rs;t>24?(e<1/0&&(ec=setTimeout(qC,e-bc.now()-Td)),Wo&&(Wo=clearInterval(Wo))):(Wo||(Gu=bc.now(),Wo=setInterval(PO,mk)),Rl=1,yk(qC))}}function IC(e,t,i){var a=new Xu;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,i),a}var YO=Qv("start","end","cancel","interrupt"),GO=[],bk=0,HC=1,Pg=2,Su=3,jC=4,Wg=5,Tu=6;function wd(e,t,i,a,s,l){var c=e.__transition;if(!c)e.__transition={};else if(i in c)return;XO(e,i,{name:t,index:a,group:s,on:YO,tween:GO,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:bk})}function cy(e,t){var i=Fr(e,t);if(i.state>bk)throw new Error("too late; already scheduled");return i}function Qr(e,t){var i=Fr(e,t);if(i.state>Su)throw new Error("too late; already running");return i}function Fr(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function XO(e,t,i){var a=e.__transition,s;a[t]=i,i.timer=xk(l,0,i.time);function l(f){i.state=HC,i.timer.restart(c,i.delay,i.time),i.delay<=f&&c(f-i.delay)}function c(f){var p,g,x,m;if(i.state!==HC)return u();for(p in a)if(m=a[p],m.name===i.name){if(m.state===Su)return IC(c);m.state===jC?(m.state=Tu,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete a[p]):+p<t&&(m.state=Tu,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete a[p])}if(IC(function(){i.state===Su&&(i.state=jC,i.timer.restart(h,i.delay,i.time),h(f))}),i.state=Pg,i.on.call("start",e,e.__data__,i.index,i.group),i.state===Pg){for(i.state=Su,s=new Array(x=i.tween.length),p=0,g=-1;p<x;++p)(m=i.tween[p].value.call(e,e.__data__,i.index,i.group))&&(s[++g]=m);s.length=g+1}}function h(f){for(var p=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(u),i.state=Wg,1),g=-1,x=s.length;++g<x;)s[g].call(e,p);i.state===Wg&&(i.on.call("end",e,e.__data__,i.index,i.group),u())}function u(){i.state=Tu,i.timer.stop(),delete a[t];for(var f in a)return;delete e.__transition}}function VO(e,t){var i=e.__transition,a,s,l=!0,c;if(i){t=t==null?null:t+"";for(c in i){if((a=i[c]).name!==t){l=!1;continue}s=a.state>Pg&&a.state<Wg,a.state=Tu,a.timer.stop(),a.on.call(s?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete i[c]}l&&delete e.__transition}}function ZO(e){return this.each(function(){VO(this,e)})}function QO(e,t){var i,a;return function(){var s=Qr(this,e),l=s.tween;if(l!==i){a=i=l;for(var c=0,h=a.length;c<h;++c)if(a[c].name===t){a=a.slice(),a.splice(c,1);break}}s.tween=a}}function KO(e,t,i){var a,s;if(typeof i!="function")throw new Error;return function(){var l=Qr(this,e),c=l.tween;if(c!==a){s=(a=c).slice();for(var h={name:t,value:i},u=0,f=s.length;u<f;++u)if(s[u].name===t){s[u]=h;break}u===f&&s.push(h)}l.tween=s}}function JO(e,t){var i=this._id;if(e+="",arguments.length<2){for(var a=Fr(this.node(),i).tween,s=0,l=a.length,c;s<l;++s)if((c=a[s]).name===e)return c.value;return null}return this.each((t==null?QO:KO)(i,e,t))}function hy(e,t,i){var a=e._id;return e.each(function(){var s=Qr(this,a);(s.value||(s.value={}))[t]=i.apply(this,arguments)}),function(s){return Fr(s,a).value[t]}}function Ck(e,t){var i;return(typeof t=="number"?gn:t instanceof xc?zC:(i=xc(t))?(t=i,zC):zO)(e,t)}function tF(e){return function(){this.removeAttribute(e)}}function eF(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iF(e,t,i){var a,s=i+"",l;return function(){var c=this.getAttribute(e);return c===s?null:c===a?l:l=t(a=c,i)}}function rF(e,t,i){var a,s=i+"",l;return function(){var c=this.getAttributeNS(e.space,e.local);return c===s?null:c===a?l:l=t(a=c,i)}}function aF(e,t,i){var a,s,l;return function(){var c,h=i(this),u;return h==null?void this.removeAttribute(e):(c=this.getAttribute(e),u=h+"",c===u?null:c===a&&u===s?l:(s=u,l=t(a=c,h)))}}function nF(e,t,i){var a,s,l;return function(){var c,h=i(this),u;return h==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),u=h+"",c===u?null:c===a&&u===s?l:(s=u,l=t(a=c,h)))}}function sF(e,t){var i=Sd(e),a=i==="transform"?HO:Ck;return this.attrTween(e,typeof t=="function"?(i.local?nF:aF)(i,a,hy(this,"attr."+e,t)):t==null?(i.local?eF:tF)(i):(i.local?rF:iF)(i,a,t))}function lF(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function oF(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function cF(e,t){var i,a;function s(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&oF(e,l)),i}return s._value=t,s}function hF(e,t){var i,a;function s(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&lF(e,l)),i}return s._value=t,s}function uF(e,t){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;var a=Sd(e);return this.tween(i,(a.local?cF:hF)(a,t))}function dF(e,t){return function(){cy(this,e).delay=+t.apply(this,arguments)}}function fF(e,t){return t=+t,function(){cy(this,e).delay=t}}function pF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dF:fF)(t,e)):Fr(this.node(),t).delay}function gF(e,t){return function(){Qr(this,e).duration=+t.apply(this,arguments)}}function mF(e,t){return t=+t,function(){Qr(this,e).duration=t}}function yF(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gF:mF)(t,e)):Fr(this.node(),t).duration}function xF(e,t){if(typeof t!="function")throw new Error;return function(){Qr(this,e).ease=t}}function bF(e){var t=this._id;return arguments.length?this.each(xF(t,e)):Fr(this.node(),t).ease}function CF(e,t){return function(){var i=t.apply(this,arguments);if(typeof i!="function")throw new Error;Qr(this,e).ease=i}}function vF(e){if(typeof e!="function")throw new Error;return this.each(CF(this._id,e))}function kF(e){typeof e!="function"&&(e=tk(e));for(var t=this._groups,i=t.length,a=new Array(i),s=0;s<i;++s)for(var l=t[s],c=l.length,h=a[s]=[],u,f=0;f<c;++f)(u=l[f])&&e.call(u,u.__data__,f,l)&&h.push(u);return new _a(a,this._parents,this._name,this._id)}function SF(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,a=t.length,s=i.length,l=Math.min(a,s),c=new Array(a),h=0;h<l;++h)for(var u=t[h],f=i[h],p=u.length,g=c[h]=new Array(p),x,m=0;m<p;++m)(x=u[m]||f[m])&&(g[m]=x);for(;h<a;++h)c[h]=t[h];return new _a(c,this._parents,this._name,this._id)}function TF(e){return(e+"").trim().split(/^|\s+/).every(function(t){var i=t.indexOf(".");return i>=0&&(t=t.slice(0,i)),!t||t==="start"})}function wF(e,t,i){var a,s,l=TF(t)?cy:Qr;return function(){var c=l(this,e),h=c.on;h!==a&&(s=(a=h).copy()).on(t,i),c.on=s}}function _F(e,t){var i=this._id;return arguments.length<2?Fr(this.node(),i).on.on(e):this.each(wF(i,e,t))}function BF(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}function EF(){return this.on("end.remove",BF(this._id))}function LF(e){var t=this._name,i=this._id;typeof e!="function"&&(e=ay(e));for(var a=this._groups,s=a.length,l=new Array(s),c=0;c<s;++c)for(var h=a[c],u=h.length,f=l[c]=new Array(u),p,g,x=0;x<u;++x)(p=h[x])&&(g=e.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),f[x]=g,wd(f[x],t,i,x,f,Fr(p,i)));return new _a(l,this._parents,t,i)}function AF(e){var t=this._name,i=this._id;typeof e!="function"&&(e=Jv(e));for(var a=this._groups,s=a.length,l=[],c=[],h=0;h<s;++h)for(var u=a[h],f=u.length,p,g=0;g<f;++g)if(p=u[g]){for(var x=e.call(p,p.__data__,g,u),m,v=Fr(p,i),C=0,k=x.length;C<k;++C)(m=x[C])&&wd(m,t,i,C,x,v);l.push(x),c.push(p)}return new _a(l,c,t,i)}var MF=Rc.prototype.constructor;function RF(){return new MF(this._groups,this._parents)}function OF(e,t){var i,a,s;return function(){var l=Ml(this,e),c=(this.style.removeProperty(e),Ml(this,e));return l===c?null:l===i&&c===a?s:s=t(i=l,a=c)}}function vk(e){return function(){this.style.removeProperty(e)}}function FF(e,t,i){var a,s=i+"",l;return function(){var c=Ml(this,e);return c===s?null:c===a?l:l=t(a=c,i)}}function DF(e,t,i){var a,s,l;return function(){var c=Ml(this,e),h=i(this),u=h+"";return h==null&&(u=h=(this.style.removeProperty(e),Ml(this,e))),c===u?null:c===a&&u===s?l:(s=u,l=t(a=c,h))}}function $F(e,t){var i,a,s,l="style."+t,c="end."+l,h;return function(){var u=Qr(this,e),f=u.on,p=u.value[l]==null?h||(h=vk(t)):void 0;(f!==i||s!==p)&&(a=(i=f).copy()).on(c,s=p),u.on=a}}function zF(e,t,i){var a=(e+="")=="transform"?IO:Ck;return t==null?this.styleTween(e,OF(e,a)).on("end.style."+e,vk(e)):typeof t=="function"?this.styleTween(e,DF(e,a,hy(this,"style."+e,t))).each($F(this._id,e)):this.styleTween(e,FF(e,a,t),i).on("end.style."+e,null)}function NF(e,t,i){return function(a){this.style.setProperty(e,t.call(this,a),i)}}function qF(e,t,i){var a,s;function l(){var c=t.apply(this,arguments);return c!==s&&(a=(s=c)&&NF(e,c,i)),a}return l._value=t,l}function IF(e,t,i){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,qF(e,t,i??""))}function HF(e){return function(){this.textContent=e}}function jF(e){return function(){var t=e(this);this.textContent=t??""}}function UF(e){return this.tween("text",typeof e=="function"?jF(hy(this,"text",e)):HF(e==null?"":e+""))}function PF(e){return function(t){this.textContent=e.call(this,t)}}function WF(e){var t,i;function a(){var s=e.apply(this,arguments);return s!==i&&(t=(i=s)&&PF(s)),t}return a._value=e,a}function YF(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,WF(e))}function GF(){for(var e=this._name,t=this._id,i=kk(),a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,u,f=0;f<h;++f)if(u=c[f]){var p=Fr(u,t);wd(u,e,i,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new _a(a,this._parents,e,i)}function XF(){var e,t,i=this,a=i._id,s=i.size();return new Promise(function(l,c){var h={value:c},u={value:function(){--s===0&&l()}};i.each(function(){var f=Qr(this,a),p=f.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(h),t._.interrupt.push(h),t._.end.push(u)),f.on=t}),s===0&&l()})}var VF=0;function _a(e,t,i,a){this._groups=e,this._parents=t,this._name=i,this._id=a}function kk(){return++VF}var ba=Rc.prototype;_a.prototype={constructor:_a,select:LF,selectAll:AF,selectChild:ba.selectChild,selectChildren:ba.selectChildren,filter:kF,merge:SF,selection:RF,transition:GF,call:ba.call,nodes:ba.nodes,node:ba.node,size:ba.size,empty:ba.empty,each:ba.each,on:_F,attr:sF,attrTween:uF,style:zF,styleTween:IF,text:UF,textTween:YF,remove:EF,tween:JO,delay:pF,duration:yF,ease:bF,easeVarying:vF,end:XF,[Symbol.iterator]:ba[Symbol.iterator]};function ZF(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var QF={time:null,delay:0,duration:250,ease:ZF};function KF(e,t){for(var i;!(i=e.__transition)||!(i=i[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return i}function JF(e){var t,i;e instanceof _a?(t=e._id,e=e._name):(t=kk(),(i=QF).time=oy(),e=e==null?null:e+"");for(var a=this._groups,s=a.length,l=0;l<s;++l)for(var c=a[l],h=c.length,u,f=0;f<h;++f)(u=c[f])&&wd(u,e,t,f,c,i||KF(u,t));return new _a(a,this._parents,e,t)}Rc.prototype.interrupt=ZO;Rc.prototype.transition=JF;const Yg=Math.PI,Gg=2*Yg,Wn=1e-6,t6=Gg-Wn;function Sk(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function e6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Sk;const i=10**t;return function(a){this._+=a[0];for(let s=1,l=a.length;s<l;++s)this._+=Math.round(arguments[s]*i)/i+a[s]}}class i6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Sk:e6(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,a,s){this._append`Q${+t},${+i},${this._x1=+a},${this._y1=+s}`}bezierCurveTo(t,i,a,s,l,c){this._append`C${+t},${+i},${+a},${+s},${this._x1=+l},${this._y1=+c}`}arcTo(t,i,a,s,l){if(t=+t,i=+i,a=+a,s=+s,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,h=this._y1,u=a-t,f=s-i,p=c-t,g=h-i,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if(x>Wn)if(!(Math.abs(g*u-f*p)>Wn)||!l)this._append`L${this._x1=t},${this._y1=i}`;else{let m=a-c,v=s-h,C=u*u+f*f,k=m*m+v*v,T=Math.sqrt(C),_=Math.sqrt(x),B=l*Math.tan((Yg-Math.acos((C+x-k)/(2*T*_)))/2),O=B/_,D=B/T;Math.abs(O-1)>Wn&&this._append`L${t+O*p},${i+O*g}`,this._append`A${l},${l},0,0,${+(g*m>p*v)},${this._x1=t+D*u},${this._y1=i+D*f}`}}arc(t,i,a,s,l,c){if(t=+t,i=+i,a=+a,c=!!c,a<0)throw new Error(`negative radius: ${a}`);let h=a*Math.cos(s),u=a*Math.sin(s),f=t+h,p=i+u,g=1^c,x=c?s-l:l-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Wn||Math.abs(this._y1-p)>Wn)&&this._append`L${f},${p}`,a&&(x<0&&(x=x%Gg+Gg),x>t6?this._append`A${a},${a},0,1,${g},${t-h},${i-u}A${a},${a},0,1,${g},${this._x1=f},${this._y1=p}`:x>Wn&&this._append`A${a},${a},0,${+(x>=Yg)},${g},${this._x1=t+a*Math.cos(l)},${this._y1=i+a*Math.sin(l)}`)}rect(t,i,a,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${a=+a}v${+s}h${-a}Z`}toString(){return this._}}function rl(e){return function(){return e}}const Q7=Math.abs,K7=Math.atan2,J7=Math.cos,tI=Math.max,eI=Math.min,iI=Math.sin,rI=Math.sqrt,UC=1e-12,uy=Math.PI,PC=uy/2,aI=2*uy;function nI(e){return e>1?0:e<-1?uy:Math.acos(e)}function sI(e){return e>=1?PC:e<=-1?-PC:Math.asin(e)}function r6(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const a=Math.floor(i);if(!(a>=0))throw new RangeError(`invalid digits: ${i}`);t=a}return e},()=>new i6(t)}function a6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tk(e){this._context=e}Tk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function uc(e){return new Tk(e)}function n6(e){return e[0]}function s6(e){return e[1]}function l6(e,t){var i=rl(!0),a=null,s=uc,l=null,c=r6(h);e=typeof e=="function"?e:e===void 0?n6:rl(e),t=typeof t=="function"?t:t===void 0?s6:rl(t);function h(u){var f,p=(u=a6(u)).length,g,x=!1,m;for(a==null&&(l=s(m=c())),f=0;f<=p;++f)!(f<p&&i(g=u[f],f,u))===x&&((x=!x)?l.lineStart():l.lineEnd()),x&&l.point(+e(g,f,u),+t(g,f,u));if(m)return l=null,m+""||null}return h.x=function(u){return arguments.length?(e=typeof u=="function"?u:rl(+u),h):e},h.y=function(u){return arguments.length?(t=typeof u=="function"?u:rl(+u),h):t},h.defined=function(u){return arguments.length?(i=typeof u=="function"?u:rl(!!u),h):i},h.curve=function(u){return arguments.length?(s=u,a!=null&&(l=s(a)),h):s},h.context=function(u){return arguments.length?(u==null?a=l=null:l=s(a=u),h):a},h}class wk{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i);break}}this._x0=t,this._y0=i}}function _k(e){return new wk(e,!0)}function Bk(e){return new wk(e,!1)}function Cn(){}function Vu(e,t,i){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+i)/6)}function _d(e){this._context=e}_d.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:Vu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xg(e){return new _d(e)}function Ek(e){this._context=e}Ek.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function o6(e){return new Ek(e)}function Lk(e){this._context=e}Lk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 3:this._point=4;default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function c6(e){return new Lk(e)}function Ak(e,t){this._basis=new _d(e),this._beta=t}Ak.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,i=e.length-1;if(i>0)for(var a=e[0],s=t[0],l=e[i]-a,c=t[i]-s,h=-1,u;++h<=i;)u=h/i,this._basis.point(this._beta*e[h]+(1-this._beta)*(a+u*l),this._beta*t[h]+(1-this._beta)*(s+u*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const h6=(function e(t){function i(a){return t===1?new _d(a):new Ak(a,t)}return i.beta=function(a){return e(+a)},i})(.85);function Zu(e,t,i){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-i),e._x2,e._y2)}function dy(e,t){this._context=e,this._k=(1-t)/6}dy.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:Zu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Zu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Mk=(function e(t){function i(a){return new dy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function fy(e,t){this._context=e,this._k=(1-t)/6}fy.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Zu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const u6=(function e(t){function i(a){return new fy(a,t)}return i.tension=function(a){return e(+a)},i})(0);function py(e,t){this._context=e,this._k=(1-t)/6}py.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Zu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const d6=(function e(t){function i(a){return new py(a,t)}return i.tension=function(a){return e(+a)},i})(0);function gy(e,t,i){var a=e._x1,s=e._y1,l=e._x2,c=e._y2;if(e._l01_a>UC){var h=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*h-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,s=(s*h-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>UC){var f=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,p=3*e._l23_a*(e._l23_a+e._l12_a);l=(l*f+e._x1*e._l23_2a-t*e._l12_2a)/p,c=(c*f+e._y1*e._l23_2a-i*e._l12_2a)/p}e._context.bezierCurveTo(a,s,l,c,e._x2,e._y2)}function Rk(e,t){this._context=e,this._alpha=t}Rk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:gy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ok=(function e(t){function i(a){return t?new Rk(a,t):new dy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Fk(e,t){this._context=e,this._alpha=t}Fk.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:gy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const f6=(function e(t){function i(a){return t?new Fk(a,t):new fy(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Dk(e,t){this._context=e,this._alpha=t}Dk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,a=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+a*a,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:gy(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const p6=(function e(t){function i(a){return t?new Dk(a,t):new py(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function $k(e){this._context=e}$k.prototype={areaStart:Cn,areaEnd:Cn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function g6(e){return new $k(e)}function WC(e){return e<0?-1:1}function YC(e,t,i){var a=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(a||s<0&&-0),c=(i-e._y1)/(s||a<0&&-0),h=(l*s+c*a)/(a+s);return(WC(l)+WC(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(h))||0}function GC(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function hg(e,t,i){var a=e._x0,s=e._y0,l=e._x1,c=e._y1,h=(l-a)/3;e._context.bezierCurveTo(a+h,s+h*t,l-h,c-h*i,l,c)}function Qu(e){this._context=e}Qu.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:hg(this,this._t0,GC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var i=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,hg(this,GC(this,i=YC(this,e,t)),i);break;default:hg(this,this._t0,i=YC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function zk(e){this._context=new Nk(e)}(zk.prototype=Object.create(Qu.prototype)).point=function(e,t){Qu.prototype.point.call(this,t,e)};function Nk(e){this._context=e}Nk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,i,a,s,l){this._context.bezierCurveTo(t,e,a,i,l,s)}};function qk(e){return new Qu(e)}function Ik(e){return new zk(e)}function Hk(e){this._context=e}Hk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,i=e.length;if(i)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),i===2)this._context.lineTo(e[1],t[1]);else for(var a=XC(e),s=XC(t),l=0,c=1;c<i;++l,++c)this._context.bezierCurveTo(a[0][l],s[0][l],a[1][l],s[1][l],e[c],t[c]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function XC(e){var t,i=e.length-1,a,s=new Array(i),l=new Array(i),c=new Array(i);for(s[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<i-1;++t)s[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(s[i-1]=2,l[i-1]=7,c[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)a=s[t]/l[t-1],l[t]-=a,c[t]-=a*c[t-1];for(s[i-1]=c[i-1]/l[i-1],t=i-2;t>=0;--t)s[t]=(c[t]-s[t+1])/l[t];for(l[i-1]=(e[i]+s[i-1])/2,t=0;t<i-1;++t)l[t]=2*e[t+1]-s[t+1];return[s,l]}function jk(e){return new Hk(e)}function Bd(e,t){this._context=e,this._t=t}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}break}}this._x=e,this._y=t}};function Uk(e){return new Bd(e,.5)}function Pk(e){return new Bd(e,0)}function Wk(e){return new Bd(e,1)}function rc(e,t,i){this.k=e,this.x=t,this.y=i}rc.prototype={constructor:rc,scale:function(e){return e===1?this:new rc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rc(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};rc.prototype;var m6=S(e=>{var s;const{securityLevel:t}=le();let i=Xt("body");if(t==="sandbox"){const c=((s=Xt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;i=Xt(c.body)}return i.select(`#${e}`)},"selectSvgElement");function my(e){return typeof e>"u"||e===null}S(my,"isNothing");function Yk(e){return typeof e=="object"&&e!==null}S(Yk,"isObject");function Gk(e){return Array.isArray(e)?e:my(e)?[]:[e]}S(Gk,"toArray");function Xk(e,t){var i,a,s,l;if(t)for(l=Object.keys(t),i=0,a=l.length;i<a;i+=1)s=l[i],e[s]=t[s];return e}S(Xk,"extend");function Vk(e,t){var i="",a;for(a=0;a<t;a+=1)i+=e;return i}S(Vk,"repeat");function Zk(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}S(Zk,"isNegativeZero");var y6=my,x6=Yk,b6=Gk,C6=Vk,v6=Zk,k6=Xk,Ve={isNothing:y6,isObject:x6,toArray:b6,repeat:C6,isNegativeZero:v6,extend:k6};function yy(e,t){var i="",a=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(i+=`
259
-
260
- `+e.mark.snippet),a+" "+i):a}S(yy,"formatError");function Ol(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=yy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}S(Ol,"YAMLException$1");Ol.prototype=Object.create(Error.prototype);Ol.prototype.constructor=Ol;Ol.prototype.toString=S(function(t){return this.name+": "+yy(this,t)},"toString");var zi=Ol;function wu(e,t,i,a,s){var l="",c="",h=Math.floor(s/2)-1;return a-t>h&&(l=" ... ",t=a-h+l.length),i-a>h&&(c=" ...",i=a+h-c.length),{str:l+e.slice(t,i).replace(/\t/g,"→")+c,pos:a-t+l.length}}S(wu,"getLine");function _u(e,t){return Ve.repeat(" ",t-e.length)+e}S(_u,"padStart");function Qk(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var i=/\r?\n|\r|\0/g,a=[0],s=[],l,c=-1;l=i.exec(e.buffer);)s.push(l.index),a.push(l.index+l[0].length),e.position<=l.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var h="",u,f,p=Math.min(e.line+t.linesAfter,s.length).toString().length,g=t.maxLength-(t.indent+p+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)f=wu(e.buffer,a[c-u],s[c-u],e.position-(a[c]-a[c-u]),g),h=Ve.repeat(" ",t.indent)+_u((e.line-u+1).toString(),p)+" | "+f.str+`
261
- `+h;for(f=wu(e.buffer,a[c],s[c],e.position,g),h+=Ve.repeat(" ",t.indent)+_u((e.line+1).toString(),p)+" | "+f.str+`
262
- `,h+=Ve.repeat("-",t.indent+p+3+f.pos)+`^
263
- `,u=1;u<=t.linesAfter&&!(c+u>=s.length);u++)f=wu(e.buffer,a[c+u],s[c+u],e.position-(a[c]-a[c+u]),g),h+=Ve.repeat(" ",t.indent)+_u((e.line+u+1).toString(),p)+" | "+f.str+`
264
- `;return h.replace(/\n$/,"")}S(Qk,"makeSnippet");var S6=Qk,T6=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],w6=["scalar","sequence","mapping"];function Kk(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){t[String(a)]=i})}),t}S(Kk,"compileStyleAliases");function Jk(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(T6.indexOf(i)===-1)throw new zi('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(i){return i},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Kk(t.styleAliases||null),w6.indexOf(this.kind)===-1)throw new zi('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}S(Jk,"Type$1");var mi=Jk;function Vg(e,t){var i=[];return e[t].forEach(function(a){var s=i.length;i.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(s=c)}),i[s]=a}),i}S(Vg,"compileList");function tS(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function a(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(S(a,"collectType"),t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(a);return e}S(tS,"compileMap");function Ku(e){return this.extend(e)}S(Ku,"Schema$1");Ku.prototype.extend=S(function(t){var i=[],a=[];if(t instanceof mi)a.push(t);else if(Array.isArray(t))a=a.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(a=a.concat(t.explicit));else throw new zi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof mi))throw new zi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new zi("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new zi("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(l){if(!(l instanceof mi))throw new zi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ku.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(a),s.compiledImplicit=Vg(s,"implicit"),s.compiledExplicit=Vg(s,"explicit"),s.compiledTypeMap=tS(s.compiledImplicit,s.compiledExplicit),s},"extend");var _6=Ku,B6=new mi("tag:yaml.org,2002:str",{kind:"scalar",construct:S(function(e){return e!==null?e:""},"construct")}),E6=new mi("tag:yaml.org,2002:seq",{kind:"sequence",construct:S(function(e){return e!==null?e:[]},"construct")}),L6=new mi("tag:yaml.org,2002:map",{kind:"mapping",construct:S(function(e){return e!==null?e:{}},"construct")}),A6=new _6({explicit:[B6,E6,L6]});function eS(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}S(eS,"resolveYamlNull");function iS(){return null}S(iS,"constructYamlNull");function rS(e){return e===null}S(rS,"isNull");var M6=new mi("tag:yaml.org,2002:null",{kind:"scalar",resolve:eS,construct:iS,predicate:rS,represent:{canonical:S(function(){return"~"},"canonical"),lowercase:S(function(){return"null"},"lowercase"),uppercase:S(function(){return"NULL"},"uppercase"),camelcase:S(function(){return"Null"},"camelcase"),empty:S(function(){return""},"empty")},defaultStyle:"lowercase"});function aS(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}S(aS,"resolveYamlBoolean");function nS(e){return e==="true"||e==="True"||e==="TRUE"}S(nS,"constructYamlBoolean");function sS(e){return Object.prototype.toString.call(e)==="[object Boolean]"}S(sS,"isBoolean");var R6=new mi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:aS,construct:nS,predicate:sS,represent:{lowercase:S(function(e){return e?"true":"false"},"lowercase"),uppercase:S(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:S(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function lS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}S(lS,"isHexCode");function oS(e){return 48<=e&&e<=55}S(oS,"isOctCode");function cS(e){return 48<=e&&e<=57}S(cS,"isDecCode");function hS(e){if(e===null)return!1;var t=e.length,i=0,a=!1,s;if(!t)return!1;if(s=e[i],(s==="-"||s==="+")&&(s=e[++i]),s==="0"){if(i+1===t)return!0;if(s=e[++i],s==="b"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;a=!0}return a&&s!=="_"}if(s==="x"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(!lS(e.charCodeAt(i)))return!1;a=!0}return a&&s!=="_"}if(s==="o"){for(i++;i<t;i++)if(s=e[i],s!=="_"){if(!oS(e.charCodeAt(i)))return!1;a=!0}return a&&s!=="_"}}if(s==="_")return!1;for(;i<t;i++)if(s=e[i],s!=="_"){if(!cS(e.charCodeAt(i)))return!1;a=!0}return!(!a||s==="_")}S(hS,"resolveYamlInteger");function uS(e){var t=e,i=1,a;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),a=t[0],(a==="-"||a==="+")&&(a==="-"&&(i=-1),t=t.slice(1),a=t[0]),t==="0")return 0;if(a==="0"){if(t[1]==="b")return i*parseInt(t.slice(2),2);if(t[1]==="x")return i*parseInt(t.slice(2),16);if(t[1]==="o")return i*parseInt(t.slice(2),8)}return i*parseInt(t,10)}S(uS,"constructYamlInteger");function dS(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ve.isNegativeZero(e)}S(dS,"isInteger");var O6=new mi("tag:yaml.org,2002:int",{kind:"scalar",resolve:hS,construct:uS,predicate:dS,represent:{binary:S(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:S(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:S(function(e){return e.toString(10)},"decimal"),hexadecimal:S(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),F6=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function fS(e){return!(e===null||!F6.test(e)||e[e.length-1]==="_")}S(fS,"resolveYamlFloat");function pS(e){var t,i;return t=e.replace(/_/g,"").toLowerCase(),i=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:i*parseFloat(t,10)}S(pS,"constructYamlFloat");var D6=/^[-+]?[0-9]+e/;function gS(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ve.isNegativeZero(e))return"-0.0";return i=e.toString(10),D6.test(i)?i.replace("e",".e"):i}S(gS,"representYamlFloat");function mS(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ve.isNegativeZero(e))}S(mS,"isFloat");var $6=new mi("tag:yaml.org,2002:float",{kind:"scalar",resolve:fS,construct:pS,predicate:mS,represent:gS,defaultStyle:"lowercase"}),yS=A6.extend({implicit:[M6,R6,O6,$6]}),z6=yS,xS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bS=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 CS(e){return e===null?!1:xS.exec(e)!==null||bS.exec(e)!==null}S(CS,"resolveYamlTimestamp");function vS(e){var t,i,a,s,l,c,h,u=0,f=null,p,g,x;if(t=xS.exec(e),t===null&&(t=bS.exec(e)),t===null)throw new Error("Date resolve error");if(i=+t[1],a=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(i,a,s));if(l=+t[4],c=+t[5],h=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(p=+t[10],g=+(t[11]||0),f=(p*60+g)*6e4,t[9]==="-"&&(f=-f)),x=new Date(Date.UTC(i,a,s,l,c,h,u)),f&&x.setTime(x.getTime()-f),x}S(vS,"constructYamlTimestamp");function kS(e){return e.toISOString()}S(kS,"representYamlTimestamp");var N6=new mi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:CS,construct:vS,instanceOf:Date,represent:kS});function SS(e){return e==="<<"||e===null}S(SS,"resolveYamlMerge");var q6=new mi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:SS}),xy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
265
- \r`;function TS(e){if(e===null)return!1;var t,i,a=0,s=e.length,l=xy;for(i=0;i<s;i++)if(t=l.indexOf(e.charAt(i)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}S(TS,"resolveYamlBinary");function wS(e){var t,i,a=e.replace(/[\r\n=]/g,""),s=a.length,l=xy,c=0,h=[];for(t=0;t<s;t++)t%4===0&&t&&(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)),c=c<<6|l.indexOf(a.charAt(t));return i=s%4*6,i===0?(h.push(c>>16&255),h.push(c>>8&255),h.push(c&255)):i===18?(h.push(c>>10&255),h.push(c>>2&255)):i===12&&h.push(c>>4&255),new Uint8Array(h)}S(wS,"constructYamlBinary");function _S(e){var t="",i=0,a,s,l=e.length,c=xy;for(a=0;a<l;a++)a%3===0&&a&&(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]),i=(i<<8)+e[a];return s=l%3,s===0?(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]):s===2?(t+=c[i>>10&63],t+=c[i>>4&63],t+=c[i<<2&63],t+=c[64]):s===1&&(t+=c[i>>2&63],t+=c[i<<4&63],t+=c[64],t+=c[64]),t}S(_S,"representYamlBinary");function BS(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}S(BS,"isBinary");var I6=new mi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:TS,construct:wS,predicate:BS,represent:_S}),H6=Object.prototype.hasOwnProperty,j6=Object.prototype.toString;function ES(e){if(e===null)return!0;var t=[],i,a,s,l,c,h=e;for(i=0,a=h.length;i<a;i+=1){if(s=h[i],c=!1,j6.call(s)!=="[object Object]")return!1;for(l in s)if(H6.call(s,l))if(!c)c=!0;else return!1;if(!c)return!1;if(t.indexOf(l)===-1)t.push(l);else return!1}return!0}S(ES,"resolveYamlOmap");function LS(e){return e!==null?e:[]}S(LS,"constructYamlOmap");var U6=new mi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ES,construct:LS}),P6=Object.prototype.toString;function AS(e){if(e===null)return!0;var t,i,a,s,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1){if(a=c[t],P6.call(a)!=="[object Object]"||(s=Object.keys(a),s.length!==1))return!1;l[t]=[s[0],a[s[0]]]}return!0}S(AS,"resolveYamlPairs");function MS(e){if(e===null)return[];var t,i,a,s,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1)a=c[t],s=Object.keys(a),l[t]=[s[0],a[s[0]]];return l}S(MS,"constructYamlPairs");var W6=new mi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:AS,construct:MS}),Y6=Object.prototype.hasOwnProperty;function RS(e){if(e===null)return!0;var t,i=e;for(t in i)if(Y6.call(i,t)&&i[t]!==null)return!1;return!0}S(RS,"resolveYamlSet");function OS(e){return e!==null?e:{}}S(OS,"constructYamlSet");var G6=new mi("tag:yaml.org,2002:set",{kind:"mapping",resolve:RS,construct:OS}),FS=z6.extend({implicit:[N6,q6],explicit:[I6,U6,W6,G6]}),vn=Object.prototype.hasOwnProperty,Ju=1,DS=2,$S=3,td=4,ug=1,X6=2,VC=3,V6=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Z6=/[\x85\u2028\u2029]/,Q6=/[,\[\]\{\}]/,zS=/^(?:!|!!|![a-z\-]+!)$/i,NS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zg(e){return Object.prototype.toString.call(e)}S(Zg,"_class");function Er(e){return e===10||e===13}S(Er,"is_EOL");function bn(e){return e===9||e===32}S(bn,"is_WHITE_SPACE");function ki(e){return e===9||e===32||e===10||e===13}S(ki,"is_WS_OR_EOL");function Zn(e){return e===44||e===91||e===93||e===123||e===125}S(Zn,"is_FLOW_INDICATOR");function qS(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}S(qS,"fromHexCode");function IS(e){return e===120?2:e===117?4:e===85?8:0}S(IS,"escapedHexLen");function HS(e){return 48<=e&&e<=57?e-48:-1}S(HS,"fromDecimalCode");function Qg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
266
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}S(Qg,"simpleEscapeSequence");function jS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}S(jS,"charFromCodepoint");function by(e,t,i){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[t]=i}S(by,"setProperty");var US=new Array(256),PS=new Array(256);for(Un=0;Un<256;Un++)US[Un]=Qg(Un)?1:0,PS[Un]=Qg(Un);var Un;function WS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||FS,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}S(WS,"State$1");function Cy(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=S6(i),new zi(t,i)}S(Cy,"generateError");function At(e,t){throw Cy(e,t)}S(At,"throwError");function Cc(e,t){e.onWarning&&e.onWarning.call(null,Cy(e,t))}S(Cc,"throwWarning");var ZC={YAML:S(function(t,i,a){var s,l,c;t.version!==null&&At(t,"duplication of %YAML directive"),a.length!==1&&At(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),s===null&&At(t,"ill-formed argument of the YAML directive"),l=parseInt(s[1],10),c=parseInt(s[2],10),l!==1&&At(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&Cc(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:S(function(t,i,a){var s,l;a.length!==2&&At(t,"TAG directive accepts exactly two arguments"),s=a[0],l=a[1],zS.test(s)||At(t,"ill-formed tag handle (first argument) of the TAG directive"),vn.call(t.tagMap,s)&&At(t,'there is a previously declared suffix for "'+s+'" tag handle'),NS.test(l)||At(t,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{At(t,"tag prefix is malformed: "+l)}t.tagMap[s]=l},"handleTagDirective")};function Ta(e,t,i,a){var s,l,c,h;if(t<i){if(h=e.input.slice(t,i),a)for(s=0,l=h.length;s<l;s+=1)c=h.charCodeAt(s),c===9||32<=c&&c<=1114111||At(e,"expected valid JSON character");else V6.test(h)&&At(e,"the stream contains non-printable characters");e.result+=h}}S(Ta,"captureSegment");function Kg(e,t,i,a){var s,l,c,h;for(Ve.isObject(i)||At(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),c=0,h=s.length;c<h;c+=1)l=s[c],vn.call(t,l)||(by(t,l,i[l]),a[l]=!0)}S(Kg,"mergeMappings");function Qn(e,t,i,a,s,l,c,h,u){var f,p;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),f=0,p=s.length;f<p;f+=1)Array.isArray(s[f])&&At(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Zg(s[f])==="[object Object]"&&(s[f]="[object Object]");if(typeof s=="object"&&Zg(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(f=0,p=l.length;f<p;f+=1)Kg(e,t,l[f],i);else Kg(e,t,l,i);else!e.json&&!vn.call(i,s)&&vn.call(t,s)&&(e.line=c||e.line,e.lineStart=h||e.lineStart,e.position=u||e.position,At(e,"duplicated mapping key")),by(t,s,l),delete i[s];return t}S(Qn,"storeMappingPair");function Ed(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):At(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}S(Ed,"readLineBreak");function Ne(e,t,i){for(var a=0,s=e.input.charCodeAt(e.position);s!==0;){for(;bn(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Er(s))for(Ed(e),s=e.input.charCodeAt(e.position),a++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&Cc(e,"deficient indentation"),a}S(Ne,"skipSeparationSpace");function Fc(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||ki(i)))}S(Fc,"testDocumentSeparator");function Ld(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ve.repeat(`
267
- `,t-1))}S(Ld,"writeFoldedLines");function YS(e,t,i){var a,s,l,c,h,u,f,p,g=e.kind,x=e.result,m;if(m=e.input.charCodeAt(e.position),ki(m)||Zn(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(s=e.input.charCodeAt(e.position+1),ki(s)||i&&Zn(s)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,h=!1;m!==0;){if(m===58){if(s=e.input.charCodeAt(e.position+1),ki(s)||i&&Zn(s))break}else if(m===35){if(a=e.input.charCodeAt(e.position-1),ki(a))break}else{if(e.position===e.lineStart&&Fc(e)||i&&Zn(m))break;if(Er(m))if(u=e.line,f=e.lineStart,p=e.lineIndent,Ne(e,!1,-1),e.lineIndent>=t){h=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=u,e.lineStart=f,e.lineIndent=p;break}}h&&(Ta(e,l,c,!1),Ld(e,e.line-u),l=c=e.position,h=!1),bn(m)||(c=e.position+1),m=e.input.charCodeAt(++e.position)}return Ta(e,l,c,!1),e.result?!0:(e.kind=g,e.result=x,!1)}S(YS,"readPlainScalar");function GS(e,t){var i,a,s;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=s=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Ta(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,s=e.position;else return!0;else Er(i)?(Ta(e,a,s,!0),Ld(e,Ne(e,!1,t)),a=s=e.position):e.position===e.lineStart&&Fc(e)?At(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);At(e,"unexpected end of the stream within a single quoted scalar")}S(GS,"readSingleQuotedScalar");function XS(e,t){var i,a,s,l,c,h;if(h=e.input.charCodeAt(e.position),h!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(h=e.input.charCodeAt(e.position))!==0;){if(h===34)return Ta(e,i,e.position,!0),e.position++,!0;if(h===92){if(Ta(e,i,e.position,!0),h=e.input.charCodeAt(++e.position),Er(h))Ne(e,!1,t);else if(h<256&&US[h])e.result+=PS[h],e.position++;else if((c=IS(h))>0){for(s=c,l=0;s>0;s--)h=e.input.charCodeAt(++e.position),(c=qS(h))>=0?l=(l<<4)+c:At(e,"expected hexadecimal character");e.result+=jS(l),e.position++}else At(e,"unknown escape sequence");i=a=e.position}else Er(h)?(Ta(e,i,a,!0),Ld(e,Ne(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Fc(e)?At(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}At(e,"unexpected end of the stream within a double quoted scalar")}S(XS,"readDoubleQuotedScalar");function VS(e,t){var i=!0,a,s,l,c=e.tag,h,u=e.anchor,f,p,g,x,m,v=Object.create(null),C,k,T,_;if(_=e.input.charCodeAt(e.position),_===91)p=93,m=!1,h=[];else if(_===123)p=125,m=!0,h={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),_=e.input.charCodeAt(++e.position);_!==0;){if(Ne(e,!0,t),_=e.input.charCodeAt(e.position),_===p)return e.position++,e.tag=c,e.anchor=u,e.kind=m?"mapping":"sequence",e.result=h,!0;i?_===44&&At(e,"expected the node content, but found ','"):At(e,"missed comma between flow collection entries"),k=C=T=null,g=x=!1,_===63&&(f=e.input.charCodeAt(e.position+1),ki(f)&&(g=x=!0,e.position++,Ne(e,!0,t))),a=e.line,s=e.lineStart,l=e.position,as(e,t,Ju,!1,!0),k=e.tag,C=e.result,Ne(e,!0,t),_=e.input.charCodeAt(e.position),(x||e.line===a)&&_===58&&(g=!0,_=e.input.charCodeAt(++e.position),Ne(e,!0,t),as(e,t,Ju,!1,!0),T=e.result),m?Qn(e,h,v,k,C,T,a,s,l):g?h.push(Qn(e,null,v,k,C,T,a,s,l)):h.push(C),Ne(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(i=!0,_=e.input.charCodeAt(++e.position)):i=!1}At(e,"unexpected end of the stream within a flow collection")}S(VS,"readFlowCollection");function ZS(e,t){var i,a,s=ug,l=!1,c=!1,h=t,u=0,f=!1,p,g;if(g=e.input.charCodeAt(e.position),g===124)a=!1;else if(g===62)a=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)ug===s?s=g===43?VC:X6:At(e,"repeat of a chomping mode identifier");else if((p=HS(g))>=0)p===0?At(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?At(e,"repeat of an indentation width identifier"):(h=t+p-1,c=!0);else break;if(bn(g)){do g=e.input.charCodeAt(++e.position);while(bn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!Er(g)&&g!==0)}for(;g!==0;){for(Ed(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!c||e.lineIndent<h)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>h&&(h=e.lineIndent),Er(g)){u++;continue}if(e.lineIndent<h){s===VC?e.result+=Ve.repeat(`
268
- `,l?1+u:u):s===ug&&l&&(e.result+=`
269
- `);break}for(a?bn(g)?(f=!0,e.result+=Ve.repeat(`
270
- `,l?1+u:u)):f?(f=!1,e.result+=Ve.repeat(`
271
- `,u+1)):u===0?l&&(e.result+=" "):e.result+=Ve.repeat(`
272
- `,u):e.result+=Ve.repeat(`
273
- `,l?1+u:u),l=!0,c=!0,u=0,i=e.position;!Er(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Ta(e,i,e.position,!1)}return!0}S(ZS,"readBlockScalar");function Jg(e,t){var i,a=e.tag,s=e.anchor,l=[],c,h=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),!(u!==45||(c=e.input.charCodeAt(e.position+1),!ki(c))));){if(h=!0,e.position++,Ne(e,!0,-1)&&e.lineIndent<=t){l.push(null),u=e.input.charCodeAt(e.position);continue}if(i=e.line,as(e,t,$S,!1,!0),l.push(e.result),Ne(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&u!==0)At(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return h?(e.tag=a,e.anchor=s,e.kind="sequence",e.result=l,!0):!1}S(Jg,"readBlockSequence");function QS(e,t,i){var a,s,l,c,h,u,f=e.tag,p=e.anchor,g={},x=Object.create(null),m=null,v=null,C=null,k=!1,T=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),_=e.input.charCodeAt(e.position);_!==0;){if(!k&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,At(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(_===63||_===58)&&ki(a))_===63?(k&&(Qn(e,g,x,m,v,null,c,h,u),m=v=C=null),T=!0,k=!0,s=!0):k?(k=!1,s=!0):At(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=a;else{if(c=e.line,h=e.lineStart,u=e.position,!as(e,i,DS,!1,!0))break;if(e.line===l){for(_=e.input.charCodeAt(e.position);bn(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),ki(_)||At(e,"a whitespace character is expected after the key-value separator within a block mapping"),k&&(Qn(e,g,x,m,v,null,c,h,u),m=v=C=null),T=!0,k=!1,s=!1,m=e.tag,v=e.result;else if(T)At(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(T)At(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=f,e.anchor=p,!0}if((e.line===l||e.lineIndent>t)&&(k&&(c=e.line,h=e.lineStart,u=e.position),as(e,t,td,!0,s)&&(k?v=e.result:C=e.result),k||(Qn(e,g,x,m,v,C,c,h,u),m=v=C=null),Ne(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>t)&&_!==0)At(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return k&&Qn(e,g,x,m,v,null,c,h,u),T&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=g),T}S(QS,"readBlockMapping");function KS(e){var t,i=!1,a=!1,s,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&At(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(i=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,s="!!",c=e.input.charCodeAt(++e.position)):s="!",t=e.position,i){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(l=e.input.slice(t,e.position),c=e.input.charCodeAt(++e.position)):At(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!ki(c);)c===33&&(a?At(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),zS.test(s)||At(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),c=e.input.charCodeAt(++e.position);l=e.input.slice(t,e.position),Q6.test(l)&&At(e,"tag suffix cannot contain flow indicator characters")}l&&!NS.test(l)&&At(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{At(e,"tag name is malformed: "+l)}return i?e.tag=l:vn.call(e.tagMap,s)?e.tag=e.tagMap[s]+l:s==="!"?e.tag="!"+l:s==="!!"?e.tag="tag:yaml.org,2002:"+l:At(e,'undeclared tag handle "'+s+'"'),!0}S(KS,"readTagProperty");function JS(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&At(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ki(i)&&!Zn(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&At(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}S(JS,"readAnchorProperty");function tT(e){var t,i,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!ki(a)&&!Zn(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&At(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),vn.call(e.anchorMap,i)||At(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],Ne(e,!0,-1),!0}S(tT,"readAlias");function as(e,t,i,a,s){var l,c,h,u=1,f=!1,p=!1,g,x,m,v,C,k;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=h=td===i||$S===i,a&&Ne(e,!0,-1)&&(f=!0,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)),u===1)for(;KS(e)||JS(e);)Ne(e,!0,-1)?(f=!0,h=l,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)):h=!1;if(h&&(h=f||s),(u===1||td===i)&&(Ju===i||DS===i?C=t:C=t+1,k=e.position-e.lineStart,u===1?h&&(Jg(e,k)||QS(e,k,C))||VS(e,C)?p=!0:(c&&ZS(e,C)||GS(e,C)||XS(e,C)?p=!0:tT(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&At(e,"alias node should not have any properties")):YS(e,C,Ju===i)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(p=h&&Jg(e,k))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&At(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,x=e.implicitTypes.length;g<x;g+=1)if(v=e.implicitTypes[g],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(vn.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,m=e.typeMap.multi[e.kind||"fallback"],g=0,x=m.length;g<x;g+=1)if(e.tag.slice(0,m[g].tag.length)===m[g].tag){v=m[g];break}v||At(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&At(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):At(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}S(as,"composeNode");function eT(e){var t=e.position,i,a,s,l=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(c=e.input.charCodeAt(e.position))!==0&&(Ne(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(l=!0,c=e.input.charCodeAt(++e.position),i=e.position;c!==0&&!ki(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),s=[],a.length<1&&At(e,"directive name must not be less than one character in length");c!==0;){for(;bn(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!Er(c));break}if(Er(c))break;for(i=e.position;c!==0&&!ki(c);)c=e.input.charCodeAt(++e.position);s.push(e.input.slice(i,e.position))}c!==0&&Ed(e),vn.call(ZC,a)?ZC[a](e,a,s):Cc(e,'unknown document directive "'+a+'"')}if(Ne(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ne(e,!0,-1)):l&&At(e,"directives end mark is expected"),as(e,e.lineIndent-1,td,!1,!0),Ne(e,!0,-1),e.checkLineBreaks&&Z6.test(e.input.slice(t,e.position))&&Cc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Fc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ne(e,!0,-1));return}if(e.position<e.length-1)At(e,"end of the stream or a document separator is expected");else return}S(eT,"readDocument");function vy(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
274
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new WS(e,t),a=e.indexOf("\0");for(a!==-1&&(i.position=a,At(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)eT(i);return i.documents}S(vy,"loadDocuments");function K6(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var a=vy(e,i);if(typeof t!="function")return a;for(var s=0,l=a.length;s<l;s+=1)t(a[s])}S(K6,"loadAll$1");function iT(e,t){var i=vy(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new zi("expected a single document in the stream, but found more")}}S(iT,"load$1");var J6=iT,tD={load:J6},rT=Object.prototype.toString,aT=Object.prototype.hasOwnProperty,ky=65279,eD=9,vc=10,iD=13,rD=32,aD=33,nD=34,tm=35,sD=37,lD=38,oD=39,cD=42,nT=44,hD=45,ed=58,uD=61,dD=62,fD=63,pD=64,sT=91,lT=93,gD=96,oT=123,mD=124,cT=125,yi={};yi[0]="\\0";yi[7]="\\a";yi[8]="\\b";yi[9]="\\t";yi[10]="\\n";yi[11]="\\v";yi[12]="\\f";yi[13]="\\r";yi[27]="\\e";yi[34]='\\"';yi[92]="\\\\";yi[133]="\\N";yi[160]="\\_";yi[8232]="\\L";yi[8233]="\\P";var yD=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],xD=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function hT(e,t){var i,a,s,l,c,h,u;if(t===null)return{};for(i={},a=Object.keys(t),s=0,l=a.length;s<l;s+=1)c=a[s],h=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),u=e.compiledTypeMap.fallback[c],u&&aT.call(u.styleAliases,h)&&(h=u.styleAliases[h]),i[c]=h;return i}S(hT,"compileStyleMap");function uT(e){var t,i,a;if(t=e.toString(16).toUpperCase(),e<=255)i="x",a=2;else if(e<=65535)i="u",a=4;else if(e<=4294967295)i="U",a=8;else throw new zi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Ve.repeat("0",a-t.length)+t}S(uT,"encodeHex");var bD=1,kc=2;function dT(e){this.schema=e.schema||FS,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ve.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=hT(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?kc:bD,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}S(dT,"State");function em(e,t){for(var i=Ve.repeat(" ",t),a=0,s=-1,l="",c,h=e.length;a<h;)s=e.indexOf(`
275
- `,a),s===-1?(c=e.slice(a),a=h):(c=e.slice(a,s+1),a=s+1),c.length&&c!==`
276
- `&&(l+=i),l+=c;return l}S(em,"indentString");function id(e,t){return`
277
- `+Ve.repeat(" ",e.indent*t)}S(id,"generateNextLine");function fT(e,t){var i,a,s;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(s=e.implicitTypes[i],s.resolve(t))return!0;return!1}S(fT,"testImplicitResolving");function Sc(e){return e===rD||e===eD}S(Sc,"isWhitespace");function Fl(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ky||65536<=e&&e<=1114111}S(Fl,"isPrintable");function im(e){return Fl(e)&&e!==ky&&e!==iD&&e!==vc}S(im,"isNsCharOrWhitespace");function rm(e,t,i){var a=im(e),s=a&&!Sc(e);return(i?a:a&&e!==nT&&e!==sT&&e!==lT&&e!==oT&&e!==cT)&&e!==tm&&!(t===ed&&!s)||im(t)&&!Sc(t)&&e===tm||t===ed&&s}S(rm,"isPlainSafe");function pT(e){return Fl(e)&&e!==ky&&!Sc(e)&&e!==hD&&e!==fD&&e!==ed&&e!==nT&&e!==sT&&e!==lT&&e!==oT&&e!==cT&&e!==tm&&e!==lD&&e!==cD&&e!==aD&&e!==mD&&e!==uD&&e!==dD&&e!==oD&&e!==nD&&e!==sD&&e!==pD&&e!==gD}S(pT,"isPlainSafeFirst");function gT(e){return!Sc(e)&&e!==ed}S(gT,"isPlainSafeLast");function hl(e,t){var i=e.charCodeAt(t),a;return i>=55296&&i<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1),a>=56320&&a<=57343)?(i-55296)*1024+a-56320+65536:i}S(hl,"codePointAt");function Sy(e){var t=/^\n* /;return t.test(e)}S(Sy,"needIndentIndicator");var mT=1,am=2,yT=3,xT=4,ll=5;function bT(e,t,i,a,s,l,c,h){var u,f=0,p=null,g=!1,x=!1,m=a!==-1,v=-1,C=pT(hl(e,0))&&gT(hl(e,e.length-1));if(t||c)for(u=0;u<e.length;f>=65536?u+=2:u++){if(f=hl(e,u),!Fl(f))return ll;C=C&&rm(f,p,h),p=f}else{for(u=0;u<e.length;f>=65536?u+=2:u++){if(f=hl(e,u),f===vc)g=!0,m&&(x=x||u-v-1>a&&e[v+1]!==" ",v=u);else if(!Fl(f))return ll;C=C&&rm(f,p,h),p=f}x=x||m&&u-v-1>a&&e[v+1]!==" "}return!g&&!x?C&&!c&&!s(e)?mT:l===kc?ll:am:i>9&&Sy(e)?ll:c?l===kc?ll:am:x?xT:yT}S(bT,"chooseScalarStyle");function CT(e,t,i,a,s){e.dump=(function(){if(t.length===0)return e.quotingType===kc?'""':"''";if(!e.noCompatMode&&(yD.indexOf(t)!==-1||xD.test(t)))return e.quotingType===kc?'"'+t+'"':"'"+t+"'";var l=e.indent*Math.max(1,i),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),h=a||e.flowLevel>-1&&i>=e.flowLevel;function u(f){return fT(e,f)}switch(S(u,"testAmbiguity"),bT(t,h,e.indent,c,u,e.quotingType,e.forceQuotes&&!a,s)){case mT:return t;case am:return"'"+t.replace(/'/g,"''")+"'";case yT:return"|"+nm(t,e.indent)+sm(em(t,l));case xT:return">"+nm(t,e.indent)+sm(em(vT(t,c),l));case ll:return'"'+kT(t)+'"';default:throw new zi("impossible error: invalid scalar style")}})()}S(CT,"writeScalar");function nm(e,t){var i=Sy(e)?String(t):"",a=e[e.length-1]===`
278
- `,s=a&&(e[e.length-2]===`
279
- `||e===`
280
- `),l=s?"+":a?"":"-";return i+l+`
281
- `}S(nm,"blockHeader");function sm(e){return e[e.length-1]===`
282
- `?e.slice(0,-1):e}S(sm,"dropEndingNewline");function vT(e,t){for(var i=/(\n+)([^\n]*)/g,a=(function(){var f=e.indexOf(`
283
- `);return f=f!==-1?f:e.length,i.lastIndex=f,lm(e.slice(0,f),t)})(),s=e[0]===`
284
- `||e[0]===" ",l,c;c=i.exec(e);){var h=c[1],u=c[2];l=u[0]===" ",a+=h+(!s&&!l&&u!==""?`
285
- `:"")+lm(u,t),s=l}return a}S(vT,"foldString");function lm(e,t){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,s=0,l,c=0,h=0,u="";a=i.exec(e);)h=a.index,h-s>t&&(l=c>s?c:h,u+=`
286
- `+e.slice(s,l),s=l+1),c=h;return u+=`
287
- `,e.length-s>t&&c>s?u+=e.slice(s,c)+`
288
- `+e.slice(c+1):u+=e.slice(s),u.slice(1)}S(lm,"foldLine");function kT(e){for(var t="",i=0,a,s=0;s<e.length;i>=65536?s+=2:s++)i=hl(e,s),a=yi[i],!a&&Fl(i)?(t+=e[s],i>=65536&&(t+=e[s+1])):t+=a||uT(i);return t}S(kT,"escapeString");function ST(e,t,i){var a="",s=e.tag,l,c,h;for(l=0,c=i.length;l<c;l+=1)h=i[l],e.replacer&&(h=e.replacer.call(i,String(l),h)),(Xr(e,t,h,!1,!1)||typeof h>"u"&&Xr(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}S(ST,"writeFlowSequence");function om(e,t,i,a){var s="",l=e.tag,c,h,u;for(c=0,h=i.length;c<h;c+=1)u=i[c],e.replacer&&(u=e.replacer.call(i,String(c),u)),(Xr(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&Xr(e,t+1,null,!0,!0,!1,!0))&&((!a||s!=="")&&(s+=id(e,t)),e.dump&&vc===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}S(om,"writeBlockSequence");function TT(e,t,i){var a="",s=e.tag,l=Object.keys(i),c,h,u,f,p;for(c=0,h=l.length;c<h;c+=1)p="",a!==""&&(p+=", "),e.condenseFlow&&(p+='"'),u=l[c],f=i[u],e.replacer&&(f=e.replacer.call(i,u,f)),Xr(e,t,u,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xr(e,t,f,!1,!1)&&(p+=e.dump,a+=p));e.tag=s,e.dump="{"+a+"}"}S(TT,"writeFlowMapping");function wT(e,t,i,a){var s="",l=e.tag,c=Object.keys(i),h,u,f,p,g,x;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new zi("sortKeys must be a boolean or a function");for(h=0,u=c.length;h<u;h+=1)x="",(!a||s!=="")&&(x+=id(e,t)),f=c[h],p=i[f],e.replacer&&(p=e.replacer.call(i,f,p)),Xr(e,t+1,f,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&vc===e.dump.charCodeAt(0)?x+="?":x+="? "),x+=e.dump,g&&(x+=id(e,t)),Xr(e,t+1,p,!0,g)&&(e.dump&&vc===e.dump.charCodeAt(0)?x+=":":x+=": ",x+=e.dump,s+=x));e.tag=l,e.dump=s||"{}"}S(wT,"writeBlockMapping");function cm(e,t,i){var a,s,l,c,h,u;for(s=i?e.explicitTypes:e.implicitTypes,l=0,c=s.length;l<c;l+=1)if(h=s[l],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof t=="object"&&t instanceof h.instanceOf)&&(!h.predicate||h.predicate(t))){if(i?h.multi&&h.representName?e.tag=h.representName(t):e.tag=h.tag:e.tag="?",h.represent){if(u=e.styleMap[h.tag]||h.defaultStyle,rT.call(h.represent)==="[object Function]")a=h.represent(t,u);else if(aT.call(h.represent,u))a=h.represent[u](t,u);else throw new zi("!<"+h.tag+'> tag resolver accepts not "'+u+'" style');e.dump=a}return!0}return!1}S(cm,"detectType");function Xr(e,t,i,a,s,l,c){e.tag=null,e.dump=i,cm(e,i,!1)||cm(e,i,!0);var h=rT.call(e.dump),u=a,f;a&&(a=e.flowLevel<0||e.flowLevel>t);var p=h==="[object Object]"||h==="[object Array]",g,x;if(p&&(g=e.duplicates.indexOf(i),x=g!==-1),(e.tag!==null&&e.tag!=="?"||x||e.indent!==2&&t>0)&&(s=!1),x&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(p&&x&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),h==="[object Object]")a&&Object.keys(e.dump).length!==0?(wT(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(TT(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!c&&t>0?om(e,t-1,e.dump,s):om(e,t,e.dump,s),x&&(e.dump="&ref_"+g+e.dump)):(ST(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&CT(e,e.dump,t,l,u);else{if(h==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new zi("unacceptable kind of an object to dump "+h)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}S(Xr,"writeNode");function _T(e,t){var i=[],a=[],s,l;for(rd(e,i,a),s=0,l=a.length;s<l;s+=1)t.duplicates.push(i[a[s]]);t.usedDuplicates=new Array(l)}S(_T,"getDuplicateReferences");function rd(e,t,i){var a,s,l;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)i.indexOf(s)===-1&&i.push(s);else if(t.push(e),Array.isArray(e))for(s=0,l=e.length;s<l;s+=1)rd(e[s],t,i);else for(a=Object.keys(e),s=0,l=a.length;s<l;s+=1)rd(e[a[s]],t,i)}S(rd,"inspectNode");function CD(e,t){t=t||{};var i=new dT(t);i.noRefs||_T(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),Xr(i,0,a,!0,!0)?i.dump+`
289
- `:""}S(CD,"dump$1");function vD(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}S(vD,"renamed");var kD=yS,SD=tD.load;/*! Bundled license information:
290
-
291
- js-yaml/dist/js-yaml.mjs:
292
- (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
293
- */var Yo=S((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const i=e.x??0,a=e.y??0;return"translate("+-(i+e.width/2)+", "+-(a+e.height/2)+")"},"computeLabelTransform"),pi={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},QC={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ac(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_e(e),t=_e(t);const[i,a]=[e.x,e.y],[s,l]=[t.x,t.y],c=s-i,h=l-a;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}S(ac,"calculateDeltaAndAngle");var _e=S(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),TD=S(e=>({x:S(function(t,i,a){let s=0;const l=_e(a[0]).x<_e(a[a.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(pi,e.arrowTypeStart)){const{angle:m,deltaX:v}=ac(a[0],a[1]);s=pi[e.arrowTypeStart]*Math.cos(m)*(v>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(pi,e.arrowTypeEnd)){const{angle:m,deltaX:v}=ac(a[a.length-1],a[a.length-2]);s=pi[e.arrowTypeEnd]*Math.cos(m)*(v>=0?1:-1)}const c=Math.abs(_e(t).x-_e(a[a.length-1]).x),h=Math.abs(_e(t).y-_e(a[a.length-1]).y),u=Math.abs(_e(t).x-_e(a[0]).x),f=Math.abs(_e(t).y-_e(a[0]).y),p=pi[e.arrowTypeStart],g=pi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let m=g+x-c;m*=l==="right"?-1:1,s-=m}if(u<p&&u>0&&f<p){let m=p+x-u;m*=l==="right"?-1:1,s+=m}return _e(t).x+s},"x"),y:S(function(t,i,a){let s=0;const l=_e(a[0]).y<_e(a[a.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(pi,e.arrowTypeStart)){const{angle:m,deltaY:v}=ac(a[0],a[1]);s=pi[e.arrowTypeStart]*Math.abs(Math.sin(m))*(v>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(pi,e.arrowTypeEnd)){const{angle:m,deltaY:v}=ac(a[a.length-1],a[a.length-2]);s=pi[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(v>=0?1:-1)}const c=Math.abs(_e(t).y-_e(a[a.length-1]).y),h=Math.abs(_e(t).x-_e(a[a.length-1]).x),u=Math.abs(_e(t).y-_e(a[0]).y),f=Math.abs(_e(t).x-_e(a[0]).x),p=pi[e.arrowTypeStart],g=pi[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let m=g+x-c;m*=l==="up"?-1:1,s-=m}if(u<p&&u>0&&f<p){let m=p+x-u;m*=l==="up"?-1:1,s+=m}return _e(t).y+s},"y")}),"getLineFunctionsWithOffset"),lu={},Ge={},KC;function wD(){return KC||(KC=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.BLANK_URL=Ge.relativeFirstCharacters=Ge.whitespaceEscapeCharsRegex=Ge.urlSchemeRegex=Ge.ctrlCharactersRegex=Ge.htmlCtrlEntityRegex=Ge.htmlEntitiesRegex=Ge.invalidProtocolRegex=void 0,Ge.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ge.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ge.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ge.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ge.urlSchemeRegex=/^.+(:|&colon;)/gim,Ge.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ge.relativeFirstCharacters=[".","/"],Ge.BLANK_URL="about:blank"),Ge}var JC;function _D(){if(JC)return lu;JC=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.sanitizeUrl=l;var e=wD();function t(c){return e.relativeFirstCharacters.indexOf(c[0])>-1}function i(c){var h=c.replace(e.ctrlCharactersRegex,"");return h.replace(e.htmlEntitiesRegex,function(u,f){return String.fromCharCode(f)})}function a(c){return URL.canParse(c)}function s(c){try{return decodeURIComponent(c)}catch{return c}}function l(c){if(!c)return e.BLANK_URL;var h,u=s(c.trim());do u=i(u).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),u=s(u),h=u.match(e.ctrlCharactersRegex)||u.match(e.htmlEntitiesRegex)||u.match(e.htmlCtrlEntityRegex)||u.match(e.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=u;if(!f)return e.BLANK_URL;if(t(f))return f;var p=f.trimStart(),g=p.match(e.urlSchemeRegex);if(!g)return f;var x=g[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(x))return e.BLANK_URL;var m=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return m;if(x==="http:"||x==="https:"){if(!a(m))return e.BLANK_URL;var v=new URL(m);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return m}return lu}var BD=_D();function ED(e){return Number.isSafeInteger(e)&&e>=0}function BT(e){return e!=null&&typeof e!="function"&&ED(e.length)}function LD(e){return e==="__proto__"}function Ty(e){return e==null||typeof e!="object"&&typeof e!="function"}function ET(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function wy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const AD="[object RegExp]",LT="[object String]",AT="[object Number]",MT="[object Boolean]",RT="[object Arguments]",MD="[object Symbol]",RD="[object Date]",OD="[object Map]",FD="[object Set]",DD="[object Array]",$D="[object ArrayBuffer]",OT="[object Object]",zD="[object DataView]",ND="[object Uint8Array]",qD="[object Uint8ClampedArray]",ID="[object Uint16Array]",HD="[object Uint32Array]",jD="[object Int8Array]",UD="[object Int16Array]",PD="[object Int32Array]",WD="[object Float32Array]",YD="[object Float64Array]",t2=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function _y(e){return typeof t2.Buffer<"u"&&t2.Buffer.isBuffer(e)}function By(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function GD(e,t){return ul(e,void 0,e,new Map,t)}function ul(e,t,i,a=new Map,s=void 0){const l=s==null?void 0:s(e,t,i,a);if(l!==void 0)return l;if(Ty(e))return e;if(a.has(e))return a.get(e);if(Array.isArray(e)){const c=new Array(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=ul(e[h],h,i,a,s);return Object.hasOwn(e,"index")&&(c.index=e.index),Object.hasOwn(e,"input")&&(c.input=e.input),c}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const c=new RegExp(e.source,e.flags);return c.lastIndex=e.lastIndex,c}if(e instanceof Map){const c=new Map;a.set(e,c);for(const[h,u]of e)c.set(h,ul(u,h,i,a,s));return c}if(e instanceof Set){const c=new Set;a.set(e,c);for(const h of e)c.add(ul(h,void 0,i,a,s));return c}if(_y(e))return e.subarray();if(By(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=ul(e[h],h,i,a,s);return c}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const c=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return a.set(e,c),Cr(c,e,i,a,s),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return a.set(e,c),Cr(c,e,i,a,s),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return a.set(e,c),Cr(c,e,i,a,s),c}if(e instanceof Error){const c=structuredClone(e);return a.set(e,c),c.message=e.message,c.name=e.name,c.stack=e.stack,c.cause=e.cause,c.constructor=e.constructor,Cr(c,e,i,a,s),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return a.set(e,c),Cr(c,e,i,a,s),c}if(e instanceof Number){const c=new Number(e.valueOf());return a.set(e,c),Cr(c,e,i,a,s),c}if(e instanceof String){const c=new String(e.valueOf());return a.set(e,c),Cr(c,e,i,a,s),c}if(typeof e=="object"&&XD(e)){const c=Object.create(Object.getPrototypeOf(e));return a.set(e,c),Cr(c,e,i,a,s),c}return e}function Cr(e,t,i=e,a,s){const l=[...Object.keys(t),...ET(t)];for(let c=0;c<l.length;c++){const h=l[c],u=Object.getOwnPropertyDescriptor(e,h);(u==null||u.writable)&&(e[h]=ul(t[h],h,i,a,s))}}function XD(e){switch(wy(e)){case RT:case DD:case $D:case zD:case MT:case RD:case WD:case YD:case jD:case UD:case PD:case OD:case AT:case OT:case AD:case FD:case LT:case MD:case ND:case qD:case ID:case HD:return!0;default:return!1}}function VD(e,t){return GD(e,(i,a,s,l)=>{if(typeof e=="object"){if(wy(e)===OT&&typeof e.constructor!="function"){const c={};return l.set(e,c),Cr(c,e,s,l),c}switch(Object.prototype.toString.call(e)){case AT:case LT:case MT:{const c=new e.constructor(e==null?void 0:e.valueOf());return Cr(c,e),c}case RT:{const c={};return Cr(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function e2(e){return VD(e)}function hm(e){return e!==null&&typeof e=="object"&&wy(e)==="[object Arguments]"}function um(e){return typeof e=="object"&&e!==null}function ZD(e){return um(e)&&BT(e)}function Dc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const i=function(...s){const l=t?t.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);const h=e.apply(this,s);return i.cache=c.set(l,h)||c,h},a=Dc.Cache||Map;return i.cache=new a,i}Dc.Cache=Map;function QD(){}function KD(e){const t=e==null?void 0:e.constructor,i=typeof t=="function"?t.prototype:Object.prototype;return e===i}function Bu(e){return By(e)}function dg(e){var i;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const a=e[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&i.writable)?!1:e.toString()===`[object ${a}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function JD(e){if(Ty(e))return e;if(Array.isArray(e)||By(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){const a=new i(e);return a.lastIndex=e.lastIndex,a}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){let a;return e instanceof AggregateError?a=new i(e.errors,e.message,{cause:e.cause}):a=new i(e.message,{cause:e.cause}),a.stack=e.stack,Object.assign(a,e),a}if(typeof File<"u"&&e instanceof File)return new i([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const a=Object.create(t);return Object.assign(a,e)}return e}function t$(e,...t){const i=t.slice(0,-1),a=t[t.length-1];let s=e;for(let l=0;l<i.length;l++){const c=i[l];s=Eu(s,c,a,new Map)}return s}function Eu(e,t,i,a){if(Ty(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(a.has(t))return JD(a.get(t));if(a.set(t,e),Array.isArray(t)){t=t.slice();for(let l=0;l<t.length;l++)t[l]=t[l]??void 0}const s=[...Object.keys(t),...ET(t)];for(let l=0;l<s.length;l++){const c=s[l];if(LD(c))continue;let h=t[c],u=e[c];if(hm(h)&&(h={...h}),hm(u)&&(u={...u}),_y(h)&&(h=e2(h)),Array.isArray(h))if(Array.isArray(u)){const p=[],g=Reflect.ownKeys(u);for(let x=0;x<g.length;x++){const m=g[x];p[m]=u[m]}u=p}else if(ZD(u)){const p=[];for(let g=0;g<u.length;g++)p[g]=u[g];u=p}else u=[];const f=i(u,h,c,e,t,a);f!==void 0?e[c]=f:Array.isArray(h)||um(u)&&um(h)&&(dg(u)||dg(h)||Bu(u)||Bu(h))?e[c]=Eu(u,h,i,a):u==null&&dg(h)?e[c]=Eu({},h,i,a):u==null&&Bu(h)?e[c]=e2(h):(u===void 0||h!==void 0)&&(e[c]=h)}return e}function e$(e,...t){return t$(e,...t,QD)}function i2(e){if(e==null)return!0;if(BT(e))return typeof e.splice!="function"&&typeof e!="string"&&!_y(e)&&!Bu(e)&&!hm(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return KD(e)?t.filter(i=>i!=="constructor").length===0:t.length===0}return!0}var i$="​",r$={curveBasis:Xg,curveBasisClosed:o6,curveBasisOpen:c6,curveBumpX:_k,curveBumpY:Bk,curveBundle:h6,curveCardinalClosed:u6,curveCardinalOpen:d6,curveCardinal:Mk,curveCatmullRomClosed:f6,curveCatmullRomOpen:p6,curveCatmullRom:Ok,curveLinear:uc,curveLinearClosed:g6,curveMonotoneX:qk,curveMonotoneY:Ik,curveNatural:jk,curveStep:Uk,curveStepAfter:Wk,curveStepBefore:Pk},a$=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,n$=S(function(e,t){const i=FT(e,/(?:init\b)|(?:initialize\b)/);let a={};if(Array.isArray(i)){const c=i.map(h=>h.args);Nu(c),a=Xe(a,[...c])}else a=i.args;if(!a)return;let s=Km(e,t);const l="config";return a[l]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),a[s]=a[l],delete a[l]),a},"detectInit"),FT=S(function(e,t=null){var i,a;try{const s=new RegExp(`[%]{2}(?![{]${a$.source})(?=[}][%]{2}).*
294
- `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),mt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let l;const c=[];for(;(l=cc.exec(e))!==null;)if(l.index===cc.lastIndex&&cc.lastIndex++,l&&!t||t&&((i=l[1])!=null&&i.match(t))||t&&((a=l[2])!=null&&a.match(t))){const h=l[1]?l[1]:l[2],u=l[3]?l[3].trim():l[4]?JSON.parse(l[4].trim()):null;c.push({type:h,args:u})}return c.length===0?{type:e,args:null}:c.length===1?c[0]:c}catch(s){return mt.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),s$=S(function(e){return e.replace(cc,"")},"removeDirectives"),l$=S(function(e,t){for(const[i,a]of t.entries())if(a.match(e))return i;return-1},"isSubstringInArray");function Ey(e,t){if(!e)return t;const i=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return r$[i]??t}S(Ey,"interpolateToCurve");function DT(e,t){const i=e.trim();if(i)return t.securityLevel!=="loose"?BD.sanitizeUrl(i):i}S(DT,"formatUrl");var o$=S((e,...t)=>{const i=e.split("."),a=i.length-1,s=i[a];let l=window;for(let c=0;c<a;c++)if(l=l[i[c]],!l){mt.error(`Function name: ${e} not found in window`);return}l[s](...t)},"runFunc");function Ly(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}S(Ly,"distance");function $T(e){let t,i=0;e.forEach(s=>{i+=Ly(s,t),t=s});const a=i/2;return Ay(e,a)}S($T,"traverseEdge");function zT(e){return e.length===1?e[0]:$T(e)}S(zT,"calcLabelPosition");var r2=S((e,t=2)=>{const i=Math.pow(10,t);return Math.round(e*i)/i},"roundNumber"),Ay=S((e,t)=>{let i,a=t;for(const s of e){if(i){const l=Ly(s,i);if(l===0)return i;if(l<a)a-=l;else{const c=a/l;if(c<=0)return i;if(c>=1)return{x:s.x,y:s.y};if(c>0&&c<1)return{x:r2((1-c)*i.x+c*s.x,5),y:r2((1-c)*i.y+c*s.y,5)}}}i=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),c$=S((e,t,i)=>{mt.info(`our points ${JSON.stringify(t)}`),t[0]!==i&&(t=t.reverse());const s=Ay(t,25),l=e?10:5,c=Math.atan2(t[0].y-s.y,t[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(c)*l+(t[0].x+s.x)/2,h.y=-Math.cos(c)*l+(t[0].y+s.y)/2,h},"calcCardinalityPosition");function NT(e,t,i){const a=structuredClone(i);mt.info("our points",a),t!=="start_left"&&t!=="start_right"&&a.reverse();const s=25+e,l=Ay(a,s),c=10+e*.5,h=Math.atan2(a[0].y-l.y,a[0].x-l.x),u={x:0,y:0};return t==="start_left"?(u.x=Math.sin(h+Math.PI)*c+(a[0].x+l.x)/2,u.y=-Math.cos(h+Math.PI)*c+(a[0].y+l.y)/2):t==="end_right"?(u.x=Math.sin(h-Math.PI)*c+(a[0].x+l.x)/2-5,u.y=-Math.cos(h-Math.PI)*c+(a[0].y+l.y)/2-5):t==="end_left"?(u.x=Math.sin(h)*c+(a[0].x+l.x)/2-5,u.y=-Math.cos(h)*c+(a[0].y+l.y)/2-5):(u.x=Math.sin(h)*c+(a[0].x+l.x)/2,u.y=-Math.cos(h)*c+(a[0].y+l.y)/2),u}S(NT,"calcTerminalLabelPosition");function qT(e){let t="",i="";for(const a of e)a!==void 0&&(a.startsWith("color:")||a.startsWith("text-align:")?i=i+a+";":t=t+a+";");return{style:t,labelStyle:i}}S(qT,"getStylesFromArray");var a2=0,h$=S(()=>(a2++,"id-"+Math.random().toString(36).substr(2,12)+"-"+a2),"generateId");function IT(e){let t="";const i="0123456789abcdef",a=i.length;for(let s=0;s<e;s++)t+=i.charAt(Math.floor(Math.random()*a));return t}S(IT,"makeRandomHex");var u$=S(e=>IT(e.length),"random"),d$=S(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"),f$=S(function(e,t){const i=t.text.replace(Mc.lineBreakRegex," "),[,a]=Ad(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",a),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const l=s.append("tspan");return l.attr("x",t.x+t.textMargin*2),l.attr("fill",t.fill),l.text(i),s},"drawSimpleText"),p$=Dc((e,t,i)=>{if(!e||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Mc.lineBreakRegex.test(e)))return e;const a=e.split(" ").filter(Boolean),s=[];let l="";return a.forEach((c,h)=>{const u=Ba(`${c} `,i),f=Ba(l,i);if(u>t){const{hyphenatedStrings:x,remainingWord:m}=g$(c,t,"-",i);s.push(l,...x),l=m}else f+u>=t?(s.push(l),l=c):l=[l,c].filter(Boolean).join(" ");h+1===a.length&&s.push(l)}),s.filter(c=>c!=="").join(i.joinWith)},(e,t,i)=>`${e}${t}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),g$=Dc((e,t,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const s=[...e],l=[];let c="";return s.forEach((h,u)=>{const f=`${c}${h}`;if(Ba(f,a)>=t){const g=u+1,x=s.length===g,m=`${f}${i}`;l.push(x?f:m),c=""}else c=f}),{hyphenatedStrings:l,remainingWord:c}},(e,t,i="-",a)=>`${e}${t}${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function HT(e,t){return My(e,t).height}S(HT,"calculateTextHeight");function Ba(e,t){return My(e,t).width}S(Ba,"calculateTextWidth");var My=Dc((e,t)=>{const{fontSize:i=12,fontFamily:a="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,l]=Ad(i),c=["sans-serif",a],h=e.split(Mc.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 m=0;const v={width:0,height:0,lineHeight:0};for(const C of h){const k=d$();k.text=C||i$;const T=f$(p,k).style("font-size",l).style("font-weight",s).style("font-family",x),_=(T._groups||T)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,_.width)),m=Math.round(_.height),v.height+=m,v.lineHeight=Math.round(Math.max(v.lineHeight,m))}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]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),El,m$=(El=class{constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}},S(El,"InitIDGenerator"),El),ou,y$=S(function(e){return ou=ou||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ou.innerHTML=e,unescape(ou.textContent)},"entityDecode");function Ry(e){return"str"in e}S(Ry,"isDetailedError");var x$=S((e,t,i,a)=>{var l;if(!a)return;const s=(l=e.node())==null?void 0:l.getBBox();s&&e.append("text").text(a).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-i).attr("class",t)},"insertTitle"),Ad=S(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Oy(e,t){return e$({},e,t)}S(Oy,"cleanAndMerge");var _r={assignWithDepth:Xe,wrapLabel:p$,calculateTextHeight:HT,calculateTextWidth:Ba,calculateTextDimensions:My,cleanAndMerge:Oy,detectInit:n$,detectDirective:FT,isSubstringInArray:l$,interpolateToCurve:Ey,calcLabelPosition:zT,calcCardinalityPosition:c$,calcTerminalLabelPosition:NT,formatUrl:DT,getStylesFromArray:qT,generateId:h$,random:u$,runFunc:o$,entityDecode:y$,insertTitle:x$,isLabelCoordinateInPath:jT,parseFontSize:Ad,InitIDGenerator:m$},b$=S(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),t=t.replace(/#\w+;/g,function(i){const a=i.substring(1,i.length-1);return/^\+?\d+$/.test(a)?"fl°°"+a+"¶ß":"fl°"+a+"¶ß"}),t},"encodeEntities"),ns=S(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),lI=S((e,t,{counter:i=0,prefix:a,suffix:s},l)=>l||`${a?`${a}_`:""}${e}_${t}_${i}${s?`_${s}`:""}`,"getEdgeId");function Ke(e){return e??null}S(Ke,"handleUndefinedAttr");function jT(e,t){const i=Math.round(e.x),a=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,l=>Math.round(parseFloat(l)).toString());return s.includes(i.toString())||s.includes(a.toString())}S(jT,"isLabelCoordinateInPath");var Fy=S(({flowchart:e})=>{var s,l;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,i=((l=e==null?void 0:e.subGraphTitleMargin)==null?void 0:l.bottom)??0,a=t+i;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:a}},"getSubGraphTitleMargins");async function UT(e,t){const i=e.getElementsByTagName("img");if(!i||i.length===0)return;const a=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...i].map(s=>new Promise(l=>{function c(){if(s.style.display="flex",s.style.flexDirection="column",a){const h=le().fontSize?le().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[f=Nv.fontSize]=Ad(h),p=f*u+"px";s.style.minWidth=p,s.style.maxWidth=p}else s.style.width="100%";l(s)}S(c,"setupImage"),setTimeout(()=>{s.complete&&c()}),s.addEventListener("error",c),s.addEventListener("load",c)})))}S(UT,"configureLabelImages");var C$=S(e=>{const{handDrawnSeed:t}=le();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Hl=S(e=>{const t=v$([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),v$=S(e=>{const t=new Map;return e.forEach(i=>{const[a,s]=i.split(":");t.set(a.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),PT=S(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),_t=S(e=>{const{stylesArray:t}=Hl(e),i=[],a=[],s=[],l=[];return t.forEach(c=>{const h=c[0];PT(h)?i.push(c.join(":")+" !important"):(a.push(c.join(":")+" !important"),h.includes("stroke")&&s.push(c.join(":")+" !important"),h==="fill"&&l.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:l}},"styles2String"),Tt=S((e,t)=>{var u;const{themeVariables:i,handDrawnSeed:a}=le(),{nodeBorder:s,mainBkg:l}=i,{stylesMap:c}=Hl(e);return Object.assign({roughness:.7,fill:c.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||s,seed:a,strokeWidth:((u=c.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:k$(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),k$=S(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const i=isNaN(t[0])?0:t[0],a=isNaN(t[1])?0:t[1];return[i,a]},"getStrokeDashArray");const S$=Object.freeze({left:0,top:0,width:16,height:16}),ad=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),WT=Object.freeze({...S$,...ad}),T$=Object.freeze({...WT,body:"",hidden:!1}),w$=Object.freeze({width:null,height:null}),_$=Object.freeze({...w$,...ad}),B$=(e,t,i,a="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;a=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const h=s.pop(),u=s.pop(),f={provider:s.length>0?s[0]:a,prefix:u,name:h};return fg(f)?f:null}const l=s[0],c=l.split("-");if(c.length>1){const h={provider:a,prefix:c.shift(),name:c.join("-")};return fg(h)?h:null}if(i&&a===""){const h={provider:a,prefix:"",name:l};return fg(h,i)?h:null}return null},fg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function E$(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const a=((e.rotate||0)+(t.rotate||0))%4;return a&&(i.rotate=a),i}function n2(e,t){const i=E$(e,t);for(const a in T$)a in ad?a in e&&!(a in i)&&(i[a]=ad[a]):a in t?i[a]=t[a]:a in e&&(i[a]=e[a]);return i}function L$(e,t){const i=e.icons,a=e.aliases||Object.create(null),s=Object.create(null);function l(c){if(i[c])return s[c]=[];if(!(c in s)){s[c]=null;const h=a[c]&&a[c].parent,u=h&&l(h);u&&(s[c]=[h].concat(u))}return s[c]}return(t||Object.keys(i).concat(Object.keys(a))).forEach(l),s}function s2(e,t,i){const a=e.icons,s=e.aliases||Object.create(null);let l={};function c(h){l=n2(a[h]||s[h],l)}return c(t),i.forEach(c),n2(e,l)}function A$(e,t){if(e.icons[t])return s2(e,t,[]);const i=L$(e,[t])[t];return i?s2(e,t,i):null}const M$=/(-?[0-9.]*[0-9]+[0-9.]*)/g,R$=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function l2(e,t,i){if(t===1)return e;if(i=i||100,typeof e=="number")return Math.ceil(e*t*i)/i;if(typeof e!="string")return e;const a=e.split(M$);if(a===null||!a.length)return e;const s=[];let l=a.shift(),c=R$.test(l);for(;;){if(c){const h=parseFloat(l);isNaN(h)?s.push(l):s.push(Math.ceil(h*t*i)/i)}else s.push(l);if(l=a.shift(),l===void 0)return s.join("");c=!c}}function O$(e,t="defs"){let i="";const a=e.indexOf("<"+t);for(;a>=0;){const s=e.indexOf(">",a),l=e.indexOf("</"+t);if(s===-1||l===-1)break;const c=e.indexOf(">",l);if(c===-1)break;i+=e.slice(s+1,l).trim(),e=e.slice(0,a).trim()+e.slice(c+1)}return{defs:i,content:e}}function F$(e,t){return e?"<defs>"+e+"</defs>"+t:t}function D$(e,t,i){const a=O$(e);return F$(a.defs,t+a.content+i)}const $$=e=>e==="unset"||e==="undefined"||e==="none";function z$(e,t){const i={...WT,...e},a={..._$,...t},s={left:i.left,top:i.top,width:i.width,height:i.height};let l=i.body;[i,a].forEach(C=>{const k=[],T=C.hFlip,_=C.vFlip;let B=C.rotate;T?_?B+=2:(k.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),k.push("scale(-1 1)"),s.top=s.left=0):_&&(k.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),k.push("scale(1 -1)"),s.top=s.left=0);let O;switch(B<0&&(B-=Math.floor(B/4)*4),B=B%4,B){case 1:O=s.height/2+s.top,k.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:k.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:O=s.width/2+s.left,k.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}B%2===1&&(s.left!==s.top&&(O=s.left,s.left=s.top,s.top=O),s.width!==s.height&&(O=s.width,s.width=s.height,s.height=O)),k.length&&(l=D$(l,'<g transform="'+k.join(" ")+'">',"</g>"))});const c=a.width,h=a.height,u=s.width,f=s.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=l2(g,u/f)):(p=c==="auto"?u:c,g=h===null?l2(p,f/u):h==="auto"?f:h);const x={},m=(C,k)=>{$$(k)||(x[C]=k.toString())};m("width",p),m("height",g);const v=[s.left,s.top,u,f];return x.viewBox=v.join(" "),{attributes:x,viewBox:v,body:l}}const N$=/\sid="(\S+)"/g,o2=new Map;function q$(e){e=e.replace(/[0-9]+$/,"")||"a";const t=o2.get(e)||0;return o2.set(e,t+1),t?`${e}${t}`:e}function I$(e){const t=[];let i;for(;i=N$.exec(e);)t.push(i[1]);if(!t.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const l=q$(s),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function H$(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const a in t)i+=" "+a+'="'+t[a]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+e+"</svg>"}function Dy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hs=Dy();function YT(e){hs=e}var dc={exec:()=>null};function oe(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(Si.caret,"$1"),i=i.replace(s,c),a},getRegex:()=>new RegExp(i,t)};return a}var j$=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Si={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},U$=/^(?:[ \t]*(?:\n|$))+/,P$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,W$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Y$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$y=/(?:[*+-]|\d{1,9}[.)])/,GT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,XT=oe(GT).replace(/bull/g,$y).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(),G$=oe(GT).replace(/bull/g,$y).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(),zy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,X$=/^[^\n]+/,Ny=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,V$=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ny).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Z$=oe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$y).getRegex(),Md="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",qy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Q$=oe("^ {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",qy).replace("tag",Md).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),VT=oe(zy).replace("hr",$c).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",Md).getRegex(),K$=oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",VT).getRegex(),Iy={blockquote:K$,code:P$,def:V$,fences:W$,heading:Y$,hr:$c,html:Q$,lheading:XT,list:Z$,newline:U$,paragraph:VT,table:dc,text:X$},c2=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$c).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",Md).getRegex(),J$={...Iy,lheading:G$,table:c2,paragraph:oe(zy).replace("hr",$c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",c2).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",Md).getRegex()},t8={...Iy,html:oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qy).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:dc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(zy).replace("hr",$c).replace("heading",` *#{1,6} *[^
295
- ]`).replace("lheading",XT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},e8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,i8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ZT=/^( {2,}|\\)\n(?!\s*$)/,r8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rd=/[\p{P}\p{S}]/u,Hy=/[\s\p{P}\p{S}]/u,QT=/[^\s\p{P}\p{S}]/u,a8=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Hy).getRegex(),KT=/(?!~)[\p{P}\p{S}]/u,n8=/(?!~)[\s\p{P}\p{S}]/u,s8=/(?:[^\s\p{P}\p{S}]|~)/u,l8=oe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",j$?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),JT=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,o8=oe(JT,"u").replace(/punct/g,Rd).getRegex(),c8=oe(JT,"u").replace(/punct/g,KT).getRegex(),tw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",h8=oe(tw,"gu").replace(/notPunctSpace/g,QT).replace(/punctSpace/g,Hy).replace(/punct/g,Rd).getRegex(),u8=oe(tw,"gu").replace(/notPunctSpace/g,s8).replace(/punctSpace/g,n8).replace(/punct/g,KT).getRegex(),d8=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,QT).replace(/punctSpace/g,Hy).replace(/punct/g,Rd).getRegex(),f8=oe(/\\(punct)/,"gu").replace(/punct/g,Rd).getRegex(),p8=oe(/^<(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(),g8=oe(qy).replace("(?:-->|$)","-->").getRegex(),m8=oe("^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",g8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,y8=oe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ew=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",nd).replace("ref",Ny).getRegex(),iw=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ny).getRegex(),x8=oe("reflink|nolink(?!\\()","g").replace("reflink",ew).replace("nolink",iw).getRegex(),h2=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jy={_backpedal:dc,anyPunctuation:f8,autolink:p8,blockSkip:l8,br:ZT,code:i8,del:dc,emStrongLDelim:o8,emStrongRDelimAst:h8,emStrongRDelimUnd:d8,escape:e8,link:y8,nolink:iw,punctuation:a8,reflink:ew,reflinkSearch:x8,tag:m8,text:r8,url:dc},b8={...jy,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",nd).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nd).getRegex()},dm={...jy,emStrongRDelimAst:u8,emStrongLDelim:c8,url:oe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",h2).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:oe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",h2).getRegex()},C8={...dm,br:oe(ZT).replace("{2,}","*").getRegex(),text:oe(dm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},cu={normal:Iy,gfm:J$,pedantic:t8},Go={normal:jy,gfm:dm,breaks:C8,pedantic:b8},v8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u2=e=>v8[e];function Ur(e,t){if(t){if(Si.escapeTest.test(e))return e.replace(Si.escapeReplace,u2)}else if(Si.escapeTestNoEncode.test(e))return e.replace(Si.escapeReplaceNoEncode,u2);return e}function d2(e){try{e=encodeURI(e).replace(Si.percentDecode,"%")}catch{return null}return e}function f2(e,t){var l;let i=e.replace(Si.findPipe,(c,h,u)=>{let f=!1,p=h;for(;--p>=0&&u[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(Si.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(Si.slashPipe,"|");return a}function Xo(e,t,i){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function k8(e,t){if(e.indexOf(t[1])===-1)return-1;let i=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])i++;else if(e[a]===t[1]&&(i--,i<0))return a;return i>0?-2:-1}function p2(e,t,i,a,s){let l=t.href,c=t.title||null,h=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,u}function S8(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
296
- `).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=s.length?l.slice(s.length):l}).join(`
297
- `)}var sd=class{constructor(t){Lt(this,"options");Lt(this,"rules");Lt(this,"lexer");this.options=t||hs}space(t){let i=this.rules.block.newline.exec(t);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(t){let i=this.rules.block.code.exec(t);if(i){let a=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?a:Xo(a,`
298
- `)}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],s=S8(a,i[3]||"",this.rules);return{type:"code",raw:a,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:s}}}heading(t){let i=this.rules.block.heading.exec(t);if(i){let a=i[2].trim();if(this.rules.other.endingHash.test(a)){let s=Xo(a,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(a=s.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:a,tokens:this.lexer.inline(a)}}}hr(t){let i=this.rules.block.hr.exec(t);if(i)return{type:"hr",raw:Xo(i[0],`
299
- `)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=Xo(i[0],`
300
- `).split(`
301
- `),s="",l="",c=[];for(;a.length>0;){let h=!1,u=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))u.push(a[f]),h=!0;else if(!h)u.push(a[f]);else break;a=a.slice(f);let p=u.join(`
302
- `),g=p.replace(this.rules.other.blockquoteSetextReplace,`
303
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
304
- ${p}`:p,l=l?`${l}
305
- ${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,a.length===0)break;let m=c.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let v=m,C=v.raw+`
306
- `+a.join(`
307
- `),k=this.blockquote(C);c[c.length-1]=k,s=s.substring(0,s.length-v.raw.length)+k.raw,l=l.substring(0,l.length-v.text.length)+k.text;break}else if((m==null?void 0:m.type)==="list"){let v=m,C=v.raw+`
308
- `+a.join(`
309
- `),k=this.list(C);c[c.length-1]=k,s=s.substring(0,s.length-m.raw.length)+k.raw,l=l.substring(0,l.length-v.raw.length)+k.raw,a=C.substring(c.at(-1).raw.length).split(`
310
- `);continue}}return{type:"blockquote",raw:s,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),s=a.length>1,l={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let c=this.rules.other.listItemRegex(a),h=!1;for(;t;){let f=!1,p="",g="";if(!(i=c.exec(t))||this.rules.block.hr.test(t))break;p=i[0],t=t.substring(p.length);let x=i[2].split(`
311
- `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),m=t.split(`
312
- `,1)[0],v=!x.trim(),C=0;if(this.options.pedantic?(C=2,g=x.trimStart()):v?C=i[1].length+1:(C=i[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,g=x.slice(C),C+=i[1].length),v&&this.rules.other.blankLine.test(m)&&(p+=m+`
313
- `,t=t.substring(m.length+1),f=!0),!f){let _=this.rules.other.nextBulletRegex(C),B=this.rules.other.hrRegex(C),O=this.rules.other.fencesBeginRegex(C),D=this.rules.other.headingBeginRegex(C),N=this.rules.other.htmlBeginRegex(C);for(;t;){let H=t.split(`
314
- `,1)[0],R;if(m=H,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),R=m):R=m.replace(this.rules.other.tabCharGlobal," "),O.test(m)||D.test(m)||N.test(m)||_.test(m)||B.test(m))break;if(R.search(this.rules.other.nonSpaceChar)>=C||!m.trim())g+=`
315
- `+R.slice(C);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||O.test(x)||D.test(x)||B.test(x))break;g+=`
316
- `+m}!v&&!m.trim()&&(v=!0),p+=H+`
317
- `,t=t.substring(H.length+1),x=R.slice(C)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let k=null,T;this.options.gfm&&(k=this.rules.other.listIsTask.exec(g),k&&(T=k[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!k,checked:T,loose:!1,text:g,tokens:[]}),l.raw+=p}let u=l.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let f=0;f<l.items.length;f++)if(this.lexer.state.top=!1,l.items[f].tokens=this.lexer.blockTokens(l.items[f].text,[]),!l.loose){let p=l.items[f].tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=g}if(l.loose)for(let f=0;f<l.items.length;f++)l.items[f].loose=!0;return l}}html(t){let i=this.rules.block.html.exec(t);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(t){let i=this.rules.block.def.exec(t);if(i){let a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:i[0],href:s,title:l}}}table(t){var h;let i=this.rules.block.table.exec(t);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let a=f2(i[1]),s=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
318
- `):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(a.length===s.length){for(let u of s)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<a.length;u++)c.header.push({text:a[u],tokens:this.lexer.inline(a[u]),header:!0,align:c.align[u]});for(let u of l)c.rows.push(f2(u,c.header.length).map((f,p)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:c.align[p]})));return c}}lheading(t){let i=this.rules.block.lheading.exec(t);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(t){let i=this.rules.block.paragraph.exec(t);if(i){let a=i[1].charAt(i[1].length-1)===`
319
- `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(t){let i=this.rules.block.text.exec(t);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(t){let i=this.rules.inline.escape.exec(t);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(t){let i=this.rules.inline.tag.exec(t);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(t){let i=this.rules.inline.link.exec(t);if(i){let a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let c=Xo(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=k8(i[2],"()");if(c===-2)return;if(c>-1){let h=(i[0].indexOf("!")===0?5:4)+i[1].length+c;i[2]=i[2].substring(0,c),i[0]=i[0].substring(0,h).trim(),i[3]=""}}let s=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s=s.slice(1):s=s.slice(1,-1)),p2(i,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(t,i){let a;if((a=this.rules.inline.reflink.exec(t))||(a=this.rules.inline.nolink.exec(t))){let s=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[s.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return p2(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!a||this.rules.inline.punctuation.exec(a))){let l=[...s[0]].length-1,c,h,u=l,f=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(s=p.exec(i))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(h=[...c].length,s[3]||s[4]){u+=h;continue}else if((s[5]||s[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(u-=h,u>0)continue;h=Math.min(h,h+u+f);let g=[...s[0]][0].length,x=t.slice(0,l+s.index+g+h);if(Math.min(l,h)%2){let v=x.slice(1,-1);return{type:"em",raw:x,text:v,tokens:this.lexer.inlineTokens(v)}}let m=x.slice(2,-2);return{type:"strong",raw:x,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return s&&l&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(t){let i=this.rules.inline.br.exec(t);if(i)return{type:"br",raw:i[0]}}del(t){let i=this.rules.inline.del.exec(t);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(t){let i=this.rules.inline.autolink.exec(t);if(i){let a,s;return i[2]==="@"?(a=i[1],s="mailto:"+a):(a=i[1],s=a),{type:"link",raw:i[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let i;if(i=this.rules.inline.url.exec(t)){let s,l;if(i[2]==="@")s=i[0],l="mailto:"+s;else{let c;do c=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(c!==i[0]);s=i[0],i[1]==="www."?l="http://"+i[0]:l=i[0]}return{type:"link",raw:i[0],text:s,href:l,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let i=this.rules.inline.text.exec(t);if(i){let a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},Sr=class fm{constructor(t){Lt(this,"tokens");Lt(this,"options");Lt(this,"state");Lt(this,"tokenizer");Lt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||hs,this.options.tokenizer=this.options.tokenizer||new sd,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 i={other:Si,block:cu.normal,inline:Go.normal};this.options.pedantic?(i.block=cu.pedantic,i.inline=Go.pedantic):this.options.gfm&&(i.block=cu.gfm,this.options.breaks?i.inline=Go.breaks:i.inline=Go.gfm),this.tokenizer.rules=i}static get rules(){return{block:cu,inline:Go}}static lex(t,i){return new fm(i).lex(t)}static lexInline(t,i){return new fm(i).inlineTokens(t)}lex(t){t=t.replace(Si.carriageReturn,`
320
- `),this.blockTokens(t,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let a=this.inlineQueue[i];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,i=[],a=!1){var s,l,c;for(this.options.pedantic&&(t=t.replace(Si.tabCharGlobal," ").replace(Si.spaceLine,""));t;){let h;if((l=(s=this.options.extensions)==null?void 0:s.block)!=null&&l.some(f=>(h=f.call({lexer:this},t,i))?(t=t.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(t)){t=t.substring(h.raw.length);let f=i.at(-1);h.raw.length===1&&f!==void 0?f.raw+=`
321
- `:i.push(h);continue}if(h=this.tokenizer.code(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
322
- `)?"":`
323
- `)+h.raw,f.text+=`
324
- `+h.text,this.inlineQueue.at(-1).src=f.text):i.push(h);continue}if(h=this.tokenizer.fences(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
325
- `)?"":`
326
- `)+h.raw,f.text+=`
327
- `+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},i.push(h));continue}if(h=this.tokenizer.table(t)){t=t.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(t)){t=t.substring(h.raw.length),i.push(h);continue}let u=t;if((c=this.options.extensions)!=null&&c.startBlock){let f=1/0,p=t.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=t.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(u))){let f=i.at(-1);a&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
328
- `)?"":`
329
- `)+h.raw,f.text+=`
330
- `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h),a=u.length!==t.length,t=t.substring(h.raw.length);continue}if(h=this.tokenizer.text(t)){t=t.substring(h.raw.length);let f=i.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
331
- `)?"":`
332
- `)+h.raw,f.text+=`
333
- `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,i}inline(t,i=[]){return this.inlineQueue.push({src:t,tokens:i}),i}inlineTokens(t,i=[]){var u,f,p,g,x;let a=t,s=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)m.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((f=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:f.call({lexer:this},a))??a;let c=!1,h="";for(;t;){c||(h=""),c=!1;let m;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(C=>(m=C.call({lexer:this},t,i))?(t=t.substring(m.raw.length),i.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);let C=i.at(-1);m.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=m.raw,C.text+=m.text):i.push(m);continue}if(m=this.tokenizer.emStrong(t,a,h)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.del(t)){t=t.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),i.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),i.push(m);continue}let v=t;if((x=this.options.extensions)!=null&&x.startInline){let C=1/0,k=t.slice(1),T;this.options.extensions.startInline.forEach(_=>{T=_.call({lexer:this},k),typeof T=="number"&&T>=0&&(C=Math.min(C,T))}),C<1/0&&C>=0&&(v=t.substring(0,C+1))}if(m=this.tokenizer.inlineText(v)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(h=m.raw.slice(-1)),c=!0;let C=i.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=m.raw,C.text+=m.text):i.push(m);continue}if(t){let C="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return i}},ld=class{constructor(t){Lt(this,"options");Lt(this,"parser");this.options=t||hs}space(t){return""}code({text:t,lang:i,escaped:a}){var c;let s=(c=(i||"").match(Si.notSpaceStart))==null?void 0:c[0],l=t.replace(Si.endingNewline,"")+`
334
- `;return s?'<pre><code class="language-'+Ur(s)+'">'+(a?l:Ur(l,!0))+`</code></pre>
335
- `:"<pre><code>"+(a?l:Ur(l,!0))+`</code></pre>
336
- `}blockquote({tokens:t}){return`<blockquote>
337
- ${this.parser.parse(t)}</blockquote>
338
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
339
- `}hr(t){return`<hr>
340
- `}list(t){let i=t.ordered,a=t.start,s="";for(let h=0;h<t.items.length;h++){let u=t.items[h];s+=this.listitem(u)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
341
- `+s+"</"+l+`>
342
- `}listitem(t){var a;let i="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((a=t.tokens[0])==null?void 0:a.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Ur(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):i+=s+" "}return i+=this.parser.parse(t.tokens,!!t.loose),`<li>${i}</li>
343
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
344
- `}table(t){let i="",a="";for(let l=0;l<t.header.length;l++)a+=this.tablecell(t.header[l]);i+=this.tablerow({text:a});let s="";for(let l=0;l<t.rows.length;l++){let c=t.rows[l];a="";for(let h=0;h<c.length;h++)a+=this.tablecell(c[h]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
345
- <thead>
346
- `+i+`</thead>
347
- `+s+`</table>
348
- `}tablerow({text:t}){return`<tr>
349
- ${t}</tr>
350
- `}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
351
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ur(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:i,tokens:a}){let s=this.parser.parseInline(a),l=d2(t);if(l===null)return s;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Ur(i)+'"'),c+=">"+s+"</a>",c}image({href:t,title:i,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let l=d2(t);if(l===null)return Ur(a);t=l;let c=`<img src="${t}" alt="${a}"`;return i&&(c+=` title="${Ur(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ur(t.text)}},Uy=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Tr=class pm{constructor(t){Lt(this,"options");Lt(this,"renderer");Lt(this,"textRenderer");this.options=t||hs,this.options.renderer=this.options.renderer||new ld,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Uy}static parse(t,i){return new pm(i).parse(t)}static parseInline(t,i){return new pm(i).parseInline(t)}parse(t,i=!0){var s,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[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)){a+=p||"";continue}}let u=h;switch(u.type){case"space":{a+=this.renderer.space(u);continue}case"hr":{a+=this.renderer.hr(u);continue}case"heading":{a+=this.renderer.heading(u);continue}case"code":{a+=this.renderer.code(u);continue}case"table":{a+=this.renderer.table(u);continue}case"blockquote":{a+=this.renderer.blockquote(u);continue}case"list":{a+=this.renderer.list(u);continue}case"html":{a+=this.renderer.html(u);continue}case"def":{a+=this.renderer.def(u);continue}case"paragraph":{a+=this.renderer.paragraph(u);continue}case"text":{let f=u,p=this.renderer.text(f);for(;c+1<t.length&&t[c+1].type==="text";)f=t[++c],p+=`
352
- `+this.renderer.text(f);i?a+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):a+=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 a}parseInline(t,i=this.renderer){var s,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[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)){a+=f||"";continue}}let u=h;switch(u.type){case"escape":{a+=i.text(u);break}case"html":{a+=i.html(u);break}case"link":{a+=i.link(u);break}case"image":{a+=i.image(u);break}case"strong":{a+=i.strong(u);break}case"em":{a+=i.em(u);break}case"codespan":{a+=i.codespan(u);break}case"br":{a+=i.br(u);break}case"del":{a+=i.del(u);break}case"text":{a+=i.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 a}},mu,nc=(mu=class{constructor(t){Lt(this,"options");Lt(this,"block");this.options=t||hs}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Sr.lex:Sr.lexInline}provideParser(){return this.block?Tr.parse:Tr.parseInline}},Lt(mu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Lt(mu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),mu),T8=class{constructor(...t){Lt(this,"defaults",Dy());Lt(this,"options",this.setOptions);Lt(this,"parse",this.parseMarkdown(!0));Lt(this,"parseInline",this.parseMarkdown(!1));Lt(this,"Parser",Tr);Lt(this,"Renderer",ld);Lt(this,"TextRenderer",Uy);Lt(this,"Lexer",Sr);Lt(this,"Tokenizer",sd);Lt(this,"Hooks",nc);this.use(...t)}walkTokens(t,i){var s,l;let a=[];for(let c of t)switch(a=a.concat(i.call(this,c)),c.type){case"table":{let h=c;for(let u of h.header)a=a.concat(this.walkTokens(u.tokens,i));for(let u of h.rows)for(let f of u)a=a.concat(this.walkTokens(f.tokens,i));break}case"list":{let h=c;a=a.concat(this.walkTokens(h.items,i));break}default:{let h=c;(l=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(u=>{let f=h[u].flat(1/0);a=a.concat(this.walkTokens(f,i))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,i)))}}return a}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let c=i.renderers[l.name];c?i.renderers[l.name]=function(...h){let u=l.renderer.apply(this,h);return u===!1&&(u=c.apply(this,h)),u}:i.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=i[l.level];c?c.unshift(l.tokenizer):i[l.level]=[l.tokenizer],l.start&&(l.level==="block"?i.startBlock?i.startBlock.push(l.start):i.startBlock=[l.start]:l.level==="inline"&&(i.startInline?i.startInline.push(l.start):i.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(i.childTokens[l.name]=l.childTokens)}),s.extensions=i),a.renderer){let l=this.defaults.renderer||new ld(this.defaults);for(let c in a.renderer){if(!(c in l))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let h=c,u=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}s.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new sd(this.defaults);for(let c in a.tokenizer){if(!(c in l))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let h=c,u=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new nc;for(let c in a.hooks){if(!(c in l))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let h=c,u=a.hooks[h],f=l[h];nc.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&nc.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await u.call(l,p);return f.call(l,x)})();let g=u.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await u.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=u.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}s.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;s.walkTokens=function(h){let u=[];return u.push(c.call(this,h)),l&&(u=u.concat(l.call(this,h))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return Sr.lex(t,i??this.defaults)}parser(t,i){return Tr.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let s={...a},l={...this.defaults,...s},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&s.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 i>"u"||i===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let h=l.hooks?await l.hooks.preprocess(i):i,u=await(l.hooks?await l.hooks.provideLexer():t?Sr.lex:Sr.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(u):u;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser():t?Tr.parse:Tr.parseInline)(f,l);return l.hooks?await l.hooks.postprocess(p):p})().catch(c);try{l.hooks&&(i=l.hooks.preprocess(i));let h=(l.hooks?l.hooks.provideLexer():t?Sr.lex:Sr.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let u=(l.hooks?l.hooks.provideParser():t?Tr.parse:Tr.parseInline)(h,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
353
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ur(a.message+"",!0)+"</pre>";return i?Promise.resolve(s):s}if(i)return Promise.reject(a);throw a}}},ss=new T8;function fe(e,t){return ss.parse(e,t)}fe.options=fe.setOptions=function(e){return ss.setOptions(e),fe.defaults=ss.defaults,YT(fe.defaults),fe};fe.getDefaults=Dy;fe.defaults=hs;fe.use=function(...e){return ss.use(...e),fe.defaults=ss.defaults,YT(fe.defaults),fe};fe.walkTokens=function(e,t){return ss.walkTokens(e,t)};fe.parseInline=ss.parseInline;fe.Parser=Tr;fe.parser=Tr.parse;fe.Renderer=ld;fe.TextRenderer=Uy;fe.Lexer=Sr;fe.lexer=Sr.lex;fe.Tokenizer=sd;fe.Hooks=nc;fe.parse=fe;fe.options;fe.setOptions;fe.use;fe.walkTokens;fe.parseInline;Tr.parse;Sr.lex;function rw(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var a=Array.from(typeof e=="string"?[e]:e);a[a.length-1]=a[a.length-1].replace(/\r?\n([\t ]*)$/,"");var s=a.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(s.length){var l=new RegExp(`
354
- [ ]{`+Math.min.apply(Math,s)+"}","g");a=a.map(function(h){return h.replace(l,`
355
- `)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return t.forEach(function(h,u){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
356
- `)&&(g=String(h).split(`
357
- `).map(function(x,m){return m===0?x:""+p+x}).join(`
358
- `)),c+=g+a[u+1]}),c}var w8={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},gm=new Map,aw=new Map,_8=S(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(mt.debug("Registering icon pack:",t.name),"loader"in t)aw.set(t.name,t.loader);else if("icons"in t)gm.set(t.name,t.icons);else throw mt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),nw=S(async(e,t)=>{const i=B$(e,!0,t!==void 0);if(!i)throw new Error(`Invalid icon name: ${e}`);const a=i.prefix||t;if(!a)throw new Error(`Icon name must contain a prefix: ${e}`);let s=gm.get(a);if(!s){const c=aw.get(a);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{s={...await c(),prefix:a},gm.set(a,s)}catch(h){throw mt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const l=A$(s,i.name);if(!l)throw new Error(`Icon not found: ${e}`);return l},"getRegisteredIconData"),B8=S(async e=>{try{return await nw(e),!0}catch{return!1}},"isIconAvailable"),zc=S(async(e,t,i)=>{let a;try{a=await nw(e,t==null?void 0:t.fallbackPrefix)}catch(c){mt.error(c),a=w8}const s=z$(a,t),l=H$(I$(s.body),{...s.attributes,...i});return Mr(l,Le())},"getIconSVG");function sw(e,{markdownAutoWrap:t}){const a=e.replace(/<br\/>/g,`
359
- `).replace(/\n{2,}/g,`
360
- `);return rw(a)}S(sw,"preprocessMarkdown");function lw(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var i;return((i=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:i.map(a=>({content:a,type:"normal"})))??[]})}S(lw,"nonMarkdownToLines");function ow(e,t={}){const i=sw(e,t),a=fe.lexer(i),s=[[]];let l=0;function c(h,u="normal"){h.type==="text"?h.text.split(`
361
- `).forEach((p,g)=>{g!==0&&(l++,s.push([])),p.split(" ").forEach(x=>{x=x.replace(/&#39;/g,"'"),x&&s[l].push({content:x,type:u})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&s[l].push({content:h.text,type:"normal"})}return S(c,"processNode"),a.forEach(h=>{var u;h.type==="paragraph"?(u=h.tokens)==null||u.forEach(f=>{c(f)}):h.type==="html"?s[l].push({content:h.text,type:"normal"}):s[l].push({content:h.raw,type:"normal"})}),s}S(ow,"markdownToLines");function cw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}S(cw,"nonMarkdownToHTML");function hw(e,{markdownAutoWrap:t}={}){const i=fe.lexer(e);function a(s){var l,c,h;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(l=s.tokens)==null?void 0:l.map(a).join("")}</strong>`:s.type==="em"?`<em>${(c=s.tokens)==null?void 0:c.map(a).join("")}</em>`:s.type==="paragraph"?`<p>${(h=s.tokens)==null?void 0:h.map(a).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(mt.warn(`Unsupported markdown: ${s.type}`),s.raw)}return S(a,"output"),i.map(a).join("")}S(hw,"markdownToHTML");function uw(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}S(uw,"splitTextToChars");function dw(e,t){const i=uw(t.content);return Py(e,[],i,t.type)}S(dw,"splitWordToFitWidth");function Py(e,t,i,a){if(i.length===0)return[{content:t.join(""),type:a},{content:"",type:a}];const[s,...l]=i,c=[...t,s];return e([{content:c.join(""),type:a}])?Py(e,c,l,a):(t.length===0&&s&&(t.push(s),i.shift()),[{content:t.join(""),type:a},{content:i.join(""),type:a}])}S(Py,"splitWordToFitWidthRecursion");function fw(e,t){if(e.some(({content:i})=>i.includes(`
362
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return od(e,t)}S(fw,"splitLineToFitWidth");function od(e,t,i=[],a=[]){if(e.length===0)return a.length>0&&i.push(a),i.length>0?i:[];let s="";e[0].content===" "&&(s=" ",e.shift());const l=e.shift()??{content:" ",type:"normal"},c=[...a];if(s!==""&&c.push({content:s,type:"normal"}),c.push(l),t(c))return od(e,t,i,c);if(a.length>0)i.push(a),e.unshift(l);else if(l.content){const[h,u]=dw(t,l);i.push([h]),u.content&&e.unshift(u)}return od(e,t,i)}S(od,"splitLineToFitWidthRecursion");function mm(e,t){t&&e.attr("style",t)}S(mm,"applyStyle");var g2=16384;async function pw(e,t,i,a,s=!1,l=Le()){const c=e.append("foreignObject");c.attr("width",`${Math.min(10*i,g2)}px`),c.attr("height",`${Math.min(10*i,g2)}px`);const h=c.append("xhtml:div"),u=gc(t.label)?await Xv(t.label.replace(Mc.lineBreakRegex,`
363
- `),l):Mr(t.label,l),f=t.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(u),mm(p,t.labelStyle),p.attr("class",`${f} ${a}`),mm(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY&&(h.style("max-width",i+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&h.attr("class","labelBkg");let g=h.node().getBoundingClientRect();return g.width===i&&(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",i+"px"),g=h.node().getBoundingClientRect()),c.node()}S(pw,"addHtmlSpan");function Od(e,t,i,a=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*i-.1+"em").attr("dy",i+"em");return a&&s.attr("text-anchor","middle"),s}S(Od,"createTspan");function gw(e,t,i){const a=e.append("text"),s=Od(a,1,t);Fd(s,i);const l=s.node().getComputedTextLength();return a.remove(),l}S(gw,"computeWidthOfText");function E8(e,t,i){var c;const a=e.append("text"),s=Od(a,1,t);Fd(s,[{content:i,type:"normal"}]);const l=(c=s.node())==null?void 0:c.getBoundingClientRect();return l&&a.remove(),l}S(E8,"computeDimensionOfText");function mw(e,t,i,a=!1,s=!1){const c=t.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),u=c.append("text").attr("y","-10.1");s&&u.attr("text-anchor","middle");let f=0;for(const p of i){const g=S(m=>gw(c,1.1,m)<=e,"checkWidth"),x=g(p)?[p]:fw(p,g);for(const m of x){const v=Od(u,f,1.1,s);Fd(v,m),f++}}if(a){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()}S(mw,"createFormattedText");function ym(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(i,a)=>{switch(a){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}S(ym,"decodeHTMLEntities");function Fd(e,t){e.text(""),t.forEach((i,a)=>{const s=e.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");a===0?s.text(ym(i.content)):s.text(" "+ym(i.content))})}S(Fd,"updateTextContentAndStyles");async function yw(e,t={}){const i=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,l,c)=>(i.push((async()=>{const h=`${l}:${c}`;return await B8(h)?await zc(h,void 0,{class:"label-icon"}):`<i class='${Mr(s,t).replace(":"," ")}'></i>`})()),s));const a=await Promise.all(i);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}S(yw,"replaceIconSubstring");var La=S(async(e,t="",{style:i="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:f=!1}={},p)=>{if(mt.debug("XYZ createText",t,i,a,s,l,h,"addSvgBackground: ",f),l){const g=c?hw(t,p):cw(t),x=await yw(ns(g),p),m=t.replace(/\\\\/g,"\\"),v={isNode:h,label:gc(t)?m:x,labelStyle:i.replace("fill:","color:")};return await pw(e,v,u,s,f,p)}else{const g=ns(t.replace(/<br\s*\/?>/g,"<br/>")),x=c?ow(g.replace("<br>","<br/>"),p):lw(g),m=mw(u,e,x,t?f:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(m).attr("style",v)}else{const v=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Xt(m).select("rect").attr("style",v.replace(/background:/g,"fill:"));const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Xt(m).select("text").attr("style",C)}return a?Xt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Xt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText");function pg(e,t,i){if(e&&e.length){const[a,s]=t,l=Math.PI/180*i,c=Math.cos(l),h=Math.sin(l);for(const u of e){const[f,p]=u;u[0]=(f-a)*c-(p-s)*h+a,u[1]=(f-a)*h+(p-s)*c+s}}}function L8(e,t){return e[0]===t[0]&&e[1]===t[1]}function A8(e,t,i,a=1){const s=i,l=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,h=[0,0];if(s)for(const f of c)pg(f,h,s);const u=(function(f,p,g){const x=[];for(const _ of f){const B=[..._];L8(B[0],B[B.length-1])||B.push([B[0][0],B[0][1]]),B.length>2&&x.push(B)}const m=[];p=Math.max(p,.1);const v=[];for(const _ of x)for(let B=0;B<_.length-1;B++){const O=_[B],D=_[B+1];if(O[1]!==D[1]){const N=Math.min(O[1],D[1]);v.push({ymin:N,ymax:Math.max(O[1],D[1]),x:N===O[1]?O[0]:D[0],islope:(D[0]-O[0])/(D[1]-O[1])})}}if(v.sort(((_,B)=>_.ymin<B.ymin?-1:_.ymin>B.ymin?1:_.x<B.x?-1:_.x>B.x?1:_.ymax===B.ymax?0:(_.ymax-B.ymax)/Math.abs(_.ymax-B.ymax))),!v.length)return m;let C=[],k=v[0].ymin,T=0;for(;C.length||v.length;){if(v.length){let _=-1;for(let B=0;B<v.length&&!(v[B].ymin>k);B++)_=B;v.splice(0,_+1).forEach((B=>{C.push({s:k,edge:B})}))}if(C=C.filter((_=>!(_.edge.ymax<=k))),C.sort(((_,B)=>_.edge.x===B.edge.x?0:(_.edge.x-B.edge.x)/Math.abs(_.edge.x-B.edge.x))),(g!==1||T%p==0)&&C.length>1)for(let _=0;_<C.length;_+=2){const B=_+1;if(B>=C.length)break;const O=C[_].edge,D=C[B].edge;m.push([[Math.round(O.x),k],[Math.round(D.x),k]])}k+=g,C.forEach((_=>{_.edge.x=_.edge.x+g*_.edge.islope})),T++}return m})(c,l,a);if(s){for(const f of c)pg(f,h,-s);(function(f,p,g){const x=[];f.forEach((m=>x.push(...m))),pg(x,p,g)})(u,h,-s)}return u}function Nc(e,t){var i;const a=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let l=1;return t.roughness>=1&&(((i=t.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(l=s),A8(e,s,a,l||1)}class Wy{constructor(t){this.helper=t}fillPolygons(t,i){return this._fillPolygons(t,i)}_fillPolygons(t,i){const a=Nc(t,i);return{type:"fillSketch",ops:this.renderLines(a,i)}}renderLines(t,i){const a=[];for(const s of t)a.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],i));return a}}function Dd(e){const t=e[0],i=e[1];return Math.sqrt(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2))}class M8 extends Wy{fillPolygons(t,i){let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);const s=Nc(t,Object.assign({},i,{hachureGap:a})),l=Math.PI/180*i.hachureAngle,c=[],h=.5*a*Math.cos(l),u=.5*a*Math.sin(l);for(const[f,p]of s)Dd([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,i)}}}class R8 extends Wy{fillPolygons(t,i){const a=this._fillPolygons(t,i),s=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),l=this._fillPolygons(t,s);return a.ops=a.ops.concat(l.ops),a}}class O8{constructor(t){this.helper=t}fillPolygons(t,i){const a=Nc(t,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(a,i)}dotsOnLines(t,i){const a=[];let s=i.hachureGap;s<0&&(s=4*i.strokeWidth),s=Math.max(s,.1);let l=i.fillWeight;l<0&&(l=i.strokeWidth/2);const c=s/4;for(const h of t){const u=Dd(h),f=u/s,p=Math.ceil(f)-1,g=u-p*s,x=(h[0][0]+h[1][0])/2-s/4,m=Math.min(h[0][1],h[1][1]);for(let v=0;v<p;v++){const C=m+g+v*s,k=x-c+2*Math.random()*c,T=C-c+2*Math.random()*c,_=this.helper.ellipse(k,T,l,l,i);a.push(..._.ops)}}return{type:"fillSketch",ops:a}}}class F8{constructor(t){this.helper=t}fillPolygons(t,i){const a=Nc(t,i);return{type:"fillSketch",ops:this.dashedLine(a,i)}}dashedLine(t,i){const a=i.dashOffset<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashOffset,s=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,l=[];return t.forEach((c=>{const h=Dd(c),u=Math.floor(h/(a+s)),f=(h+s-u*(a+s))/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 m=0;m<u;m++){const v=m*(a+s),C=v+a,k=[p[0]+v*Math.cos(x)+f*Math.cos(x),p[1]+v*Math.sin(x)+f*Math.sin(x)],T=[p[0]+C*Math.cos(x)+f*Math.cos(x),p[1]+C*Math.sin(x)+f*Math.sin(x)];l.push(...this.helper.doubleLineOps(k[0],k[1],T[0],T[1],i))}})),l}}class D8{constructor(t){this.helper=t}fillPolygons(t,i){const a=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,s=i.zigzagOffset<0?a:i.zigzagOffset,l=Nc(t,i=Object.assign({},i,{hachureGap:a+s}));return{type:"fillSketch",ops:this.zigzagLines(l,s,i)}}zigzagLines(t,i,a){const s=[];return t.forEach((l=>{const c=Dd(l),h=Math.round(c/(2*i));let u=l[0],f=l[1];u[0]>f[0]&&(u=l[1],f=l[0]);const p=Math.atan((f[1]-u[1])/(f[0]-u[0]));for(let g=0;g<h;g++){const x=2*g*i,m=2*(g+1)*i,v=Math.sqrt(2*Math.pow(i,2)),C=[u[0]+x*Math.cos(p),u[1]+x*Math.sin(p)],k=[u[0]+m*Math.cos(p),u[1]+m*Math.sin(p)],T=[C[0]+v*Math.cos(p+Math.PI/4),C[1]+v*Math.sin(p+Math.PI/4)];s.push(...this.helper.doubleLineOps(C[0],C[1],T[0],T[1],a),...this.helper.doubleLineOps(T[0],T[1],k[0],k[1],a))}})),s}}const Fi={};class $8{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const z8=0,gg=1,m2=2,hu={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 mg(e,t){return e.type===t}function Yy(e){const t=[],i=(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:z8,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:gg,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:m2,text:""},h})(e);let a="BOD",s=0,l=i[s];for(;!mg(l,m2);){let c=0;const h=[];if(a==="BOD"){if(l.text!=="M"&&l.text!=="m")return Yy("M0,0"+e);s++,c=hu[l.text],a=l.text}else mg(l,gg)?c=hu[a]:(s++,c=hu[l.text],a=l.text);if(!(s+c<i.length))throw new Error("Path data ended short");for(let u=s;u<s+c;u++){const f=i[u];if(!mg(f,gg))throw new Error("Param not a number: "+a+","+f.text);h[h.length]=+f.text}if(typeof hu[a]!="number")throw new Error("Bad segment: "+a);{const u={key:a,data:h};t.push(u),s+=c,l=i[s],a==="M"&&(a="L"),a==="m"&&(a="l")}}return t}function xw(e){let t=0,i=0,a=0,s=0;const l=[];for(const{key:c,data:h}of e)switch(c){case"M":l.push({key:"M",data:[...h]}),[t,i]=h,[a,s]=h;break;case"m":t+=h[0],i+=h[1],l.push({key:"M",data:[t,i]}),a=t,s=i;break;case"L":l.push({key:"L",data:[...h]}),[t,i]=h;break;case"l":t+=h[0],i+=h[1],l.push({key:"L",data:[t,i]});break;case"C":l.push({key:"C",data:[...h]}),t=h[4],i=h[5];break;case"c":{const u=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"C",data:u}),t=u[4],i=u[5];break}case"Q":l.push({key:"Q",data:[...h]}),t=h[2],i=h[3];break;case"q":{const u=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"Q",data:u}),t=u[2],i=u[3];break}case"A":l.push({key:"A",data:[...h]}),t=h[5],i=h[6];break;case"a":t+=h[5],i+=h[6],l.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,i]});break;case"H":l.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],l.push({key:"H",data:[t]});break;case"V":l.push({key:"V",data:[...h]}),i=h[0];break;case"v":i+=h[0],l.push({key:"V",data:[i]});break;case"S":l.push({key:"S",data:[...h]}),t=h[2],i=h[3];break;case"s":{const u=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"S",data:u}),t=u[2],i=u[3];break}case"T":l.push({key:"T",data:[...h]}),t=h[0],i=h[1];break;case"t":t+=h[0],i+=h[1],l.push({key:"T",data:[t,i]});break;case"Z":case"z":l.push({key:"Z",data:[]}),t=a,i=s}return l}function bw(e){const t=[];let i="",a=0,s=0,l=0,c=0,h=0,u=0;for(const{key:f,data:p}of e){switch(f){case"M":t.push({key:"M",data:[...p]}),[a,s]=p,[l,c]=p;break;case"C":t.push({key:"C",data:[...p]}),a=p[4],s=p[5],h=p[2],u=p[3];break;case"L":t.push({key:"L",data:[...p]}),[a,s]=p;break;case"H":a=p[0],t.push({key:"L",data:[a,s]});break;case"V":s=p[0],t.push({key:"L",data:[a,s]});break;case"S":{let g=0,x=0;i==="C"||i==="S"?(g=a+(a-h),x=s+(s-u)):(g=a,x=s),t.push({key:"C",data:[g,x,...p]}),h=p[0],u=p[1],a=p[2],s=p[3];break}case"T":{const[g,x]=p;let m=0,v=0;i==="Q"||i==="T"?(m=a+(a-h),v=s+(s-u)):(m=a,v=s);const C=a+2*(m-a)/3,k=s+2*(v-s)/3,T=g+2*(m-g)/3,_=x+2*(v-x)/3;t.push({key:"C",data:[C,k,T,_,g,x]}),h=m,u=v,a=g,s=x;break}case"Q":{const[g,x,m,v]=p,C=a+2*(g-a)/3,k=s+2*(x-s)/3,T=m+2*(g-m)/3,_=v+2*(x-v)/3;t.push({key:"C",data:[C,k,T,_,m,v]}),h=g,u=x,a=m,s=v;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),m=p[2],v=p[3],C=p[4],k=p[5],T=p[6];g===0||x===0?(t.push({key:"C",data:[a,s,k,T,k,T]}),a=k,s=T):(a!==k||s!==T)&&(Cw(a,s,k,T,g,x,m,v,C).forEach((function(_){t.push({key:"C",data:_})})),a=k,s=T);break}case"Z":t.push({key:"Z",data:[]}),a=l,s=c}i=f}return t}function Vo(e,t,i){return[e*Math.cos(i)-t*Math.sin(i),e*Math.sin(i)+t*Math.cos(i)]}function Cw(e,t,i,a,s,l,c,h,u,f){const p=(g=c,Math.PI*g/180);var g;let x=[],m=0,v=0,C=0,k=0;if(f)[m,v,C,k]=f;else{[e,t]=Vo(e,t,-p),[i,a]=Vo(i,a,-p);const tt=(e-i)/2,X=(t-a)/2;let Y=tt*tt/(s*s)+X*X/(l*l);Y>1&&(Y=Math.sqrt(Y),s*=Y,l*=Y);const M=s*s,I=l*l,$=M*I-M*X*X-I*tt*tt,F=M*X*X+I*tt*tt,Q=(h===u?-1:1)*Math.sqrt(Math.abs($/F));C=Q*s*X/l+(e+i)/2,k=Q*-l*tt/s+(t+a)/2,m=Math.asin(parseFloat(((t-k)/l).toFixed(9))),v=Math.asin(parseFloat(((a-k)/l).toFixed(9))),e<C&&(m=Math.PI-m),i<C&&(v=Math.PI-v),m<0&&(m=2*Math.PI+m),v<0&&(v=2*Math.PI+v),u&&m>v&&(m-=2*Math.PI),!u&&v>m&&(v-=2*Math.PI)}let T=v-m;if(Math.abs(T)>120*Math.PI/180){const tt=v,X=i,Y=a;v=u&&v>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,x=Cw(i=C+s*Math.cos(v),a=k+l*Math.sin(v),X,Y,s,l,c,0,u,[v,tt,C,k])}T=v-m;const _=Math.cos(m),B=Math.sin(m),O=Math.cos(v),D=Math.sin(v),N=Math.tan(T/4),H=4/3*s*N,R=4/3*l*N,Z=[e,t],P=[e+H*B,t-R*_],W=[i+H*D,a-R*O],et=[i,a];if(P[0]=2*Z[0]-P[0],P[1]=2*Z[1]-P[1],f)return[P,W,et].concat(x);{x=[P,W,et].concat(x);const tt=[];for(let X=0;X<x.length;X+=3){const Y=Vo(x[X][0],x[X][1],p),M=Vo(x[X+1][0],x[X+1][1],p),I=Vo(x[X+2][0],x[X+2][1],p);tt.push([Y[0],Y[1],M[0],M[1],I[0],I[1]])}return tt}}const N8={randOffset:function(e,t){return Nt(e,t)},randOffsetWithRange:function(e,t,i){return cd(e,t,i)},ellipse:function(e,t,i,a,s){const l=kw(i,a,s);return xm(e,t,s,l).opset},doubleLineOps:function(e,t,i,a,s){return kn(e,t,i,a,s,!0)}};function vw(e,t,i,a,s){return{type:"path",ops:kn(e,t,i,a,s)}}function Lu(e,t,i){const a=(e||[]).length;if(a>2){const s=[];for(let l=0;l<a-1;l++)s.push(...kn(e[l][0],e[l][1],e[l+1][0],e[l+1][1],i));return t&&s.push(...kn(e[a-1][0],e[a-1][1],e[0][0],e[0][1],i)),{type:"path",ops:s}}return a===2?vw(e[0][0],e[0][1],e[1][0],e[1][1],i):{type:"path",ops:[]}}function q8(e,t,i,a,s){return(function(l,c){return Lu(l,!0,c)})([[e,t],[e+i,t],[e+i,t+a],[e,t+a]],s)}function y2(e,t){if(e.length){const i=typeof e[0][0]=="number"?[e]:e,a=uu(i[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:uu(i[0],1.5*(1+.22*t.roughness),C2(t));for(let l=1;l<i.length;l++){const c=i[l];if(c.length){const h=uu(c,1*(1+.2*t.roughness),t),u=t.disableMultiStroke?[]:uu(c,1.5*(1+.22*t.roughness),C2(t));for(const f of h)f.op!=="move"&&a.push(f);for(const f of u)f.op!=="move"&&s.push(f)}}return{type:"path",ops:a.concat(s)}}return{type:"path",ops:[]}}function kw(e,t,i){const a=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*a)),l=2*Math.PI/s;let c=Math.abs(e/2),h=Math.abs(t/2);const u=1-i.curveFitting;return c+=Nt(c*u,i),h+=Nt(h*u,i),{increment:l,rx:c,ry:h}}function xm(e,t,i,a){const[s,l]=v2(a.increment,e,t,a.rx,a.ry,1,a.increment*cd(.1,cd(.4,1,i),i),i);let c=hd(s,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=v2(a.increment,e,t,a.rx,a.ry,1.5,0,i),u=hd(h,null,i);c=c.concat(u)}return{estimatedPoints:l,opset:{type:"path",ops:c}}}function x2(e,t,i,a,s,l,c,h,u){const f=e,p=t;let g=Math.abs(i/2),x=Math.abs(a/2);g+=Nt(.01*g,u),x+=Nt(.01*x,u);let m=s,v=l;for(;m<0;)m+=2*Math.PI,v+=2*Math.PI;v-m>2*Math.PI&&(m=0,v=2*Math.PI);const C=2*Math.PI/u.curveStepCount,k=Math.min(C/2,(v-m)/2),T=k2(k,f,p,g,x,m,v,1,u);if(!u.disableMultiStroke){const _=k2(k,f,p,g,x,m,v,1.5,u);T.push(..._)}return c&&(h?T.push(...kn(f,p,f+g*Math.cos(m),p+x*Math.sin(m),u),...kn(f,p,f+g*Math.cos(v),p+x*Math.sin(v),u)):T.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(m),p+x*Math.sin(m)]})),{type:"path",ops:T}}function b2(e,t){const i=bw(xw(Yy(e))),a=[];let s=[0,0],l=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":l=[h[0],h[1]],s=[h[0],h[1]];break;case"L":a.push(...kn(l[0],l[1],h[0],h[1],t)),l=[h[0],h[1]];break;case"C":{const[u,f,p,g,x,m]=h;a.push(...I8(u,f,p,g,x,m,l,t)),l=[x,m];break}case"Z":a.push(...kn(l[0],l[1],s[0],s[1],t)),l=[s[0],s[1]]}return{type:"path",ops:a}}function yg(e,t){const i=[];for(const a of e)if(a.length){const s=t.maxRandomnessOffset||0,l=a.length;if(l>2){i.push({op:"move",data:[a[0][0]+Nt(s,t),a[0][1]+Nt(s,t)]});for(let c=1;c<l;c++)i.push({op:"lineTo",data:[a[c][0]+Nt(s,t),a[c][1]+Nt(s,t)]})}}return{type:"fillPath",ops:i}}function al(e,t){return(function(i,a){let s=i.fillStyle||"hachure";if(!Fi[s])switch(s){case"zigzag":Fi[s]||(Fi[s]=new M8(a));break;case"cross-hatch":Fi[s]||(Fi[s]=new R8(a));break;case"dots":Fi[s]||(Fi[s]=new O8(a));break;case"dashed":Fi[s]||(Fi[s]=new F8(a));break;case"zigzag-line":Fi[s]||(Fi[s]=new D8(a));break;default:s="hachure",Fi[s]||(Fi[s]=new Wy(a))}return Fi[s]})(t,N8).fillPolygons(e,t)}function C2(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sw(e){return e.randomizer||(e.randomizer=new $8(e.seed||0)),e.randomizer.next()}function cd(e,t,i,a=1){return i.roughness*a*(Sw(i)*(t-e)+e)}function Nt(e,t,i=1){return cd(-e,e,t,i)}function kn(e,t,i,a,s,l=!1){const c=l?s.disableMultiStrokeFill:s.disableMultiStroke,h=bm(e,t,i,a,s,!0,!1);if(c)return h;const u=bm(e,t,i,a,s,!0,!0);return h.concat(u)}function bm(e,t,i,a,s,l,c){const h=Math.pow(e-i,2)+Math.pow(t-a,2),u=Math.sqrt(h);let f=1;f=u<200?1:u>500?.4:-.0016668*u+1.233334;let p=s.maxRandomnessOffset||0;p*p*100>h&&(p=u/10);const g=p/2,x=.2+.2*Sw(s);let m=s.bowing*s.maxRandomnessOffset*(a-t)/200,v=s.bowing*s.maxRandomnessOffset*(e-i)/200;m=Nt(m,s,f),v=Nt(v,s,f);const C=[],k=()=>Nt(g,s,f),T=()=>Nt(p,s,f),_=s.preserveVertices;return c?C.push({op:"move",data:[e+(_?0:k()),t+(_?0:k())]}):C.push({op:"move",data:[e+(_?0:Nt(p,s,f)),t+(_?0:Nt(p,s,f))]}),c?C.push({op:"bcurveTo",data:[m+e+(i-e)*x+k(),v+t+(a-t)*x+k(),m+e+2*(i-e)*x+k(),v+t+2*(a-t)*x+k(),i+(_?0:k()),a+(_?0:k())]}):C.push({op:"bcurveTo",data:[m+e+(i-e)*x+T(),v+t+(a-t)*x+T(),m+e+2*(i-e)*x+T(),v+t+2*(a-t)*x+T(),i+(_?0:T()),a+(_?0:T())]}),C}function uu(e,t,i){if(!e.length)return[];const a=[];a.push([e[0][0]+Nt(t,i),e[0][1]+Nt(t,i)]),a.push([e[0][0]+Nt(t,i),e[0][1]+Nt(t,i)]);for(let s=1;s<e.length;s++)a.push([e[s][0]+Nt(t,i),e[s][1]+Nt(t,i)]),s===e.length-1&&a.push([e[s][0]+Nt(t,i),e[s][1]+Nt(t,i)]);return hd(a,null,i)}function hd(e,t,i){const a=e.length,s=[];if(a>3){const l=[],c=1-i.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let h=1;h+2<a;h++){const u=e[h];l[0]=[u[0],u[1]],l[1]=[u[0]+(c*e[h+1][0]-c*e[h-1][0])/6,u[1]+(c*e[h+1][1]-c*e[h-1][1])/6],l[2]=[e[h+1][0]+(c*e[h][0]-c*e[h+2][0])/6,e[h+1][1]+(c*e[h][1]-c*e[h+2][1])/6],l[3]=[e[h+1][0],e[h+1][1]],s.push({op:"bcurveTo",data:[l[1][0],l[1][1],l[2][0],l[2][1],l[3][0],l[3][1]]})}}else a===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):a===2&&s.push(...bm(e[0][0],e[0][1],e[1][0],e[1][1],i,!0,!0));return s}function v2(e,t,i,a,s,l,c,h){const u=[],f=[];if(h.roughness===0){e/=4,f.push([t+a*Math.cos(-e),i+s*Math.sin(-e)]);for(let p=0;p<=2*Math.PI;p+=e){const g=[t+a*Math.cos(p),i+s*Math.sin(p)];u.push(g),f.push(g)}f.push([t+a*Math.cos(0),i+s*Math.sin(0)]),f.push([t+a*Math.cos(e),i+s*Math.sin(e)])}else{const p=Nt(.5,h)-Math.PI/2;f.push([Nt(l,h)+t+.9*a*Math.cos(p-e),Nt(l,h)+i+.9*s*Math.sin(p-e)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=e){const m=[Nt(l,h)+t+a*Math.cos(x),Nt(l,h)+i+s*Math.sin(x)];u.push(m),f.push(m)}f.push([Nt(l,h)+t+a*Math.cos(p+2*Math.PI+.5*c),Nt(l,h)+i+s*Math.sin(p+2*Math.PI+.5*c)]),f.push([Nt(l,h)+t+.98*a*Math.cos(p+c),Nt(l,h)+i+.98*s*Math.sin(p+c)]),f.push([Nt(l,h)+t+.9*a*Math.cos(p+.5*c),Nt(l,h)+i+.9*s*Math.sin(p+.5*c)])}return[f,u]}function k2(e,t,i,a,s,l,c,h,u){const f=l+Nt(.1,u),p=[];p.push([Nt(h,u)+t+.9*a*Math.cos(f-e),Nt(h,u)+i+.9*s*Math.sin(f-e)]);for(let g=f;g<=c;g+=e)p.push([Nt(h,u)+t+a*Math.cos(g),Nt(h,u)+i+s*Math.sin(g)]);return p.push([t+a*Math.cos(c),i+s*Math.sin(c)]),p.push([t+a*Math.cos(c),i+s*Math.sin(c)]),hd(p,null,u)}function I8(e,t,i,a,s,l,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 m=0;m<g;m++)m===0?u.push({op:"move",data:[c[0],c[1]]}):u.push({op:"move",data:[c[0]+(x?0:Nt(f[0],h)),c[1]+(x?0:Nt(f[0],h))]}),p=x?[s,l]:[s+Nt(f[m],h),l+Nt(f[m],h)],u.push({op:"bcurveTo",data:[e+Nt(f[m],h),t+Nt(f[m],h),i+Nt(f[m],h),a+Nt(f[m],h),p[0],p[1]]});return u}function Zo(e){return[...e]}function S2(e,t=0){const i=e.length;if(i<3)throw new Error("A curve must have at least three points.");const a=[];if(i===3)a.push(Zo(e[0]),Zo(e[1]),Zo(e[2]),Zo(e[2]));else{const s=[];s.push(e[0],e[0]);for(let h=1;h<e.length;h++)s.push(e[h]),h===e.length-1&&s.push(e[h]);const l=[],c=1-t;a.push(Zo(s[0]));for(let h=1;h+2<s.length;h++){const u=s[h];l[0]=[u[0],u[1]],l[1]=[u[0]+(c*s[h+1][0]-c*s[h-1][0])/6,u[1]+(c*s[h+1][1]-c*s[h-1][1])/6],l[2]=[s[h+1][0]+(c*s[h][0]-c*s[h+2][0])/6,s[h+1][1]+(c*s[h][1]-c*s[h+2][1])/6],l[3]=[s[h+1][0],s[h+1][1]],a.push(l[1],l[2],l[3])}}return a}function Au(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function H8(e,t,i){const a=Au(t,i);if(a===0)return Au(e,t);let s=((e[0]-t[0])*(i[0]-t[0])+(e[1]-t[1])*(i[1]-t[1]))/a;return s=Math.max(0,Math.min(1,s)),Au(e,Yn(t,i,s))}function Yn(e,t,i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i]}function Cm(e,t,i,a){const s=a||[];if((function(h,u){const f=h[u+0],p=h[u+1],g=h[u+2],x=h[u+3];let m=3*p[0]-2*f[0]-x[0];m*=m;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 k=3*g[1]-2*x[1]-f[1];return k*=k,m<C&&(m=C),v<k&&(v=k),m+v})(e,t)<i){const h=e[t+0];s.length?(l=s[s.length-1],c=h,Math.sqrt(Au(l,c))>1&&s.push(h)):s.push(h),s.push(e[t+3])}else{const u=e[t+0],f=e[t+1],p=e[t+2],g=e[t+3],x=Yn(u,f,.5),m=Yn(f,p,.5),v=Yn(p,g,.5),C=Yn(x,m,.5),k=Yn(m,v,.5),T=Yn(C,k,.5);Cm([u,x,C,T],0,i,s),Cm([T,k,v,g],0,i,s)}var l,c;return s}function j8(e,t){return ud(e,0,e.length,t)}function ud(e,t,i,a,s){const l=s||[],c=e[t],h=e[i-1];let u=0,f=1;for(let p=t+1;p<i-1;++p){const g=H8(e[p],c,h);g>u&&(u=g,f=p)}return Math.sqrt(u)>a?(ud(e,t,f+1,a,l),ud(e,f,i,a,l)):(l.length||l.push(c),l.push(h)),l}function xg(e,t=.15,i){const a=[],s=(e.length-1)/3;for(let l=0;l<s;l++)Cm(e,3*l,t,a);return i&&i>0?ud(a,0,a.length,i):a}const Xi="none";class dd{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,i,a){return{shape:t,sets:i||[],options:a||this.defaultOptions}}line(t,i,a,s,l){const c=this._o(l);return this._d("line",[vw(t,i,a,s,c)],c)}rectangle(t,i,a,s,l){const c=this._o(l),h=[],u=q8(t,i,a,s,c);if(c.fill){const f=[[t,i],[t+a,i],[t+a,i+s],[t,i+s]];c.fillStyle==="solid"?h.push(yg([f],c)):h.push(al([f],c))}return c.stroke!==Xi&&h.push(u),this._d("rectangle",h,c)}ellipse(t,i,a,s,l){const c=this._o(l),h=[],u=kw(a,s,c),f=xm(t,i,c,u);if(c.fill)if(c.fillStyle==="solid"){const p=xm(t,i,c,u).opset;p.type="fillPath",h.push(p)}else h.push(al([f.estimatedPoints],c));return c.stroke!==Xi&&h.push(f.opset),this._d("ellipse",h,c)}circle(t,i,a,s){const l=this.ellipse(t,i,a,a,s);return l.shape="circle",l}linearPath(t,i){const a=this._o(i);return this._d("linearPath",[Lu(t,!1,a)],a)}arc(t,i,a,s,l,c,h=!1,u){const f=this._o(u),p=[],g=x2(t,i,a,s,l,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const x=Object.assign({},f);x.disableMultiStroke=!0;const m=x2(t,i,a,s,l,c,!0,!1,x);m.type="fillPath",p.push(m)}else p.push((function(x,m,v,C,k,T,_){const B=x,O=m;let D=Math.abs(v/2),N=Math.abs(C/2);D+=Nt(.01*D,_),N+=Nt(.01*N,_);let H=k,R=T;for(;H<0;)H+=2*Math.PI,R+=2*Math.PI;R-H>2*Math.PI&&(H=0,R=2*Math.PI);const Z=(R-H)/_.curveStepCount,P=[];for(let W=H;W<=R;W+=Z)P.push([B+D*Math.cos(W),O+N*Math.sin(W)]);return P.push([B+D*Math.cos(R),O+N*Math.sin(R)]),P.push([B,O]),al([P],_)})(t,i,a,s,l,c,f));return f.stroke!==Xi&&p.push(g),this._d("arc",p,f)}curve(t,i){const a=this._o(i),s=[],l=y2(t,a);if(a.fill&&a.fill!==Xi)if(a.fillStyle==="solid"){const c=y2(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=t;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(...xg(S2([f[0],f[0],f[1],f[2]]),10,(1+a.roughness)/2)):c.push(...xg(S2(f),10,(1+a.roughness)/2))}c.length&&s.push(al([c],a))}return a.stroke!==Xi&&s.push(l),this._d("curve",s,a)}polygon(t,i){const a=this._o(i),s=[],l=Lu(t,!0,a);return a.fill&&(a.fillStyle==="solid"?s.push(yg([t],a)):s.push(al([t],a))),a.stroke!==Xi&&s.push(l),this._d("polygon",s,a)}path(t,i){const a=this._o(i),s=[];if(!t)return this._d("path",s,a);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const l=a.fill&&a.fill!=="transparent"&&a.fill!==Xi,c=a.stroke!==Xi,h=!!(a.simplification&&a.simplification<1),u=(function(p,g,x){const m=bw(xw(Yy(p))),v=[];let C=[],k=[0,0],T=[];const _=()=>{T.length>=4&&C.push(...xg(T,g)),T=[]},B=()=>{_(),C.length&&(v.push(C),C=[])};for(const{key:D,data:N}of m)switch(D){case"M":B(),k=[N[0],N[1]],C.push(k);break;case"L":_(),C.push([N[0],N[1]]);break;case"C":if(!T.length){const H=C.length?C[C.length-1]:k;T.push([H[0],H[1]])}T.push([N[0],N[1]]),T.push([N[2],N[3]]),T.push([N[4],N[5]]);break;case"Z":_(),C.push([k[0],k[1]])}if(B(),!x)return v;const O=[];for(const D of v){const N=j8(D,x);N.length&&O.push(N)}return O})(t,1,h?4-4*(a.simplification||1):(1+a.roughness)/2),f=b2(t,a);if(l)if(a.fillStyle==="solid")if(u.length===1){const p=b2(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else s.push(yg(u,a));else s.push(al(u,a));return c&&(h?u.forEach((p=>{s.push(Lu(p,!1,a))})):s.push(f)),this._d("path",s,a)}opsToPath(t,i){let a="";for(const s of t.ops){const l=typeof i=="number"&&i>=0?s.data.map((c=>+c.toFixed(i))):s.data;switch(s.op){case"move":a+=`M${l[0]} ${l[1]} `;break;case"bcurveTo":a+=`C${l[0]} ${l[1]}, ${l[2]} ${l[3]}, ${l[4]} ${l[5]} `;break;case"lineTo":a+=`L${l[0]} ${l[1]} `}}return a.trim()}toPaths(t){const i=t.sets||[],a=t.options||this.defaultOptions,s=[];for(const l of i){let c=null;switch(l.type){case"path":c={d:this.opsToPath(l),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:Xi};break;case"fillPath":c={d:this.opsToPath(l),stroke:Xi,strokeWidth:0,fill:a.fill||Xi};break;case"fillSketch":c=this.fillSketch(l,a)}c&&s.push(c)}return s}fillSketch(t,i){let a=i.fillWeight;return a<0&&(a=i.strokeWidth/2),{d:this.opsToPath(t),stroke:i.fill||Xi,strokeWidth:a,fill:Xi}}_mergedShape(t){return t.filter(((i,a)=>a===0||i.op!=="move"))}}class U8{constructor(t,i){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new dd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":s.save(),s.strokeStyle=a.stroke==="none"?"transparent":a.stroke,s.lineWidth=a.strokeWidth,a.strokeLineDash&&s.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(s.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(s,c,l),s.restore();break;case"fillPath":{s.save(),s.fillStyle=a.fill||"";const h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,c,l,h),s.restore();break}case"fillSketch":this.fillSketch(s,c,a)}}fillSketch(t,i,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2),t.save(),a.fillLineDash&&t.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(t.lineDashOffset=a.fillLineDashOffset),t.strokeStyle=a.fill||"",t.lineWidth=s,this._drawToContext(t,i,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,i,a,s="nonzero"){t.beginPath();for(const l of i.ops){const c=typeof a=="number"&&a>=0?l.data.map((h=>+h.toFixed(a))):l.data;switch(l.op){case"move":t.moveTo(c[0],c[1]);break;case"bcurveTo":t.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case"lineTo":t.lineTo(c[0],c[1])}}i.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,i,a,s,l){const c=this.gen.line(t,i,a,s,l);return this.draw(c),c}rectangle(t,i,a,s,l){const c=this.gen.rectangle(t,i,a,s,l);return this.draw(c),c}ellipse(t,i,a,s,l){const c=this.gen.ellipse(t,i,a,s,l);return this.draw(c),c}circle(t,i,a,s){const l=this.gen.circle(t,i,a,s);return this.draw(l),l}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a),a}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a),a}arc(t,i,a,s,l,c,h=!1,u){const f=this.gen.arc(t,i,a,s,l,c,h,u);return this.draw(f),f}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a),a}path(t,i){const a=this.gen.path(t,i);return this.draw(a),a}}const du="http://www.w3.org/2000/svg";class P8{constructor(t,i){this.svg=t,this.gen=new dd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,l=s.createElementNS(du,"g"),c=t.options.fixedDecimalPlaceDigits;for(const h of i){let u=null;switch(h.type){case"path":u=s.createElementNS(du,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke",a.stroke),u.setAttribute("stroke-width",a.strokeWidth+""),u.setAttribute("fill","none"),a.strokeLineDash&&u.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":u=s.createElementNS(du,"path"),u.setAttribute("d",this.opsToPath(h,c)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",a.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(s,h,a)}u&&l.appendChild(u)}return l}fillSketch(t,i,a){let s=a.fillWeight;s<0&&(s=a.strokeWidth/2);const l=t.createElementNS(du,"path");return l.setAttribute("d",this.opsToPath(i,a.fixedDecimalPlaceDigits)),l.setAttribute("stroke",a.fill||""),l.setAttribute("stroke-width",s+""),l.setAttribute("fill","none"),a.fillLineDash&&l.setAttribute("stroke-dasharray",a.fillLineDash.join(" ").trim()),a.fillLineDashOffset&&l.setAttribute("stroke-dashoffset",`${a.fillLineDashOffset}`),l}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,i){return this.gen.opsToPath(t,i)}line(t,i,a,s,l){const c=this.gen.line(t,i,a,s,l);return this.draw(c)}rectangle(t,i,a,s,l){const c=this.gen.rectangle(t,i,a,s,l);return this.draw(c)}ellipse(t,i,a,s,l){const c=this.gen.ellipse(t,i,a,s,l);return this.draw(c)}circle(t,i,a,s){const l=this.gen.circle(t,i,a,s);return this.draw(l)}linearPath(t,i){const a=this.gen.linearPath(t,i);return this.draw(a)}polygon(t,i){const a=this.gen.polygon(t,i);return this.draw(a)}arc(t,i,a,s,l,c,h=!1,u){const f=this.gen.arc(t,i,a,s,l,c,h,u);return this.draw(f)}curve(t,i){const a=this.gen.curve(t,i);return this.draw(a)}path(t,i){const a=this.gen.path(t,i);return this.draw(a)}}var St={canvas:(e,t)=>new U8(e,t),svg:(e,t)=>new P8(e,t),generator:e=>new dd(e),newSeed:()=>dd.newSeed()},zt=S(async(e,t,i)=>{var m,v;let a;const s=t.useHtmlLabels||Ea((m=le())==null?void 0:m.htmlLabels);i?a=i:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",Ke(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const u=!!t.icon||!!t.img,f=t.labelType==="markdown",p=await La(c,Mr(ns(h),le()),{useHtmlLabels:s,width:t.width||((v=le().flowchart)==null?void 0:v.wrappingWidth),classes:f?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:u,markdown:f},le());let g=p.getBBox();const x=((t==null?void 0:t.padding)??0)/2;if(s){const C=p.children[0],k=Xt(p);await UT(C,h),g=C.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height)}return s?c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):c.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:g,halfPadding:x,label:c}},"labelHelper"),bg=S(async(e,t,i)=>{var u,f;const a=i.useHtmlLabels??wi(le()),s=e.insert("g").attr("class","label").attr("style",i.labelStyle||""),l=await La(s,Mr(ns(t),le()),{useHtmlLabels:a,width:i.width||((f=(u=le())==null?void 0:u.flowchart)==null?void 0:f.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=l.getBBox();const h=i.padding/2;if(wi(le())){const p=l.children[0],g=Xt(l);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:c,halfPadding:h,label:s}},"insertLabel"),Et=S((e,t)=>{const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Dt=S((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ee(e){const t=e.map((i,a)=>`${a===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}S(ee,"createPathFromPoints");function Sn(e,t,i,a,s,l){const c=[],u=i-e,f=a-t,p=u/l,g=2*Math.PI/p,x=t+f/2;for(let m=0;m<=50;m++){const v=m/50,C=e+v*u,k=x+s*Math.sin(g*(C-e));c.push({x:C,y:k})}return c}S(Sn,"generateFullSineWavePoints");function Tc(e,t,i,a,s,l){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:-m,y:-v})}return c}S(Tc,"generateCirclePoints");function vm(e){const t=Array.from(e.childNodes).filter(u=>u.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),a=t.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");i.setAttribute("d",a);const s=t.find(u=>u.getAttribute("fill")!=="none"),l=t.find(u=>u.getAttribute("stroke")!=="none"),c=S((u,f)=>(u==null?void 0:u.getAttribute(f))??void 0,"getAttr");if(s){const u={fill:c(s,"fill"),"fill-opacity":c(s,"fill-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}if(l){const u={stroke:c(l,"stroke"),"stroke-width":c(l,"stroke-width")??"1","stroke-opacity":c(l,"stroke-opacity")??"1"};Object.entries(u).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}const h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}S(vm,"mergePaths");var W8=S((e,t)=>{var i=e.x,a=e.y,s=t.x-i,l=t.y-a,c=e.width/2,h=e.height/2,u,f;return Math.abs(l)*c>Math.abs(s)*h?(l<0&&(h=-h),u=l===0?0:h*s/l,f=h):(s<0&&(c=-c),u=c,f=s===0?0:c*l/s),{x:i+u,y:a+f}},"intersectRect"),jl=W8,Y8=S(async(e,t,i,a=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);const c=le(),h=wi(c);return await La(e,l,{style:i,isTitle:a,useHtmlLabels:h,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},c)},"createLabel"),mn=Y8,Tn=S((e,t,i,a,s)=>["M",e+s,t,"H",e+i-s,"A",s,s,0,0,1,e+i,t+s,"V",t+a-s,"A",s,s,0,0,1,e+i-s,t+a,"H",e+s,"A",s,s,0,0,1,e,t+a-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Tw=S(async(e,t)=>{mt.info("Creating subgraph rect for ",t.id,t);const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=wi(i),m=g.insert("g").attr("class","cluster-label ");let v;t.labelType==="markdown"?v=await La(m,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width}):v=await mn(m,t.label,t.labelStyle||"",!1,!0);let C=v.getBBox();if(wi(i)){const H=v.children[0],R=Xt(v);C=H.getBoundingClientRect(),R.attr("width",C.width),R.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-k/2,B=t.y-T/2;mt.trace("Data ",t,JSON.stringify(t));let O;if(t.look==="handDrawn"){const H=St.svg(g),R=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:3,seed:s}),Z=H.path(Tn(_,B,k,T,0),R);O=g.insert(()=>(mt.debug("Rough node insert CXC",Z),Z),":first-child"),O.select("path:nth-child(2)").attr("style",f.join(";")),O.select("path").attr("style",p.join(";").replace("fill","stroke"))}else O=g.insert("rect",":first-child"),O.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",B).attr("width",k).attr("height",T);const{subGraphTitleTopMargin:D}=Fy(i);if(m.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+D})`),h){const H=m.select("span");H&&H.attr("style",h)}const N=O.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=C.height-t.padding/2,t.intersect=function(H){return jl(t,H)},{cluster:g,labelBBox:C}},"rect"),G8=S((e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.domId),a=i.insert("rect",":first-child"),s=0*t.padding,l=s/2;a.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-l).attr("y",t.y-t.height/2-l).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const c=a.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(h){return jl(t,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),X8=S(async(e,t)=>{const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{altBackground:l,compositeBackground:c,compositeTitleBackground:h,nodeBorder:u}=a,f=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let x=f.append("rect");const m=await mn(g,t.label,t.labelStyle,void 0,!0);let v=m.getBBox();if(wi(i)){const Z=m.children[0],P=Xt(m);v=Z.getBoundingClientRect(),P.attr("width",v.width),P.attr("height",v.height)}const C=0*t.padding,k=C/2,T=(t.width<=v.width+t.padding?v.width+t.padding:t.width)+C;t.width<=v.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height+C,B=t.height+C-v.height-6,O=t.x-T/2,D=t.y-_/2;t.width=T;const N=t.y-t.height/2-k+v.height+2;let H;if(t.look==="handDrawn"){const Z=t.cssClasses.includes("statediagram-cluster-alt"),P=St.svg(f),W=t.rx||t.ry?P.path(Tn(O,D,T,_,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:u,seed:s}):P.rectangle(O,D,T,_,{seed:s});H=f.insert(()=>W,":first-child");const et=P.rectangle(O,N,T,B,{fill:Z?l:c,fillStyle:Z?"hachure":"solid",stroke:u,seed:s});H=f.insert(()=>W,":first-child"),x=f.insert(()=>et)}else H=p.insert("rect",":first-child"),H.attr("class","outer").attr("x",O).attr("y",D).attr("width",T).attr("height",_).attr("data-look",t.look),x.attr("class","inner").attr("x",O).attr("y",N).attr("width",T).attr("height",B);g.attr("transform",`translate(${t.x-v.width/2}, ${D+1-(wi(i)?0:3)})`);const R=H.node().getBBox();return t.height=R.height,t.offsetX=0,t.offsetY=v.height-t.padding/2,t.labelBBox=v,t.intersect=function(Z){return jl(t,Z)},{cluster:f,labelBBox:v}},"roundedWithTitle"),V8=S(async(e,t)=>{mt.info("Creating subgraph rect for ",t.id,t);const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:u,borderStyles:f,backgroundStyles:p}=_t(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=wi(i),m=g.insert("g").attr("class","cluster-label "),v=await La(m,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width});let C=v.getBBox();if(wi(i)){const H=v.children[0],R=Xt(v);C=H.getBoundingClientRect(),R.attr("width",C.width),R.attr("height",C.height)}const k=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,_=t.x-k/2,B=t.y-T/2;mt.trace("Data ",t,JSON.stringify(t));let O;if(t.look==="handDrawn"){const H=St.svg(g),R=Tt(t,{roughness:.7,fill:l,stroke:c,fillWeight:4,seed:s}),Z=H.path(Tn(_,B,k,T,t.rx),R);O=g.insert(()=>(mt.debug("Rough node insert CXC",Z),Z),":first-child"),O.select("path:nth-child(2)").attr("style",f.join(";")),O.select("path").attr("style",p.join(";").replace("fill","stroke"))}else O=g.insert("rect",":first-child"),O.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",B).attr("width",k).attr("height",T);const{subGraphTitleTopMargin:D}=Fy(i);if(m.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+D})`),h){const H=m.select("span");H&&H.attr("style",h)}const N=O.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=C.height-t.padding/2,t.intersect=function(H){return jl(t,H)},{cluster:g,labelBBox:C}},"kanbanSection"),Z8=S((e,t)=>{const i=le(),{themeVariables:a,handDrawnSeed:s}=i,{nodeBorder:l}=a,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),h=c.insert("g",":first-child"),u=0*t.padding,f=t.width+u;t.diff=-t.padding;const p=t.height+u,g=t.x-f/2,x=t.y-p/2;t.width=f;let m;if(t.look==="handDrawn"){const k=St.svg(c).rectangle(g,x,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:s});m=c.insert(()=>k,":first-child")}else{m=h.insert("rect",":first-child");let C="outer";t.look,C="divider",m.attr("class",C).attr("x",g).attr("y",x).attr("width",f).attr("height",p).attr("data-look",t.look)}const v=m.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=0,t.intersect=function(C){return jl(t,C)},{cluster:c,labelBBox:{}}},"divider"),Q8=Tw,K8={rect:Tw,squareRect:Q8,roundedWithTitle:X8,noteGroup:G8,divider:Z8,kanbanSection:V8},ww=new Map,J8=S(async(e,t)=>{const i=t.shape||"rect",a=await K8[i](e,t);return ww.set(t.id,a),a},"insertCluster"),fI=S(()=>{ww=new Map},"clear");function _w(e,t){return e.intersect(t)}S(_w,"intersectNode");var tz=_w;function Bw(e,t,i,a){var s=e.x,l=e.y,c=s-a.x,h=l-a.y,u=Math.sqrt(t*t*h*h+i*i*c*c),f=Math.abs(t*i*c/u);a.x<s&&(f=-f);var p=Math.abs(t*i*h/u);return a.y<l&&(p=-p),{x:s+f,y:l+p}}S(Bw,"intersectEllipse");var Ew=Bw;function Lw(e,t,i){return Ew(e,t,t,i)}S(Lw,"intersectCircle");var ez=Lw;function Aw(e,t,i,a){{const s=t.y-e.y,l=e.x-t.x,c=t.x*e.y-e.x*t.y,h=s*i.x+l*i.y+c,u=s*a.x+l*a.y+c,f=1e-6;if(h!==0&&u!==0&&km(h,u))return;const p=a.y-i.y,g=i.x-a.x,x=a.x*i.y-i.x*a.y,m=p*e.x+g*e.y+x,v=p*t.x+g*t.y+x;if(Math.abs(m)<f&&Math.abs(v)<f&&km(m,v))return;const C=s*g-p*l;if(C===0)return;const k=Math.abs(C/2);let T=l*x-g*c;const _=T<0?(T-k)/C:(T+k)/C;T=p*c-s*x;const B=T<0?(T-k)/C:(T+k)/C;return{x:_,y:B}}}S(Aw,"intersectLine");function km(e,t){return e*t>0}S(km,"sameSign");var iz=Aw;function Mw(e,t,i){let a=e.x,s=e.y,l=[],c=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(p){c=Math.min(c,p.x),h=Math.min(h,p.y)}):(c=Math.min(c,t.x),h=Math.min(h,t.y));let u=a-e.width/2-c,f=s-e.height/2-h;for(let p=0;p<t.length;p++){let g=t[p],x=t[p<t.length-1?p+1:0],m=iz(e,i,{x:u+g.x,y:f+g.y},{x:u+x.x,y:f+x.y});m&&l.push(m)}return l.length?(l.length>1&&l.sort(function(p,g){let x=p.x-i.x,m=p.y-i.y,v=Math.sqrt(x*x+m*m),C=g.x-i.x,k=g.y-i.y,T=Math.sqrt(C*C+k*k);return v<T?-1:v===T?0:1}),l[0]):e}S(Mw,"intersectPolygon");var rz=Mw,vt={node:tz,circle:ez,ellipse:Ew,polygon:rz,rect:jl};function Rw(e,t){const{labelStyles:i}=_t(t);t.labelStyle=i;const a=Dt(t);let s=a;a||(s="anchor");const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=1,{cssStyles:h}=t,u=St.svg(l),f=Tt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);const p=u.circle(0,0,c*2,f),g=l.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",Ke(h)),Et(t,g),t.intersect=function(x){return mt.info("Circle intersect",t,c,x),vt.circle(t,c,x)},l}S(Rw,"anchor");function Sm(e,t,i,a,s,l,c){const u=(e+i)/2,f=(t+a)/2,p=Math.atan2(a-t,i-e),g=(i-e)/2,x=(a-t)/2,m=g/s,v=x/l,C=Math.sqrt(m**2+v**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const k=Math.sqrt(1-C**2),T=u+k*l*Math.sin(p)*(c?-1:1),_=f-k*s*Math.cos(p)*(c?-1:1),B=Math.atan2((t-_)/l,(e-T)/s);let D=Math.atan2((a-_)/l,(i-T)/s)-B;c&&D<0&&(D+=2*Math.PI),!c&&D>0&&(D-=2*Math.PI);const N=[];for(let H=0;H<20;H++){const R=H/19,Z=B+R*D,P=T+s*Math.cos(Z),W=_+l*Math.sin(Z);N.push({x:P,y:W})}return N}S(Sm,"generateArcPoints");function Ow(e,t,i){const[a,s]=[t,i].sort((l,c)=>c-l);return s*(1-Math.sqrt(1-(e/a/2)**2))}S(Ow,"calculateArcSagitta");async function Fw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=S(Z=>Z+c,"calcTotalHeight"),u=S(Z=>{const P=Z/2;return[P/(2.5+Z/50),P]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await zt(e,t,Dt(t)),g=h(t!=null&&t.height?t==null?void 0:t.height:p.height),[x,m]=u(g),v=Ow(g,x,m),k=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2+v-v,T=g,{cssStyles:_}=t,B=[{x:k/2,y:-T/2},{x:-k/2,y:-T/2},...Sm(-k/2,-T/2,-k/2,T/2,x,m,!1),{x:k/2,y:T/2},...Sm(k/2,T/2,k/2,-T/2,x,m,!0)],O=St.svg(f),D=Tt(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const N=ee(B),H=O.path(N,D),R=f.insert(()=>H,":first-child");return R.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),R.attr("transform",`translate(${x/2}, 0)`),Et(t,R),t.intersect=function(Z){return vt.polygon(t,B,Z)},f}S(Fw,"bowTieRect");function Aa(e,t,i,a){return e.insert("polygon",":first-child").attr("points",a.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}S(Aa,"insertPolygonShape");var fu=12;async function Dw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?28:s,c=t.look==="neo"?24:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.width)??u.width)+(t.look==="neo"?l*2:l+fu),p=((t==null?void 0:t.height)??u.height)+(t.look==="neo"?c*2:c),g=0,x=f,m=-p,v=0,C=[{x:g+fu,y:m},{x,y:m},{x,y:v},{x:g,y:v},{x:g,y:m+fu},{x:g+fu,y:m}];let k;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(h),B=Tt(t,{}),O=ee(C),D=_.path(O,B);k=h.insert(()=>D,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),T&&k.attr("style",T)}else k=Aa(h,f,p,C);return a&&k.attr("style",a),Et(t,k),t.intersect=function(_){return vt.polygon(t,C,_)},h}S(Dw,"card");function $w(e,t){const{nodeStyles:i}=_t(t);t.label="";const a=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,l=Math.max(28,t.width??0),c=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h=St.svg(a),u=Tt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ee(c),p=h.path(f,u),g=a.insert(()=>p,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),t.width=28,t.height=28,t.intersect=function(x){return vt.polygon(t,c,x)},a}S($w,"choice");async function Gy(e,t,i){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c,halfPadding:h}=await zt(e,t,Dt(t)),u=16,f=(i==null?void 0:i.padding)??h,p=t.look==="neo"?c.width/2+u*2:c.width/2+f;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const m=St.svg(l),v=Tt(t,{}),C=m.circle(0,0,p*2,v);g=l.insert(()=>C,":first-child"),g.attr("class","basic label-container").attr("style",Ke(x))}else g=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0);return Et(t,g),t.calcIntersect=function(m,v){const C=m.width/2;return vt.circle(m,C,v)},t.intersect=function(m){return mt.info("Circle intersect",t,p,m),vt.circle(t,p,m)},l}S(Gy,"circle");function zw(e){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),a=e*2,s={x:a/2*t,y:a/2*i},l={x:-(a/2)*t,y:a/2*i},c={x:-(a/2)*t,y:-(a/2)*i},h={x:a/2*t,y:-(a/2)*i};return`M ${l.x},${l.y} L ${h.x},${h.y}
364
- M ${s.x},${s.y} L ${c.x},${c.y}`}S(zw,"createLine");function Nw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i,t.label="";const s=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),l=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:c}=t,h=St.svg(s),u=Tt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,l*2,u),p=zw(l),g=h.path(p,u),x=s.insert(()=>f,":first-child");return x.insert(()=>g),x.attr("class","outer-path"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),Et(t,x),t.intersect=function(m){return mt.info("crossedCircle intersect",t,{radius:l,point:m}),vt.circle(t,l,m)},s}S(Nw,"crossedCircle");function va(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:-m,y:-v})}return c}S(va,"generateCirclePoints");async function qw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,f=l.width+h,p=l.height+u,g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...va(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...va(f/2+g*2,-g,g,20,-180,-270),...va(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...va(f/2,p/2,g,20,0,90)],v=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...va(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...va(f/2+f*.1,-g,g,20,-180,-270),...va(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...va(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],C=St.svg(s),k=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ee(m).replace("Z",""),B=C.path(_,k),O=ee(v),D=C.path(O,{...k}),N=s.insert("g",":first-child");return N.insert(()=>D,":first-child").attr("stroke-opacity",0),N.insert(()=>B,":first-child"),N.attr("class","text"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",a),N.attr("transform",`translate(${g}, 0)`),c.attr("transform",`translate(${-f/2+g-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,N),t.intersect=function(H){return vt.polygon(t,v,H)},s}S(qw,"curlyBraceLeft");function ka(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:m,y:v})}return c}S(ka,"generateCirclePoints");async function Iw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...ka(f/2,-p/2,g,20,-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+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),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],C=St.svg(s),k=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ee(m).replace("Z",""),B=C.path(_,k),O=ee(v),D=C.path(O,{...k}),N=s.insert("g",":first-child");return N.insert(()=>D,":first-child").attr("stroke-opacity",0),N.insert(()=>B,":first-child"),N.attr("class","text"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",a),N.attr("transform",`translate(${-g}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,N),t.intersect=function(H){return vt.polygon(t,v,H)},s}S(Iw,"curlyBraceRight");function li(e,t,i,a=100,s=0,l=180){const c=[],h=s*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,m=e+i*Math.cos(x),v=t+i*Math.sin(x);c.push({x:-m,y:-v})}return c}S(li,"generateCirclePoints");async function Hw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.look==="neo"?18:t.padding??0,u=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?u*2:u),g=Math.max(5,p*.1),{cssStyles:x}=t,m=[...li(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...li(f/2+g*2,-g,g,20,-180,-270),...li(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...li(f/2,p/2,g,20,0,90)],v=[...li(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...li(-f/2-g/2,-g,g,20,0,90),...li(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...li(-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},...li(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...li(f/2+g*2,-g,g,20,-180,-270),...li(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...li(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},...li(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...li(-f/2-g/2,-g,g,20,0,90),...li(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...li(-f/2+g+g/2,p/2,g,30,-180,-270)],k=St.svg(s),T=Tt(t,{fill:"none"});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=ee(m).replace("Z",""),O=k.path(B,T),N=ee(v).replace("Z",""),H=k.path(N,T),R=ee(C),Z=k.path(R,{...T}),P=s.insert("g",":first-child");return P.insert(()=>Z,":first-child").attr("stroke-opacity",0),P.insert(()=>O,":first-child"),P.insert(()=>H,":first-child"),P.attr("class","text"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",a),P.attr("transform",`translate(${g-g/4}, 0)`),c.attr("transform",`translate(${-f/2+(t.padding??0)/2-(l.x-(l.left??0))},${-p/2+(t.padding??0)/2-(l.y-(l.top??0))})`),Et(t,P),t.intersect=function(W){return vt.polygon(t,C,W)},s}S(Hw,"curlyBraces");async function jw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=20,u=5,{shapeSvg:f,bbox:p}=await zt(e,t,Dt(t)),g=Math.max(h,(p.width+l*2)*1.25,(t==null?void 0:t.width)??0),x=Math.max(u,p.height+c*2,(t==null?void 0:t.height)??0),m=x/2,{cssStyles:v}=t,C=St.svg(f),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=g,_=x,B=T-m,O=_/4,D=[{x:B,y:0},{x:O,y:0},{x:0,y:_/2},{x:O,y:_},{x:B,y:_},...Tc(-B,-_/2,m,50,270,90)],N=ee(D),H=C.path(N,k),R=f.insert(()=>H,":first-child");return R.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",a),R.attr("transform",`translate(${-g/2}, ${-x/2})`),Et(t,R),t.intersect=function(Z){return vt.polygon(t,D,Z)},f}S(jw,"curvedTrapezoid");var az=S((e,t,i,a,s,l)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${i},0`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),nz=S((e,t,i,a,s,l)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),sz=S((e,t,i,a,s,l)=>[`M${e-i/2},${-a/2}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),T2=8,w2=8;async function Uw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?24:s,c=t.look==="neo"?24:s;if(t.width||t.height){const k=t.width??0;t.width=(t.width??0)-c,t.width<w2&&(t.width=w2);const _=k/2/(2.5+k/50);t.height=(t.height??0)-l-_*3,t.height<T2&&(t.height=T2)}const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t.width?t.width:u.width)+c,g=p/2,x=g/(2.5+p/50),m=(t.height?t.height:u.height)+l+x;let v;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=St.svg(h),T=nz(0,0,p,m,g,x),_=sz(0,x,p,m,g,x),B=Tt(t,{}),O=k.path(T,B),D=k.path(_,Tt(t,{fill:"none"}));v=h.insert(()=>D,":first-child"),v=h.insert(()=>O,":first-child"),v.attr("class","basic label-container"),C&&v.attr("style",C)}else{const k=az(0,0,p,m,g,x);v=h.insert("path",":first-child").attr("d",k).attr("class","basic label-container outer-path").attr("style",Ke(C)).attr("style",a)}return v.attr("label-offset-y",x),v.attr("transform",`translate(${-p/2}, ${-(m/2+x)})`),Et(t,v),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(k){const T=vt.rect(t,k),_=T.x-(t.x??0);if(g!=0&&(Math.abs(_)<(t.width??0)/2||Math.abs(_)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-x)){let B=x*x*(1-_*_/(g*g));B>0&&(B=Math.sqrt(B)),B=x-B,k.y-(t.y??0)>0&&(B=-B),T.y+=B}return T},h}S(Uw,"cylinder");async function Ul(e,t,i){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{shapeSvg:l,bbox:c}=await zt(e,t,Dt(t)),h=Math.max(c.width+i.labelPaddingX*2,(t==null?void 0:t.width)||0),u=Math.max(c.height+i.labelPaddingY*2,(t==null?void 0:t.height)||0),f=-h/2,p=-u/2;let g,{rx:x,ry:m}=t;const{cssStyles:v}=t;if(i!=null&&i.rx&&i.ry&&(x=i.rx,m=i.ry),t.look==="handDrawn"){const C=St.svg(l),k=Tt(t,{}),T=x||m?C.path(Tn(f,p,h,u,x||0),k):C.rectangle(f,p,h,u,k);g=l.insert(()=>T,":first-child"),g.attr("class","basic label-container").attr("style",Ke(v))}else g=l.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",s).attr("rx",Ke(x)).attr("ry",Ke(m)).attr("x",f).attr("y",p).attr("width",h).attr("height",u);return Et(t,g),t.calcIntersect=function(C,k){return vt.rect(C,k)},t.intersect=function(C){return vt.rect(t,C)},l}S(Ul,"drawRect");async function Pw(e,t){const{cssClasses:i,labelPaddingX:a,labelPaddingY:s,padding:l,width:c,height:h}=t,u={rx:0,ry:0,labelPaddingX:a??(l??0)*2,labelPaddingY:s??l??0},f=await Ul(e,t,u);if(t.look==="handDrawn"){const m=St.svg(f),v=Tt(t,{}),C=f.select(".basic.label-container > path:nth-child(2)"),k=C.node();if(!k)return f;let T=null;if(k instanceof SVGGraphicsElement)T=k.getBBox();else return f;return f.insert(()=>m.line(T.x,T.y,T.x+T.width,T.y,v),".basic.label-container g.label"),f.insert(()=>m.line(T.x,T.y+T.height,T.x+T.width,T.y+T.height,v),".basic.label-container g.label"),C.remove(),f}const p=f.select(".basic.label-container"),g=(Number(p.attr("width"))||c)??0,x=(Number(p.attr("height"))||h)??0;return g>0&&x>0&&p.attr("stroke-dasharray",`${g} ${x}`),f}S(Pw,"datastore");async function Ww(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=h.width+s,p=h.height+l,g=p*.2,x=-f/2,m=-p/2-g/2,{cssStyles:v}=t,C=St.svg(c),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x,y:m+g},{x:-x,y:m+g},{x:-x,y:-m},{x,y:-m},{x,y:m},{x:-x,y:m},{x:-x,y:m+g}],_=C.polygon(T.map(O=>[O.x,O.y]),k),B=c.insert(()=>_,":first-child");return B.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",a),u.attr("transform",`translate(${x+(t.padding??0)/2-(h.x-(h.left??0))}, ${m+g+(t.padding??0)/2-(h.y-(h.top??0))})`),Et(t,B),t.intersect=function(O){return vt.rect(t,O)},c}S(Ww,"dividedRectangle");async function Yw(e,t){var m,v;const{labelStyles:i,nodeStyles:a}=_t(t),s=t.look==="neo"?12:5;t.labelStyle=i;const l=t.padding??0,c=t.look==="neo"?16:l,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?(t==null?void 0:t.width)/2:u.width/2)+(c??0),p=f-s;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=St.svg(h),k=Tt(t,{roughness:.2,strokeWidth:2.5}),T=Tt(t,{roughness:.2,strokeWidth:1.5}),_=C.circle(0,0,f*2,k),B=C.circle(0,0,p*2,T);g=h.insert("g",":first-child"),g.attr("class",Ke(t.cssClasses)).attr("style",Ke(x)),(m=g.node())==null||m.appendChild(_),(v=g.node())==null||v.appendChild(B)}else{g=h.insert("g",":first-child");const C=g.insert("circle",":first-child"),k=g.insert("circle");g.attr("class","basic label-container").attr("style",a),C.attr("class","outer-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0),k.attr("class","inner-circle").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0)}return Et(t,g),t.intersect=function(C){return mt.info("DoubleCircle intersect",t,f,C),vt.circle(t,f,C)},h}S(Yw,"doublecircle");function Gw(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.label="",t.labelStyle=a;const l=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),c=7,{cssStyles:h}=t,u=St.svg(l),{nodeBorder:f}=i,p=Tt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(p.roughness=0);const g=u.circle(0,0,c*2,p),x=l.insert(()=>g,":first-child");return x.selectAll("path").attr("style",`fill: ${f} !important;`),h&&h.length>0&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),Et(t,x),t.intersect=function(m){return mt.info("filledCircle intersect",t,{radius:c,point:m}),vt.circle(t,c,m)},l}S(Gw,"filledCircle");var _2=10,B2=10;async function Xw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<_2&&(t.height=_2),t.width=((t==null?void 0:t.width)??0)-l-l/2,t.width<B2&&(t.width=B2));const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(l??0),p=t!=null&&t.height?t==null?void 0:t.height:f+h.height,g=p,x=[{x:0,y:-p},{x:g,y:-p},{x:g/2,y:0}],{cssStyles:m}=t,v=St.svg(c),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ee(x),T=v.path(k,C),_=c.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),t.width=f,t.height=p,Et(t,_),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-p/2+(t.padding??0)/2+(h.y-(h.top??0))})`),t.intersect=function(B){return mt.info("Triangle intersect",t,x,B),vt.polygon(t,x,B)},c}S(Xw,"flippedTriangle");function Vw(e,t,{dir:i,config:{state:a,themeVariables:s}}){const{nodeStyles:l}=_t(t);t.label="";const c=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:h}=t;let u=Math.max(70,(t==null?void 0:t.width)??0),f=Math.max(10,(t==null?void 0:t.height)??0);i==="LR"&&(u=Math.max(10,(t==null?void 0:t.width)??0),f=Math.max(70,(t==null?void 0:t.height)??0));const p=-1*u/2,g=-1*f/2,x=St.svg(c),m=Tt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const v=x.rectangle(p,g,u,f,m),C=c.insert(()=>v,":first-child");h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),l&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",l),Et(t,C);const k=(a==null?void 0:a.padding)??0;return t.width&&t.height&&(t.width+=k/2||0,t.height+=k/2||0),t.intersect=function(T){return vt.rect(t,T)},c}S(Vw,"forkJoin");async function Zw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=15,l=10,c=t.look==="neo"?16:t.padding??0,h=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-h*2,t.height<l&&(t.height=l),t.width=((t==null?void 0:t.width)??0)-c*2,t.width<s&&(t.width=s));const{shapeSvg:u,bbox:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,f.width))+c*2,g=(t!=null&&t.height?t==null?void 0:t.height:Math.max(l,f.height))+h*2,x=g/2,{cssStyles:m}=t,v=St.svg(u),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...Tc(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],T=ee(k),_=v.path(T,C),B=u.insert(()=>_,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),Et(t,B),t.intersect=function(O){return mt.info("Pill intersect",t,{radius:x,point:O}),vt.polygon(t,k,O)},u}S(Zw,"halfRoundedRectangle");var lz=S((e,t,i,a,s)=>[`M${e+s},${t}`,`L${e+i-s},${t}`,`L${e+i},${t-a/2}`,`L${e+i-s},${t-a}`,`L${e+s},${t-a}`,`L${e},${t-a/2}`,"Z"].join(" "),"createHexagonPathD");async function Qw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t),s=t.look==="neo"?3.5:4;t.labelStyle=i;const l=t.padding??0,c=70,h=32,u=t.look==="neo"?c:l,f=t.look==="neo"?h:l;if(t.width||t.height){const B=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*B-f,t.height=(t.height??0)-u}const{shapeSvg:p,bbox:g}=await zt(e,t,Dt(t)),x=(t!=null&&t.height?t==null?void 0:t.height:g.height)+u,m=x/s,v=(t!=null&&t.width?t==null?void 0:t.width:g.width)+2*m+f,C=[{x:m,y:0},{x:v-m,y:0},{x:v,y:-x/2},{x:v-m,y:-x},{x:m,y:-x},{x:0,y:-x/2}];let k;const{cssStyles:T}=t;if(t.look==="handDrawn"){const _=St.svg(p),B=Tt(t,{}),O=lz(0,0,v,x,m),D=_.path(O,B);k=p.insert(()=>D,":first-child").attr("transform",`translate(${-v/2}, ${x/2})`),T&&k.attr("style",T)}else k=Aa(p,v,x,C);return a&&k.attr("style",a),t.width=v,t.height=x,Et(t,k),t.intersect=function(_){return vt.polygon(t,C,_)},p}S(Qw,"hexagon");async function Kw(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.label="",t.labelStyle=i;const{shapeSvg:s}=await zt(e,t,Dt(t)),l=Math.max(30,(t==null?void 0:t.width)??0),c=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=St.svg(s),f=Tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:0,y:0},{x:l,y:0},{x:0,y:c},{x:l,y:c}],g=ee(p),x=u.path(g,f),m=s.insert(()=>x,":first-child");return m.attr("class","basic label-container outer-path"),h&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",h),a&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",a),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Et(t,m),t.intersect=function(v){return mt.info("Pill intersect",t,{points:p}),vt.polygon(t,p,v)},s}S(Kw,"hourglass");async function Jw(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await zt(e,t,"icon-shape default"),x=t.pos==="t",m=h,v=h,{nodeBorder:C}=i,{stylesMap:k}=Hl(t),T=-v/2,_=-m/2,B=t.label?8:0,O=St.svg(f),D=Tt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const N=O.rectangle(T,_,v,m,D),H=Math.max(v,p.width),R=m+p.height+B,Z=O.rectangle(-H/2,-R/2,H,R,{...D,fill:"transparent",stroke:"none"}),P=f.insert(()=>N,":first-child"),W=f.insert(()=>Z);if(t.icon){const et=f.append("g");et.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const tt=et.node().getBBox(),X=tt.width,Y=tt.height,M=tt.x,I=tt.y;et.attr("transform",`translate(${-X/2-M},${x?p.height/2+B/2-Y/2-I:-p.height/2-B/2-Y/2-I})`),et.attr("style",`color: ${k.get("stroke")??C};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-R/2:R/2-p.height})`),P.attr("transform",`translate(0,${x?p.height/2+B/2:-p.height/2-B/2})`),Et(t,W),t.intersect=function(et){if(mt.info("iconSquare intersect",t,et),!t.label)return vt.rect(t,et);const tt=t.x??0,X=t.y??0,Y=t.height??0;let M=[];return x?M=[{x:tt-p.width/2,y:X-Y/2},{x:tt+p.width/2,y:X-Y/2},{x:tt+p.width/2,y:X-Y/2+p.height+B},{x:tt+v/2,y:X-Y/2+p.height+B},{x:tt+v/2,y:X+Y/2},{x:tt-v/2,y:X+Y/2},{x:tt-v/2,y:X-Y/2+p.height+B},{x:tt-p.width/2,y:X-Y/2+p.height+B}]:M=[{x:tt-v/2,y:X-Y/2},{x:tt+v/2,y:X-Y/2},{x:tt+v/2,y:X-Y/2+m},{x:tt+p.width/2,y:X-Y/2+m},{x:tt+p.width/2/2,y:X+Y/2},{x:tt-p.width/2,y:X+Y/2},{x:tt-p.width/2,y:X-Y/2+m},{x:tt-v/2,y:X-Y/2+m}],vt.polygon(t,M,et)},f}S(Jw,"icon");async function t_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,label:g}=await zt(e,t,"icon-shape default"),x=20,m=t.label?8:0,v=t.pos==="t",{nodeBorder:C,mainBkg:k}=i,{stylesMap:T}=Hl(t),_=St.svg(f),B=Tt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=T.get("fill");B.stroke=O??k;const D=f.append("g");t.icon&&D.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const N=D.node().getBBox(),H=N.width,R=N.height,Z=N.x,P=N.y,W=Math.max(H,R)*Math.SQRT2+x*2,et=_.circle(0,0,W,B),tt=Math.max(W,p.width),X=W+p.height+m,Y=_.rectangle(-tt/2,-X/2,tt,X,{...B,fill:"transparent",stroke:"none"}),M=f.insert(()=>et,":first-child"),I=f.insert(()=>Y);return D.attr("transform",`translate(${-H/2-Z},${v?p.height/2+m/2-R/2-P:-p.height/2-m/2-R/2-P})`),D.attr("style",`color: ${T.get("stroke")??C};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${v?-X/2:X/2-p.height})`),M.attr("transform",`translate(0,${v?p.height/2+m/2:-p.height/2-m/2})`),Et(t,I),t.intersect=function($){return mt.info("iconSquare intersect",t,$),vt.rect(t,$)},f}S(t_,"iconCircle");async function e_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await zt(e,t,"icon-shape default"),m=t.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:k,mainBkg:T}=i,{stylesMap:_}=Hl(t),B=-C/2,O=-v/2,D=t.label?8:0,N=St.svg(f),H=Tt(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");const R=_.get("fill");H.stroke=R??T;const Z=N.path(Tn(B,O,C,v,5),H),P=Math.max(C,p.width),W=v+p.height+D,et=N.rectangle(-P/2,-W/2,P,W,{...H,fill:"transparent",stroke:"none"}),tt=f.insert(()=>Z,":first-child").attr("class","icon-shape2"),X=f.insert(()=>et);if(t.icon){const Y=f.append("g");Y.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const M=Y.node().getBBox(),I=M.width,$=M.height,F=M.x,Q=M.y;Y.attr("transform",`translate(${-I/2-F},${m?p.height/2+D/2-$/2-Q:-p.height/2-D/2-$/2-Q})`),Y.attr("style",`color: ${_.get("stroke")??k};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-W/2:W/2-p.height})`),tt.attr("transform",`translate(0,${m?p.height/2+D/2:-p.height/2-D/2})`),Et(t,X),t.intersect=function(Y){if(mt.info("iconSquare intersect",t,Y),!t.label)return vt.rect(t,Y);const M=t.x??0,I=t.y??0,$=t.height??0;let F=[];return m?F=[{x:M-p.width/2,y:I-$/2},{x:M+p.width/2,y:I-$/2},{x:M+p.width/2,y:I-$/2+p.height+D},{x:M+C/2,y:I-$/2+p.height+D},{x:M+C/2,y:I+$/2},{x:M-C/2,y:I+$/2},{x:M-C/2,y:I-$/2+p.height+D},{x:M-p.width/2,y:I-$/2+p.height+D}]:F=[{x:M-C/2,y:I-$/2},{x:M+C/2,y:I-$/2},{x:M+C/2,y:I-$/2+v},{x:M+p.width/2,y:I-$/2+v},{x:M+p.width/2/2,y:I+$/2},{x:M-p.width/2,y:I+$/2},{x:M-p.width/2,y:I-$/2+v},{x:M-C/2,y:I-$/2+v}],vt.polygon(t,F,Y)},f}S(e_,"iconRounded");async function i_(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:s}=_t(t);t.labelStyle=s;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),u=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,u??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await zt(e,t,"icon-shape default"),m=t.pos==="t",v=h+g*2,C=h+g*2,{nodeBorder:k,mainBkg:T}=i,{stylesMap:_}=Hl(t),B=-C/2,O=-v/2,D=t.label?8:0,N=St.svg(f),H=Tt(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");const R=_.get("fill");H.stroke=R??T;const Z=N.path(Tn(B,O,C,v,.1),H),P=Math.max(C,p.width),W=v+p.height+D,et=N.rectangle(-P/2,-W/2,P,W,{...H,fill:"transparent",stroke:"none"}),tt=f.insert(()=>Z,":first-child"),X=f.insert(()=>et);if(t.icon){const Y=f.append("g");Y.html(`<g>${await zc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const M=Y.node().getBBox(),I=M.width,$=M.height,F=M.x,Q=M.y;Y.attr("transform",`translate(${-I/2-F},${m?p.height/2+D/2-$/2-Q:-p.height/2-D/2-$/2-Q})`),Y.attr("style",`color: ${_.get("stroke")??k};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-W/2:W/2-p.height})`),tt.attr("transform",`translate(0,${m?p.height/2+D/2:-p.height/2-D/2})`),Et(t,X),t.intersect=function(Y){if(mt.info("iconSquare intersect",t,Y),!t.label)return vt.rect(t,Y);const M=t.x??0,I=t.y??0,$=t.height??0;let F=[];return m?F=[{x:M-p.width/2,y:I-$/2},{x:M+p.width/2,y:I-$/2},{x:M+p.width/2,y:I-$/2+p.height+D},{x:M+C/2,y:I-$/2+p.height+D},{x:M+C/2,y:I+$/2},{x:M-C/2,y:I+$/2},{x:M-C/2,y:I-$/2+p.height+D},{x:M-p.width/2,y:I-$/2+p.height+D}]:F=[{x:M-C/2,y:I-$/2},{x:M+C/2,y:I-$/2},{x:M+C/2,y:I-$/2+v},{x:M+p.width/2,y:I-$/2+v},{x:M+p.width/2/2,y:I+$/2},{x:M-p.width/2,y:I+$/2},{x:M-p.width/2,y:I-$/2+v},{x:M-C/2,y:I-$/2+v}],vt.polygon(t,F,Y)},f}S(i_,"iconSquare");async function r_(e,t,{config:{flowchart:i}}){const a=new Image;a.src=(t==null?void 0:t.img)??"",await a.decode();const s=Number(a.naturalWidth.toString().replace("px","")),l=Number(a.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/l;const{labelStyles:c}=_t(t);t.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;t.defaultWidth=i==null?void 0:i.wrappingWidth;const u=Math.max(t.label?h??0:0,(t==null?void 0:t.assetWidth)??s),f=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:u,p=t.constraint==="on"?f/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??l;t.width=Math.max(f,h??0);const{shapeSvg:g,bbox:x,label:m}=await zt(e,t,"image-shape default"),v=t.pos==="t",C=-f/2,k=-p/2,T=t.label?8:0,_=St.svg(g),B=Tt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const O=_.rectangle(C,k,f,p,B),D=Math.max(f,x.width),N=p+x.height+T,H=_.rectangle(-D/2,-N/2,D,N,{...B,fill:"none",stroke:"none"}),R=g.insert(()=>O,":first-child"),Z=g.insert(()=>H);if(t.img){const P=g.append("image");P.attr("href",t.img),P.attr("width",f),P.attr("height",p),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-f/2},${v?N/2-p:-N/2})`)}return m.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${v?-p/2-x.height/2-T/2:p/2-x.height/2+T/2})`),R.attr("transform",`translate(0,${v?x.height/2+T/2:-x.height/2-T/2})`),Et(t,Z),t.intersect=function(P){if(mt.info("iconSquare intersect",t,P),!t.label)return vt.rect(t,P);const W=t.x??0,et=t.y??0,tt=t.height??0;let X=[];return v?X=[{x:W-x.width/2,y:et-tt/2},{x:W+x.width/2,y:et-tt/2},{x:W+x.width/2,y:et-tt/2+x.height+T},{x:W+f/2,y:et-tt/2+x.height+T},{x:W+f/2,y:et+tt/2},{x:W-f/2,y:et+tt/2},{x:W-f/2,y:et-tt/2+x.height+T},{x:W-x.width/2,y:et-tt/2+x.height+T}]:X=[{x:W-f/2,y:et-tt/2},{x:W+f/2,y:et-tt/2},{x:W+f/2,y:et-tt/2+p},{x:W+x.width/2,y:et-tt/2+p},{x:W+x.width/2/2,y:et+tt/2},{x:W-x.width/2,y:et+tt/2},{x:W-x.width/2,y:et-tt/2+p},{x:W-f/2,y:et-tt/2+p}],vt.polygon(t,X,P)},g}S(r_,"imageSquare");async function a_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=Math.max(u.width+(c??0)*2,(t==null?void 0:t.width)??0),p=Math.max(u.height+(l??0)*2,(t==null?void 0:t.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:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),m&&x.attr("style",m)}else x=Aa(h,f,p,g);return a&&x.attr("style",a),t.width=f,t.height=p,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(a_,"inv_trapezoid");async function n_(e,t){const{shapeSvg:i,bbox:a,label:s}=await zt(e,t,"label"),l=i.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Et(t,l),t.intersect=function(u){return vt.rect(t,u)},i}S(n_,"labelRect");async function s_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.height)??u.height)+l,p=((t==null?void 0:t.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:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=Aa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(s_,"lean_left");async function l_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=s,c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.height)??u.height)+l,p=((t==null?void 0:t.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:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=Aa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(l_,"lean_right");function o_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Dt(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,c=Math.max(35,(t==null?void 0:t.width)??0),h=Math.max(35,(t==null?void 0:t.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=St.svg(s),g=Tt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ee(f),m=p.path(x,g),v=s.insert(()=>m,":first-child");return v.attr("class","outer-path"),l&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",a),v.attr("transform",`translate(-${c/2},${-h})`),Et(t,v),t.intersect=function(C){return mt.info("lightningBolt intersect",t,C),vt.polygon(t,f,C)},s}S(o_,"lightningBolt");var oz=S((e,t,i,a,s,l,c)=>[`M${e},${t+l}`,`a${s},${l} 0,0,0 ${i},0`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),cz=S((e,t,i,a,s,l,c)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${s},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${s},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),hz=S((e,t,i,a,s,l)=>[`M${e-i/2},${-a/2}`,`a${s},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),E2=10,L2=10;async function c_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?24:s;if(t.width||t.height){const T=t.width??0;t.width=(t.width??0)-l,t.width<L2&&(t.width=L2);const B=T/2/(2.5+T/50);t.height=(t.height??0)-c-B*3,t.height<E2&&(t.height=E2)}const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2,g=p/2,x=g/(2.5+p/50),m=(t!=null&&t.height?t==null?void 0:t.height:u.height)+x+c*2,v=m*.1;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const T=St.svg(h),_=cz(0,0,p,m,g,x,v),B=hz(0,x,p,m,g,x),O=Tt(t,{}),D=T.path(_,O),N=T.path(B,O);h.insert(()=>N,":first-child").attr("class","line"),C=h.insert(()=>D,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const T=oz(0,0,p,m,g,x,v);C=h.insert("path",":first-child").attr("d",T).attr("class","basic label-container outer-path").attr("style",Ke(k)).attr("style",a)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(m/2+x)})`),Et(t,C),f.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),t.intersect=function(T){const _=vt.rect(t,T),B=_.x-(t.x??0);if(g!=0&&(Math.abs(B)<(t.width??0)/2||Math.abs(B)==(t.width??0)/2&&Math.abs(_.y-(t.y??0))>(t.height??0)/2-x)){let O=x*x*(1-B*B/(g*g));O>0&&(O=Math.sqrt(O)),O=x-O,T.y-(t.y??0)>0&&(O=-O),_.y+=O}return _},h}S(c_,"linedCylinder");async function h_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;if(t.width||t.height){const O=t.width;t.width=(O??0)*10/11-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10)}const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+(l??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:u.height)+(c??0)*2,x=t.look==="neo"?g/4:g/8,m=g+x,{cssStyles:v}=t,C=St.svg(h),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=[{x:-p/2-p/2*.1,y:-m/2},{x:-p/2-p/2*.1,y:m/2},...Sn(-p/2-p/2*.1,m/2,p/2+p/2*.1,m/2,x,.8),{x:p/2+p/2*.1,y:-m/2},{x:-p/2-p/2*.1,y:-m/2},{x:-p/2,y:-m/2},{x:-p/2,y:m/2*1.1},{x:-p/2,y:-m/2}],_=C.polygon(T.map(O=>[O.x,O.y]),k),B=h.insert(()=>_,":first-child");return B.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",a),B.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-p/2+(t.padding??0)+p/2*.1/2-(u.x-(u.left??0))},${-g/2+(t.padding??0)-x/2-(u.y-(u.top??0))})`),Et(t,B),t.intersect=function(O){return vt.polygon(t,T,O)},h}S(h_,"linedWaveEdgedRect");async function u_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-2*h,10),t.height=Math.max(((t==null?void 0:t.height)??0)-c*2-2*h,10));const{shapeSvg:u,bbox:f,label:p}=await zt(e,t,Dt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:f.width)+l*2+2*h,x=(t!=null&&t.height?t==null?void 0:t.height:f.height)+c*2+2*h,m=g-2*h,v=x-2*h,C=-m/2,k=-v/2,{cssStyles:T}=t,_=St.svg(u),B=Tt(t,{}),O=[{x:C-h,y:k+h},{x:C-h,y:k+v+h},{x:C+m-h,y:k+v+h},{x:C+m-h,y:k+v},{x:C+m,y:k+v},{x:C+m,y:k+v-h},{x:C+m+h,y:k+v-h},{x:C+m+h,y:k-h},{x:C+h,y:k-h},{x:C+h,y:k},{x:C,y:k},{x:C,y:k+h}],D=[{x:C,y:k+h},{x:C+m-h,y:k+h},{x:C+m-h,y:k+v},{x:C+m,y:k+v},{x:C+m,y:k},{x:C,y:k}];t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const N=ee(O);let H=_.path(N,B);const R=ee(D);let Z=_.path(R,B);t.look!=="handDrawn"&&(H=vm(H),Z=vm(Z));const P=u.insert("g",":first-child");return P.insert(()=>H),P.insert(()=>Z),P.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",a),p.attr("transform",`translate(${-(f.width/2)-h-(f.x-(f.left??0))}, ${-(f.height/2)+h-(f.y-(f.top??0))})`),Et(t,P),t.intersect=function(W){return vt.polygon(t,O,W)},u}S(u_,"multiRect");async function d_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=t.padding??0,u=t.look==="neo"?16:h,f=t.look==="neo"?12:h;let p=!0;(t.width||t.height)&&(p=!1,t.width=((t==null?void 0:t.width)??0)-u*2,t.height=((t==null?void 0:t.height)??0)-f*3);const g=Math.max(l.width,(t==null?void 0:t.width)??0)+u*2,x=Math.max(l.height,(t==null?void 0:t.height)??0)+f*3,m=t.look==="neo"?x/4:x/8,v=x+(p?m/2:-m/2),C=-g/2,k=-v/2,T=10,{cssStyles:_}=t,B=Sn(C-T,k+v+T,C+g-T,k+v+T,m,.8),O=B==null?void 0:B[B.length-1],D=[{x:C-T,y:k+T},{x:C-T,y:k+v+T},...B,{x:C+g-T,y:O.y-T},{x:C+g,y:O.y-T},{x:C+g,y:O.y-2*T},{x:C+g+T,y:O.y-2*T},{x:C+g+T,y:k-T},{x:C+T,y:k-T},{x:C+T,y:k},{x:C,y:k},{x:C,y:k+T}],N=[{x:C,y:k+T},{x:C+g-T,y:k+T},{x:C+g-T,y:O.y-T},{x:C+g,y:O.y-T},{x:C+g,y:k},{x:C,y:k}],H=St.svg(s),R=Tt(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");const Z=ee(D),P=H.path(Z,R),W=ee(N),et=H.path(W,R),tt=s.insert(()=>P,":first-child");return tt.insert(()=>et),tt.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&tt.selectAll("path").attr("style",_),a&&t.look!=="handDrawn"&&tt.selectAll("path").attr("style",a),tt.attr("transform",`translate(0,${-m/2})`),c.attr("transform",`translate(${-(l.width/2)-T-(l.x-(l.left??0))}, ${-(l.height/2)+T-m/2-(l.y-(l.top??0))})`),Et(t,tt),t.intersect=function(X){return vt.polygon(t,D,X)},s}S(d_,"multiWaveEdgedRectangle");async function f_(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a,t.useHtmlLabels||wi(Le())||(t.centerLabel=!0);const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=Math.max(h.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),p=Math.max(h.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),g=-f/2,x=-p/2,{cssStyles:m}=t,v=St.svg(c),C=Tt(t,{fill:i.noteBkgColor,stroke:i.noteBorderColor});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=v.rectangle(g,x,f,p,C),T=c.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),s&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",s),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,T),t.intersect=function(_){return vt.rect(t,_)},c}S(f_,"note");var uz=S((e,t,i)=>[`M${e+i/2},${t}`,`L${e+i},${t-i/2}`,`L${e+i/2},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function p_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=await zt(e,t,Dt(t)),c=l.width+(t.padding??0),h=l.height+(t.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}=t;if(t.look==="handDrawn"){const m=St.svg(s),v=Tt(t,{}),C=uz(0,0,u),k=m.path(C,v);g=s.insert(()=>k,":first-child").attr("transform",`translate(${-u/2+f}, ${u/2})`),x&&g.attr("style",x)}else g=Aa(s,u,u,p),g.attr("transform",`translate(${-u/2+f}, ${u/2})`);return a&&g.attr("style",a),Et(t,g),t.calcIntersect=function(m,v){const C=m.width,k=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],T=vt.polygon(m,k,v);return{x:T.x-.5,y:T.y-.5}},t.intersect=function(m){return this.calcIntersect(t,m)},s}S(p_,"question");async function g_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?21:s??0,c=t.look==="neo"?12:s??0,{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=((t==null?void 0:t.width)??u.width)+(t.look==="neo"?l*2:l),g=((t==null?void 0:t.height)??u.height)+(t.look==="neo"?c*2:c),x=-p/2,m=-g/2,v=m/2,C=[{x:x+v,y:m},{x,y:0},{x:x+v,y:-m},{x:-x,y:-m},{x:-x,y:m}],{cssStyles:k}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=ee(C),O=T.path(B,_),D=h.insert(()=>O,":first-child");return D.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",a),D.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))})`),Et(t,D),t.intersect=function(N){return vt.polygon(t,C,N)},h}S(g_,"rect_left_inv_arrow");async function m_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=l.insert("g"),h=l.insert("g").attr("class","label").attr("style",a),u=t.description,f=t.label,p=await mn(h,f,t.labelStyle,!0,!0);let g={width:0,height:0};if(wi(le())){const R=p.children[0],Z=Xt(p);g=R.getBoundingClientRect(),Z.attr("width",g.width),Z.attr("height",g.height)}mt.info("Text 2",u);const x=u||[],m=p.getBBox(),v=await mn(h,Array.isArray(x)?x.join("<br/>"):x,t.labelStyle,!0,!0),C=v.children[0],k=Xt(v);g=C.getBoundingClientRect(),k.attr("width",g.width),k.attr("height",g.height);const T=(t.padding||0)/2;Xt(v).attr("transform","translate( "+(g.width>m.width?0:(m.width-g.width)/2)+", "+(m.height+T+5)+")"),Xt(p).attr("transform","translate( "+(g.width<m.width?0:-(m.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-T+3)+")");const _=g.width+(t.padding||0),B=g.height+(t.padding||0),O=-g.width/2-T,D=-g.height/2-T;let N,H;if(t.look==="handDrawn"){const R=St.svg(l),Z=Tt(t,{}),P=R.path(Tn(O,D,_,B,t.rx||0),Z),W=R.line(-g.width/2-T,-g.height/2-T+m.height+T,g.width/2+T,-g.height/2-T+m.height+T,Z);H=l.insert(()=>(mt.debug("Rough node insert CXC",P),W),":first-child"),N=l.insert(()=>(mt.debug("Rough node insert CXC",P),P),":first-child")}else N=c.insert("rect",":first-child"),H=c.insert("line"),N.attr("class","outer title-state").attr("style",a).attr("x",-g.width/2-T).attr("y",-g.height/2-T).attr("width",g.width+(t.padding||0)).attr("height",g.height+(t.padding||0)),H.attr("class","divider").attr("x1",-g.width/2-T).attr("x2",g.width/2+T).attr("y1",-g.height/2-T+m.height+T).attr("y2",-g.height/2-T+m.height+T);return Et(t,N),t.intersect=function(R){return vt.rect(t,R)},l}S(m_,"rectWithTitle");async function y_(e,t,{config:{themeVariables:i}}){const a=(i==null?void 0:i.radius)??5,s={rx:a,ry:a,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ul(e,t,s)}S(y_,"roundedRect");var Pn=8;async function x_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.width)??h.width)+s*2+(t.look==="neo"?Pn:Pn*2),p=((t==null?void 0:t.height)??h.height)+l*2,g=f-Pn,x=p,m=Pn-f/2,v=-p/2,{cssStyles:C}=t,k=St.svg(c),T=Tt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:m,y:v},{x:m+g,y:v},{x:m+g,y:v+x},{x:m-Pn,y:v+x},{x:m-Pn,y:v},{x:m,y:v},{x:m,y:v+x}],B=k.polygon(_.map(D=>[D.x,D.y]),T),O=c.insert(()=>B,":first-child");return O.attr("class","basic label-container outer-path").attr("style",Ke(C)),a&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",a),C&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",a),u.attr("transform",`translate(${Pn/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Et(t,O),t.intersect=function(D){return vt.rect(t,D)},c}S(x_,"shadedProcess");async function b_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-l*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-c*2,10));const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2,g=((t!=null&&t.height?t==null?void 0:t.height:u.height)+c*2)*1.5,x=p,m=g/1.5,v=-x/2,C=-m/2,{cssStyles:k}=t,T=St.svg(h),_=Tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=[{x:v,y:C},{x:v,y:C+m},{x:v+x,y:C+m},{x:v+x,y:C-m/2}],O=ee(B),D=T.path(O,_),N=h.insert(()=>D,":first-child");return N.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",k),a&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",a),N.attr("transform",`translate(0, ${m/4})`),f.attr("transform",`translate(${-x/2+(t.padding??0)-(u.x-(u.left??0))}, ${-m/4+(t.padding??0)-(u.y-(u.top??0))})`),Et(t,N),t.intersect=function(H){return vt.polygon(t,B,H)},h}S(b_,"slopedRect");async function C_(e,t){const i=t.padding??0,a=t.look==="neo"?16:i*2,s=t.look==="neo"?12:i,l={rx:0,ry:0,labelPaddingX:t.labelPaddingX??a,labelPaddingY:s};return Ul(e,t,l)}S(C_,"squareRect");async function v_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?20:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=u.height+(t.look==="neo"?c*2:c),p=u.width+f/4+(t.look==="neo"?l*2:l),g=f/2,{cssStyles:x}=t,m=St.svg(h),v=Tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...Tc(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...Tc(p/2-g,0,g,50,270,450)],k=ee(C),T=m.path(k,v),_=h.insert(()=>T,":first-child");return _.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",x),a&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",a),Et(t,_),t.intersect=function(B){return vt.polygon(t,C,B)},h}S(v_,"stadium");async function k_(e,t){const i={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ul(e,t,i)}S(k_,"state");function S_(e,t,{config:{themeVariables:i}}){var _,B;const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a;const{cssStyles:l}=t,{lineColor:c,stateBorder:h,nodeBorder:u,nodeShadow:f}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const p=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),g=St.svg(p),x=Tt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const m=g.circle(0,0,t.width,{...x,stroke:c,strokeWidth:2}),v=h??u,C=(t.width??0)*5/14,k=g.circle(0,0,C,{...x,fill:v,stroke:v,strokeWidth:2,fillStyle:"solid"}),T=p.insert(()=>m,":first-child");if(T.insert(()=>k),t.look!=="handDrawn"&&T.attr("class","outer-path"),l&&T.selectAll("path").attr("style",l),s&&T.selectAll("path").attr("style",s),t.width<25&&f&&t.look!=="handDrawn"){const O=((B=(_=e.node())==null?void 0:_.ownerSVGElement)==null?void 0:B.id)??"",D=O?`${O}-drop-shadow-small`:"drop-shadow-small";T.attr("style",`filter:url(#${D})`)}return Et(t,T),t.intersect=function(O){return vt.circle(t,(t.width??0)/2,O)},p}S(S_,"stateEnd");function T_(e,t,{config:{themeVariables:i}}){var h,u;const{lineColor:a,nodeShadow:s}=i;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let c;if(t.look==="handDrawn"){const p=St.svg(l).circle(0,0,t.width,C$(a));c=l.insert(()=>p),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else c=l.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const f=((u=(h=e.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 Et(t,c),t.intersect=function(f){return vt.circle(t,(t.width??7)/2,f)},l}S(T_,"stateStart");var nl=8;async function w_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=(t==null?void 0:t.padding)??8,l=t.look==="neo"?28:s,c=t.look==="neo"?12:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.width)??u.width)+2*nl+l,p=((t==null?void 0:t.height)??u.height)+c,g=f-2*nl,x=p,m=-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(t.look==="handDrawn"){const k=St.svg(h),T=Tt(t,{}),_=k.rectangle(m,v,g+16,x,T),B=k.line(m+nl,v,m+nl,v+x,T),O=k.line(m+nl+g,v,m+nl+g,v+x,T);h.insert(()=>B,":first-child"),h.insert(()=>O,":first-child");const D=h.insert(()=>_,":first-child"),{cssStyles:N}=t;D.attr("class","basic label-container").attr("style",Ke(N)),Et(t,D)}else{const k=Aa(h,g,x,C);a&&k.attr("style",a),Et(t,k)}return t.intersect=function(k){return vt.polygon(t,C,k)},h}S(w_,"subroutine");var Cg=.2;async function __(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-c*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-l*2-Cg*(t.height+c*2),10));const{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c*2,p=Cg*f,g=Cg*f,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2+p-p,v=f,C=-m/2,k=-v/2,{cssStyles:T}=t,_=St.svg(h),B=Tt(t,{}),O=[{x:C-p/2,y:k},{x:C+m+p/2,y:k},{x:C+m+p/2,y:k+v},{x:C-p/2,y:k+v}],D=[{x:C+m-p/2,y:k+v},{x:C+m+p/2,y:k+v},{x:C+m+p/2,y:k+v-g}];t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const N=ee(O),H=_.path(N,B),R=ee(D),Z=_.path(R,{...B,fillStyle:"solid"}),P=h.insert(()=>Z,":first-child");return P.insert(()=>H,":first-child"),P.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",a),Et(t,P),t.intersect=function(W){return vt.polygon(t,O,W)},h}S(__,"taggedRect");async function B_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,label:c}=await zt(e,t,Dt(t)),h=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),u=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=u/8,p=.2*h,g=.2*u,x=u+f,{cssStyles:m}=t,v=St.svg(s),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-h/2-h/2*.1,y:x/2},...Sn(-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}],T=-h/2+h/2*.1,_=-x/2-g*.4,B=[{x:T+h-p,y:(_+u)*1.3},{x:T+h,y:_+u-g},{x:T+h,y:(_+u)*.9},...Sn(T+h,(_+u)*1.25,T+h-p,(_+u)*1.3,-u*.02,.5)],O=ee(k),D=v.path(O,C),N=ee(B),H=v.path(N,{...C,fillStyle:"solid"}),R=s.insert(()=>H,":first-child");return R.insert(()=>D,":first-child"),R.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),R.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Et(t,R),t.intersect=function(Z){return vt.polygon(t,k,Z)},s}S(B_,"taggedWaveEdgedRectangle");async function E_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l}=await zt(e,t,Dt(t)),c=Math.max(l.width+(t.padding??0),(t==null?void 0:t.width)||0),h=Math.max(l.height+(t.padding??0),(t==null?void 0:t.height)||0),u=-c/2,f=-h/2,p=s.insert("rect",":first-child");return p.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",u).attr("y",f).attr("width",c).attr("height",h),Et(t,p),t.intersect=function(g){return vt.rect(t,g)},s}S(E_,"text");var dz=S((e,t,i,a,s,l)=>`M${e},${t}
365
- a${s},${l} 0,0,1 0,${-a}
366
- l${i},0
367
- a${s},${l} 0,0,1 0,${a}
368
- M${i},${-a}
369
- a${s},${l} 0,0,0 0,${a}
370
- l${-i},0`,"createCylinderPathD"),fz=S((e,t,i,a,s,l)=>[`M${e},${t}`,`M${e+i},${t}`,`a${s},${l} 0,0,0 0,${-a}`,`l${-i},0`,`a${s},${l} 0,0,0 0,${a}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),pz=S((e,t,i,a,s,l)=>[`M${e+i/2},${-a/2}`,`a${s},${l} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD"),A2=5,M2=10;async function L_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?12:s/2;if(t.width||t.height){const C=t.height??0;t.height=(t.height??0)-l,t.height<A2&&(t.height=A2);const T=C/2/(2.5+C/50);t.width=(t.width??0)-l-T*3,t.width<M2&&(t.width=M2)}const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=(t.height?t.height:h.height)+l,p=f/2,g=p/(2.5+f/50),x=(t.width?t.width:h.width)+g+l,{cssStyles:m}=t;let v;if(t.look==="handDrawn"){const C=St.svg(c),k=fz(0,0,x,f,g,p),T=pz(0,0,x,f,g,p),_=C.path(k,Tt(t,{})),B=C.path(T,Tt(t,{fill:"none"}));v=c.insert(()=>B,":first-child"),v=c.insert(()=>_,":first-child"),v.attr("class","basic label-container"),m&&v.attr("style",m)}else{const C=dz(0,0,x,f,g,p);v=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Ke(m)).attr("style",a),v.attr("class","basic label-container outer-path"),m&&v.selectAll("path").attr("style",m),a&&v.selectAll("path").attr("style",a)}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))})`),Et(t,v),t.intersect=function(C){const k=vt.rect(t,C),T=k.y-(t.y??0);if(p!=0&&(Math.abs(T)<(t.height??0)/2||Math.abs(T)==(t.height??0)/2&&Math.abs(k.x-(t.x??0))>(t.width??0)/2-g)){let _=g*g*(1-T*T/(p*p));_!=0&&(_=Math.sqrt(Math.abs(_))),_=g-_,C.x-(t.x??0)>0&&(_=-_),k.x+=_}return k},c}S(L_,"tiltedCylinder");async function A_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=(t.look==="neo",s),c=t.look==="neo"?s*2:s,{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=((t==null?void 0:t.height)??u.height)+l,p=((t==null?void 0:t.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:m}=t;if(t.look==="handDrawn"){const v=St.svg(h),C=Tt(t,{}),k=ee(g),T=v.path(k,C);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&x.attr("style",m)}else x=Aa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Et(t,x),t.intersect=function(v){return vt.polygon(t,g,v)},h}S(A_,"trapezoid");async function M_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s,h=15,u=5;(t.width||t.height)&&(t.height=(t.height??0)-c*2,t.height<u&&(t.height=u),t.width=(t.width??0)-l*2,t.width<h&&(t.width=h));const{shapeSvg:f,bbox:p}=await zt(e,t,Dt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2,x=(t!=null&&t.height?t==null?void 0:t.height:p.height)+c*2,{cssStyles:m}=t,v=St.svg(f),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{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}],T=ee(k),_=v.path(T,C),B=f.insert(()=>_,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),Et(t,B),t.intersect=function(O){return vt.polygon(t,k,O)},f}S(M_,"trapezoidalPentagon");var R2=10,O2=10;async function R_(e,t){var O;const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-l)/2,t.width<O2&&(t.width=O2),t.height=(t==null?void 0:t.height)??0,t.height<R2&&(t.height=R2));const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=Ea((O=le().flowchart)==null?void 0:O.htmlLabels),p=(t!=null&&t.width?t==null?void 0:t.width:h.width)+l,g=t!=null&&t.height?t==null?void 0:t.height:p+h.height,x=g,m=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:v}=t,C=St.svg(c),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=ee(m),_=C.path(T,k),B=c.insert(()=>_,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return v&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),t.width=p,t.height=g,Et(t,B),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(t.padding??0)/(f?2:1)-(h.y-(h.top??0)))})`),t.intersect=function(D){return mt.info("Triangle intersect",t,m,D),vt.polygon(t,m,D)},c}S(R_,"triangle");async function O_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?12:s;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-c*2,t.height<10&&(t.height=10));const{shapeSvg:u,bbox:f,label:p}=await zt(e,t,Dt(t)),g=(t!=null&&t.width?t==null?void 0:t.width:f.width)+(l??0)*2,x=(t!=null&&t.height?t==null?void 0:t.height:f.height)+(c??0)*2,m=t.look==="neo"?x/4:x/8,v=x+(h?m:-m),{cssStyles:C}=t,T=14-g,_=T>0?T/2:0,B=St.svg(u),O=Tt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");const D=[{x:-g/2-_,y:v/2},...Sn(-g/2-_,v/2,g/2+_,v/2,m,.8),{x:g/2+_,y:-v/2},{x:-g/2-_,y:-v/2}],N=ee(D),H=B.path(N,O),R=u.insert(()=>H,":first-child");return R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",a),R.attr("transform",`translate(0,${-m/2})`),p.attr("transform",`translate(${-g/2+(t.padding??0)-(f.x-(f.left??0))},${-x/2+(t.padding??0)-m-(f.y-(f.top??0))})`),Et(t,R),t.intersect=function(Z){return vt.polygon(t,D,Z)},u}S(O_,"waveEdgedRectangle");async function F_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.padding??0,l=t.look==="neo"?16:s,c=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const O=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-c-O*(20/9)),t.width=t.width-l*2}const{shapeSvg:h,bbox:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:u.width)+l*2,p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c,g=p/8,x=p+g*2,{cssStyles:m}=t,v=St.svg(h),C=Tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-f/2,y:x/2},...Sn(-f/2,x/2,f/2,x/2,g,1),{x:f/2,y:-x/2},...Sn(f/2,-x/2,-f/2,-x/2,g,-1)],T=ee(k),_=v.path(T,C),B=h.insert(()=>_,":first-child");return B.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",a),Et(t,B),t.intersect=function(O){return vt.polygon(t,k,O)},h}S(F_,"waveRectangle");var Oe=10;async function D_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Oe,10),t.height=Math.max(((t==null?void 0:t.height)??0)-l*2-Oe,10));const{shapeSvg:c,bbox:h,label:u}=await zt(e,t,Dt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+Oe,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+l*2+Oe,g=f-Oe,x=p-Oe,m=-g/2,v=-x/2,{cssStyles:C}=t,k=St.svg(c),T=Tt(t,{}),_=[{x:m-Oe,y:v-Oe},{x:m-Oe,y:v+x},{x:m+g,y:v+x},{x:m+g,y:v-Oe}],B=`M${m-Oe},${v-Oe} L${m+g},${v-Oe} L${m+g},${v+x} L${m-Oe},${v+x} L${m-Oe},${v-Oe}
371
- M${m-Oe},${v} L${m+g},${v}
372
- M${m},${v-Oe} L${m},${v+x}`;t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const O=k.path(B,T),D=c.insert(()=>O,":first-child");return D.attr("transform",`translate(${Oe/2}, ${Oe/2})`),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",a),u.attr("transform",`translate(${-(h.width/2)+Oe/2-(h.x-(h.left??0))}, ${-(h.height/2)+Oe/2-(h.y-(h.top??0))})`),Et(t,D),t.intersect=function(N){return vt.polygon(t,_,N)},c}S(D_,"windowPane");var F2=new Set(["redux-color","redux-dark-color"]),gz=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Xy(e,t){var xt,Rt,Ft,Ut;const i=t;i.alias&&(t.label=i.alias);const{theme:a,themeVariables:s}=Le(),{rowEven:l,rowOdd:c,nodeBorder:h,borderColorArray:u}=s;if(t.look==="handDrawn"){const{themeVariables:U}=Le(),{background:ct}=U,Ct={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ct}`]};await Xy(e,Ct)}const f=Le();t.useHtmlLabels=f.htmlLabels;let p=((xt=f.er)==null?void 0:xt.diagramPadding)??10,g=((Rt=f.er)==null?void 0:Rt.entityPadding)??6;const{cssStyles:x}=t,{labelStyles:m,nodeStyles:v}=_t(t);if(i.attributes.length===0&&t.label){const U={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};Ba(t.label,f)+U.labelPaddingX*2<f.er.minEntityWidth&&(t.width=f.er.minEntityWidth);const ct=await Ul(e,t,U);if(a!=null&&F2.has(a)){const Ct=i.colorIndex??0;ct.attr("data-color-id",`color-${Ct%u.length}`)}if(!Ea(f.htmlLabels)){const Ct=ct.select("text"),Ot=(Ft=Ct.node())==null?void 0:Ft.getBBox();Ct.attr("transform",`translate(${-Ot.width/2}, 0)`)}return ct}f.htmlLabels||(p*=1.25,g*=1.25);let C=Dt(t);C||(C="node default");const k=e.insert("g").attr("class",C).attr("id",t.domId||t.id),T=await ol(k,t.label??"",f,0,0,["name"],m);T.height+=g;let _=0;const B=[],O=[];let D=0,N=0,H=0,R=0,Z=!0,P=!0;for(const U of i.attributes){const ct=await ol(k,U.type,f,0,_,["attribute-type"],m);D=Math.max(D,ct.width+p);const Ct=await ol(k,U.name,f,0,_,["attribute-name"],m);N=Math.max(N,Ct.width+p);const Ot=await ol(k,U.keys.join(),f,0,_,["attribute-keys"],m);H=Math.max(H,Ot.width+p);const Jt=await ol(k,U.comment,f,0,_,["attribute-comment"],m);R=Math.max(R,Jt.width+p);const me=Math.max(ct.height,Ct.height,Ot.height,Jt.height)+g;O.push({yOffset:_,rowHeight:me}),_+=me}let W=4;H<=p&&(Z=!1,H=0,W--),R<=p&&(P=!1,R=0,W--);const et=k.node().getBBox();if(T.width+p*2-(D+N+H+R)>0){const U=T.width+p*2-(D+N+H+R);D+=U/W,N+=U/W,H>0&&(H+=U/W),R>0&&(R+=U/W)}const tt=D+N+H+R,X=St.svg(k),Y=Tt(t,{});t.look!=="handDrawn"&&(Y.roughness=0,Y.fillStyle="solid");let M=0;O.length>0&&(M=O.reduce((U,ct)=>U+((ct==null?void 0:ct.rowHeight)??0),0));const I=Math.max(et.width+p*2,(t==null?void 0:t.width)||0,tt),$=Math.max((M??0)+T.height,(t==null?void 0:t.height)||0),F=-I/2,Q=-$/2;if(k.selectAll("g:not(:first-child)").each((U,ct,Ct)=>{const Ot=Xt(Ct[ct]),Jt=Ot.attr("transform");let me=0,Ht=0;if(Jt){const De=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Jt);De&&(me=parseFloat(De[1]),Ht=parseFloat(De[2]),Ot.attr("class").includes("attribute-name")?me+=D:Ot.attr("class").includes("attribute-keys")?me+=D+N:Ot.attr("class").includes("attribute-comment")&&(me+=D+N+H))}Ot.attr("transform",`translate(${F+p/2+me}, ${Ht+Q+T.height+g/2})`)}),k.select(".name").attr("transform","translate("+-T.width/2+", "+(Q+g/2)+")"),a!=null&&F2.has(a)){const U=i.colorIndex??0;k.attr("data-color-id",`color-${U%u.length}`)}const q=X.rectangle(F,Q,I,$,Y),it=k.insert(()=>q,":first-child").attr("class","outer-path").attr("style",x.join(""));B.push(0);for(const[U,ct]of O.entries()){const Ot=(U+1)%2===0&&ct.yOffset!==0,Jt=X.rectangle(F,T.height+Q+(ct==null?void 0:ct.yOffset),I,ct==null?void 0:ct.rowHeight,{...Y,fill:Ot?l:c,stroke:h});k.insert(()=>Jt,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Ot?"even":"odd"}`)}const ut=1e-4;let dt=cl(F,T.height+Q,I+F,T.height+Q,ut),yt=X.polygon(dt.map(U=>[U.x,U.y]),Y);if(k.insert(()=>yt).attr("class","divider"),dt=cl(D+F,T.height+Q,D+F,$+Q,ut),yt=X.polygon(dt.map(U=>[U.x,U.y]),Y),k.insert(()=>yt).attr("class","divider"),Z){const U=D+N+F;dt=cl(U,T.height+Q,U,$+Q,ut),yt=X.polygon(dt.map(ct=>[ct.x,ct.y]),Y),k.insert(()=>yt).attr("class","divider")}if(P){const U=D+N+H+F;dt=cl(U,T.height+Q,U,$+Q,ut),yt=X.polygon(dt.map(ct=>[ct.x,ct.y]),Y),k.insert(()=>yt).attr("class","divider")}for(const U of B){const ct=T.height+Q+U;dt=cl(F,ct,I+F,ct,ut),yt=X.polygon(dt.map(Ct=>[Ct.x,Ct.y]),Y),k.insert(()=>yt).attr("class","divider")}if(Et(t,it),v&&t.look!=="handDrawn")if(a!=null&&gz.has(a))k.selectAll("path").attr("style",v);else{const U=v.split(";"),ct=(Ut=U==null?void 0:U.filter(Ct=>Ct.includes("stroke")))==null?void 0:Ut.map(Ct=>`${Ct}`).join("; ");k.selectAll("path").attr("style",ct??""),k.selectAll(".row-rect-even path").attr("style",v)}return t.intersect=function(U){return vt.rect(t,U)},k}S(Xy,"erBox");async function ol(e,t,i,a=0,s=0,l=[],c=""){const h=e.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${a}, ${s})`).attr("style",c);t!==TC(t)&&(t=TC(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const u=h.node().appendChild(await La(h,t,{width:Ba(t,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(t.includes("&lt;")||t.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(Ea(i.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}S(ol,"addText");function cl(e,t,i,a,s){return e===i?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:i+s/2,y:a},{x:i-s/2,y:a}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:i,y:a+s/2},{x:i,y:a-s/2}]}S(cl,"lineToPolygon");async function $_(e,t,i,a,s=i.class.padding??12){const l=a?0:3,c=e.insert("g").attr("class",Dt(t)).attr("id",t.domId||t.id);let h=null,u=null,f=null,p=null,g=0,x=0,m=0;if(h=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const _=t.annotations[0];await sc(h,{text:`«${_}»`},0),g=h.node().getBBox().height}u=c.insert("g").attr("class","label-group text"),await sc(u,t,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 _ of t.members){const B=await sc(f,_,C,[_.parseClassifier()]);C+=B+l}m=f.node().getBBox().height,m<=0&&(m=s/2),p=c.insert("g").attr("class","methods-group text");let k=0;for(const _ of t.methods){const B=await sc(p,_,k,[_.parseClassifier()]);k+=B+l}let T=c.node().getBBox();if(h!==null){const _=h.node().getBBox();h.attr("transform",`translate(${-_.width/2})`)}return u.attr("transform",`translate(${-v.width/2}, ${g})`),T=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+s*2})`),T=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(m?m+s*4:s*2)})`),T=c.node().getBBox(),{shapeSvg:c,bbox:T}}S($_,"textHelper");async function sc(e,t,i,a=[]){const s=e.insert("g").attr("class","label").attr("style",a.join("; ")),l=Le();let c="useHtmlLabels"in t?t.useHtmlLabels:Ea(l.htmlLabels)??!0,h="";"text"in t?h=t.text:h=t.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),gc(h)&&(c=!0);const u=await La(s,ry(ns(h)),{width:Ba(h,l)+50,classes:"markdown-node-label",useHtmlLabels:c},l);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 m=g.getElementsByTagName("img");if(m){const v=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(C=>new Promise(k=>{function T(){var _;if(C.style.display="flex",C.style.flexDirection="column",v){const B=((_=l.fontSize)==null?void 0:_.toString())??window.getComputedStyle(document.body).fontSize,D=parseInt(B,10)*5+"px";C.style.minWidth=D,C.style.maxWidth=D}else C.style.width="100%";k(C)}S(T,"setupImage"),setTimeout(()=>{C.complete&&T()}),C.addEventListener("error",T),C.addEventListener("load",T)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}else{a.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 s.attr("transform","translate(0,"+(-f.height/(2*p)+i)+")"),f.height}S(sc,"addText");async function z_(e,t){var X,Y;const i=le(),{themeVariables:a}=i,{useGradient:s}=a,l=i.class.padding??12,c=l,h=t.useHtmlLabels??Ea(i.htmlLabels)??!0,u=t;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:f,bbox:p}=await $_(e,t,i,h,c),{labelStyles:g,nodeStyles:x}=_t(t);t.labelStyle=g,t.cssStyles=u.styles||"";const m=((X=u.styles)==null?void 0:X.join(";"))||x||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));const v=u.members.length===0&&u.methods.length===0&&!((Y=i.class)!=null&&Y.hideEmptyMembersBox),C=St.svg(f),k=Tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=Math.max(t.width??0,p.width);let _=Math.max(t.height??0,p.height);const B=(t.height??0)>p.height;u.members.length===0&&u.methods.length===0?_+=c:u.members.length>0&&u.methods.length===0&&(_+=c*2);const O=-T/2,D=-_/2;let N=v?l*2:u.members.length===0&&u.methods.length===0?-l:0;B&&(N=l*2);const H=C.rectangle(O-l,D-l-(v?l:u.members.length===0&&u.methods.length===0?-l/2:0),T+2*l,_+2*l+N,k),R=f.insert(()=>H,":first-child");R.attr("class","basic label-container outer-path");const Z=R.node().getBBox(),P=f.select(".annotation-group").node().getBBox().height-(v?l/2:0)||0,W=f.select(".label-group").node().getBBox().height-(v?l/2:0)||0,et=f.select(".members-group").node().getBBox().height-(v?l/2:0)||0,tt=(P+W+D+l-(D-l-(v?l:u.members.length===0&&u.methods.length===0?-l/2:0)))/2;if(f.selectAll(".text").each((M,I,$)=>{var dt,yt;const F=Xt($[I]),Q=F.attr("transform");let q=0;if(Q){const Rt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);Rt&&(q=parseFloat(Rt[2]))}let it=q+D+l-(v?l:u.members.length===0&&u.methods.length===0?-l/2:0);if(F.attr("class").includes("methods-group")){const xt=Math.max(et,c/2);B?it=Math.max(tt,P+W+xt+D+c*2+l)+c*2:it=P+W+xt+D+c*4+l}u.members.length===0&&u.methods.length===0&&((dt=i.class)!=null&&dt.hideEmptyMembersBox)&&(u.annotations.length>0?it=q-c:it=q),h||(it-=4);let ut=O;(F.attr("class").includes("label-group")||F.attr("class").includes("annotation-group"))&&(ut=-((yt=F.node())==null?void 0:yt.getBBox().width)/2||0,f.selectAll("text").each(function(xt,Rt,Ft){window.getComputedStyle(Ft[Rt]).textAnchor==="middle"&&(ut=0)})),F.attr("transform",`translate(${ut}, ${it})`)}),u.members.length>0||u.methods.length>0||v){const M=P+W+D+l,I=C.line(Z.x,M,Z.x+Z.width,M+.001,k);f.insert(()=>I).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",m)}if(v||u.members.length>0||u.methods.length>0){const M=P+W+et+D+c*2+l,I=C.line(Z.x,B?Math.max(tt,M):M,Z.x+Z.width,(B?Math.max(tt,M):M)+.001,k);f.insert(()=>I).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",m)}if(u.look!=="handDrawn"&&f.selectAll("path").attr("style",m),R.select(":nth-child(2)").attr("style",m),f.selectAll(".divider").select("path").attr("style",m),t.labelStyle?f.selectAll("span").attr("style",t.labelStyle):f.selectAll("span").attr("style",m),!h){const M=RegExp(/color\s*:\s*([^;]*)/),I=M.exec(m);if(I){const $=I[0].replace("color","fill");f.selectAll("tspan").attr("style",$)}else if(g){const $=M.exec(g);if($){const F=$[0].replace("color","fill");f.selectAll("tspan").attr("style",F)}}}return Et(t,R),t.intersect=function(M){return vt.rect(t,M)},f}S(z_,"classBox");async function N_(e,t){var Z,P;const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const s=t,l=t,c=20,h=20,u="verifyMethod"in t,f=Dt(t),{themeVariables:p}=le(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,m=e.insert("g").attr("class",f).attr("id",t.domId??t.id);let v;u?v=await Pr(m,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):v=await Pr(m,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let C=v;const k=await Pr(m,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+h,u){const W=await Pr(m,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle);C+=W;const et=await Pr(m,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle);C+=et;const tt=await Pr(m,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle);C+=tt,await Pr(m,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle)}else{const W=await Pr(m,`${l.type?`Type: ${l.type}`:""}`,C,t.labelStyle);C+=W,await Pr(m,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,C,t.labelStyle)}const T=(((Z=m.node())==null?void 0:Z.getBBox().width)??200)+c,_=(((P=m.node())==null?void 0:P.getBBox().height)??200)+c,B=-T/2,O=-_/2,D=St.svg(m),N=Tt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const H=D.rectangle(B,O,T,_,N),R=m.insert(()=>H,":first-child");if(R.attr("class","basic label-container outer-path").attr("style",a),g!=null&&g.length){const W=t.colorIndex??0;m.attr("data-color-id",`color-${W%g.length}`)}if(m.selectAll(".label").each((W,et,tt)=>{const X=Xt(tt[et]),Y=X.attr("transform");let M=0,I=0;if(Y){const q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);q&&(M=parseFloat(q[1]),I=parseFloat(q[2]))}const $=I-_/2;let F=B+c/2;(et===0||et===1)&&(F=M),X.attr("transform",`translate(${F}, ${$+c})`)}),C>v+k+h){const W=O+v+k+h;let et;if(t.look==="neo"){const Y=[[B,W],[B+T,W],[B+T,W+.001],[B,W+.001]];et=D.polygon(Y,N)}else et=D.line(B,W,B+T,W,N);m.insert(()=>et).attr("class","divider")}return Et(t,R),t.intersect=function(W){return vt.rect(t,W)},a&&t.look!=="handDrawn"&&(x||g!=null&&g.length)&&m.selectAll("path").attr("style",a),m}S(N_,"requirementBox");async function Pr(e,t,i,a=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",a),l=le(),c=l.htmlLabels??!0,h=await La(s,ry(ns(t)),{width:Ba(t,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:a},l);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)a&&p.setAttribute("style",a);u=h.getBBox(),u.height+=6}return s.attr("transform",`translate(${-u.width/2},${-u.height/2+i})`),u.height}S(Pr,"addText");var mz=S(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function q_(e,t,{config:i}){var et,tt;const{labelStyles:a,nodeStyles:s}=_t(t);t.labelStyle=a||"";const l=10,c=t.width;t.width=(t.width??200)-10;const{shapeSvg:h,bbox:u,label:f}=await zt(e,t,Dt(t)),p=t.padding||10;let g="",x;"ticket"in t&&t.ticket&&((et=i==null?void 0:i.kanban)!=null&&et.ticketBaseUrl)&&(g=(tt=i==null?void 0:i.kanban)==null?void 0:tt.ticketBaseUrl.replace("#TICKET#",t.ticket),x=h.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",g).attr("target","_blank"));const m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let v,C;x?{label:v,bbox:C}=await bg(x,"ticket"in t&&t.ticket||"",m):{label:v,bbox:C}=await bg(h,"ticket"in t&&t.ticket||"",m);const{label:k,bbox:T}=await bg(h,"assigned"in t&&t.assigned||"",m);t.width=c;const _=10,B=(t==null?void 0:t.width)||0,O=Math.max(C.height,T.height)/2,D=Math.max(u.height+_*2,(t==null?void 0:t.height)||0)+O,N=-B/2,H=-D/2;f.attr("transform","translate("+(p-B/2)+", "+(-O-u.height/2)+")"),v.attr("transform","translate("+(p-B/2)+", "+(-O+u.height/2)+")"),k.attr("transform","translate("+(p+B/2-T.width-2*l)+", "+(-O+u.height/2)+")");let R;const{rx:Z,ry:P}=t,{cssStyles:W}=t;if(t.look==="handDrawn"){const X=St.svg(h),Y=Tt(t,{}),M=Z||P?X.path(Tn(N,H,B,D,Z||0),Y):X.rectangle(N,H,B,D,Y);R=h.insert(()=>M,":first-child"),R.attr("class","basic label-container").attr("style",W||null)}else{R=h.insert("rect",":first-child"),R.attr("class","basic label-container __APA__").attr("style",s).attr("rx",Z??5).attr("ry",P??5).attr("x",N).attr("y",H).attr("width",B).attr("height",D);const X="priority"in t&&t.priority;if(X){const Y=h.append("line"),M=N+2,I=H+Math.floor((Z??0)/2),$=H+D-Math.floor((Z??0)/2);Y.attr("x1",M).attr("y1",I).attr("x2",M).attr("y2",$).attr("stroke-width","4").attr("stroke",mz(X))}}return Et(t,R),t.height=D,t.intersect=function(X){return vt.rect(t,X)},h}S(q_,"kanbanItem");async function I_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await zt(e,t,Dt(t)),u=l.width+10*c,f=l.height+8*c,p=.15*u,{cssStyles:g}=t,x=l.width+20,m=l.height+20,v=Math.max(u,x),C=Math.max(f,m);h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let k;const T=`M0 0
373
- a${p},${p} 1 0,0 ${v*.25},${-1*C*.1}
374
- a${p},${p} 1 0,0 ${v*.25},0
375
- a${p},${p} 1 0,0 ${v*.25},0
376
- a${p},${p} 1 0,0 ${v*.25},${C*.1}
377
-
378
- a${p},${p} 1 0,0 ${v*.15},${C*.33}
379
- a${p*.8},${p*.8} 1 0,0 0,${C*.34}
380
- a${p},${p} 1 0,0 ${-1*v*.15},${C*.33}
381
-
382
- a${p},${p} 1 0,0 ${-1*v*.25},${C*.15}
383
- a${p},${p} 1 0,0 ${-1*v*.25},0
384
- a${p},${p} 1 0,0 ${-1*v*.25},0
385
- a${p},${p} 1 0,0 ${-1*v*.25},${-1*C*.15}
386
-
387
- a${p},${p} 1 0,0 ${-1*v*.1},${-1*C*.33}
388
- a${p*.8},${p*.8} 1 0,0 0,${-1*C*.34}
389
- a${p},${p} 1 0,0 ${v*.1},${-1*C*.33}
390
- H0 V0 Z`;if(t.look==="handDrawn"){const _=St.svg(s),B=Tt(t,{}),O=_.path(T,B);k=s.insert(()=>O,":first-child"),k.attr("class","basic label-container").attr("style",Ke(g))}else k=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",T);return k.attr("transform",`translate(${-v/2}, ${-C/2})`),Et(t,k),t.calcIntersect=function(_,B){return vt.rect(_,B)},t.intersect=function(_){return mt.info("Bang intersect",t,_),vt.rect(t,_)},s}S(I_,"bang");async function H_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await zt(e,t,Dt(t)),u=l.width+2*c,f=l.height+2*c,p=.15*u,g=.25*u,x=.35*u,m=.2*u,{cssStyles:v}=t;let C;const k=`M0 0
391
- a${p},${p} 0 0,1 ${u*.25},${-1*u*.1}
392
- a${x},${x} 1 0,1 ${u*.4},${-1*u*.1}
393
- a${g},${g} 1 0,1 ${u*.35},${u*.2}
394
-
395
- a${p},${p} 1 0,1 ${u*.15},${f*.35}
396
- a${m},${m} 1 0,1 ${-1*u*.15},${f*.65}
397
-
398
- a${g},${p} 1 0,1 ${-1*u*.25},${u*.15}
399
- a${x},${x} 1 0,1 ${-1*u*.5},0
400
- a${p},${p} 1 0,1 ${-1*u*.25},${-1*u*.15}
401
-
402
- a${p},${p} 1 0,1 ${-1*u*.1},${-1*f*.35}
403
- a${m},${m} 1 0,1 ${u*.1},${-1*f*.65}
404
- H0 V0 Z`;if(t.look==="handDrawn"){const T=St.svg(s),_=Tt(t,{}),B=T.path(k,_);C=s.insert(()=>B,":first-child"),C.attr("class","basic label-container").attr("style",Ke(v))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",k);return h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),C.attr("transform",`translate(${-u/2}, ${-f/2})`),Et(t,C),t.calcIntersect=function(T,_){return vt.rect(T,_)},t.intersect=function(T){return mt.info("Cloud intersect",t,T),vt.rect(t,T)},s}S(H_,"cloud");async function j_(e,t){const{labelStyles:i,nodeStyles:a}=_t(t);t.labelStyle=i;const{shapeSvg:s,bbox:l,halfPadding:c,label:h}=await zt(e,t,Dt(t)),u=l.width+8*c,f=l.height+2*c,p=5,g=t.look==="neo"?`
405
- M${-u/2} ${f/2-p}
406
- v${-f+2*p}
407
- q0,-${p} ${p},-${p}
408
- h${u-2*p}
409
- q${p},0 ${p},${p}
410
- v${f-p}
411
- H${-u/2}
412
- Z
413
- `:`
414
- M${-u/2} ${f/2-p}
415
- v${-f+2*p}
416
- q0,-${p} ${p},-${p}
417
- h${u-2*p}
418
- q${p},0 ${p},${p}
419
- v${f-2*p}
420
- q0,${p} ${-p},${p}
421
- h${-(u-2*p)}
422
- q${-p},0 ${-p},${-p}
423
- Z
424
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",a).attr("d",g);return s.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(${-l.width/2}, ${-l.height/2})`),s.append(()=>h.node()),Et(t,x),t.calcIntersect=function(m,v){return vt.rect(m,v)},t.intersect=function(m){return vt.rect(t,m)},s}S(j_,"defaultMindmapNode");async function U_(e,t){const i={padding:t.padding??0};return Gy(e,t,i)}S(U_,"mindmapCircle");var yz=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:C_},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:y_},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:v_},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:w_},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Uw},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Pw},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Gy},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:I_},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:H_},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:p_},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Qw},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:l_},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:s_},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:A_},{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:a_},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Yw},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:E_},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Dw},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:x_},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:T_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:S_},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Vw},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Kw},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:qw},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Iw},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Hw},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:o_},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:O_},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Zw},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:L_},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:c_},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:jw},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ww},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:R_},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:D_},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Gw},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:M_},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Xw},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:b_},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:d_},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:u_},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Fw},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Nw},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:B_},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:__},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:F_},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:g_},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:h_}],xz=S(()=>{const t=[...Object.entries({state:k_,choice:$w,note:f_,rectWithTitle:m_,labelRect:n_,iconSquare:i_,iconCircle:t_,icon:Jw,iconRounded:e_,imageSquare:r_,anchor:Rw,kanbanItem:q_,mindmapCircle:U_,defaultMindmapNode:j_,classBox:z_,erBox:Xy,requirementBox:N_}),...yz.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(s=>[s,i.handler]))];return Object.fromEntries(t)},"generateShapeMap"),P_=xz();function bz(e){return e in P_}S(bz,"isValidShape");var $d=new Map;async function W_(e,t,i){let a,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const l=t.shape?P_[t.shape]:void 0;if(!l)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let c;i.config.securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),a=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c??null),s=await l(a,t,i)}else s=await l(e,t,i),a=s;return a.attr("data-look",Ke(t.look)),t.tooltip&&s.attr("title",t.tooltip),$d.set(t.id,a),t.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}S(W_,"insertNode");var pI=S((e,t)=>{$d.set(t.id,e)},"setNodeElem"),gI=S(()=>{$d.clear()},"clear"),mI=S(e=>{const t=$d.get(e.id);mt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const i=8,a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-i)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode"),Cz=S((e,t,i,a,s,l=!1,c)=>{t.arrowTypeStart&&D2(e,"start",t.arrowTypeStart,i,a,s,l,c),t.arrowTypeEnd&&D2(e,"end",t.arrowTypeEnd,i,a,s,l,c)},"addEdgeMarkers"),vz={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}},kz=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],D2=S((e,t,i,a,s,l,c=!1,h)=>{var v;const u=vz[i],f=u&&kz.includes(u.type);if(!u){mt.warn(`Unknown arrow type: ${i}`);return}const p=u.type,m=`${s}_${l}-${p}${t==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const C=h.replace(/[^\dA-Za-z]/g,"_"),k=`${m}_${C}`;if(!document.getElementById(k)){const T=document.getElementById(m);if(T){const _=T.cloneNode(!0);_.id=k,_.querySelectorAll("path, circle, line").forEach(O=>{O.setAttribute("stroke",h),u.fill&&O.setAttribute("fill",h)}),(v=T.parentNode)==null||v.appendChild(_)}}e.attr(`marker-${t}`,`url(${a}#${k})`)}else e.attr(`marker-${t}`,`url(${a}#${m})`)},"addEdgeMarker"),Sz=S(e=>{var t,i;return typeof e=="string"?e:(i=(t=le())==null?void 0:t.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),fd=new Map,oi=new Map,yI=S(()=>{fd.clear(),oi.clear()},"clear"),Qo=S(e=>e?typeof e=="string"?e:e.reduce((t,i)=>t+";"+i,""):"","getLabelStyles"),Tz=S(async(e,t)=>{const i=le();let a=wi(i);const{labelStyles:s}=_t(t);t.labelStyle=s;const l=e.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label").attr("data-id",t.id),h=t.labelType==="markdown",f=await La(e,t.label,{style:Qo(t.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:h,width:h?void 0:void 0},i);c.node().appendChild(f),mt.info("abc82",t,t.labelType);let p=f.getBBox(),g=p;if(a){const m=f.children[0],v=Xt(f);p=m.getBoundingClientRect(),g=p,v.attr("width",p.width),v.attr("height",p.height)}else{const m=Xt(f).select("text").node();m&&typeof m.getBBox=="function"&&(g=m.getBBox())}c.attr("transform",Yo(g,a)),fd.set(t.id,l),t.width=p.width,t.height=p.height;let x;if(t.startLabelLeft){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(v,t.startLabelLeft,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).startLeft=m,lc(x,t.startLabelLeft)}if(t.startLabelRight){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(v,t.startLabelRight,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).startRight=m,lc(x,t.startLabelRight)}if(t.endLabelLeft){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(m,t.endLabelLeft,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).endLeft=m,lc(x,t.endLabelLeft)}if(t.endLabelRight){const m=e.insert("g").attr("class","edgeTerminals"),v=m.insert("g").attr("class","inner"),C=await mn(m,t.endLabelRight,Qo(t.labelStyle)||"",!1,!1);x=C;let k=C.getBBox();if(a){const T=C.children[0],_=Xt(C);k=T.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}v.attr("transform",Yo(k,a)),oi.get(t.id)||oi.set(t.id,{}),oi.get(t.id).endRight=m,lc(x,t.endLabelRight)}return f},"insertEdgeLabel");function lc(e,t){wi(le())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}S(lc,"setTerminalWidth");var wz=S((e,t)=>{mt.debug("Moving label abc88 ",e.id,e.label,fd.get(e.id),t);let i=t.updatedPath?t.updatedPath:t.originalPath;const a=le(),{subGraphTitleTotalMargin:s}=Fy(a);if(e.label){const l=fd.get(e.id);let c=e.x,h=e.y;if(i){const u=_r.calcLabelPosition(i);mt.debug("Moving label "+e.label+" from (",c,",",h,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(c=u.x,h=u.y)}l.attr("transform",`translate(${c}, ${h+s/2})`)}if(e.startLabelLeft){const l=oi.get(e.id).startLeft;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.startLabelRight){const l=oi.get(e.id).startRight;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelLeft){const l=oi.get(e.id).endLeft;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelRight){const l=oi.get(e.id).endRight;let c=e.x,h=e.y;if(i){const u=_r.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",i);c=u.x,h=u.y}l.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),_z=S((e,t)=>{const i=e.x,a=e.y,s=Math.abs(t.x-i),l=Math.abs(t.y-a),c=e.width/2,h=e.height/2;return s>=c||l>=h},"outsideNode"),Bz=S((e,t,i)=>{mt.debug(`intersection calc abc89:
425
- outsidePoint: ${JSON.stringify(t)}
426
- insidePoint : ${JSON.stringify(i)}
427
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const a=e.x,s=e.y,l=Math.abs(a-i.x),c=e.width/2;let h=i.x<t.x?c-l:c+l;const u=e.height/2,f=Math.abs(t.y-i.y),p=Math.abs(t.x-i.x);if(Math.abs(s-t.y)*c>Math.abs(a-t.x)*u){let g=i.y<t.y?t.y-u-s:s-u-t.y;h=p*g/f;const x={x:i.x<t.x?i.x+h:i.x-p+h,y:i.y<t.y?i.y+f-g:i.y-f+g};return h===0&&(x.x=t.x,x.y=t.y),p===0&&(x.x=t.x),f===0&&(x.y=t.y),mt.debug(`abc89 top/bottom calc, Q ${f}, q ${g}, R ${p}, r ${h}`,x),x}else{i.x<t.x?h=t.x-c-a:h=a-c-t.x;let g=f*h/p,x=i.x<t.x?i.x+p-h:i.x-p+h,m=i.y<t.y?i.y+g:i.y-g;return mt.debug(`sides calc abc89, Q ${f}, q ${g}, R ${p}, r ${h}`,{_x:x,_y:m}),h===0&&(x=t.x,m=t.y),p===0&&(x=t.x),f===0&&(m=t.y),{x,y:m}}},"intersection"),$2=S((e,t)=>{mt.warn("abc88 cutPathAtIntersect",e,t);let i=[],a=e[0],s=!1;return e.forEach(l=>{if(mt.info("abc88 checking point",l,t),!_z(t,l)&&!s){const c=Bz(t,a,l);mt.debug("abc88 inside",l,a,c),mt.debug("abc88 intersection",c,t);let h=!1;i.forEach(u=>{h=h||u.x===c.x&&u.y===c.y}),i.some(u=>u.x===c.x&&u.y===c.y)?mt.warn("abc88 no intersect",c,i):i.push(c),s=!0}else mt.warn("abc88 outside",l,a),a=l,s||i.push(l)}),mt.debug("returning points",i),i},"cutPathAtIntersect");function Y_(e){const t=[],i=[];for(let a=1;a<e.length-1;a++){const s=e[a-1],l=e[a],c=e[a+1];(s.x===l.x&&l.y===c.y&&Math.abs(l.x-c.x)>5&&Math.abs(l.y-s.y)>5||s.y===l.y&&l.x===c.x&&Math.abs(l.x-s.x)>5&&Math.abs(l.y-c.y)>5)&&(t.push(l),i.push(a))}return{cornerPoints:t,cornerPointPositions:i}}S(Y_,"extractCornerPoints");var z2=S(function(e,t,i){const a=t.x-e.x,s=t.y-e.y,l=Math.sqrt(a*a+s*s),c=i/l;return{x:t.x-c*a,y:t.y-c*s}},"findAdjacentPoint"),Ez=S(function(e){const{cornerPointPositions:t}=Y_(e),i=[];for(let a=0;a<e.length;a++)if(t.includes(a)){const s=e[a-1],l=e[a+1],c=e[a],h=z2(s,c,5),u=z2(l,c,5),f=u.x-h.x,p=u.y-h.y;i.push(h);const g=Math.sqrt(2)*2;let x={x:c.x,y:c.y};if(Math.abs(l.x-s.x)>10&&Math.abs(l.y-s.y)>=10){mt.debug("Corner point fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));const m=5;c.x===h.x?x={x:f<0?h.x-m+g:h.x+m-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-m+g:h.y+m-g}}else mt.debug("Corner point skipping fixing",Math.abs(l.x-s.x),Math.abs(l.y-s.y));i.push(x,u)}else i.push(e[a]);return i},"fixCorners"),Lz=S((e,t,i)=>{const a=e-t-i,s=2,l=2,c=s+l,h=Math.floor(a/c),u=Array(h).fill(`${s} ${l}`).join(" ");return`0 ${t} ${u} ${i}`},"generateDashArray"),Az=S(function(e,t,i,a,s,l,c,h=!1){var I;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u}=le();let f=t.points,p=!1;const g=s;var x=l;const m=[];for(const $ in t.cssCompiledStyles)PT($)||m.push(t.cssCompiledStyles[$]);mt.debug("UIO intersect check",t.points,x.x,g.x),x.intersect&&g.intersect&&!h&&(f=f.slice(1,t.points.length-1),f.unshift(g.intersect(f[0])),mt.debug("Last point UIO",t.start,"-->",t.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));t.toCluster&&(mt.info("to cluster abc88",i.get(t.toCluster)),f=$2(t.points,i.get(t.toCluster).node),p=!0),t.fromCluster&&(mt.debug("from cluster abc88",i.get(t.fromCluster),JSON.stringify(f,null,2)),f=$2(f.reverse(),i.get(t.fromCluster).node).reverse(),p=!0);let C=f.filter($=>!Number.isNaN($.y));const k=Sz(t.curve);k!=="rounded"&&(C=Ez(C));let T=uc;switch(k){case"linear":T=uc;break;case"basis":T=Xg;break;case"cardinal":T=Mk;break;case"bumpX":T=_k;break;case"bumpY":T=Bk;break;case"catmullRom":T=Ok;break;case"monotoneX":T=qk;break;case"monotoneY":T=Ik;break;case"natural":T=jk;break;case"step":T=Uk;break;case"stepAfter":T=Wk;break;case"stepBefore":T=Pk;break;case"rounded":T=uc;break;default:T=Xg}const{x:_,y:B}=TD(t),O=l6().x(_).y(B).curve(T);let D;switch(t.thickness){case"normal":D="edge-thickness-normal";break;case"thick":D="edge-thickness-thick";break;case"invisible":D="edge-thickness-invisible";break;default:D="edge-thickness-normal"}switch(t.pattern){case"solid":D+=" edge-pattern-solid";break;case"dotted":D+=" edge-pattern-dotted";break;case"dashed":D+=" edge-pattern-dashed";break;default:D+=" edge-pattern-solid"}let N,H=k==="rounded"?G_(X_(C,t),5):O(C);const R=Array.isArray(t.style)?t.style:[t.style];let Z=R.find($=>$==null?void 0:$.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let W=!1;if(t.look==="handDrawn"){const $=St.svg(e);Object.assign([],C);const F=$.path(H,{roughness:.3,seed:u});D+=" transition",N=Xt(F).select("path").attr("id",`${c}-${t.id}`).attr("class"," "+D+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",R?R.reduce((q,it)=>q+";"+it,""):"");let Q=N.attr("d");N.attr("d",Q),e.node().appendChild(N.node())}else{const $=m.join(";"),F=R?R.reduce((yt,xt)=>yt+xt+";",""):"",Q=($?$+";"+F+";":F)+";"+(R?R.reduce((yt,xt)=>yt+";"+xt,""):"");N=e.append("path").attr("d",H).attr("id",`${c}-${t.id}`).attr("class"," "+D+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",Q),Z=(I=Q.match(/stroke:([^;]+)/))==null?void 0:I[1],W=t.animate===!0||!!t.animation||$.includes("animation");const q=N.node(),it=typeof q.getTotalLength=="function"?q.getTotalLength():0,ut=QC[t.arrowTypeStart]||0,dt=QC[t.arrowTypeEnd]||0;if(t.look==="neo"&&!W){const xt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Lz(it,ut,dt):`0 ${ut} ${it-ut-dt} ${dt}`}; stroke-dashoffset: 0;`;N.attr("style",xt+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",t.id),N.attr("data-points",v),N.attr("data-look",Ke(t.look)),t.showPoints&&C.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let et="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(et=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,et=et.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),mt.info("arrowTypeStart",t.arrowTypeStart),mt.info("arrowTypeEnd",t.arrowTypeEnd);const tt=!W&&(t==null?void 0:t.look)==="neo";Cz(N,t,et,c,a,tt,Z);const X=Math.floor(f.length/2),Y=f[X];_r.isLabelCoordinateInPath(Y,N.attr("d"))||(p=!0);let M={};return p&&(M.updatedPath=f),M.originalPath=t.points,M},"insertEdge");function G_(e,t){if(e.length<2)return"";let i="";const a=e.length,s=1e-5;for(let l=0;l<a;l++){const c=e[l],h=e[l-1],u=e[l+1];if(l===0)i+=`M${c.x},${c.y}`;else if(l===a-1)i+=`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,m=Math.hypot(f,p),v=Math.hypot(g,x);if(m<s||v<s){i+=`L${c.x},${c.y}`;continue}const C=f/m,k=p/m,T=g/v,_=x/v,B=C*T+k*_,O=Math.max(-1,Math.min(1,B)),D=Math.acos(O);if(D<s||Math.abs(Math.PI-D)<s){i+=`L${c.x},${c.y}`;continue}const N=Math.min(t/Math.sin(D/2),m/2,v/2),H=c.x-C*N,R=c.y-k*N,Z=c.x+T*N,P=c.y+_*N;i+=`L${H},${R}`,i+=`Q${c.x},${c.y} ${Z},${P}`}}return i}S(G_,"generateRoundedPath");function Tm(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const i=t.x-e.x,a=t.y-e.y;return{angle:Math.atan2(a,i),deltaX:i,deltaY:a}}S(Tm,"calculateDeltaAndAngle");function X_(e,t){const i=e.map(s=>({...s}));if(e.length>=2&&pi[t.arrowTypeStart]){const s=pi[t.arrowTypeStart],l=e[0],c=e[1],{angle:h}=Tm(l,c),u=s*Math.cos(h),f=s*Math.sin(h);i[0].x=l.x+u,i[0].y=l.y+f}const a=e.length;if(a>=2&&pi[t.arrowTypeEnd]){const s=pi[t.arrowTypeEnd],l=e[a-1],c=e[a-2],{angle:h}=Tm(c,l),u=s*Math.cos(h),f=s*Math.sin(h);i[a-1].x=l.x-u,i[a-1].y=l.y-f}return i}S(X_,"applyMarkerOffsetsToPoints");var Mz=S((e,t,i,a)=>{t.forEach(s=>{tN[s](e,i,a)})},"insertMarkers"),Rz=S((e,t,i)=>{mt.trace("Making markers for ",i),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",i+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",i+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Oz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Fz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Dz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$z=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",i+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),zz=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Nz=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),qz=S((e,t,i)=>{e.append("marker").attr("id",i+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",i+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",i+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Iz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Hz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{transitionColor:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",i+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${l}`)},"barbNeo"),jz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Uz=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),a.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Pz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Wz=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Yz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${l}`)},"only_one_neo"),Gz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),h.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${l}`);const u=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${l}`)},"zero_or_one_neo"),Xz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${l}`),e.append("defs").append("marker").attr("id",i+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${l}`)},"one_or_more_neo"),Vz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l,mainBkg:c}=s,h=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),h.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${l}`);const u=e.append("defs").append("marker").attr("id",i+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${l}`)},"zero_or_more_neo"),Zz=S((e,t,i)=>{e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
428
- L20,10
429
- M20,10
430
- L0,20`)},"requirement_arrow"),Qz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s;e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${l}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
431
- L20,10
432
- M20,10
433
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Kz=S((e,t,i)=>{const a=e.append("defs").append("marker").attr("id",i+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Jz=S((e,t,i)=>{const a=Le(),{themeVariables:s}=a,{strokeWidth:l}=s,c=e.append("defs").append("marker").attr("id",i+"_"+t+"-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",`${l}`)},"requirement_contains_neo"),tN={extension:Rz,composition:Oz,aggregation:Fz,dependency:Dz,lollipop:$z,point:zz,circle:Nz,cross:qz,barb:Iz,barbNeo:Hz,only_one:jz,zero_or_one:Uz,one_or_more:Pz,zero_or_more:Wz,only_one_neo:Yz,zero_or_one_neo:Gz,one_or_more_neo:Xz,zero_or_more_neo:Vz,requirement_arrow:Zz,requirement_contains:Kz,requirement_arrow_neo:Qz,requirement_contains_neo:Jz},eN=Mz,iN={common:Mc,getConfig:Le,insertCluster:J8,insertEdge:Az,insertEdgeLabel:Tz,insertMarkers:eN,insertNode:W_,interpolateToCurve:Ey,labelHelper:zt,log:mt,positionEdgeLabel:wz},wc={},V_=S(e=>{for(const t of e)wc[t.name]=t},"registerLayoutLoaders"),rN=S(()=>{V_([{name:"dagre",loader:S(async()=>await ie(()=>import("./dagre-BM42HDAG-T0muUpSx.js"),__vite__mapDeps([0,1,2])),"loader")},{name:"cose-bilkent",loader:S(async()=>await ie(()=>import("./cose-bilkent-S5V4N54A-DKqnlQHP.js"),__vite__mapDeps([3,4])),"loader")}])},"registerDefaultLayoutLoaders");rN();var xI=S(async(e,t)=>{if(!(e.layoutAlgorithm in wc))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const p of e.nodes){const g=p.domId||p.id;p.domId=`${e.diagramId}-${g}`}const i=wc[e.layoutAlgorithm],a=await i.loader(),{theme:s,themeVariables:l}=e.config,{useGradient:c,gradientStart:h,gradientStop:u}=l,f=t.attr("id");if(t.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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),c){const p=t.append("linearGradient").attr("id",t.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 a.render(e,t,iN,{algorithm:i.algorithm})},"render"),bI=S((e="",{fallback:t="dagre"}={})=>{if(e in wc)return e;if(t in wc)return mt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Vy="comm",Z_="rule",Q_="decl",aN="@media",nN="@import",sN="@supports",lN="@namespace",wm="@keyframes",K_="@layer",oN="@scope",cN=Math.abs,fc=String.fromCharCode;function J_(e){return e.trim()}function _m(e,t,i){return e.replace(t,i)}function pl(e,t){return e.charCodeAt(t)|0}function Dl(e,t,i){return e.slice(t,i)}function Wr(e){return e.length}function tB(e){return e.length}function pu(e,t){return t.push(e),e}var zd=1,$l=1,eB=0,dr=0,Pe=0,Pl="";function Zy(e,t,i,a,s,l,c,h){return{value:e,root:t,parent:i,type:a,props:s,children:l,line:zd,column:$l,length:c,return:"",siblings:h}}function hN(){return Pe}function uN(){return Pe=dr>0?pl(Pl,--dr):0,$l--,Pe===10&&($l=1,zd--),Pe}function Lr(){return Pe=dr<eB?pl(Pl,dr++):0,$l++,Pe===10&&($l=1,zd++),Pe}function yn(){return pl(Pl,dr)}function Mu(){return dr}function Nd(e,t){return Dl(Pl,e,t)}function _c(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dN(e){return zd=$l=1,eB=Wr(Pl=e),dr=0,[]}function fN(e){return Pl="",e}function vg(e){return J_(Nd(dr-1,Bm(e===91?e+2:e===40?e+1:e)))}function pN(e){for(;(Pe=yn())&&Pe<33;)Lr();return _c(e)>2||_c(Pe)>3?"":" "}function gN(e,t){for(;--t&&Lr()&&!(Pe<48||Pe>102||Pe>57&&Pe<65||Pe>70&&Pe<97););return Nd(e,Mu()+(t<6&&yn()==32&&Lr()==32))}function Bm(e){for(;Lr();)switch(Pe){case e:return dr;case 34:case 39:e!==34&&e!==39&&Bm(Pe);break;case 40:e===41&&Bm(e);break;case 92:Lr();break}return dr}function mN(e,t){for(;Lr()&&e+Pe!==57;)if(e+Pe===84&&yn()===47)break;return"/*"+Nd(t,dr-1)+"*"+fc(e===47?e:Lr())}function yN(e){for(;!_c(yn());)Lr();return Nd(e,dr)}function xN(e){return fN(Ru("",null,null,null,[""],e=dN(e),0,[0],e))}function Ru(e,t,i,a,s,l,c,h,u){for(var f=0,p=0,g=c,x=0,m=0,v=0,C=1,k=1,T=1,_=0,B=0,O="",D=s,N=l,H=a,R=O;k;)switch(v=B,B=Lr()){case 40:v!=108&&pl(R,g-1)==58?(_++,R+="("):R+=vg(B);break;case 41:_--,R+=")";break;case 34:case 39:case 91:R+=vg(B);break;case 9:case 10:case 13:case 32:if(_>0){R+=fc(B);break}R+=pN(v);break;case 92:R+=gN(Mu()-1,7);continue;case 47:switch(yn()){case 42:case 47:pu(bN(mN(Lr(),Mu()),t,i,u),u),(_c(v||1)==5||_c(yn()||1)==5)&&Wr(R)&&Dl(R,-1,void 0)!==" "&&(R+=" ");break;default:R+="/"}break;case 123*C:h[f++]=Wr(R)*T;case 125*C:case 59:case 0:if(_>0&&B){R+=fc(B);break}switch(B){case 0:case 125:k=0;case 59+p:T==-1&&(R=_m(R,/\f/g,"")),m>0&&(Wr(R)-g||C===0)&&pu(m>32?q2(R+";",a,i,g-1,u):q2(_m(R," ","")+";",a,i,g-2,u),u);break;case 59:R+=";";default:if(pu(H=N2(R,t,i,f,p,s,h,O,D=[],N=[],g,l),l),B===123)if(p===0)Ru(R,t,H,H,D,l,g,h,N);else{switch(x){case 99:if(pl(R,3)===110)break;case 108:if(pl(R,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Ru(e,H,H,a&&pu(N2(e,H,H,0,0,s,h,O,s,D=[],g,N),N),s,N,g,h,a?D:N):Ru(R,H,H,H,[""],N,0,h,N)}}f=p=m=0,C=T=1,O=R="",g=c;break;case 58:g=1+Wr(R),m=v;default:if(C<1){if(B==123)--C;else if(B==125&&C++==0&&uN()==125)continue}switch(R+=fc(B),B*C){case 38:T=p>0?1:(R+="\f",-1);break;case 44:if(_>0)break;h[f++]=(Wr(R)-1)*T,T=1;break;case 64:yn()===45&&(R+=vg(Lr())),x=yn(),p=g=Wr(O=R+=yN(Mu())),B++;break;case 45:v===45&&Wr(R)==2&&(C=0)}}return l}function N2(e,t,i,a,s,l,c,h,u,f,p,g){for(var x=s-1,m=s===0?l:[""],v=tB(m),C=0,k=0,T=0;C<a;++C)for(var _=0,B=Dl(e,x+1,x=cN(k=c[C])),O=e;_<v;++_)(O=J_(k>0?m[_]+" "+B:_m(B,/&\f/g,m[_])))&&(u[T++]=O);return Zy(e,t,i,s===0?Z_:h,u,f,p,g)}function bN(e,t,i,a){return Zy(e,t,i,Vy,fc(hN()),Dl(e,2,-2),0,a)}function q2(e,t,i,a,s){return Zy(e,t,i,Q_,Dl(e,0,a),Dl(e,a+1,-1),a,s)}function Em(e,t){for(var i="",a=0;a<e.length;a++)i+=t(e[a],a,e,t)||"";return i}function CN(e,t,i,a){switch(e.type){case K_:if(e.children.length)break;case nN:case lN:case Q_:return e.return=e.return||e.value;case Vy:return"";case wm:return e.return=e.value+"{"+Em(e.children,a)+"}";case Z_:if(!Wr(e.value=e.props.join(",")))return""}return Wr(i=Em(e.children,a))?e.return=e.value+"{"+i+"}":""}function vN(e){var t=tB(e);return function(i,a,s,l){for(var c="",h=0;h<t;h++)c+=e[h](i,a,s,l)||"";return c}}var iB="c4",kN=S(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),SN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-D5W-EiaZ.js");return{diagram:t}},__vite__mapDeps([5,6]));return{id:iB,diagram:e}},"loader"),TN={id:iB,detector:kN,loader:SN},wN=TN,rB="flowchart",_N=S((e,t)=>{var i,a;return((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),BN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DeE-378s.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:rB,diagram:e}},"loader"),EN={id:rB,detector:_N,loader:BN},LN=EN,aB="flowchart-v2",AN=S((e,t)=>{var i,a,s;return((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"?!1:(((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),MN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DeE-378s.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:aB,diagram:e}},"loader"),RN={id:aB,detector:AN,loader:MN},ON=RN,nB="er",FN=S(e=>/^\s*erDiagram/.test(e),"detector"),DN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-DAS50JTz.js");return{diagram:t}},__vite__mapDeps([12,9,10,11]));return{id:nB,diagram:e}},"loader"),$N={id:nB,detector:FN,loader:DN},zN=$N,sB="gitGraph",NN=S(e=>/^\s*gitGraph/.test(e),"detector"),qN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-DsSOgbbA.js");return{diagram:t}},__vite__mapDeps([13,14,15,16]));return{id:sB,diagram:e}},"loader"),IN={id:sB,detector:NN,loader:qN},HN=IN,lB="gantt",jN=S(e=>/^\s*gantt/.test(e),"detector"),UN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-Dewf3yPU.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]));return{id:lB,diagram:e}},"loader"),PN={id:lB,detector:jN,loader:UN},WN=PN,oB="info",YN=S(e=>/^\s*info/.test(e),"detector"),GN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-DAt_731A.js");return{diagram:t}},__vite__mapDeps([21,16]));return{id:oB,diagram:e}},"loader"),XN={id:oB,detector:YN,loader:GN},cB="pie",VN=S(e=>/^\s*pie/.test(e),"detector"),ZN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-GT_zaKLe.js");return{diagram:t}},__vite__mapDeps([22,14,16,23,24,19]));return{id:cB,diagram:e}},"loader"),QN={id:cB,detector:VN,loader:ZN},hB="quadrantChart",KN=S(e=>/^\s*quadrantChart/.test(e),"detector"),JN=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-C6hG_nqx.js");return{diagram:t}},__vite__mapDeps([25,18,19,20]));return{id:hB,diagram:e}},"loader"),t9={id:hB,detector:KN,loader:JN},e9=t9,uB="xychart",i9=S(e=>/^\s*xychart(-beta)?/.test(e),"detector"),r9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-Dv8I6EB4.js");return{diagram:t}},__vite__mapDeps([26,19,24,18,20]));return{id:uB,diagram:e}},"loader"),a9={id:uB,detector:i9,loader:r9},n9=a9,dB="requirement",s9=S(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),l9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-CHrdt67q.js");return{diagram:t}},__vite__mapDeps([27,9,10]));return{id:dB,diagram:e}},"loader"),o9={id:dB,detector:s9,loader:l9},c9=o9,fB="sequence",h9=S(e=>/^\s*sequenceDiagram/.test(e),"detector"),u9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-CpUTpqpu.js");return{diagram:t}},__vite__mapDeps([28,6,15]));return{id:fB,diagram:e}},"loader"),d9={id:fB,detector:h9,loader:u9},f9=d9,pB="class",p9=S((e,t)=>{var i;return((i=t==null?void 0:t.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),g9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-BXOtSyo7.js");return{diagram:t}},__vite__mapDeps([29,30,8,6,9,10]));return{id:pB,diagram:e}},"loader"),m9={id:pB,detector:p9,loader:g9},y9=m9,gB="classDiagram",x9=S((e,t)=>{var i;return/^\s*classDiagram/.test(e)&&((i=t==null?void 0:t.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),b9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-BXOtSyo7.js");return{diagram:t}},__vite__mapDeps([31,30,8,6,9,10]));return{id:gB,diagram:e}},"loader"),C9={id:gB,detector:x9,loader:b9},v9=C9,mB="state",k9=S((e,t)=>{var i;return((i=t==null?void 0:t.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),S9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CrsERnzj.js");return{diagram:t}},__vite__mapDeps([32,33,9,10,1,2]));return{id:mB,diagram:e}},"loader"),T9={id:mB,detector:k9,loader:S9},w9=T9,yB="stateDiagram",_9=S((e,t)=>{var i;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((i=t==null?void 0:t.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},"detector"),B9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-D73MkSbN.js");return{diagram:t}},__vite__mapDeps([34,33,9,10]));return{id:yB,diagram:e}},"loader"),E9={id:yB,detector:_9,loader:B9},L9=E9,xB="journey",A9=S(e=>/^\s*journey/.test(e),"detector"),M9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-BJfVYlQ1.js");return{diagram:t}},__vite__mapDeps([35,8,6,23]));return{id:xB,diagram:e}},"loader"),R9={id:xB,detector:A9,loader:M9},O9=R9,F9=S((e,t,i)=>{mt.debug(`rendering svg for syntax error
434
- `);const a=m6(t),s=a.append("g");a.attr("viewBox","0 0 2412 512"),Vv(a,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),bB={draw:F9},D9=bB,$9={db:{},renderer:bB,parser:{parse:S(()=>{},"parse")}},z9=$9,CB="flowchart-elk",N9=S((e,t={})=>{var i;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),q9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-DeE-378s.js");return{diagram:t}},__vite__mapDeps([7,8,6,9,10,11]));return{id:CB,diagram:e}},"loader"),I9={id:CB,detector:N9,loader:q9},H9=I9,vB="timeline",j9=S(e=>/^\s*timeline/.test(e),"detector"),U9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-Dj9KPhNj.js");return{diagram:t}},__vite__mapDeps([36,23]));return{id:vB,diagram:e}},"loader"),P9={id:vB,detector:j9,loader:U9},W9=P9,kB="mindmap",Y9=S(e=>/^\s*mindmap/.test(e),"detector"),G9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-p8Q0AQcY.js");return{diagram:t}},__vite__mapDeps([37,9,10]));return{id:kB,diagram:e}},"loader"),X9={id:kB,detector:Y9,loader:G9},V9=X9,SB="kanban",Z9=S(e=>/^\s*kanban/.test(e),"detector"),Q9=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-BjTvHNu5.js");return{diagram:t}},__vite__mapDeps([38,8]));return{id:SB,diagram:e}},"loader"),K9={id:SB,detector:Z9,loader:Q9},J9=K9,TB="sankey",tq=S(e=>/^\s*sankey(-beta)?/.test(e),"detector"),eq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-Dz_VzhnN.js");return{diagram:t}},__vite__mapDeps([39,24,19]));return{id:TB,diagram:e}},"loader"),iq={id:TB,detector:tq,loader:eq},rq=iq,wB="packet",aq=S(e=>/^\s*packet(-beta)?/.test(e),"detector"),nq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-gtSx4MhZ.js");return{diagram:t}},__vite__mapDeps([40,14,16]));return{id:wB,diagram:e}},"loader"),sq={id:wB,detector:aq,loader:nq},_B="radar",lq=S(e=>/^\s*radar-beta/.test(e),"detector"),oq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-DF97RON9.js");return{diagram:t}},__vite__mapDeps([41,14,16]));return{id:_B,diagram:e}},"loader"),cq={id:_B,detector:lq,loader:oq},BB="block",hq=S(e=>/^\s*block(-beta)?/.test(e),"detector"),uq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-3TSaM49r.js");return{diagram:t}},__vite__mapDeps([42,8,1,11]));return{id:BB,diagram:e}},"loader"),dq={id:BB,detector:hq,loader:uq},fq=dq,EB="treeView",pq=S(e=>/^\s*treeView-beta/.test(e),"detector"),gq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-CO0LSEnt.js");return{diagram:t}},__vite__mapDeps([43,14,15,16]));return{id:EB,diagram:e}},"loader"),mq={id:EB,detector:pq,loader:gq},yq=mq,LB="architecture",xq=S(e=>/^\s*architecture/.test(e),"detector"),bq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-DJ9cgQMo.js");return{diagram:t}},__vite__mapDeps([44,14,16,4]));return{id:LB,diagram:e}},"loader"),Cq={id:LB,detector:xq,loader:bq},vq=Cq,AB="eventmodeling",kq=S(e=>/^\s*eventmodeling/.test(e),"detector"),Sq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-BeUvdtva.js");return{diagram:t}},__vite__mapDeps([45,14,16]));return{id:AB,diagram:e}},"loader"),Tq={id:AB,detector:kq,loader:Sq},wq=Tq,MB="ishikawa",_q=S(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Bq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-C1m5tBb_.js");return{diagram:t}},[]);return{id:MB,diagram:e}},"loader"),Eq={id:MB,detector:_q,loader:Bq},RB="venn",Lq=S(e=>/^\s*venn-beta/.test(e),"detector"),Aq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-BF-ujuZh.js");return{diagram:t}},[]);return{id:RB,diagram:e}},"loader"),Mq={id:RB,detector:Lq,loader:Aq},Rq=Mq,OB="treemap",Oq=S(e=>/^\s*treemap/.test(e),"detector"),Fq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-CGvTzwl5.js");return{diagram:t}},__vite__mapDeps([46,10,14,16,20,24,19]));return{id:OB,diagram:e}},"loader"),Dq={id:OB,detector:Oq,loader:Fq},FB="wardley-beta",$q=S(e=>/^\s*wardley-beta/i.test(e),"detector"),zq=S(async()=>{const{diagram:e}=await ie(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-BVUZJ1m9.js");return{diagram:t}},__vite__mapDeps([47,14,16]));return{id:FB,diagram:e}},"loader"),Nq={id:FB,detector:$q,loader:zq},qq=Nq,I2=!1,qd=S(()=>{I2||(I2=!0,ju("error",z9,e=>e.toLowerCase().trim()==="error"),ju("---",{db:{clear:S(()=>{},"clear")},styles:{},renderer:{draw:S(()=>{},"draw")},parser:{parse:S(()=>{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:S(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Og(H9,V9,vq),Og(wN,J9,v9,y9,zN,WN,XN,QN,c9,f9,ON,LN,W9,HN,L9,w9,O9,e9,rq,sq,n9,fq,wq,yq,cq,Eq,Dq,Rq,qq))},"addDiagrams"),Iq=S(async()=>{mt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(es).map(async([i,{detector:a,loader:s}])=>{if(s)try{Ng(i)}catch{try{const{diagram:l,id:c}=await s();ju(c,l,a)}catch(l){throw mt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete es[i],l}}}))).filter(i=>i.status==="rejected");if(t.length>0){mt.error(`Failed to load ${t.length} external diagrams`);for(const i of t)mt.error(i);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Hq="graphics-document document";function DB(e,t){e.attr("role",Hq),t!==""&&e.attr("aria-roledescription",t)}S(DB,"setA11yDiagramInfo");function $B(e,t,i,a){if(e.insert!==void 0){if(i){const s=`chart-desc-${a}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(i)}if(t){const s=`chart-title-${a}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}S($B,"addSVGa11yTitleDescription");var Jn,Lm=(Jn=class{constructor(t,i,a,s,l){this.type=t,this.text=i,this.db=a,this.parser=s,this.renderer=l}static async fromText(t,i={}){var f,p;const a=Le(),s=Km(t,a);t=b$(t)+`
435
- `;try{Ng(s)}catch{const g=$5(s);if(!g)throw new Fv(`Diagram ${s} not found.`);const{id:x,diagram:m}=await g();ju(x,m)}const{db:l,parser:c,renderer:h,init:u}=Ng(s);return c.parser&&(c.parser.yy=l),(f=l.clear)==null||f.call(l),u==null||u(a),i.title&&((p=l.setDiagramTitle)==null||p.call(l,i.title)),await c.parse(t),new Jn(s,t,l,c,h)}async render(t,i){await this.renderer.draw(this.text,t,i,this)}getParser(){return this.parser}getType(){return this.type}},S(Jn,"Diagram"),Jn),H2=[],jq=S(()=>{H2.forEach(e=>{e()}),H2=[]},"attachFunctions"),Uq=S(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zB(e){const t=e.match(Ov);if(!t)return{text:e,metadata:{}};let i=SD(t[1],{schema:kD})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};const a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}S(zB,"extractFrontMatter");var Pq=S(e=>e.replace(/\r\n?/g,`
436
- `).replace(/<(\w+)([^>]*)>/g,(t,i,a)=>"<"+i+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Wq=S(e=>{const{text:t,metadata:i}=zB(e),{displayMode:a,title:s,config:l={}}=i;return a&&(l.gantt||(l.gantt={}),l.gantt.displayMode=a),{title:s,config:l,text:t}},"processFrontmatter"),Yq=S(e=>{const t=_r.detectInit(e)??{},i=_r.detectDirective(e,"wrap");return Array.isArray(i)?t.wrap=i.some(({type:a})=>a==="wrap"):(i==null?void 0:i.type)==="wrap"&&(t.wrap=!0),{text:s$(e),directive:t}},"processDirectives");function Qy(e){const t=Pq(e),i=Wq(t),a=Yq(i.text),s=Oy(i.config,a.directive);return e=Uq(a.text),{code:e,title:i.title,config:s}}S(Qy,"preprocessDiagram");function NB(e){const t=new TextEncoder().encode(e),i=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(i)}S(NB,"toBase64");var Gq=5e4,Xq="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Vq="sandbox",Zq="loose",Qq="http://www.w3.org/2000/svg",Kq="http://www.w3.org/1999/xlink",Jq="http://www.w3.org/1999/xhtml",t7="100%",e7="100%",i7="border:0;margin:0;",r7="margin:0",a7="allow-top-navigation-by-user-activation allow-popups",n7='The "iframe" tag is not supported by your browser.',s7=["foreignobject"],l7=["dominant-baseline"];function Ky(e){const t=Qy(e);return Iu(),cR(t.config??{}),t}S(Ky,"processAndSetConfigs");async function qB(e,t){qd();try{const{code:i,config:a}=Ky(e);return{diagramType:(await HB(i)).type,config:a}}catch(i){if(t!=null&&t.suppressErrors)return!1;throw i}}S(qB,"parse");var j2=S((e,t,i=[])=>{const a=qv(`{ ${i.join(" !important; ")} !important; }`);return`.${e} ${t} ${a}`},"cssImportantStyles"),o7=S((e,t=new Map)=>{const i=new CSSStyleSheet;if(e.fontFamily!==void 0&&i.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,i.cssRules.length),e.altFontFamily!==void 0&&i.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,i.cssRules.length),t instanceof Map){const h=wi(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(u=>{i2(u.styles)||h.forEach(f=>{i.insertRule(j2(u.id,f,u.styles),i.cssRules.length)}),i2(u.textStyles)||i.insertRule(j2(u.id,"tspan",((u==null?void 0:u.textStyles)||[]).map(f=>f.replace("color","fill"))),i.cssRules.length)})}let a="";if(e.themeCSS!==void 0)if(typeof i.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),a=zg(s)+`
437
- `}else a+=`${e.themeCSS}
438
- `;return a+zg(i)},"createCssStyles"),c7=S((e,t)=>Em(xN(`${e}{${t}}`),vN([S(function(a,s,l,c){if(a.type==="rule"&&Array.isArray(a.props)){if(a.parent&&a.parent.type===wm)return;a.props=a.props.map(h=>h.startsWith(e)?h:`${e} ${h}`)}else a.type.startsWith("@")&&([...[aN,sN,K_,oN,"@container","@starting-style"],wm].includes(a.type)||(mt.warn(`Removing unsupported at-rule ${a.type} from CSS`),a.type=Vy))},"addNamespace"),CN])),"compileCSS"),h7=S((e,t,i,a)=>{const s=o7(e,i),l=ER(t,s,{...e.themeVariables,theme:e.theme,look:e.look},a);return c7(a,l)},"createUserStyles"),u7=S((e="",t,i)=>{let a=e;return!i&&!t&&(a=a.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),a=ns(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),d7=S((e="",t)=>{var s,l;const i=(l=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&l.height?t.viewBox.baseVal.height+"px":e7,a=NB(`<body style="${r7}">${e}</body>`);return`<iframe style="width:${t7};height:${i};${i7}" src="data:text/html;charset=UTF-8;base64,${a}" sandbox="${a7}">
439
- ${n7}
440
- </iframe>`},"putIntoIFrame"),U2=S((e,t,i,a,s)=>{const l=e.append("div");l.attr("id",i),a&&l.attr("style",a);const c=l.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Qq);return s&&c.attr("xmlns:xlink",s),c.append("g"),e},"appendDivSvgG");function Am(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}S(Am,"sandboxedIframe");var f7=S((e,t,i,a)=>{var s,l,c;(s=e.getElementById(t))==null||s.remove(),(l=e.getElementById(i))==null||l.remove(),(c=e.getElementById(a))==null||c.remove()},"removeExistingElements"),p7=S(async function(e,t,i){var et,tt,X,Y,M,I;qd();const a=Ky(t);t=a.code;const s=Le();mt.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Gq)&&(t=Xq);const l=`#${e}`,c="i"+e,h="#"+c,u="d"+e,f="#"+u,p=S(()=>{const F=Xt(x?h:f).node();F&&"remove"in F&&F.remove()},"removeTempElements");let g=Xt(document.body);const x=s.securityLevel===Vq,m=s.securityLevel===Zq,v=s.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const $=Am(Xt(i),c);g=Xt($.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Xt(i);U2(g,e,u,`font-family: ${v}`,Kq)}else{if(f7(document,e,u,c),x){const $=Am(Xt(document.body),c);g=Xt($.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Xt("body");U2(g,e,u)}let C,k;try{C=await Lm.fromText(t,{title:a.title})}catch($){if(s.suppressErrorRendering)throw p(),$;C=await Lm.fromText("error"),k=$}const T=g.select(f).node(),_=C.type,B=T.firstChild,O=B.firstChild,D=(tt=(et=C.renderer).getClasses)==null?void 0:tt.call(et,t,C),N=h7(s,_,D,l),H=document.createElement("style");H.innerHTML=N,B.insertBefore(H,O);try{await C.renderer.draw(t,e,"11.15.0",C)}catch($){throw s.suppressErrorRendering?p():D9.draw(t,e,"11.15.0"),$}const R=g.select(`${f} svg`),Z=(Y=(X=C.db).getAccTitle)==null?void 0:Y.call(X),P=(I=(M=C.db).getAccDescription)==null?void 0:I.call(M);jB(_,R,Z,P),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Jq);let W=g.select(f).node().innerHTML;if(mt.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),W=u7(W,x,Ea(s.arrowMarkerAbsolute)),x){const $=g.select(f+" svg").node();W=d7(W,$)}else m||(W=Ll.sanitize(W,{ADD_TAGS:s7,ADD_ATTR:l7,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(jq(),k)throw k;return p(),{diagramType:_,svg:W,bindFunctions:C.db.bindFunctions}},"render");function IB(e={}){var a;const t=Xe({},e);t!=null&&t.fontFamily&&!((a=t.themeVariables)!=null&&a.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),lR(t),t!=null&&t.theme&&t.theme in Sa?t.themeVariables=Sa[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Sa.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?sR(t):Iv();Qm(i.logLevel),qd()}S(IB,"initialize");var HB=S((e,t={})=>{const{code:i}=Qy(e);return Lm.fromText(i,t)},"getDiagramFromText");function jB(e,t,i,a){DB(t,e),$B(t,i,a,t.attr("id"))}S(jB,"addA11yInfo");var ls=Object.freeze({render:p7,parse:qB,getDiagramFromText:HB,initialize:IB,getConfig:Le,setConfig:Hv,getSiteConfig:Iv,updateSiteConfig:oR,reset:S(()=>{Iu()},"reset"),globalReset:S(()=>{Iu(Al)},"globalReset"),defaultConfig:Al});Qm(Le().logLevel);Iu(Le());var g7=S((e,t,i)=>{mt.warn(e),Ry(e)?(i&&i(e.str,e.hash),t.push({...e,message:e.str,error:e})):(i&&i(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),UB=S(async function(e={querySelector:".mermaid"}){try{await m7(e)}catch(t){if(Ry(t)&&mt.error(t.str),Vi.parseError&&Vi.parseError(t),!e.suppressErrors)throw mt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),m7=S(async function({postRenderCallback:e,querySelector:t,nodes:i}={querySelector:".mermaid"}){const a=ls.getConfig();mt.debug(`${e?"":"No "}Callback function found`);let s;if(i)s=i;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");mt.debug(`Found ${s.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(mt.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),ls.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const l=new _r.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const h=[];for(const u of Array.from(s)){if(mt.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const f=`mermaid-${l.next()}`;c=u.innerHTML,c=rw(_r.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=_r.detectInit(c);p&&mt.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await GB(f,c,u);u.innerHTML=g,e&&await e(f),x&&x(u)}catch(g){g7(g,h,Vi.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),PB=S(function(e){ls.initialize(e)},"initialize"),y7=S(async function(e,t,i){mt.warn("mermaid.init is deprecated. Please use run instead."),e&&PB(e);const a={postRenderCallback:i,querySelector:".mermaid"};typeof t=="string"?a.querySelector=t:t&&(t instanceof HTMLElement?a.nodes=[t]:a.nodes=t),await UB(a)},"init"),x7=S(async(e,{lazyLoad:t=!0}={})=>{qd(),Og(...e),t===!1&&await Iq()},"registerExternalDiagrams"),WB=S(function(){if(Vi.startOnLoad){const{startOnLoad:e}=ls.getConfig();e&&Vi.run().catch(t=>mt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",WB,!1);var b7=S(function(e){Vi.parseError=e},"setParseErrorHandler"),pd=[],kg=!1,YB=S(async()=>{if(!kg){for(kg=!0;pd.length>0;){const e=pd.shift();if(e)try{await e()}catch(t){mt.error("Error executing queue",t)}}kg=!1}},"executeQueue"),C7=S(async(e,t)=>new Promise((i,a)=>{const s=S(()=>new Promise((l,c)=>{ls.parse(e,t).then(h=>{l(h),i(h)},h=>{var u;mt.error("Error parsing",h),(u=Vi.parseError)==null||u.call(Vi,h),c(h),a(h)})}),"performCall");pd.push(s),YB().catch(a)}),"parse"),GB=S((e,t,i)=>new Promise((a,s)=>{const l=S(()=>new Promise((c,h)=>{ls.render(e,t,i).then(u=>{c(u),a(u)},u=>{var f;mt.error("Error parsing",u),(f=Vi.parseError)==null||f.call(Vi,u),h(u),s(u)})}),"performCall");pd.push(l),YB().catch(s)}),"render"),v7=S(()=>Object.keys(es).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Vi={startOnLoad:!0,mermaidAPI:ls,parse:C7,render:GB,init:y7,run:UB,registerExternalDiagrams:x7,registerLayoutLoaders:V_,initialize:PB,parseError:void 0,contentLoaded:WB,setParseErrorHandler:b7,detectType:Km,registerIconPacks:_8,getRegisteredDiagramsMetadata:v7},Mm=Vi;/*! Check if previously processed *//*!
441
- * Wait for document loaded before starting the execution
442
- */Mm.initialize({startOnLoad:!1,theme:"dark",themeVariables:{primaryColor:"#0ea5e9",primaryTextColor:"#e2e8f0",primaryBorderColor:"#334155",lineColor:"#94a3b8",secondaryColor:"#1e293b",tertiaryColor:"#0f172a",fontSize:"13px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},securityLevel:"loose",flowchart:{htmlLabels:!0,curve:"basis"}});function P2(e,t){const{escapeHtml:i=!1}=t??{},a=/[├└│─╠╚═╞╟╤╪]/,s=[],l=/(```|~~~)[\s\S]*?\1/g;let c=0,h;for(;(h=l.exec(e))!==null;)h.index>c&&s.push({type:"text",content:e.slice(c,h.index)}),s.push({type:"fence",content:h[0]}),c=h.index+h[0].length;c<e.length&&s.push({type:"text",content:e.slice(c)});const u=s.map(f=>{if(f.type==="fence")return f;let p=f.content;const g=p.split(`
443
- `),x=[];let m=!1,v=[],C=0;const k=()=>{const T=v.join(`
444
- `);try{JSON.parse(T),x.push("\n```json\n"+T+"\n```\n")}catch{x.push(...v)}m=!1,v=[],C=0};for(const T of g){const _=T.trim();!m&&_.startsWith('{"')?(m=!0,v=[T],C=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,C<=0&&k()):m?(v.push(T),C+=(T.match(/{/g)||[]).length-(T.match(/}/g)||[]).length,C<=0&&k()):x.push(T)}if(v.length&&x.push(...v),p=x.join(`
445
- `),a.test(p)){const T=p.split(`
446
- `),_=[];let B=[];const O=()=>{B.length>0&&(_.push("\n```\n"+B.join(`
447
- `).replace(/^\n+/,"").replace(/\n+$/,"")+"\n```\n"),B=[])};for(const D of T)a.test(D)?B.push(D):(O(),_.push(D));O(),p=_.join(`
448
- `)}return p=p.replace(/^(#{1,6})([^\s#\n])/gm,"$1 $2"),p=p.replace(/^-([^\s\-])/gm,"- $1"),p=p.replace(/([^\n])(\n?)(#{1,6}\s)/g,(T,_,B,O)=>B&&_===`
449
- `||/[{(\[\\/>]$/.test(_)?T:_+`
450
-
451
- `+O),p=p.replace(/(#{1,6}\s[\u4e00-\u9fffa-zA-Z0-9\s]{1,30}?)(?=[^\u4e00-\u9fffa-zA-Z0-9\s\n#])/g,`$1
452
- `),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(- (?!-))/g,`$1
453
- $2`),p=p.replace(/([^\n\s{}()\[\]"':\/\\>])(\d+\.\s)/g,`$1
454
- $2`),p=p.replace(/([^\n])(```|~~~)/g,`$1
455
- $2`),p=p.replace(/^([\u4e00-\u9fffa-zA-Z0-9])([\u{2700}-\u{27BF}\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}])/gmu,`$1
456
- $2`),{type:"text",content:p}});if(i){const f=[];for(const p of u){if(p.type==="fence"){f.push(p.content);continue}const g=/(```|~~~)[\s\S]*?\1/g;let x=0,m;for(;(m=g.exec(p.content))!==null;)m.index>x&&f.push(p.content.slice(x,m.index).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),f.push(m[0]),x=m.index+m[0].length;x<p.content.length&&f.push(p.content.slice(x).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))}return f.join("")}return u.map(f=>f.content).join("")}function W2(){const{sessionId:e}=sv(),{messages:t,isLoading:i,isHistoryLoading:a,error:s,sendMessage:l,clearMessages:c,abortChat:h,subAgents:u,thinkingStatus:f}=iM(e),{status:p}=xd(),[g,x]=z.useState(""),[m,v]=z.useState(!1),C=z.useRef(new Map),k=z.useRef(null),T=z.useRef(null),_=z.useRef(!0),B=z.useRef(null),[O,D]=z.useState(0),[N,H]=z.useState([]),[R,Z]=z.useState(null),[P,W]=z.useState(!1),[et,tt]=z.useState([]),[X,Y]=z.useState(null),[M,I]=z.useState(!1),$=mv();z.useEffect(()=>{if($.isRecording){const U=$.drainFinalized();U&&x(ct=>ct?ct+U:U)}if(!$.isRecording){const U=$.drainFinalized();U&&x(ct=>ct?ct+U:U),$.clearTranscript()}},[$.isRecording,$.transcript]),z.useEffect(()=>{Wt.getAudioSettings().then(U=>{var ct,Ct,Ot;$.updateSettings({ttsProvider:((ct=U.tts)==null?void 0:ct.provider)||"edge",ttsVoice:((Ct=U.tts)==null?void 0:Ct.voice)||"zh-CN-XiaoxiaoNeural",ttsRate:((Ot=U.tts)==null?void 0:Ot.rate)||"+0%"})}).catch(()=>{})},[]),z.useEffect(()=>{(async()=>{try{H(await Wt.listModels())}catch{}try{const U=await Wt.getStatus();Z(U.model),Y(U.currentAgent)}catch{}try{const U=await Wt.listAgents();tt(U.agents)}catch{}})()},[]);const F=async U=>{try{const ct=await Wt.switchModel(U.id);ct.success&&Z(ct.model)}catch{}W(!1)},Q=async U=>{try{const ct=await Wt.switchAgent(U);ct.success&&Y(ct.currentAgent)}catch{}I(!1)},q=z.useMemo(()=>{const U=new Map;for(const ct of N){const Ct=ct.providerDisplayName??ct.provider;U.has(Ct)||U.set(Ct,[]),U.get(Ct).push(ct)}return U},[N]),it=u.filter(U=>U.status==="running"),ut=()=>{const U=T.current;U&&(_.current=U.scrollHeight-U.scrollTop-U.clientHeight<80)};z.useEffect(()=>{var ct;if(!_.current)return;const U=T.current;U&&(i?U.scrollTop=U.scrollHeight:(ct=k.current)==null||ct.scrollIntoView({behavior:"smooth"}))},[t,it,f,i]),z.useEffect(()=>{if(!f){D(0);return}const U=setInterval(()=>{D(Math.floor((Date.now()-f.startTime)/1e3))},500);return()=>clearInterval(U)},[f]);const dt=U=>{var ct;if(U.preventDefault(),g.trim()&&!i){_.current=!0;let Ct=g.trim();for(const[Ot,Jt]of C.current)Ct=Ct.replaceAll(Ot,Jt);C.current.clear(),l(Ct),x("")}(ct=B.current)==null||ct.focus()};z.useEffect(()=>{var U;(U=B.current)==null||U.focus()},[]),z.useEffect(()=>{var U;i||(U=B.current)==null||U.focus()},[i]),z.useEffect(()=>{const U=ct=>{ct.key==="Escape"&&i&&(ct.preventDefault(),h())};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[i,h]);const yt=z.useRef(0),xt=U=>{U.preventDefault(),U.stopPropagation(),yt.current++,U.dataTransfer.types.includes("Files")&&v(!0)},Rt=U=>{U.preventDefault(),U.stopPropagation(),yt.current--,yt.current===0&&v(!1)},Ft=U=>{U.preventDefault(),U.stopPropagation()},Ut=async U=>{var me;U.preventDefault(),U.stopPropagation(),yt.current=0,v(!1);const ct=U.dataTransfer.files;if(ct.length===0)return;const Ct=[],Ot=[];for(let Ht=0;Ht<ct.length;Ht++){const Ae=ct[Ht],De=Ae.path;De?Ct.push(De):Ot.push(Ae)}if(Ot.length>0)try{const Ht=Je=>new Promise((Kr,Ki)=>{const pr=new FileReader;pr.onload=()=>Kr(pr.result),pr.onerror=Ki,pr.readAsDataURL(Je)}),Ae=await Promise.all(Ot.map(async Je=>({name:Je.name,data:(await Ht(Je)).split(",")[1]}))),De=await fetch("/api/files/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:Ae})});if(De.ok){const Je=await De.json();Ct.push(...Je.paths||[])}}catch(Ht){console.error("[aggroot] File upload failed:",Ht)}if(Ct.length===0)return;const Jt=[];for(const Ht of Ct){const Ae=Ht.includes("/")?"/":"\\",Je=`@${Ht.slice(Ht.lastIndexOf(Ae)+1)}`;C.current.set(Je,Ht),Jt.push(Je)}x(Ht=>{const Ae=Jt.join(" ");return Ht?`${Ht} ${Ae}`:Ae}),(me=B.current)==null||me.focus()};return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},onDragEnter:xt,onDragLeave:Rt,onDragOver:Ft,onDrop:Ut,children:[L.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,background:"linear-gradient(180deg, rgba(99,102,241,0.04) 0%, transparent 100%)"},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flex:1},children:[L.jsx("h2",{style:{fontSize:16,fontWeight:600},className:"gradient-text",children:"Chat"}),L.jsxs("div",{style:{position:"relative"},children:[L.jsxs("button",{className:"btn-ghost",onClick:()=>{I(!M),W(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[X??"Agent",L.jsx("span",{style:{fontSize:10},children:"▼"})]}),M&&L.jsx("div",{style:{position:"absolute",top:"100%",left:0,zIndex:100,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)",maxHeight:300,overflow:"auto",minWidth:200,marginTop:4},children:et.map(U=>L.jsxs("div",{onClick:()=>Q(U.name),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:U.name===X?"var(--accent-soft)":"transparent",color:U.name===X?"var(--accent)":"var(--text-primary)",fontWeight:U.name===X?500:400},onMouseEnter:ct=>ct.currentTarget.style.background="var(--bg-hover)",onMouseLeave:ct=>ct.currentTarget.style.background=U.name===X?"var(--accent-soft)":"transparent",children:[L.jsx("div",{children:U.name}),U.description&&L.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:U.description})]},U.name))})]}),L.jsxs("div",{style:{position:"relative"},children:[L.jsxs("button",{className:"btn-ghost",onClick:()=>{W(!P),I(!1)},style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:[(R==null?void 0:R.name)??"Select Model",L.jsx("span",{style:{fontSize:10},children:"▼"})]}),P&&L.jsx("div",{style:{position:"absolute",top:"100%",left:0,zIndex:100,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",boxShadow:"0 4px 20px rgba(0,0,0,0.4)",maxHeight:400,overflow:"auto",minWidth:260,marginTop:4},children:Array.from(q.entries()).map(([U,ct])=>L.jsxs("div",{children:[L.jsx("div",{style:{padding:"6px 12px",fontSize:11,fontWeight:600,color:"var(--violet)",textTransform:"uppercase",letterSpacing:.5},children:U}),ct.map(Ct=>L.jsx("div",{onClick:()=>F(Ct),style:{padding:"8px 12px",cursor:"pointer",fontSize:13,background:Ct.id===(R==null?void 0:R.id)?"var(--accent-soft)":"transparent",color:Ct.id===(R==null?void 0:R.id)?"var(--accent)":"var(--text-primary)",fontWeight:Ct.id===(R==null?void 0:R.id)?500:400},onMouseEnter:Ot=>Ot.currentTarget.style.background="var(--bg-hover)",onMouseLeave:Ot=>Ot.currentTarget.style.background=Ct.id===(R==null?void 0:R.id)?"var(--accent-soft)":"transparent",children:Ct.name},Ct.id))]},U))})]})]}),(p==null?void 0:p.workingDirectory)&&L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,color:"var(--text-muted)",background:"var(--violet-soft)",padding:"3px 8px",borderRadius:"var(--radius-sm)",maxWidth:400,overflow:"hidden"},title:p.workingDirectory,children:[L.jsx("span",{style:{flexShrink:0,fontSize:10,fontWeight:600,color:"var(--violet)"},children:"WorkDir:"}),L.jsx("span",{style:{fontFamily:"monospace",color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.workingDirectory})]}),L.jsx("button",{className:"btn-ghost",onClick:c,children:"Clear"})]}),L.jsxs("div",{ref:T,onScroll:ut,style:{flex:1,overflow:"auto",padding:"16px 20px"},children:[a?L.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:"Loading history..."}):t.length===0&&!f&&L.jsxs("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:[L.jsx("div",{style:{fontSize:48,marginBottom:16,opacity:.3},children:"💬"}),"Start a conversation by typing a message below."]}),t.map(U=>L.jsx(w7,{message:U},U.id)),it.length>0?L.jsx(T7,{agents:it}):f?L.jsx(S7,{status:f,elapsed:O}):null,s&&L.jsx("div",{style:{padding:12,background:"var(--rose-soft)",borderRadius:"var(--radius)",color:"var(--rose)",fontSize:13,marginBottom:12,border:"1px solid rgba(244, 63, 94, 0.2)"},children:s}),L.jsx("div",{ref:k})]}),L.jsx("form",{onSubmit:dt,style:{padding:"0 20px 16px",display:"flex",alignItems:"flex-end",gap:0},children:L.jsxs("div",{style:{flex:1,display:"flex",alignItems:"flex-end",background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",overflow:"hidden",transition:"border-color 0.2s"},children:[L.jsx("textarea",{ref:B,value:g,onChange:U=>x(U.target.value),onKeyDown:U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),dt(U))},placeholder:"Type a message... (Shift+Enter for new line)",disabled:i,rows:6,style:{flex:1,resize:"none",border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:14,lineHeight:1.5,padding:"14px 16px",minHeight:132,fontFamily:"inherit"}}),L.jsx("button",{type:"button",onClick:()=>{$.isRecording?$.stopRecording():$.startRecording()},style:{background:$.isRecording?"var(--rose-soft)":"transparent",border:"none",color:$.isRecording?"var(--rose)":"var(--text-muted)",padding:"14px 10px",cursor:"pointer",display:"flex",alignItems:"center",transition:"all 0.2s",alignSelf:"stretch"},title:$.isRecording?"Stop recording":"Start voice input",children:$.isRecording?L.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"var(--rose)",stroke:"var(--rose)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[L.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),L.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),L.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),L.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}):L.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[L.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),L.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),L.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),L.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),$.isRecording&&L.jsxs("span",{style:{color:"var(--rose)",fontSize:11,fontWeight:500,padding:"14px 4px",display:"flex",alignItems:"center",gap:4,animation:"pulse 1.5s ease-in-out infinite"},children:[L.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:"var(--rose)"}}),"REC"]}),L.jsx("button",{type:"submit",disabled:i||!g.trim(),style:{background:g.trim()&&!i?"var(--accent)":"var(--bg-hover)",color:g.trim()&&!i?"white":"var(--text-muted)",border:"none",borderRadius:"0 var(--radius-lg) var(--radius-lg) 0",padding:"14px 18px",cursor:g.trim()&&!i?"pointer":"default",fontSize:16,display:"flex",alignItems:"center",transition:"all 0.2s",alignSelf:"stretch"},children:L.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[L.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),L.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})}),m&&L.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(14, 165, 233, 0.08)",border:"2px dashed var(--accent)",borderRadius:"var(--radius-lg)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,pointerEvents:"none"},children:L.jsx("div",{style:{color:"var(--accent)",fontSize:16,fontWeight:500,background:"var(--bg-primary)",padding:"12px 24px",borderRadius:"var(--radius)",border:"1px solid var(--accent)"},children:"Drop file here to insert path"})})]})}const Sg=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],Tg=["○","◎","●","◎"];function XB(e=80){const[t,i]=z.useState(0);return z.useEffect(()=>{const a=setInterval(()=>i(s=>(s+1)%Sg.length),e);return()=>clearInterval(a)},[e]),Sg[t%Sg.length]}function k7(e=375){const[t,i]=z.useState(0);return z.useEffect(()=>{const a=setInterval(()=>i(s=>(s+1)%Tg.length),e);return()=>clearInterval(a)},[e]),Tg[t%Tg.length]}function VB(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m${e%60}s`:`${Math.floor(e/3600)}h${Math.floor(e%3600/60)}m${e%60}s`}function S7({status:e,elapsed:t}){const i=XB(),{color:a,bg:s,label:l}=e.phase==="thinking"?{color:"var(--cyan)",bg:"var(--cyan-soft)",label:"Thinking"}:e.phase==="tool_calling"?{color:"var(--amber)",bg:"var(--amber-soft)",label:"Tool"}:{color:"var(--emerald)",bg:"var(--emerald-soft)",label:"Gen"};return L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",marginTop:8,fontSize:13,lineHeight:1.5,background:s,borderRadius:"var(--radius-sm)",border:`1px solid ${a}22`},children:[L.jsx("span",{style:{color:a,fontFamily:"monospace",fontWeight:700},children:i}),L.jsxs("span",{style:{color:a,fontWeight:500,fontSize:11,opacity:.7},children:["[",l,"]"]}),L.jsx("span",{style:{color:"var(--text-secondary)"},children:e.text}),t>0&&L.jsx("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:"auto"},children:VB(t)}),L.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"[ESC打断]"})]})}const Y2=["#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e"];function T7({agents:e}){const t=XB(),i=k7(),[a,s]=z.useState(Date.now());z.useEffect(()=>{const h=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(h)},[]);const l=Math.min(...e.map(h=>h.startTime)),c=VB(Math.floor((a-l)/1e3));return L.jsxs("div",{style:{marginTop:4,marginBottom:8,padding:"8px 10px",fontSize:12,lineHeight:1.8,background:"var(--amber-soft)",borderRadius:"var(--radius-sm)",border:"1px solid rgba(245, 158, 11, 0.15)"},children:[L.jsxs("div",{children:[L.jsx("span",{style:{color:"var(--amber)",fontFamily:"monospace",fontWeight:700},children:t})," ",L.jsx("span",{style:{color:"var(--amber)",fontWeight:600},children:"SubagentExecutor"})," ",L.jsxs("span",{style:{color:"var(--text-muted)"},children:["[",c,"]"]})]}),e.map((h,u)=>{const p=u===e.length-1?" └─ ":" ├─ ",g=h.lines.length>0?h.lines[h.lines.length-1]:"思考中...",x=h.toolCount>0?` ${h.toolCount} tools`:"",m=Y2[u%Y2.length];return L.jsxs("div",{children:[L.jsx("span",{style:{color:"var(--text-muted)"},children:p}),L.jsx("span",{style:{color:m,fontWeight:500},children:h.name})," ",L.jsx("span",{style:{color:m,opacity:.6},children:i})," ",L.jsxs("span",{style:{color:"var(--text-muted)"},children:[g,x]})]},h.id)})]})}function w7({message:e}){const t=e.role==="user",[i,a]=z.useState(!1),[s,l]=z.useState(null),c=z.useRef(null),h=z.useRef(null),u=z.useRef(""),f=z.useRef(!0);z.useEffect(()=>{e.isStreaming&&e.reasoning&&(a(!0),f.current=!0)},[e.isStreaming,e.reasoning]);const p=()=>{const C=c.current;C&&(f.current=C.scrollHeight-C.scrollTop-C.clientHeight<40)};z.useEffect(()=>{i&&f.current&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e.reasoning,i]);const g=z.useMemo(()=>{if(t)return null;try{const C=new de.Renderer,k=C.code.bind(C);let T=0;C.code=B=>B.lang==="mermaid"?(T++,`<div class="mermaid-diagram" data-mermaid="${encodeURIComponent(B.text)}"><div class="mermaid-placeholder" style="padding:16px;text-align:center;color:var(--text-muted);font-size:12px;">📊 图表</div></div>`):k(B);const _=de.parse(P2(e.content||""),{async:!1,renderer:C});return console.log(`[mermaid-debug] useMemo htmlContent: mermaidBlocks=${T}, contentLen=${(e.content||"").length}, htmlLen=${_.length}, hasMermaidClass=${_.includes("mermaid-diagram")}`),_}catch(C){return console.error("[mermaid-debug] useMemo ERROR:",C),e.content}},[e.content,t]),[x,m]=z.useState(null);z.useEffect(()=>{if(console.log(`[mermaid-debug] useEffect trigger: htmlContent=${!!g}, isUser=${t}, isStreaming=${e.isStreaming}, contentLen=${(e.content||"").length}`),!g||t){l(null);return}if(e.isStreaming){l(g);return}const C=document.createElement("div");C.innerHTML=g;const k=C.querySelectorAll(".mermaid-diagram[data-mermaid]");if(console.log(`[mermaid-debug] Found diagrams: ${k.length}, tempDiv innerHTML length: ${C.innerHTML.length}`),k.length>0){const T=k[0];console.log(`[mermaid-debug] First diagram data-mermaid preview: ${(T.dataset.mermaid||"").slice(0,100)}`)}if(k.length===0){l(g);return}(async()=>{let T=0;for(const B of Array.from(k)){const O=B,D=decodeURIComponent(O.dataset.mermaid??""),N=T++;let H=!1;try{await Mm.parse(D),H=!0,console.log(`[mermaid-debug#${N}] Parse OK, srcLen=${D.length}`)}catch(R){console.warn(`[mermaid-debug#${N}] Parse FAILED:`,R instanceof Error?R.message:String(R).slice(0,500))}if(!H){O.innerHTML=`<pre style="margin:0;padding:12px;border-radius:var(--radius-sm);overflow:auto;font-size:12px;background:var(--bg-secondary);border:1px solid var(--border);"><code class="language-mermaid" style="color:var(--text-secondary)">${D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</code></pre>`;continue}try{const R=`m-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,{svg:Z}=await Mm.render(R,D);console.log(`[mermaid-debug#${N}] Render OK, svgLen=${Z.length}`);const P=`cb_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;window.__mermaidCb||(window.__mermaidCb={}),window.__mermaidCb[P]={svg:Z,async save(tt){try{const X=new Blob([Z],{type:"image/svg+xml"}),Y=URL.createObjectURL(X),M=document.createElement("a");M.href=Y,M.download=`diagram-${Date.now()}.svg`,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(Y),tt.textContent="Saved!",tt.style.color="var(--emerald)",setTimeout(()=>{tt.textContent="Save SVG",tt.style.color="var(--text-muted)"},2e3)}catch{tt.textContent="Failed!",tt.style.color="var(--red)",setTimeout(()=>{tt.textContent="Save SVG",tt.style.color="var(--text-muted)"},2e3)}},fullscreen(){console.log("[bind-debug] Fullscreen via inline onclick!"),m(Z)}};const W=`<div class="mermaid-toolbar" style="position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:5;opacity:1;pointer-events:auto;">
457
- <button onclick="window.__mermaidCb['${P}'].save(this)" title="另存为 SVG 文件" style="padding:2px 8px;font-size:11px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer">Save SVG</button>
458
- <button onclick="event.stopPropagation();window.__mermaidCb['${P}'].fullscreen()" title="双击或点击全屏查看" style="padding:2px 8px;font-size:14px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;line-height:1;">⛶</button>
459
- </div>`;O.innerHTML=Z+W,Object.assign(O.style,{display:"block",padding:"16px",borderRadius:"var(--radius-sm)",overflow:"auto",background:"rgba(15, 23, 42, 0.6)",border:"1px solid rgba(99, 102, 241, 0.2)",minHeight:"200px",cursor:"pointer",position:"relative"}),O.setAttribute("ondblclick",`event.stopPropagation();window.__mermaidCb['${P}'].fullscreen()`);const et=O.querySelector("svg");et&&(et.style.maxWidth="100%",et.style.height="auto",et.style.color="inherit"),console.log(`[mermaid-debug#${N}] Toolbar added, final div HTML len=${O.outerHTML.length}`)}catch(R){console.error(`[mermaid-debug#${N}] Render FAILED:`,R instanceof Error?R.message:String(R).slice(0,500)),O.innerHTML=`<pre style="margin:0;padding:12px;border-radius:var(--radius-sm);overflow:auto;font-size:12px;background:var(--bg-secondary);border:1px solid var(--border);"><code class="language-mermaid" style="color:var(--text-secondary)">${D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</code></pre>`}}const _=C.innerHTML;console.log(`[mermaid-debug] setFinalHtml called: totalLen=${_.length}, containsToolbar=${_.includes("mermaid-toolbar")}, containsSvgTag=${_.includes("<svg")}, containsFullscreen=${_.includes("setFullscreenSvg")}`),l(_)})()},[g,e.isStreaming]),z.useEffect(()=>{const C=h.current;if(!C||t)return;const k=s??g??"";k!==u.current&&(u.current=k,C.innerHTML=k)}),z.useEffect(()=>{const C=h.current;if(!C||t)return;C.querySelectorAll("pre").forEach(T=>{var O,D;if((O=T.parentElement)!=null&&O.classList.contains("pre-copy-wrapper"))return;const _=document.createElement("button");_.className="copy-btn",_.textContent="Copy",_.style.cssText="position:absolute;bottom:6px;right:6px;padding:2px 8px;font-size:11px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;opacity:0.5;transition:opacity 0.15s",_.addEventListener("mouseenter",()=>{_.style.opacity="1"}),_.addEventListener("mouseleave",()=>{_.textContent!=="Copied!"&&(_.style.opacity="0.5")}),_.addEventListener("click",async()=>{const N=T.querySelector("code"),H=(N==null?void 0:N.textContent)||T.textContent||"";try{await navigator.clipboard.writeText(H),_.textContent="Copied!",_.style.color="var(--emerald)",_.style.opacity="1",setTimeout(()=>{_.textContent="Copy",_.style.color="var(--text-muted)",_.style.opacity="0.5"},2e3)}catch{}});const B=document.createElement("div");B.className="pre-copy-wrapper",B.style.position="relative",(D=T.parentNode)==null||D.insertBefore(B,T),B.appendChild(T),B.appendChild(_)})},[g,t]),z.useEffect(()=>{if(!x)return;const C=k=>{k.key==="Escape"&&m(null)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[x]);const v=e.reasoning?Math.max(1,Math.round(e.reasoning.length/50)):0;return L.jsxs("div",{style:{marginBottom:16,display:"flex",justifyContent:t?"flex-end":"flex-start"},children:[L.jsxs("div",{style:{maxWidth:"80%",padding:"10px 14px",borderRadius:t?"var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-lg)":"var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg)",background:t?"linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%)":"var(--bg-tertiary)",color:t?"white":"var(--text-primary)",fontSize:14,lineHeight:1.6,border:t?"none":"1px solid var(--border)",boxShadow:t?"0 2px 12px rgba(99, 102, 241, 0.2)":"0 1px 4px rgba(0,0,0,0.1)"},children:[e.reasoning&&!t&&L.jsxs("div",{style:{marginBottom:8},children:[L.jsxs("div",{onClick:()=>a(!i),style:{cursor:"pointer",display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--cyan)",userSelect:"none"},children:[L.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:i?"rotate(90deg)":"rotate(0)"},children:"▸"}),L.jsx("span",{style:{fontWeight:500},children:"💭 Thinking"}),!e.isStreaming&&v>0&&L.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:["(",v,"s)"]})]}),i&&L.jsx("div",{ref:c,onScroll:p,style:{marginTop:4,padding:8,background:"var(--cyan-soft)",borderRadius:"var(--radius-sm)",border:"1px solid rgba(34, 211, 238, 0.15)",maxHeight:200,overflow:"auto"},className:"markdown-body reasoning-block",dangerouslySetInnerHTML:{__html:(()=>{try{return de.parse(P2(e.reasoning||"",{escapeHtml:!0}),{async:!1})}catch{return(e.reasoning||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}})()}})]}),t?L.jsx("div",{style:{whiteSpace:"pre-wrap"},children:e.content}):L.jsx("div",{ref:h,className:"markdown-body"}),(()=>{const C=s??g??"";return!t&&!e.isStreaming&&C&&C.includes("mermaid-diagram")&&console.log(`[mermaid-debug] RENDER: finalHtml=${!!s}, hasToolbar=${C.includes("mermaid-toolbar")}, hasSvg=${C.includes("<svg")}, htmlLen=${C.length}`),null})(),e.isStreaming&&!e.reasoning&&L.jsx("span",{className:"cursor",children:"▌"}),e.toolCalls&&e.toolCalls.length>0&&L.jsx("div",{style:{marginTop:8},children:e.toolCalls.map(C=>L.jsx(A7,{toolCall:C},C.id))})]}),(x&&console.log(`[mermaid-debug] Fullscreen modal RENDERING: svgLen=${x.length}`),null),x&&L.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.85)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>m(null),children:L.jsxs("div",{style:{maxWidth:"90vw",maxHeight:"90vh",background:"#0d1117",borderRadius:"var(--radius-lg)",padding:"24px",border:"1px solid rgba(99, 102, 241, 0.3)",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.5)",overflow:"auto",cursor:"default"},onClick:C=>C.stopPropagation(),children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[L.jsx("span",{style:{fontSize:13,color:"var(--text-muted)",fontWeight:500},children:"📊 Architecture Diagram"}),L.jsx("button",{onClick:()=>{const C=new Blob([x],{type:"image/svg+xml"}),k=URL.createObjectURL(C),T=document.createElement("a");T.href=k,T.download=`diagram-${Date.now()}.svg`,document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(k)},style:{padding:"4px 14px",fontSize:12,background:"var(--accent)",color:"white",border:"none",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:"Save SVG"}),L.jsx("button",{onClick:()=>m(null),style:{padding:"4px 14px",fontSize:12,background:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:"✕ Close (ESC)"})]}),L.jsx("div",{dangerouslySetInnerHTML:{__html:x}}),L.jsx("div",{style:{marginTop:8,textAlign:"center",fontSize:11,color:"var(--text-muted)"},children:"Click outside or press ESC to close"})]})})]})}function _7(e){const t=e.trim();if((t.startsWith("{")||t.startsWith("["))&&t.length>2)try{const i=JSON.parse(t);return{html:JSON.stringify(i,null,2),isJson:!0}}catch{}return{html:e.replace(/\n{4,}/g,`
460
-
461
- `),isJson:!1}}function B7(e){try{const t=JSON.parse(e);if(t.command)return t.command}catch{}return""}function E7(e){return e.name==="Shell"||e.name==="Bash"}const L7=({children:e,style:t})=>L.jsx("span",{style:{fontSize:11,fontFamily:"'JetBrains Mono', 'Fira Code', Consolas, monospace",...t},children:e});function A7({toolCall:e}){const{color:t,bg:i,border:a,icon:s}=e.riskLevel==="dangerous"?{color:"var(--rose)",bg:"var(--rose-soft)",border:"rgba(244, 63, 94, 0.25)",icon:"⚠"}:e.riskLevel==="moderate"?{color:"var(--orange)",bg:"var(--orange-soft)",border:"rgba(249, 115, 22, 0.25)",icon:"⚡"}:{color:"var(--emerald)",bg:"var(--emerald-soft)",border:"rgba(16, 185, 129, 0.2)",icon:"→"},l=e.result!==void 0,c=z.useRef(null),h=E7(e),u=z.useMemo(()=>{if(!e.argsPreview)return"";const m=e.argsPreview.trim();if((m.startsWith("{")||m.startsWith("["))&&m.length>2)try{const v=JSON.parse(m);return JSON.stringify(v,null,2)}catch{}return e.argsPreview},[e.argsPreview]),f=z.useMemo(()=>h?B7(e.argsPreview):"",[h,e.argsPreview]),p=z.useMemo(()=>e.result?_7(e.result):null,[e.result]);z.useEffect(()=>{const m=c.current;m&&m.querySelectorAll("[data-copy]").forEach(v=>{if(v.querySelector(".tc-copy-btn"))return;const C=document.createElement("button");C.className="tc-copy-btn",C.textContent="Copy",Object.assign(C.style,{position:"absolute",bottom:4,right:4,padding:"1px 6px",fontSize:10,background:"var(--bg-secondary)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer",opacity:.5,transition:"opacity 0.15s",zIndex:1}),C.addEventListener("mouseenter",()=>{C.style.opacity="1"}),C.addEventListener("mouseleave",()=>{C.textContent!=="Copied!"&&(C.style.opacity="0.5")}),C.addEventListener("click",async()=>{const k=v.getAttribute("data-copy")||"";try{await navigator.clipboard.writeText(k),C.textContent="Copied!",C.style.color="var(--emerald)",C.style.opacity="1",setTimeout(()=>{C.textContent="Copy",C.style.color="var(--text-muted)",C.style.opacity="0.5"},2e3)}catch{}}),v.style.position="relative",v.appendChild(C)})},[l,h,f,e.stdout,e.stderr,e.result,e.argsPreview,p]);const g=(m,v)=>m.length>v?m.slice(0,v)+`
462
- … (truncated)`:m,x=m=>m.replace(/^\[Shell:[^\]]*\]\n?/,"").replace(/^\[IMPORTANT[^\n]*\n?/,"").trim();return L.jsxs("div",{style:{background:i,borderRadius:"var(--radius)",padding:"8px 12px",marginBottom:6,borderLeft:`3px solid ${t}`,border:`1px solid ${a}`,borderLeftWidth:3,fontSize:12},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[L.jsx("span",{style:{color:t,fontSize:10},children:s}),L.jsx("span",{style:{fontWeight:600,color:t},children:e.name}),h&&f&&L.jsxs(L7,{style:{color:"var(--text-muted)",fontWeight:400,maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["$ ",f.length>60?f.slice(0,60)+"…":f]})]}),L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.duration!==void 0&&L.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11},children:[e.duration,"ms"]}),l&&(e.success!==!1?L.jsx("span",{style:{color:"var(--emerald)",fontSize:11,fontWeight:700},children:"✓"}):L.jsx("span",{style:{color:"var(--rose)",fontSize:11,fontWeight:700},children:"✗"}))]})]}),!h&&u&&L.jsx("pre",{"data-copy":u,style:{display:"block",position:"relative",marginTop:4,color:"var(--text-secondary)",fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-all",background:"rgba(0,0,0,0.12)",padding:"4px 8px",borderRadius:"var(--radius-sm)",maxHeight:80,overflow:"auto"},children:g(u,300)}),L.jsx("div",{ref:c,style:{marginTop:4},children:l?h?L.jsxs("div",{children:[e.stdout&&(()=>{const m=x(e.stdout);return!m&&!e.stderr?L.jsx("div",{style:{padding:"4px 8px",borderRadius:"var(--radius-sm)",background:"rgba(0,0,0,0.15)",color:"var(--text-muted)",fontSize:11,fontStyle:"italic"},children:e.success===!1?"(command produced no output)":"(completed successfully, no output)"}):m?L.jsx("div",{"data-copy":m,style:{position:"relative",padding:6,borderRadius:"var(--radius-sm)",background:"rgba(0,0,0,0.18)",color:"var(--text-secondary)",fontSize:11,fontFamily:"'JetBrains Mono', Consolas, monospace",whiteSpace:"pre-wrap",maxHeight:240,overflow:"auto",lineHeight:1.5},children:g(m,3e3)}):null})(),e.stderr&&L.jsxs("div",{"data-copy":e.stderr,style:{position:"relative",marginTop:4,padding:"6px 8px",borderRadius:"var(--radius-sm)",background:"rgba(244, 63, 94, 0.08)",color:"var(--rose)",fontSize:11,fontFamily:"'JetBrains Mono', Consolas, monospace",whiteSpace:"pre-wrap",maxHeight:120,overflow:"auto",lineHeight:1.5,border:"1px solid rgba(244, 63, 94, 0.12)"},children:[L.jsx("span",{style:{opacity:.6,marginRight:6},children:"[stderr]"}),g(e.stderr,1500)]})]}):L.jsx("div",{"data-copy":e.result??"",style:{position:"relative",padding:6,background:p!=null&&p.isJson?"rgba(0,0,0,0.25)":"rgba(0,0,0,0.2)",borderRadius:"var(--radius-sm)",color:e.success===!1?"var(--rose)":p!=null&&p.isJson?"var(--sky)":"var(--text-secondary)",fontSize:11,fontFamily:p!=null&&p.isJson?"'JetBrains Mono', 'Fira Code', Consolas, monospace":"inherit",whiteSpace:"pre-wrap",maxHeight:200,overflow:"auto",lineHeight:1.5},children:g(p?p.html:e.result??"",2e3)}):null})]})}function M7(){const{sessions:e,isLoading:t,fetchSessions:i,createSession:a,deleteSession:s,deleteAllSessions:l,clearSession:c}=rM(),h=os(),{setCurrentSession:u,refreshStatus:f,clearMessageCache:p}=xd(),[g,x]=z.useState(null),[m,v]=z.useState(""),[C,k]=z.useState(null),[T,_]=z.useState(!1);z.useEffect(()=>{i()},[i]);const B=async()=>{const P=await a();u({id:P.id,name:P.name??"New Session",messageCount:0}),h(`/chat/${P.id}`)},O=async P=>{k(null);try{await s(P),p(P),f()}catch(W){console.error("Failed to delete session:",W),i()}},D=async()=>{_(!1);try{await l(),p("__default__"),f()}catch(P){console.error("Failed to delete all sessions:",P),i()}},N=async P=>{try{await c(P),p(P),f()}catch(W){console.error("Failed to clear session:",W)}},H=async P=>{if(!m.trim()){x(null);return}try{await Wt.renameSession(P,m.trim()),x(null),await i(),f()}catch{}},R=async(P,W)=>{try{await Wt.activateSession(P),u({id:W.id,name:W.name??W.id.slice(0,8),messageCount:W.messageCount??0}),h(`/chat/${P}`)}catch{}},Z=P=>{x(P.id),v(P.name??"")};return L.jsxs("div",{style:{padding:24},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:20},children:[L.jsx("h2",{style:{fontSize:18,fontWeight:600},children:"Sessions"}),L.jsxs("div",{style:{display:"flex",gap:8},children:[e.length>0&&(T?L.jsxs(L.Fragment,{children:[L.jsx("button",{className:"btn-ghost",onClick:D,style:{fontSize:12,padding:"4px 10px",color:"var(--dangerous)"},children:"Confirm Delete All"}),L.jsx("button",{className:"btn-ghost",onClick:()=>_(!1),style:{fontSize:12,padding:"4px 10px"},children:"Cancel"})]}):L.jsx("button",{className:"btn-ghost",onClick:()=>_(!0),style:{fontSize:12,padding:"4px 10px"},children:"Delete All"})),L.jsx("button",{className:"btn-primary",onClick:B,children:"New Session"})]})]}),t?L.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"Loading..."}):e.length===0?L.jsx("div",{style:{color:"var(--text-muted)",textAlign:"center",padding:40},children:"No sessions yet"}):L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(P=>L.jsxs("div",{style:{padding:"12px 16px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",cursor:"pointer",transition:"border-color 0.15s"},onClick:()=>R(P.id,P),onMouseEnter:W=>W.currentTarget.style.borderColor="var(--accent)",onMouseLeave:W=>W.currentTarget.style.borderColor="var(--border)",children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g===P.id?L.jsx("input",{value:m,onChange:W=>v(W.target.value),onKeyDown:W=>{W.key==="Enter"&&H(P.id),W.key==="Escape"&&x(null)},onBlur:()=>H(P.id),onClick:W=>W.stopPropagation(),autoFocus:!0,style:{flex:1,fontSize:14,fontWeight:500,padding:"2px 6px"}}):L.jsx("span",{style:{fontWeight:500,fontSize:14,flex:1},children:P.name??P.id.slice(0,8)}),L.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},onClick:W=>W.stopPropagation(),children:[L.jsx("button",{className:"btn-ghost",onClick:()=>Z(P),style:{fontSize:11,padding:"2px 6px"},title:"Rename",children:"✎"}),L.jsx("button",{className:"btn-ghost",onClick:()=>N(P.id),style:{fontSize:11,padding:"2px 6px"},title:"Clear messages",children:"⊘"}),C===P.id?L.jsxs(L.Fragment,{children:[L.jsx("button",{className:"btn-ghost",onClick:()=>O(P.id),style:{fontSize:11,padding:"2px 6px",color:"var(--dangerous)"},children:"Confirm"}),L.jsx("button",{className:"btn-ghost",onClick:()=>k(null),style:{fontSize:11,padding:"2px 6px"},children:"Cancel"})]}):L.jsx("button",{className:"btn-ghost",onClick:()=>k(P.id),style:{fontSize:11,padding:"2px 6px"},title:"Delete",children:"✕"})]})]}),L.jsxs("div",{style:{color:"var(--text-muted)",fontSize:12,marginTop:4},children:[P.agentName??P.agentType??"main"," · ",P.messageCount??0," messages · ",new Date(P.createdAt).toLocaleString()]})]},P.id))})]})}const wg=[{name:"DeepSeek",apiKeyEnvVar:"DEEPSEEK_API_KEY",baseUrlEnvVar:"DEEPSEEK_BASE_URL",defaultBaseUrl:"https://api.deepseek.com/v1"},{name:"智谱 (Zhipu)",apiKeyEnvVar:"ZHIPU_API_KEY",baseUrlEnvVar:"ZHIPU_BASE_URL",defaultBaseUrl:"https://open.bigmodel.cn/api/paas/v4"},{name:"Kimi (Moonshot)",apiKeyEnvVar:"KIMI_API_KEY",baseUrlEnvVar:"KIMI_BASE_URL",defaultBaseUrl:"https://api.moonshot.cn/v1"},{name:"OpenAI",apiKeyEnvVar:"OPENAI_API_KEY",baseUrlEnvVar:"OPENAI_BASE_URL",defaultBaseUrl:"https://api.openai.com/v1"},{name:"Claude",apiKeyEnvVar:"CLAUDE_API_KEY",baseUrlEnvVar:"CLAUDE_BASE_URL",defaultBaseUrl:"https://api.anthropic.com/v1"},{name:"MiniMax",apiKeyEnvVar:"MINIMAX_API_KEY",baseUrlEnvVar:"MINIMAX_BASE_URL",defaultBaseUrl:"https://api.minimaxi.com/v1"},{name:"Ollama",apiKeyEnvVar:"",baseUrlEnvVar:"OLLAMA_BASE_URL",defaultBaseUrl:"http://localhost:11434"},{name:"NVIDIA NIM",apiKeyEnvVar:"NVIDIA_API_KEY",baseUrlEnvVar:"NVIDIA_BASE_URL",defaultBaseUrl:"https://integrate.api.nvidia.com/v1"},{name:"Qwen",apiKeyEnvVar:"QWEN_API_KEY",baseUrlEnvVar:"QWEN_BASE_URL",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1"},{name:"小米 MiMo",apiKeyEnvVar:"MIMO_API_KEY",baseUrlEnvVar:"MIMO_BASE_URL",defaultBaseUrl:"https://api.xiaomimimo.com/v1"},{name:"SiliconFlow",apiKeyEnvVar:"SILICONFLOW_API_KEY",baseUrlEnvVar:"SILICONFLOW_BASE_URL",defaultBaseUrl:"https://api.siliconflow.cn/v1"}];function R7(){const[e,t]=z.useState(null),[i,a]=z.useState({}),[s,l]=z.useState("safe_only"),[c,h]=z.useState(!1),[u,f]=z.useState(!1),[p,g]=z.useState(new Set),[x,m]=z.useState([]),[v,C]=z.useState(!1),[k,T]=z.useState({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),[_,B]=z.useState(""),[O,D]=z.useState(!1),[N,H]=z.useState("local"),[R,Z]=z.useState("tiny"),[P,W]=z.useState("auto"),[et,tt]=z.useState(""),[X,Y]=z.useState("edge"),[M,I]=z.useState("zh-CN-XiaoxiaoNeural"),[$,F]=z.useState(0),[Q,q]=z.useState(!1),[it,ut]=z.useState(!1);z.useEffect(()=>{(async()=>{var U;try{const ct=await Wt.getSettings();t(ct);const Ct={};for(const Ot of wg)Ot.apiKeyEnvVar&&(Ct[Ot.apiKeyEnvVar]=ct.env[Ot.apiKeyEnvVar]??""),Ot.baseUrlEnvVar&&(Ct[Ot.baseUrlEnvVar]=ct.env[Ot.baseUrlEnvVar]??"");a(Ct),l(((U=ct.preferences)==null?void 0:U.approvalMode)??"safe_only"),ct.customModels&&m(ct.customModels)}catch{}})()},[]),z.useEffect(()=>{(async()=>{try{const U=await Wt.getAudioSettings();if(U.stt&&(H(U.stt.provider??"local"),Z(U.stt.model??"tiny"),W(U.stt.language??"auto"),tt(U.stt.openaiApiKey??"")),U.tts){Y(U.tts.provider??"edge"),I(U.tts.voice??"zh-CN-XiaoxiaoNeural");const ct=U.tts.rate??"+0%",Ct=parseInt(ct,10);F(isNaN(Ct)?0:Ct)}}catch{}})()},[]);const dt=U=>{g(ct=>{const Ct=new Set(ct);return Ct.has(U)?Ct.delete(U):Ct.add(U),Ct})},yt=async()=>{var U,ct;h(!0),f(!1);try{const Ct={};for(const[Jt,me]of Object.entries(i)){const Ht=(e==null?void 0:e.env[Jt])??"";me!==Ht&&(Ct[Jt]=me)}const Ot={};if(s!==(((U=e==null?void 0:e.preferences)==null?void 0:U.approvalMode)??"safe_only")&&(Ot.approvalMode=s),Object.keys(Ct).length>0||Object.keys(Ot).length>0){await Wt.updateSettings({env:Ct,preferences:Ot});const Jt=await Wt.getSettings();t(Jt);const me={};for(const Ht of wg)Ht.apiKeyEnvVar&&(me[Ht.apiKeyEnvVar]=Jt.env[Ht.apiKeyEnvVar]??""),Ht.baseUrlEnvVar&&(me[Ht.baseUrlEnvVar]=Jt.env[Ht.baseUrlEnvVar]??"");a(me),l(((ct=Jt.preferences)==null?void 0:ct.approvalMode)??"safe_only")}f(!0)}catch{}h(!1)},xt=U=>{a(ct=>({...ct,[U]:""}))},Rt=async()=>{if(!k.id||!k.name||!k.baseUrl){B("Model ID, Name, and Base URL are required");return}D(!0),B("");try{const U=await Wt.addCustomModel({id:k.id,name:k.name,baseUrl:k.baseUrl,apiKey:k.apiKey||void 0,contextLength:k.contextLength??128e3,supportsTools:k.supportsTools??!1,isReasoningModel:k.isReasoningModel??!1});if(U.success){const ct=await Wt.getSettings();ct.customModels&&m(ct.customModels),T({id:"",name:"",baseUrl:"",apiKey:"",contextLength:128e3,supportsTools:!0,isReasoningModel:!1}),C(!1)}else B(U.error??"Failed to add model")}catch{B("Failed to add custom model")}D(!1)},Ft=async U=>{try{await Wt.removeCustomModel(U),m(ct=>ct.filter(Ct=>Ct.id!==U))}catch{}},Ut=async()=>{q(!0),ut(!1);try{const U=$>=0?`+${$}%`:`${$}%`;await Wt.updateAudioSettings({stt:{provider:N,model:R,language:P,...N==="openai"?{openaiApiKey:et}:{}},tts:{provider:X,...X==="edge"?{voice:M}:{},rate:U}}),ut(!0)}catch{}q(!1)};return L.jsxs("div",{style:{padding:24,maxWidth:700},children:[L.jsx("h2",{style:{fontSize:18,fontWeight:600,marginBottom:20},children:"Settings"}),L.jsxs("section",{style:{marginBottom:24},children:[L.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Approval Mode"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[{value:"auto",label:"Auto",desc:"Approve all tool calls automatically"},{value:"safe_only",label:"Safe Only",desc:"Auto-approve safe tools, ask for moderate/dangerous"},{value:"always_ask",label:"Always Ask",desc:"Require approval for every tool call"}].map(U=>L.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:`1px solid ${s===U.value?"var(--accent)":"var(--border)"}`,cursor:"pointer",transition:"border-color 0.15s"},children:[L.jsx("input",{type:"radio",name:"approvalMode",value:U.value,checked:s===U.value,onChange:()=>l(U.value),style:{marginTop:3}}),L.jsxs("div",{children:[L.jsx("div",{style:{fontWeight:500,fontSize:13},children:U.label}),L.jsx("div",{style:{fontSize:12,color:"var(--text-muted)"},children:U.desc})]})]},U.value))})]}),L.jsxs("section",{style:{marginBottom:24},children:[L.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Model Provider Configuration"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:wg.map(U=>{const ct=p.has(U.name),Ct=i[U.apiKeyEnvVar]??"",Ot=i[U.baseUrlEnvVar]??"",Jt=!!Ct,me=!!Ot&&Ot!==U.defaultBaseUrl;return L.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",overflow:"hidden"},children:[L.jsxs("div",{onClick:()=>dt(U.name),style:{padding:"10px 14px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",userSelect:"none"},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[L.jsx("span",{style:{fontSize:10,transition:"transform 0.2s",transform:ct?"rotate(90deg)":"rotate(0)"},children:"▸"}),L.jsx("span",{style:{fontWeight:500,fontSize:14},children:U.name})]}),L.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[Jt&&L.jsx("span",{style:{color:"var(--safe)",fontSize:11},children:"Key set"}),me&&L.jsx("span",{style:{color:"var(--moderate)",fontSize:11},children:"Custom URL"}),!Jt&&!me&&!ct&&L.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:"Not configured"})]})]}),ct&&L.jsxs("div",{style:{padding:"4px 14px 14px",display:"flex",flexDirection:"column",gap:12},children:[U.apiKeyEnvVar&&L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key"}),L.jsxs("div",{style:{display:"flex",gap:6},children:[L.jsx("input",{type:"password",value:Ct,onChange:Ht=>a(Ae=>({...Ae,[U.apiKeyEnvVar]:Ht.target.value})),placeholder:U.apiKeyEnvVar,style:{flex:1}}),Jt&&L.jsx("button",{className:"btn-ghost",onClick:()=>xt(U.apiKeyEnvVar),style:{fontSize:11,padding:"4px 8px"},children:"Clear"})]}),L.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",U.apiKeyEnvVar]})]}),U.baseUrlEnvVar&&L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL"}),L.jsx("input",{type:"text",value:Ot,onChange:Ht=>a(Ae=>({...Ae,[U.baseUrlEnvVar]:Ht.target.value})),placeholder:U.defaultBaseUrl,style:{width:"100%"}}),L.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:["Env: ",U.baseUrlEnvVar]})]})]})]},U.name)})})]}),L.jsxs("section",{style:{marginBottom:24},children:[L.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"Custom Models (自定义模型)"}),L.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:10},children:"Add any OpenAI-compatible API endpoint as a custom model. After adding, it will appear in the model selector."}),x.length>0&&L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:10},children:x.map(U=>L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 14px",background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[L.jsxs("div",{children:[L.jsx("span",{style:{fontWeight:500,fontSize:13},children:U.name}),L.jsxs("span",{style:{color:"var(--text-muted)",fontSize:11,marginLeft:8},children:[U.id," · ",U.baseUrl]})]}),L.jsx("button",{className:"btn-ghost",onClick:()=>Ft(U.id),style:{fontSize:11,padding:"2px 8px",color:"var(--danger)"},children:"Remove"})]},U.id))}),v?L.jsxs("div",{style:{padding:16,background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)"},children:[L.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:[L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:'Model ID * (unique, e.g. "my-llama-70b")'}),L.jsx("input",{type:"text",value:k.id??"",onChange:U=>T(ct=>({...ct,id:U.target.value})),placeholder:"my-llama-70b",style:{width:"100%"}})]}),L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Display Name *"}),L.jsx("input",{type:"text",value:k.name??"",onChange:U=>T(ct=>({...ct,name:U.target.value})),placeholder:"My LLaMA 70B",style:{width:"100%"}})]}),L.jsxs("div",{style:{gridColumn:"1 / -1"},children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Base URL * (OpenAI-compatible endpoint)"}),L.jsx("input",{type:"text",value:k.baseUrl??"",onChange:U=>T(ct=>({...ct,baseUrl:U.target.value})),placeholder:"http://localhost:11434/v1",style:{width:"100%"}})]}),L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"API Key (optional)"}),L.jsx("input",{type:"password",value:k.apiKey??"",onChange:U=>T(ct=>({...ct,apiKey:U.target.value})),placeholder:"sk-...",style:{width:"100%"}})]}),L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Context Length"}),L.jsx("input",{type:"number",value:k.contextLength??128e3,onChange:U=>T(ct=>({...ct,contextLength:Number(U.target.value)||128e3})),placeholder:"128000",style:{width:"100%"}})]})]}),L.jsxs("div",{style:{display:"flex",gap:16,marginTop:12},children:[L.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[L.jsx("input",{type:"checkbox",checked:k.supportsTools??!1,onChange:U=>T(ct=>({...ct,supportsTools:U.target.checked}))}),"Supports Tool Calling"]}),L.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,cursor:"pointer"},children:[L.jsx("input",{type:"checkbox",checked:k.isReasoningModel??!1,onChange:U=>T(ct=>({...ct,isReasoningModel:U.target.checked}))}),"Reasoning Model"]})]}),_&&L.jsx("div",{style:{color:"var(--danger)",fontSize:12,marginTop:8},children:_}),L.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[L.jsx("button",{className:"btn-primary",onClick:Rt,disabled:O,style:{fontSize:12,padding:"4px 12px"},children:O?"Adding...":"Add Model"}),L.jsx("button",{className:"btn-ghost",onClick:()=>{C(!1),B("")},style:{fontSize:12,padding:"4px 12px"},children:"Cancel"})]})]}):L.jsx("button",{className:"btn-ghost",onClick:()=>C(!0),style:{fontSize:12},children:"+ Add Custom Model"})]}),L.jsxs("section",{style:{marginBottom:24},children:[L.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:10,color:"var(--text-secondary)"},children:"语音设置 (Voice Settings)"}),L.jsxs("div",{style:{background:"var(--bg-secondary)",borderRadius:"var(--radius)",border:"1px solid var(--border)",padding:16},children:[L.jsxs("div",{style:{marginBottom:20},children:[L.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:10,color:"var(--text-primary)"},children:"STT 语音识别"}),L.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Provider"}),L.jsxs("select",{value:N,onChange:U=>H(U.target.value),style:{width:"100%",padding:"6px 8px"},children:[L.jsx("option",{value:"local",children:"本地 Whisper"}),L.jsx("option",{value:"openai",children:"OpenAI API"})]})]}),N==="local"&&L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Model"}),L.jsxs("select",{value:R,onChange:U=>Z(U.target.value),style:{width:"100%",padding:"6px 8px"},children:[L.jsx("option",{value:"tiny",children:"tiny (75MB)"}),L.jsx("option",{value:"base",children:"base (142MB)"}),L.jsx("option",{value:"small",children:"small (466MB)"}),L.jsx("option",{value:"medium",children:"medium (1.5GB)"})]})]}),L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Language"}),L.jsxs("select",{value:P,onChange:U=>W(U.target.value),style:{width:"100%",padding:"6px 8px"},children:[L.jsx("option",{value:"auto",children:"自动检测"}),L.jsx("option",{value:"zh",children:"中文"}),L.jsx("option",{value:"en",children:"English"})]})]}),N==="openai"&&L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"OpenAI API Key"}),L.jsx("input",{type:"password",value:et,onChange:U=>tt(U.target.value),placeholder:"sk-...",style:{width:"100%"}})]})]})]}),L.jsx("div",{style:{height:1,background:"var(--border)",margin:"12px 0"}}),L.jsxs("div",{children:[L.jsx("div",{style:{fontSize:13,fontWeight:600,marginBottom:10,color:"var(--text-primary)"},children:"TTS 语音合成"}),L.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Provider"}),L.jsxs("select",{value:X,onChange:U=>Y(U.target.value),style:{width:"100%",padding:"6px 8px"},children:[L.jsx("option",{value:"edge",children:"Edge TTS (免费)"}),L.jsx("option",{value:"browser",children:"浏览器原生"})]})]}),X==="edge"&&L.jsxs("div",{children:[L.jsx("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:"Voice"}),L.jsxs("select",{value:M,onChange:U=>I(U.target.value),style:{width:"100%",padding:"6px 8px"},children:[L.jsx("option",{value:"zh-CN-XiaoxiaoNeural",children:"zh-CN-XiaoxiaoNeural"}),L.jsx("option",{value:"zh-CN-YunxiNeural",children:"zh-CN-YunxiNeural"}),L.jsx("option",{value:"zh-CN-XiaoyiNeural",children:"zh-CN-XiaoyiNeural"}),L.jsx("option",{value:"en-US-JennyNeural",children:"en-US-JennyNeural"}),L.jsx("option",{value:"en-US-GuyNeural",children:"en-US-GuyNeural"})]})]}),L.jsxs("div",{children:[L.jsxs("label",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4,display:"block"},children:["Rate: ",$>=0?"+":"",$,"%"]}),L.jsx("input",{type:"range",min:-50,max:50,value:$,onChange:U=>F(Number(U.target.value)),style:{width:"100%"}})]})]})]}),L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:16},children:[L.jsx("button",{className:"btn-primary",onClick:Ut,disabled:Q,style:{fontSize:12,padding:"4px 12px"},children:Q?"Saving...":"Save Voice Settings"}),it&&L.jsx("span",{style:{color:"var(--safe)",fontSize:13},children:"Saved"})]})]})]}),L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8,marginBottom:40},children:[L.jsx("button",{className:"btn-primary",onClick:yt,disabled:c,children:c?"Saving...":"Save Settings"}),u&&L.jsx("span",{style:{color:"var(--safe)",fontSize:13},children:"Saved"})]})]})}function G2(e){if(e<60)return`${e}s`;const t=Math.floor(e/60),i=e%60;return`${t}m${i.toString().padStart(2,"0")}s`}function O7(e){return new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function F7(){const e=os(),t=mv(),[i,a]=z.useState([]),[s,l]=z.useState(!0),[c,h]=z.useState(""),[u,f]=z.useState(!1),[p,g]=z.useState(null),[x,m]=z.useState(0),[v,C]=z.useState(null),k=z.useRef(null),T=z.useRef(0),_=z.useRef(""),B=z.useCallback(async()=>{try{const R=await Wt.listMeetings();a(R.meetings??R??[])}catch{}finally{l(!1)}},[]);z.useEffect(()=>{B()},[B]),z.useEffect(()=>{if(!t.isRecording||!p)return;const R=t.drainFinalized();R&&R!==_.current&&(_.current=R,Wt.appendMeetingTranscript(p,R).catch(()=>{}))},[t.transcript,t.isRecording,p]);const O=async()=>{try{C(null);const R=await Wt.createMeeting(c||void 0),Z=R.id??R.meetingId;g(Z),f(!0),h(""),m(0),T.current=Date.now(),_.current="",t.startRecording(),k.current=setInterval(()=>{m(Math.floor((Date.now()-T.current)/1e3))},1e3),a(P=>[{id:Z,title:c||`会议 ${new Date().toLocaleString("zh-CN")}`,status:"recording",startTime:new Date().toISOString()},...P])}catch{C("无法启动会议录音,请检查权限设置")}},D=async()=>{if(!p)return;const R=t.drainFinalized();if(R)try{await Wt.appendMeetingTranscript(p,R)}catch{}t.stopRecording(),t.clearTranscript(),k.current&&(clearInterval(k.current),k.current=null);const Z=p;f(!1),g(null);try{await Wt.stopMeeting(Z)}catch{}a(P=>P.map(W=>W.id===Z?{...W,status:"completed",endTime:new Date().toISOString(),duration:Math.floor((Date.now()-T.current)/1e3)}:W)),e(`/meetings/${Z}`)},N=async(R,Z)=>{if(Z.stopPropagation(),!!confirm("确定要删除这条会议记录吗?"))try{await Wt.deleteMeeting(R),a(P=>P.filter(W=>W.id!==R))}catch{C("删除失败")}},H=i.filter(R=>R.status!=="recording");return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[L.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,background:"linear-gradient(180deg, rgba(16,185,129,0.04) 0%, transparent 100%)"},children:[L.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--emerald)"},children:"会议记录"}),!u&&L.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[L.jsx("input",{value:c,onChange:R=>h(R.target.value),placeholder:"会议标题(可选)",style:{padding:"6px 12px",background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)",fontSize:13,width:200,outline:"none"},onKeyDown:R=>{R.key==="Enter"&&O()}}),L.jsxs("button",{onClick:O,style:{padding:"6px 16px",background:"var(--emerald)",color:"white",border:"none",borderRadius:"var(--radius-sm)",fontSize:13,fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[L.jsx("span",{style:{fontSize:10},children:"●"})," New Meeting"]})]})]}),u&&L.jsxs("div",{style:{padding:"16px 20px",background:"var(--bg-secondary)",borderBottom:"1px solid var(--border)"},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[L.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"var(--rose)",animation:"pulse 1.5s ease-in-out infinite"}}),L.jsx("span",{style:{color:"var(--rose)",fontWeight:500,fontSize:13},children:"录音中"}),L.jsx("span",{style:{color:"var(--text-muted)",fontSize:13,fontFamily:"monospace"},children:G2(x)})]}),L.jsx("button",{onClick:D,style:{padding:"6px 16px",background:"var(--rose)",color:"white",border:"none",borderRadius:"var(--radius-sm)",fontSize:13,fontWeight:500,cursor:"pointer"},children:"停止录音"})]}),L.jsx("div",{style:{background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:12,maxHeight:200,overflow:"auto",fontSize:13,lineHeight:1.6,color:"var(--text-secondary)"},children:t.transcript||L.jsx("span",{style:{color:"var(--text-muted)"},children:"等待语音输入..."})})]}),v&&L.jsx("div",{style:{margin:"12px 20px",padding:10,background:"var(--rose-soft, rgba(244,63,94,0.1))",borderRadius:"var(--radius-sm)",color:"var(--rose)",fontSize:13,border:"1px solid rgba(244,63,94,0.2)"},children:v}),L.jsx("div",{style:{flex:1,overflow:"auto",padding:"16px 20px"},children:s?L.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:60},children:"加载中..."}):H.length===0&&!u?L.jsxs("div",{style:{textAlign:"center",color:"var(--text-muted)",marginTop:80,fontSize:14},children:[L.jsx("div",{style:{fontSize:48,marginBottom:16,opacity:.3},children:"🎙️"}),'点击 "New Meeting" 开始录制会议']}):H.map(R=>L.jsxs("div",{onClick:()=>e(`/meetings/${R.id}`),style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",marginBottom:8,cursor:"pointer",transition:"border-color 0.15s"},onMouseEnter:Z=>Z.currentTarget.style.borderColor="var(--accent)",onMouseLeave:Z=>Z.currentTarget.style.borderColor="var(--border)",children:[L.jsxs("div",{style:{flex:1,minWidth:0},children:[L.jsx("div",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R.title}),L.jsxs("div",{style:{display:"flex",gap:12,marginTop:4,fontSize:12},children:[L.jsx("span",{style:{color:"var(--text-muted)"},children:O7(R.startTime)}),R.duration!=null&&L.jsx("span",{style:{color:"var(--text-muted)"},children:G2(R.duration)}),L.jsx("span",{style:{color:R.status==="completed"?"var(--emerald)":R.status==="error"?"var(--rose)":R.status==="summarizing"?"var(--amber, #f59e0b)":"var(--text-muted)"},children:R.status==="completed"?"已完成":R.status==="error"?"摘要失败":R.status==="summarizing"?"生成摘要...":"录音中"})]})]}),L.jsxs("div",{style:{display:"flex",gap:8,marginLeft:12},children:[L.jsx("button",{className:"btn-ghost",onClick:()=>e(`/meetings/${R.id}`),style:{fontSize:12},children:"查看"}),L.jsx("button",{className:"btn-ghost",onClick:Z=>N(R.id,Z),style:{fontSize:12,color:"var(--rose)"},children:"删除"})]})]},R.id))}),L.jsx("style",{children:`
463
- @keyframes pulse {
464
- 0%, 100% { opacity: 1; }
465
- 50% { opacity: 0.4; }
466
- }
467
- `})]})}function D7(e){if(e<60)return`${e}s`;const t=Math.floor(e/60),i=e%60;return`${t}m${i.toString().padStart(2,"0")}s`}function $7(e,t){const i=new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});if(!t)return i;const a=new Date(t).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${i} — ${a}`}function z7(e){const t=[],i=e.split(`
468
- `);let a="",s=[];for(const l of i){const c=l.match(/^###\s+(.+)/);c?(a&&t.push({title:a,content:s.join(`
469
- `).trim()}),a=c[1],s=[]):s.push(l)}return a&&t.push({title:a,content:s.join(`
470
- `).trim()}),t}const N7={recording:"录音中",summarizing:"生成摘要...",completed:"已完成",error:"处理失败"};function q7(){const{id:e}=sv(),t=os(),[i,a]=z.useState(null),[s,l]=z.useState(!0),[c,h]=z.useState(null),[u,f]=z.useState(!1),[p,g]=z.useState(null),[x,m]=z.useState(null),[v,C]=z.useState(null),[k,T]=z.useState(!1),_=z.useRef(null),B=z.useRef(null),O=async()=>{if(e)try{const Z=await Wt.getMeeting(e);a(Z.meeting??Z)}catch{h("加载会议详情失败")}finally{l(!1)}};z.useEffect(()=>{O()},[e]),z.useEffect(()=>{var P,W;if(!i||!e||i.status!=="completed"||i.aiSummary||k||!((P=i.transcript)!=null&&P.trim())&&!((W=i.liveTranscript)!=null&&W.trim()))return;(async()=>{T(!0);try{const et=await Wt.summarizeMeeting(e,{onStatus:()=>{}});a(tt=>tt&&{...tt,aiSummary:et})}catch{}finally{T(!1)}})()},[i==null?void 0:i.status,i==null?void 0:i.aiSummary,e]),z.useEffect(()=>i?(["summarizing","recording"].includes(i.status)||i.status==="completed"&&!i.aiSummary?B.current=setInterval(O,3e3):B.current&&(clearInterval(B.current),B.current=null),()=>{B.current&&(clearInterval(B.current),B.current=null)}):void 0,[i==null?void 0:i.status,i==null?void 0:i.aiSummary,k]);const D=async()=>{if(!u){f(!0);return}try{await Wt.deleteMeeting(e),t("/meetings")}catch{h("删除失败"),f(!1)}},N=async Z=>{if(e){g(Z);try{const P=await Wt.exportMeeting(e,Z),W=URL.createObjectURL(P),et=document.createElement("a");et.href=W,et.download=`${(i==null?void 0:i.title)||"meeting"}.${Z}`,document.body.appendChild(et),et.click(),document.body.removeChild(et),URL.revokeObjectURL(W)}catch(P){h(P.message||"导出失败")}finally{g(null)}}},H=async Z=>{if(!e)return;let P=null;const W=Z==="pptx"?"pptx":"docx",et=Z==="pptx"?"application/vnd.openxmlformats-officedocument.presentationml.presentation":"application/vnd.openxmlformats-officedocument.wordprocessingml.document";try{"showSaveFilePicker"in window&&(P=await window.showSaveFilePicker({suggestedName:`${(i==null?void 0:i.title)||"meeting"}-AI.${W}`,types:[{description:Z==="pptx"?"PowerPoint 演示文稿":"Word 文档",accept:{[et]:[`.${W}`]}}]}))}catch(X){if(X.name==="AbortError")return;P=null}m(Z),C("正在启动AI导出...");const tt=new AbortController;_.current=tt;try{const X=await Wt.exportMeetingAI(e,Z,{signal:tt.signal,onStatus:Y=>{C(Y.message||"处理中...")},onError:Y=>{h(Y)}});if(P){const Y=await P.createWritable();await Y.write(X),await Y.close()}else{const Y=URL.createObjectURL(X),M=document.createElement("a");M.href=Y,M.download=`${(i==null?void 0:i.title)||"meeting"}-AI.${W}`,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(Y)}}catch(X){X.name!=="AbortError"&&h(X.message||"AI导出失败")}finally{m(null),C(null),_.current=null}};if(s)return L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-muted)",fontSize:14},children:"加载中..."});if(c||!i)return L.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:12},children:[L.jsx("div",{style:{color:"var(--rose)",fontSize:14},children:c||"会议不存在"}),L.jsx("button",{className:"btn-ghost",onClick:()=>t("/meetings"),children:"返回会议列表"})]});const R=i.aiSummary?z7(i.aiSummary):[];return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[L.jsxs("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",background:"linear-gradient(180deg, rgba(16,185,129,0.04) 0%, transparent 100%)"},children:[L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[L.jsx("button",{className:"btn-ghost",onClick:()=>t("/meetings"),style:{fontSize:13,display:"flex",alignItems:"center",gap:4},children:"← 返回"}),L.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.title})]}),L.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[i.status==="completed"&&L.jsxs(L.Fragment,{children:[L.jsx("button",{className:"btn-ghost",onClick:()=>N("docx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1},children:p==="docx"?"导出中...":"📄 Word"}),L.jsx("button",{className:"btn-ghost",onClick:()=>N("pptx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1},children:p==="pptx"?"导出中...":"📊 PPT"}),L.jsx("div",{style:{width:1,height:16,background:"var(--border)",margin:"0 4px"}}),L.jsx("button",{className:"btn-ghost",onClick:()=>H("docx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1,color:x?void 0:"#6366f1"},title:"由AI Agent设计生成精美Word文档",children:x==="docx"?v||"AI生成中...":"✨ AI Word"}),L.jsx("button",{className:"btn-ghost",onClick:()=>H("pptx"),disabled:p!==null||x!==null,style:{fontSize:12,display:"flex",alignItems:"center",gap:4,opacity:p||x?.5:1,color:x?void 0:"#6366f1"},title:"由AI Agent设计生成精美PPT文档",children:x==="pptx"?v||"AI生成中...":"✨ AI PPT"})]}),L.jsx("button",{onClick:D,style:{padding:"6px 14px",background:u?"var(--rose)":"transparent",color:u?"white":"var(--rose)",border:u?"none":"1px solid var(--rose)",borderRadius:"var(--radius-sm)",fontSize:12,cursor:"pointer",transition:"all 0.15s"},onBlur:()=>f(!1),children:u?"确认删除":"删除"})]})]}),L.jsxs("div",{style:{flex:1,overflow:"auto",padding:"20px"},children:[x&&v&&L.jsxs("div",{style:{marginBottom:16,padding:"10px 16px",background:"linear-gradient(90deg, rgba(99,102,241,0.08) 0%, rgba(99,102,241,0.03) 100%)",border:"1px solid rgba(99,102,241,0.2)",borderRadius:"var(--radius)",fontSize:13,color:"#6366f1",display:"flex",alignItems:"center",gap:8},children:[L.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#6366f1",animation:"pulse 1.5s ease-in-out infinite"}}),v,L.jsx("style",{children:"@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }"})]}),L.jsxs("div",{style:{display:"flex",gap:16,marginBottom:20,fontSize:13,color:"var(--text-muted)"},children:[L.jsx("span",{children:$7(i.startTime,i.endTime)}),i.duration!=null&&L.jsx("span",{style:{color:"var(--emerald)"},children:D7(i.duration)}),L.jsx("span",{style:{color:i.status==="completed"?"var(--emerald)":i.status==="error"?"var(--rose)":"var(--text-muted)"},children:N7[i.status]??i.status})]}),i.summary&&L.jsxs("div",{style:{marginBottom:20},children:[L.jsx("h3",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)",marginBottom:8,textTransform:"uppercase",letterSpacing:.5},children:"AI 摘要"}),L.jsx("div",{style:{padding:16,background:"linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(99,102,241,0.06) 100%)",border:"1px solid rgba(16,185,129,0.2)",borderRadius:"var(--radius)",fontSize:14,lineHeight:1.7,color:"var(--text-primary)"},children:i.summary})]}),L.jsxs("div",{style:{marginBottom:20},children:[L.jsx("h3",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)",marginBottom:8,textTransform:"uppercase",letterSpacing:.5},children:"会议总结"}),!i.aiSummary&&(k||i.status==="completed")&&L.jsxs("div",{style:{padding:16,background:"linear-gradient(90deg, rgba(99,102,241,0.06) 0%, rgba(99,102,241,0.02) 100%)",border:"1px solid rgba(99,102,241,0.15)",borderRadius:"var(--radius)",fontSize:13,color:"#6366f1",display:"flex",alignItems:"center",gap:8},children:[L.jsx("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#6366f1",animation:"pulse 1.5s ease-in-out infinite"}}),"正在生成会议总结..."]}),R.length>0&&L.jsx("div",{style:{padding:16,background:"linear-gradient(135deg, rgba(99,102,241,0.04) 0%, rgba(16,185,129,0.04) 100%)",border:"1px solid rgba(99,102,241,0.15)",borderRadius:"var(--radius)"},children:R.map((Z,P)=>{const et={会议概述:"#10B981",关键要点:"#6366F1",会议决议:"#F59E0B",待办事项:"#EF4444"}[Z.title]||"var(--text-secondary)";return L.jsxs("div",{style:P>0?{marginTop:14,paddingTop:14,borderTop:"1px solid var(--border)"}:{},children:[L.jsx("div",{style:{fontSize:12,fontWeight:600,color:et,marginBottom:6},children:Z.title}),L.jsx("div",{style:{fontSize:13,lineHeight:1.8,color:"var(--text-primary)",whiteSpace:"pre-wrap"},children:Z.content})]},P)})}),!i.aiSummary&&!k&&i.status!=="completed"&&L.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:"会议结束后自动生成总结"})]}),L.jsxs("div",{children:[L.jsx("h3",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)",marginBottom:8,textTransform:"uppercase",letterSpacing:.5},children:"完整转录"}),L.jsx("div",{style:{padding:16,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius)",fontSize:13,lineHeight:1.8,color:"var(--text-secondary)",maxHeight:"calc(100vh - 340px)",overflow:"auto",whiteSpace:"pre-wrap"},children:i.status==="summarizing"?L.jsx("span",{style:{color:"var(--text-muted)"},children:"正在生成摘要,请稍候..."}):i.status==="recording"?L.jsx("span",{style:{color:"var(--text-muted)"},children:"录音进行中..."}):i.transcript?i.transcript:L.jsx("span",{style:{color:"var(--text-muted)"},children:"暂无转录内容"})})]})]})]})}gA.createRoot(document.getElementById("root")).render(L.jsx(lA.StrictMode,{children:L.jsx(H3,{children:L.jsx(J3,{children:L.jsx(y3,{children:L.jsxs(Ca,{path:"/",element:L.jsx(eM,{}),children:[L.jsx(Ca,{index:!0,element:L.jsx(p3,{to:"/chat",replace:!0})}),L.jsx(Ca,{path:"chat",element:L.jsx(W2,{})}),L.jsx(Ca,{path:"chat/:sessionId",element:L.jsx(W2,{})}),L.jsx(Ca,{path:"sessions",element:L.jsx(M7,{})}),L.jsx(Ca,{path:"meetings",element:L.jsx(F7,{})}),L.jsx(Ca,{path:"meetings/:id",element:L.jsx(q7,{})}),L.jsx(Ca,{path:"settings",element:L.jsx(R7,{})})]})})})})}));export{WD as $,Mc as A,E8 as B,Gr as C,Yo as D,UT as E,Vv as F,rl as G,ly as H,J7 as I,kD as J,La as K,Xg as L,lt as M,zD as N,RD as O,ZM as P,ns as Q,Ni as R,V7 as S,Nv as T,It as U,sy as V,BD as W,UC as X,hk as Y,i$ as Z,QM as _,Oc as a,Xt as a$,YD as a0,h$ as a1,OR as a2,MR as a3,Le as a4,le as a5,Rm as a6,DR as a7,lI as a8,wi as a9,bz as aA,st as aB,l6 as aC,Ac as aD,SD as aE,mt as aF,OD as aG,eN as aH,tI as aI,eI as aJ,fk as aK,AT as aL,OT as aM,Ad as aN,TC as aO,uy as aP,wz as aQ,mI as aR,Ll as aS,u$ as aT,AD as aU,_8 as aV,xI as aW,Xv as aX,AO as aY,xn as aZ,Mr as a_,zc as aa,TD as ab,bI as ac,qT as ad,Fy as ae,wy as af,j5 as ag,yR as ah,Y7 as ai,PC as aj,gc as ak,Z7 as al,J8 as am,Az as an,Tz as ao,W_ as ap,UD as aq,PD as ar,jD as as,gn as at,zC as au,zO as av,Or as aw,PT as ax,Ty as ay,Bu as az,S as b,m6 as b0,RR as b1,AR as b2,X7 as b3,FR as b4,pI as b5,FD as b6,wR as b7,zR as b8,iI as b9,rI as ba,LT as bb,_t as bc,MD as bd,aI as be,ID as bf,HD as bg,ND as bh,qD as bi,w8 as bj,Et as bk,_r as bl,r6 as bm,p$ as bn,ie as c,Q7 as d,nI as e,Lv as f,RT as g,a6 as h,$D as i,DD as j,sI as k,Xe as l,St as m,K7 as n,MT as o,G7 as p,My as q,HT as r,Ba as s,Oy as t,LR as u,yI as v,fI as w,gI as x,xc as y,Zv as z};