const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-VKFMJZFB-_FzRq_-o.js","./chunk-RYQCIY6F-B0PVqbDD.js","./graph-C9eacEi8.js","./map-Czzmt4hB.js","./layout-DEXfKzaS.js","./swimlanes-5IMT3BWC-vA6X041u.js","./cose-bilkent-JH36ORCC-1NrWvAMb.js","./cytoscape.esm-DTSO7Bv0.js","./c4Diagram-LMCZKHZV-Br8qPxMc.js","./chunk-32BRIVSS-BYDIliIn.js","./flowDiagram-23GEKE2U-rOIHNp-r.js","./chunk-5VM5RSS4-iXte0czj.js","./chunk-XXDRQBXY-CdRrlCa3.js","./chunk-VR4S4FIN-DQcXtBck.js","./channel-Bx9wcAsP.js","./swimlanesDiagram-G3AALYLV-BpseX2El.js","./erDiagram-Q63AITRT-BtVpEuaX.js","./gitGraphDiagram-IHSO6WYX-hFLr96Vz.js","./chunk-2Q5K7J3B-Xh2LsIs3.js","./chunk-JWPE2WC7-CKhsSGRy.js","./cynefin-VYW2F7L2-BraDCPPi.js","./ganttDiagram-NO4QXBWP-BWFlc77F.js","./linear-CDITkNzv.js","./init-Gi6I4Gst.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-FWYZ7A6U-CSZuTFiu.js","./pieDiagram-ENE6RG2P-CvSXFQN0.js","./arc-gwX74m1o.js","./ordinal-Cboi1Yqb.js","./quadrantDiagram-ABIIQ3AL-B5X_j6LC.js","./xychartDiagram-FW5EYKEG-DVU-BO20.js","./requirementDiagram-TGXJPOKE-CRAm__nK.js","./sequenceDiagram-DBY2YBRQ-i5JjyU_K.js","./classDiagram-OUVF2IWQ-C_HYbY5A.js","./chunk-V7JOEXUC-DaddvbL4.js","./classDiagram-v2-EOCWNBFH-C_HYbY5A.js","./stateDiagram-2N3HPSRC-NYLwYa6P.js","./chunk-EX3LRPZG-Lit8-ZZv.js","./stateDiagram-v2-6OUMAXLB-CQxvb6Yl.js","./journeyDiagram-5HDEW3XC-B8VOwJPb.js","./timeline-definition-FHXFAJF6-BoOQRFoo.js","./mindmap-definition-LN4V7U3C-B28FBwCP.js","./kanban-definition-HUTT4EX6-YSTJ9rem.js","./sankeyDiagram-HTMAVEWB-DSJrqWPF.js","./diagram-NH7WQ7WH-hxpf__o2.js","./diagram-WEI45ONY-D1hW5B4N.js","./blockDiagram-677ZJIJ3-B6IZodPA.js","./diagram-OA4YK3LP-XXhHjmTz.js","./architectureDiagram-ZJ3FMSHR-YoUrCZNr.js","./diagram-FQU43EPY-BjwJUZGh.js","./diagram-G47NLZAW-D3iCgJ1h.js","./wardleyDiagram-EHGQE667-BvjBgVR-.js","./cynefinDiagram-TSTJHNR4-BnaWjqQX.js","./railroadDiagram-RFXS5EU6-BSwDrC7U.js","./chunk-MOJQB5TN-CoVn2ZUh.js","./ebnfDiagram-CCIWWBDH-C6f2ITwd.js","./abnfDiagram-VRR7QNED-V5Wqix3f.js","./pegDiagram-2B236MQR-Dn8YYxfi.js"])))=>i.map(i=>d[i]);
var AL=Object.defineProperty;var ML=(e,t,i)=>t in e?AL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var It=(e,t,i)=>ML(e,typeof t!="symbol"?t+"":t,i);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)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(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=i(o);fetch(o.href,l)}})();function DL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jp={exports:{}},tc={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var BC;function RL(){if(BC)return tc;BC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,l){var c=null;if(l!==void 0&&(c=""+l),o.key!==void 0&&(c=""+o.key),"key"in o){l={};for(var h in o)h!=="key"&&(l[h]=o[h])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:c,ref:o!==void 0?o:null,props:l}}return tc.Fragment=t,tc.jsx=i,tc.jsxs=i,tc}var EC;function FL(){return EC||(EC=1,Jp.exports=RL()),Jp.exports}var w=FL(),tg={exports:{}},Gt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var LC;function zL(){if(LC)return Gt;LC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function y(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function T(R,q,nt){this.props=R,this.context=q,this.refs=v,this.updater=nt||C}T.prototype.isReactComponent={},T.prototype.setState=function(R,q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,q,"setState")},T.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function B(){}B.prototype=T.prototype;function L(R,q,nt){this.props=R,this.context=q,this.refs=v,this.updater=nt||C}var M=L.prototype=new B;M.constructor=L,k(M,T.prototype),M.isPureReactComponent=!0;var F=Array.isArray;function $(){}var N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function ot(R,q,nt){var ht=nt.ref;return{$$typeof:e,type:R,key:q,ref:ht!==void 0?ht:null,props:nt}}function K(R,q){return ot(R.type,q,R.props)}function Y(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function Z(R){var q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(nt){return q[nt]})}var it=/\/+/g;function X(R,q){return typeof R=="object"&&R!==null&&R.key!=null?Z(""+R.key):q.toString(36)}function U(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then($,$):(R.status="pending",R.then(function(q){R.status==="pending"&&(R.status="fulfilled",R.value=q)},function(q){R.status==="pending"&&(R.status="rejected",R.reason=q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function D(R,q,nt,ht,yt){var Ct=typeof R;(Ct==="undefined"||Ct==="boolean")&&(R=null);var wt=!1;if(R===null)wt=!0;else switch(Ct){case"bigint":case"string":case"number":wt=!0;break;case"object":switch(R.$$typeof){case e:case t:wt=!0;break;case p:return wt=R._init,D(wt(R._payload),q,nt,ht,yt)}}if(wt)return yt=yt(R),wt=ht===""?"."+X(R,0):ht,F(yt)?(nt="",wt!=null&&(nt=wt.replace(it,"$&/")+"/"),D(yt,q,nt,"",function(vt){return vt})):yt!=null&&(Y(yt)&&(yt=K(yt,nt+(yt.key==null||R&&R.key===yt.key?"":(""+yt.key).replace(it,"$&/")+"/")+wt)),q.push(yt)),1;wt=0;var kt=ht===""?".":ht+":";if(F(R))for(var Dt=0;Dt<R.length;Dt++)ht=R[Dt],Ct=kt+X(ht,Dt),wt+=D(ht,q,nt,Ct,yt);else if(Dt=y(R),typeof Dt=="function")for(R=Dt.call(R),Dt=0;!(ht=R.next()).done;)ht=ht.value,Ct=kt+X(ht,Dt++),wt+=D(ht,q,nt,Ct,yt);else if(Ct==="object"){if(typeof R.then=="function")return D(U(R),q,nt,ht,yt);throw q=String(R),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return wt}function I(R,q,nt){if(R==null)return R;var ht=[],yt=0;return D(R,ht,"","",function(Ct){return q.call(nt,Ct,yt++)}),ht}function z(R){if(R._status===-1){var q=R._result;q=q(),q.then(function(nt){(R._status===0||R._status===-1)&&(R._status=1,R._result=nt)},function(nt){(R._status===0||R._status===-1)&&(R._status=2,R._result=nt)}),R._status===-1&&(R._status=0,R._result=q)}if(R._status===1)return R._result.default;throw R._result}var P=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},G={map:I,forEach:function(R,q,nt){I(R,function(){q.apply(this,arguments)},nt)},count:function(R){var q=0;return I(R,function(){q++}),q},toArray:function(R){return I(R,function(q){return q})||[]},only:function(R){if(!Y(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Gt.Activity=g,Gt.Children=G,Gt.Component=T,Gt.Fragment=i,Gt.Profiler=o,Gt.PureComponent=L,Gt.StrictMode=a,Gt.Suspense=d,Gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Gt.__COMPILER_RUNTIME={__proto__:null,c:function(R){return N.H.useMemoCache(R)}},Gt.cache=function(R){return function(){return R.apply(null,arguments)}},Gt.cacheSignal=function(){return null},Gt.cloneElement=function(R,q,nt){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ht=k({},R.props),yt=R.key;if(q!=null)for(Ct in q.key!==void 0&&(yt=""+q.key),q)!j.call(q,Ct)||Ct==="key"||Ct==="__self"||Ct==="__source"||Ct==="ref"&&q.ref===void 0||(ht[Ct]=q[Ct]);var Ct=arguments.length-2;if(Ct===1)ht.children=nt;else if(1<Ct){for(var wt=Array(Ct),kt=0;kt<Ct;kt++)wt[kt]=arguments[kt+2];ht.children=wt}return ot(R.type,yt,ht)},Gt.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:l,_context:R},R},Gt.createElement=function(R,q,nt){var ht,yt={},Ct=null;if(q!=null)for(ht in q.key!==void 0&&(Ct=""+q.key),q)j.call(q,ht)&&ht!=="key"&&ht!=="__self"&&ht!=="__source"&&(yt[ht]=q[ht]);var wt=arguments.length-2;if(wt===1)yt.children=nt;else if(1<wt){for(var kt=Array(wt),Dt=0;Dt<wt;Dt++)kt[Dt]=arguments[Dt+2];yt.children=kt}if(R&&R.defaultProps)for(ht in wt=R.defaultProps,wt)yt[ht]===void 0&&(yt[ht]=wt[ht]);return ot(R,Ct,yt)},Gt.createRef=function(){return{current:null}},Gt.forwardRef=function(R){return{$$typeof:h,render:R}},Gt.isValidElement=Y,Gt.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:z}},Gt.memo=function(R,q){return{$$typeof:f,type:R,compare:q===void 0?null:q}},Gt.startTransition=function(R){var q=N.T,nt={};N.T=nt;try{var ht=R(),yt=N.S;yt!==null&&yt(nt,ht),typeof ht=="object"&&ht!==null&&typeof ht.then=="function"&&ht.then($,P)}catch(Ct){P(Ct)}finally{q!==null&&nt.types!==null&&(q.types=nt.types),N.T=q}},Gt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Gt.use=function(R){return N.H.use(R)},Gt.useActionState=function(R,q,nt){return N.H.useActionState(R,q,nt)},Gt.useCallback=function(R,q){return N.H.useCallback(R,q)},Gt.useContext=function(R){return N.H.useContext(R)},Gt.useDebugValue=function(){},Gt.useDeferredValue=function(R,q){return N.H.useDeferredValue(R,q)},Gt.useEffect=function(R,q){return N.H.useEffect(R,q)},Gt.useEffectEvent=function(R){return N.H.useEffectEvent(R)},Gt.useId=function(){return N.H.useId()},Gt.useImperativeHandle=function(R,q,nt){return N.H.useImperativeHandle(R,q,nt)},Gt.useInsertionEffect=function(R,q){return N.H.useInsertionEffect(R,q)},Gt.useLayoutEffect=function(R,q){return N.H.useLayoutEffect(R,q)},Gt.useMemo=function(R,q){return N.H.useMemo(R,q)},Gt.useOptimistic=function(R,q){return N.H.useOptimistic(R,q)},Gt.useReducer=function(R,q,nt){return N.H.useReducer(R,q,nt)},Gt.useRef=function(R){return N.H.useRef(R)},Gt.useState=function(R){return N.H.useState(R)},Gt.useSyncExternalStore=function(R,q,nt){return N.H.useSyncExternalStore(R,q,nt)},Gt.useTransition=function(){return N.H.useTransition()},Gt.version="19.2.7",Gt}var AC;function Dm(){return AC||(AC=1,tg.exports=zL()),tg.exports}var gt=Dm(),eg={exports:{}},ec={},rg={exports:{}},ig={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var MC;function OL(){return MC||(MC=1,(function(e){function t(D,I){var z=D.length;D.push(I);t:for(;0<z;){var P=z-1>>>1,G=D[P];if(0<o(G,I))D[P]=I,D[z]=G,z=P;else break t}}function i(D){return D.length===0?null:D[0]}function a(D){if(D.length===0)return null;var I=D[0],z=D.pop();if(z!==I){D[0]=z;t:for(var P=0,G=D.length,R=G>>>1;P<R;){var q=2*(P+1)-1,nt=D[q],ht=q+1,yt=D[ht];if(0>o(nt,z))ht<G&&0>o(yt,nt)?(D[P]=yt,D[ht]=z,P=ht):(D[P]=nt,D[q]=z,P=q);else if(ht<G&&0>o(yt,z))D[P]=yt,D[ht]=z,P=ht;else break t}}return I}function o(D,I){var z=D.sortIndex-I.sortIndex;return z!==0?z:D.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 d=[],f=[],p=1,g=null,x=3,y=!1,C=!1,k=!1,v=!1,T=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function M(D){for(var I=i(f);I!==null;){if(I.callback===null)a(f);else if(I.startTime<=D)a(f),I.sortIndex=I.expirationTime,t(d,I);else break;I=i(f)}}function F(D){if(k=!1,M(D),!C)if(i(d)!==null)C=!0,$||($=!0,Z());else{var I=i(f);I!==null&&U(F,I.startTime-D)}}var $=!1,N=-1,j=5,ot=-1;function K(){return v?!0:!(e.unstable_now()-ot<j)}function Y(){if(v=!1,$){var D=e.unstable_now();ot=D;var I=!0;try{t:{C=!1,k&&(k=!1,B(N),N=-1),y=!0;var z=x;try{e:{for(M(D),g=i(d);g!==null&&!(g.expirationTime>D&&K());){var P=g.callback;if(typeof P=="function"){g.callback=null,x=g.priorityLevel;var G=P(g.expirationTime<=D);if(D=e.unstable_now(),typeof G=="function"){g.callback=G,M(D),I=!0;break e}g===i(d)&&a(d),M(D)}else a(d);g=i(d)}if(g!==null)I=!0;else{var R=i(f);R!==null&&U(F,R.startTime-D),I=!1}}break t}finally{g=null,x=z,y=!1}I=void 0}}finally{I?Z():$=!1}}}var Z;if(typeof L=="function")Z=function(){L(Y)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,X=it.port2;it.port1.onmessage=Y,Z=function(){X.postMessage(null)}}else Z=function(){T(Y,0)};function U(D,I){N=T(function(){D(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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(D){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var z=x;x=I;try{return D()}finally{x=z}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(D,I){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var z=x;x=D;try{return I()}finally{x=z}},e.unstable_scheduleCallback=function(D,I,z){var P=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?P+z:P):z=P,D){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=z+G,D={id:p++,callback:I,priorityLevel:D,startTime:z,expirationTime:G,sortIndex:-1},z>P?(D.sortIndex=z,t(f,D),i(d)===null&&D===i(f)&&(k?(B(N),N=-1):k=!0,U(F,z-P))):(D.sortIndex=G,t(d,D),C||y||(C=!0,$||($=!0,Z()))),D},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(D){var I=x;return function(){var z=x;x=I;try{return D.apply(this,arguments)}finally{x=z}}}})(ig)),ig}var DC;function $L(){return DC||(DC=1,rg.exports=OL()),rg.exports}var ag={exports:{}},xr={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var RC;function NL(){if(RC)return xr;RC=1;var e=Dm();function t(d){var f="https://react.dev/errors/"+d;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 #"+d+"; 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},o=Symbol.for("react.portal");function l(d,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:d,containerInfo:f,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,xr.createPortal=function(d,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(d,f,null,p)},xr.flushSync=function(d){var f=c.T,p=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=f,a.p=p,a.d.f()}},xr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(d,f))},xr.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},xr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:y}):p==="script"&&a.d.X(d,{crossOrigin:g,integrity:x,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},xr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=h(f.as,f.crossOrigin);a.d.M(d,{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(d)},xr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=h(p,f.crossOrigin);a.d.L(d,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})}},xr.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=h(f.as,f.crossOrigin);a.d.m(d,{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(d)},xr.requestFormReset=function(d){a.d.r(d)},xr.unstable_batchedUpdates=function(d,f){return d(f)},xr.useFormState=function(d,f,p){return c.H.useFormState(d,f,p)},xr.useFormStatus=function(){return c.H.useHostTransitionStatus()},xr.version="19.2.7",xr}var FC;function IL(){if(FC)return ag.exports;FC=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(),ag.exports=NL(),ag.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zC;function qL(){if(zC)return ec;zC=1;var e=$L(),t=Dm(),i=IL();function a(r){var n="https://react.dev/errors/"+r;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}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 o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var n=r,s=r;if(r.alternate)for(;n.return;)n=n.return;else{r=n;do n=r,(n.flags&4098)!==0&&(s=n.return),r=n.return;while(r)}return n.tag===3?s: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 d(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 s=r,u=n;;){var m=s.return;if(m===null)break;var b=m.alternate;if(b===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===s)return d(m),r;if(b===u)return d(m),n;b=b.sibling}throw Error(a(188))}if(s.return!==u.return)s=m,u=b;else{for(var _=!1,A=m.child;A;){if(A===s){_=!0,s=m,u=b;break}if(A===u){_=!0,u=m,s=b;break}A=A.sibling}if(!_){for(A=b.child;A;){if(A===s){_=!0,s=b,u=m;break}if(A===u){_=!0,u=b,s=m;break}A=A.sibling}if(!_)throw Error(a(189))}}if(s.alternate!==u)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?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"),y=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),ot=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function Z(r){return r===null||typeof r!="object"?null:(r=Y&&r[Y]||r["@@iterator"],typeof r=="function"?r:null)}var it=Symbol.for("react.client.reference");function X(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===it?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case k:return"Fragment";case T:return"Profiler";case v:return"StrictMode";case F:return"Suspense";case $:return"SuspenseList";case ot:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case L:return r.displayName||"Context";case B:return(r._context.displayName||"Context")+".Consumer";case M:var n=r.render;return r=r.displayName,r||(r=n.displayName||n.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case N:return n=r.displayName||null,n!==null?n:X(r.type)||"Memo";case j:n=r._payload,r=r._init;try{return X(r(n))}catch{}}return null}var U=Array.isArray,D=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,z={pending:!1,data:null,method:null,action:null},P=[],G=-1;function R(r){return{current:r}}function q(r){0>G||(r.current=P[G],P[G]=null,G--)}function nt(r,n){G++,P[G]=r.current,r.current=n}var ht=R(null),yt=R(null),Ct=R(null),wt=R(null);function kt(r,n){switch(nt(Ct,n),nt(yt,r),nt(ht,null),n.nodeType){case 9:case 11:r=(r=n.documentElement)&&(r=r.namespaceURI)?Qb(r):0;break;default:if(r=n.tagName,n=n.namespaceURI)n=Qb(n),r=Kb(n,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}q(ht),nt(ht,r)}function Dt(){q(ht),q(yt),q(Ct)}function vt(r){r.memoizedState!==null&&nt(wt,r);var n=ht.current,s=Kb(n,r.type);n!==s&&(nt(yt,r),nt(ht,s))}function dt(r){yt.current===r&&(q(ht),q(yt)),wt.current===r&&(q(wt),Ql._currentValue=z)}var Tt,Bt;function J(r){if(Tt===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);Tt=n&&n[1]||"",Bt=-1<s.stack.indexOf(`
    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Tt+r+Bt}var St=!1;function Dr(r,n){if(!r||St)return"";St=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var pt=function(){throw Error()};if(Object.defineProperty(pt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pt,[])}catch(ct){var at=ct}Reflect.construct(r,[],pt)}else{try{pt.call()}catch(ct){at=ct}r.call(pt.prototype)}}else{try{throw Error()}catch(ct){at=ct}(pt=r())&&typeof pt.catch=="function"&&pt.catch(function(){})}}catch(ct){if(ct&&at&&typeof ct.stack=="string")return[ct.stack,at.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),_=b[0],A=b[1];if(_&&A){var H=_.split(`
`),et=A.split(`
`);for(m=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;m<et.length&&!et[m].includes("DetermineComponentFrameRoot");)m++;if(u===H.length||m===et.length)for(u=H.length-1,m=et.length-1;1<=u&&0<=m&&H[u]!==et[m];)m--;for(;1<=u&&0<=m;u--,m--)if(H[u]!==et[m]){if(u!==1||m!==1)do if(u--,m--,0>m||H[u]!==et[m]){var ut=`
`+H[u].replace(" at new "," at ");return r.displayName&&ut.includes("<anonymous>")&&(ut=ut.replace("<anonymous>",r.displayName)),ut}while(1<=u&&0<=m);break}}}finally{St=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?J(s):""}function al(r,n){switch(r.tag){case 26:case 27:case 5:return J(r.type);case 16:return J("Lazy");case 13:return r.child!==n&&n!==null?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return Dr(r.type,!1);case 11:return Dr(r.type.render,!1);case 1:return Dr(r.type,!0);case 31:return J("Activity");default:return""}}function wr(r){try{var n="",s=null;do n+=al(r,s),s=r,r=r.return;while(r);return n}catch(u){return`
Error generating stack: `+u.message+`
`+u.stack}}var wo=Object.prototype.hasOwnProperty,En=e.unstable_scheduleCallback,To=e.unstable_cancelCallback,Zc=e.unstable_shouldYield,zi=e.unstable_requestPaint,Ye=e.unstable_now,na=e.unstable_getCurrentPriorityLevel,_o=e.unstable_ImmediatePriority,Bo=e.unstable_UserBlockingPriority,za=e.unstable_NormalPriority,nl=e.unstable_LowPriority,oa=e.unstable_IdlePriority,Eo=e.log,Lo=e.unstable_setDisableYieldValue,Oa=null,mr=null;function yi(r){if(typeof Eo=="function"&&Lo(r),mr&&typeof mr.setStrictMode=="function")try{mr.setStrictMode(Oa,r)}catch{}}var ar=Math.clz32?Math.clz32:oi,ol=Math.log,$a=Math.LN2;function oi(r){return r>>>=0,r===0?32:31-(ol(r)/$a|0)|0}var Na=256,Ln=262144,An=4194304;function xi(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 Mn(r,n,s){var u=r.pendingLanes;if(u===0)return 0;var m=0,b=r.suspendedLanes,_=r.pingedLanes;r=r.warmLanes;var A=u&134217727;return A!==0?(u=A&~b,u!==0?m=xi(u):(_&=A,_!==0?m=xi(_):s||(s=A&~r,s!==0&&(m=xi(s))))):(A=u&~b,A!==0?m=xi(A):_!==0?m=xi(_):s||(s=u&~r,s!==0&&(m=xi(s)))),m===0?0:n!==0&&n!==m&&(n&b)===0&&(b=m&-m,s=n&-n,b>=s||b===32&&(s&4194048)!==0)?n:m}function Oi(r,n){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&n)===0}function Ao(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 Gr(){var r=An;return An<<=1,(An&62914560)===0&&(An=4194304),r}function $i(r){for(var n=[],s=0;31>s;s++)n.push(r);return n}function sa(r,n){r.pendingLanes|=n,n!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function sl(r,n,s,u,m,b){var _=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var A=r.entanglements,H=r.expirationTimes,et=r.hiddenUpdates;for(s=_&~s;0<s;){var ut=31-ar(s),pt=1<<ut;A[ut]=0,H[ut]=-1;var at=et[ut];if(at!==null)for(et[ut]=null,ut=0;ut<at.length;ut++){var ct=at[ut];ct!==null&&(ct.lane&=-536870913)}s&=~pt}u!==0&&Jc(r,u,0),b!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=b&~(_&~n))}function Jc(r,n,s){r.pendingLanes|=n,r.suspendedLanes&=~n;var u=31-ar(n);r.entangledLanes|=n,r.entanglements[u]=r.entanglements[u]|1073741824|s&261930}function ll(r,n){var s=r.entangledLanes|=n;for(r=r.entanglements;s;){var u=31-ar(s),m=1<<u;m&n|r[u]&n&&(r[u]|=n),s&=~m}}function Mo(r,n){var s=n&-n;return s=(s&42)!==0?1:Do(s),(s&(r.suspendedLanes|n))!==0?0:s}function Do(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 Dn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function th(){var r=I.p;return r!==0?r:(r=window.event,r===void 0?32:CC(r.type))}function Ia(r,n){var s=I.p;try{return I.p=r,n()}finally{I.p=s}}var Ni=Math.random().toString(36).slice(2),Ge="__reactFiber$"+Ni,Jt="__reactProps$"+Ni,Vr="__reactContainer$"+Ni,cl="__reactEvents$"+Ni,eh="__reactListeners$"+Ni,hl="__reactHandles$"+Ni,ul="__reactResources$"+Ni,qa="__reactMarker$"+Ni;function dl(r){delete r[Ge],delete r[Jt],delete r[cl],delete r[eh],delete r[hl]}function ja(r){var n=r[Ge];if(n)return n;for(var s=r.parentNode;s;){if(n=s[Vr]||s[Ge]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(r=aC(r);r!==null;){if(s=r[Ge])return s;r=aC(r)}return n}r=s,s=r.parentNode}return null}function Ha(r){if(r=r[Ge]||r[Vr]){var n=r.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return r}return null}function Rn(r){var n=r.tag;if(n===5||n===26||n===27||n===6)return r.stateNode;throw Error(a(33))}function Tr(r){var n=r[ul];return n||(n=r[ul]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Fe(r){r[qa]=!0}var Ii=new Set,rh={};function la(r,n){ca(r,n),ca(r+"Capture",n)}function ca(r,n){for(rh[r]=n,r=0;r<n.length;r++)Ii.add(n[r])}var ih=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]*$"),Fn={},Ro={};function Fo(r){return wo.call(Ro,r)?!0:wo.call(Fn,r)?!1:ih.test(r)?Ro[r]=!0:(Fn[r]=!0,!1)}function bi(r,n,s){if(Fo(n))if(s===null)r.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(n);return}}r.setAttribute(n,""+s)}}function qi(r,n,s){if(s===null)r.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(n);return}r.setAttribute(n,""+s)}}function Ve(r,n,s,u){if(u===null)r.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(n,s,""+u)}}function Rr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ah(r){var n=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function nh(r,n,s){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,n);if(!r.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,b=u.set;return Object.defineProperty(r,n,{configurable:!0,get:function(){return m.call(this)},set:function(_){s=""+_,b.call(this,_)}}),Object.defineProperty(r,n,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(_){s=""+_},stopTracking:function(){r._valueTracker=null,delete r[n]}}}}function zo(r){if(!r._valueTracker){var n=ah(r)?"checked":"value";r._valueTracker=nh(r,n,""+r[n])}}function oh(r){if(!r)return!1;var n=r._valueTracker;if(!n)return!0;var s=n.getValue(),u="";return r&&(u=ah(r)?r.checked?"true":"false":r.value),r=u,r!==s?(n.setValue(r),!0):!1}function zn(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 Xd=/[\n"\\]/g;function Fr(r){return r.replace(Xd,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Oo(r,n,s,u,m,b,_,A){r.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?r.type=_:r.removeAttribute("type"),n!=null?_==="number"?(n===0&&r.value===""||r.value!=n)&&(r.value=""+Rr(n)):r.value!==""+Rr(n)&&(r.value=""+Rr(n)):_!=="submit"&&_!=="reset"||r.removeAttribute("value"),n!=null?$n(r,_,Rr(n)):s!=null?$n(r,_,Rr(s)):u!=null&&r.removeAttribute("value"),m==null&&b!=null&&(r.defaultChecked=!!b),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.name=""+Rr(A):r.removeAttribute("name")}function On(r,n,s,u,m,b,_,A){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),n!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||n!=null)){zo(r);return}s=s!=null?""+Rr(s):"",n=n!=null?""+Rr(n):s,A||n===r.value||(r.value=n),r.defaultValue=n}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=A?r.checked:!!u,r.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(r.name=_),zo(r)}function $n(r,n,s){n==="number"&&zn(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function bt(r,n,s,u){if(r=r.options,n){n={};for(var m=0;m<s.length;m++)n["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=n.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&u&&(r[s].defaultSelected=!0)}else{for(s=""+Rr(s),n=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,u&&(r[m].defaultSelected=!0);return}n!==null||r[m].disabled||(n=r[m])}n!==null&&(n.selected=!0)}}function O(r,n,s){if(n!=null&&(n=""+Rr(n),n!==r.value&&(r.value=n),s==null)){r.defaultValue!==n&&(r.defaultValue=n);return}r.defaultValue=s!=null?""+Rr(s):""}function rt(r,n,s,u){if(n==null){if(u!=null){if(s!=null)throw Error(a(92));if(U(u)){if(1<u.length)throw Error(a(93));u=u[0]}s=u}s==null&&(s=""),n=s}s=Rr(n),r.defaultValue=s,u=r.textContent,u===s&&u!==""&&u!==null&&(r.value=u),zo(r)}function xt(r,n){if(n){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=n;return}}r.textContent=n}var Ft=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 Vt(r,n,s){var u=n.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?r.setProperty(n,""):n==="float"?r.cssFloat="":r[n]="":u?r.setProperty(n,s):typeof s!="number"||s===0||Ft.has(n)?n==="float"?r.cssFloat=s:r[n]=(""+s).trim():r[n]=s+"px"}function re(r,n,s){if(n!=null&&typeof n!="object")throw Error(a(62));if(r=r.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var m in n)u=n[m],n.hasOwnProperty(m)&&s[m]!==u&&Vt(r,m,u)}else for(var b in n)n.hasOwnProperty(b)&&Vt(r,b,n[b])}function Le(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 Ae=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"]]),zr=/^[\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 yr(r){return zr.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Xr(){}var Xe=null;function Qd(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var $o=null,No=null;function Xy(r){var n=Ha(r);if(n&&(r=n.stateNode)){var s=r[Jt]||null;t:switch(r=n.stateNode,n.type){case"input":if(Oo(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Fr(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var u=s[n];if(u!==r&&u.form===r.form){var m=u[Jt]||null;if(!m)throw Error(a(90));Oo(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(n=0;n<s.length;n++)u=s[n],u.form===r.form&&oh(u)}break t;case"textarea":O(r,s.value,s.defaultValue);break t;case"select":n=s.value,n!=null&&bt(r,!!s.multiple,n,!1)}}}var Kd=!1;function Qy(r,n,s){if(Kd)return r(n,s);Kd=!0;try{var u=r(n);return u}finally{if(Kd=!1,($o!==null||No!==null)&&(Gh(),$o&&(n=$o,r=No,No=$o=null,Xy(n),r)))for(n=0;n<r.length;n++)Xy(r[n])}}function fl(r,n){var s=r.stateNode;if(s===null)return null;var u=s[Jt]||null;if(u===null)return null;s=u[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":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break t;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(a(231,n,typeof s));return s}var ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zd=!1;if(ha)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){Zd=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{Zd=!1}var Pa=null,Jd=null,sh=null;function Ky(){if(sh)return sh;var r,n=Jd,s=n.length,u,m="value"in Pa?Pa.value:Pa.textContent,b=m.length;for(r=0;r<s&&n[r]===m[r];r++);var _=s-r;for(u=1;u<=_&&n[s-u]===m[b-u];u++);return sh=m.slice(r,1<u?1-u:void 0)}function lh(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 ch(){return!0}function Zy(){return!1}function Or(r){function n(s,u,m,b,_){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var A in r)r.hasOwnProperty(A)&&(s=r[A],this[A]=s?s(b):b[A]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ch:Zy,this.isPropagationStopped=Zy,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ch)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ch)},persist:function(){},isPersistent:ch}),n}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hh=Or(Nn),gl=g({},Nn,{view:0,detail:0}),EB=Or(gl),tf,ef,ml,uh=g({},gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:af,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!==ml&&(ml&&r.type==="mousemove"?(tf=r.screenX-ml.screenX,ef=r.screenY-ml.screenY):ef=tf=0,ml=r),tf)},movementY:function(r){return"movementY"in r?r.movementY:ef}}),Jy=Or(uh),LB=g({},uh,{dataTransfer:0}),AB=Or(LB),MB=g({},gl,{relatedTarget:0}),rf=Or(MB),DB=g({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0}),RB=Or(DB),FB=g({},Nn,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),zB=Or(FB),OB=g({},Nn,{data:0}),t0=Or(OB),$B={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NB={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"},IB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qB(r){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(r):(r=IB[r])?!!n[r]:!1}function af(){return qB}var jB=g({},gl,{key:function(r){if(r.key){var n=$B[r.key]||r.key;if(n!=="Unidentified")return n}return r.type==="keypress"?(r=lh(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?NB[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:af,charCode:function(r){return r.type==="keypress"?lh(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?lh(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),HB=Or(jB),PB=g({},uh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),e0=Or(PB),WB=g({},gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:af}),UB=Or(WB),YB=g({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0}),GB=Or(YB),VB=g({},uh,{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}),XB=Or(VB),QB=g({},Nn,{newState:0,oldState:0}),KB=Or(QB),ZB=[9,13,27,32],nf=ha&&"CompositionEvent"in window,yl=null;ha&&"documentMode"in document&&(yl=document.documentMode);var JB=ha&&"TextEvent"in window&&!yl,r0=ha&&(!nf||yl&&8<yl&&11>=yl),i0=" ",a0=!1;function n0(r,n){switch(r){case"keyup":return ZB.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function o0(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Io=!1;function tE(r,n){switch(r){case"compositionend":return o0(n);case"keypress":return n.which!==32?null:(a0=!0,i0);case"textInput":return r=n.data,r===i0&&a0?null:r;default:return null}}function eE(r,n){if(Io)return r==="compositionend"||!nf&&n0(r,n)?(r=Ky(),sh=Jd=Pa=null,Io=!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 r0&&n.locale!=="ko"?null:n.data;default:return null}}var rE={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 s0(r){var n=r&&r.nodeName&&r.nodeName.toLowerCase();return n==="input"?!!rE[r.type]:n==="textarea"}function l0(r,n,s,u){$o?No?No.push(u):No=[u]:$o=u,n=tu(n,"onChange"),0<n.length&&(s=new hh("onChange","change",null,s,u),r.push({event:s,listeners:n}))}var xl=null,bl=null;function iE(r){Wb(r,0)}function dh(r){var n=Rn(r);if(oh(n))return r}function c0(r,n){if(r==="change")return n}var h0=!1;if(ha){var of;if(ha){var sf="oninput"in document;if(!sf){var u0=document.createElement("div");u0.setAttribute("oninput","return;"),sf=typeof u0.oninput=="function"}of=sf}else of=!1;h0=of&&(!document.documentMode||9<document.documentMode)}function d0(){xl&&(xl.detachEvent("onpropertychange",f0),bl=xl=null)}function f0(r){if(r.propertyName==="value"&&dh(bl)){var n=[];l0(n,bl,r,Qd(r)),Qy(iE,n)}}function aE(r,n,s){r==="focusin"?(d0(),xl=n,bl=s,xl.attachEvent("onpropertychange",f0)):r==="focusout"&&d0()}function nE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return dh(bl)}function oE(r,n){if(r==="click")return dh(n)}function sE(r,n){if(r==="input"||r==="change")return dh(n)}function lE(r,n){return r===n&&(r!==0||1/r===1/n)||r!==r&&n!==n}var Qr=typeof Object.is=="function"?Object.is:lE;function Cl(r,n){if(Qr(r,n))return!0;if(typeof r!="object"||r===null||typeof n!="object"||n===null)return!1;var s=Object.keys(r),u=Object.keys(n);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!wo.call(n,m)||!Qr(r[m],n[m]))return!1}return!0}function p0(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function g0(r,n){var s=p0(r);r=0;for(var u;s;){if(s.nodeType===3){if(u=r+s.textContent.length,r<=n&&u>=n)return{node:s,offset:n-r};r=u}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=p0(s)}}function m0(r,n){return r&&n?r===n?!0:r&&r.nodeType===3?!1:n&&n.nodeType===3?m0(r,n.parentNode):"contains"in r?r.contains(n):r.compareDocumentPosition?!!(r.compareDocumentPosition(n)&16):!1:!1}function y0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var n=zn(r.document);n instanceof r.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)r=n.contentWindow;else break;n=zn(r.document)}return n}function lf(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 cE=ha&&"documentMode"in document&&11>=document.documentMode,qo=null,cf=null,vl=null,hf=!1;function x0(r,n,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hf||qo==null||qo!==zn(u)||(u=qo,"selectionStart"in u&&lf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),vl&&Cl(vl,u)||(vl=u,u=tu(cf,"onSelect"),0<u.length&&(n=new hh("onSelect","select",null,n,s),r.push({event:n,listeners:u}),n.target=qo)))}function In(r,n){var s={};return s[r.toLowerCase()]=n.toLowerCase(),s["Webkit"+r]="webkit"+n,s["Moz"+r]="moz"+n,s}var jo={animationend:In("Animation","AnimationEnd"),animationiteration:In("Animation","AnimationIteration"),animationstart:In("Animation","AnimationStart"),transitionrun:In("Transition","TransitionRun"),transitionstart:In("Transition","TransitionStart"),transitioncancel:In("Transition","TransitionCancel"),transitionend:In("Transition","TransitionEnd")},uf={},b0={};ha&&(b0=document.createElement("div").style,"AnimationEvent"in window||(delete jo.animationend.animation,delete jo.animationiteration.animation,delete jo.animationstart.animation),"TransitionEvent"in window||delete jo.transitionend.transition);function qn(r){if(uf[r])return uf[r];if(!jo[r])return r;var n=jo[r],s;for(s in n)if(n.hasOwnProperty(s)&&s in b0)return uf[r]=n[s];return r}var C0=qn("animationend"),v0=qn("animationiteration"),k0=qn("animationstart"),hE=qn("transitionrun"),uE=qn("transitionstart"),dE=qn("transitioncancel"),S0=qn("transitionend"),w0=new Map,df="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(" ");df.push("scrollEnd");function Ci(r,n){w0.set(r,n),la(n,[r])}var fh=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)},si=[],Ho=0,ff=0;function ph(){for(var r=Ho,n=ff=Ho=0;n<r;){var s=si[n];si[n++]=null;var u=si[n];si[n++]=null;var m=si[n];si[n++]=null;var b=si[n];if(si[n++]=null,u!==null&&m!==null){var _=u.pending;_===null?m.next=m:(m.next=_.next,_.next=m),u.pending=m}b!==0&&T0(s,m,b)}}function gh(r,n,s,u){si[Ho++]=r,si[Ho++]=n,si[Ho++]=s,si[Ho++]=u,ff|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function pf(r,n,s,u){return gh(r,n,s,u),mh(r)}function jn(r,n){return gh(r,null,null,n),mh(r)}function T0(r,n,s){r.lanes|=s;var u=r.alternate;u!==null&&(u.lanes|=s);for(var m=!1,b=r.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(m=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,m&&n!==null&&(m=31-ar(s),r=b.hiddenUpdates,u=r[m],u===null?r[m]=[n]:u.push(n),n.lane=s|536870912),b):null}function mh(r){if(50<Pl)throw Pl=0,Sp=null,Error(a(185));for(var n=r.return;n!==null;)r=n,n=r.return;return r.tag===3?r.stateNode:null}var Po={};function fE(r,n,s,u){this.tag=r,this.key=s,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=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(r,n,s,u){return new fE(r,n,s,u)}function gf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ua(r,n){var s=r.alternate;return s===null?(s=Kr(r.tag,n,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=n,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,n=r.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function _0(r,n){r.flags&=65011714;var s=r.alternate;return s===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=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,n=s.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),r}function yh(r,n,s,u,m,b){var _=0;if(u=r,typeof r=="function")gf(r)&&(_=1);else if(typeof r=="string")_=xL(r,s,ht.current)?26:r==="html"||r==="head"||r==="body"?27:5;else t:switch(r){case ot:return r=Kr(31,s,n,m),r.elementType=ot,r.lanes=b,r;case k:return Hn(s.children,m,b,n);case v:_=8,m|=24;break;case T:return r=Kr(12,s,n,m|2),r.elementType=T,r.lanes=b,r;case F:return r=Kr(13,s,n,m),r.elementType=F,r.lanes=b,r;case $:return r=Kr(19,s,n,m),r.elementType=$,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case L:_=10;break t;case B:_=9;break t;case M:_=11;break t;case N:_=14;break t;case j:_=16,u=null;break t}_=29,s=Error(a(130,r===null?"null":typeof r,"")),u=null}return n=Kr(_,s,n,m),n.elementType=r,n.type=u,n.lanes=b,n}function Hn(r,n,s,u){return r=Kr(7,r,u,n),r.lanes=s,r}function mf(r,n,s){return r=Kr(6,r,null,n),r.lanes=s,r}function B0(r){var n=Kr(18,null,null,0);return n.stateNode=r,n}function yf(r,n,s){return n=Kr(4,r.children!==null?r.children:[],r.key,n),n.lanes=s,n.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},n}var E0=new WeakMap;function li(r,n){if(typeof r=="object"&&r!==null){var s=E0.get(r);return s!==void 0?s:(n={value:r,source:n,stack:wr(n)},E0.set(r,n),n)}return{value:r,source:n,stack:wr(n)}}var Wo=[],Uo=0,xh=null,kl=0,ci=[],hi=0,Wa=null,ji=1,Hi="";function da(r,n){Wo[Uo++]=kl,Wo[Uo++]=xh,xh=r,kl=n}function L0(r,n,s){ci[hi++]=ji,ci[hi++]=Hi,ci[hi++]=Wa,Wa=r;var u=ji;r=Hi;var m=32-ar(u)-1;u&=~(1<<m),s+=1;var b=32-ar(n)+m;if(30<b){var _=m-m%5;b=(u&(1<<_)-1).toString(32),u>>=_,m-=_,ji=1<<32-ar(n)+m|s<<m|u,Hi=b+r}else ji=1<<b|s<<m|u,Hi=r}function xf(r){r.return!==null&&(da(r,1),L0(r,1,0))}function bf(r){for(;r===xh;)xh=Wo[--Uo],Wo[Uo]=null,kl=Wo[--Uo],Wo[Uo]=null;for(;r===Wa;)Wa=ci[--hi],ci[hi]=null,Hi=ci[--hi],ci[hi]=null,ji=ci[--hi],ci[hi]=null}function A0(r,n){ci[hi++]=ji,ci[hi++]=Hi,ci[hi++]=Wa,ji=n.id,Hi=n.overflow,Wa=r}var nr=null,we=null,ne=!1,Ua=null,ui=!1,Cf=Error(a(519));function Ya(r){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Sl(li(n,r)),Cf}function M0(r){var n=r.stateNode,s=r.type,u=r.memoizedProps;switch(n[Ge]=r,n[Jt]=u,s){case"dialog":ee("cancel",n),ee("close",n);break;case"iframe":case"object":case"embed":ee("load",n);break;case"video":case"audio":for(s=0;s<Ul.length;s++)ee(Ul[s],n);break;case"source":ee("error",n);break;case"img":case"image":case"link":ee("error",n),ee("load",n);break;case"details":ee("toggle",n);break;case"input":ee("invalid",n),On(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":ee("invalid",n);break;case"textarea":ee("invalid",n),rt(n,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||u.suppressHydrationWarning===!0||Vb(n.textContent,s)?(u.popover!=null&&(ee("beforetoggle",n),ee("toggle",n)),u.onScroll!=null&&ee("scroll",n),u.onScrollEnd!=null&&ee("scrollend",n),u.onClick!=null&&(n.onclick=Xr),n=!0):n=!1,n||Ya(r,!0)}function D0(r){for(nr=r.return;nr;)switch(nr.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:nr=nr.return}}function Yo(r){if(r!==nr)return!1;if(!ne)return D0(r),ne=!0,!1;var n=r.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||Np(r.type,r.memoizedProps)),s=!s),s&&we&&Ya(r),D0(r),n===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));we=iC(r)}else if(n===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));we=iC(r)}else n===27?(n=we,sn(r.type)?(r=Pp,Pp=null,we=r):we=n):we=nr?fi(r.stateNode.nextSibling):null;return!0}function Pn(){we=nr=null,ne=!1}function vf(){var r=Ua;return r!==null&&(qr===null?qr=r:qr.push.apply(qr,r),Ua=null),r}function Sl(r){Ua===null?Ua=[r]:Ua.push(r)}var kf=R(null),Wn=null,fa=null;function Ga(r,n,s){nt(kf,n._currentValue),n._currentValue=s}function pa(r){r._currentValue=kf.current,q(kf)}function Sf(r,n,s){for(;r!==null;){var u=r.alternate;if((r.childLanes&n)!==n?(r.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),r===s)break;r=r.return}}function wf(r,n,s,u){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var b=m.dependencies;if(b!==null){var _=m.child;b=b.firstContext;t:for(;b!==null;){var A=b;b=m;for(var H=0;H<n.length;H++)if(A.context===n[H]){b.lanes|=s,A=b.alternate,A!==null&&(A.lanes|=s),Sf(b.return,s,r),u||(_=null);break t}b=A.next}}else if(m.tag===18){if(_=m.return,_===null)throw Error(a(341));_.lanes|=s,b=_.alternate,b!==null&&(b.lanes|=s),Sf(_,s,r),_=null}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===r){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}}function Go(r,n,s,u){r=null;for(var m=n,b=!1;m!==null;){if(!b){if((m.flags&524288)!==0)b=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var _=m.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var A=m.type;Qr(m.pendingProps.value,_.value)||(r!==null?r.push(A):r=[A])}}else if(m===wt.current){if(_=m.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Ql):r=[Ql])}m=m.return}r!==null&&wf(n,r,s,u),n.flags|=262144}function bh(r){for(r=r.firstContext;r!==null;){if(!Qr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Un(r){Wn=r,fa=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function or(r){return R0(Wn,r)}function Ch(r,n){return Wn===null&&Un(r),R0(r,n)}function R0(r,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},fa===null){if(r===null)throw Error(a(308));fa=n,r.dependencies={lanes:0,firstContext:n},r.flags|=524288}else fa=fa.next=n;return s}var pE=typeof AbortController<"u"?AbortController:function(){var r=[],n=this.signal={aborted:!1,addEventListener:function(s,u){r.push(u)}};this.abort=function(){n.aborted=!0,r.forEach(function(s){return s()})}},gE=e.unstable_scheduleCallback,mE=e.unstable_NormalPriority,Ne={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tf(){return{controller:new pE,data:new Map,refCount:0}}function wl(r){r.refCount--,r.refCount===0&&gE(mE,function(){r.controller.abort()})}var Tl=null,_f=0,Vo=0,Xo=null;function yE(r,n){if(Tl===null){var s=Tl=[];_f=0,Vo=Lp(),Xo={status:"pending",value:void 0,then:function(u){s.push(u)}}}return _f++,n.then(F0,F0),n}function F0(){if(--_f===0&&Tl!==null){Xo!==null&&(Xo.status="fulfilled");var r=Tl;Tl=null,Vo=0,Xo=null;for(var n=0;n<r.length;n++)(0,r[n])()}}function xE(r,n){var s=[],u={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){u.status="fulfilled",u.value=n;for(var m=0;m<s.length;m++)(0,s[m])(n)},function(m){for(u.status="rejected",u.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),u}var z0=D.S;D.S=function(r,n){xb=Ye(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&yE(r,n),z0!==null&&z0(r,n)};var Yn=R(null);function Bf(){var r=Yn.current;return r!==null?r:ke.pooledCache}function vh(r,n){n===null?nt(Yn,Yn.current):nt(Yn,n.pool)}function O0(){var r=Bf();return r===null?null:{parent:Ne._currentValue,pool:r}}var Qo=Error(a(460)),Ef=Error(a(474)),kh=Error(a(542)),Sh={then:function(){}};function $0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function N0(r,n,s){switch(s=r[s],s===void 0?r.push(n):s!==n&&(n.then(Xr,Xr),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,q0(r),r;default:if(typeof n.status=="string")n.then(Xr,Xr);else{if(r=ke,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=n,r.status="pending",r.then(function(u){if(n.status==="pending"){var m=n;m.status="fulfilled",m.value=u}},function(u){if(n.status==="pending"){var m=n;m.status="rejected",m.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw r=n.reason,q0(r),r}throw Vn=n,Qo}}function Gn(r){try{var n=r._init;return n(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Vn=s,Qo):s}}var Vn=null;function I0(){if(Vn===null)throw Error(a(459));var r=Vn;return Vn=null,r}function q0(r){if(r===Qo||r===kh)throw Error(a(483))}var Ko=null,_l=0;function wh(r){var n=_l;return _l+=1,Ko===null&&(Ko=[]),N0(Ko,r,n)}function Bl(r,n){n=n.props.ref,r.ref=n!==void 0?n:null}function Th(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 j0(r){function n(Q,W){if(r){var tt=Q.deletions;tt===null?(Q.deletions=[W],Q.flags|=16):tt.push(W)}}function s(Q,W){if(!r)return null;for(;W!==null;)n(Q,W),W=W.sibling;return null}function u(Q){for(var W=new Map;Q!==null;)Q.key!==null?W.set(Q.key,Q):W.set(Q.index,Q),Q=Q.sibling;return W}function m(Q,W){return Q=ua(Q,W),Q.index=0,Q.sibling=null,Q}function b(Q,W,tt){return Q.index=tt,r?(tt=Q.alternate,tt!==null?(tt=tt.index,tt<W?(Q.flags|=67108866,W):tt):(Q.flags|=67108866,W)):(Q.flags|=1048576,W)}function _(Q){return r&&Q.alternate===null&&(Q.flags|=67108866),Q}function A(Q,W,tt,ft){return W===null||W.tag!==6?(W=mf(tt,Q.mode,ft),W.return=Q,W):(W=m(W,tt),W.return=Q,W)}function H(Q,W,tt,ft){var Nt=tt.type;return Nt===k?ut(Q,W,tt.props.children,ft,tt.key):W!==null&&(W.elementType===Nt||typeof Nt=="object"&&Nt!==null&&Nt.$$typeof===j&&Gn(Nt)===W.type)?(W=m(W,tt.props),Bl(W,tt),W.return=Q,W):(W=yh(tt.type,tt.key,tt.props,null,Q.mode,ft),Bl(W,tt),W.return=Q,W)}function et(Q,W,tt,ft){return W===null||W.tag!==4||W.stateNode.containerInfo!==tt.containerInfo||W.stateNode.implementation!==tt.implementation?(W=yf(tt,Q.mode,ft),W.return=Q,W):(W=m(W,tt.children||[]),W.return=Q,W)}function ut(Q,W,tt,ft,Nt){return W===null||W.tag!==7?(W=Hn(tt,Q.mode,ft,Nt),W.return=Q,W):(W=m(W,tt),W.return=Q,W)}function pt(Q,W,tt){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=mf(""+W,Q.mode,tt),W.return=Q,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return tt=yh(W.type,W.key,W.props,null,Q.mode,tt),Bl(tt,W),tt.return=Q,tt;case C:return W=yf(W,Q.mode,tt),W.return=Q,W;case j:return W=Gn(W),pt(Q,W,tt)}if(U(W)||Z(W))return W=Hn(W,Q.mode,tt,null),W.return=Q,W;if(typeof W.then=="function")return pt(Q,wh(W),tt);if(W.$$typeof===L)return pt(Q,Ch(Q,W),tt);Th(Q,W)}return null}function at(Q,W,tt,ft){var Nt=W!==null?W.key:null;if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return Nt!==null?null:A(Q,W,""+tt,ft);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case y:return tt.key===Nt?H(Q,W,tt,ft):null;case C:return tt.key===Nt?et(Q,W,tt,ft):null;case j:return tt=Gn(tt),at(Q,W,tt,ft)}if(U(tt)||Z(tt))return Nt!==null?null:ut(Q,W,tt,ft,null);if(typeof tt.then=="function")return at(Q,W,wh(tt),ft);if(tt.$$typeof===L)return at(Q,W,Ch(Q,tt),ft);Th(Q,tt)}return null}function ct(Q,W,tt,ft,Nt){if(typeof ft=="string"&&ft!==""||typeof ft=="number"||typeof ft=="bigint")return Q=Q.get(tt)||null,A(W,Q,""+ft,Nt);if(typeof ft=="object"&&ft!==null){switch(ft.$$typeof){case y:return Q=Q.get(ft.key===null?tt:ft.key)||null,H(W,Q,ft,Nt);case C:return Q=Q.get(ft.key===null?tt:ft.key)||null,et(W,Q,ft,Nt);case j:return ft=Gn(ft),ct(Q,W,tt,ft,Nt)}if(U(ft)||Z(ft))return Q=Q.get(tt)||null,ut(W,Q,ft,Nt,null);if(typeof ft.then=="function")return ct(Q,W,tt,wh(ft),Nt);if(ft.$$typeof===L)return ct(Q,W,tt,Ch(W,ft),Nt);Th(W,ft)}return null}function Mt(Q,W,tt,ft){for(var Nt=null,ue=null,zt=W,Kt=W=0,ae=null;zt!==null&&Kt<tt.length;Kt++){zt.index>Kt?(ae=zt,zt=null):ae=zt.sibling;var de=at(Q,zt,tt[Kt],ft);if(de===null){zt===null&&(zt=ae);break}r&&zt&&de.alternate===null&&n(Q,zt),W=b(de,W,Kt),ue===null?Nt=de:ue.sibling=de,ue=de,zt=ae}if(Kt===tt.length)return s(Q,zt),ne&&da(Q,Kt),Nt;if(zt===null){for(;Kt<tt.length;Kt++)zt=pt(Q,tt[Kt],ft),zt!==null&&(W=b(zt,W,Kt),ue===null?Nt=zt:ue.sibling=zt,ue=zt);return ne&&da(Q,Kt),Nt}for(zt=u(zt);Kt<tt.length;Kt++)ae=ct(zt,Q,Kt,tt[Kt],ft),ae!==null&&(r&&ae.alternate!==null&&zt.delete(ae.key===null?Kt:ae.key),W=b(ae,W,Kt),ue===null?Nt=ae:ue.sibling=ae,ue=ae);return r&&zt.forEach(function(dn){return n(Q,dn)}),ne&&da(Q,Kt),Nt}function Ht(Q,W,tt,ft){if(tt==null)throw Error(a(151));for(var Nt=null,ue=null,zt=W,Kt=W=0,ae=null,de=tt.next();zt!==null&&!de.done;Kt++,de=tt.next()){zt.index>Kt?(ae=zt,zt=null):ae=zt.sibling;var dn=at(Q,zt,de.value,ft);if(dn===null){zt===null&&(zt=ae);break}r&&zt&&dn.alternate===null&&n(Q,zt),W=b(dn,W,Kt),ue===null?Nt=dn:ue.sibling=dn,ue=dn,zt=ae}if(de.done)return s(Q,zt),ne&&da(Q,Kt),Nt;if(zt===null){for(;!de.done;Kt++,de=tt.next())de=pt(Q,de.value,ft),de!==null&&(W=b(de,W,Kt),ue===null?Nt=de:ue.sibling=de,ue=de);return ne&&da(Q,Kt),Nt}for(zt=u(zt);!de.done;Kt++,de=tt.next())de=ct(zt,Q,Kt,de.value,ft),de!==null&&(r&&de.alternate!==null&&zt.delete(de.key===null?Kt:de.key),W=b(de,W,Kt),ue===null?Nt=de:ue.sibling=de,ue=de);return r&&zt.forEach(function(LL){return n(Q,LL)}),ne&&da(Q,Kt),Nt}function Ce(Q,W,tt,ft){if(typeof tt=="object"&&tt!==null&&tt.type===k&&tt.key===null&&(tt=tt.props.children),typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case y:t:{for(var Nt=tt.key;W!==null;){if(W.key===Nt){if(Nt=tt.type,Nt===k){if(W.tag===7){s(Q,W.sibling),ft=m(W,tt.props.children),ft.return=Q,Q=ft;break t}}else if(W.elementType===Nt||typeof Nt=="object"&&Nt!==null&&Nt.$$typeof===j&&Gn(Nt)===W.type){s(Q,W.sibling),ft=m(W,tt.props),Bl(ft,tt),ft.return=Q,Q=ft;break t}s(Q,W);break}else n(Q,W);W=W.sibling}tt.type===k?(ft=Hn(tt.props.children,Q.mode,ft,tt.key),ft.return=Q,Q=ft):(ft=yh(tt.type,tt.key,tt.props,null,Q.mode,ft),Bl(ft,tt),ft.return=Q,Q=ft)}return _(Q);case C:t:{for(Nt=tt.key;W!==null;){if(W.key===Nt)if(W.tag===4&&W.stateNode.containerInfo===tt.containerInfo&&W.stateNode.implementation===tt.implementation){s(Q,W.sibling),ft=m(W,tt.children||[]),ft.return=Q,Q=ft;break t}else{s(Q,W);break}else n(Q,W);W=W.sibling}ft=yf(tt,Q.mode,ft),ft.return=Q,Q=ft}return _(Q);case j:return tt=Gn(tt),Ce(Q,W,tt,ft)}if(U(tt))return Mt(Q,W,tt,ft);if(Z(tt)){if(Nt=Z(tt),typeof Nt!="function")throw Error(a(150));return tt=Nt.call(tt),Ht(Q,W,tt,ft)}if(typeof tt.then=="function")return Ce(Q,W,wh(tt),ft);if(tt.$$typeof===L)return Ce(Q,W,Ch(Q,tt),ft);Th(Q,tt)}return typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint"?(tt=""+tt,W!==null&&W.tag===6?(s(Q,W.sibling),ft=m(W,tt),ft.return=Q,Q=ft):(s(Q,W),ft=mf(tt,Q.mode,ft),ft.return=Q,Q=ft),_(Q)):s(Q,W)}return function(Q,W,tt,ft){try{_l=0;var Nt=Ce(Q,W,tt,ft);return Ko=null,Nt}catch(zt){if(zt===Qo||zt===kh)throw zt;var ue=Kr(29,zt,null,Q.mode);return ue.lanes=ft,ue.return=Q,ue}finally{}}}var Xn=j0(!0),H0=j0(!1),Va=!1;function Lf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Af(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 Qa(r,n,s){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(pe&2)!==0){var m=u.pending;return m===null?n.next=n:(n.next=m.next,m.next=n),u.pending=n,n=mh(r),T0(r,null,s),n}return gh(r,u,n,s),mh(r)}function El(r,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var u=n.lanes;u&=r.pendingLanes,s|=u,n.lanes=s,ll(r,s)}}function Mf(r,n){var s=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var _={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?m=b=_:b=b.next=_,s=s.next}while(s!==null);b===null?m=b=n:b=b.next=n}else m=b=n;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=n:r.next=n,s.lastBaseUpdate=n}var Df=!1;function Ll(){if(Df){var r=Xo;if(r!==null)throw r}}function Al(r,n,s,u){Df=!1;var m=r.updateQueue;Va=!1;var b=m.firstBaseUpdate,_=m.lastBaseUpdate,A=m.shared.pending;if(A!==null){m.shared.pending=null;var H=A,et=H.next;H.next=null,_===null?b=et:_.next=et,_=H;var ut=r.alternate;ut!==null&&(ut=ut.updateQueue,A=ut.lastBaseUpdate,A!==_&&(A===null?ut.firstBaseUpdate=et:A.next=et,ut.lastBaseUpdate=H))}if(b!==null){var pt=m.baseState;_=0,ut=et=H=null,A=b;do{var at=A.lane&-536870913,ct=at!==A.lane;if(ct?(ie&at)===at:(u&at)===at){at!==0&&at===Vo&&(Df=!0),ut!==null&&(ut=ut.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});t:{var Mt=r,Ht=A;at=n;var Ce=s;switch(Ht.tag){case 1:if(Mt=Ht.payload,typeof Mt=="function"){pt=Mt.call(Ce,pt,at);break t}pt=Mt;break t;case 3:Mt.flags=Mt.flags&-65537|128;case 0:if(Mt=Ht.payload,at=typeof Mt=="function"?Mt.call(Ce,pt,at):Mt,at==null)break t;pt=g({},pt,at);break t;case 2:Va=!0}}at=A.callback,at!==null&&(r.flags|=64,ct&&(r.flags|=8192),ct=m.callbacks,ct===null?m.callbacks=[at]:ct.push(at))}else ct={lane:at,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ut===null?(et=ut=ct,H=pt):ut=ut.next=ct,_|=at;if(A=A.next,A===null){if(A=m.shared.pending,A===null)break;ct=A,A=ct.next,ct.next=null,m.lastBaseUpdate=ct,m.shared.pending=null}}while(!0);ut===null&&(H=pt),m.baseState=H,m.firstBaseUpdate=et,m.lastBaseUpdate=ut,b===null&&(m.shared.lanes=0),en|=_,r.lanes=_,r.memoizedState=pt}}function P0(r,n){if(typeof r!="function")throw Error(a(191,r));r.call(n)}function W0(r,n){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)P0(s[r],n)}var Zo=R(null),_h=R(0);function U0(r,n){r=Sa,nt(_h,r),nt(Zo,n),Sa=r|n.baseLanes}function Rf(){nt(_h,Sa),nt(Zo,Zo.current)}function Ff(){Sa=_h.current,q(Zo),q(_h)}var Zr=R(null),di=null;function Ka(r){var n=r.alternate;nt(ze,ze.current&1),nt(Zr,r),di===null&&(n===null||Zo.current!==null||n.memoizedState!==null)&&(di=r)}function zf(r){nt(ze,ze.current),nt(Zr,r),di===null&&(di=r)}function Y0(r){r.tag===22?(nt(ze,ze.current),nt(Zr,r),di===null&&(di=r)):Za()}function Za(){nt(ze,ze.current),nt(Zr,Zr.current)}function Jr(r){q(Zr),di===r&&(di=null),q(ze)}var ze=R(0);function Bh(r){for(var n=r;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||jp(s)||Hp(s)))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 ga=0,Xt=null,xe=null,Ie=null,Eh=!1,Jo=!1,Qn=!1,Lh=0,Ml=0,ts=null,bE=0;function Me(){throw Error(a(321))}function Of(r,n){if(n===null)return!1;for(var s=0;s<n.length&&s<r.length;s++)if(!Qr(r[s],n[s]))return!1;return!0}function $f(r,n,s,u,m,b){return ga=b,Xt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=r===null||r.memoizedState===null?Lx:Zf,Qn=!1,b=s(u,m),Qn=!1,Jo&&(b=V0(n,s,u,m)),G0(r),b}function G0(r){D.H=Fl;var n=xe!==null&&xe.next!==null;if(ga=0,Ie=xe=Xt=null,Eh=!1,Ml=0,ts=null,n)throw Error(a(300));r===null||qe||(r=r.dependencies,r!==null&&bh(r)&&(qe=!0))}function V0(r,n,s,u){Xt=r;var m=0;do{if(Jo&&(ts=null),Ml=0,Jo=!1,25<=m)throw Error(a(301));if(m+=1,Ie=xe=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}D.H=Ax,b=n(s,u)}while(Jo);return b}function CE(){var r=D.H,n=r.useState()[0];return n=typeof n.then=="function"?Dl(n):n,r=r.useState()[0],(xe!==null?xe.memoizedState:null)!==r&&(Xt.flags|=1024),n}function Nf(){var r=Lh!==0;return Lh=0,r}function If(r,n,s){n.updateQueue=r.updateQueue,n.flags&=-2053,r.lanes&=~s}function qf(r){if(Eh){for(r=r.memoizedState;r!==null;){var n=r.queue;n!==null&&(n.pending=null),r=r.next}Eh=!1}ga=0,Ie=xe=Xt=null,Jo=!1,Ml=Lh=0,ts=null}function _r(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?Xt.memoizedState=Ie=r:Ie=Ie.next=r,Ie}function Oe(){if(xe===null){var r=Xt.alternate;r=r!==null?r.memoizedState:null}else r=xe.next;var n=Ie===null?Xt.memoizedState:Ie.next;if(n!==null)Ie=n,xe=r;else{if(r===null)throw Xt.alternate===null?Error(a(467)):Error(a(310));xe=r,r={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Ie===null?Xt.memoizedState=Ie=r:Ie=Ie.next=r}return Ie}function Ah(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dl(r){var n=Ml;return Ml+=1,ts===null&&(ts=[]),r=N0(ts,r,n),n=Xt,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Lx:Zf),r}function Mh(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Dl(r);if(r.$$typeof===L)return or(r)}throw Error(a(438,String(r)))}function jf(r){var n=null,s=Xt.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var u=Xt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(m){return m.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=Ah(),Xt.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0)for(s=n.data[n.index]=Array(r),u=0;u<r;u++)s[u]=K;return n.index++,s}function ma(r,n){return typeof n=="function"?n(r):n}function Dh(r){var n=Oe();return Hf(n,xe,r)}function Hf(r,n,s){var u=r.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=s;var m=r.baseQueue,b=u.pending;if(b!==null){if(m!==null){var _=m.next;m.next=b.next,b.next=_}n.baseQueue=m=b,u.pending=null}if(b=r.baseState,m===null)r.memoizedState=b;else{n=m.next;var A=_=null,H=null,et=n,ut=!1;do{var pt=et.lane&-536870913;if(pt!==et.lane?(ie&pt)===pt:(ga&pt)===pt){var at=et.revertLane;if(at===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null}),pt===Vo&&(ut=!0);else if((ga&at)===at){et=et.next,at===Vo&&(ut=!0);continue}else pt={lane:0,revertLane:et.revertLane,gesture:null,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null},H===null?(A=H=pt,_=b):H=H.next=pt,Xt.lanes|=at,en|=at;pt=et.action,Qn&&s(b,pt),b=et.hasEagerState?et.eagerState:s(b,pt)}else at={lane:pt,revertLane:et.revertLane,gesture:et.gesture,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null},H===null?(A=H=at,_=b):H=H.next=at,Xt.lanes|=pt,en|=pt;et=et.next}while(et!==null&&et!==n);if(H===null?_=b:H.next=A,!Qr(b,r.memoizedState)&&(qe=!0,ut&&(s=Xo,s!==null)))throw s;r.memoizedState=b,r.baseState=_,r.baseQueue=H,u.lastRenderedState=b}return m===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Pf(r){var n=Oe(),s=n.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=r;var u=s.dispatch,m=s.pending,b=n.memoizedState;if(m!==null){s.pending=null;var _=m=m.next;do b=r(b,_.action),_=_.next;while(_!==m);Qr(b,n.memoizedState)||(qe=!0),n.memoizedState=b,n.baseQueue===null&&(n.baseState=b),s.lastRenderedState=b}return[b,u]}function X0(r,n,s){var u=Xt,m=Oe(),b=ne;if(b){if(s===void 0)throw Error(a(407));s=s()}else s=n();var _=!Qr((xe||m).memoizedState,s);if(_&&(m.memoizedState=s,qe=!0),m=m.queue,Yf(Z0.bind(null,u,m,r),[r]),m.getSnapshot!==n||_||Ie!==null&&Ie.memoizedState.tag&1){if(u.flags|=2048,es(9,{destroy:void 0},K0.bind(null,u,m,s,n),null),ke===null)throw Error(a(349));b||(ga&127)!==0||Q0(u,n,s)}return s}function Q0(r,n,s){r.flags|=16384,r={getSnapshot:n,value:s},n=Xt.updateQueue,n===null?(n=Ah(),Xt.updateQueue=n,n.stores=[r]):(s=n.stores,s===null?n.stores=[r]:s.push(r))}function K0(r,n,s,u){n.value=s,n.getSnapshot=u,J0(n)&&tx(r)}function Z0(r,n,s){return s(function(){J0(n)&&tx(r)})}function J0(r){var n=r.getSnapshot;r=r.value;try{var s=n();return!Qr(r,s)}catch{return!0}}function tx(r){var n=jn(r,2);n!==null&&jr(n,r,2)}function Wf(r){var n=_r();if(typeof r=="function"){var s=r;if(r=s(),Qn){yi(!0);try{s()}finally{yi(!1)}}}return n.memoizedState=n.baseState=r,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:r},n}function ex(r,n,s,u){return r.baseState=s,Hf(r,xe,typeof u=="function"?u:ma)}function vE(r,n,s,u,m){if(zh(r))throw Error(a(485));if(r=n.action,r!==null){var b={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};D.T!==null?s(!0):b.isTransition=!1,u(b),s=n.pending,s===null?(b.next=n.pending=b,rx(n,b)):(b.next=s.next,n.pending=s.next=b)}}function rx(r,n){var s=n.action,u=n.payload,m=r.state;if(n.isTransition){var b=D.T,_={};D.T=_;try{var A=s(m,u),H=D.S;H!==null&&H(_,A),ix(r,n,A)}catch(et){Uf(r,n,et)}finally{b!==null&&_.types!==null&&(b.types=_.types),D.T=b}}else try{b=s(m,u),ix(r,n,b)}catch(et){Uf(r,n,et)}}function ix(r,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){ax(r,n,u)},function(u){return Uf(r,n,u)}):ax(r,n,s)}function ax(r,n,s){n.status="fulfilled",n.value=s,nx(n),r.state=s,n=r.pending,n!==null&&(s=n.next,s===n?r.pending=null:(s=s.next,n.next=s,rx(r,s)))}function Uf(r,n,s){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=s,nx(n),n=n.next;while(n!==u)}r.action=null}function nx(r){r=r.listeners;for(var n=0;n<r.length;n++)(0,r[n])()}function ox(r,n){return n}function sx(r,n){if(ne){var s=ke.formState;if(s!==null){t:{var u=Xt;if(ne){if(we){e:{for(var m=we,b=ui;m.nodeType!==8;){if(!b){m=null;break e}if(m=fi(m.nextSibling),m===null){m=null;break e}}b=m.data,m=b==="F!"||b==="F"?m:null}if(m){we=fi(m.nextSibling),u=m.data==="F!";break t}}Ya(u)}u=!1}u&&(n=s[0])}}return s=_r(),s.memoizedState=s.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ox,lastRenderedState:n},s.queue=u,s=_x.bind(null,Xt,u),u.dispatch=s,u=Wf(!1),b=Kf.bind(null,Xt,!1,u.queue),u=_r(),m={state:n,dispatch:null,action:r,pending:null},u.queue=m,s=vE.bind(null,Xt,m,b,s),m.dispatch=s,u.memoizedState=r,[n,s,!1]}function lx(r){var n=Oe();return cx(n,xe,r)}function cx(r,n,s){if(n=Hf(r,n,ox)[0],r=Dh(ma)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Dl(n)}catch(_){throw _===Qo?kh:_}else u=n;n=Oe();var m=n.queue,b=m.dispatch;return s!==n.memoizedState&&(Xt.flags|=2048,es(9,{destroy:void 0},kE.bind(null,m,s),null)),[u,b,r]}function kE(r,n){r.action=n}function hx(r){var n=Oe(),s=xe;if(s!==null)return cx(n,s,r);Oe(),n=n.memoizedState,s=Oe();var u=s.queue.dispatch;return s.memoizedState=r,[n,u,!1]}function es(r,n,s,u){return r={tag:r,create:s,deps:u,inst:n,next:null},n=Xt.updateQueue,n===null&&(n=Ah(),Xt.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=r.next=r:(u=s.next,s.next=r,r.next=u,n.lastEffect=r),r}function ux(){return Oe().memoizedState}function Rh(r,n,s,u){var m=_r();Xt.flags|=r,m.memoizedState=es(1|n,{destroy:void 0},s,u===void 0?null:u)}function Fh(r,n,s,u){var m=Oe();u=u===void 0?null:u;var b=m.memoizedState.inst;xe!==null&&u!==null&&Of(u,xe.memoizedState.deps)?m.memoizedState=es(n,b,s,u):(Xt.flags|=r,m.memoizedState=es(1|n,b,s,u))}function dx(r,n){Rh(8390656,8,r,n)}function Yf(r,n){Fh(2048,8,r,n)}function SE(r){Xt.flags|=4;var n=Xt.updateQueue;if(n===null)n=Ah(),Xt.updateQueue=n,n.events=[r];else{var s=n.events;s===null?n.events=[r]:s.push(r)}}function fx(r){var n=Oe().memoizedState;return SE({ref:n,nextImpl:r}),function(){if((pe&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function px(r,n){return Fh(4,2,r,n)}function gx(r,n){return Fh(4,4,r,n)}function mx(r,n){if(typeof n=="function"){r=r();var s=n(r);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return r=r(),n.current=r,function(){n.current=null}}function yx(r,n,s){s=s!=null?s.concat([r]):null,Fh(4,4,mx.bind(null,n,r),s)}function Gf(){}function xx(r,n){var s=Oe();n=n===void 0?null:n;var u=s.memoizedState;return n!==null&&Of(n,u[1])?u[0]:(s.memoizedState=[r,n],r)}function bx(r,n){var s=Oe();n=n===void 0?null:n;var u=s.memoizedState;if(n!==null&&Of(n,u[1]))return u[0];if(u=r(),Qn){yi(!0);try{r()}finally{yi(!1)}}return s.memoizedState=[u,n],u}function Vf(r,n,s){return s===void 0||(ga&1073741824)!==0&&(ie&261930)===0?r.memoizedState=n:(r.memoizedState=s,r=Cb(),Xt.lanes|=r,en|=r,s)}function Cx(r,n,s,u){return Qr(s,n)?s:Zo.current!==null?(r=Vf(r,s,u),Qr(r,n)||(qe=!0),r):(ga&42)===0||(ga&1073741824)!==0&&(ie&261930)===0?(qe=!0,r.memoizedState=s):(r=Cb(),Xt.lanes|=r,en|=r,n)}function vx(r,n,s,u,m){var b=I.p;I.p=b!==0&&8>b?b:8;var _=D.T,A={};D.T=A,Kf(r,!1,n,s);try{var H=m(),et=D.S;if(et!==null&&et(A,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var ut=xE(H,u);Rl(r,n,ut,ri(r))}else Rl(r,n,u,ri(r))}catch(pt){Rl(r,n,{then:function(){},status:"rejected",reason:pt},ri())}finally{I.p=b,_!==null&&A.types!==null&&(_.types=A.types),D.T=_}}function wE(){}function Xf(r,n,s,u){if(r.tag!==5)throw Error(a(476));var m=kx(r).queue;vx(r,m,n,z,s===null?wE:function(){return Sx(r),s(u)})}function kx(r){var n=r.memoizedState;if(n!==null)return n;n={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:z},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:s},next:null},r.memoizedState=n,r=r.alternate,r!==null&&(r.memoizedState=n),n}function Sx(r){var n=kx(r);n.next===null&&(n=r.alternate.memoizedState),Rl(r,n.next.queue,{},ri())}function Qf(){return or(Ql)}function wx(){return Oe().memoizedState}function Tx(){return Oe().memoizedState}function TE(r){for(var n=r.return;n!==null;){switch(n.tag){case 24:case 3:var s=ri();r=Xa(s);var u=Qa(n,r,s);u!==null&&(jr(u,n,s),El(u,n,s)),n={cache:Tf()},r.payload=n;return}n=n.return}}function _E(r,n,s){var u=ri();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},zh(r)?Bx(n,s):(s=pf(r,n,s,u),s!==null&&(jr(s,r,u),Ex(s,n,u)))}function _x(r,n,s){var u=ri();Rl(r,n,s,u)}function Rl(r,n,s,u){var m={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(zh(r))Bx(n,m);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=n.lastRenderedReducer,b!==null))try{var _=n.lastRenderedState,A=b(_,s);if(m.hasEagerState=!0,m.eagerState=A,Qr(A,_))return gh(r,n,m,0),ke===null&&ph(),!1}catch{}finally{}if(s=pf(r,n,m,u),s!==null)return jr(s,r,u),Ex(s,n,u),!0}return!1}function Kf(r,n,s,u){if(u={lane:2,revertLane:Lp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},zh(r)){if(n)throw Error(a(479))}else n=pf(r,s,u,2),n!==null&&jr(n,r,2)}function zh(r){var n=r.alternate;return r===Xt||n!==null&&n===Xt}function Bx(r,n){Jo=Eh=!0;var s=r.pending;s===null?n.next=n:(n.next=s.next,s.next=n),r.pending=n}function Ex(r,n,s){if((s&4194048)!==0){var u=n.lanes;u&=r.pendingLanes,s|=u,n.lanes=s,ll(r,s)}}var Fl={readContext:or,use:Mh,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};Fl.useEffectEvent=Me;var Lx={readContext:or,use:Mh,useCallback:function(r,n){return _r().memoizedState=[r,n===void 0?null:n],r},useContext:or,useEffect:dx,useImperativeHandle:function(r,n,s){s=s!=null?s.concat([r]):null,Rh(4194308,4,mx.bind(null,n,r),s)},useLayoutEffect:function(r,n){return Rh(4194308,4,r,n)},useInsertionEffect:function(r,n){Rh(4,2,r,n)},useMemo:function(r,n){var s=_r();n=n===void 0?null:n;var u=r();if(Qn){yi(!0);try{r()}finally{yi(!1)}}return s.memoizedState=[u,n],u},useReducer:function(r,n,s){var u=_r();if(s!==void 0){var m=s(n);if(Qn){yi(!0);try{s(n)}finally{yi(!1)}}}else m=n;return u.memoizedState=u.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},u.queue=r,r=r.dispatch=_E.bind(null,Xt,r),[u.memoizedState,r]},useRef:function(r){var n=_r();return r={current:r},n.memoizedState=r},useState:function(r){r=Wf(r);var n=r.queue,s=_x.bind(null,Xt,n);return n.dispatch=s,[r.memoizedState,s]},useDebugValue:Gf,useDeferredValue:function(r,n){var s=_r();return Vf(s,r,n)},useTransition:function(){var r=Wf(!1);return r=vx.bind(null,Xt,r.queue,!0,!1),_r().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,n,s){var u=Xt,m=_r();if(ne){if(s===void 0)throw Error(a(407));s=s()}else{if(s=n(),ke===null)throw Error(a(349));(ie&127)!==0||Q0(u,n,s)}m.memoizedState=s;var b={value:s,getSnapshot:n};return m.queue=b,dx(Z0.bind(null,u,b,r),[r]),u.flags|=2048,es(9,{destroy:void 0},K0.bind(null,u,b,s,n),null),s},useId:function(){var r=_r(),n=ke.identifierPrefix;if(ne){var s=Hi,u=ji;s=(u&~(1<<32-ar(u)-1)).toString(32)+s,n="_"+n+"R_"+s,s=Lh++,0<s&&(n+="H"+s.toString(32)),n+="_"}else s=bE++,n="_"+n+"r_"+s.toString(32)+"_";return r.memoizedState=n},useHostTransitionStatus:Qf,useFormState:sx,useActionState:sx,useOptimistic:function(r){var n=_r();n.memoizedState=n.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=Kf.bind(null,Xt,!0,s),s.dispatch=n,[r,n]},useMemoCache:jf,useCacheRefresh:function(){return _r().memoizedState=TE.bind(null,Xt)},useEffectEvent:function(r){var n=_r(),s={impl:r};return n.memoizedState=s,function(){if((pe&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},Zf={readContext:or,use:Mh,useCallback:xx,useContext:or,useEffect:Yf,useImperativeHandle:yx,useInsertionEffect:px,useLayoutEffect:gx,useMemo:bx,useReducer:Dh,useRef:ux,useState:function(){return Dh(ma)},useDebugValue:Gf,useDeferredValue:function(r,n){var s=Oe();return Cx(s,xe.memoizedState,r,n)},useTransition:function(){var r=Dh(ma)[0],n=Oe().memoizedState;return[typeof r=="boolean"?r:Dl(r),n]},useSyncExternalStore:X0,useId:wx,useHostTransitionStatus:Qf,useFormState:lx,useActionState:lx,useOptimistic:function(r,n){var s=Oe();return ex(s,xe,r,n)},useMemoCache:jf,useCacheRefresh:Tx};Zf.useEffectEvent=fx;var Ax={readContext:or,use:Mh,useCallback:xx,useContext:or,useEffect:Yf,useImperativeHandle:yx,useInsertionEffect:px,useLayoutEffect:gx,useMemo:bx,useReducer:Pf,useRef:ux,useState:function(){return Pf(ma)},useDebugValue:Gf,useDeferredValue:function(r,n){var s=Oe();return xe===null?Vf(s,r,n):Cx(s,xe.memoizedState,r,n)},useTransition:function(){var r=Pf(ma)[0],n=Oe().memoizedState;return[typeof r=="boolean"?r:Dl(r),n]},useSyncExternalStore:X0,useId:wx,useHostTransitionStatus:Qf,useFormState:hx,useActionState:hx,useOptimistic:function(r,n){var s=Oe();return xe!==null?ex(s,xe,r,n):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:jf,useCacheRefresh:Tx};Ax.useEffectEvent=fx;function Jf(r,n,s,u){n=r.memoizedState,s=s(u,n),s=s==null?n:g({},n,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var tp={enqueueSetState:function(r,n,s){r=r._reactInternals;var u=ri(),m=Xa(u);m.payload=n,s!=null&&(m.callback=s),n=Qa(r,m,u),n!==null&&(jr(n,r,u),El(n,r,u))},enqueueReplaceState:function(r,n,s){r=r._reactInternals;var u=ri(),m=Xa(u);m.tag=1,m.payload=n,s!=null&&(m.callback=s),n=Qa(r,m,u),n!==null&&(jr(n,r,u),El(n,r,u))},enqueueForceUpdate:function(r,n){r=r._reactInternals;var s=ri(),u=Xa(s);u.tag=2,n!=null&&(u.callback=n),n=Qa(r,u,s),n!==null&&(jr(n,r,s),El(n,r,s))}};function Mx(r,n,s,u,m,b,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,b,_):n.prototype&&n.prototype.isPureReactComponent?!Cl(s,u)||!Cl(m,b):!0}function Dx(r,n,s,u){r=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,u),n.state!==r&&tp.enqueueReplaceState(n,n.state,null)}function Kn(r,n){var s=n;if("ref"in n){s={};for(var u in n)u!=="ref"&&(s[u]=n[u])}if(r=r.defaultProps){s===n&&(s=g({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function Rx(r){fh(r)}function Fx(r){console.error(r)}function zx(r){fh(r)}function Oh(r,n){try{var s=r.onUncaughtError;s(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function Ox(r,n,s){try{var u=r.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ep(r,n,s){return s=Xa(s),s.tag=3,s.payload={element:null},s.callback=function(){Oh(r,n)},s}function $x(r){return r=Xa(r),r.tag=3,r}function Nx(r,n,s,u){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var b=u.value;r.payload=function(){return m(b)},r.callback=function(){Ox(n,s,u)}}var _=s.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){Ox(n,s,u),typeof m!="function"&&(rn===null?rn=new Set([this]):rn.add(this));var A=u.stack;this.componentDidCatch(u.value,{componentStack:A!==null?A:""})})}function BE(r,n,s,u,m){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=s.alternate,n!==null&&Go(n,s,m,!0),s=Zr.current,s!==null){switch(s.tag){case 31:case 13:return di===null?Vh():s.alternate===null&&De===0&&(De=3),s.flags&=-257,s.flags|=65536,s.lanes=m,u===Sh?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([u]):n.add(u),_p(r,u,m)),!1;case 22:return s.flags|=65536,u===Sh?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([u]):s.add(u)),_p(r,u,m)),!1}throw Error(a(435,s.tag))}return _p(r,u,m),Vh(),!1}if(ne)return n=Zr.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=m,u!==Cf&&(r=Error(a(422),{cause:u}),Sl(li(r,s)))):(u!==Cf&&(n=Error(a(423),{cause:u}),Sl(li(n,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,u=li(u,s),m=ep(r.stateNode,u,m),Mf(r,m),De!==4&&(De=2)),!1;var b=Error(a(520),{cause:u});if(b=li(b,s),Hl===null?Hl=[b]:Hl.push(b),De!==4&&(De=2),n===null)return!0;u=li(u,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=ep(s.stateNode,u,r),Mf(s,r),!1;case 1:if(n=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(rn===null||!rn.has(b))))return s.flags|=65536,m&=-m,s.lanes|=m,m=$x(m),Nx(m,r,s,u),Mf(s,m),!1}s=s.return}while(s!==null);return!1}var rp=Error(a(461)),qe=!1;function sr(r,n,s,u){n.child=r===null?H0(n,null,s,u):Xn(n,r.child,s,u)}function Ix(r,n,s,u,m){s=s.render;var b=n.ref;if("ref"in u){var _={};for(var A in u)A!=="ref"&&(_[A]=u[A])}else _=u;return Un(n),u=$f(r,n,s,_,b,m),A=Nf(),r!==null&&!qe?(If(r,n,m),ya(r,n,m)):(ne&&A&&xf(n),n.flags|=1,sr(r,n,u,m),n.child)}function qx(r,n,s,u,m){if(r===null){var b=s.type;return typeof b=="function"&&!gf(b)&&b.defaultProps===void 0&&s.compare===null?(n.tag=15,n.type=b,jx(r,n,b,u,m)):(r=yh(s.type,null,u,n,n.mode,m),r.ref=n.ref,r.return=n,n.child=r)}if(b=r.child,!hp(r,m)){var _=b.memoizedProps;if(s=s.compare,s=s!==null?s:Cl,s(_,u)&&r.ref===n.ref)return ya(r,n,m)}return n.flags|=1,r=ua(b,u),r.ref=n.ref,r.return=n,n.child=r}function jx(r,n,s,u,m){if(r!==null){var b=r.memoizedProps;if(Cl(b,u)&&r.ref===n.ref)if(qe=!1,n.pendingProps=u=b,hp(r,m))(r.flags&131072)!==0&&(qe=!0);else return n.lanes=r.lanes,ya(r,n,m)}return ip(r,n,s,u,m)}function Hx(r,n,s,u){var m=u.children,b=r!==null?r.memoizedState:null;if(r===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,r!==null){for(u=n.child=r.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~b}else u=0,n.child=null;return Px(r,n,b,s,u)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},r!==null&&vh(n,b!==null?b.cachePool:null),b!==null?U0(n,b):Rf(),Y0(n);else return u=n.lanes=536870912,Px(r,n,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(vh(n,b.cachePool),U0(n,b),Za(),n.memoizedState=null):(r!==null&&vh(n,null),Rf(),Za());return sr(r,n,m,s),n.child}function zl(r,n){return r!==null&&r.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Px(r,n,s,u,m){var b=Bf();return b=b===null?null:{parent:Ne._currentValue,pool:b},n.memoizedState={baseLanes:s,cachePool:b},r!==null&&vh(n,null),Rf(),Y0(n),r!==null&&Go(r,n,u,!0),n.childLanes=m,null}function $h(r,n){return n=Ih({mode:n.mode,children:n.children},r.mode),n.ref=r.ref,r.child=n,n.return=r,n}function Wx(r,n,s){return Xn(n,r.child,null,s),r=$h(n,n.pendingProps),r.flags|=2,Jr(n),n.memoizedState=null,r}function EE(r,n,s){var u=n.pendingProps,m=(n.flags&128)!==0;if(n.flags&=-129,r===null){if(ne){if(u.mode==="hidden")return r=$h(n,u),n.lanes=536870912,zl(null,r);if(zf(n),(r=we)?(r=rC(r,ui),r=r!==null&&r.data==="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Wa!==null?{id:ji,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},s=B0(r),s.return=n,n.child=s,nr=n,we=null)):r=null,r===null)throw Ya(n);return n.lanes=536870912,null}return $h(n,u)}var b=r.memoizedState;if(b!==null){var _=b.dehydrated;if(zf(n),m)if(n.flags&256)n.flags&=-257,n=Wx(r,n,s);else if(n.memoizedState!==null)n.child=r.child,n.flags|=128,n=null;else throw Error(a(558));else if(qe||Go(r,n,s,!1),m=(s&r.childLanes)!==0,qe||m){if(u=ke,u!==null&&(_=Mo(u,s),_!==0&&_!==b.retryLane))throw b.retryLane=_,jn(r,_),jr(u,r,_),rp;Vh(),n=Wx(r,n,s)}else r=b.treeContext,we=fi(_.nextSibling),nr=n,ne=!0,Ua=null,ui=!1,r!==null&&A0(n,r),n=$h(n,u),n.flags|=4096;return n}return r=ua(r.child,{mode:u.mode,children:u.children}),r.ref=n.ref,n.child=r,r.return=n,r}function Nh(r,n){var s=n.ref;if(s===null)r!==null&&r.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(r===null||r.ref!==s)&&(n.flags|=4194816)}}function ip(r,n,s,u,m){return Un(n),s=$f(r,n,s,u,void 0,m),u=Nf(),r!==null&&!qe?(If(r,n,m),ya(r,n,m)):(ne&&u&&xf(n),n.flags|=1,sr(r,n,s,m),n.child)}function Ux(r,n,s,u,m,b){return Un(n),n.updateQueue=null,s=V0(n,u,s,m),G0(r),u=Nf(),r!==null&&!qe?(If(r,n,b),ya(r,n,b)):(ne&&u&&xf(n),n.flags|=1,sr(r,n,s,b),n.child)}function Yx(r,n,s,u,m){if(Un(n),n.stateNode===null){var b=Po,_=s.contextType;typeof _=="object"&&_!==null&&(b=or(_)),b=new s(u,b),n.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=tp,n.stateNode=b,b._reactInternals=n,b=n.stateNode,b.props=u,b.state=n.memoizedState,b.refs={},Lf(n),_=s.contextType,b.context=typeof _=="object"&&_!==null?or(_):Po,b.state=n.memoizedState,_=s.getDerivedStateFromProps,typeof _=="function"&&(Jf(n,s,_,u),b.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&tp.enqueueReplaceState(b,b.state,null),Al(n,u,b,m),Ll(),b.state=n.memoizedState),typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(r===null){b=n.stateNode;var A=n.memoizedProps,H=Kn(s,A);b.props=H;var et=b.context,ut=s.contextType;_=Po,typeof ut=="object"&&ut!==null&&(_=or(ut));var pt=s.getDerivedStateFromProps;ut=typeof pt=="function"||typeof b.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,ut||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A||et!==_)&&Dx(n,b,u,_),Va=!1;var at=n.memoizedState;b.state=at,Al(n,u,b,m),Ll(),et=n.memoizedState,A||at!==et||Va?(typeof pt=="function"&&(Jf(n,s,pt,u),et=n.memoizedState),(H=Va||Mx(n,s,H,u,at,et,_))?(ut||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=u,n.memoizedState=et),b.props=u,b.state=et,b.context=_,u=H):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{b=n.stateNode,Af(r,n),_=n.memoizedProps,ut=Kn(s,_),b.props=ut,pt=n.pendingProps,at=b.context,et=s.contextType,H=Po,typeof et=="object"&&et!==null&&(H=or(et)),A=s.getDerivedStateFromProps,(et=typeof A=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==pt||at!==H)&&Dx(n,b,u,H),Va=!1,at=n.memoizedState,b.state=at,Al(n,u,b,m),Ll();var ct=n.memoizedState;_!==pt||at!==ct||Va||r!==null&&r.dependencies!==null&&bh(r.dependencies)?(typeof A=="function"&&(Jf(n,s,A,u),ct=n.memoizedState),(ut=Va||Mx(n,s,ut,u,at,ct,H)||r!==null&&r.dependencies!==null&&bh(r.dependencies))?(et||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ct,H),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ct,H)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===r.memoizedProps&&at===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&at===r.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=ct),b.props=u,b.state=ct,b.context=H,u=ut):(typeof b.componentDidUpdate!="function"||_===r.memoizedProps&&at===r.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&at===r.memoizedState||(n.flags|=1024),u=!1)}return b=u,Nh(r,n),u=(n.flags&128)!==0,b||u?(b=n.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),n.flags|=1,r!==null&&u?(n.child=Xn(n,r.child,null,m),n.child=Xn(n,null,s,m)):sr(r,n,s,m),n.memoizedState=b.state,r=n.child):r=ya(r,n,m),r}function Gx(r,n,s,u){return Pn(),n.flags|=256,sr(r,n,s,u),n.child}var ap={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function np(r){return{baseLanes:r,cachePool:O0()}}function op(r,n,s){return r=r!==null?r.childLanes&~s:0,n&&(r|=ei),r}function Vx(r,n,s){var u=n.pendingProps,m=!1,b=(n.flags&128)!==0,_;if((_=b)||(_=r!==null&&r.memoizedState===null?!1:(ze.current&2)!==0),_&&(m=!0,n.flags&=-129),_=(n.flags&32)!==0,n.flags&=-33,r===null){if(ne){if(m?Ka(n):Za(),(r=we)?(r=rC(r,ui),r=r!==null&&r.data!=="&"?r:null,r!==null&&(n.memoizedState={dehydrated:r,treeContext:Wa!==null?{id:ji,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},s=B0(r),s.return=n,n.child=s,nr=n,we=null)):r=null,r===null)throw Ya(n);return Hp(r)?n.lanes=32:n.lanes=536870912,null}var A=u.children;return u=u.fallback,m?(Za(),m=n.mode,A=Ih({mode:"hidden",children:A},m),u=Hn(u,m,s,null),A.return=n,u.return=n,A.sibling=u,n.child=A,u=n.child,u.memoizedState=np(s),u.childLanes=op(r,_,s),n.memoizedState=ap,zl(null,u)):(Ka(n),sp(n,A))}var H=r.memoizedState;if(H!==null&&(A=H.dehydrated,A!==null)){if(b)n.flags&256?(Ka(n),n.flags&=-257,n=lp(r,n,s)):n.memoizedState!==null?(Za(),n.child=r.child,n.flags|=128,n=null):(Za(),A=u.fallback,m=n.mode,u=Ih({mode:"visible",children:u.children},m),A=Hn(A,m,s,null),A.flags|=2,u.return=n,A.return=n,u.sibling=A,n.child=u,Xn(n,r.child,null,s),u=n.child,u.memoizedState=np(s),u.childLanes=op(r,_,s),n.memoizedState=ap,n=zl(null,u));else if(Ka(n),Hp(A)){if(_=A.nextSibling&&A.nextSibling.dataset,_)var et=_.dgst;_=et,u=Error(a(419)),u.stack="",u.digest=_,Sl({value:u,source:null,stack:null}),n=lp(r,n,s)}else if(qe||Go(r,n,s,!1),_=(s&r.childLanes)!==0,qe||_){if(_=ke,_!==null&&(u=Mo(_,s),u!==0&&u!==H.retryLane))throw H.retryLane=u,jn(r,u),jr(_,r,u),rp;jp(A)||Vh(),n=lp(r,n,s)}else jp(A)?(n.flags|=192,n.child=r.child,n=null):(r=H.treeContext,we=fi(A.nextSibling),nr=n,ne=!0,Ua=null,ui=!1,r!==null&&A0(n,r),n=sp(n,u.children),n.flags|=4096);return n}return m?(Za(),A=u.fallback,m=n.mode,H=r.child,et=H.sibling,u=ua(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,et!==null?A=ua(et,A):(A=Hn(A,m,s,null),A.flags|=2),A.return=n,u.return=n,u.sibling=A,n.child=u,zl(null,u),u=n.child,A=r.child.memoizedState,A===null?A=np(s):(m=A.cachePool,m!==null?(H=Ne._currentValue,m=m.parent!==H?{parent:H,pool:H}:m):m=O0(),A={baseLanes:A.baseLanes|s,cachePool:m}),u.memoizedState=A,u.childLanes=op(r,_,s),n.memoizedState=ap,zl(r.child,u)):(Ka(n),s=r.child,r=s.sibling,s=ua(s,{mode:"visible",children:u.children}),s.return=n,s.sibling=null,r!==null&&(_=n.deletions,_===null?(n.deletions=[r],n.flags|=16):_.push(r)),n.child=s,n.memoizedState=null,s)}function sp(r,n){return n=Ih({mode:"visible",children:n},r.mode),n.return=r,r.child=n}function Ih(r,n){return r=Kr(22,r,null,n),r.lanes=0,r}function lp(r,n,s){return Xn(n,r.child,null,s),r=sp(n,n.pendingProps.children),r.flags|=2,n.memoizedState=null,r}function Xx(r,n,s){r.lanes|=n;var u=r.alternate;u!==null&&(u.lanes|=n),Sf(r.return,n,s)}function cp(r,n,s,u,m,b){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m,treeForkCount:b}:(_.isBackwards=n,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=s,_.tailMode=m,_.treeForkCount=b)}function Qx(r,n,s){var u=n.pendingProps,m=u.revealOrder,b=u.tail;u=u.children;var _=ze.current,A=(_&2)!==0;if(A?(_=_&1|2,n.flags|=128):_&=1,nt(ze,_),sr(r,n,u,s),u=ne?kl:0,!A&&r!==null&&(r.flags&128)!==0)t:for(r=n.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Xx(r,s,n);else if(r.tag===19)Xx(r,s,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(m){case"forwards":for(s=n.child,m=null;s!==null;)r=s.alternate,r!==null&&Bh(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=n.child,n.child=null):(m=s.sibling,s.sibling=null),cp(n,!1,m,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=n.child,n.child=null;m!==null;){if(r=m.alternate,r!==null&&Bh(r)===null){n.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}cp(n,!0,s,null,b,u);break;case"together":cp(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function ya(r,n,s){if(r!==null&&(n.dependencies=r.dependencies),en|=n.lanes,(s&n.childLanes)===0)if(r!==null){if(Go(r,n,s,!1),(s&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,s=ua(r,r.pendingProps),n.child=s,s.return=n;r.sibling!==null;)r=r.sibling,s=s.sibling=ua(r,r.pendingProps),s.return=n;s.sibling=null}return n.child}function hp(r,n){return(r.lanes&n)!==0?!0:(r=r.dependencies,!!(r!==null&&bh(r)))}function LE(r,n,s){switch(n.tag){case 3:kt(n,n.stateNode.containerInfo),Ga(n,Ne,r.memoizedState.cache),Pn();break;case 27:case 5:vt(n);break;case 4:kt(n,n.stateNode.containerInfo);break;case 10:Ga(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,zf(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Ka(n),n.flags|=128,null):(s&n.child.childLanes)!==0?Vx(r,n,s):(Ka(n),r=ya(r,n,s),r!==null?r.sibling:null);Ka(n);break;case 19:var m=(r.flags&128)!==0;if(u=(s&n.childLanes)!==0,u||(Go(r,n,s,!1),u=(s&n.childLanes)!==0),m){if(u)return Qx(r,n,s);n.flags|=128}if(m=n.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),nt(ze,ze.current),u)break;return null;case 22:return n.lanes=0,Hx(r,n,s,n.pendingProps);case 24:Ga(n,Ne,r.memoizedState.cache)}return ya(r,n,s)}function Kx(r,n,s){if(r!==null)if(r.memoizedProps!==n.pendingProps)qe=!0;else{if(!hp(r,s)&&(n.flags&128)===0)return qe=!1,LE(r,n,s);qe=(r.flags&131072)!==0}else qe=!1,ne&&(n.flags&1048576)!==0&&L0(n,kl,n.index);switch(n.lanes=0,n.tag){case 16:t:{var u=n.pendingProps;if(r=Gn(n.elementType),n.type=r,typeof r=="function")gf(r)?(u=Kn(r,u),n.tag=1,n=Yx(null,n,r,u,s)):(n.tag=0,n=ip(null,n,r,u,s));else{if(r!=null){var m=r.$$typeof;if(m===M){n.tag=11,n=Ix(null,n,r,u,s);break t}else if(m===N){n.tag=14,n=qx(null,n,r,u,s);break t}}throw n=X(r)||r,Error(a(306,n,""))}}return n;case 0:return ip(r,n,n.type,n.pendingProps,s);case 1:return u=n.type,m=Kn(u,n.pendingProps),Yx(r,n,u,m,s);case 3:t:{if(kt(n,n.stateNode.containerInfo),r===null)throw Error(a(387));u=n.pendingProps;var b=n.memoizedState;m=b.element,Af(r,n),Al(n,u,null,s);var _=n.memoizedState;if(u=_.cache,Ga(n,Ne,u),u!==b.cache&&wf(n,[Ne],s,!0),Ll(),u=_.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:_.cache},n.updateQueue.baseState=b,n.memoizedState=b,n.flags&256){n=Gx(r,n,u,s);break t}else if(u!==m){m=li(Error(a(424)),n),Sl(m),n=Gx(r,n,u,s);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(we=fi(r.firstChild),nr=n,ne=!0,Ua=null,ui=!0,s=H0(n,null,u,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Pn(),u===m){n=ya(r,n,s);break t}sr(r,n,u,s)}n=n.child}return n;case 26:return Nh(r,n),r===null?(s=lC(n.type,null,n.pendingProps,null))?n.memoizedState=s:ne||(s=n.type,r=n.pendingProps,u=eu(Ct.current).createElement(s),u[Ge]=n,u[Jt]=r,lr(u,s,r),Fe(u),n.stateNode=u):n.memoizedState=lC(n.type,r.memoizedProps,n.pendingProps,r.memoizedState),null;case 27:return vt(n),r===null&&ne&&(u=n.stateNode=nC(n.type,n.pendingProps,Ct.current),nr=n,ui=!0,m=we,sn(n.type)?(Pp=m,we=fi(u.firstChild)):we=m),sr(r,n,n.pendingProps.children,s),Nh(r,n),r===null&&(n.flags|=4194304),n.child;case 5:return r===null&&ne&&((m=u=we)&&(u=nL(u,n.type,n.pendingProps,ui),u!==null?(n.stateNode=u,nr=n,we=fi(u.firstChild),ui=!1,m=!0):m=!1),m||Ya(n)),vt(n),m=n.type,b=n.pendingProps,_=r!==null?r.memoizedProps:null,u=b.children,Np(m,b)?u=null:_!==null&&Np(m,_)&&(n.flags|=32),n.memoizedState!==null&&(m=$f(r,n,CE,null,null,s),Ql._currentValue=m),Nh(r,n),sr(r,n,u,s),n.child;case 6:return r===null&&ne&&((r=s=we)&&(s=oL(s,n.pendingProps,ui),s!==null?(n.stateNode=s,nr=n,we=null,r=!0):r=!1),r||Ya(n)),null;case 13:return Vx(r,n,s);case 4:return kt(n,n.stateNode.containerInfo),u=n.pendingProps,r===null?n.child=Xn(n,null,u,s):sr(r,n,u,s),n.child;case 11:return Ix(r,n,n.type,n.pendingProps,s);case 7:return sr(r,n,n.pendingProps,s),n.child;case 8:return sr(r,n,n.pendingProps.children,s),n.child;case 12:return sr(r,n,n.pendingProps.children,s),n.child;case 10:return u=n.pendingProps,Ga(n,n.type,u.value),sr(r,n,u.children,s),n.child;case 9:return m=n.type._context,u=n.pendingProps.children,Un(n),m=or(m),u=u(m),n.flags|=1,sr(r,n,u,s),n.child;case 14:return qx(r,n,n.type,n.pendingProps,s);case 15:return jx(r,n,n.type,n.pendingProps,s);case 19:return Qx(r,n,s);case 31:return EE(r,n,s);case 22:return Hx(r,n,s,n.pendingProps);case 24:return Un(n),u=or(Ne),r===null?(m=Bf(),m===null&&(m=ke,b=Tf(),m.pooledCache=b,b.refCount++,b!==null&&(m.pooledCacheLanes|=s),m=b),n.memoizedState={parent:u,cache:m},Lf(n),Ga(n,Ne,m)):((r.lanes&s)!==0&&(Af(r,n),Al(n,null,null,s),Ll()),m=r.memoizedState,b=n.memoizedState,m.parent!==u?(m={parent:u,cache:u},n.memoizedState=m,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=m),Ga(n,Ne,u)):(u=b.cache,Ga(n,Ne,u),u!==m.cache&&wf(n,[Ne],s,!0))),sr(r,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function xa(r){r.flags|=4}function up(r,n,s,u,m){if((n=(r.mode&32)!==0)&&(n=!1),n){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(wb())r.flags|=8192;else throw Vn=Sh,Ef}else r.flags&=-16777217}function Zx(r,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!fC(n))if(wb())r.flags|=8192;else throw Vn=Sh,Ef}function qh(r,n){n!==null&&(r.flags|=4),r.flags&16384&&(n=r.tag!==22?Gr():536870912,r.lanes|=n,ns|=n)}function Ol(r,n){if(!ne)switch(r.tailMode){case"hidden":n=r.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?n||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Te(r){var n=r.alternate!==null&&r.alternate.child===r.child,s=0,u=0;if(n)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=u,r.childLanes=s,n}function AE(r,n,s){var u=n.pendingProps;switch(bf(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 s=n.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),pa(Ne),Dt(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Yo(n)?xa(n):r===null||r.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,vf())),Te(n),null;case 26:var m=n.type,b=n.memoizedState;return r===null?(xa(n),b!==null?(Te(n),Zx(n,b)):(Te(n),up(n,m,null,u,s))):b?b!==r.memoizedState?(xa(n),Te(n),Zx(n,b)):(Te(n),n.flags&=-16777217):(r=r.memoizedProps,r!==u&&xa(n),Te(n),up(n,m,r,u,s)),null;case 27:if(dt(n),s=Ct.current,m=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==u&&xa(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return Te(n),null}r=ht.current,Yo(n)?M0(n):(r=nC(m,u,s),n.stateNode=r,xa(n))}return Te(n),null;case 5:if(dt(n),m=n.type,r!==null&&n.stateNode!=null)r.memoizedProps!==u&&xa(n);else{if(!u){if(n.stateNode===null)throw Error(a(166));return Te(n),null}if(b=ht.current,Yo(n))M0(n);else{var _=eu(Ct.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?_.createElement(m,{is:u.is}):_.createElement(m)}}b[Ge]=n,b[Jt]=u;t:for(_=n.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===n)break t;for(;_.sibling===null;){if(_.return===null||_.return===n)break t;_=_.return}_.sibling.return=_.return,_=_.sibling}n.stateNode=b;t:switch(lr(b,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break t;case"img":u=!0;break t;default:u=!1}u&&xa(n)}}return Te(n),up(n,n.type,r===null?null:r.memoizedProps,n.pendingProps,s),null;case 6:if(r&&n.stateNode!=null)r.memoizedProps!==u&&xa(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(a(166));if(r=Ct.current,Yo(n)){if(r=n.stateNode,s=n.memoizedProps,u=null,m=nr,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}r[Ge]=n,r=!!(r.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||Vb(r.nodeValue,s)),r||Ya(n,!0)}else r=eu(r).createTextNode(u),r[Ge]=n,n.stateNode=r}return Te(n),null;case 31:if(s=n.memoizedState,r===null||r.memoizedState!==null){if(u=Yo(n),s!==null){if(r===null){if(!u)throw Error(a(318));if(r=n.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Ge]=n}else Pn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Te(n),r=!1}else s=vf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return n.flags&256?(Jr(n),n):(Jr(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Te(n),null;case 13:if(u=n.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Yo(n),u!==null&&u.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=n.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Ge]=n}else Pn(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Te(n),m=!1}else m=vf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return n.flags&256?(Jr(n),n):(Jr(n),null)}return Jr(n),(n.flags&128)!==0?(n.lanes=s,n):(s=u!==null,r=r!==null&&r.memoizedState!==null,s&&(u=n.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==m&&(u.flags|=2048)),s!==r&&s&&(n.child.flags|=8192),qh(n,n.updateQueue),Te(n),null);case 4:return Dt(),r===null&&Rp(n.stateNode.containerInfo),Te(n),null;case 10:return pa(n.type),Te(n),null;case 19:if(q(ze),u=n.memoizedState,u===null)return Te(n),null;if(m=(n.flags&128)!==0,b=u.rendering,b===null)if(m)Ol(u,!1);else{if(De!==0||r!==null&&(r.flags&128)!==0)for(r=n.child;r!==null;){if(b=Bh(r),b!==null){for(n.flags|=128,Ol(u,!1),r=b.updateQueue,n.updateQueue=r,qh(n,r),n.subtreeFlags=0,r=s,s=n.child;s!==null;)_0(s,r),s=s.sibling;return nt(ze,ze.current&1|2),ne&&da(n,u.treeForkCount),n.child}r=r.sibling}u.tail!==null&&Ye()>Uh&&(n.flags|=128,m=!0,Ol(u,!1),n.lanes=4194304)}else{if(!m)if(r=Bh(b),r!==null){if(n.flags|=128,m=!0,r=r.updateQueue,n.updateQueue=r,qh(n,r),Ol(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!ne)return Te(n),null}else 2*Ye()-u.renderingStartTime>Uh&&s!==536870912&&(n.flags|=128,m=!0,Ol(u,!1),n.lanes=4194304);u.isBackwards?(b.sibling=n.child,n.child=b):(r=u.last,r!==null?r.sibling=b:n.child=b,u.last=b)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=Ye(),r.sibling=null,s=ze.current,nt(ze,m?s&1|2:s&1),ne&&da(n,u.treeForkCount),r):(Te(n),null);case 22:case 23:return Jr(n),Ff(),u=n.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(s&536870912)!==0&&(n.flags&128)===0&&(Te(n),n.subtreeFlags&6&&(n.flags|=8192)):Te(n),s=n.updateQueue,s!==null&&qh(n,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==s&&(n.flags|=2048),r!==null&&q(Yn),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),pa(Ne),Te(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function ME(r,n){switch(bf(n),n.tag){case 1:return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 3:return pa(Ne),Dt(),r=n.flags,(r&65536)!==0&&(r&128)===0?(n.flags=r&-65537|128,n):null;case 26:case 27:case 5:return dt(n),null;case 31:if(n.memoizedState!==null){if(Jr(n),n.alternate===null)throw Error(a(340));Pn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 13:if(Jr(n),r=n.memoizedState,r!==null&&r.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Pn()}return r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 19:return q(ze),null;case 4:return Dt(),null;case 10:return pa(n.type),null;case 22:case 23:return Jr(n),Ff(),r!==null&&q(Yn),r=n.flags,r&65536?(n.flags=r&-65537|128,n):null;case 24:return pa(Ne),null;case 25:return null;default:return null}}function Jx(r,n){switch(bf(n),n.tag){case 3:pa(Ne),Dt();break;case 26:case 27:case 5:dt(n);break;case 4:Dt();break;case 31:n.memoizedState!==null&&Jr(n);break;case 13:Jr(n);break;case 19:q(ze);break;case 10:pa(n.type);break;case 22:case 23:Jr(n),Ff(),r!==null&&q(Yn);break;case 24:pa(Ne)}}function $l(r,n){try{var s=n.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var m=u.next;s=m;do{if((s.tag&r)===r){u=void 0;var b=s.create,_=s.inst;u=b(),_.destroy=u}s=s.next}while(s!==m)}}catch(A){ye(n,n.return,A)}}function Ja(r,n,s){try{var u=n.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var b=m.next;u=b;do{if((u.tag&r)===r){var _=u.inst,A=_.destroy;if(A!==void 0){_.destroy=void 0,m=n;var H=s,et=A;try{et()}catch(ut){ye(m,H,ut)}}}u=u.next}while(u!==b)}}catch(ut){ye(n,n.return,ut)}}function tb(r){var n=r.updateQueue;if(n!==null){var s=r.stateNode;try{W0(n,s)}catch(u){ye(r,r.return,u)}}}function eb(r,n,s){s.props=Kn(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(u){ye(r,n,u)}}function Nl(r,n){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof s=="function"?r.refCleanup=s(u):s.current=u}}catch(m){ye(r,n,m)}}function Pi(r,n){var s=r.ref,u=r.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(m){ye(r,n,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){ye(r,n,m)}else s.current=null}function rb(r){var n=r.type,s=r.memoizedProps,u=r.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break t;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(m){ye(r,r.return,m)}}function dp(r,n,s){try{var u=r.stateNode;JE(u,r.type,s,n),u[Jt]=n}catch(m){ye(r,r.return,m)}}function ib(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&sn(r.type)||r.tag===4}function fp(r){t:for(;;){for(;r.sibling===null;){if(r.return===null||ib(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 pp(r,n,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(r),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Xr));else if(u!==4&&(u===27&&sn(r.type)&&(s=r.stateNode,n=null),r=r.child,r!==null))for(pp(r,n,s),r=r.sibling;r!==null;)pp(r,n,s),r=r.sibling}function jh(r,n,s){var u=r.tag;if(u===5||u===6)r=r.stateNode,n?s.insertBefore(r,n):s.appendChild(r);else if(u!==4&&(u===27&&sn(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(jh(r,n,s),r=r.sibling;r!==null;)jh(r,n,s),r=r.sibling}function ab(r){var n=r.stateNode,s=r.memoizedProps;try{for(var u=r.type,m=n.attributes;m.length;)n.removeAttributeNode(m[0]);lr(n,u,s),n[Ge]=r,n[Jt]=s}catch(b){ye(r,r.return,b)}}var ba=!1,je=!1,gp=!1,nb=typeof WeakSet=="function"?WeakSet:Set,er=null;function DE(r,n){if(r=r.containerInfo,Op=lu,r=y0(r),lf(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else t:{s=(s=r.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var m=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break t}var _=0,A=-1,H=-1,et=0,ut=0,pt=r,at=null;e:for(;;){for(var ct;pt!==s||m!==0&&pt.nodeType!==3||(A=_+m),pt!==b||u!==0&&pt.nodeType!==3||(H=_+u),pt.nodeType===3&&(_+=pt.nodeValue.length),(ct=pt.firstChild)!==null;)at=pt,pt=ct;for(;;){if(pt===r)break e;if(at===s&&++et===m&&(A=_),at===b&&++ut===u&&(H=_),(ct=pt.nextSibling)!==null)break;pt=at,at=pt.parentNode}pt=ct}s=A===-1||H===-1?null:{start:A,end:H}}else s=null}s=s||{start:0,end:0}}else s=null;for($p={focusedElem:r,selectionRange:s},lu=!1,er=n;er!==null;)if(n=er,r=n.child,(n.subtreeFlags&1028)!==0&&r!==null)r.return=n,er=r;else for(;er!==null;){switch(n=er,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(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,s=n,m=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var Mt=Kn(s.type,m);r=u.getSnapshotBeforeUpdate(Mt,b),u.__reactInternalSnapshotBeforeUpdate=r}catch(Ht){ye(s,s.return,Ht)}}break;case 3:if((r&1024)!==0){if(r=n.stateNode.containerInfo,s=r.nodeType,s===9)qp(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":qp(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,er=r;break}er=n.return}}function ob(r,n,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:va(r,s),u&4&&$l(5,s);break;case 1:if(va(r,s),u&4)if(r=s.stateNode,n===null)try{r.componentDidMount()}catch(_){ye(s,s.return,_)}else{var m=Kn(s.type,n.memoizedProps);n=n.memoizedState;try{r.componentDidUpdate(m,n,r.__reactInternalSnapshotBeforeUpdate)}catch(_){ye(s,s.return,_)}}u&64&&tb(s),u&512&&Nl(s,s.return);break;case 3:if(va(r,s),u&64&&(r=s.updateQueue,r!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=s.child.stateNode;break;case 1:n=s.child.stateNode}try{W0(r,n)}catch(_){ye(s,s.return,_)}}break;case 27:n===null&&u&4&&ab(s);case 26:case 5:va(r,s),n===null&&u&4&&rb(s),u&512&&Nl(s,s.return);break;case 12:va(r,s);break;case 31:va(r,s),u&4&&cb(r,s);break;case 13:va(r,s),u&4&&hb(r,s),u&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=jE.bind(null,s),sL(r,s))));break;case 22:if(u=s.memoizedState!==null||ba,!u){n=n!==null&&n.memoizedState!==null||je,m=ba;var b=je;ba=u,(je=n)&&!b?ka(r,s,(s.subtreeFlags&8772)!==0):va(r,s),ba=m,je=b}break;case 30:break;default:va(r,s)}}function sb(r){var n=r.alternate;n!==null&&(r.alternate=null,sb(n)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(n=r.stateNode,n!==null&&dl(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 _e=null,$r=!1;function Ca(r,n,s){for(s=s.child;s!==null;)lb(r,n,s),s=s.sibling}function lb(r,n,s){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(Oa,s)}catch{}switch(s.tag){case 26:je||Pi(s,n),Ca(r,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:je||Pi(s,n);var u=_e,m=$r;sn(s.type)&&(_e=s.stateNode,$r=!1),Ca(r,n,s),Gl(s.stateNode),_e=u,$r=m;break;case 5:je||Pi(s,n);case 6:if(u=_e,m=$r,_e=null,Ca(r,n,s),_e=u,$r=m,_e!==null)if($r)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(s.stateNode)}catch(b){ye(s,n,b)}else try{_e.removeChild(s.stateNode)}catch(b){ye(s,n,b)}break;case 18:_e!==null&&($r?(r=_e,tC(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),fs(r)):tC(_e,s.stateNode));break;case 4:u=_e,m=$r,_e=s.stateNode.containerInfo,$r=!0,Ca(r,n,s),_e=u,$r=m;break;case 0:case 11:case 14:case 15:Ja(2,s,n),je||Ja(4,s,n),Ca(r,n,s);break;case 1:je||(Pi(s,n),u=s.stateNode,typeof u.componentWillUnmount=="function"&&eb(s,n,u)),Ca(r,n,s);break;case 21:Ca(r,n,s);break;case 22:je=(u=je)||s.memoizedState!==null,Ca(r,n,s),je=u;break;default:Ca(r,n,s)}}function cb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{fs(r)}catch(s){ye(n,n.return,s)}}}function hb(r,n){if(n.memoizedState===null&&(r=n.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{fs(r)}catch(s){ye(n,n.return,s)}}function RE(r){switch(r.tag){case 31:case 13:case 19:var n=r.stateNode;return n===null&&(n=r.stateNode=new nb),n;case 22:return r=r.stateNode,n=r._retryCache,n===null&&(n=r._retryCache=new nb),n;default:throw Error(a(435,r.tag))}}function Hh(r,n){var s=RE(r);n.forEach(function(u){if(!s.has(u)){s.add(u);var m=HE.bind(null,r,u);u.then(m,m)}})}function Nr(r,n){var s=n.deletions;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u],b=r,_=n,A=_;t:for(;A!==null;){switch(A.tag){case 27:if(sn(A.type)){_e=A.stateNode,$r=!1;break t}break;case 5:_e=A.stateNode,$r=!1;break t;case 3:case 4:_e=A.stateNode.containerInfo,$r=!0;break t}A=A.return}if(_e===null)throw Error(a(160));lb(b,_,m),_e=null,$r=!1,b=m.alternate,b!==null&&(b.return=null),m.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)ub(n,r),n=n.sibling}var vi=null;function ub(r,n){var s=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Nr(n,r),Ir(r),u&4&&(Ja(3,r,r.return),$l(3,r),Ja(5,r,r.return));break;case 1:Nr(n,r),Ir(r),u&512&&(je||s===null||Pi(s,s.return)),u&64&&ba&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var m=vi;if(Nr(n,r),Ir(r),u&512&&(je||s===null||Pi(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=r.memoizedState,s===null)if(u===null)if(r.stateNode===null){t:{u=r.type,s=r.memoizedProps,m=m.ownerDocument||m;e:switch(u){case"title":b=m.getElementsByTagName("title")[0],(!b||b[qa]||b[Ge]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=m.createElement(u),m.head.insertBefore(b,m.querySelector("head > title"))),lr(b,u,s),b[Ge]=r,Fe(b),u=b;break t;case"link":var _=uC("link","href",m).get(u+(s.href||""));if(_){for(var A=0;A<_.length;A++)if(b=_[A],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){_.splice(A,1);break e}}b=m.createElement(u),lr(b,u,s),m.head.appendChild(b);break;case"meta":if(_=uC("meta","content",m).get(u+(s.content||""))){for(A=0;A<_.length;A++)if(b=_[A],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){_.splice(A,1);break e}}b=m.createElement(u),lr(b,u,s),m.head.appendChild(b);break;default:throw Error(a(468,u))}b[Ge]=r,Fe(b),u=b}r.stateNode=u}else dC(m,r.type,r.stateNode);else r.stateNode=hC(m,u,r.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?dC(m,r.type,r.stateNode):hC(m,u,r.memoizedProps)):u===null&&r.stateNode!==null&&dp(r,r.memoizedProps,s.memoizedProps)}break;case 27:Nr(n,r),Ir(r),u&512&&(je||s===null||Pi(s,s.return)),s!==null&&u&4&&dp(r,r.memoizedProps,s.memoizedProps);break;case 5:if(Nr(n,r),Ir(r),u&512&&(je||s===null||Pi(s,s.return)),r.flags&32){m=r.stateNode;try{xt(m,"")}catch(Mt){ye(r,r.return,Mt)}}u&4&&r.stateNode!=null&&(m=r.memoizedProps,dp(r,m,s!==null?s.memoizedProps:m)),u&1024&&(gp=!0);break;case 6:if(Nr(n,r),Ir(r),u&4){if(r.stateNode===null)throw Error(a(162));u=r.memoizedProps,s=r.stateNode;try{s.nodeValue=u}catch(Mt){ye(r,r.return,Mt)}}break;case 3:if(au=null,m=vi,vi=ru(n.containerInfo),Nr(n,r),vi=m,Ir(r),u&4&&s!==null&&s.memoizedState.isDehydrated)try{fs(n.containerInfo)}catch(Mt){ye(r,r.return,Mt)}gp&&(gp=!1,db(r));break;case 4:u=vi,vi=ru(r.stateNode.containerInfo),Nr(n,r),Ir(r),vi=u;break;case 12:Nr(n,r),Ir(r);break;case 31:Nr(n,r),Ir(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Hh(r,u)));break;case 13:Nr(n,r),Ir(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Wh=Ye()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Hh(r,u)));break;case 22:m=r.memoizedState!==null;var H=s!==null&&s.memoizedState!==null,et=ba,ut=je;if(ba=et||m,je=ut||H,Nr(n,r),je=ut,ba=et,Ir(r),u&8192)t:for(n=r.stateNode,n._visibility=m?n._visibility&-2:n._visibility|1,m&&(s===null||H||ba||je||Zn(r)),s=null,n=r;;){if(n.tag===5||n.tag===26){if(s===null){H=s=n;try{if(b=H.stateNode,m)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{A=H.stateNode;var pt=H.memoizedProps.style,at=pt!=null&&pt.hasOwnProperty("display")?pt.display:null;A.style.display=at==null||typeof at=="boolean"?"":(""+at).trim()}}catch(Mt){ye(H,H.return,Mt)}}}else if(n.tag===6){if(s===null){H=n;try{H.stateNode.nodeValue=m?"":H.memoizedProps}catch(Mt){ye(H,H.return,Mt)}}}else if(n.tag===18){if(s===null){H=n;try{var ct=H.stateNode;m?eC(ct,!0):eC(H.stateNode,!1)}catch(Mt){ye(H,H.return,Mt)}}}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;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=r.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,Hh(r,s))));break;case 19:Nr(n,r),Ir(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Hh(r,u)));break;case 30:break;case 21:break;default:Nr(n,r),Ir(r)}}function Ir(r){var n=r.flags;if(n&2){try{for(var s,u=r.return;u!==null;){if(ib(u)){s=u;break}u=u.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,b=fp(r);jh(r,b,m);break;case 5:var _=s.stateNode;s.flags&32&&(xt(_,""),s.flags&=-33);var A=fp(r);jh(r,A,_);break;case 3:case 4:var H=s.stateNode.containerInfo,et=fp(r);pp(r,et,H);break;default:throw Error(a(161))}}catch(ut){ye(r,r.return,ut)}r.flags&=-3}n&4096&&(r.flags&=-4097)}function db(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var n=r;db(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),r=r.sibling}}function va(r,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)ob(r,n.alternate,n),n=n.sibling}function Zn(r){for(r=r.child;r!==null;){var n=r;switch(n.tag){case 0:case 11:case 14:case 15:Ja(4,n,n.return),Zn(n);break;case 1:Pi(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&eb(n,n.return,s),Zn(n);break;case 27:Gl(n.stateNode);case 26:case 5:Pi(n,n.return),Zn(n);break;case 22:n.memoizedState===null&&Zn(n);break;case 30:Zn(n);break;default:Zn(n)}r=r.sibling}}function ka(r,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,m=r,b=n,_=b.flags;switch(b.tag){case 0:case 11:case 15:ka(m,b,s),$l(4,b);break;case 1:if(ka(m,b,s),u=b,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(et){ye(u,u.return,et)}if(u=b,m=u.updateQueue,m!==null){var A=u.stateNode;try{var H=m.shared.hiddenCallbacks;if(H!==null)for(m.shared.hiddenCallbacks=null,m=0;m<H.length;m++)P0(H[m],A)}catch(et){ye(u,u.return,et)}}s&&_&64&&tb(b),Nl(b,b.return);break;case 27:ab(b);case 26:case 5:ka(m,b,s),s&&u===null&&_&4&&rb(b),Nl(b,b.return);break;case 12:ka(m,b,s);break;case 31:ka(m,b,s),s&&_&4&&cb(m,b);break;case 13:ka(m,b,s),s&&_&4&&hb(m,b);break;case 22:b.memoizedState===null&&ka(m,b,s),Nl(b,b.return);break;case 30:break;default:ka(m,b,s)}n=n.sibling}}function mp(r,n){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&wl(s))}function yp(r,n){r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&wl(r))}function ki(r,n,s,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)fb(r,n,s,u),n=n.sibling}function fb(r,n,s,u){var m=n.flags;switch(n.tag){case 0:case 11:case 15:ki(r,n,s,u),m&2048&&$l(9,n);break;case 1:ki(r,n,s,u);break;case 3:ki(r,n,s,u),m&2048&&(r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(n.refCount++,r!=null&&wl(r)));break;case 12:if(m&2048){ki(r,n,s,u),r=n.stateNode;try{var b=n.memoizedProps,_=b.id,A=b.onPostCommit;typeof A=="function"&&A(_,n.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(H){ye(n,n.return,H)}}else ki(r,n,s,u);break;case 31:ki(r,n,s,u);break;case 13:ki(r,n,s,u);break;case 23:break;case 22:b=n.stateNode,_=n.alternate,n.memoizedState!==null?b._visibility&2?ki(r,n,s,u):Il(r,n):b._visibility&2?ki(r,n,s,u):(b._visibility|=2,rs(r,n,s,u,(n.subtreeFlags&10256)!==0||!1)),m&2048&&mp(_,n);break;case 24:ki(r,n,s,u),m&2048&&yp(n.alternate,n);break;default:ki(r,n,s,u)}}function rs(r,n,s,u,m){for(m=m&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var b=r,_=n,A=s,H=u,et=_.flags;switch(_.tag){case 0:case 11:case 15:rs(b,_,A,H,m),$l(8,_);break;case 23:break;case 22:var ut=_.stateNode;_.memoizedState!==null?ut._visibility&2?rs(b,_,A,H,m):Il(b,_):(ut._visibility|=2,rs(b,_,A,H,m)),m&&et&2048&&mp(_.alternate,_);break;case 24:rs(b,_,A,H,m),m&&et&2048&&yp(_.alternate,_);break;default:rs(b,_,A,H,m)}n=n.sibling}}function Il(r,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=r,u=n,m=u.flags;switch(u.tag){case 22:Il(s,u),m&2048&&mp(u.alternate,u);break;case 24:Il(s,u),m&2048&&yp(u.alternate,u);break;default:Il(s,u)}n=n.sibling}}var ql=8192;function is(r,n,s){if(r.subtreeFlags&ql)for(r=r.child;r!==null;)pb(r,n,s),r=r.sibling}function pb(r,n,s){switch(r.tag){case 26:is(r,n,s),r.flags&ql&&r.memoizedState!==null&&bL(s,vi,r.memoizedState,r.memoizedProps);break;case 5:is(r,n,s);break;case 3:case 4:var u=vi;vi=ru(r.stateNode.containerInfo),is(r,n,s),vi=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=ql,ql=16777216,is(r,n,s),ql=u):is(r,n,s));break;default:is(r,n,s)}}function gb(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 jl(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var u=n[s];er=u,yb(u,r)}gb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)mb(r),r=r.sibling}function mb(r){switch(r.tag){case 0:case 11:case 15:jl(r),r.flags&2048&&Ja(9,r,r.return);break;case 3:jl(r);break;case 12:jl(r);break;case 22:var n=r.stateNode;r.memoizedState!==null&&n._visibility&2&&(r.return===null||r.return.tag!==13)?(n._visibility&=-3,Ph(r)):jl(r);break;default:jl(r)}}function Ph(r){var n=r.deletions;if((r.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var u=n[s];er=u,yb(u,r)}gb(r)}for(r=r.child;r!==null;){switch(n=r,n.tag){case 0:case 11:case 15:Ja(8,n,n.return),Ph(n);break;case 22:s=n.stateNode,s._visibility&2&&(s._visibility&=-3,Ph(n));break;default:Ph(n)}r=r.sibling}}function yb(r,n){for(;er!==null;){var s=er;switch(s.tag){case 0:case 11:case 15:Ja(8,s,n);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:wl(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,er=u;else t:for(s=r;er!==null;){u=er;var m=u.sibling,b=u.return;if(sb(u),u===s){er=null;break t}if(m!==null){m.return=b,er=m;break t}er=b}}}var FE={getCacheForType:function(r){var n=or(Ne),s=n.data.get(r);return s===void 0&&(s=r(),n.data.set(r,s)),s},cacheSignal:function(){return or(Ne).controller.signal}},zE=typeof WeakMap=="function"?WeakMap:Map,pe=0,ke=null,te=null,ie=0,me=0,ti=null,tn=!1,as=!1,xp=!1,Sa=0,De=0,en=0,Jn=0,bp=0,ei=0,ns=0,Hl=null,qr=null,Cp=!1,Wh=0,xb=0,Uh=1/0,Yh=null,rn=null,Qe=0,an=null,os=null,wa=0,vp=0,kp=null,bb=null,Pl=0,Sp=null;function ri(){return(pe&2)!==0&&ie!==0?ie&-ie:D.T!==null?Lp():th()}function Cb(){if(ei===0)if((ie&536870912)===0||ne){var r=Ln;Ln<<=1,(Ln&3932160)===0&&(Ln=262144),ei=r}else ei=536870912;return r=Zr.current,r!==null&&(r.flags|=32),ei}function jr(r,n,s){(r===ke&&(me===2||me===9)||r.cancelPendingCommit!==null)&&(ss(r,0),nn(r,ie,ei,!1)),sa(r,s),((pe&2)===0||r!==ke)&&(r===ke&&((pe&2)===0&&(Jn|=s),De===4&&nn(r,ie,ei,!1)),Wi(r))}function vb(r,n,s){if((pe&6)!==0)throw Error(a(327));var u=!s&&(n&127)===0&&(n&r.expiredLanes)===0||Oi(r,n),m=u?NE(r,n):Tp(r,n,!0),b=u;do{if(m===0){as&&!u&&nn(r,n,0,!1);break}else{if(s=r.current.alternate,b&&!OE(s)){m=Tp(r,n,!1),b=!1;continue}if(m===2){if(b=n,r.errorRecoveryDisabledLanes&b)var _=0;else _=r.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){n=_;t:{var A=r;m=Hl;var H=A.current.memoizedState.isDehydrated;if(H&&(ss(A,_).flags|=256),_=Tp(A,_,!1),_!==2){if(xp&&!H){A.errorRecoveryDisabledLanes|=b,Jn|=b,m=4;break t}b=qr,qr=m,b!==null&&(qr===null?qr=b:qr.push.apply(qr,b))}m=_}if(b=!1,m!==2)continue}}if(m===1){ss(r,0),nn(r,n,0,!0);break}t:{switch(u=r,b=m,b){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:nn(u,n,ei,!tn);break t;case 2:qr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(m=Wh+300-Ye(),10<m)){if(nn(u,n,ei,!tn),Mn(u,0,!0)!==0)break t;wa=n,u.timeoutHandle=Zb(kb.bind(null,u,s,qr,Yh,Cp,n,ei,Jn,ns,tn,b,"Throttled",-0,0),m);break t}kb(u,s,qr,Yh,Cp,n,ei,Jn,ns,tn,b,null,-0,0)}}break}while(!0);Wi(r)}function kb(r,n,s,u,m,b,_,A,H,et,ut,pt,at,ct){if(r.timeoutHandle=-1,pt=n.subtreeFlags,pt&8192||(pt&16785408)===16785408){pt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xr},pb(n,b,pt);var Mt=(b&62914560)===b?Wh-Ye():(b&4194048)===b?xb-Ye():0;if(Mt=CL(pt,Mt),Mt!==null){wa=b,r.cancelPendingCommit=Mt(Ab.bind(null,r,n,b,s,u,m,_,A,H,ut,pt,null,at,ct)),nn(r,b,_,!et);return}}Ab(r,n,b,s,u,m,_,A,H)}function OE(r){for(var n=r;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var m=s[u],b=m.getSnapshot;m=m.value;try{if(!Qr(b(),m))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;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 nn(r,n,s,u){n&=~bp,n&=~Jn,r.suspendedLanes|=n,r.pingedLanes&=~n,u&&(r.warmLanes|=n),u=r.expirationTimes;for(var m=n;0<m;){var b=31-ar(m),_=1<<b;u[b]=-1,m&=~_}s!==0&&Jc(r,s,n)}function Gh(){return(pe&6)===0?(Wl(0),!1):!0}function wp(){if(te!==null){if(me===0)var r=te.return;else r=te,fa=Wn=null,qf(r),Ko=null,_l=0,r=te;for(;r!==null;)Jx(r.alternate,r),r=r.return;te=null}}function ss(r,n){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,rL(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),wa=0,wp(),ke=r,te=s=ua(r.current,null),ie=n,me=0,ti=null,tn=!1,as=Oi(r,n),xp=!1,ns=ei=bp=Jn=en=De=0,qr=Hl=null,Cp=!1,(n&8)!==0&&(n|=n&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=n;0<u;){var m=31-ar(u),b=1<<m;n|=r[m],u&=~b}return Sa=n,ph(),s}function Sb(r,n){Xt=null,D.H=Fl,n===Qo||n===kh?(n=I0(),me=3):n===Ef?(n=I0(),me=4):me=n===rp?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,ti=n,te===null&&(De=1,Oh(r,li(n,r.current)))}function wb(){var r=Zr.current;return r===null?!0:(ie&4194048)===ie?di===null:(ie&62914560)===ie||(ie&536870912)!==0?r===di:!1}function Tb(){var r=D.H;return D.H=Fl,r===null?Fl:r}function _b(){var r=D.A;return D.A=FE,r}function Vh(){De=4,tn||(ie&4194048)!==ie&&Zr.current!==null||(as=!0),(en&134217727)===0&&(Jn&134217727)===0||ke===null||nn(ke,ie,ei,!1)}function Tp(r,n,s){var u=pe;pe|=2;var m=Tb(),b=_b();(ke!==r||ie!==n)&&(Yh=null,ss(r,n)),n=!1;var _=De;t:do try{if(me!==0&&te!==null){var A=te,H=ti;switch(me){case 8:wp(),_=6;break t;case 3:case 2:case 9:case 6:Zr.current===null&&(n=!0);var et=me;if(me=0,ti=null,ls(r,A,H,et),s&&as){_=0;break t}break;default:et=me,me=0,ti=null,ls(r,A,H,et)}}$E(),_=De;break}catch(ut){Sb(r,ut)}while(!0);return n&&r.shellSuspendCounter++,fa=Wn=null,pe=u,D.H=m,D.A=b,te===null&&(ke=null,ie=0,ph()),_}function $E(){for(;te!==null;)Bb(te)}function NE(r,n){var s=pe;pe|=2;var u=Tb(),m=_b();ke!==r||ie!==n?(Yh=null,Uh=Ye()+500,ss(r,n)):as=Oi(r,n);t:do try{if(me!==0&&te!==null){n=te;var b=ti;e:switch(me){case 1:me=0,ti=null,ls(r,n,b,1);break;case 2:case 9:if($0(b)){me=0,ti=null,Eb(n);break}n=function(){me!==2&&me!==9||ke!==r||(me=7),Wi(r)},b.then(n,n);break t;case 3:me=7;break t;case 4:me=5;break t;case 7:$0(b)?(me=0,ti=null,Eb(n)):(me=0,ti=null,ls(r,n,b,7));break;case 5:var _=null;switch(te.tag){case 26:_=te.memoizedState;case 5:case 27:var A=te;if(_?fC(_):A.stateNode.complete){me=0,ti=null;var H=A.sibling;if(H!==null)te=H;else{var et=A.return;et!==null?(te=et,Xh(et)):te=null}break e}}me=0,ti=null,ls(r,n,b,5);break;case 6:me=0,ti=null,ls(r,n,b,6);break;case 8:wp(),De=6;break t;default:throw Error(a(462))}}IE();break}catch(ut){Sb(r,ut)}while(!0);return fa=Wn=null,D.H=u,D.A=m,pe=s,te!==null?0:(ke=null,ie=0,ph(),De)}function IE(){for(;te!==null&&!Zc();)Bb(te)}function Bb(r){var n=Kx(r.alternate,r,Sa);r.memoizedProps=r.pendingProps,n===null?Xh(r):te=n}function Eb(r){var n=r,s=n.alternate;switch(n.tag){case 15:case 0:n=Ux(s,n,n.pendingProps,n.type,void 0,ie);break;case 11:n=Ux(s,n,n.pendingProps,n.type.render,n.ref,ie);break;case 5:qf(n);default:Jx(s,n),n=te=_0(n,Sa),n=Kx(s,n,Sa)}r.memoizedProps=r.pendingProps,n===null?Xh(r):te=n}function ls(r,n,s,u){fa=Wn=null,qf(n),Ko=null,_l=0;var m=n.return;try{if(BE(r,m,n,s,ie)){De=1,Oh(r,li(s,r.current)),te=null;return}}catch(b){if(m!==null)throw te=m,b;De=1,Oh(r,li(s,r.current)),te=null;return}n.flags&32768?(ne||u===1?r=!0:as||(ie&536870912)!==0?r=!1:(tn=r=!0,(u===2||u===9||u===3||u===6)&&(u=Zr.current,u!==null&&u.tag===13&&(u.flags|=16384))),Lb(n,r)):Xh(n)}function Xh(r){var n=r;do{if((n.flags&32768)!==0){Lb(n,tn);return}r=n.return;var s=AE(n.alternate,n,Sa);if(s!==null){te=s;return}if(n=n.sibling,n!==null){te=n;return}te=n=r}while(n!==null);De===0&&(De=5)}function Lb(r,n){do{var s=ME(r.alternate,r);if(s!==null){s.flags&=32767,te=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(r=r.sibling,r!==null)){te=r;return}te=r=s}while(r!==null);De=6,te=null}function Ab(r,n,s,u,m,b,_,A,H){r.cancelPendingCommit=null;do Qh();while(Qe!==0);if((pe&6)!==0)throw Error(a(327));if(n!==null){if(n===r.current)throw Error(a(177));if(b=n.lanes|n.childLanes,b|=ff,sl(r,s,b,_,A,H),r===ke&&(te=ke=null,ie=0),os=n,an=r,wa=s,vp=b,kp=m,bb=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,PE(za,function(){return zb(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=D.T,D.T=null,m=I.p,I.p=2,_=pe,pe|=4;try{DE(r,n,s)}finally{pe=_,I.p=m,D.T=u}}Qe=1,Mb(),Db(),Rb()}}function Mb(){if(Qe===1){Qe=0;var r=an,n=os,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=D.T,D.T=null;var u=I.p;I.p=2;var m=pe;pe|=4;try{ub(n,r);var b=$p,_=y0(r.containerInfo),A=b.focusedElem,H=b.selectionRange;if(_!==A&&A&&A.ownerDocument&&m0(A.ownerDocument.documentElement,A)){if(H!==null&&lf(A)){var et=H.start,ut=H.end;if(ut===void 0&&(ut=et),"selectionStart"in A)A.selectionStart=et,A.selectionEnd=Math.min(ut,A.value.length);else{var pt=A.ownerDocument||document,at=pt&&pt.defaultView||window;if(at.getSelection){var ct=at.getSelection(),Mt=A.textContent.length,Ht=Math.min(H.start,Mt),Ce=H.end===void 0?Ht:Math.min(H.end,Mt);!ct.extend&&Ht>Ce&&(_=Ce,Ce=Ht,Ht=_);var Q=g0(A,Ht),W=g0(A,Ce);if(Q&&W&&(ct.rangeCount!==1||ct.anchorNode!==Q.node||ct.anchorOffset!==Q.offset||ct.focusNode!==W.node||ct.focusOffset!==W.offset)){var tt=pt.createRange();tt.setStart(Q.node,Q.offset),ct.removeAllRanges(),Ht>Ce?(ct.addRange(tt),ct.extend(W.node,W.offset)):(tt.setEnd(W.node,W.offset),ct.addRange(tt))}}}}for(pt=[],ct=A;ct=ct.parentNode;)ct.nodeType===1&&pt.push({element:ct,left:ct.scrollLeft,top:ct.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<pt.length;A++){var ft=pt[A];ft.element.scrollLeft=ft.left,ft.element.scrollTop=ft.top}}lu=!!Op,$p=Op=null}finally{pe=m,I.p=u,D.T=s}}r.current=n,Qe=2}}function Db(){if(Qe===2){Qe=0;var r=an,n=os,s=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||s){s=D.T,D.T=null;var u=I.p;I.p=2;var m=pe;pe|=4;try{ob(r,n.alternate,n)}finally{pe=m,I.p=u,D.T=s}}Qe=3}}function Rb(){if(Qe===4||Qe===3){Qe=0,zi();var r=an,n=os,s=wa,u=bb;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Qe=5:(Qe=0,os=an=null,Fb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(rn=null),Dn(s),n=n.stateNode,mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(Oa,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=D.T,m=I.p,I.p=2,D.T=null;try{for(var b=r.onRecoverableError,_=0;_<u.length;_++){var A=u[_];b(A.value,{componentStack:A.stack})}}finally{D.T=n,I.p=m}}(wa&3)!==0&&Qh(),Wi(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Sp?Pl++:(Pl=0,Sp=r):Pl=0,Wl(0)}}function Fb(r,n){(r.pooledCacheLanes&=n)===0&&(n=r.pooledCache,n!=null&&(r.pooledCache=null,wl(n)))}function Qh(){return Mb(),Db(),Rb(),zb()}function zb(){if(Qe!==5)return!1;var r=an,n=vp;vp=0;var s=Dn(wa),u=D.T,m=I.p;try{I.p=32>s?32:s,D.T=null,s=kp,kp=null;var b=an,_=wa;if(Qe=0,os=an=null,wa=0,(pe&6)!==0)throw Error(a(331));var A=pe;if(pe|=4,mb(b.current),fb(b,b.current,_,s),pe=A,Wl(0,!1),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(Oa,b)}catch{}return!0}finally{I.p=m,D.T=u,Fb(r,n)}}function Ob(r,n,s){n=li(s,n),n=ep(r.stateNode,n,2),r=Qa(r,n,2),r!==null&&(sa(r,2),Wi(r))}function ye(r,n,s){if(r.tag===3)Ob(r,r,s);else for(;n!==null;){if(n.tag===3){Ob(n,r,s);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(rn===null||!rn.has(u))){r=li(s,r),s=$x(2),u=Qa(n,s,2),u!==null&&(Nx(s,u,n,r),sa(u,2),Wi(u));break}}n=n.return}}function _p(r,n,s){var u=r.pingCache;if(u===null){u=r.pingCache=new zE;var m=new Set;u.set(n,m)}else m=u.get(n),m===void 0&&(m=new Set,u.set(n,m));m.has(s)||(xp=!0,m.add(s),r=qE.bind(null,r,n,s),n.then(r,r))}function qE(r,n,s){var u=r.pingCache;u!==null&&u.delete(n),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,ke===r&&(ie&s)===s&&(De===4||De===3&&(ie&62914560)===ie&&300>Ye()-Wh?(pe&2)===0&&ss(r,0):bp|=s,ns===ie&&(ns=0)),Wi(r)}function $b(r,n){n===0&&(n=Gr()),r=jn(r,n),r!==null&&(sa(r,n),Wi(r))}function jE(r){var n=r.memoizedState,s=0;n!==null&&(s=n.retryLane),$b(r,s)}function HE(r,n){var s=0;switch(r.tag){case 31:case 13:var u=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(n),$b(r,s)}function PE(r,n){return En(r,n)}var Kh=null,cs=null,Bp=!1,Zh=!1,Ep=!1,on=0;function Wi(r){r!==cs&&r.next===null&&(cs===null?Kh=cs=r:cs=cs.next=r),Zh=!0,Bp||(Bp=!0,UE())}function Wl(r,n){if(!Ep&&Zh){Ep=!0;do for(var s=!1,u=Kh;u!==null;){if(r!==0){var m=u.pendingLanes;if(m===0)var b=0;else{var _=u.suspendedLanes,A=u.pingedLanes;b=(1<<31-ar(42|r)+1)-1,b&=m&~(_&~A),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,jb(u,b))}else b=ie,b=Mn(u,u===ke?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||Oi(u,b)||(s=!0,jb(u,b));u=u.next}while(s);Ep=!1}}function WE(){Nb()}function Nb(){Zh=Bp=!1;var r=0;on!==0&&eL()&&(r=on);for(var n=Ye(),s=null,u=Kh;u!==null;){var m=u.next,b=Ib(u,n);b===0?(u.next=null,s===null?Kh=m:s.next=m,m===null&&(cs=s)):(s=u,(r!==0||(b&3)!==0)&&(Zh=!0)),u=m}Qe!==0&&Qe!==5||Wl(r),on!==0&&(on=0)}function Ib(r,n){for(var s=r.suspendedLanes,u=r.pingedLanes,m=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var _=31-ar(b),A=1<<_,H=m[_];H===-1?((A&s)===0||(A&u)!==0)&&(m[_]=Ao(A,n)):H<=n&&(r.expiredLanes|=A),b&=~A}if(n=ke,s=ie,s=Mn(r,r===n?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,s===0||r===n&&(me===2||me===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&To(u),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Oi(r,s)){if(n=s&-s,n===r.callbackPriority)return n;switch(u!==null&&To(u),Dn(s)){case 2:case 8:s=Bo;break;case 32:s=za;break;case 268435456:s=oa;break;default:s=za}return u=qb.bind(null,r),s=En(s,u),r.callbackPriority=n,r.callbackNode=s,n}return u!==null&&u!==null&&To(u),r.callbackPriority=2,r.callbackNode=null,2}function qb(r,n){if(Qe!==0&&Qe!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Qh()&&r.callbackNode!==s)return null;var u=ie;return u=Mn(r,r===ke?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(vb(r,u,n),Ib(r,Ye()),r.callbackNode!=null&&r.callbackNode===s?qb.bind(null,r):null)}function jb(r,n){if(Qh())return null;vb(r,n,!0)}function UE(){iL(function(){(pe&6)!==0?En(_o,WE):Nb()})}function Lp(){if(on===0){var r=Vo;r===0&&(r=Na,Na<<=1,(Na&261888)===0&&(Na=256)),on=r}return on}function Hb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:yr(""+r)}function Pb(r,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,r.id&&s.setAttribute("form",r.id),n.parentNode.insertBefore(s,n),r=new FormData(r),s.parentNode.removeChild(s),r}function YE(r,n,s,u,m){if(n==="submit"&&s&&s.stateNode===m){var b=Hb((m[Jt]||null).action),_=u.submitter;_&&(n=(n=_[Jt]||null)?Hb(n.formAction):_.getAttribute("formAction"),n!==null&&(b=n,_=null));var A=new hh("action","action",null,u,m);r.push({event:A,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(on!==0){var H=_?Pb(m,_):new FormData(m);Xf(s,{pending:!0,data:H,method:m.method,action:b},null,H)}}else typeof b=="function"&&(A.preventDefault(),H=_?Pb(m,_):new FormData(m),Xf(s,{pending:!0,data:H,method:m.method,action:b},b,H))},currentTarget:m}]})}}for(var Ap=0;Ap<df.length;Ap++){var Mp=df[Ap],GE=Mp.toLowerCase(),VE=Mp[0].toUpperCase()+Mp.slice(1);Ci(GE,"on"+VE)}Ci(C0,"onAnimationEnd"),Ci(v0,"onAnimationIteration"),Ci(k0,"onAnimationStart"),Ci("dblclick","onDoubleClick"),Ci("focusin","onFocus"),Ci("focusout","onBlur"),Ci(hE,"onTransitionRun"),Ci(uE,"onTransitionStart"),Ci(dE,"onTransitionCancel"),Ci(S0,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),la("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),la("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),la("onBeforeInput",["compositionend","keypress","textInput","paste"]),la("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),la("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),la("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ul="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(" "),XE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ul));function Wb(r,n){n=(n&4)!==0;for(var s=0;s<r.length;s++){var u=r[s],m=u.event;u=u.listeners;t:{var b=void 0;if(n)for(var _=u.length-1;0<=_;_--){var A=u[_],H=A.instance,et=A.currentTarget;if(A=A.listener,H!==b&&m.isPropagationStopped())break t;b=A,m.currentTarget=et;try{b(m)}catch(ut){fh(ut)}m.currentTarget=null,b=H}else for(_=0;_<u.length;_++){if(A=u[_],H=A.instance,et=A.currentTarget,A=A.listener,H!==b&&m.isPropagationStopped())break t;b=A,m.currentTarget=et;try{b(m)}catch(ut){fh(ut)}m.currentTarget=null,b=H}}}}function ee(r,n){var s=n[cl];s===void 0&&(s=n[cl]=new Set);var u=r+"__bubble";s.has(u)||(Ub(n,r,2,!1),s.add(u))}function Dp(r,n,s){var u=0;n&&(u|=4),Ub(s,r,u,n)}var Jh="_reactListening"+Math.random().toString(36).slice(2);function Rp(r){if(!r[Jh]){r[Jh]=!0,Ii.forEach(function(s){s!=="selectionchange"&&(XE.has(s)||Dp(s,!1,r),Dp(s,!0,r))});var n=r.nodeType===9?r:r.ownerDocument;n===null||n[Jh]||(n[Jh]=!0,Dp("selectionchange",!1,n))}}function Ub(r,n,s,u){switch(CC(n)){case 2:var m=SL;break;case 8:m=wL;break;default:m=Vp}s=m.bind(null,n,s,r),m=void 0,!Zd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(m=!0),u?m!==void 0?r.addEventListener(n,s,{capture:!0,passive:m}):r.addEventListener(n,s,!0):m!==void 0?r.addEventListener(n,s,{passive:m}):r.addEventListener(n,s,!1)}function Fp(r,n,s,u,m){var b=u;if((n&1)===0&&(n&2)===0&&u!==null)t:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var A=u.stateNode.containerInfo;if(A===m)break;if(_===4)for(_=u.return;_!==null;){var H=_.tag;if((H===3||H===4)&&_.stateNode.containerInfo===m)return;_=_.return}for(;A!==null;){if(_=ja(A),_===null)return;if(H=_.tag,H===5||H===6||H===26||H===27){u=b=_;continue t}A=A.parentNode}}u=u.return}Qy(function(){var et=b,ut=Qd(s),pt=[];t:{var at=w0.get(r);if(at!==void 0){var ct=hh,Mt=r;switch(r){case"keypress":if(lh(s)===0)break t;case"keydown":case"keyup":ct=HB;break;case"focusin":Mt="focus",ct=rf;break;case"focusout":Mt="blur",ct=rf;break;case"beforeblur":case"afterblur":ct=rf;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ct=Jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ct=AB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ct=UB;break;case C0:case v0:case k0:ct=RB;break;case S0:ct=GB;break;case"scroll":case"scrollend":ct=EB;break;case"wheel":ct=XB;break;case"copy":case"cut":case"paste":ct=zB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ct=e0;break;case"toggle":case"beforetoggle":ct=KB}var Ht=(n&4)!==0,Ce=!Ht&&(r==="scroll"||r==="scrollend"),Q=Ht?at!==null?at+"Capture":null:at;Ht=[];for(var W=et,tt;W!==null;){var ft=W;if(tt=ft.stateNode,ft=ft.tag,ft!==5&&ft!==26&&ft!==27||tt===null||Q===null||(ft=fl(W,Q),ft!=null&&Ht.push(Yl(W,ft,tt))),Ce)break;W=W.return}0<Ht.length&&(at=new ct(at,Mt,null,s,ut),pt.push({event:at,listeners:Ht}))}}if((n&7)===0){t:{if(at=r==="mouseover"||r==="pointerover",ct=r==="mouseout"||r==="pointerout",at&&s!==Xe&&(Mt=s.relatedTarget||s.fromElement)&&(ja(Mt)||Mt[Vr]))break t;if((ct||at)&&(at=ut.window===ut?ut:(at=ut.ownerDocument)?at.defaultView||at.parentWindow:window,ct?(Mt=s.relatedTarget||s.toElement,ct=et,Mt=Mt?ja(Mt):null,Mt!==null&&(Ce=l(Mt),Ht=Mt.tag,Mt!==Ce||Ht!==5&&Ht!==27&&Ht!==6)&&(Mt=null)):(ct=null,Mt=et),ct!==Mt)){if(Ht=Jy,ft="onMouseLeave",Q="onMouseEnter",W="mouse",(r==="pointerout"||r==="pointerover")&&(Ht=e0,ft="onPointerLeave",Q="onPointerEnter",W="pointer"),Ce=ct==null?at:Rn(ct),tt=Mt==null?at:Rn(Mt),at=new Ht(ft,W+"leave",ct,s,ut),at.target=Ce,at.relatedTarget=tt,ft=null,ja(ut)===et&&(Ht=new Ht(Q,W+"enter",Mt,s,ut),Ht.target=tt,Ht.relatedTarget=Ce,ft=Ht),Ce=ft,ct&&Mt)e:{for(Ht=QE,Q=ct,W=Mt,tt=0,ft=Q;ft;ft=Ht(ft))tt++;ft=0;for(var Nt=W;Nt;Nt=Ht(Nt))ft++;for(;0<tt-ft;)Q=Ht(Q),tt--;for(;0<ft-tt;)W=Ht(W),ft--;for(;tt--;){if(Q===W||W!==null&&Q===W.alternate){Ht=Q;break e}Q=Ht(Q),W=Ht(W)}Ht=null}else Ht=null;ct!==null&&Yb(pt,at,ct,Ht,!1),Mt!==null&&Ce!==null&&Yb(pt,Ce,Mt,Ht,!0)}}t:{if(at=et?Rn(et):window,ct=at.nodeName&&at.nodeName.toLowerCase(),ct==="select"||ct==="input"&&at.type==="file")var ue=c0;else if(s0(at))if(h0)ue=sE;else{ue=nE;var zt=aE}else ct=at.nodeName,!ct||ct.toLowerCase()!=="input"||at.type!=="checkbox"&&at.type!=="radio"?et&&Le(et.elementType)&&(ue=c0):ue=oE;if(ue&&(ue=ue(r,et))){l0(pt,ue,s,ut);break t}zt&&zt(r,at,et),r==="focusout"&&et&&at.type==="number"&&et.memoizedProps.value!=null&&$n(at,"number",at.value)}switch(zt=et?Rn(et):window,r){case"focusin":(s0(zt)||zt.contentEditable==="true")&&(qo=zt,cf=et,vl=null);break;case"focusout":vl=cf=qo=null;break;case"mousedown":hf=!0;break;case"contextmenu":case"mouseup":case"dragend":hf=!1,x0(pt,s,ut);break;case"selectionchange":if(cE)break;case"keydown":case"keyup":x0(pt,s,ut)}var Kt;if(nf)t:{switch(r){case"compositionstart":var ae="onCompositionStart";break t;case"compositionend":ae="onCompositionEnd";break t;case"compositionupdate":ae="onCompositionUpdate";break t}ae=void 0}else Io?n0(r,s)&&(ae="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(ae="onCompositionStart");ae&&(r0&&s.locale!=="ko"&&(Io||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Io&&(Kt=Ky()):(Pa=ut,Jd="value"in Pa?Pa.value:Pa.textContent,Io=!0)),zt=tu(et,ae),0<zt.length&&(ae=new t0(ae,r,null,s,ut),pt.push({event:ae,listeners:zt}),Kt?ae.data=Kt:(Kt=o0(s),Kt!==null&&(ae.data=Kt)))),(Kt=JB?tE(r,s):eE(r,s))&&(ae=tu(et,"onBeforeInput"),0<ae.length&&(zt=new t0("onBeforeInput","beforeinput",null,s,ut),pt.push({event:zt,listeners:ae}),zt.data=Kt)),YE(pt,r,et,s,ut)}Wb(pt,n)})}function Yl(r,n,s){return{instance:r,listener:n,currentTarget:s}}function tu(r,n){for(var s=n+"Capture",u=[];r!==null;){var m=r,b=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||b===null||(m=fl(r,s),m!=null&&u.unshift(Yl(r,m,b)),m=fl(r,n),m!=null&&u.push(Yl(r,m,b))),r.tag===3)return u;r=r.return}return[]}function QE(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Yb(r,n,s,u,m){for(var b=n._reactName,_=[];s!==null&&s!==u;){var A=s,H=A.alternate,et=A.stateNode;if(A=A.tag,H!==null&&H===u)break;A!==5&&A!==26&&A!==27||et===null||(H=et,m?(et=fl(s,b),et!=null&&_.unshift(Yl(s,et,H))):m||(et=fl(s,b),et!=null&&_.push(Yl(s,et,H)))),s=s.return}_.length!==0&&r.push({event:n,listeners:_})}var KE=/\r\n?/g,ZE=/\u0000|\uFFFD/g;function Gb(r){return(typeof r=="string"?r:""+r).replace(KE,`
`).replace(ZE,"")}function Vb(r,n){return n=Gb(n),Gb(r)===n}function be(r,n,s,u,m,b){switch(s){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||xt(r,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&xt(r,""+u);break;case"className":qi(r,"class",u);break;case"tabIndex":qi(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":qi(r,s,u);break;case"style":re(r,u,b);break;case"data":if(n!=="object"){qi(r,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||s!=="href")){r.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=yr(""+u),r.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(s,"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"&&(s==="formAction"?(n!=="input"&&be(r,n,"name",m.name,m,null),be(r,n,"formEncType",m.formEncType,m,null),be(r,n,"formMethod",m.formMethod,m,null),be(r,n,"formTarget",m.formTarget,m,null)):(be(r,n,"encType",m.encType,m,null),be(r,n,"method",m.method,m,null),be(r,n,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(s);break}u=yr(""+u),r.setAttribute(s,u);break;case"onClick":u!=null&&(r.onclick=Xr);break;case"onScroll":u!=null&&ee("scroll",r);break;case"onScrollEnd":u!=null&&ee("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}s=yr(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""+u):r.removeAttribute(s);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":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":u===!0?r.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(s,u):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(s,u):r.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(s):r.setAttribute(s,u);break;case"popover":ee("beforetoggle",r),ee("toggle",r),bi(r,"popover",u);break;case"xlinkActuate":Ve(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ve(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ve(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ve(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ve(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ve(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ve(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ve(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ve(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":bi(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Ae.get(s)||s,bi(r,s,u))}}function zp(r,n,s,u,m,b){switch(s){case"style":re(r,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(s=u.__html,s!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=s}}break;case"children":typeof u=="string"?xt(r,u):(typeof u=="number"||typeof u=="bigint")&&xt(r,""+u);break;case"onScroll":u!=null&&ee("scroll",r);break;case"onScrollEnd":u!=null&&ee("scrollend",r);break;case"onClick":u!=null&&(r.onclick=Xr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rh.hasOwnProperty(s))t:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),n=s.slice(2,m?s.length-7:void 0),b=r[Jt]||null,b=b!=null?b[s]:null,typeof b=="function"&&r.removeEventListener(n,b,m),typeof u=="function")){typeof b!="function"&&b!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(n,u,m);break t}s in r?r[s]=u:u===!0?r.setAttribute(s,""):bi(r,s,u)}}}function lr(r,n,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",r),ee("load",r);var u=!1,m=!1,b;for(b in s)if(s.hasOwnProperty(b)){var _=s[b];if(_!=null)switch(b){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:be(r,n,b,_,s,null)}}m&&be(r,n,"srcSet",s.srcSet,s,null),u&&be(r,n,"src",s.src,s,null);return;case"input":ee("invalid",r);var A=b=_=m=null,H=null,et=null;for(u in s)if(s.hasOwnProperty(u)){var ut=s[u];if(ut!=null)switch(u){case"name":m=ut;break;case"type":_=ut;break;case"checked":H=ut;break;case"defaultChecked":et=ut;break;case"value":b=ut;break;case"defaultValue":A=ut;break;case"children":case"dangerouslySetInnerHTML":if(ut!=null)throw Error(a(137,n));break;default:be(r,n,u,ut,s,null)}}On(r,b,A,H,et,_,m,!1);return;case"select":ee("invalid",r),u=_=b=null;for(m in s)if(s.hasOwnProperty(m)&&(A=s[m],A!=null))switch(m){case"value":b=A;break;case"defaultValue":_=A;break;case"multiple":u=A;default:be(r,n,m,A,s,null)}n=b,s=_,r.multiple=!!u,n!=null?bt(r,!!u,n,!1):s!=null&&bt(r,!!u,s,!0);return;case"textarea":ee("invalid",r),b=m=u=null;for(_ in s)if(s.hasOwnProperty(_)&&(A=s[_],A!=null))switch(_){case"value":u=A;break;case"defaultValue":m=A;break;case"children":b=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(a(91));break;default:be(r,n,_,A,s,null)}rt(r,u,m,b);return;case"option":for(H in s)if(s.hasOwnProperty(H)&&(u=s[H],u!=null))switch(H){case"selected":r.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:be(r,n,H,u,s,null)}return;case"dialog":ee("beforetoggle",r),ee("toggle",r),ee("cancel",r),ee("close",r);break;case"iframe":case"object":ee("load",r);break;case"video":case"audio":for(u=0;u<Ul.length;u++)ee(Ul[u],r);break;case"image":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"embed":case"source":case"link":ee("error",r),ee("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(et in s)if(s.hasOwnProperty(et)&&(u=s[et],u!=null))switch(et){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:be(r,n,et,u,s,null)}return;default:if(Le(n)){for(ut in s)s.hasOwnProperty(ut)&&(u=s[ut],u!==void 0&&zp(r,n,ut,u,s,void 0));return}}for(A in s)s.hasOwnProperty(A)&&(u=s[A],u!=null&&be(r,n,A,u,s,null))}function JE(r,n,s,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,b=null,_=null,A=null,H=null,et=null,ut=null;for(ct in s){var pt=s[ct];if(s.hasOwnProperty(ct)&&pt!=null)switch(ct){case"checked":break;case"value":break;case"defaultValue":H=pt;default:u.hasOwnProperty(ct)||be(r,n,ct,null,u,pt)}}for(var at in u){var ct=u[at];if(pt=s[at],u.hasOwnProperty(at)&&(ct!=null||pt!=null))switch(at){case"type":b=ct;break;case"name":m=ct;break;case"checked":et=ct;break;case"defaultChecked":ut=ct;break;case"value":_=ct;break;case"defaultValue":A=ct;break;case"children":case"dangerouslySetInnerHTML":if(ct!=null)throw Error(a(137,n));break;default:ct!==pt&&be(r,n,at,ct,u,pt)}}Oo(r,_,A,H,et,ut,b,m);return;case"select":ct=_=A=at=null;for(b in s)if(H=s[b],s.hasOwnProperty(b)&&H!=null)switch(b){case"value":break;case"multiple":ct=H;default:u.hasOwnProperty(b)||be(r,n,b,null,u,H)}for(m in u)if(b=u[m],H=s[m],u.hasOwnProperty(m)&&(b!=null||H!=null))switch(m){case"value":at=b;break;case"defaultValue":A=b;break;case"multiple":_=b;default:b!==H&&be(r,n,m,b,u,H)}n=A,s=_,u=ct,at!=null?bt(r,!!s,at,!1):!!u!=!!s&&(n!=null?bt(r,!!s,n,!0):bt(r,!!s,s?[]:"",!1));return;case"textarea":ct=at=null;for(A in s)if(m=s[A],s.hasOwnProperty(A)&&m!=null&&!u.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:be(r,n,A,null,u,m)}for(_ in u)if(m=u[_],b=s[_],u.hasOwnProperty(_)&&(m!=null||b!=null))switch(_){case"value":at=m;break;case"defaultValue":ct=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==b&&be(r,n,_,m,u,b)}O(r,at,ct);return;case"option":for(var Mt in s)if(at=s[Mt],s.hasOwnProperty(Mt)&&at!=null&&!u.hasOwnProperty(Mt))switch(Mt){case"selected":r.selected=!1;break;default:be(r,n,Mt,null,u,at)}for(H in u)if(at=u[H],ct=s[H],u.hasOwnProperty(H)&&at!==ct&&(at!=null||ct!=null))switch(H){case"selected":r.selected=at&&typeof at!="function"&&typeof at!="symbol";break;default:be(r,n,H,at,u,ct)}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 Ht in s)at=s[Ht],s.hasOwnProperty(Ht)&&at!=null&&!u.hasOwnProperty(Ht)&&be(r,n,Ht,null,u,at);for(et in u)if(at=u[et],ct=s[et],u.hasOwnProperty(et)&&at!==ct&&(at!=null||ct!=null))switch(et){case"children":case"dangerouslySetInnerHTML":if(at!=null)throw Error(a(137,n));break;default:be(r,n,et,at,u,ct)}return;default:if(Le(n)){for(var Ce in s)at=s[Ce],s.hasOwnProperty(Ce)&&at!==void 0&&!u.hasOwnProperty(Ce)&&zp(r,n,Ce,void 0,u,at);for(ut in u)at=u[ut],ct=s[ut],!u.hasOwnProperty(ut)||at===ct||at===void 0&&ct===void 0||zp(r,n,ut,at,u,ct);return}}for(var Q in s)at=s[Q],s.hasOwnProperty(Q)&&at!=null&&!u.hasOwnProperty(Q)&&be(r,n,Q,null,u,at);for(pt in u)at=u[pt],ct=s[pt],!u.hasOwnProperty(pt)||at===ct||at==null&&ct==null||be(r,n,pt,at,u,ct)}function Xb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function tL(){if(typeof performance.getEntriesByType=="function"){for(var r=0,n=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var m=s[u],b=m.transferSize,_=m.initiatorType,A=m.duration;if(b&&A&&Xb(_)){for(_=0,A=m.responseEnd,u+=1;u<s.length;u++){var H=s[u],et=H.startTime;if(et>A)break;var ut=H.transferSize,pt=H.initiatorType;ut&&Xb(pt)&&(H=H.responseEnd,_+=ut*(H<A?1:(A-et)/(H-et)))}if(--u,n+=8*(b+_)/(m.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 Op=null,$p=null;function eu(r){return r.nodeType===9?r:r.ownerDocument}function Qb(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 Kb(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 Np(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 Ip=null;function eL(){var r=window.event;return r&&r.type==="popstate"?r===Ip?!1:(Ip=r,!0):(Ip=null,!1)}var Zb=typeof setTimeout=="function"?setTimeout:void 0,rL=typeof clearTimeout=="function"?clearTimeout:void 0,Jb=typeof Promise=="function"?Promise:void 0,iL=typeof queueMicrotask=="function"?queueMicrotask:typeof Jb<"u"?function(r){return Jb.resolve(null).then(r).catch(aL)}:Zb;function aL(r){setTimeout(function(){throw r})}function sn(r){return r==="head"}function tC(r,n){var s=n,u=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(u===0){r.removeChild(m),fs(n);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Gl(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Gl(s);for(var b=s.firstChild;b;){var _=b.nextSibling,A=b.nodeName;b[qa]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=_}}else s==="body"&&Gl(r.ownerDocument.body);s=m}while(s);fs(n)}function eC(r,n){var s=r;r=0;do{var u=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=u}while(s)}function qp(r){var n=r.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":qp(s),dl(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function nL(r,n,s,u){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){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!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(n==="input"&&r.type==="hidden"){var b=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=fi(r.nextSibling),r===null)break}return null}function oL(r,n,s){if(n==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=fi(r.nextSibling),r===null))return null;return r}function rC(r,n){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!n||(r=fi(r.nextSibling),r===null))return null;return r}function jp(r){return r.data==="$?"||r.data==="$~"}function Hp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function sL(r,n){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=n;else if(r.data!=="$?"||s.readyState!=="loading")n();else{var u=function(){n(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function fi(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 Pp=null;function iC(r){r=r.nextSibling;for(var n=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(n===0)return fi(r.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}r=r.nextSibling}return null}function aC(r){r=r.previousSibling;for(var n=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return r;n--}else s!=="/$"&&s!=="/&"||n++}r=r.previousSibling}return null}function nC(r,n,s){switch(n=eu(s),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 Gl(r){for(var n=r.attributes;n.length;)r.removeAttributeNode(n[0]);dl(r)}var pi=new Map,oC=new Set;function ru(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ta=I.d;I.d={f:lL,r:cL,D:hL,C:uL,L:dL,m:fL,X:gL,S:pL,M:mL};function lL(){var r=Ta.f(),n=Gh();return r||n}function cL(r){var n=Ha(r);n!==null&&n.tag===5&&n.type==="form"?Sx(n):Ta.r(r)}var hs=typeof document>"u"?null:document;function sC(r,n,s){var u=hs;if(u&&typeof n=="string"&&n){var m=Fr(n);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),oC.has(m)||(oC.add(m),r={rel:r,crossOrigin:s,href:n},u.querySelector(m)===null&&(n=u.createElement("link"),lr(n,"link",r),Fe(n),u.head.appendChild(n)))}}function hL(r){Ta.D(r),sC("dns-prefetch",r,null)}function uL(r,n){Ta.C(r,n),sC("preconnect",r,n)}function dL(r,n,s){Ta.L(r,n,s);var u=hs;if(u&&r&&n){var m='link[rel="preload"][as="'+Fr(n)+'"]';n==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Fr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Fr(s.imageSizes)+'"]')):m+='[href="'+Fr(r)+'"]';var b=m;switch(n){case"style":b=us(r);break;case"script":b=ds(r)}pi.has(b)||(r=g({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:r,as:n},s),pi.set(b,r),u.querySelector(m)!==null||n==="style"&&u.querySelector(Vl(b))||n==="script"&&u.querySelector(Xl(b))||(n=u.createElement("link"),lr(n,"link",r),Fe(n),u.head.appendChild(n)))}}function fL(r,n){Ta.m(r,n);var s=hs;if(s&&r){var u=n&&typeof n.as=="string"?n.as:"script",m='link[rel="modulepreload"][as="'+Fr(u)+'"][href="'+Fr(r)+'"]',b=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=ds(r)}if(!pi.has(b)&&(r=g({rel:"modulepreload",href:r},n),pi.set(b,r),s.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Xl(b)))return}u=s.createElement("link"),lr(u,"link",r),Fe(u),s.head.appendChild(u)}}}function pL(r,n,s){Ta.S(r,n,s);var u=hs;if(u&&r){var m=Tr(u).hoistableStyles,b=us(r);n=n||"default";var _=m.get(b);if(!_){var A={loading:0,preload:null};if(_=u.querySelector(Vl(b)))A.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":n},s),(s=pi.get(b))&&Wp(r,s);var H=_=u.createElement("link");Fe(H),lr(H,"link",r),H._p=new Promise(function(et,ut){H.onload=et,H.onerror=ut}),H.addEventListener("load",function(){A.loading|=1}),H.addEventListener("error",function(){A.loading|=2}),A.loading|=4,iu(_,n,u)}_={type:"stylesheet",instance:_,count:1,state:A},m.set(b,_)}}}function gL(r,n){Ta.X(r,n);var s=hs;if(s&&r){var u=Tr(s).hoistableScripts,m=ds(r),b=u.get(m);b||(b=s.querySelector(Xl(m)),b||(r=g({src:r,async:!0},n),(n=pi.get(m))&&Up(r,n),b=s.createElement("script"),Fe(b),lr(b,"link",r),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(m,b))}}function mL(r,n){Ta.M(r,n);var s=hs;if(s&&r){var u=Tr(s).hoistableScripts,m=ds(r),b=u.get(m);b||(b=s.querySelector(Xl(m)),b||(r=g({src:r,async:!0,type:"module"},n),(n=pi.get(m))&&Up(r,n),b=s.createElement("script"),Fe(b),lr(b,"link",r),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(m,b))}}function lC(r,n,s,u){var m=(m=Ct.current)?ru(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=us(s.href),s=Tr(m).hoistableStyles,u=s.get(n),u||(u={type:"style",instance:null,count:0,state:null},s.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=us(s.href);var b=Tr(m).hoistableStyles,_=b.get(r);if(_||(m=m.ownerDocument||m,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,_),(b=m.querySelector(Vl(r)))&&!b._p&&(_.instance=b,_.state.loading=5),pi.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},pi.set(r,s),b||yL(m,r,s,_.state))),n&&u===null)throw Error(a(528,""));return _}if(n&&u!==null)throw Error(a(529,""));return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ds(s),s=Tr(m).hoistableScripts,u=s.get(n),u||(u={type:"script",instance:null,count:0,state:null},s.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function us(r){return'href="'+Fr(r)+'"'}function Vl(r){return'link[rel="stylesheet"]['+r+"]"}function cC(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function yL(r,n,s,u){r.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=r.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),lr(n,"link",s),Fe(n),r.head.appendChild(n))}function ds(r){return'[src="'+Fr(r)+'"]'}function Xl(r){return"script[async]"+r}function hC(r,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var u=r.querySelector('style[data-href~="'+Fr(s.href)+'"]');if(u)return n.instance=u,Fe(u),u;var m=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),Fe(u),lr(u,"style",m),iu(u,s.precedence,r),n.instance=u;case"stylesheet":m=us(s.href);var b=r.querySelector(Vl(m));if(b)return n.state.loading|=4,n.instance=b,Fe(b),b;u=cC(s),(m=pi.get(m))&&Wp(u,m),b=(r.ownerDocument||r).createElement("link"),Fe(b);var _=b;return _._p=new Promise(function(A,H){_.onload=A,_.onerror=H}),lr(b,"link",u),n.state.loading|=4,iu(b,s.precedence,r),n.instance=b;case"script":return b=ds(s.src),(m=r.querySelector(Xl(b)))?(n.instance=m,Fe(m),m):(u=s,(m=pi.get(b))&&(u=g({},s),Up(u,m)),r=r.ownerDocument||r,m=r.createElement("script"),Fe(m),lr(m,"link",u),r.head.appendChild(m),n.instance=m);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,iu(u,s.precedence,r));return n.instance}function iu(r,n,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,b=m,_=0;_<u.length;_++){var A=u[_];if(A.dataset.precedence===n)b=A;else if(b!==m)break}b?b.parentNode.insertBefore(r,b.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(r,n.firstChild))}function Wp(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.title==null&&(r.title=n.title)}function Up(r,n){r.crossOrigin==null&&(r.crossOrigin=n.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=n.referrerPolicy),r.integrity==null&&(r.integrity=n.integrity)}var au=null;function uC(r,n,s){if(au===null){var u=new Map,m=au=new Map;m.set(s,u)}else m=au,u=m.get(s),u||(u=new Map,m.set(s,u));if(u.has(r))return u;for(u.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var b=s[m];if(!(b[qa]||b[Ge]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(n)||"";_=r+_;var A=u.get(_);A?A.push(b):u.set(_,[b])}}return u}function dC(r,n,s){r=r.ownerDocument||r,r.head.insertBefore(s,n==="title"?r.querySelector("head > title"):null)}function xL(r,n,s){if(s===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 fC(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function bL(r,n,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=us(u.href),b=n.querySelector(Vl(m));if(b){n=b._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(r.count++,r=nu.bind(r),n.then(r,r)),s.state.loading|=4,s.instance=b,Fe(b);return}b=n.ownerDocument||n,u=cC(u),(m=pi.get(m))&&Wp(u,m),b=b.createElement("link"),Fe(b);var _=b;_._p=new Promise(function(A,H){_.onload=A,_.onerror=H}),lr(b,"link",u),s.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=nu.bind(r),n.addEventListener("load",s),n.addEventListener("error",s))}}var Yp=0;function CL(r,n){return r.stylesheets&&r.count===0&&su(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var u=setTimeout(function(){if(r.stylesheets&&su(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+n);0<r.imgBytes&&Yp===0&&(Yp=62500*tL());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&su(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>Yp?50:800)+n);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)su(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ou=null;function su(r,n){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ou=new Map,n.forEach(vL,r),ou=null,nu.call(r))}function vL(r,n){if(!(n.state.loading&4)){var s=ou.get(r);if(s)var u=s.get(null);else{s=new Map,ou.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<m.length;b++){var _=m[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(s.set(_.dataset.precedence,_),u=_)}u&&s.set(null,u)}m=n.instance,_=m.getAttribute("data-precedence"),b=s.get(_)||u,b===u&&s.set(null,m),s.set(_,m),this.count++,u=nu.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),b?b.parentNode.insertBefore(m,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),n.state.loading|=4}}var Ql={$$typeof:L,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function kL(r,n,s,u,m,b,_,A,H){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=$i(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$i(0),this.hiddenUpdates=$i(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function pC(r,n,s,u,m,b,_,A,H,et,ut,pt){return r=new kL(r,n,s,_,H,et,ut,pt,A),n=1,b===!0&&(n|=24),b=Kr(3,null,null,n),r.current=b,b.stateNode=r,n=Tf(),n.refCount++,r.pooledCache=n,n.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:n},Lf(b),r}function gC(r){return r?(r=Po,r):Po}function mC(r,n,s,u,m,b){m=gC(m),u.context===null?u.context=m:u.pendingContext=m,u=Xa(n),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=Qa(r,u,n),s!==null&&(jr(s,r,n),El(s,r,n))}function yC(r,n){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<n?s:n}}function Gp(r,n){yC(r,n),(r=r.alternate)&&yC(r,n)}function xC(r){if(r.tag===13||r.tag===31){var n=jn(r,67108864);n!==null&&jr(n,r,67108864),Gp(r,67108864)}}function bC(r){if(r.tag===13||r.tag===31){var n=ri();n=Do(n);var s=jn(r,n);s!==null&&jr(s,r,n),Gp(r,n)}}var lu=!0;function SL(r,n,s,u){var m=D.T;D.T=null;var b=I.p;try{I.p=2,Vp(r,n,s,u)}finally{I.p=b,D.T=m}}function wL(r,n,s,u){var m=D.T;D.T=null;var b=I.p;try{I.p=8,Vp(r,n,s,u)}finally{I.p=b,D.T=m}}function Vp(r,n,s,u){if(lu){var m=Xp(u);if(m===null)Fp(r,n,u,cu,s),vC(r,u);else if(_L(m,r,n,s,u))u.stopPropagation();else if(vC(r,u),n&4&&-1<TL.indexOf(r)){for(;m!==null;){var b=Ha(m);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=xi(b.pendingLanes);if(_!==0){var A=b;for(A.pendingLanes|=2,A.entangledLanes|=2;_;){var H=1<<31-ar(_);A.entanglements[1]|=H,_&=~H}Wi(b),(pe&6)===0&&(Uh=Ye()+500,Wl(0))}}break;case 31:case 13:A=jn(b,2),A!==null&&jr(A,b,2),Gh(),Gp(b,2)}if(b=Xp(u),b===null&&Fp(r,n,u,cu,s),b===m)break;m=b}m!==null&&u.stopPropagation()}else Fp(r,n,u,null,s)}}function Xp(r){return r=Qd(r),Qp(r)}var cu=null;function Qp(r){if(cu=null,r=ja(r),r!==null){var n=l(r);if(n===null)r=null;else{var s=n.tag;if(s===13){if(r=c(n),r!==null)return r;r=null}else if(s===31){if(r=h(n),r!==null)return r;r=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;r=null}else n!==r&&(r=null)}}return cu=r,null}function CC(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(na()){case _o:return 2;case Bo:return 8;case za:case nl:return 32;case oa:return 268435456;default:return 32}default:return 32}}var Kp=!1,ln=null,cn=null,hn=null,Kl=new Map,Zl=new Map,un=[],TL="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 vC(r,n){switch(r){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":hn=null;break;case"pointerover":case"pointerout":Kl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zl.delete(n.pointerId)}}function Jl(r,n,s,u,m,b){return r===null||r.nativeEvent!==b?(r={blockedOn:n,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[m]},n!==null&&(n=Ha(n),n!==null&&xC(n)),r):(r.eventSystemFlags|=u,n=r.targetContainers,m!==null&&n.indexOf(m)===-1&&n.push(m),r)}function _L(r,n,s,u,m){switch(n){case"focusin":return ln=Jl(ln,r,n,s,u,m),!0;case"dragenter":return cn=Jl(cn,r,n,s,u,m),!0;case"mouseover":return hn=Jl(hn,r,n,s,u,m),!0;case"pointerover":var b=m.pointerId;return Kl.set(b,Jl(Kl.get(b)||null,r,n,s,u,m)),!0;case"gotpointercapture":return b=m.pointerId,Zl.set(b,Jl(Zl.get(b)||null,r,n,s,u,m)),!0}return!1}function kC(r){var n=ja(r.target);if(n!==null){var s=l(n);if(s!==null){if(n=s.tag,n===13){if(n=c(s),n!==null){r.blockedOn=n,Ia(r.priority,function(){bC(s)});return}}else if(n===31){if(n=h(s),n!==null){r.blockedOn=n,Ia(r.priority,function(){bC(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function hu(r){if(r.blockedOn!==null)return!1;for(var n=r.targetContainers;0<n.length;){var s=Xp(r.nativeEvent);if(s===null){s=r.nativeEvent;var u=new s.constructor(s.type,s);Xe=u,s.target.dispatchEvent(u),Xe=null}else return n=Ha(s),n!==null&&xC(n),r.blockedOn=s,!1;n.shift()}return!0}function SC(r,n,s){hu(r)&&s.delete(n)}function BL(){Kp=!1,ln!==null&&hu(ln)&&(ln=null),cn!==null&&hu(cn)&&(cn=null),hn!==null&&hu(hn)&&(hn=null),Kl.forEach(SC),Zl.forEach(SC)}function uu(r,n){r.blockedOn===n&&(r.blockedOn=null,Kp||(Kp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BL)))}var du=null;function wC(r){du!==r&&(du=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){du===r&&(du=null);for(var n=0;n<r.length;n+=3){var s=r[n],u=r[n+1],m=r[n+2];if(typeof u!="function"){if(Qp(u||s)===null)continue;break}var b=Ha(s);b!==null&&(r.splice(n,3),n-=3,Xf(b,{pending:!0,data:m,method:s.method,action:u},u,m))}}))}function fs(r){function n(H){return uu(H,r)}ln!==null&&uu(ln,r),cn!==null&&uu(cn,r),hn!==null&&uu(hn,r),Kl.forEach(n),Zl.forEach(n);for(var s=0;s<un.length;s++){var u=un[s];u.blockedOn===r&&(u.blockedOn=null)}for(;0<un.length&&(s=un[0],s.blockedOn===null);)kC(s),s.blockedOn===null&&un.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var m=s[u],b=s[u+1],_=m[Jt]||null;if(typeof b=="function")_||wC(s);else if(_){var A=null;if(b&&b.hasAttribute("formAction")){if(m=b,_=b[Jt]||null)A=_.formAction;else if(Qp(m)!==null)continue}else A=_.action;typeof A=="function"?s[u+1]=A:(s.splice(u,3),u-=3),wC(s)}}}function TC(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return m=_})},focusReset:"manual",scroll:"manual"})}function n(){m!==null&&(m(),m=null),u||setTimeout(s,20)}function s(){if(!u&&!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 u=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),m!==null&&(m(),m=null)}}}function Zp(r){this._internalRoot=r}fu.prototype.render=Zp.prototype.render=function(r){var n=this._internalRoot;if(n===null)throw Error(a(409));var s=n.current,u=ri();mC(s,u,r,n,null,null)},fu.prototype.unmount=Zp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var n=r.containerInfo;mC(r.current,2,null,r,null,null),Gh(),n[Vr]=null}};function fu(r){this._internalRoot=r}fu.prototype.unstable_scheduleHydration=function(r){if(r){var n=th();r={blockedOn:null,target:r,priority:n};for(var s=0;s<un.length&&n!==0&&n<un[s].priority;s++);un.splice(s,0,r),s===0&&kC(r)}};var _C=t.version;if(_C!=="19.2.7")throw Error(a(527,_C,"19.2.7"));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 EL={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pu.isDisabled&&pu.supportsFiber)try{Oa=pu.inject(EL),mr=pu}catch{}}return ec.createRoot=function(r,n){if(!o(r))throw Error(a(299));var s=!1,u="",m=Rx,b=Fx,_=zx;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(m=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(_=n.onRecoverableError)),n=pC(r,1,!1,null,null,s,u,null,m,b,_,TC),r[Vr]=n.current,Rp(r),new Zp(n)},ec.hydrateRoot=function(r,n,s){if(!o(r))throw Error(a(299));var u=!1,m="",b=Rx,_=Fx,A=zx,H=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(A=s.onRecoverableError),s.formState!==void 0&&(H=s.formState)),n=pC(r,1,!0,n,s??null,u,m,H,b,_,A,TC),n.context=gC(null),s=n.current,u=ri(),u=Do(u),m=Xa(u),m.callback=null,Qa(s,m,u),s=u,n.current.lanes=s,sa(n,s),Wi(n),r[Vr]=n.current,Rp(r),new fu(n)},ec.version="19.2.7",ec}var OC;function jL(){if(OC)return eg.exports;OC=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(),eg.exports=qL(),eg.exports}var HL=jL();const I1={view:"Welcome",connectionType:null,activeFlow:null,progress:null,formSections:null,tableGroups:null,result:null,readinessResult:null,error:null,fabricForm:null};function $C(e){switch(e){case"fabric":return"FabricDialog";case"local":return"LocalDialog";case"pbip":return"PBIPDialog";case"update":return"UpdateDialog"}}function PL(e,t){switch(t.type){case"selectConnection":return{...e,view:$C(t.payload),connectionType:t.payload,activeFlow:"documentation",error:null};case"goBack":return{...e,view:"Welcome",error:null};case"startProgress":return{...e,view:"Progress",progress:{percent:0,message:"",phase:"connecting"},error:null};case"progressUpdate":return{...e,progress:t.payload};case"showForm":return{...e,view:"FormView",formSections:t.payload.sections,tableGroups:t.payload.tableGroups,progress:null,error:null};case"showResult":return{...e,view:"ResultView",result:t.payload,error:null};case"showImprint":return{...e,view:"ImprintView",error:null};case"showChangelog":return{...e,view:"ChangelogView",error:null};case"showTemplateEditor":return{...e,view:"TemplateEditor",error:null};case"showDiffView":return{...e,view:"DiffView",error:null};case"startWorkspace":return{...e,view:"Workspace",connectionType:"fabric",activeFlow:"documentation",error:null};case"startElementFlow":return{...e,view:"ElementFlow",connectionType:"fabric",activeFlow:"documentation",error:null};case"startReadiness":return{...e,view:"PBIPDialog",connectionType:null,activeFlow:"readiness",error:null,readinessResult:null};case"showReadinessResult":return{...e,view:"ReadinessResult",readinessResult:t.payload,progress:null,error:null};case"showError":return{...e,error:t.payload};case"setFabricForm":return{...e,fabricForm:t.payload};case"connectionFailed":return{...e,view:$C(t.payload.connectionType),connectionType:t.payload.connectionType,progress:null,error:t.payload.error};case"reset":return{...I1};default:return e}}const q1=gt.createContext(null),j1=gt.createContext(null);function WL({children:e}){const[t,i]=gt.useReducer(PL,I1);return w.jsx(q1.Provider,{value:t,children:w.jsx(j1.Provider,{value:i,children:e})})}function _n(){const e=gt.useContext(q1);if(e===null)throw new Error("useAppState must be used within an AppProvider");return e}function Mr(){const e=gt.useContext(j1);if(e===null)throw new Error("useAppDispatch must be used within an AppProvider");return e}const UL={"app.title":"PBI Documentation by Oliver Gropp","welcome.subtitle":"Bitte wählen Sie eine Verbindungsmethode:","connection.fabric":"Fabric Service","connection.fabric.desc":"Verbindung zum Microsoft Fabric Service herstellen","connection.local":"Lokaler Bericht","connection.local.desc":"Verbindung zu einem lokal geöffneten Power BI Bericht","connection.pbip":"PBIP-Projekt","connection.pbip.desc":"Metadaten aus einem Power BI Project-Ordner lesen","connection.update":"Bestehende Dokumentation aktualisieren","connection.update.desc":"Eine vorhandene Dokumentation laden und aktualisieren","status.ready":"Bereit – Bitte wählen Sie eine Verbindungsmethode","progress.connecting":"Verbinde …","progress.extracting":"Metadaten werden extrahiert …","progress.mapping":"Platzhalter werden zugeordnet …","progress.categorizing":"Kategorisierung …","form.save":"Dokumentation speichern","form.ignoreRequired":"Pflichtfelder ignorieren","form.summary.auto":"automatisch","form.summary.manual":"manuell","form.summary.partial":"teilweise","form.autoLabel":"(auto)","form.saving":"Speichern …","form.noTableData":"Keine Einträge vorhanden. Klicken Sie auf „Tabelle bearbeiten“ um Daten einzugeben.","result.success":"Dokumentation erfolgreich erstellt!","result.openFile":"Datei öffnen","result.newDoc":"Neue Dokumentation","result.outputPath":"Ausgabepfad:","result.version":"Version","result.changesCount":"Änderungen","result.openError":"Datei konnte nicht geöffnet werden:","result.exportPdf":"Als PDF exportieren","result.pdfExporting":"PDF wird erstellt …","result.pdfSuccess":"PDF gespeichert:","result.exportHtml":"Als HTML exportieren","result.htmlExporting":"HTML wird erstellt …","result.htmlSuccess":"HTML gespeichert:","result.preview":"Vorschau anzeigen","result.previewTitle":"Dokument-Vorschau","result.previewClose":"Schließen","result.previewLoading":"Vorschau wird geladen …","result.previewError":"Vorschau konnte nicht geladen werden:","templateEditor.button":"Vorlage anpassen","templateEditor.title":"Dokumentationsvorlage anpassen","templateEditor.save":"Speichern","templateEditor.saving":"Wird gespeichert …","templateEditor.saved":"Vorlage erfolgreich gespeichert.","templateEditor.loading":"Vorlage wird geladen …","templateEditor.select":"Vorlage:","templateEditor.hint":"Kapitel aktivieren/deaktivieren, umbenennen (Klick auf Titel) oder per Pfeile verschieben.","templateEditor.toggle":"Kapitel ein-/ausblenden","templateEditor.clickToRename":"Klicken zum Umbenennen","templateEditor.moveUp":"Nach oben","templateEditor.moveDown":"Nach unten","templateEditor.params":"Parameter","templateEditor.removeParam":"Parameter entfernen","templateEditor.addParam":"Hinzufügen","templateEditor.newParamPlaceholder":"Neuer Parameter-Name …","diff.button":"Versionen vergleichen","diff.title":"Versionen vergleichen","diff.oldVersion":"Alte Version","diff.newVersion":"Neue Version","diff.selectFile":"Datei auswählen …","diff.compare":"Vergleichen","diff.comparing":"Wird verglichen …","diff.summary":"Änderungen","diff.changes":"geänderte Zeilen","diff.identical":"Die Dateien sind identisch.","diff.viewRendered":"Gerendert","diff.viewCode":"Markdown","dialog.back":"Zurück","dialog.connect":"Verbinden","error.timeout":"Die Operation hat das Zeitlimit überschritten. Bitte versuchen Sie es erneut.","error.unexpected":"Ein unerwarteter Fehler ist aufgetreten.","tableEditor.title":"Tabelle bearbeiten","tableEditor.addRow":"Zeile hinzufügen","tableEditor.deleteRow":"Letzte Zeile löschen","tableEditor.save":"Speichern","tableEditor.cancel":"Abbrechen","changes.title":"Erkannte Änderungen","changes.noChanges":"Keine Unterschiede festgestellt.","changes.apply":"Änderungen übernehmen","changes.columnField":"Feld","changes.columnOldValue":"Alter Wert","changes.columnNewValue":"Neuer Wert","changes.columnType":"Typ","pbip.title":"PBIP-Projekt verbinden","pbip.selectFolder":"Ordner auswählen","pbip.selectedPath":"Gewählter Pfad:","pbip.noFolder":"Kein Ordner ausgewählt","local.discover":"Berichte suchen","local.searching":"Suche läuft …","local.selectInstance":"Erkannte Berichte:","local.noInstances":"Keine geöffneten Power BI Berichte gefunden.","update.selectFile":"Markdown-Datei auswählen","update.loading":"Dokument wird geladen …","update.version":"Version","update.lastUpdated":"Letzte Aktualisierung","update.continue":"Weiter zur Re-Extraktion","fabric.tenantId":"Tenant-ID","fabric.tenantId.placeholder":"z. B. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","fabric.workspaceId":"Workspace-ID","fabric.workspaceId.placeholder":"Workspace-ID eingeben","fabric.datasetId":"Dataset-ID","fabric.datasetId.placeholder":"Dataset-ID eingeben","fabric.reportId":"Report-ID","fabric.reportId.placeholder":"Report-ID eingeben (optional)","fabric.reportId.hint":"Optional – nur erforderlich für berichtsspezifische Visuals","fabric.clientId":"Client-ID","fabric.clientId.placeholder":"App-Registrierungs-Client-ID","fabric.clientSecret":"Client-Secret","fabric.clientSecret.placeholder":"App-Registrierungs-Client-Secret","fabric.advanced":"Erweiterte Einstellungen","fabric.connecting":"Verbinde …","fabric.error.workspaceRequired":"Workspace-ID darf nicht leer sein","fabric.error.datasetRequired":"Dataset-ID darf nicht leer sein","imprint.heading":"Impressum","imprint.tooltip":"Impressum","imprint.deps.heading":"Abhängigkeiten / Voraussetzungen","imprint.dep.python.name":"Python (≥ 3.10)","imprint.dep.python.desc":"Laufzeitumgebung für die Metadaten-Extraktion und Dokumentgenerierung","imprint.dep.powerbi.name":"Power BI Desktop","imprint.dep.powerbi.desc":"Muss installiert sein, damit lokale Berichte erkannt und analysiert werden können","imprint.dep.adomd.name":"ADOMD.NET Client Libraries","imprint.dep.adomd.desc":"Werden für die Verbindung zum Analysis-Services-Modell des lokalen Berichts benötigt","imprint.dep.pythonnet.name":"pythonnet","imprint.dep.pythonnet.desc":"Python-zu-.NET-Bridge für den Zugriff auf die ADOMD.NET-Bibliotheken","imprint.dep.fabric.name":"Microsoft Fabric-Zugang","imprint.dep.fabric.desc":"Erforderlich für die Fabric-Verbindungsmethode (Workspace- und Dataset-Zugriff)","imprint.dep.msal.name":"MSAL (Microsoft Authentication Library)","imprint.dep.msal.desc":"Wird für die OAuth2-Authentifizierung bei Microsoft Fabric verwendet","imprint.fields.heading":"Pflichtfelder der Dokumentationsvorlage","imprint.fields.empty":"In der aktuellen Vorlage sind keine Pflichtfelder definiert.","imprint.fields.group.META_":"Meta-Informationen","imprint.fields.group.KONTAKT_":"Kontaktdaten","imprint.fields.group.BIZ_":"Business-Kontext","imprint.fields.group.KPI_":"Kennzahlen (KPIs)","imprint.fields.group.GLOSSAR_":"Glossar","imprint.fields.group.DS_":"Datenquellen","imprint.fields.group.PQ_":"Power Query","imprint.fields.group.PQT_":"Power Query Transformationen","imprint.fields.group.PARAM_":"Parameter","imprint.fields.group.COL_":"Spalten","imprint.fields.group.MODELL_":"Datenmodell","imprint.fields.group.DAX_":"DAX-Measures","imprint.fields.group.TBLTYP_":"Tabellentypen","imprint.fields.group.REL_":"Beziehungen","imprint.fields.group.RLS_":"Row-Level Security","imprint.fields.group.SEC_":"Sicherheit","imprint.fields.group.REFRESH_":"Aktualisierung","imprint.fields.group.OPS_":"Betrieb / Operations","imprint.fields.group.VER_":"Versionierung","imprint.fields.group.LOG_":"Protokoll / Changelog","imprint.fields.group.REVIEW_":"Review / Freigabe","imprint.template.heading":"Vorlage anpassen","imprint.template.step1":"Kopieren Sie die Vorlagendatei (template.md) neben die ausführbare Datei.","imprint.template.step2":"Bearbeiten Sie die Kopie mit einem beliebigen Texteditor.","imprint.template.step3":"Starten Sie die Anwendung neu, damit die geänderte Vorlage verwendet wird.","imprint.template.naming":"Platzhalter folgen dem Format {{PREFIX_Name}}. Das Präfix bestimmt die Formularkategorie, der Name wird als Feldbezeichnung angezeigt.","imprint.template.custom":"Eigene Platzhalter verwenden das Präfix CUSTOM_, z. B. {{CUSTOM_MeinFeld}}. Sie erscheinen automatisch als Eingabefelder im Formular.","imprint.author.heading":"Autor","imprint.author.linkedin":"LinkedIn-Profil","imprint.author.website":"Webseite","imprint.error.openUrl":"Der Link konnte nicht geöffnet werden.","readiness.button":"Fabric IQ Readiness","readiness.hint":"Analysiert die Fabric-IQ-Readiness eines PBIP-Ordners","readiness.title":"Readiness-Analyse abgeschlossen","readiness.openFile":"Datei öffnen","readiness.backHome":"Zurück zur Startseite","readiness.filePath":"Bericht gespeichert unter:","readiness.errorOpen":"Datei konnte nicht geöffnet werden","changelog.button":"Changelog","changelog.tooltip":"Versionshistorie / Release Notes anzeigen","changelog.heading":"Changelog / Release Notes","changelog.currentVersion":"Aktuelle Version","changelog.empty":"Es sind noch keine Einträge vorhanden.","changelog.type.added":"Neu","changelog.type.changed":"Geändert","changelog.type.fixed":"Behoben","changelog.type.removed":"Entfernt","connection.workspace":"Kompletter Workspace","connection.workspace.desc":"Alle Berichte und Semantic Models eines Fabric-Workspaces dokumentieren","workspace.dialog.title":"Fabric-Workspace dokumentieren","workspace.dialog.desc":"Verbinden Sie sich mit einem Workspace, um alle enthaltenen Semantic Models und Berichte zu dokumentieren.","workspace.targetFolder":"Zielordner","workspace.selectFolder":"Ordner auswählen","workspace.noFolder":"Kein Ordner ausgewählt","workspace.onlyWorkspace":"Nur Workspace-Übersicht erstellen","workspace.onlyWorkspace.hint":"ohne Berichte und Semantic Models","workspace.start":"Workspace analysieren","workspace.cancel":"Abbrechen","workspace.error.workspaceRequired":"Workspace-ID darf nicht leer sein","workspace.error.tenantRequired":"Tenant-ID darf nicht leer sein","workspace.error.folderRequired":"Bitte wählen Sie einen Zielordner","workspace.busy.enumerating":"Workspace wird analysiert …","workspace.busy.extracting":"Metadaten werden extrahiert …","workspace.busy.generating":"Dokumente werden erzeugt …","workspace.items.title":"Gefundene Elemente","workspace.items.models":"Semantic Models","workspace.items.reports":"Berichte","workspace.items.other":"Sonstige","workspace.items.users":"Benutzer/Gruppen","workspace.items.colName":"Name","workspace.items.colType":"Typ","workspace.items.colReports":"Berichte","workspace.items.continue":"Extrahieren & Dokumentieren","workspace.form.doc":"Dokument","workspace.form.skip":"Überspringen","workspace.form.apply":"Übernehmen & Weiter","workspace.form.applyLast":"Übernehmen & Abschließen","workspace.result.title":"Workspace-Dokumentation erstellt!","workspace.result.outputDir":"Ausgabeordner:","workspace.result.files":"Dateien","workspace.result.errors":"Fehler","workspace.result.openOverview":"Übersicht öffnen","workspace.result.openLog":"Fehler-Log öffnen","workspace.result.backHome":"Zurück zur Startseite","element.button":"Andere Fabric-Elemente dokumentieren","element.button.hint":"Einzelne Fabric-Elemente (z. B. Dataflows, Notebooks, Copyjobs, Data Pipelines, Lakehouses, Warehouses, Eventhouses, Dashboards, KQL-Datenbanken, SQL Databases, Environments, Mirrored Databases, Eventstreams, Spark Job Definitions, KQL-Querysets, Reflexe, GraphQL APIs) gezielt über ihre ID dokumentieren","element.dialog.title":"Fabric-Element dokumentieren","element.dialog.desc":"Wählen Sie Workspace und Elementtyp und geben Sie die Element-ID an.","element.type":"Elementtyp","element.generation":"Generation","element.generation.hint":"Gen1 (Power BI) oder Gen2 (Fabric) Dataflow","element.id":"Element-ID","element.id.placeholder":"z. B. Objekt-/Item-ID des Elements","element.id.hint":"Die ID finden Sie in der URL des Elements im Fabric-Portal.","element.update":"Bestehende Dokumentation aktualisieren","element.update.hint":"manuelle Abschnitte bleiben erhalten, Version & Änderungsprotokoll werden fortgeschrieben","element.existingDoc":"Bestehende Dokumentation","element.selectDoc":"Datei wählen","element.noDoc":"Keine Datei ausgewählt","element.submit":"Dokumentieren","element.submitUpdate":"Aktualisieren","element.busy":"Element wird dokumentiert …","element.error.workspaceRequired":"Workspace-ID darf nicht leer sein","element.error.tenantRequired":"Tenant-ID darf nicht leer sein","element.error.idRequired":"Element-ID darf nicht leer sein","element.error.folderRequired":"Bitte wählen Sie einen Zielordner","element.error.docRequired":"Bitte wählen Sie die zu aktualisierende Dokumentation","element.result.title":"Element-Dokumentation erstellt!","element.result.titleUpdate":"Element-Dokumentation aktualisiert!","element.result.outputPath":"Ausgabedatei:","element.result.type":"Typ","element.result.generation":"Generation","element.result.entities":"Entitäten","element.result.cells":"Zellen","element.result.objects":"Objekte","element.result.tables":"Tabellen","element.result.databases":"KQL-Datenbanken","element.result.activities":"Aktivitäten","element.result.tiles":"Kacheln","element.result.libraries":"Bibliotheken","element.result.nodes":"Knoten","element.result.queries":"Abfragen","element.result.rules":"Regeln","element.result.datasources":"Datenquellen","element.result.version":"Version","element.result.changes":"Änderungen","element.result.open":"Dokument öffnen","element.result.another":"Weiteres Element"},YL={"app.title":"PBI Documentation by Oliver Gropp","welcome.subtitle":"Please select a connection method:","connection.fabric":"Fabric Service","connection.fabric.desc":"Connect to the Microsoft Fabric Service","connection.local":"Local Report","connection.local.desc":"Connect to a locally opened Power BI report","connection.pbip":"PBIP Project","connection.pbip.desc":"Read metadata from a Power BI Project folder","connection.update":"Update Existing Documentation","connection.update.desc":"Load and update an existing documentation file","status.ready":"Ready – Please select a connection method","progress.connecting":"Connecting …","progress.extracting":"Extracting metadata …","progress.mapping":"Mapping placeholders …","progress.categorizing":"Categorizing …","form.save":"Save Documentation","form.ignoreRequired":"Ignore required fields","form.summary.auto":"automatic","form.summary.manual":"manual","form.summary.partial":"partial","form.autoLabel":"(auto)","form.saving":"Saving …","form.noTableData":'No entries. Click "Edit Table" to add data.',"result.success":"Documentation created successfully!","result.openFile":"Open File","result.newDoc":"New Documentation","result.outputPath":"Output path:","result.version":"Version","result.changesCount":"Changes","result.openError":"Failed to open file:","result.exportPdf":"Export as PDF","result.pdfExporting":"Creating PDF …","result.pdfSuccess":"PDF saved:","result.exportHtml":"Export as HTML","result.htmlExporting":"Creating HTML …","result.htmlSuccess":"HTML saved:","result.preview":"Show Preview","result.previewTitle":"Document Preview","result.previewClose":"Close","result.previewLoading":"Loading preview …","result.previewError":"Could not load preview:","templateEditor.button":"Edit Template","templateEditor.title":"Customize Documentation Template","templateEditor.save":"Save","templateEditor.saving":"Saving …","templateEditor.saved":"Template saved successfully.","templateEditor.loading":"Loading template …","templateEditor.select":"Template:","templateEditor.hint":"Enable/disable chapters, rename (click title), or reorder with arrows.","templateEditor.toggle":"Toggle chapter","templateEditor.clickToRename":"Click to rename","templateEditor.moveUp":"Move up","templateEditor.moveDown":"Move down","templateEditor.params":"Parameters","templateEditor.removeParam":"Remove parameter","templateEditor.addParam":"Add","templateEditor.newParamPlaceholder":"New parameter name …","diff.button":"Compare Versions","diff.title":"Compare Versions","diff.oldVersion":"Old Version","diff.newVersion":"New Version","diff.selectFile":"Select file …","diff.compare":"Compare","diff.comparing":"Comparing …","diff.summary":"Changes","diff.changes":"changed lines","diff.identical":"The files are identical.","diff.viewRendered":"Rendered","diff.viewCode":"Markdown","dialog.back":"Back","dialog.connect":"Connect","error.timeout":"The operation timed out. Please try again.","error.unexpected":"An unexpected error occurred.","tableEditor.title":"Edit Table","tableEditor.addRow":"Add Row","tableEditor.deleteRow":"Delete Last Row","tableEditor.save":"Save","tableEditor.cancel":"Cancel","changes.title":"Detected Changes","changes.noChanges":"No differences detected.","changes.apply":"Apply Changes","changes.columnField":"Field","changes.columnOldValue":"Old Value","changes.columnNewValue":"New Value","changes.columnType":"Type","pbip.title":"Connect PBIP Project","pbip.selectFolder":"Select Folder","pbip.selectedPath":"Selected path:","pbip.noFolder":"No folder selected","local.discover":"Discover Reports","local.searching":"Searching …","local.selectInstance":"Detected reports:","local.noInstances":"No open Power BI reports found.","update.selectFile":"Select Markdown file","update.loading":"Loading document …","update.version":"Version","update.lastUpdated":"Last updated","update.continue":"Continue to re-extraction","fabric.tenantId":"Tenant ID","fabric.tenantId.placeholder":"e.g. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","fabric.workspaceId":"Workspace ID","fabric.workspaceId.placeholder":"Enter Workspace ID","fabric.datasetId":"Dataset ID","fabric.datasetId.placeholder":"Enter Dataset ID","fabric.reportId":"Report ID","fabric.reportId.placeholder":"Enter Report ID (optional)","fabric.reportId.hint":"Optional – only required for report-specific visuals","fabric.clientId":"Client ID","fabric.clientId.placeholder":"App registration Client ID","fabric.clientSecret":"Client Secret","fabric.clientSecret.placeholder":"App registration Client Secret","fabric.advanced":"Advanced Settings","fabric.connecting":"Connecting …","fabric.error.workspaceRequired":"Workspace ID must not be empty","fabric.error.datasetRequired":"Dataset ID must not be empty","imprint.heading":"Imprint","imprint.tooltip":"Imprint","imprint.deps.heading":"Dependencies & Prerequisites","imprint.dep.python.name":"Python 3.10+","imprint.dep.python.desc":"Required runtime for backend extraction logic","imprint.dep.powerbi.name":"Power BI Desktop","imprint.dep.powerbi.desc":"Must be installed for local report connections","imprint.dep.adomd.name":"ADOMD.NET Client Libraries","imprint.dep.adomd.desc":"Required for Analysis Services data access","imprint.dep.pythonnet.name":"pythonnet","imprint.dep.pythonnet.desc":"Python/.NET interop bridge for ADOMD access","imprint.dep.fabric.name":"Microsoft Fabric Access","imprint.dep.fabric.desc":"Service principal or user credentials for Fabric connections","imprint.dep.msal.name":"MSAL (Microsoft Authentication Library)","imprint.dep.msal.desc":"Handles OAuth2 authentication for Fabric and Azure AD","imprint.fields.heading":"Required Template Fields","imprint.fields.empty":"No mandatory fields are defined in the current template.","imprint.fields.group.META_":"META_ – Metadata","imprint.fields.group.KONTAKT_":"KONTAKT_ – Contact Information","imprint.fields.group.BIZ_":"BIZ_ – Business Context","imprint.fields.group.KPI_":"KPI_ – Key Performance Indicators","imprint.fields.group.GLOSSAR_":"GLOSSAR_ – Glossary","imprint.fields.group.DS_":"DS_ – Data Sources","imprint.fields.group.PQ_":"PQ_ – Power Query","imprint.fields.group.PQT_":"PQT_ – Power Query Tables","imprint.fields.group.PARAM_":"PARAM_ – Parameters","imprint.fields.group.COL_":"COL_ – Columns","imprint.fields.group.MODELL_":"MODELL_ – Data Model","imprint.fields.group.DAX_":"DAX_ – DAX Measures","imprint.fields.group.TBLTYP_":"TBLTYP_ – Table Types","imprint.fields.group.REL_":"REL_ – Relationships","imprint.fields.group.RLS_":"RLS_ – Row-Level Security","imprint.fields.group.SEC_":"SEC_ – Security","imprint.fields.group.REFRESH_":"REFRESH_ – Data Refresh","imprint.fields.group.OPS_":"OPS_ – Operations","imprint.fields.group.VER_":"VER_ – Versioning","imprint.fields.group.LOG_":"LOG_ – Change Log","imprint.fields.group.REVIEW_":"REVIEW_ – Review","imprint.template.heading":"Customize Template","imprint.template.step1":"Copy the template file next to the executable.","imprint.template.step2":"Edit the copy with any text editor.","imprint.template.step3":"Restart the application to use the modified template.","imprint.template.naming":"Placeholders use the format {{PREFIX_Name}}. The prefix determines the form category, and the name portion becomes the field label.","imprint.template.custom":"Use the CUSTOM_ prefix to add your own placeholders (e.g. {{CUSTOM_MyField}}). Custom placeholders appear automatically as input fields in the form.","imprint.author.heading":"Author","imprint.author.linkedin":"LinkedIn Profile","imprint.author.website":"Website","imprint.error.openUrl":"The link could not be opened in the browser.","readiness.button":"Fabric IQ Readiness","readiness.hint":"Analyzes Fabric IQ readiness of a PBIP folder","readiness.title":"Readiness analysis complete","readiness.openFile":"Open file","readiness.backHome":"Back to home","readiness.filePath":"Report saved at:","readiness.errorOpen":"Could not open file","changelog.button":"Changelog","changelog.tooltip":"Show version history / release notes","changelog.heading":"Changelog / Release Notes","changelog.currentVersion":"Current version","changelog.empty":"There are no entries yet.","changelog.type.added":"Added","changelog.type.changed":"Changed","changelog.type.fixed":"Fixed","changelog.type.removed":"Removed","connection.workspace":"Entire Workspace","connection.workspace.desc":"Document all reports and semantic models of a Fabric workspace","workspace.dialog.title":"Document Fabric Workspace","workspace.dialog.desc":"Connect to a workspace to document all contained semantic models and reports.","workspace.targetFolder":"Target folder","workspace.selectFolder":"Select folder","workspace.noFolder":"No folder selected","workspace.onlyWorkspace":"Create workspace overview only","workspace.onlyWorkspace.hint":"without reports and semantic models","workspace.start":"Analyze workspace","workspace.cancel":"Cancel","workspace.error.workspaceRequired":"Workspace ID must not be empty","workspace.error.tenantRequired":"Tenant ID must not be empty","workspace.error.folderRequired":"Please select a target folder","workspace.busy.enumerating":"Analyzing workspace …","workspace.busy.extracting":"Extracting metadata …","workspace.busy.generating":"Generating documents …","workspace.items.title":"Discovered items","workspace.items.models":"Semantic Models","workspace.items.reports":"Reports","workspace.items.other":"Other","workspace.items.users":"Users/Groups","workspace.items.colName":"Name","workspace.items.colType":"Type","workspace.items.colReports":"Reports","workspace.items.continue":"Extract & Document","workspace.form.doc":"Document","workspace.form.skip":"Skip","workspace.form.apply":"Apply & Next","workspace.form.applyLast":"Apply & Finish","workspace.result.title":"Workspace documentation created!","workspace.result.outputDir":"Output folder:","workspace.result.files":"Files","workspace.result.errors":"Errors","workspace.result.openOverview":"Open overview","workspace.result.openLog":"Open error log","workspace.result.backHome":"Back to start","element.button":"Document other Fabric elements","element.button.hint":"Document individual Fabric elements (e.g. dataflows, notebooks, copy jobs, data pipelines, lakehouses, warehouses, eventhouses, dashboards, KQL databases, SQL databases, environments, mirrored databases, eventstreams, Spark job definitions, KQL querysets, reflexes, GraphQL APIs) specifically by their ID","element.dialog.title":"Document Fabric element","element.dialog.desc":"Select a workspace and element type, then enter the element ID.","element.type":"Element type","element.generation":"Generation","element.generation.hint":"Gen1 (Power BI) or Gen2 (Fabric) dataflow","element.id":"Element ID","element.id.placeholder":"e.g. object/item ID of the element","element.id.hint":"You can find the ID in the element's URL in the Fabric portal.","element.update":"Update existing documentation","element.update.hint":"manual sections are preserved, version & change log are carried forward","element.existingDoc":"Existing documentation","element.selectDoc":"Select file","element.noDoc":"No file selected","element.submit":"Document","element.submitUpdate":"Update","element.busy":"Documenting element …","element.error.workspaceRequired":"Workspace ID must not be empty","element.error.tenantRequired":"Tenant ID must not be empty","element.error.idRequired":"Element ID must not be empty","element.error.folderRequired":"Please select a target folder","element.error.docRequired":"Please select the documentation to update","element.result.title":"Element documentation created!","element.result.titleUpdate":"Element documentation updated!","element.result.outputPath":"Output file:","element.result.type":"Type","element.result.generation":"Generation","element.result.entities":"Entities","element.result.cells":"Cells","element.result.objects":"Objects","element.result.tables":"Tables","element.result.databases":"KQL databases","element.result.activities":"Activities","element.result.tiles":"Tiles","element.result.libraries":"Libraries","element.result.nodes":"Nodes","element.result.queries":"Queries","element.result.rules":"Rules","element.result.datasources":"Data sources","element.result.version":"Version","element.result.changes":"Changes","element.result.open":"Open document","element.result.another":"Another element"},NC={de:UL,en:YL},H1="en",GL=NC[H1]??NC.de;function Ue(){function e(t){return GL[t]??t}return{t:e,locale:H1}}function gu({children:e,onClick:t,className:i=""}){function a(o){o.key==="Enter"&&t&&t()}return w.jsx("div",{role:"button",tabIndex:0,className:`card-component ${i}`,onClick:t,onKeyDown:a,style:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-lg)",border:"2px solid transparent",cursor:t?"pointer":"default",transition:"box-shadow var(--transition-normal), border-color var(--transition-normal)"},onMouseEnter:o=>{o.currentTarget.style.borderColor="var(--color-primary)",o.currentTarget.style.boxShadow="var(--shadow-elevated)"},onMouseLeave:o=>{o.currentTarget.style.borderColor="transparent",o.currentTarget.style.boxShadow="var(--shadow-card)"},children:e})}function VL(){return w.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("text",{x:"10",y:"14.5",textAnchor:"middle",fontSize:"12",fill:"currentColor",fontFamily:"serif",fontWeight:"bold",children:"i"})]})}const XL=[{type:"fabric",titleKey:"connection.fabric",descKey:"connection.fabric.desc"},{type:"local",titleKey:"connection.local",descKey:"connection.local.desc"},{type:"pbip",titleKey:"connection.pbip",descKey:"connection.pbip.desc"},{type:"update",titleKey:"connection.update",descKey:"connection.update.desc"}];function QL(){const{t:e}=Ue(),t=Mr();function i(a){t({type:"selectConnection",payload:a})}return w.jsxs("main",{style:{position:"relative",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},children:[w.jsx("img",{src:"./images/LogoBlack.png",alt:"Logo",style:{height:"80px",marginBottom:"var(--spacing-md)"}}),w.jsx("h1",{style:{marginBottom:"var(--spacing-xs)"},children:e("app.title")}),w.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-sm)",fontStyle:"italic"},children:"by AI & BI Specialist Oliver Gropp"}),w.jsx("p",{style:{color:"var(--color-text-secondary)",marginBottom:"var(--spacing-xl)"},children:e("welcome.subtitle")}),w.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"var(--spacing-md)",width:"100%",maxWidth:"800px"},children:XL.slice(0,3).map(a=>w.jsxs(gu,{onClick:()=>i(a.type),children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e(a.titleKey)}),w.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e(a.descKey)})]},a.type))}),w.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"var(--spacing-md)",width:"100%",maxWidth:"800px",marginTop:"var(--spacing-md)"},children:[w.jsxs(gu,{onClick:()=>i("update"),children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e("connection.update")}),w.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e("connection.update.desc")})]}),w.jsxs(gu,{onClick:()=>t({type:"startWorkspace"}),children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e("connection.workspace")}),w.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e("connection.workspace.desc")})]}),w.jsxs(gu,{onClick:()=>t({type:"startElementFlow"}),children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:e("element.button")}),w.jsx("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:e("element.button.hint")})]})]}),w.jsx("div",{style:{width:"100%",maxWidth:"800px",marginTop:"var(--spacing-xl)",borderTop:"1px solid var(--color-border)",paddingTop:"var(--spacing-lg)",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--spacing-sm)"},children:w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)"},children:[w.jsx("button",{onClick:()=>t({type:"startReadiness"}),title:e("readiness.hint"),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("readiness.button")}),w.jsx("button",{onClick:()=>t({type:"showTemplateEditor"}),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("templateEditor.button")}),w.jsx("button",{onClick:()=>t({type:"showDiffView"}),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("diff.button")}),w.jsx("button",{onClick:()=>t({type:"showChangelog"}),title:e("changelog.tooltip"),style:{padding:"var(--spacing-sm) var(--spacing-lg)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm, 4px)",background:"var(--color-surface)",color:"var(--color-text)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold, 600)",cursor:"pointer"},children:e("changelog.button")})]})}),w.jsx("button",{onClick:()=>t({type:"showImprint"}),title:e("imprint.tooltip"),"aria-label":e("imprint.tooltip"),style:{position:"absolute",bottom:"var(--spacing-md)",right:"var(--spacing-md)",width:"20px",height:"20px",padding:0,border:"none",background:"none",color:"var(--color-text-hint)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:w.jsx(VL,{})})]})}function Se(e){try{const t=JSON.parse(e);return typeof t!="object"||t===null||!("success"in t)?{success:!1,error:{type:"UnexpectedError",message:"Bridge response is not a valid BridgeResponse object."}}:t}catch{return{success:!1,error:{type:"UnexpectedError",message:`Failed to parse Bridge response: ${e}`}}}}async function Rm(e){const t=await window.pywebview.api.connect(JSON.stringify(e));return Se(t)}async function P1(){const e=await window.pywebview.api.cancel_operation();return Se(e)}async function Fm(){const e=await window.pywebview.api.get_progress();return Se(e)}async function KL(){const e=await window.pywebview.api.get_form_data();return Se(e)}async function ZL(e){const t=await window.pywebview.api.validate_form(JSON.stringify(e));return Se(t)}async function JL(e,t){const i=await window.pywebview.api.save_document(JSON.stringify(e),t);return Se(i)}async function zm(){const e=await window.pywebview.api.select_folder();return Se(e)}async function Om(e){const t=await window.pywebview.api.select_file(e);return Se(t)}async function Ws(e){const t=await window.pywebview.api.open_file_external(e);return Se(t)}async function ng(e){const t=await window.pywebview.api.get_document_content(e);return Se(t)}async function tA(e){const t=await window.pywebview.api.load_existing_doc(e);return Se(t)}async function eA(){const e=await window.pywebview.api.discover_local_instances();return Se(e)}async function rA(e){const t=await window.pywebview.api.run_readiness_analysis(e);return Se(t)}async function iA(e,t=""){const i=await window.pywebview.api.export_pdf(e,t);return Se(i)}async function aA(e,t){const i=await window.pywebview.api.export_html(e,t);return Se(i)}async function nA(){const e=await window.pywebview.api.list_templates();return Se(e)}async function oA(e="report"){const t=await window.pywebview.api.get_template(e);return Se(t)}async function sA(e,t="report"){const i=await window.pywebview.api.save_template(e,t);return Se(i)}async function lA(e,t){const i=await window.pywebview.api.compare_documents(e,t);return Se(i)}async function cA(e,t,i){const a=await window.pywebview.api.workspace_start(JSON.stringify({params:e}),t,i);return Se(a)}async function hA(){const e=await window.pywebview.api.workspace_extract();return Se(e)}async function uA(e){const t=await window.pywebview.api.workspace_get_document_form(e);return Se(t)}async function dA(e,t){const i=await window.pywebview.api.workspace_save_document_form(e,JSON.stringify(t));return Se(i)}async function fA(){const e=await window.pywebview.api.workspace_finalize();return Se(e)}async function pA(){const e=await window.pywebview.api.element_supported_types();return Se(e)}async function gA(e,t,i,a,o,l){const c=await window.pywebview.api.element_document(JSON.stringify({params:e}),t,i,a,o,l);return Se(c)}const mA={tenantId:"",workspaceId:"",datasetId:"",reportId:"",clientId:"",clientSecret:""};function yA(){const{t:e}=Ue(),t=Mr(),{fabricForm:i,error:a}=_n(),[o,l]=gt.useState(i??mA),[c,h]=gt.useState({}),[d,f]=gt.useState(!1),[p,g]=gt.useState(!1),x=(a==null?void 0:a.message)??null;function y(T,B){l(L=>({...L,[T]:B})),T in c&&h(L=>{const M={...L};return delete M[T],M})}function C(){const T={};return o.workspaceId.trim()||(T.workspaceId=e("fabric.error.workspaceRequired")),o.datasetId.trim()||(T.datasetId=e("fabric.error.datasetRequired")),h(T),Object.keys(T).length===0}async function k(){if(C()){t({type:"setFabricForm",payload:o}),g(!0);try{t({type:"startProgress"});const T=await Rm({connectionType:"fabric",params:{tenantId:o.tenantId||void 0,workspaceId:o.workspaceId,datasetId:o.datasetId,reportId:o.reportId||void 0,clientId:o.clientId||void 0,clientSecret:o.clientSecret||void 0}});T.success||t({type:"connectionFailed",payload:{connectionType:"fabric",error:T.error??{type:"UnexpectedError",message:e("error.unexpected")}}})}catch{t({type:"connectionFailed",payload:{connectionType:"fabric",error:{type:"UnexpectedError",message:e("error.unexpected")}}})}finally{g(!1)}}}function v(){t({type:"goBack"})}return w.jsx("main",{style:He.container,children:w.jsxs("div",{style:He.dialogCard,children:[w.jsx("h2",{style:He.title,children:e("connection.fabric")}),w.jsx("p",{style:He.description,children:e("connection.fabric.desc")}),x&&w.jsx("div",{style:He.errorBanner,role:"alert",children:x}),w.jsxs("div",{style:He.fieldsContainer,children:[w.jsx(ps,{label:e("fabric.tenantId"),value:o.tenantId,onChange:T=>y("tenantId",T),placeholder:e("fabric.tenantId.placeholder")}),w.jsx(ps,{label:e("fabric.workspaceId"),value:o.workspaceId,onChange:T=>y("workspaceId",T),placeholder:e("fabric.workspaceId.placeholder"),required:!0,error:c.workspaceId}),w.jsx(ps,{label:e("fabric.datasetId"),value:o.datasetId,onChange:T=>y("datasetId",T),placeholder:e("fabric.datasetId.placeholder"),required:!0,error:c.datasetId}),w.jsx(ps,{label:e("fabric.reportId"),value:o.reportId,onChange:T=>y("reportId",T),placeholder:e("fabric.reportId.placeholder"),hint:e("fabric.reportId.hint")})]}),w.jsxs("div",{style:He.advancedSection,children:[w.jsxs("button",{type:"button",onClick:()=>f(!d),style:He.advancedToggle,"aria-expanded":d,children:[w.jsx("span",{style:He.advancedIcon,children:d?"▾":"▸"}),e("fabric.advanced")]}),d&&w.jsxs("div",{style:He.advancedContent,children:[w.jsx(ps,{label:e("fabric.clientId"),value:o.clientId,onChange:T=>y("clientId",T),placeholder:e("fabric.clientId.placeholder")}),w.jsx(ps,{label:e("fabric.clientSecret"),value:o.clientSecret,onChange:T=>y("clientSecret",T),placeholder:e("fabric.clientSecret.placeholder"),type:"password"})]})]}),w.jsxs("div",{style:He.actions,children:[w.jsx("button",{type:"button",onClick:v,style:He.backButton,children:e("dialog.back")}),w.jsx("button",{type:"button",onClick:k,disabled:p,style:He.connectButton,children:e(p?"fabric.connecting":"dialog.connect")})]})]})})}function ps({label:e,value:t,onChange:i,placeholder:a,required:o,error:l,hint:c,type:h="text"}){const d=`fabric-${e.toLowerCase().replace(/\s+/g,"-")}`;return w.jsxs("div",{style:He.fieldWrapper,children:[w.jsxs("label",{htmlFor:d,style:He.label,children:[e,o&&w.jsx("span",{style:He.requiredMark,children:" *"})]}),w.jsx("input",{id:d,type:h,value:t,onChange:f=>i(f.target.value),placeholder:a,style:{...He.input,...l?He.inputError:{}},"aria-required":o,"aria-invalid":!!l,"aria-describedby":l?`${d}-error`:c?`${d}-hint`:void 0}),l&&w.jsx("span",{id:`${d}-error`,style:He.errorText,role:"alert",children:l}),c&&!l&&w.jsx("span",{id:`${d}-hint`,style:He.hintText,children:c})]})}const He={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"480px"},title:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",marginBottom:"var(--spacing-xs)"},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-lg)"},errorBanner:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-md)",border:"1px solid var(--color-error)"},fieldsContainer:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},fieldWrapper:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},label:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},requiredMark:{color:"var(--color-error)"},input:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",outline:"none",transition:"border-color var(--transition-fast)",fontFamily:"var(--font-family)"},inputError:{borderColor:"var(--color-error)",borderWidth:"2px"},errorText:{color:"var(--color-error)",fontSize:"var(--font-size-hint)"},hintText:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)"},advancedSection:{marginTop:"var(--spacing-lg)"},advancedToggle:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",background:"none",border:"none",cursor:"pointer",fontSize:"var(--font-size-body)",color:"var(--color-primary)",fontWeight:"var(--font-weight-semibold)",padding:"var(--spacing-xs) 0",fontFamily:"var(--font-family)"},advancedIcon:{fontSize:"var(--font-size-body)"},advancedContent:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)",paddingLeft:"var(--spacing-md)",borderLeft:"2px solid var(--color-border)"},actions:{display:"flex",justifyContent:"space-between",marginTop:"var(--spacing-xl)",gap:"var(--spacing-md)"},backButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)",transition:"border-color var(--transition-fast)"},connectButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"none",borderRadius:"var(--radius-sm)",background:"var(--color-primary)",color:"var(--color-primary-contrast)",cursor:"pointer",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",transition:"background-color var(--transition-fast)"}};function xA(){const{t:e}=Ue(),t=Mr(),[i,a]=gt.useState([]),[o,l]=gt.useState(null),[c,h]=gt.useState(!1),[d,f]=gt.useState(!1),[p,g]=gt.useState(null),[x,y]=gt.useState(!1);async function C(){var B;h(!0),g(null),a([]),l(null),f(!1);const T=await eA();if(h(!1),f(!0),!T.success){g(((B=T.error)==null?void 0:B.message)??e("error.unexpected"));return}a(T.data??[])}gt.useEffect(()=>{C()},[]);async function k(){var B;if(o===null)return;y(!0),g(null),t({type:"startProgress"});const T=await Rm({connectionType:"local",params:{port:o}});y(!1),T.success||(g(((B=T.error)==null?void 0:B.message)??e("error.unexpected")),t({type:"selectConnection",payload:"local"}))}function v(){t({type:"goBack"})}return w.jsx("main",{style:cr.container,children:w.jsxs("div",{style:cr.dialogCard,children:[w.jsx("h2",{style:cr.title,children:e("connection.local")}),w.jsxs("div",{style:cr.content,children:[w.jsx("button",{type:"button",onClick:C,disabled:c,style:cr.discoverButton,onMouseEnter:T=>{c||(T.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(c?"local.searching":"local.discover")}),d&&i.length>0&&w.jsxs("div",{style:cr.listContainer,children:[w.jsx("label",{style:cr.listLabel,children:e("local.selectInstance")}),w.jsx("ul",{style:cr.list,children:i.map(T=>w.jsxs("li",{role:"option","aria-selected":o===T.port,tabIndex:0,onClick:()=>l(T.port),onKeyDown:B=>{B.key==="Enter"&&l(T.port)},style:{...cr.listItem,borderColor:o===T.port?"var(--color-primary)":"var(--color-border)",backgroundColor:o===T.port?"var(--color-success-bg)":"var(--color-surface)"},children:[w.jsx("span",{style:cr.instanceName,children:T.name}),w.jsxs("span",{style:cr.instancePort,children:["Port ",T.port]})]},T.port))})]}),d&&i.length===0&&!p&&w.jsx("p",{style:cr.noInstances,children:e("local.noInstances")}),p&&w.jsx("div",{style:cr.errorContainer,role:"alert",children:w.jsx("p",{style:cr.errorText,children:p})})]}),w.jsxs("div",{style:cr.actions,children:[w.jsx("button",{type:"button",onClick:v,style:cr.backButton,onMouseEnter:T=>{T.currentTarget.style.borderColor="var(--color-primary)"},onMouseLeave:T=>{T.currentTarget.style.borderColor="var(--color-border)"},children:e("dialog.back")}),w.jsx("button",{type:"button",onClick:k,disabled:o===null||x,style:{...cr.connectButton,opacity:o===null||x?.5:1,cursor:o===null||x?"not-allowed":"pointer"},onMouseEnter:T=>{o!==null&&!x&&(T.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(x?"progress.connecting":"dialog.connect")})]})]})})}const cr={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"560px",display:"flex",flexDirection:"column",gap:"var(--spacing-lg)"},title:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",margin:0},content:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},discoverButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-normal)",alignSelf:"flex-start"},listContainer:{display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},listLabel:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text-secondary)"},list:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",maxHeight:"240px",overflowY:"auto"},listItem:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",border:"2px solid",cursor:"pointer",transition:"border-color var(--transition-fast), background-color var(--transition-fast)"},instanceName:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)"},instancePort:{fontSize:"var(--font-size-hint)",color:"var(--color-text-hint)"},noInstances:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)",fontStyle:"italic",padding:"var(--spacing-md)",backgroundColor:"var(--color-background)",borderRadius:"var(--radius-sm)",margin:0},errorContainer:{backgroundColor:"var(--color-error-bg)",border:"1px solid var(--color-error)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)"},errorText:{color:"var(--color-error)",fontSize:"var(--font-size-body)",margin:0},actions:{display:"flex",justifyContent:"space-between",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)"},backButton:{backgroundColor:"transparent",color:"var(--color-text)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"border-color var(--transition-normal)"},connectButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",transition:"background-color var(--transition-normal)"}};function bA(){const{t:e}=Ue(),{activeFlow:t}=_n(),i=Mr(),[a,o]=gt.useState(null),[l,c]=gt.useState(null),[h,d]=gt.useState(!1);async function f(){c(null);const x=await zm();x.success&&x.data?o(x.data):x.error&&c(x.error.message)}async function p(){var x,y;if(a)if(c(null),d(!0),t==="readiness"){i({type:"startProgress"});const C=await rA(a);if(C.success&&C.data)i({type:"showReadinessResult",payload:{outputPath:C.data.filePath}});else{const k=((x=C.error)==null?void 0:x.type)??"UnexpectedError",v=((y=C.error)==null?void 0:y.message)??"Unbekannter Fehler";i({type:"showError",payload:{type:k,message:v}}),i({type:"goBack"})}}else{const C=await Rm({connectionType:"pbip",params:{folderPath:a}});C.success?i({type:"startProgress"}):C.error&&(c(C.error.message),d(!1))}}function g(){i({type:"goBack"})}return w.jsx("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},children:w.jsxs("div",{style:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"500px"},children:[w.jsx("h2",{style:{fontSize:"var(--font-size-heading)",marginBottom:"var(--spacing-lg)"},children:e("pbip.title")}),w.jsx("div",{style:{marginBottom:"var(--spacing-lg)"},children:w.jsx("button",{type:"button",onClick:f,disabled:h,style:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",cursor:h?"not-allowed":"pointer",opacity:h?.6:1,transition:"background-color var(--transition-fast)",width:"100%"},children:e("pbip.selectFolder")})}),w.jsxs("div",{style:{marginBottom:"var(--spacing-lg)",padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-background)",borderRadius:"var(--radius-sm)",border:"1px solid var(--color-border)",fontSize:"var(--font-size-body)",wordBreak:"break-all"},children:[w.jsx("span",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-hint)"},children:e("pbip.selectedPath")}),w.jsx("p",{style:{margin:"var(--spacing-xs) 0 0 0",color:a?"var(--color-text)":"var(--color-text-hint)"},children:a??e("pbip.noFolder")})]}),l&&w.jsx("div",{role:"alert",style:{marginBottom:"var(--spacing-md)",padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-error-bg)",borderRadius:"var(--radius-sm)",border:"1px solid var(--color-error)",color:"var(--color-error)",fontSize:"var(--font-size-body)"},children:l}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)",justifyContent:"flex-end"},children:[w.jsx("button",{type:"button",onClick:g,disabled:h,style:{backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",cursor:h?"not-allowed":"pointer",opacity:h?.6:1,transition:"background-color var(--transition-fast)"},children:e("dialog.back")}),w.jsx("button",{type:"button",onClick:p,disabled:!a||h,style:{backgroundColor:a&&!h?"var(--color-primary)":"var(--color-border)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",fontWeight:"var(--font-weight-semibold)",cursor:a&&!h?"pointer":"not-allowed",transition:"background-color var(--transition-fast)"},children:e("dialog.connect")})]})]})})}function CA(){const{t:e}=Ue(),t=Mr(),[i,a]=gt.useState(null),[o,l]=gt.useState(null),[c,h]=gt.useState(null),[d,f]=gt.useState(!1);async function p(){var v;h(null);const y=await Om("Markdown files (*.md)");if(!y.success||!y.data){y.error&&h(y.error.message);return}const C=y.data;a(C),f(!0);const k=await tA(C);if(f(!1),!k.success||!k.data){l(null),h(((v=k.error)==null?void 0:v.message)??e("error.unexpected"));return}l(k.data)}function g(){t({type:"goBack"})}function x(){t({type:"goBack"})}return w.jsx("main",{style:Ke.container,children:w.jsxs("div",{style:Ke.dialog,children:[w.jsx("h2",{style:Ke.title,children:e("connection.update")}),w.jsx("p",{style:Ke.description,children:e("connection.update.desc")}),w.jsx("button",{type:"button",onClick:p,disabled:d,style:Ke.selectButton,children:e("update.selectFile")}),i&&w.jsx("p",{style:Ke.filePath,title:i,children:i}),d&&w.jsx("p",{style:Ke.loading,children:e("update.loading")}),o&&w.jsxs("div",{style:Ke.infoBox,children:[w.jsxs("div",{style:Ke.infoRow,children:[w.jsxs("span",{style:Ke.infoLabel,children:[e("update.version"),":"]}),w.jsx("span",{style:Ke.infoValue,children:o.version})]}),w.jsxs("div",{style:Ke.infoRow,children:[w.jsxs("span",{style:Ke.infoLabel,children:[e("update.lastUpdated"),":"]}),w.jsx("span",{style:Ke.infoValue,children:o.lastUpdated})]})]}),c&&w.jsx("div",{style:Ke.errorBox,role:"alert",children:w.jsx("p",{style:Ke.errorText,children:c})}),w.jsxs("div",{style:Ke.actions,children:[w.jsx("button",{type:"button",onClick:g,style:Ke.backButton,children:e("dialog.back")}),o&&w.jsx("button",{type:"button",onClick:x,style:Ke.continueButton,children:e("update.continue")})]})]})})}const Ke={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},dialog:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"500px",display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},title:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",margin:0},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},selectButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)",alignSelf:"flex-start"},filePath:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",backgroundColor:"var(--color-background)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",margin:0,wordBreak:"break-all",overflow:"hidden",textOverflow:"ellipsis"},loading:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)",margin:0},infoBox:{backgroundColor:"var(--color-success-bg)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-md)",display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},infoRow:{display:"flex",gap:"var(--spacing-sm)",alignItems:"center"},infoLabel:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},infoValue:{fontSize:"var(--font-size-body)",color:"var(--color-text)"},errorBox:{backgroundColor:"var(--color-error-bg)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-md)",border:"1px solid var(--color-error)"},errorText:{color:"var(--color-error)",fontSize:"var(--font-size-body)",margin:0},actions:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"var(--spacing-sm)"},backButton:{backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"background-color var(--transition-fast)"},continueButton:{backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"}},vA=200;function kA(){const e=Mr(),{view:t,connectionType:i}=_n(),a=gt.useRef(null),o=gt.useRef(!1);gt.useEffect(()=>{if(t!=="Progress")return;function l(){a.current=setInterval(async()=>{var h,d;if(!o.current){o.current=!0;try{const f=await Fm();if(!f.success||!f.data){og(e,i,{type:((h=f.error)==null?void 0:h.type)??"UnexpectedError",message:((d=f.error)==null?void 0:d.message)??"Progress polling failed"}),c();return}const{percent:p,message:g,phase:x}=f.data;if(e({type:"progressUpdate",payload:{percent:p,message:g,phase:x}}),x==="done"){const y=await KL();y.success&&y.data?e({type:"showForm",payload:{sections:y.data.sections,tableGroups:y.data.tableGroups||[]}}):e({type:"showForm",payload:{sections:[],tableGroups:[]}}),c()}else x==="error"&&(og(e,i,{type:"UnexpectedError",message:g}),c())}catch{og(e,i,{type:"UnexpectedError",message:"Progress polling failed unexpectedly"}),c()}finally{o.current=!1}}},vA)}function c(){a.current!==null&&(clearInterval(a.current),a.current=null)}return l(),()=>{c()}},[t,i,e])}function og(e,t,i){t?e({type:"connectionFailed",payload:{connectionType:t,error:i}}):(e({type:"showError",payload:i}),e({type:"goBack"}))}const IC={connecting:"progress.connecting",extracting:"progress.extracting",mapping:"progress.mapping",categorizing:"progress.categorizing",done:"progress.connecting",error:"progress.connecting"};function SA(){const{t:e}=Ue(),{progress:t}=_n();kA();const i=(t==null?void 0:t.percent)??0,a=(t==null?void 0:t.phase)??"connecting",o=a in IC?e(IC[a]):(t==null?void 0:t.message)??"";return w.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-md)"},children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)"},children:o}),w.jsx("div",{role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o,style:{width:"100%",maxWidth:"480px",height:"8px",backgroundColor:"var(--color-border)",borderRadius:"4px",overflow:"hidden"},children:w.jsx("div",{style:{width:`${i}%`,height:"100%",backgroundColor:"var(--color-primary)",borderRadius:"4px",transition:"width 200ms ease-out"}})}),w.jsxs("p",{style:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},children:[i,"%"]})]})}function wA({autoCount:e,manualCount:t,partialCount:i}){const{t:a}=Ue();return w.jsxs("div",{className:"category-bar",role:"status","aria-label":"Field summary",style:{display:"flex",alignItems:"center",gap:"var(--spacing-md)",padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-sm)",boxShadow:"var(--shadow-card)",fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[w.jsxs("span",{"data-testid":"category-auto",children:[w.jsx("strong",{children:e})," ",a("form.summary.auto")]}),w.jsx("span",{"aria-hidden":"true",style:{color:"var(--color-border)"},children:"|"}),w.jsxs("span",{"data-testid":"category-manual",children:[w.jsx("strong",{children:t})," ",a("form.summary.manual")]}),w.jsx("span",{"aria-hidden":"true",style:{color:"var(--color-border)"},children:"|"}),w.jsxs("span",{"data-testid":"category-partial",children:[w.jsx("strong",{children:i})," ",a("form.summary.partial")]})]})}function TA({name:e,label:t,value:i,source:a,tooltip:o,options:l,required:c,error:h,onChange:d,onEditTable:f}){const{t:p}=Ue(),[g,x]=gt.useState(!1),y=gt.useRef(null),C=gt.useRef(null),k=a==="auto",v=!!h,T=l&&l.length>0;gt.useEffect(()=>{if(!g)return;function M(F){y.current&&!y.current.contains(F.target)&&C.current&&!C.current.contains(F.target)&&x(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[g]);const B=`field-${e}`,L=`error-${e}`;return w.jsxs("div",{className:"form-field",style:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",marginBottom:"var(--spacing-md)"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},children:[w.jsxs("label",{htmlFor:B,style:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},children:[t,c&&w.jsx("span",{style:{color:"var(--color-error)",marginLeft:"2px"},children:"*"})]}),k&&w.jsx("span",{"data-testid":`auto-label-${e}`,style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-hint)",fontStyle:"italic"},children:p("form.autoLabel")}),o&&w.jsxs("span",{style:{position:"relative",display:"inline-flex"},children:[w.jsx("button",{ref:C,type:"button","aria-label":`Info: ${t}`,"aria-expanded":g,onClick:()=>x(M=>!M),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),style:{background:"none",border:"none",cursor:"pointer",padding:"0 2px",fontSize:"var(--font-size-body)",color:"var(--color-primary)",lineHeight:1},children:"ⓘ"}),g&&w.jsx("div",{ref:y,role:"tooltip",style:{position:"absolute",top:"100%",left:0,zIndex:100,maxWidth:"300px",padding:"var(--spacing-sm)",backgroundColor:"var(--color-text)",color:"var(--color-primary-contrast)",fontSize:"var(--font-size-hint)",borderRadius:"var(--radius-sm)",boxShadow:"var(--shadow-elevated)",lineHeight:"var(--line-height-body)",marginTop:"4px"},children:o})]})]}),T?w.jsxs("select",{id:B,value:i,onChange:M=>d(e,M.target.value),"aria-invalid":v,"aria-describedby":v?L:void 0,style:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",border:`1px solid ${v?"var(--color-error)":"var(--color-border)"}`,borderRadius:"var(--radius-sm)",backgroundColor:"var(--color-surface)",color:"var(--color-text)",outline:"none",transition:"border-color var(--transition-fast)",width:"100%"},onFocus:M=>{v||(M.currentTarget.style.borderColor="var(--color-focus)")},onBlur:M=>{v||(M.currentTarget.style.borderColor="var(--color-border)")},children:[w.jsx("option",{value:"",children:"—"}),l.map(M=>w.jsx("option",{value:M,children:M},M))]}):i.includes(`
`)||i.length>80?w.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},children:[w.jsx("textarea",{id:B,value:i,onChange:M=>d(e,M.target.value),rows:Math.min(Math.max(i.split(`
`).length,2),8),"aria-invalid":v,"aria-describedby":v?L:void 0,style:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",border:`1px solid ${v?"var(--color-error)":"var(--color-border)"}`,borderRadius:"var(--radius-sm)",backgroundColor:"var(--color-surface)",color:"var(--color-text)",outline:"none",transition:"border-color var(--transition-fast)",width:"100%",resize:"vertical"},onFocus:M=>{v||(M.currentTarget.style.borderColor="var(--color-focus)")},onBlur:M=>{v||(M.currentTarget.style.borderColor="var(--color-border)")}}),f&&w.jsx("button",{type:"button",onClick:f,style:{alignSelf:"flex-start",padding:"var(--spacing-xs) var(--spacing-sm)",fontSize:"var(--font-size-hint)",fontFamily:"var(--font-family)",color:"var(--color-primary)",backgroundColor:"transparent",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:p("tableEditor.title")})]}):w.jsx("input",{id:B,type:"text",value:i,onChange:M=>d(e,M.target.value),"aria-invalid":v,"aria-describedby":v?L:void 0,style:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",border:`1px solid ${v?"var(--color-error)":"var(--color-border)"}`,borderRadius:"var(--radius-sm)",backgroundColor:"var(--color-surface)",color:"var(--color-text)",outline:"none",transition:"border-color var(--transition-fast)",width:"100%"},onFocus:M=>{v||(M.currentTarget.style.borderColor="var(--color-focus)")},onBlur:M=>{v||(M.currentTarget.style.borderColor="var(--color-border)")}}),v&&w.jsx("p",{id:L,role:"alert",style:{color:"var(--color-error)",fontSize:"var(--font-size-hint)",margin:0,paddingTop:"2px"},children:h.message})]})}function qC(e){return e.some(t=>t.trim().length>0)}function jC({columns:e,initialRows:t,onSave:i,onCancel:a}){const{t:o}=Ue(),[l,c]=gt.useState(()=>t.length>0?t.map(x=>[...x]):[e.map(()=>"")]),h=l.filter(qC).length,d=gt.useCallback((x,y,C)=>{c(k=>k.map((v,T)=>T===x?v.map((B,L)=>L===y?C:B):v))},[]),f=gt.useCallback(()=>{c(x=>[...x,e.map(()=>"")])},[e]),p=gt.useCallback(()=>{c(x=>x.length>1?x.slice(0,-1):x)},[]),g=gt.useCallback(()=>{const x=l.filter(qC);i(x)},[l,i]);return w.jsx("div",{className:"table-editor-overlay",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onClick:x=>{x.target===x.currentTarget&&a()},onKeyDown:x=>{x.key==="Escape"&&a()},children:w.jsxs("div",{className:"table-editor-modal",role:"dialog","aria-modal":"true","aria-label":o("tableEditor.title"),style:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-elevated)",padding:"var(--spacing-lg)",maxWidth:"90vw",maxHeight:"80vh",minWidth:"400px",display:"flex",flexDirection:"column",gap:"var(--spacing-md)",overflow:"hidden"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[w.jsx("h2",{style:{margin:0,fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},children:o("tableEditor.title")}),w.jsxs("span",{style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},children:["(",h," ",h===1?"Eintrag":"Einträge",")"]})]}),w.jsx("div",{style:{overflowX:"auto",overflowY:"auto",flex:1},children:w.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)"},children:[w.jsx("thead",{children:w.jsx("tr",{children:e.map((x,y)=>w.jsx("th",{style:{textAlign:"left",padding:"var(--spacing-sm) var(--spacing-md)",borderBottom:"2px solid var(--color-border)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",whiteSpace:"nowrap"},children:x},y))})}),w.jsx("tbody",{children:l.map((x,y)=>w.jsx("tr",{children:x.map((C,k)=>w.jsx("td",{style:{padding:"var(--spacing-xs) var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:w.jsx("input",{type:"text",value:C,onChange:v=>d(y,k,v.target.value),"aria-label":`${e[k]} Zeile ${y+1}`,style:{width:"100%",padding:"var(--spacing-xs) var(--spacing-sm)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",outline:"none",transition:"border-color var(--transition-fast)"},onFocus:v=>{v.currentTarget.style.borderColor="var(--color-primary)"},onBlur:v=>{v.currentTarget.style.borderColor="var(--color-border)"}})},k))},y))})]})}),w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"var(--spacing-sm)"},children:[w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[w.jsx("button",{type:"button",onClick:f,style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",color:"var(--color-primary)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"background-color var(--transition-fast)"},children:o("tableEditor.addRow")}),w.jsx("button",{type:"button",onClick:p,disabled:l.length<=1,"aria-label":o("tableEditor.deleteRow"),style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-error)",borderRadius:"var(--radius-sm)",color:"var(--color-error)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",cursor:l.length<=1?"not-allowed":"pointer",opacity:l.length<=1?.5:1,transition:"opacity var(--transition-fast)"},children:o("tableEditor.deleteRow")})]}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[w.jsx("button",{type:"button",onClick:a,style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",color:"var(--color-text)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",cursor:"pointer",transition:"background-color var(--transition-fast)"},children:o("tableEditor.cancel")}),w.jsx("button",{type:"button",onClick:g,style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",color:"var(--color-primary-contrast)",fontFamily:"var(--font-family)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},children:o("tableEditor.save")})]})]})]})})}function _A(){const{t:e}=Ue(),{formSections:t,tableGroups:i}=_n(),a=Mr(),[o,l]=gt.useState(()=>{const M={};if(t)for(const F of t)for(const $ of F.fields)M[$.name]=$.value;return M}),[c,h]=gt.useState(!1),[d,f]=gt.useState([]),[p,g]=gt.useState(!1),[x,y]=gt.useState(null),[C,k]=gt.useState(()=>{const M={};if(i)for(const F of i)M[F.id]=F.rows.length>0?F.rows:[];return M}),v=gt.useMemo(()=>{let M=0,F=0,$=0;if(t){for(const N of t)for(const j of N.fields)if(!j.tableGroup)switch(j.source){case"auto":M++;break;case"manual":F++;break;case"partial":$++;break}}return{autoCount:M,manualCount:F,partialCount:$}},[t]),T=gt.useCallback((M,F)=>{l($=>({...$,[M]:F})),f($=>$.filter(N=>N.field!==M))},[]),B=gt.useMemo(()=>{const M={};for(const F of d)M[F.field]=F;return M},[d]),L=async()=>{g(!0),f([]);try{const M={...o};if(i)for(const N of i){const j=C[N.id]||[],ot=(t==null?void 0:t.flatMap(Y=>Y.fields).filter(Y=>Y.tableGroup===N.id))||[],K=i.find(Y=>Y.id===N.id);if(K)for(let Y=0;Y<K.columns.length;Y++){const Z=ot[Y];Z&&(M[Z.name]=j.map(it=>it[Y]||"").join(`
`))}}const F=await ZL(M);if(F.success&&F.data&&F.data.length>0&&!c){f(F.data),g(!1);return}const $=await JL(M,c);$.success&&$.data?a({type:"showResult",payload:{outputPath:$.data.outputPath}}):$.error&&a({type:"showError",payload:{type:$.error.type,message:$.error.message}})}catch{a({type:"showError",payload:{type:"UnexpectedError",message:e("error.unexpected")}})}finally{g(!1)}};return t?w.jsxs("main",{className:"form-view",style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[w.jsxs("div",{style:{padding:"var(--spacing-md) var(--spacing-lg)",borderBottom:"1px solid var(--color-border)",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"var(--spacing-md)"},children:[w.jsx(wA,{autoCount:v.autoCount,manualCount:v.manualCount,partialCount:v.partialCount}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-md)"},children:[w.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)",cursor:"pointer"},children:[w.jsx("input",{type:"checkbox",checked:c,onChange:M=>h(M.target.checked),style:{accentColor:"var(--color-primary)"}}),e("form.ignoreRequired")]}),w.jsx("button",{type:"button",onClick:L,disabled:p,style:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",fontFamily:"var(--font-family)",color:"var(--color-primary-contrast)",backgroundColor:p?"var(--color-text-hint)":"var(--color-primary)",border:"none",borderRadius:"var(--radius-sm)",cursor:p?"not-allowed":"pointer",transition:"background-color var(--transition-fast)",outline:"none"},onMouseEnter:M=>{p||(M.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:M=>{p||(M.currentTarget.style.backgroundColor="var(--color-primary)")},onFocus:M=>{M.currentTarget.style.boxShadow="0 0 0 var(--focus-ring-width) var(--focus-ring-color)"},onBlur:M=>{M.currentTarget.style.boxShadow="none"},children:e(p?"form.saving":"form.save")})]})]}),w.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"var(--spacing-lg)"},children:[t.map(M=>w.jsxs("section",{style:{marginBottom:"var(--spacing-xl)",padding:"var(--spacing-lg)",backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)"},children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginTop:0,marginBottom:"var(--spacing-md)",paddingBottom:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:M.title}),M.fields.filter(F=>!F.tableGroup).map(F=>{const $=o[F.name]??F.value,N=$.includes(`
`)||$.length>80;return w.jsx(TA,{name:F.name,label:F.label,value:$,source:F.source,tooltip:F.tooltip,options:F.options,required:F.required,error:B[F.name],onChange:T,onEditTable:N?()=>y(`field:${F.name}`):void 0},F.name)})]},M.title)),i&&i.map(M=>{const F=C[M.id]||[],$=F.some(N=>N.some(j=>j.trim().length>0));return w.jsxs("section",{style:{marginBottom:"var(--spacing-xl)",padding:"var(--spacing-lg)",backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)"},children:[w.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--spacing-md)",paddingBottom:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:[w.jsx("h2",{style:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",margin:0},children:M.title}),w.jsx("button",{type:"button",onClick:()=>y(M.id),style:{padding:"var(--spacing-xs) var(--spacing-md)",fontSize:"var(--font-size-body)",fontFamily:"var(--font-family)",color:"var(--color-primary)",backgroundColor:"var(--color-surface)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",cursor:"pointer"},children:e("tableEditor.title")})]}),$?w.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--font-size-body)"},children:[w.jsx("thead",{children:w.jsx("tr",{children:M.columns.map((N,j)=>w.jsx("th",{style:{textAlign:"left",padding:"var(--spacing-xs) var(--spacing-sm)",borderBottom:"2px solid var(--color-border)",fontWeight:"var(--font-weight-semibold)"},children:N},j))})}),w.jsx("tbody",{children:F.map((N,j)=>w.jsx("tr",{children:N.map((ot,K)=>w.jsx("td",{style:{padding:"var(--spacing-xs) var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},children:ot},K))},j))})]}):w.jsx("p",{style:{color:"var(--color-text-hint)",fontStyle:"italic",margin:0},children:e("form.noTableData")})]},M.id)})]}),x&&(()=>{if(x.startsWith("field:")){const F=x.slice(6),N=(o[F]??"").split(`
`).filter(K=>K.trim().length>0),j=t==null?void 0:t.flatMap(K=>K.fields).find(K=>K.name===F),ot=(j==null?void 0:j.label)||F;return w.jsx(jC,{columns:[ot],initialRows:N.map(K=>[K]),onSave:K=>{const Y=K.map(Z=>Z[0]).join(`
`);l(Z=>({...Z,[F]:Y})),y(null)},onCancel:()=>y(null)})}if(!i)return null;const M=i.find(F=>F.id===x);return M?w.jsx(jC,{columns:M.columns,initialRows:C[x]||[],onSave:F=>{k($=>({...$,[x]:F})),y(null)},onCancel:()=>y(null)}):null})()]}):null}const BA="modulepreload",EA=function(e,t){return new URL(e,t).href},HC={},Qt=function(t,i,a){let o=Promise.resolve();if(i&&i.length>0){let c=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};const h=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(i.map(p=>{if(p=EA(p,a),p in HC)return;HC[p]=!0;const g=p.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(!!a)for(let k=h.length-1;k>=0;k--){const v=h[k];if(v.href===p&&(!g||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${x}`))return;const C=document.createElement("link");if(C.rel=g?"stylesheet":BA,g||(C.as="script"),C.crossOrigin="",C.href=p,f&&C.setAttribute("nonce",f),document.head.appendChild(C),g)return new Promise((k,v)=>{C.addEventListener("load",k),C.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(c){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=c,window.dispatchEvent(h),!h.defaultPrevented)throw c}return o.then(c=>{for(const h of c||[])h.status==="rejected"&&l(h.reason);return t().catch(l)})};var W1=Object.defineProperty,S=(e,t)=>W1(e,"name",{value:t,configurable:!0}),LA=(e,t)=>{for(var i in t)W1(e,i,{get:t[i],enumerable:!0})},Ru={exports:{}},AA=Ru.exports,PC;function MA(){return PC||(PC=1,(function(e,t){(function(i,a){e.exports=a()})(AA,(function(){var i=1e3,a=6e4,o=36e5,l="millisecond",c="second",h="minute",d="hour",f="day",p="week",g="month",x="quarter",y="year",C="date",k="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(X){var U=["th","st","nd","rd"],D=X%100;return"["+X+(U[(D-20)%10]||U[D]||U[0])+"]"}},L=function(X,U,D){var I=String(X);return!I||I.length>=U?X:""+Array(U+1-I.length).join(D)+X},M={s:L,z:function(X){var U=-X.utcOffset(),D=Math.abs(U),I=Math.floor(D/60),z=D%60;return(U<=0?"+":"-")+L(I,2,"0")+":"+L(z,2,"0")},m:function X(U,D){if(U.date()<D.date())return-X(D,U);var I=12*(D.year()-U.year())+(D.month()-U.month()),z=U.clone().add(I,g),P=D-z<0,G=U.clone().add(I+(P?-1:1),g);return+(-(I+(D-z)/(P?z-G:G-z))||0)},a:function(X){return X<0?Math.ceil(X)||0:Math.floor(X)},p:function(X){return{M:g,y,w:p,d:f,D:C,h:d,m:h,s:c,ms:l,Q:x}[X]||String(X||"").toLowerCase().replace(/s$/,"")},u:function(X){return X===void 0}},F="en",$={};$[F]=B;var N="$isDayjsObject",j=function(X){return X instanceof Z||!(!X||!X[N])},ot=function X(U,D,I){var z;if(!U)return F;if(typeof U=="string"){var P=U.toLowerCase();$[P]&&(z=P),D&&($[P]=D,z=P);var G=U.split("-");if(!z&&G.length>1)return X(G[0])}else{var R=U.name;$[R]=U,z=R}return!I&&z&&(F=z),z||!I&&F},K=function(X,U){if(j(X))return X.clone();var D=typeof U=="object"?U:{};return D.date=X,D.args=arguments,new Z(D)},Y=M;Y.l=ot,Y.i=j,Y.w=function(X,U){return K(X,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var Z=(function(){function X(D){this.$L=ot(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[N]=!0}var U=X.prototype;return U.parse=function(D){this.$d=(function(I){var z=I.date,P=I.utc;if(z===null)return new Date(NaN);if(Y.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var G=z.match(v);if(G){var R=G[2]-1||0,q=(G[7]||"0").substring(0,3);return P?new Date(Date.UTC(G[1],R,G[3]||1,G[4]||0,G[5]||0,G[6]||0,q)):new Date(G[1],R,G[3]||1,G[4]||0,G[5]||0,G[6]||0,q)}}return new Date(z)})(D),this.init()},U.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},U.$utils=function(){return Y},U.isValid=function(){return this.$d.toString()!==k},U.isSame=function(D,I){var z=K(D);return this.startOf(I)<=z&&z<=this.endOf(I)},U.isAfter=function(D,I){return K(D)<this.startOf(I)},U.isBefore=function(D,I){return this.endOf(I)<K(D)},U.$g=function(D,I,z){return Y.u(D)?this[I]:this.set(z,D)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(D,I){var z=this,P=!!Y.u(I)||I,G=Y.p(D),R=function(Dt,vt){var dt=Y.w(z.$u?Date.UTC(z.$y,vt,Dt):new Date(z.$y,vt,Dt),z);return P?dt:dt.endOf(f)},q=function(Dt,vt){return Y.w(z.toDate()[Dt].apply(z.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(vt)),z)},nt=this.$W,ht=this.$M,yt=this.$D,Ct="set"+(this.$u?"UTC":"");switch(G){case y:return P?R(1,0):R(31,11);case g:return P?R(1,ht):R(0,ht+1);case p:var wt=this.$locale().weekStart||0,kt=(nt<wt?nt+7:nt)-wt;return R(P?yt-kt:yt+(6-kt),ht);case f:case C:return q(Ct+"Hours",0);case d:return q(Ct+"Minutes",1);case h:return q(Ct+"Seconds",2);case c:return q(Ct+"Milliseconds",3);default:return this.clone()}},U.endOf=function(D){return this.startOf(D,!1)},U.$set=function(D,I){var z,P=Y.p(D),G="set"+(this.$u?"UTC":""),R=(z={},z[f]=G+"Date",z[C]=G+"Date",z[g]=G+"Month",z[y]=G+"FullYear",z[d]=G+"Hours",z[h]=G+"Minutes",z[c]=G+"Seconds",z[l]=G+"Milliseconds",z)[P],q=P===f?this.$D+(I-this.$W):I;if(P===g||P===y){var nt=this.clone().set(C,1);nt.$d[R](q),nt.init(),this.$d=nt.set(C,Math.min(this.$D,nt.daysInMonth())).$d}else R&&this.$d[R](q);return this.init(),this},U.set=function(D,I){return this.clone().$set(D,I)},U.get=function(D){return this[Y.p(D)]()},U.add=function(D,I){var z,P=this;D=Number(D);var G=Y.p(I),R=function(ht){var yt=K(P);return Y.w(yt.date(yt.date()+Math.round(ht*D)),P)};if(G===g)return this.set(g,this.$M+D);if(G===y)return this.set(y,this.$y+D);if(G===f)return R(1);if(G===p)return R(7);var q=(z={},z[h]=a,z[d]=o,z[c]=i,z)[G]||1,nt=this.$d.getTime()+D*q;return Y.w(nt,this)},U.subtract=function(D,I){return this.add(-1*D,I)},U.format=function(D){var I=this,z=this.$locale();if(!this.isValid())return z.invalidDate||k;var P=D||"YYYY-MM-DDTHH:mm:ssZ",G=Y.z(this),R=this.$H,q=this.$m,nt=this.$M,ht=z.weekdays,yt=z.months,Ct=z.meridiem,wt=function(vt,dt,Tt,Bt){return vt&&(vt[dt]||vt(I,P))||Tt[dt].slice(0,Bt)},kt=function(vt){return Y.s(R%12||12,vt,"0")},Dt=Ct||function(vt,dt,Tt){var Bt=vt<12?"AM":"PM";return Tt?Bt.toLowerCase():Bt};return P.replace(T,(function(vt,dt){return dt||(function(Tt){switch(Tt){case"YY":return String(I.$y).slice(-2);case"YYYY":return Y.s(I.$y,4,"0");case"M":return nt+1;case"MM":return Y.s(nt+1,2,"0");case"MMM":return wt(z.monthsShort,nt,yt,3);case"MMMM":return wt(yt,nt);case"D":return I.$D;case"DD":return Y.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return wt(z.weekdaysMin,I.$W,ht,2);case"ddd":return wt(z.weekdaysShort,I.$W,ht,3);case"dddd":return ht[I.$W];case"H":return String(R);case"HH":return Y.s(R,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return Dt(R,q,!0);case"A":return Dt(R,q,!1);case"m":return String(q);case"mm":return Y.s(q,2,"0");case"s":return String(I.$s);case"ss":return Y.s(I.$s,2,"0");case"SSS":return Y.s(I.$ms,3,"0");case"Z":return G}return null})(vt)||G.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(D,I,z){var P,G=this,R=Y.p(I),q=K(D),nt=(q.utcOffset()-this.utcOffset())*a,ht=this-q,yt=function(){return Y.m(G,q)};switch(R){case y:P=yt()/12;break;case g:P=yt();break;case x:P=yt()/3;break;case p:P=(ht-nt)/6048e5;break;case f:P=(ht-nt)/864e5;break;case d:P=ht/o;break;case h:P=ht/a;break;case c:P=ht/i;break;default:P=ht}return z?P:Y.a(P)},U.daysInMonth=function(){return this.endOf(g).$D},U.$locale=function(){return $[this.$L]},U.locale=function(D,I){if(!D)return this.$L;var z=this.clone(),P=ot(D,I,!0);return P&&(z.$L=P),z},U.clone=function(){return Y.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},X})(),it=Z.prototype;return K.prototype=it,[["$ms",l],["$s",c],["$m",h],["$H",d],["$W",f],["$M",g],["$y",y],["$D",C]].forEach((function(X){it[X[1]]=function(U){return this.$g(U,X[0],X[1])}})),K.extend=function(X,U){return X.$i||(X(U,Z,K),X.$i=!0),K},K.locale=ot,K.isDayjs=j,K.unix=function(X){return K(1e3*X)},K.en=$[F],K.Ls=$,K.p={},K}))})(Ru)),Ru.exports}var DA=MA();const RA=DL(DA);var _a={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")},$m=S(function(e="fatal"){let t=_a.fatal;typeof e=="string"?e.toLowerCase()in _a&&(t=_a[e]):typeof e=="number"&&(t=e),mt.trace=()=>{},mt.debug=()=>{},mt.info=()=>{},mt.warn=()=>{},mt.error=()=>{},mt.fatal=()=>{},t<=_a.fatal&&(mt.fatal=console.error?console.error.bind(console,gi("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",gi("FATAL"))),t<=_a.error&&(mt.error=console.error?console.error.bind(console,gi("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",gi("ERROR"))),t<=_a.warn&&(mt.warn=console.warn?console.warn.bind(console,gi("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",gi("WARN"))),t<=_a.info&&(mt.info=console.info?console.info.bind(console,gi("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",gi("INFO"))),t<=_a.debug&&(mt.debug=console.debug?console.debug.bind(console,gi("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",gi("DEBUG"))),t<=_a.trace&&(mt.trace=console.debug?console.debug.bind(console,gi("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",gi("TRACE")))},"setLogLevel"),gi=S(e=>`%c${RA().format("ss.SSS")} : ${e} : `,"format");const Fu={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 o=i<.5?i*(1+t):i+t-i*t,l=2*i-o;switch(a){case"r":return Fu.hue2rgb(l,o,e+1/3)*255;case"g":return Fu.hue2rgb(l,o,e)*255;case"b":return Fu.hue2rgb(l,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:i},a)=>{e/=255,t/=255,i/=255;const o=Math.max(e,t,i),l=Math.min(e,t,i),c=(o+l)/2;if(a==="l")return c*100;if(o===l)return 0;const h=o-l,d=c>.5?h/(2-o-l):h/(o+l);if(a==="s")return d*100;switch(o){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}}},FA={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},zA={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Yt={channel:Fu,lang:FA,unit:zA},gn={};for(let e=0;e<=255;e++)gn[e]=Yt.unit.dec2hex(e);const br={ALL:0,RGB:1,HSL:2};class OA{constructor(){this.type=br.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=br.ALL}is(t){return this.type===t}}class $A{constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new OA}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=br.ALL,this}_ensureHSL(){const t=this.data,{h:i,s:a,l:o}=t;i===void 0&&(t.h=Yt.channel.rgb2hsl(t,"h")),a===void 0&&(t.s=Yt.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=Yt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:i,g:a,b:o}=t;i===void 0&&(t.r=Yt.channel.hsl2rgb(t,"r")),a===void 0&&(t.g=Yt.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=Yt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,i=t.r;return!this.type.is(br.HSL)&&i!==void 0?i:(this._ensureHSL(),Yt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,i=t.g;return!this.type.is(br.HSL)&&i!==void 0?i:(this._ensureHSL(),Yt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,i=t.b;return!this.type.is(br.HSL)&&i!==void 0?i:(this._ensureHSL(),Yt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,i=t.h;return!this.type.is(br.RGB)&&i!==void 0?i:(this._ensureRGB(),Yt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,i=t.s;return!this.type.is(br.RGB)&&i!==void 0?i:(this._ensureRGB(),Yt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,i=t.l;return!this.type.is(br.RGB)&&i!==void 0?i:(this._ensureRGB(),Yt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(br.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(br.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(br.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(br.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(br.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(br.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ed=new $A({r:0,g:0,b:0,a:0},"transparent"),Bs={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Bs.re);if(!t)return;const i=t[1],a=parseInt(i,16),o=i.length,l=o%4===0,c=o>4,h=c?1:17,d=c?8:4,f=l?0:-1,p=c?255:15;return Ed.set({r:(a>>d*(f+3)&p)*h,g:(a>>d*(f+2)&p)*h,b:(a>>d*(f+1)&p)*h,a:l?(a&p)*h/255:1},e)},stringify:e=>{const{r:t,g:i,b:a,a:o}=e;return o<1?`#${gn[Math.round(t)]}${gn[Math.round(i)]}${gn[Math.round(a)]}${gn[Math.round(o*255)]}`:`#${gn[Math.round(t)]}${gn[Math.round(i)]}${gn[Math.round(a)]}`}},oo={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(oo.hueRe);if(t){const[,i,a]=t;switch(a){case"grad":return Yt.channel.clamp.h(parseFloat(i)*.9);case"rad":return Yt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Yt.channel.clamp.h(parseFloat(i)*360)}}return Yt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const i=e.match(oo.re);if(!i)return;const[,a,o,l,c,h]=i;return Ed.set({h:oo._hue2deg(a),s:Yt.channel.clamp.s(parseFloat(o)),l:Yt.channel.clamp.l(parseFloat(l)),a:c?Yt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{h:t,s:i,l:a,a:o}=e;return o<1?`hsla(${Yt.lang.round(t)}, ${Yt.lang.round(i)}%, ${Yt.lang.round(a)}%, ${o})`:`hsl(${Yt.lang.round(t)}, ${Yt.lang.round(i)}%, ${Yt.lang.round(a)}%)`}},wc={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=wc.colors[e];if(t)return Bs.parse(t)},stringify:e=>{const t=Bs.stringify(e);for(const i in wc.colors)if(wc.colors[i]===t)return i}},pc={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(pc.re);if(!i)return;const[,a,o,l,c,h,d,f,p]=i;return Ed.set({r:Yt.channel.clamp.r(o?parseFloat(a)*2.55:parseFloat(a)),g:Yt.channel.clamp.g(c?parseFloat(l)*2.55:parseFloat(l)),b:Yt.channel.clamp.b(d?parseFloat(h)*2.55:parseFloat(h)),a:f?Yt.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{const{r:t,g:i,b:a,a:o}=e;return o<1?`rgba(${Yt.lang.round(t)}, ${Yt.lang.round(i)}, ${Yt.lang.round(a)}, ${Yt.lang.round(o)})`:`rgb(${Yt.lang.round(t)}, ${Yt.lang.round(i)}, ${Yt.lang.round(a)})`}},Zi={format:{keyword:wc,hex:Bs,rgb:pc,rgba:pc,hsl:oo,hsla:oo},parse:e=>{if(typeof e!="string")return e;const t=Bs.parse(e)||pc.parse(e)||oo.parse(e)||wc.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(br.HSL)||e.data.r===void 0?oo.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?pc.stringify(e):Bs.stringify(e)},U1=(e,t)=>{const i=Zi.parse(e);for(const a in t)i[a]=Yt.channel.clamp[a](t[a]);return Zi.stringify(i)},Cn=(e,t,i=0,a=1)=>{if(typeof e!="number")return U1(e,{a:t});const o=Ed.set({r:Yt.channel.clamp.r(e),g:Yt.channel.clamp.g(t),b:Yt.channel.clamp.b(i),a:Yt.channel.clamp.a(a)});return Zi.stringify(o)},NA=e=>{const{r:t,g:i,b:a}=Zi.parse(e),o=.2126*Yt.channel.toLinear(t)+.7152*Yt.channel.toLinear(i)+.0722*Yt.channel.toLinear(a);return Yt.lang.round(o)},IA=e=>NA(e)>=.5,Ri=e=>!IA(e),Y1=(e,t,i)=>{const a=Zi.parse(e),o=a[t],l=Yt.channel.clamp[t](o+i);return o!==l&&(a[t]=l),Zi.stringify(a)},st=(e,t)=>Y1(e,"l",t),lt=(e,t)=>Y1(e,"l",-t),E=(e,t)=>{const i=Zi.parse(e),a={};for(const o in t)t[o]&&(a[o]=i[o]+t[o]);return U1(e,a)},qA=(e,t,i=50)=>{const{r:a,g:o,b:l,a:c}=Zi.parse(e),{r:h,g:d,b:f,a:p}=Zi.parse(t),g=i/100,x=g*2-1,y=c-p,k=((x*y===-1?x:(x+y)/(1+x*y))+1)/2,v=1-k,T=a*k+h*v,B=o*k+d*v,L=l*k+f*v,M=c*g+p*(1-g);return Cn(T,B,L,M)},V=(e,t=100)=>{const i=Zi.parse(e);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,qA(i,e,t)};/*! @license DOMPurify 3.4.11 | (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.11/LICENSE */function WC(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 jA(e){if(Array.isArray(e))return e}function HA(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var a,o,l,c,h=[],d=!0,f=!1;try{if(l=(i=i.call(e)).next,t!==0)for(;!(d=(a=l.call(i)).done)&&(h.push(a.value),h.length!==t);d=!0);}catch(p){f=!0,o=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw o}}return h}}function PA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WA(e,t){return jA(e)||HA(e,t)||UA(e,t)||PA()}function UA(e,t){if(e){if(typeof e=="string")return WC(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)?WC(e,t):void 0}}const G1=Object.entries,UC=Object.setPrototypeOf,YA=Object.isFrozen,GA=Object.getPrototypeOf,VA=Object.getOwnPropertyDescriptor;let pr=Object.freeze,gr=Object.seal,vs=Object.create,V1=typeof Reflect<"u"&&Reflect,Lg=V1.apply,Ag=V1.construct;pr||(pr=function(t){return t});gr||(gr=function(t){return t});Lg||(Lg=function(t,i){for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l<a;l++)o[l-2]=arguments[l];return t.apply(i,o)});Ag||(Ag=function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return new t(...a)});const rc=We(Array.prototype.forEach),XA=We(Array.prototype.lastIndexOf),YC=We(Array.prototype.pop),gs=We(Array.prototype.push),QA=We(Array.prototype.splice),yn=Array.isArray,gc=We(String.prototype.toLowerCase),sg=We(String.prototype.toString),GC=We(String.prototype.match),ic=We(String.prototype.replace),VC=We(String.prototype.indexOf),KA=We(String.prototype.trim),ZA=We(Number.prototype.toString),JA=We(Boolean.prototype.toString),XC=typeof BigInt>"u"?null:We(BigInt.prototype.toString),QC=typeof Symbol>"u"?null:We(Symbol.prototype.toString),rr=We(Object.prototype.hasOwnProperty),ac=We(Object.prototype.toString),ur=We(RegExp.prototype.test),to=t3(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),o=1;o<i;o++)a[o-1]=arguments[o];return Lg(e,t,a)}}function t3(e){return function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return Ag(e,i)}}function se(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gc;if(UC&&UC(e,null),!yn(t))return e;let a=t.length;for(;a--;){let o=t[a];if(typeof o=="string"){const l=i(o);l!==o&&(YA(t)||(t[a]=l),o=l)}e[o]=!0}return e}function e3(e){for(let t=0;t<e.length;t++)rr(e,t)||(e[t]=null);return e}function Br(e){const t=vs(null);for(const a of G1(e)){var i=WA(a,2);const o=i[0],l=i[1];rr(e,o)&&(yn(l)?t[o]=e3(l):l&&typeof l=="object"&&l.constructor===Object?t[o]=Br(l):t[o]=l)}return t}function r3(e){switch(typeof e){case"string":return e;case"number":return ZA(e);case"boolean":return JA(e);case"bigint":return XC?XC(e):"0";case"symbol":return QC?QC(e):"Symbol()";case"undefined":return ac(e);case"function":case"object":{if(e===null)return ac(e);const t=e,i=Yi(t,"toString");if(typeof i=="function"){const a=i(t);return typeof a=="string"?a:ac(a)}return ac(e)}default:return ac(e)}}function Yi(e,t){for(;e!==null;){const a=VA(e,t);if(a){if(a.get)return We(a.get);if(typeof a.value=="function")return We(a.value)}e=GA(e)}function i(){return null}return i}function i3(e){try{return ur(e,""),!0}catch{return!1}}const KC=pr(["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"]),lg=pr(["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"]),cg=pr(["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"]),a3=pr(["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"]),hg=pr(["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"]),n3=pr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ZC=pr(["#text"]),JC=pr(["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"]),ug=pr(["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"]),tv=pr(["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"]),mu=pr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o3=gr(/{{[\w\W]*|^[\w\W]*}}/g),s3=gr(/<%[\w\W]*|^[\w\W]*%>/g),l3=gr(/\${[\w\W]*/g),c3=gr(/^data-[\-\w.\u00B7-\uFFFF]+$/),h3=gr(/^aria-[\-\w]+$/),ev=gr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),u3=gr(/^(?:\w+script|data):/i),d3=gr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),f3=gr(/^html$/i),p3=gr(/^[a-z][.\w]*(-[.\w]+)+$/i),rv=gr(/<[/\w!]/g),g3=gr(/<[/\w]/g),m3=gr(/<\/no(script|embed|frames)/i),y3=gr(/\/>/i),Ui={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},x3=function(){return typeof window>"u"?null:window},b3=function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const o="data-tt-policy-suffix";i&&i.hasAttribute(o)&&(a=i.getAttribute(o));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}},iv=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},fn=function(t,i,a,o){return rr(t,i)&&yn(t[i])?se(o.base?Br(o.base):{},t[i],o.transform):a};function X1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x3();const t=bt=>X1(bt);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Ui.document||!e.Element)return t.isSupported=!1,t;let i=e.document;const a=i,o=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,c=e.Node,h=e.Element,d=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,g=e.trustedTypes,x=h.prototype,y=Yi(x,"cloneNode"),C=Yi(x,"remove"),k=Yi(x,"nextSibling"),v=Yi(x,"childNodes"),T=Yi(x,"parentNode"),B=Yi(x,"shadowRoot"),L=Yi(x,"attributes"),M=c&&c.prototype?Yi(c.prototype,"nodeType"):null,F=c&&c.prototype?Yi(c.prototype,"nodeName"):null;if(typeof l=="function"){const bt=i.createElement("template");bt.content&&bt.content.ownerDocument&&(i=bt.content.ownerDocument)}let $,N="",j,ot=!1,K=0;const Y=function(){if(K>0)throw to('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Z=function(O){Y(),K++;try{return $.createHTML(O)}finally{K--}},it=function(O){Y(),K++;try{return $.createScriptURL(O)}finally{K--}},X=function(){return ot||(j=b3(g,o),ot=!0),j},U=i,D=U.implementation,I=U.createNodeIterator,z=U.createDocumentFragment,P=U.getElementsByTagName,G=a.importNode;let R=iv();t.isSupported=typeof G1=="function"&&typeof T=="function"&&D&&D.createHTMLDocument!==void 0;const q=o3,nt=s3,ht=l3,yt=c3,Ct=h3,wt=u3,kt=d3,Dt=p3;let vt=ev,dt=null;const Tt=se({},[...KC,...lg,...cg,...hg,...ZC]);let Bt=null;const J=se({},[...JC,...ug,...tv,...mu]);let St=Object.seal(vs(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}})),Dr=null,al=null;const wr=Object.seal(vs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let wo=!0,En=!0,To=!1,Zc=!0,zi=!1,Ye=!0,na=!1,_o=!1,Bo=null,za=null,nl=!1,oa=!1,Eo=!1,Lo=!1,Oa=!0,mr=!1;const yi="user-content-";let ar=!0,ol=!1,$a={},oi=null;const Na=se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ln=null;const An=se({},["audio","video","img","source","image","track"]);let xi=null;const Mn=se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Oi="http://www.w3.org/1998/Math/MathML",Ao="http://www.w3.org/2000/svg",Gr="http://www.w3.org/1999/xhtml";let $i=Gr,sa=!1,sl=null;const Jc=se({},[Oi,Ao,Gr],sg),ll=pr(["mi","mo","mn","ms","mtext"]);let Mo=se({},ll);const Do=pr(["annotation-xml"]);let Dn=se({},Do);const th=se({},["title","style","font","a","script"]);let Ia=null;const Ni=["application/xhtml+xml","text/html"],Ge="text/html";let Jt=null,Vr=null;const cl=i.createElement("form"),eh=function(O){return O instanceof RegExp||O instanceof Function},hl=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Vr&&Vr===O)return;(!O||typeof O!="object")&&(O={}),O=Br(O),Ia=Ni.indexOf(O.PARSER_MEDIA_TYPE)===-1?Ge:O.PARSER_MEDIA_TYPE,Jt=Ia==="application/xhtml+xml"?sg:gc,dt=fn(O,"ALLOWED_TAGS",Tt,{transform:Jt}),Bt=fn(O,"ALLOWED_ATTR",J,{transform:Jt}),sl=fn(O,"ALLOWED_NAMESPACES",Jc,{transform:sg}),xi=fn(O,"ADD_URI_SAFE_ATTR",Mn,{transform:Jt,base:Mn}),Ln=fn(O,"ADD_DATA_URI_TAGS",An,{transform:Jt,base:An}),oi=fn(O,"FORBID_CONTENTS",Na,{transform:Jt}),Dr=fn(O,"FORBID_TAGS",Br({}),{transform:Jt}),al=fn(O,"FORBID_ATTR",Br({}),{transform:Jt}),$a=rr(O,"USE_PROFILES")?O.USE_PROFILES&&typeof O.USE_PROFILES=="object"?Br(O.USE_PROFILES):O.USE_PROFILES:!1,wo=O.ALLOW_ARIA_ATTR!==!1,En=O.ALLOW_DATA_ATTR!==!1,To=O.ALLOW_UNKNOWN_PROTOCOLS||!1,Zc=O.ALLOW_SELF_CLOSE_IN_ATTR!==!1,zi=O.SAFE_FOR_TEMPLATES||!1,Ye=O.SAFE_FOR_XML!==!1,na=O.WHOLE_DOCUMENT||!1,oa=O.RETURN_DOM||!1,Eo=O.RETURN_DOM_FRAGMENT||!1,Lo=O.RETURN_TRUSTED_TYPE||!1,nl=O.FORCE_BODY||!1,Oa=O.SANITIZE_DOM!==!1,mr=O.SANITIZE_NAMED_PROPS||!1,ar=O.KEEP_CONTENT!==!1,ol=O.IN_PLACE||!1,vt=i3(O.ALLOWED_URI_REGEXP)?O.ALLOWED_URI_REGEXP:ev,$i=typeof O.NAMESPACE=="string"?O.NAMESPACE:Gr,Mo=rr(O,"MATHML_TEXT_INTEGRATION_POINTS")&&O.MATHML_TEXT_INTEGRATION_POINTS&&typeof O.MATHML_TEXT_INTEGRATION_POINTS=="object"?Br(O.MATHML_TEXT_INTEGRATION_POINTS):se({},ll),Dn=rr(O,"HTML_INTEGRATION_POINTS")&&O.HTML_INTEGRATION_POINTS&&typeof O.HTML_INTEGRATION_POINTS=="object"?Br(O.HTML_INTEGRATION_POINTS):se({},Do);const rt=rr(O,"CUSTOM_ELEMENT_HANDLING")&&O.CUSTOM_ELEMENT_HANDLING&&typeof O.CUSTOM_ELEMENT_HANDLING=="object"?Br(O.CUSTOM_ELEMENT_HANDLING):vs(null);if(St=vs(null),rr(rt,"tagNameCheck")&&eh(rt.tagNameCheck)&&(St.tagNameCheck=rt.tagNameCheck),rr(rt,"attributeNameCheck")&&eh(rt.attributeNameCheck)&&(St.attributeNameCheck=rt.attributeNameCheck),rr(rt,"allowCustomizedBuiltInElements")&&typeof rt.allowCustomizedBuiltInElements=="boolean"&&(St.allowCustomizedBuiltInElements=rt.allowCustomizedBuiltInElements),gr(St),zi&&(En=!1),Eo&&(oa=!0),$a&&(dt=se({},ZC),Bt=vs(null),$a.html===!0&&(se(dt,KC),se(Bt,JC)),$a.svg===!0&&(se(dt,lg),se(Bt,ug),se(Bt,mu)),$a.svgFilters===!0&&(se(dt,cg),se(Bt,ug),se(Bt,mu)),$a.mathMl===!0&&(se(dt,hg),se(Bt,tv),se(Bt,mu))),wr.tagCheck=null,wr.attributeCheck=null,rr(O,"ADD_TAGS")&&(typeof O.ADD_TAGS=="function"?wr.tagCheck=O.ADD_TAGS:yn(O.ADD_TAGS)&&(dt===Tt&&(dt=Br(dt)),se(dt,O.ADD_TAGS,Jt))),rr(O,"ADD_ATTR")&&(typeof O.ADD_ATTR=="function"?wr.attributeCheck=O.ADD_ATTR:yn(O.ADD_ATTR)&&(Bt===J&&(Bt=Br(Bt)),se(Bt,O.ADD_ATTR,Jt))),rr(O,"ADD_URI_SAFE_ATTR")&&yn(O.ADD_URI_SAFE_ATTR)&&se(xi,O.ADD_URI_SAFE_ATTR,Jt),rr(O,"FORBID_CONTENTS")&&yn(O.FORBID_CONTENTS)&&(oi===Na&&(oi=Br(oi)),se(oi,O.FORBID_CONTENTS,Jt)),rr(O,"ADD_FORBID_CONTENTS")&&yn(O.ADD_FORBID_CONTENTS)&&(oi===Na&&(oi=Br(oi)),se(oi,O.ADD_FORBID_CONTENTS,Jt)),ar&&(dt["#text"]=!0),na&&se(dt,["html","head","body"]),dt.table&&(se(dt,["tbody"]),delete Dr.tbody),O.TRUSTED_TYPES_POLICY){if(typeof O.TRUSTED_TYPES_POLICY.createHTML!="function")throw to('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof O.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw to('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const xt=$;$=O.TRUSTED_TYPES_POLICY;try{N=Z("")}catch(Ft){throw $=xt,Ft}}else O.TRUSTED_TYPES_POLICY===null?($=void 0,N=""):($===void 0&&($=X()),$&&typeof N=="string"&&(N=Z("")));pr&&pr(O),Vr=O},ul=se({},[...lg,...cg,...a3]),qa=se({},[...hg,...n3]),dl=function(O,rt,xt){return rt.namespaceURI===Gr?O==="svg":rt.namespaceURI===Oi?O==="svg"&&(xt==="annotation-xml"||Mo[xt]):!!ul[O]},ja=function(O,rt,xt){return rt.namespaceURI===Gr?O==="math":rt.namespaceURI===Ao?O==="math"&&Dn[xt]:!!qa[O]},Ha=function(O,rt,xt){return rt.namespaceURI===Ao&&!Dn[xt]||rt.namespaceURI===Oi&&!Mo[xt]?!1:!qa[O]&&(th[O]||!ul[O])},Rn=function(O){let rt=T(O);(!rt||!rt.tagName)&&(rt={namespaceURI:$i,tagName:"template"});const xt=gc(O.tagName),Ft=gc(rt.tagName);return sl[O.namespaceURI]?O.namespaceURI===Ao?dl(xt,rt,Ft):O.namespaceURI===Oi?ja(xt,rt,Ft):O.namespaceURI===Gr?Ha(xt,rt,Ft):!!(Ia==="application/xhtml+xml"&&sl[O.namespaceURI]):!1},Tr=function(O){gs(t.removed,{element:O});try{T(O).removeChild(O)}catch{if(C(O),!T(O))throw to("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Fe=function(O){const rt=v(O);if(rt){const Ft=[];rc(rt,Vt=>{gs(Ft,Vt)}),rc(Ft,Vt=>{try{C(Vt)}catch{}})}const xt=L(O);if(xt)for(let Ft=xt.length-1;Ft>=0;--Ft){const Vt=xt[Ft],re=Vt&&Vt.name;if(typeof re=="string")try{O.removeAttribute(re)}catch{}}},Ii=function(O,rt){try{gs(t.removed,{attribute:rt.getAttributeNode(O),from:rt})}catch{gs(t.removed,{attribute:null,from:rt})}if(rt.removeAttribute(O),O==="is")if(oa||Eo)try{Tr(rt)}catch{}else try{rt.setAttribute(O,"")}catch{}},rh=function(O){const rt=L(O);if(rt)for(let xt=rt.length-1;xt>=0;--xt){const Ft=rt[xt],Vt=Ft&&Ft.name;if(!(typeof Vt!="string"||Bt[Jt(Vt)]))try{O.removeAttribute(Vt)}catch{}}},la=function(O){const rt=[O];for(;rt.length>0;){const xt=rt.pop();(M?M(xt):xt.nodeType)===Ui.element&&rh(xt);const Vt=v(xt);if(Vt)for(let re=Vt.length-1;re>=0;--re)rt.push(Vt[re])}},ca=function(O){let rt=null,xt=null;if(nl)O="<remove></remove>"+O;else{const re=GC(O,/^[\r\n\t ]+/);xt=re&&re[0]}Ia==="application/xhtml+xml"&&$i===Gr&&(O='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+O+"</body></html>");const Ft=$?Z(O):O;if($i===Gr)try{rt=new p().parseFromString(Ft,Ia)}catch{}if(!rt||!rt.documentElement){rt=D.createDocument($i,"template",null);try{rt.documentElement.innerHTML=sa?N:Ft}catch{}}const Vt=rt.body||rt.documentElement;return O&&xt&&Vt.insertBefore(i.createTextNode(xt),Vt.childNodes[0]||null),$i===Gr?P.call(rt,na?"html":"body")[0]:na?rt.documentElement:Vt},ih=function(O){return I.call(O.ownerDocument||O,O,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Fn=function(O){return O=ic(O,q," "),O=ic(O,nt," "),O=ic(O,ht," "),O},Ro=function(O){var rt;O.normalize();const xt=I.call(O.ownerDocument||O,O,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let Ft=xt.nextNode();for(;Ft;)Ft.data=Fn(Ft.data),Ft=xt.nextNode();const Vt=(rt=O.querySelectorAll)===null||rt===void 0?void 0:rt.call(O,"template");Vt&&rc(Vt,re=>{bi(re.content)&&Ro(re.content)})},Fo=function(O){const rt=F?F(O):null;return typeof rt!="string"||Jt(rt)!=="form"?!1:typeof O.nodeName!="string"||typeof O.textContent!="string"||typeof O.removeChild!="function"||O.attributes!==L(O)||typeof O.removeAttribute!="function"||typeof O.setAttribute!="function"||typeof O.namespaceURI!="string"||typeof O.insertBefore!="function"||typeof O.hasChildNodes!="function"||O.nodeType!==M(O)||O.childNodes!==v(O)},bi=function(O){if(!M||typeof O!="object"||O===null)return!1;try{return M(O)===Ui.documentFragment}catch{return!1}},qi=function(O){if(!M||typeof O!="object"||O===null)return!1;try{return typeof M(O)=="number"}catch{return!1}};function Ve(bt,O,rt){bt.length!==0&&rc(bt,xt=>{xt.call(t,O,rt,Vr)})}const Rr=function(O,rt){return!!(Ye&&O.hasChildNodes()&&!qi(O.firstElementChild)&&ur(rv,O.textContent)&&ur(rv,O.innerHTML)||Ye&&O.namespaceURI===Gr&&rt==="style"&&qi(O.firstElementChild)||O.nodeType===Ui.processingInstruction||Ye&&O.nodeType===Ui.comment&&ur(g3,O.data))},ah=function(O,rt){if(!Dr[rt]&&zn(rt)&&(St.tagNameCheck instanceof RegExp&&ur(St.tagNameCheck,rt)||St.tagNameCheck instanceof Function&&St.tagNameCheck(rt)))return!1;if(ar&&!oi[rt]){const xt=T(O),Ft=v(O);if(Ft&&xt){const Vt=Ft.length;for(let re=Vt-1;re>=0;--re){const Le=ol?Ft[re]:y(Ft[re],!0);xt.insertBefore(Le,k(O))}}}return Tr(O),!0},nh=function(O){if(Ve(R.beforeSanitizeElements,O,null),Fo(O))return Tr(O),!0;const rt=Jt(F?F(O):O.nodeName);if(Ve(R.uponSanitizeElement,O,{tagName:rt,allowedTags:dt}),Rr(O,rt))return Tr(O),!0;if(Dr[rt]||!(wr.tagCheck instanceof Function&&wr.tagCheck(rt))&&!dt[rt])return ah(O,rt);if((M?M(O):O.nodeType)===Ui.element&&!Rn(O)||(rt==="noscript"||rt==="noembed"||rt==="noframes")&&ur(m3,O.innerHTML))return Tr(O),!0;if(zi&&O.nodeType===Ui.text){const Ft=Fn(O.textContent);O.textContent!==Ft&&(gs(t.removed,{element:O.cloneNode()}),O.textContent=Ft)}return Ve(R.afterSanitizeElements,O,null),!1},zo=function(O,rt,xt){if(al[rt]||Oa&&(rt==="id"||rt==="name")&&(xt in i||xt in cl))return!1;const Ft=Bt[rt]||wr.attributeCheck instanceof Function&&wr.attributeCheck(rt,O);if(!(En&&ur(yt,rt))){if(!(wo&&ur(Ct,rt))){if(Ft){if(!xi[rt]){if(!ur(vt,ic(xt,kt,""))){if(!((rt==="src"||rt==="xlink:href"||rt==="href")&&O!=="script"&&VC(xt,"data:")===0&&Ln[O])){if(!(To&&!ur(wt,ic(xt,kt,"")))){if(xt)return!1}}}}}else if(!(zn(O)&&(St.tagNameCheck instanceof RegExp&&ur(St.tagNameCheck,O)||St.tagNameCheck instanceof Function&&St.tagNameCheck(O))&&(St.attributeNameCheck instanceof RegExp&&ur(St.attributeNameCheck,rt)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(rt,O))||rt==="is"&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&ur(St.tagNameCheck,xt)||St.tagNameCheck instanceof Function&&St.tagNameCheck(xt))))return!1}}return!0},oh=se({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),zn=function(O){return!oh[gc(O)]&&ur(Dt,O)},Xd=function(O,rt,xt,Ft){if($&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!xt)switch(g.getAttributeType(O,rt)){case"TrustedHTML":return Z(Ft);case"TrustedScriptURL":return it(Ft)}return Ft},Fr=function(O,rt,xt,Ft){try{xt?O.setAttributeNS(xt,rt,Ft):O.setAttribute(rt,Ft),Fo(O)?Tr(O):YC(t.removed)}catch{Ii(rt,O)}},Oo=function(O){Ve(R.beforeSanitizeAttributes,O,null);const rt=O.attributes;if(!rt||Fo(O))return;const xt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Bt,forceKeepAttr:void 0};let Ft=rt.length;const Vt=Jt(O.nodeName);for(;Ft--;){const re=rt[Ft],Le=re.name,Ae=re.namespaceURI,zr=re.value,yr=Jt(Le),Xr=zr;let Xe=Le==="value"?Xr:KA(Xr);if(xt.attrName=yr,xt.attrValue=Xe,xt.keepAttr=!0,xt.forceKeepAttr=void 0,Ve(R.uponSanitizeAttribute,O,xt),Xe=xt.attrValue,mr&&(yr==="id"||yr==="name")&&VC(Xe,yi)!==0&&(Ii(Le,O),Xe=yi+Xe),Ye&&ur(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Xe)){Ii(Le,O);continue}if(yr==="attributename"&&GC(Xe,"href")){Ii(Le,O);continue}if(!xt.forceKeepAttr){if(!xt.keepAttr){Ii(Le,O);continue}if(!Zc&&ur(y3,Xe)){Ii(Le,O);continue}if(zi&&(Xe=Fn(Xe)),!zo(Vt,yr,Xe)){Ii(Le,O);continue}Xe=Xd(Vt,yr,Ae,Xe),Xe!==Xr&&Fr(O,Le,Ae,Xe)}}Ve(R.afterSanitizeAttributes,O,null)},On=function(O){let rt=null;const xt=ih(O);for(Ve(R.beforeSanitizeShadowDOM,O,null);rt=xt.nextNode();)if(Ve(R.uponSanitizeShadowNode,rt,null),nh(rt),Oo(rt),bi(rt.content)&&On(rt.content),(M?M(rt):rt.nodeType)===Ui.element){const Vt=B(rt);bi(Vt)&&($n(Vt),On(Vt))}Ve(R.afterSanitizeShadowDOM,O,null)},$n=function(O){const rt=[{node:O,shadow:null}];for(;rt.length>0;){const xt=rt.pop();if(xt.shadow){On(xt.shadow);continue}const Ft=xt.node,re=(M?M(Ft):Ft.nodeType)===Ui.element,Le=v(Ft);if(Le)for(let Ae=Le.length-1;Ae>=0;--Ae)rt.push({node:Le[Ae],shadow:null});if(re){const Ae=F?F(Ft):null;if(typeof Ae=="string"&&Jt(Ae)==="template"){const zr=Ft.content;bi(zr)&&rt.push({node:zr,shadow:null})}}if(re){const Ae=B(Ft);bi(Ae)&&rt.push({node:null,shadow:Ae},{node:Ae,shadow:null})}}};return t.sanitize=function(bt){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rt=null,xt=null,Ft=null,Vt=null;if(sa=!bt,sa&&(bt="<!-->"),typeof bt!="string"&&!qi(bt)&&(bt=r3(bt),typeof bt!="string"))throw to("dirty is not a string, aborting");if(!t.isSupported)return bt;_o?(dt=Bo,Bt=za):hl(O),(R.uponSanitizeElement.length>0||R.uponSanitizeAttribute.length>0)&&(dt=Br(dt)),R.uponSanitizeAttribute.length>0&&(Bt=Br(Bt)),t.removed=[];const re=ol&&typeof bt!="string"&&qi(bt);if(re){const zr=F?F(bt):bt.nodeName;if(typeof zr=="string"){const yr=Jt(zr);if(!dt[yr]||Dr[yr])throw to("root node is forbidden and cannot be sanitized in-place")}if(Fo(bt))throw to("root node is clobbered and cannot be sanitized in-place");try{$n(bt)}catch(yr){throw Fe(bt),yr}}else if(qi(bt))rt=ca("<!---->"),xt=rt.ownerDocument.importNode(bt,!0),xt.nodeType===Ui.element&&xt.nodeName==="BODY"||xt.nodeName==="HTML"?rt=xt:rt.appendChild(xt),$n(xt);else{if(!oa&&!zi&&!na&&bt.indexOf("<")===-1)return $&&Lo?Z(bt):bt;if(rt=ca(bt),!rt)return oa?null:Lo?N:""}rt&&nl&&Tr(rt.firstChild);const Le=ih(re?bt:rt);try{for(;Ft=Le.nextNode();)nh(Ft),Oo(Ft),bi(Ft.content)&&On(Ft.content)}catch(zr){throw re&&Fe(bt),zr}if(re)return rc(t.removed,zr=>{zr.element&&la(zr.element)}),zi&&Ro(bt),bt;if(oa){if(zi&&Ro(rt),Eo)for(Vt=z.call(rt.ownerDocument);rt.firstChild;)Vt.appendChild(rt.firstChild);else Vt=rt;return(Bt.shadowroot||Bt.shadowrootmode)&&(Vt=G.call(a,Vt,!0)),Vt}let Ae=na?rt.outerHTML:rt.innerHTML;return na&&dt["!doctype"]&&rt.ownerDocument&&rt.ownerDocument.doctype&&rt.ownerDocument.doctype.name&&ur(f3,rt.ownerDocument.doctype.name)&&(Ae="<!DOCTYPE "+rt.ownerDocument.doctype.name+`>
`+Ae),zi&&(Ae=Fn(Ae)),$&&Lo?Z(Ae):Ae},t.setConfig=function(){let bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hl(bt),_o=!0,Bo=dt,za=Bt},t.clearConfig=function(){Vr=null,_o=!1,Bo=null,za=null,$=j,N=""},t.isValidAttribute=function(bt,O,rt){Vr||hl({});const xt=Jt(bt),Ft=Jt(O);return zo(xt,Ft,rt)},t.addHook=function(bt,O){typeof O=="function"&&rr(R,bt)&&gs(R[bt],O)},t.removeHook=function(bt,O){if(rr(R,bt)){if(O!==void 0){const rt=XA(R[bt],O);return rt===-1?void 0:QA(R[bt],rt,1)[0]}return YC(R[bt])}},t.removeHooks=function(bt){rr(R,bt)&&(R[bt]=[])},t.removeAllHooks=function(){R=iv()},t}var Us=X1(),Mg=S((e,t,{depth:i=2,clobber:a=!1}={})=>{const o={depth:i,clobber:a};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(l=>Mg(e,l,o)),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]=Mg(e[l],t[l],{depth:i-1,clobber:a})):(a||typeof e[l]!="object"&&typeof t[l]!="object")&&(e[l]=t[l])}),e)},"assignWithDepth"),Je=Mg,ta="#ffffff",ea="#f2f2f2",Ut=S((e,t)=>t?E(e,{s:-40,l:10}):E(e,{s:-40,l:-10}),"mkBorder"),As,C3=(As=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,o,l,c,h,d,f,p,g,x,y,C,k,v,T,B,L,M,F,$,N,j,ot,K,Y,Z,it,X,U,D,I,z,P,G,R,q,nt,ht,yt,Ct,wt,kt,Dt,vt,dt,Tt,Bt,J;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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||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 St=0;St<this.THEME_COLOR_LIMIT;St++)this["cScale"+St]=lt(this["cScale"+St],75);else for(let St=0;St<this.THEME_COLOR_LIMIT;St++)this["cScale"+St]=lt(this["cScale"+St],25);for(let St=0;St<this.THEME_COLOR_LIMIT;St++)this["cScaleInv"+St]=this["cScaleInv"+St]||V(this["cScale"+St]);for(let St=0;St<this.THEME_COLOR_LIMIT;St++)this.darkMode?this["cScalePeer"+St]=this["cScalePeer"+St]||st(this["cScale"+St],10):this["cScalePeer"+St]=this["cScalePeer"+St]||lt(this["cScale"+St],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let St=0;St<this.THEME_COLOR_LIMIT;St++)this["cScaleLabel"+St]=this["cScaleLabel"+St]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let St=0;St<5;St++)this["surface"+St]=this["surface"+St]||E(this.mainBkg,{h:180,s:-15,l:t*(5+St*3)}),this["surfacePeer"+St]=this["surfacePeer"+St]||E(this.mainBkg,{h:180,s:-15,l:t*(8+St*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.cynefin={domainFontSize:((i=this.cynefin)==null?void 0:i.domainFontSize)||16,itemFontSize:((a=this.cynefin)==null?void 0:a.itemFontSize)||12,boundaryColor:((o=this.cynefin)==null?void 0:o.boundaryColor)||this.lineColor,boundaryWidth:((l=this.cynefin)==null?void 0:l.boundaryWidth)||2,cliffColor:((c=this.cynefin)==null?void 0:c.cliffColor)||"#8B0000",cliffWidth:((h=this.cynefin)==null?void 0:h.cliffWidth)||4,arrowColor:((d=this.cynefin)==null?void 0:d.arrowColor)||this.lineColor,arrowWidth:((f=this.cynefin)==null?void 0:f.arrowWidth)||2,complexBg:((p=this.cynefin)==null?void 0:p.complexBg)||"#E8F5E9",complicatedBg:((g=this.cynefin)==null?void 0:g.complicatedBg)||"#E3F2FD",chaoticBg:((x=this.cynefin)==null?void 0:x.chaoticBg)||"#FBE9E7",clearBg:((y=this.cynefin)==null?void 0:y.clearBg)||"#FFF8E1",confusionBg:((C=this.cynefin)==null?void 0:C.confusionBg)||"#F3E5F5",textColor:((k=this.cynefin)==null?void 0:k.textColor)||this.textColor,labelColor:((v=this.cynefin)==null?void 0:v.labelColor)||this.primaryTextColor},this.radar={axisColor:((T=this.radar)==null?void 0:T.axisColor)||this.lineColor,axisStrokeWidth:((B=this.radar)==null?void 0:B.axisStrokeWidth)||2,axisLabelFontSize:((L=this.radar)==null?void 0:L.axisLabelFontSize)||12,curveOpacity:((M=this.radar)==null?void 0:M.curveOpacity)||.5,curveStrokeWidth:((F=this.radar)==null?void 0:F.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((j=this.radar)==null?void 0:j.graticuleOpacity)||.3,legendBoxSize:((ot=this.radar)==null?void 0:ot.legendBoxSize)||12,legendFontSize:((K=this.radar)==null?void 0:K.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((Y=this.wardley)==null?void 0:Y.backgroundColor)||this.background,axisColor:((Z=this.wardley)==null?void 0:Z.axisColor)||this.lineColor,axisTextColor:((it=this.wardley)==null?void 0:it.axisTextColor)||this.primaryTextColor,gridColor:((X=this.wardley)==null?void 0:X.gridColor)||this.gridColor,componentFill:((U=this.wardley)==null?void 0:U.componentFill)||this.background,componentStroke:((D=this.wardley)==null?void 0:D.componentStroke)||this.lineColor,componentLabelColor:((I=this.wardley)==null?void 0:I.componentLabelColor)||this.primaryTextColor,linkStroke:((z=this.wardley)==null?void 0:z.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((G=this.wardley)==null?void 0:G.annotationStroke)||this.lineColor,annotationTextColor:((R=this.wardley)==null?void 0:R.annotationTextColor)||this.primaryTextColor,annotationFill:((q=this.wardley)==null?void 0:q.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||Ri(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:((nt=this.xyChart)==null?void 0:nt.backgroundColor)||this.background,titleColor:((ht=this.xyChart)==null?void 0:ht.titleColor)||this.primaryTextColor,dataLabelColor:((yt=this.xyChart)==null?void 0:yt.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((wt=this.xyChart)==null?void 0:wt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((kt=this.xyChart)==null?void 0:kt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Dt=this.xyChart)==null?void 0:Dt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((vt=this.xyChart)==null?void 0:vt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((dt=this.xyChart)==null?void 0:dt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Tt=this.xyChart)==null?void 0:Tt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((J=this.xyChart)==null?void 0:J.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea,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(As,"Theme"),As),v3=S(e=>{const t=new C3;return t.calculate(e),t},"getThemeVariables"),Ms,k3=(Ms=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(V("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Cn(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=Cn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Cn(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,o,l,c,h,d,f,p,g,x,y,C,k,v,T,B,L,M,F,$,N,j,ot,K,Y,Z,it,X,U,D,I,z,P,G,R,q,nt,ht,yt,Ct,wt,kt,Dt,vt,dt,Tt,Bt;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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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=V(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 J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||V(this["cScale"+J]);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScalePeer"+J]=this["cScalePeer"+J]||st(this["cScale"+J],10);for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{h:30,s:-30,l:-(-10+J*4)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{h:30,s:-30,l:-(-7+J*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.scaleLabelColor;for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["pie"+J]=this["cScale"+J];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 J=0;J<8;J++)this["venn"+(J+1)]=this["venn"+(J+1)]??st(this["cScale"+J],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#FF6B6B",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#1B5E20",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#0D47A1",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#BF360C",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#F57F17",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#4A148C",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},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||Ri(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((T=this.xyChart)==null?void 0:T.titleColor)||this.primaryTextColor,dataLabelColor:((B=this.xyChart)==null?void 0:B.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((L=this.xyChart)==null?void 0:L.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((M=this.xyChart)==null?void 0:M.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((F=this.xyChart)==null?void 0:F.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(($=this.xyChart)==null?void 0:$.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((N=this.xyChart)==null?void 0:N.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((j=this.xyChart)==null?void 0:j.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ot=this.xyChart)==null?void 0:ot.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((K=this.xyChart)==null?void 0:K.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Y=this.xyChart)==null?void 0:Y.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:((Z=this.radar)==null?void 0:Z.axisColor)||this.lineColor,axisStrokeWidth:((it=this.radar)==null?void 0:it.axisStrokeWidth)||2,axisLabelFontSize:((X=this.radar)==null?void 0:X.axisLabelFontSize)||12,curveOpacity:((U=this.radar)==null?void 0:U.curveOpacity)||.5,curveStrokeWidth:((D=this.radar)==null?void 0:D.curveStrokeWidth)||2,graticuleColor:((I=this.radar)==null?void 0:I.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((z=this.radar)==null?void 0:z.graticuleStrokeWidth)||1,graticuleOpacity:((P=this.radar)==null?void 0:P.graticuleOpacity)||.3,legendBoxSize:((G=this.radar)==null?void 0:G.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((nt=this.wardley)==null?void 0:nt.axisColor)||this.lineColor,axisTextColor:((ht=this.wardley)==null?void 0:ht.axisTextColor)||this.primaryTextColor,gridColor:((yt=this.wardley)==null?void 0:yt.gridColor)||this.gridColor,componentFill:((Ct=this.wardley)==null?void 0:Ct.componentFill)||this.mainBkg,componentStroke:((wt=this.wardley)==null?void 0:wt.componentStroke)||this.lineColor,componentLabelColor:((kt=this.wardley)==null?void 0:kt.componentLabelColor)||this.primaryTextColor,linkStroke:((Dt=this.wardley)==null?void 0:Dt.linkStroke)||this.lineColor,evolutionStroke:((vt=this.wardley)==null?void 0:vt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((dt=this.wardley)==null?void 0:dt.annotationStroke)||this.lineColor,annotationTextColor:((Tt=this.wardley)==null?void 0:Tt.annotationTextColor)||this.primaryTextColor,annotationFill:((Bt=this.wardley)==null?void 0:Bt.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||V(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||V(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(Ms,"Theme"),Ms),S3=S(e=>{const t=new k3;return t.calculate(e),t},"getThemeVariables"),Ds,w3=(Ds=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=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ut(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=Cn(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,o,l,c,h,d,f,p,g,x,y,C,k,v,T,B,L,M,F,$,N,j,ot,K,Y,Z,it,X,U,D,I,z,P,G,R,q,nt,ht,yt,Ct,wt,kt,Dt,vt,dt,Tt,Bt;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 J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScale"+J]=lt(this["cScale"+J],10),this["cScalePeer"+J]=this["cScalePeer"+J]||lt(this["cScale"+J],25);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||E(this["cScale"+J],{h:180});for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{h:30,l:-(5+J*5)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{h:30,l:-(7+J*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||V(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||V(this.labelTextColor);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||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.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#8B0000",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#E8F5E9",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#E3F2FD",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FBE9E7",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},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||Ri(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:((v=this.radar)==null?void 0:v.axisColor)||this.lineColor,axisStrokeWidth:((T=this.radar)==null?void 0:T.axisStrokeWidth)||2,axisLabelFontSize:((B=this.radar)==null?void 0:B.axisLabelFontSize)||12,curveOpacity:((L=this.radar)==null?void 0:L.curveOpacity)||.5,curveStrokeWidth:((M=this.radar)==null?void 0:M.curveStrokeWidth)||2,graticuleColor:((F=this.radar)==null?void 0:F.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(($=this.radar)==null?void 0:$.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((j=this.radar)==null?void 0:j.legendBoxSize)||12,legendFontSize:((ot=this.radar)==null?void 0:ot.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((K=this.wardley)==null?void 0:K.backgroundColor)||this.background,axisColor:((Y=this.wardley)==null?void 0:Y.axisColor)||this.lineColor,axisTextColor:((Z=this.wardley)==null?void 0:Z.axisTextColor)||this.primaryTextColor,gridColor:((it=this.wardley)==null?void 0:it.gridColor)||this.gridColor,componentFill:((X=this.wardley)==null?void 0:X.componentFill)||this.background,componentStroke:((U=this.wardley)==null?void 0:U.componentStroke)||this.lineColor,componentLabelColor:((D=this.wardley)==null?void 0:D.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((z=this.wardley)==null?void 0:z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((P=this.wardley)==null?void 0:P.annotationStroke)||this.lineColor,annotationTextColor:((G=this.wardley)==null?void 0:G.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.background},this.xyChart={backgroundColor:((q=this.xyChart)==null?void 0:q.backgroundColor)||this.background,titleColor:((nt=this.xyChart)==null?void 0:nt.titleColor)||this.primaryTextColor,dataLabelColor:((ht=this.xyChart)==null?void 0:ht.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((wt=this.xyChart)==null?void 0:wt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((kt=this.xyChart)==null?void 0:kt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Dt=this.xyChart)==null?void 0:Dt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((vt=this.xyChart)==null?void 0:vt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((dt=this.xyChart)==null?void 0:dt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Tt=this.xyChart)==null?void 0:Tt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Bt=this.xyChart)==null?void 0:Bt.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(V(this.git0),25),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||V(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(Ds,"Theme"),Ds),T3=S(e=>{const t=new w3;return t.calculate(e),t},"getThemeVariables"),Rs,_3=(Rs=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=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.primaryColor),this.lineColor=V(this.background),this.textColor=V(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,o,l,c,h,d,f,p,g,x,y,C,k,v,T,B,L,M,F,$,N,j,ot,K,Y,Z,it,X,U,D,I,z,P,G,R,q,nt,ht,yt,Ct,wt,kt,Dt,vt,dt,Tt,Bt;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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||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 J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScale"+J]=lt(this["cScale"+J],10),this["cScalePeer"+J]=this["cScalePeer"+J]||lt(this["cScale"+J],25);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||E(this["cScale"+J],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.scaleLabelColor;for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{h:30,s:-30,l:-(5+J*5)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{h:30,s:-30,l:-(8+J*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.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#8B4513",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#C8E6C9",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#DCEDC8",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FFE0B2",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#FFF9C4",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#D7CCC8",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},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||Ri(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:((v=this.radar)==null?void 0:v.axisColor)||this.lineColor,axisStrokeWidth:((T=this.radar)==null?void 0:T.axisStrokeWidth)||2,axisLabelFontSize:((B=this.radar)==null?void 0:B.axisLabelFontSize)||12,curveOpacity:((L=this.radar)==null?void 0:L.curveOpacity)||.5,curveStrokeWidth:((M=this.radar)==null?void 0:M.curveStrokeWidth)||2,graticuleColor:((F=this.radar)==null?void 0:F.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(($=this.radar)==null?void 0:$.graticuleStrokeWidth)||1,graticuleOpacity:((N=this.radar)==null?void 0:N.graticuleOpacity)||.3,legendBoxSize:((j=this.radar)==null?void 0:j.legendBoxSize)||12,legendFontSize:((ot=this.radar)==null?void 0:ot.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((K=this.wardley)==null?void 0:K.backgroundColor)||this.background,axisColor:((Y=this.wardley)==null?void 0:Y.axisColor)||this.lineColor,axisTextColor:((Z=this.wardley)==null?void 0:Z.axisTextColor)||this.primaryTextColor,gridColor:((it=this.wardley)==null?void 0:it.gridColor)||this.gridColor,componentFill:((X=this.wardley)==null?void 0:X.componentFill)||this.background,componentStroke:((U=this.wardley)==null?void 0:U.componentStroke)||this.lineColor,componentLabelColor:((D=this.wardley)==null?void 0:D.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((z=this.wardley)==null?void 0:z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((P=this.wardley)==null?void 0:P.annotationStroke)||this.lineColor,annotationTextColor:((G=this.wardley)==null?void 0:G.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.background},this.xyChart={backgroundColor:((q=this.xyChart)==null?void 0:q.backgroundColor)||this.background,titleColor:((nt=this.xyChart)==null?void 0:nt.titleColor)||this.primaryTextColor,dataLabelColor:((ht=this.xyChart)==null?void 0:ht.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((wt=this.xyChart)==null?void 0:wt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((kt=this.xyChart)==null?void 0:kt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Dt=this.xyChart)==null?void 0:Dt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((vt=this.xyChart)==null?void 0:vt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((dt=this.xyChart)==null?void 0:dt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Tt=this.xyChart)==null?void 0:Tt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Bt=this.xyChart)==null?void 0:Bt.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||V(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(Rs,"Theme"),Rs),B3=S(e=>{const t=new _3;return t.calculate(e),t},"getThemeVariables"),Fs,E3=(Fs=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=Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.lineColor=V(this.background),this.textColor=V(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,o,l,c,h,d,f,p,g,x,y,C,k,v,T,B,L,M,F,$,N,j,ot,K,Y,Z,it,X,U,D,I,z,P,G,R,q,nt,ht,yt,Ct,wt,kt,Dt,vt,dt,Tt,Bt;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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleInv"+J]=this["cScaleInv"+J]||V(this["cScale"+J]);for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this.darkMode?this["cScalePeer"+J]=this["cScalePeer"+J]||st(this["cScale"+J],10):this["cScalePeer"+J]=this["cScalePeer"+J]||lt(this["cScale"+J],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let J=0;J<this.THEME_COLOR_LIMIT;J++)this["cScaleLabel"+J]=this["cScaleLabel"+J]||this.scaleLabelColor;for(let J=0;J<5;J++)this["surface"+J]=this["surface"+J]||E(this.mainBkg,{l:-(5+J*5)}),this["surfacePeer"+J]=this["surfacePeer"+J]||E(this.mainBkg,{l:-(8+J*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 J=0;J<this.THEME_COLOR_LIMIT;J++)this["pie"+J]=this["cScale"+J];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 J=0;J<8;J++)this["venn"+(J+1)]=this["venn"+(J+1)]??this["cScale"+J];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((l=this.cynefin)==null?void 0:l.cliffColor)||"#8B0000",cliffWidth:((c=this.cynefin)==null?void 0:c.cliffWidth)||4,arrowColor:((h=this.cynefin)==null?void 0:h.arrowColor)||this.lineColor,arrowWidth:((d=this.cynefin)==null?void 0:d.arrowWidth)||2,complexBg:((f=this.cynefin)==null?void 0:f.complexBg)||"#E8F5E9",complicatedBg:((p=this.cynefin)==null?void 0:p.complicatedBg)||"#E3F2FD",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FBE9E7",clearBg:((x=this.cynefin)==null?void 0:x.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((k=this.cynefin)==null?void 0:k.labelColor)||this.primaryTextColor},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||Ri(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((T=this.xyChart)==null?void 0:T.titleColor)||this.primaryTextColor,dataLabelColor:((B=this.xyChart)==null?void 0:B.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((L=this.xyChart)==null?void 0:L.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((M=this.xyChart)==null?void 0:M.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((F=this.xyChart)==null?void 0:F.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(($=this.xyChart)==null?void 0:$.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((N=this.xyChart)==null?void 0:N.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((j=this.xyChart)==null?void 0:j.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ot=this.xyChart)==null?void 0:ot.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((K=this.xyChart)==null?void 0:K.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Y=this.xyChart)==null?void 0:Y.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((Z=this.radar)==null?void 0:Z.axisColor)||this.lineColor,axisStrokeWidth:((it=this.radar)==null?void 0:it.axisStrokeWidth)||2,axisLabelFontSize:((X=this.radar)==null?void 0:X.axisLabelFontSize)||12,curveOpacity:((U=this.radar)==null?void 0:U.curveOpacity)||.5,curveStrokeWidth:((D=this.radar)==null?void 0:D.curveStrokeWidth)||2,graticuleColor:((I=this.radar)==null?void 0:I.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((z=this.radar)==null?void 0:z.graticuleStrokeWidth)||1,graticuleOpacity:((P=this.radar)==null?void 0:P.graticuleOpacity)||.3,legendBoxSize:((G=this.radar)==null?void 0:G.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((nt=this.wardley)==null?void 0:nt.axisColor)||this.lineColor,axisTextColor:((ht=this.wardley)==null?void 0:ht.axisTextColor)||this.primaryTextColor,gridColor:((yt=this.wardley)==null?void 0:yt.gridColor)||this.gridColor,componentFill:((Ct=this.wardley)==null?void 0:Ct.componentFill)||this.background,componentStroke:((wt=this.wardley)==null?void 0:wt.componentStroke)||this.lineColor,componentLabelColor:((kt=this.wardley)==null?void 0:kt.componentLabelColor)||this.primaryTextColor,linkStroke:((Dt=this.wardley)==null?void 0:Dt.linkStroke)||this.lineColor,evolutionStroke:((vt=this.wardley)==null?void 0:vt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((dt=this.wardley)==null?void 0:dt.annotationStroke)||this.lineColor,annotationTextColor:((Tt=this.wardley)==null?void 0:Tt.annotationTextColor)||this.primaryTextColor,annotationFill:((Bt=this.wardley)==null?void 0:Bt.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(Fs,"Theme"),Fs),L3=S(e=>{const t=new E3;return t.calculate(e),t},"getThemeVariables"),zs,A3=(zs=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=Ut(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,d,f,p,g,x,y,C,k;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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=lt(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=lt(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||V(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||st(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||lt(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(8+v*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||Ri(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:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(zs,"Theme"),zs),M3=S(e=>{const t=new A3;return t.calculate(e),t},"getThemeVariables"),Os,D3=(Os=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(V("#323D47"),10),this.border1="#ccc",this.border2=Cn(255,255,255,.25),this.arrowheadColor=V(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,o,l,c,h,d,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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=lt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=lt(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||V(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||st(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||lt(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||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||Ri(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:((o=this.xyChart)==null?void 0:o.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:((d=this.xyChart)==null?void 0:d.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(Os,"Theme"),Os),R3=S(e=>{const t=new D3;return t.calculate(e),t},"getThemeVariables"),$s,F3=($s=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=Ut("#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,d,f,p,g,x,y,C,k;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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=this.mainBkg;if(this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=lt(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=lt(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||V(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||st(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||lt(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(8+v*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||Ri(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:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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($s,"Theme"),$s),z3=S(e=>{const t=new F3;return t.calculate(e),t},"getThemeVariables"),Ns,O3=(Ns=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(V("#323D47"),10),this.border1="#ccc",this.border2=Cn(255,255,255,.25),this.arrowheadColor=V(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,o,l,c,h,d,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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=lt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=lt(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||V(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||st(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||lt(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||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||Ri(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:((o=this.xyChart)==null?void 0:o.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:((d=this.xyChart)==null?void 0:d.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(Ns,"Theme"),Ns),$3=S(e=>{const t=new O3;return t.calculate(e),t},"getThemeVariables"),Is,N3=(Is=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=Ut(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,d,f,p,g,x,y,C,k;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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;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 v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||V(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||st(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||lt(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const o=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||E(this.mainBkg,{h:180,s:-15,l:o*(8+v*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||Ri(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:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(Is,"Theme"),Is),I3=S(e=>{const t=new N3;return t.calculate(e),t},"getThemeVariables"),qs,q3=(qs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=st(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=V(this.background),this.secondaryBorderColor=Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ut(this.tertiaryColor,this.darkMode),this.primaryTextColor=V(this.primaryColor),this.secondaryTextColor=V(this.secondaryColor),this.tertiaryTextColor=V(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=st(V("#323D47"),10),this.border1="#ccc",this.border2=Cn(255,255,255,.25),this.arrowheadColor=V(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,o,l,c,h,d,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||Ut(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ut(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ut(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ut(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||V(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||V(this.tertiaryColor),this.lineColor=this.lineColor||V(this.background),this.arrowheadColor=this.arrowheadColor||V(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||V(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||V(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||st(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||lt(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=lt(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||E(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||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||Ri(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:((o=this.xyChart)==null?void 0:o.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:((d=this.xyChart)==null?void 0:d.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||V(this.git0),this.gitInv1=this.gitInv1||V(this.git1),this.gitInv2=this.gitInv2||V(this.git2),this.gitInv3=this.gitInv3||V(this.git3),this.gitInv4=this.gitInv4||V(this.git4),this.gitInv5=this.gitInv5||V(this.git5),this.gitInv6=this.gitInv6||V(this.git6),this.gitInv7=this.gitInv7||V(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||ta,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ea}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(qs,"Theme"),qs),j3=S(e=>{const t=new q3;return t.calculate(e),t},"getThemeVariables"),Aa={base:{getThemeVariables:v3},dark:{getThemeVariables:S3},default:{getThemeVariables:T3},forest:{getThemeVariables:B3},neutral:{getThemeVariables:L3},neo:{getThemeVariables:M3},"neo-dark":{getThemeVariables:R3},redux:{getThemeVariables:z3},"redux-dark":{getThemeVariables:$3},"redux-color":{getThemeVariables:I3},"redux-dark-color":{getThemeVariables:j3}},hr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Q1={...hr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Aa.default.getThemeVariables(),sequence:{...hr.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:{...hr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...hr.c4,useWidth:void 0,personFont:S(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...hr.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:{...hr.pie,useWidth:984},xyChart:{...hr.xyChart,useWidth:void 0},requirement:{...hr.requirement,useWidth:void 0},packet:{...hr.packet},eventmodeling:{...hr.eventmodeling},treeView:{...hr.treeView,useWidth:void 0},radar:{...hr.radar},railroad:{...hr.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...hr.ishikawa},sankey:{...hr.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:{...hr.venn},cynefin:{...hr.cynefin}},K1=S((e,t="")=>Object.keys(e).reduce((i,a)=>Array.isArray(e[a])?i:typeof e[a]=="object"&&e[a]!==null?[...i,t+a,...K1(e[a],"")]:[...i,t+a],[]),"keyify"),H3=new Set(K1(Q1,"")),Z1=Q1,P3={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},W3=S((e,t)=>{for(const i of Object.keys(e)){const a=e[i];(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof a!="string"||!t.test(a))&&(mt.debug("sanitize deleting dictionary entry:",i,a),delete e[i])}},"sanitizeDictionaryConfig"),Gu=S(e=>{if(mt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Gu(t));return}for(const t of Object.keys(e)){if(mt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!H3.has(t)||e[t]==null){mt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const a=P3[t];a?W3(e[t],a):(mt.debug("sanitizing object",t),Gu(e[t]));continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const a of i)t.includes(a)&&(mt.debug("sanitizing css option",t),e[t]=J1(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"),J1=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"),Ys=Object.freeze(Z1),ra=S(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Wr=Je({},Ys),Vu,fo=[],Tc=Je({},Ys),Ld=S((e,t)=>{let i=Je({},e),a={};for(const o of t)rk(o),a=Je(a,o);if(i=Je(i,a),a.theme&&a.theme in Aa){const o=Je({},Vu),l=Je(o.themeVariables||{},a.themeVariables);i.theme&&i.theme in Aa&&(i.themeVariables=Aa[i.theme].getThemeVariables(l))}return Tc=i,ak(Tc),Tc},"updateCurrentConfig"),U3=S(e=>(Wr=Je({},Ys),Wr=Je(Wr,e),e.theme&&Aa[e.theme]&&(Wr.themeVariables=Aa[e.theme].getThemeVariables(e.themeVariables)),Ld(Wr,fo),Wr),"setSiteConfig"),Y3=S(e=>{Vu=Je({},e)},"saveConfigFromInitialize"),G3=S(e=>(Wr=Je(Wr,e),Ld(Wr,fo),Wr),"updateSiteConfig"),tk=S(()=>Je({},Wr),"getSiteConfig"),ek=S(e=>(ak(e),Je(Tc,e),Ee()),"setConfig"),Ee=S(()=>Je({},Tc),"getConfig"),rk=S(e=>{e&&(["secure",...Wr.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"&&rk(e[t])}))},"sanitize"),V3=S(e=>{var t;Gu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),fo.push(e),Ld(Wr,fo)},"addDirective"),Xu=S((e=Wr)=>{fo=[],Ld(e,fo)},"reset"),X3={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."},av={},ik=S(e=>{av[e]||(mt.warn(X3[e]),av[e]=!0)},"issueWarning"),ak=S(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ik("LAZY_LOAD_DEPRECATED")},"checkConfig"),kj=S(()=>{let e={};Vu&&(e=Je(e,Vu));for(const t of fo)e=Je(e,t);return e},"getUserDefinedConfig"),Ar=S(e=>{var t,i;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&ik("FLOWCHART_HTML_LABELS_DEPRECATED"),ra(e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)??!0)},"getEffectiveHtmlLabels"),nk=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,_c=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Q3=/\s*%%.*\n/gm,js,ok=(js=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},S(js,"UnknownDiagramError"),js),po={},Nm=S(function(e,t){e=e.replace(nk,"").replace(_c,"").replace(Q3,`
`);for(const[i,{detector:a}]of Object.entries(po))if(a(e,t))return i;throw new ok(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Dg=S((...e)=>{for(const{id:t,detector:i,loader:a}of e)sk(t,i,a)},"registerLazyLoadedDiagrams"),sk=S((e,t,i)=>{po[e]&&mt.warn(`Detector with key ${e} already exists. Overwriting.`),po[e]={detector:t,loader:i},mt.debug(`Detector with key ${e} added${i?" with loader":""}`)},"addDetector"),K3=S(e=>po[e].loader,"getDiagramLoader"),Hc=/<br\s*\/?>/gi,Z3=S(e=>e?hk(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),J3=(()=>{let e=!1;return()=>{e||(lk(),e=!0)}})();function lk(){const e="data-temp-href-target";Us.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Us.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(lk,"setupDompurifyHooks");var ck=S(e=>(J3(),Us.sanitize(e)),"removeScript"),nv=S((e,t)=>{if(Ar(t)){const i=t.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?e=ck(e):i!=="loose"&&(e=hk(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=iM(e))}return e},"sanitizeMore"),Di=S((e,t)=>e&&(t.dompurifyConfig?e=Us.sanitize(nv(e,t),t.dompurifyConfig).toString():e=Us.sanitize(nv(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),tM=S((e,t)=>typeof e=="string"?Di(e,t):e.flat().map(i=>Di(i,t)),"sanitizeTextOrArray"),eM=S(e=>Hc.test(e),"hasBreaks"),rM=S(e=>e.split(Hc),"splitBreaks"),iM=S(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),hk=S(e=>e.replace(Hc,"#br#"),"breakToPlaceholder"),aM=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"),nM=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),oM=S(function(...e){const t=e.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),ov=S(function(e){const t=e.split(/(,)/),i=[];for(let a=0;a<t.length;a++){let o=t[a];if(o===","&&a>0&&a+1<t.length){const l=t[a-1],c=t[a+1];sM(l,c)&&(o=l+","+c,a++,i.pop())}i.push(lM(o))}return i.join("")},"parseGenericTypes"),Rg=S((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),sM=S((e,t)=>{const i=Rg(e,"~"),a=Rg(t,"~");return i===1&&a===1},"shouldCombineSets"),lM=S(e=>{const t=Rg(e,"~");let i=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),i=!0);const a=[...e];let o=a.indexOf("~"),l=a.lastIndexOf("~");for(;o!==-1&&l!==-1&&o!==l;)a[o]="<",a[l]=">",o=a.indexOf("~"),l=a.lastIndexOf("~");return i&&a.unshift("~"),a.join("")},"processSet"),sv=S(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Fg=/\$\$(.*?)\$\$/g,Ac=S(e=>{var t;return(((t=e.match(Fg))==null?void 0:t.length)??0)>0},"hasKatex"),Sj=S(async(e,t)=>{const i=document.createElement("div");i.innerHTML=await uk(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 o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),cM=S(async(e,t)=>{if(!Ac(e))return e;if(!(sv()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Fg,"MathML is unsupported in this environment.");{const{default:i}=await Qt(async()=>{const{default:o}=await import("./katex-C5jXJg4s.js");return{default:o}},[],import.meta.url),a=t.forceLegacyMathML||!sv()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Hc).map(o=>Ac(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Fg,(o,l)=>i.renderToString(l,{throwOnError:!0,displayMode:!0,output:a}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),uk=S(async(e,t)=>Di(await cM(e,t),t),"renderKatexSanitized"),Pc={getRows:Z3,sanitizeText:Di,sanitizeTextOrArray:tM,hasBreaks:eM,splitBreaks:rM,lineBreakRegex:Hc,removeScript:ck,getUrl:aM,evaluate:ra,getMax:nM,getMin:oM},hM=S(function(e,t){for(let i of t)e.attr(i[0],i[1])},"d3Attrs"),uM=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"),dk=S(function(e,t,i,a){const o=uM(t,i,a);hM(e,o)},"configureSvgSize"),dM=S(function(e,t,i,a){const o=t.node().getBBox(),l=o.width,c=o.height;mt.info(`SVG bounds: ${l}x${c}`,o);let h=0,d=0;mt.info(`Graph bounds: ${h}x${d}`,e),h=l+i*2,d=c+i*2,mt.info(`Calculated bounds: ${h}x${d}`),dk(t,d,h,a);const f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;t.attr("viewBox",f)},"setupGraphViewbox"),zu={};function zg(e){return[...e.cssRules].map(t=>t.cssText).join(`
`)}S(zg,"cssStyleSheetToString");var fM=S((e,t,i,a)=>{let o="";return e in zu&&zu[e]?o=zu[e]({...i,svgId:a}):mt.warn(`No theme found for ${e}`),` & {
    font-family: ${i.fontFamily};
    font-size: ${i.fontSize};
    fill: ${i.textColor}
  }
  @keyframes edge-animation-frame {
    from {
      stroke-dashoffset: 0;
    }
  }
  @keyframes dash {
    to {
      stroke-dashoffset: 0;
    }
  }
  & .edge-animation-slow {
    stroke-dasharray: 9,5 !important;
    stroke-dashoffset: 900;
    animation: dash 50s linear infinite;
    stroke-linecap: round;
  }
  & .edge-animation-fast {
    stroke-dasharray: 9,5 !important;
    stroke-dashoffset: 900;
    animation: dash 20s linear infinite;
    stroke-linecap: round;
  }
  /* Classes common for multiple diagrams */

  & .error-icon {
    fill: ${i.errorBkgColor};
  }
  & .error-text {
    fill: ${i.errorTextColor};
    stroke: ${i.errorTextColor};
  }

  & .edge-thickness-normal {
    stroke-width: ${i.strokeWidth??1}px;
  }
  & .edge-thickness-thick {
    stroke-width: 3.5px
  }
  & .edge-pattern-solid {
    stroke-dasharray: 0;
  }
  & .edge-thickness-invisible {
    stroke-width: 0;
    fill: none;
  }
  & .edge-pattern-dashed{
    stroke-dasharray: 3;
  }
  .edge-pattern-dotted {
    stroke-dasharray: 2;
  }

  & .marker {
    fill: ${i.lineColor};
    stroke: ${i.lineColor};
  }
  & .marker.cross {
    stroke: ${i.lineColor};
  }

  & svg {
    font-family: ${i.fontFamily};
    font-size: ${i.fontSize};
  }
   & p {
    margin: 0
   }

  ${o}
  .node .neo-node {
    stroke: ${i.nodeBorder};
  }

  [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }
  [data-look="neo"].swimlane.cluster rect {
    filter: none;
  }


  [data-look="neo"].node path {
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    stroke-width: ${i.strokeWidth??1}px;
  }

  [data-look="neo"].node .outer-path {
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

  [data-look="neo"].node .neo-line path {
    stroke: ${i.nodeBorder};
    filter: none;
  }

  [data-look="neo"].node circle{
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

  [data-look="neo"].node circle .state-start{
    fill: #000000;
  }

  [data-look="neo"].icon-shape .icon {
    fill: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

    [data-look="neo"].icon-shape .icon-neo path {
    stroke: ${i.useGradient?"url("+a+"-gradient)":i.nodeBorder};
    filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none"};
  }

  ${t}
`},"getStyles"),pM=S((e,t)=>{t!==void 0&&(zu[e]=t)},"addStylesForDiagram"),gM=fM,fk={};LA(fk,{clear:()=>mM,getAccDescription:()=>CM,getAccTitle:()=>xM,getDiagramTitle:()=>kM,setAccDescription:()=>bM,setAccTitle:()=>yM,setDiagramTitle:()=>vM});var Im="",qm="",jm="",Hm=S(e=>Di(e,Ee()),"sanitizeText"),mM=S(()=>{Im="",jm="",qm=""},"clear"),yM=S(e=>{Im=Hm(e).replace(/^\s+/g,"")},"setAccTitle"),xM=S(()=>Im,"getAccTitle"),bM=S(e=>{jm=Hm(e).replace(/\n\s+/g,`
`)},"setAccDescription"),CM=S(()=>jm,"getAccDescription"),vM=S(e=>{qm=Hm(e)},"setDiagramTitle"),kM=S(()=>qm,"getDiagramTitle"),lv=mt,SM=$m,he=Ee,wj=ek,Tj=Ys,Pm=S(e=>Di(e,he()),"sanitizeText"),wM=dM,TM=S(()=>fk,"getCommonDb"),Qu={},Ku=S((e,t,i)=>{var a;Qu[e]&&lv.warn(`Diagram with id ${e} already registered. Overwriting.`),Qu[e]=t,i&&sk(e,i),pM(e,t.styles),(a=t.injectUtils)==null||a.call(t,lv,SM,he,Pm,wM,TM(),()=>{})},"registerDiagram"),Og=S(e=>{if(e in Qu)return Qu[e];throw new _M(e)},"getDiagram"),Hs,_M=(Hs=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},S(Hs,"DiagramNotFoundError"),Hs),BM={value:()=>{}};function pk(){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 Ou(i)}function Ou(e){this._=e}function EM(e,t){return e.trim().split(/^|\s+/).map(function(i){var a="",o=i.indexOf(".");if(o>=0&&(a=i.slice(o+1),i=i.slice(0,o)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:a}})}Ou.prototype=pk.prototype={constructor:Ou,on:function(e,t){var i=this._,a=EM(e+"",i),o,l=-1,c=a.length;if(arguments.length<2){for(;++l<c;)if((o=(e=a[l]).type)&&(o=LM(i[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<c;)if(o=(e=a[l]).type)i[o]=cv(i[o],e.name,t);else if(t==null)for(o in i)i[o]=cv(i[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new Ou(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var i=new Array(o),a=0,o,l;a<o;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],a=0,o=l.length;a<o;++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],o=0,l=a.length;o<l;++o)a[o].value.apply(t,i)}};function LM(e,t){for(var i=0,a=e.length,o;i<a;++i)if((o=e[i]).name===t)return o.value}function cv(e,t,i){for(var a=0,o=e.length;a<o;++a)if(e[a].name===t){e[a]=BM,e=e.slice(0,a).concat(e.slice(a+1));break}return i!=null&&e.push({name:t,value:i}),e}var $g="http://www.w3.org/1999/xhtml";const hv={svg:"http://www.w3.org/2000/svg",xhtml:$g,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ad(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),hv.hasOwnProperty(t)?{space:hv[t],local:e}:e}function AM(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===$g&&t.documentElement.namespaceURI===$g?t.createElement(e):t.createElementNS(i,e)}}function MM(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function gk(e){var t=Ad(e);return(t.local?MM:AM)(t)}function DM(){}function Wm(e){return e==null?DM:function(){return this.querySelector(e)}}function RM(e){typeof e!="function"&&(e=Wm(e));for(var t=this._groups,i=t.length,a=new Array(i),o=0;o<i;++o)for(var l=t[o],c=l.length,h=a[o]=new Array(c),d,f,p=0;p<c;++p)(d=l[p])&&(f=e.call(d,d.__data__,p,l))&&("__data__"in d&&(f.__data__=d.__data__),h[p]=f);return new ni(a,this._parents)}function FM(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zM(){return[]}function mk(e){return e==null?zM:function(){return this.querySelectorAll(e)}}function OM(e){return function(){return FM(e.apply(this,arguments))}}function $M(e){typeof e=="function"?e=OM(e):e=mk(e);for(var t=this._groups,i=t.length,a=[],o=[],l=0;l<i;++l)for(var c=t[l],h=c.length,d,f=0;f<h;++f)(d=c[f])&&(a.push(e.call(d,d.__data__,f,c)),o.push(d));return new ni(a,o)}function yk(e){return function(){return this.matches(e)}}function xk(e){return function(t){return t.matches(e)}}var NM=Array.prototype.find;function IM(e){return function(){return NM.call(this.children,e)}}function qM(){return this.firstElementChild}function jM(e){return this.select(e==null?qM:IM(typeof e=="function"?e:xk(e)))}var HM=Array.prototype.filter;function PM(){return Array.from(this.children)}function WM(e){return function(){return HM.call(this.children,e)}}function UM(e){return this.selectAll(e==null?PM:WM(typeof e=="function"?e:xk(e)))}function YM(e){typeof e!="function"&&(e=yk(e));for(var t=this._groups,i=t.length,a=new Array(i),o=0;o<i;++o)for(var l=t[o],c=l.length,h=a[o]=[],d,f=0;f<c;++f)(d=l[f])&&e.call(d,d.__data__,f,l)&&h.push(d);return new ni(a,this._parents)}function bk(e){return new Array(e.length)}function GM(){return new ni(this._enter||this._groups.map(bk),this._parents)}function Zu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zu.prototype={constructor:Zu,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 VM(e){return function(){return e}}function XM(e,t,i,a,o,l){for(var c=0,h,d=t.length,f=l.length;c<f;++c)(h=t[c])?(h.__data__=l[c],a[c]=h):i[c]=new Zu(e,l[c]);for(;c<d;++c)(h=t[c])&&(o[c]=h)}function QM(e,t,i,a,o,l,c){var h,d,f=new Map,p=t.length,g=l.length,x=new Array(p),y;for(h=0;h<p;++h)(d=t[h])&&(x[h]=y=c.call(d,d.__data__,h,t)+"",f.has(y)?o[h]=d:f.set(y,d));for(h=0;h<g;++h)y=c.call(e,l[h],h,l)+"",(d=f.get(y))?(a[h]=d,d.__data__=l[h],f.delete(y)):i[h]=new Zu(e,l[h]);for(h=0;h<p;++h)(d=t[h])&&f.get(x[h])===d&&(o[h]=d)}function KM(e){return e.__data__}function ZM(e,t){if(!arguments.length)return Array.from(this,KM);var i=t?QM:XM,a=this._parents,o=this._groups;typeof e!="function"&&(e=VM(e));for(var l=o.length,c=new Array(l),h=new Array(l),d=new Array(l),f=0;f<l;++f){var p=a[f],g=o[f],x=g.length,y=JM(e.call(p,p&&p.__data__,f,a)),C=y.length,k=h[f]=new Array(C),v=c[f]=new Array(C),T=d[f]=new Array(x);i(p,g,k,v,T,y,t);for(var B=0,L=0,M,F;B<C;++B)if(M=k[B]){for(B>=L&&(L=B+1);!(F=v[L])&&++L<C;);M._next=F||null}}return c=new ni(c,a),c._enter=h,c._exit=d,c}function JM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function t5(){return new ni(this._exit||this._groups.map(bk),this._parents)}function e5(e,t,i){var a=this.enter(),o=this,l=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),i==null?l.remove():i(l),a&&o?a.merge(o).order():o}function r5(e){for(var t=e.selection?e.selection():e,i=this._groups,a=t._groups,o=i.length,l=a.length,c=Math.min(o,l),h=new Array(o),d=0;d<c;++d)for(var f=i[d],p=a[d],g=f.length,x=h[d]=new Array(g),y,C=0;C<g;++C)(y=f[C]||p[C])&&(x[C]=y);for(;d<o;++d)h[d]=i[d];return new ni(h,this._parents)}function i5(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var a=e[t],o=a.length-1,l=a[o],c;--o>=0;)(c=a[o])&&(l&&c.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(c,l),l=c);return this}function a5(e){e||(e=n5);function t(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var i=this._groups,a=i.length,o=new Array(a),l=0;l<a;++l){for(var c=i[l],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p])&&(d[p]=f);d.sort(t)}return new ni(o,this._parents).order()}function n5(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function o5(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function s5(){return Array.from(this)}function l5(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],o=0,l=a.length;o<l;++o){var c=a[o];if(c)return c}return null}function c5(){let e=0;for(const t of this)++e;return e}function h5(){return!this.node()}function u5(e){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var o=t[i],l=0,c=o.length,h;l<c;++l)(h=o[l])&&e.call(h,h.__data__,l,o);return this}function d5(e){return function(){this.removeAttribute(e)}}function f5(e){return function(){this.removeAttributeNS(e.space,e.local)}}function p5(e,t){return function(){this.setAttribute(e,t)}}function g5(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function m5(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function y5(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 x5(e,t){var i=Ad(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?f5:d5:typeof t=="function"?i.local?y5:m5:i.local?g5:p5)(i,t))}function Ck(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function b5(e){return function(){this.style.removeProperty(e)}}function C5(e,t,i){return function(){this.style.setProperty(e,t,i)}}function v5(e,t,i){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,i)}}function k5(e,t,i){return arguments.length>1?this.each((t==null?b5:typeof t=="function"?v5:C5)(e,t,i??"")):Gs(this.node(),e)}function Gs(e,t){return e.style.getPropertyValue(t)||Ck(e).getComputedStyle(e,null).getPropertyValue(t)}function S5(e){return function(){delete this[e]}}function w5(e,t){return function(){this[e]=t}}function T5(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function _5(e,t){return arguments.length>1?this.each((t==null?S5:typeof t=="function"?T5:w5)(e,t)):this.node()[e]}function vk(e){return e.trim().split(/^|\s+/)}function Um(e){return e.classList||new kk(e)}function kk(e){this._node=e,this._names=vk(e.getAttribute("class")||"")}kk.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=Um(e),a=-1,o=t.length;++a<o;)i.add(t[a])}function wk(e,t){for(var i=Um(e),a=-1,o=t.length;++a<o;)i.remove(t[a])}function B5(e){return function(){Sk(this,e)}}function E5(e){return function(){wk(this,e)}}function L5(e,t){return function(){(t.apply(this,arguments)?Sk:wk)(this,e)}}function A5(e,t){var i=vk(e+"");if(arguments.length<2){for(var a=Um(this.node()),o=-1,l=i.length;++o<l;)if(!a.contains(i[o]))return!1;return!0}return this.each((typeof t=="function"?L5:t?B5:E5)(i,t))}function M5(){this.textContent=""}function D5(e){return function(){this.textContent=e}}function R5(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function F5(e){return arguments.length?this.each(e==null?M5:(typeof e=="function"?R5:D5)(e)):this.node().textContent}function z5(){this.innerHTML=""}function O5(e){return function(){this.innerHTML=e}}function $5(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function N5(e){return arguments.length?this.each(e==null?z5:(typeof e=="function"?$5:O5)(e)):this.node().innerHTML}function I5(){this.nextSibling&&this.parentNode.appendChild(this)}function q5(){return this.each(I5)}function j5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function H5(){return this.each(j5)}function P5(e){var t=typeof e=="function"?e:gk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function W5(){return null}function U5(e,t){var i=typeof e=="function"?e:gk(e),a=t==null?W5:typeof t=="function"?t:Wm(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),a.apply(this,arguments)||null)})}function Y5(){var e=this.parentNode;e&&e.removeChild(this)}function G5(){return this.each(Y5)}function V5(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function X5(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Q5(e){return this.select(e?X5:V5)}function K5(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Z5(e){return function(t){e.call(this,t,this.__data__)}}function J5(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 tD(e){return function(){var t=this.__on;if(t){for(var i=0,a=-1,o=t.length,l;i<o;++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 eD(e,t,i){return function(){var a=this.__on,o,l=Z5(t);if(a){for(var c=0,h=a.length;c<h;++c)if((o=a[c]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=l,o.options=i),o.value=t;return}}this.addEventListener(e.type,l,i),o={type:e.type,name:e.name,value:t,listener:l,options:i},a?a.push(o):this.__on=[o]}}function rD(e,t,i){var a=J5(e+""),o,l=a.length,c;if(arguments.length<2){var h=this.node().__on;if(h){for(var d=0,f=h.length,p;d<f;++d)for(o=0,p=h[d];o<l;++o)if((c=a[o]).type===p.type&&c.name===p.name)return p.value}return}for(h=t?eD:tD,o=0;o<l;++o)this.each(h(a[o],t,i));return this}function Tk(e,t,i){var a=Ck(e),o=a.CustomEvent;typeof o=="function"?o=new o(t,i):(o=a.document.createEvent("Event"),i?(o.initEvent(t,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function iD(e,t){return function(){return Tk(this,e,t)}}function aD(e,t){return function(){return Tk(this,e,t.apply(this,arguments))}}function nD(e,t){return this.each((typeof t=="function"?aD:iD)(e,t))}function*oD(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var a=e[t],o=0,l=a.length,c;o<l;++o)(c=a[o])&&(yield c)}var _k=[null];function ni(e,t){this._groups=e,this._parents=t}function Wc(){return new ni([[document.documentElement]],_k)}function sD(){return this}ni.prototype=Wc.prototype={constructor:ni,select:RM,selectAll:$M,selectChild:jM,selectChildren:UM,filter:YM,data:ZM,enter:GM,exit:t5,join:e5,merge:r5,selection:sD,order:i5,sort:a5,call:o5,nodes:s5,node:l5,size:c5,empty:h5,each:u5,attr:x5,style:k5,property:_5,classed:A5,text:F5,html:N5,raise:q5,lower:H5,append:P5,insert:U5,remove:G5,clone:Q5,datum:K5,on:rD,dispatch:nD,[Symbol.iterator]:oD};function Zt(e){return typeof e=="string"?new ni([[document.querySelector(e)]],[document.documentElement]):new ni([[e]],_k)}function Ym(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function Bk(e,t){var i=Object.create(e.prototype);for(var a in t)i[a]=t[a];return i}function Uc(){}var Mc=.7,Ju=1/Mc,Es="\\s*([+-]?\\d+)\\s*",Dc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lD=/^#([0-9a-f]{3,8})$/,cD=new RegExp(`^rgb\\(${Es},${Es},${Es}\\)$`),hD=new RegExp(`^rgb\\(${Ki},${Ki},${Ki}\\)$`),uD=new RegExp(`^rgba\\(${Es},${Es},${Es},${Dc}\\)$`),dD=new RegExp(`^rgba\\(${Ki},${Ki},${Ki},${Dc}\\)$`),fD=new RegExp(`^hsl\\(${Dc},${Ki},${Ki}\\)$`),pD=new RegExp(`^hsla\\(${Dc},${Ki},${Ki},${Dc}\\)$`),uv={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};Ym(Uc,Rc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:dv,formatHex:dv,formatHex8:gD,formatHsl:mD,formatRgb:fv,toString:fv});function dv(){return this.rgb().formatHex()}function gD(){return this.rgb().formatHex8()}function mD(){return Ek(this).formatHsl()}function fv(){return this.rgb().formatRgb()}function Rc(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=lD.exec(e))?(i=t[1].length,t=parseInt(t[1],16),i===6?pv(t):i===3?new Yr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):i===8?yu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):i===4?yu(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=cD.exec(e))?new Yr(t[1],t[2],t[3],1):(t=hD.exec(e))?new Yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uD.exec(e))?yu(t[1],t[2],t[3],t[4]):(t=dD.exec(e))?yu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fD.exec(e))?yv(t[1],t[2]/100,t[3]/100,1):(t=pD.exec(e))?yv(t[1],t[2]/100,t[3]/100,t[4]):uv.hasOwnProperty(e)?pv(uv[e]):e==="transparent"?new Yr(NaN,NaN,NaN,0):null}function pv(e){return new Yr(e>>16&255,e>>8&255,e&255,1)}function yu(e,t,i,a){return a<=0&&(e=t=i=NaN),new Yr(e,t,i,a)}function yD(e){return e instanceof Uc||(e=Rc(e)),e?(e=e.rgb(),new Yr(e.r,e.g,e.b,e.opacity)):new Yr}function Ng(e,t,i,a){return arguments.length===1?yD(e):new Yr(e,t,i,a??1)}function Yr(e,t,i,a){this.r=+e,this.g=+t,this.b=+i,this.opacity=+a}Ym(Yr,Ng,Bk(Uc,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mc:Math.pow(Mc,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yr(ho(this.r),ho(this.g),ho(this.b),td(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:gv,formatHex:gv,formatHex8:xD,formatRgb:mv,toString:mv}));function gv(){return`#${so(this.r)}${so(this.g)}${so(this.b)}`}function xD(){return`#${so(this.r)}${so(this.g)}${so(this.b)}${so((isNaN(this.opacity)?1:this.opacity)*255)}`}function mv(){const e=td(this.opacity);return`${e===1?"rgb(":"rgba("}${ho(this.r)}, ${ho(this.g)}, ${ho(this.b)}${e===1?")":`, ${e})`}`}function td(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ho(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function so(e){return e=ho(e),(e<16?"0":"")+e.toString(16)}function yv(e,t,i,a){return a<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new Ei(e,t,i,a)}function Ek(e){if(e instanceof Ei)return new Ei(e.h,e.s,e.l,e.opacity);if(e instanceof Uc||(e=Rc(e)),!e)return new Ei;if(e instanceof Ei)return e;e=e.rgb();var t=e.r/255,i=e.g/255,a=e.b/255,o=Math.min(t,i,a),l=Math.max(t,i,a),c=NaN,h=l-o,d=(l+o)/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/=d<.5?l+o:2-l-o,c*=60):h=d>0&&d<1?0:c,new Ei(c,h,d,e.opacity)}function bD(e,t,i,a){return arguments.length===1?Ek(e):new Ei(e,t,i,a??1)}function Ei(e,t,i,a){this.h=+e,this.s=+t,this.l=+i,this.opacity=+a}Ym(Ei,bD,Bk(Uc,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new Ei(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mc:Math.pow(Mc,e),new Ei(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,o=2*i-a;return new Yr(dg(e>=240?e-240:e+120,o,a),dg(e,o,a),dg(e<120?e+240:e-120,o,a),this.opacity)},clamp(){return new Ei(xv(this.h),xu(this.s),xu(this.l),td(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=td(this.opacity);return`${e===1?"hsl(":"hsla("}${xv(this.h)}, ${xu(this.s)*100}%, ${xu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xv(e){return e=(e||0)%360,e<0?e+360:e}function xu(e){return Math.max(0,Math.min(1,e||0))}function dg(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 Gm=e=>()=>e;function Lk(e,t){return function(i){return e+i*t}}function CD(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 _j(e,t){var i=t-e;return i?Lk(e,i>180||i<-180?i-360*Math.round(i/360):i):Gm(isNaN(e)?t:e)}function vD(e){return(e=+e)==1?Ak:function(t,i){return i-t?CD(t,i,e):Gm(isNaN(t)?i:t)}}function Ak(e,t){var i=t-e;return i?Lk(e,i):Gm(isNaN(e)?t:e)}const bv=(function e(t){var i=vD(t);function a(o,l){var c=i((o=Ng(o)).r,(l=Ng(l)).r),h=i(o.g,l.g),d=i(o.b,l.b),f=Ak(o.opacity,l.opacity);return function(p){return o.r=c(p),o.g=h(p),o.b=d(p),o.opacity=f(p),o+""}}return a.gamma=e,a})(1);function mn(e,t){return e=+e,t=+t,function(i){return e*(1-i)+t*i}}var Ig=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fg=new RegExp(Ig.source,"g");function kD(e){return function(){return e}}function SD(e){return function(t){return e(t)+""}}function wD(e,t){var i=Ig.lastIndex=fg.lastIndex=0,a,o,l,c=-1,h=[],d=[];for(e=e+"",t=t+"";(a=Ig.exec(e))&&(o=fg.exec(t));)(l=o.index)>i&&(l=t.slice(i,l),h[c]?h[c]+=l:h[++c]=l),(a=a[0])===(o=o[0])?h[c]?h[c]+=o:h[++c]=o:(h[++c]=null,d.push({i:c,x:mn(a,o)})),i=fg.lastIndex;return i<t.length&&(l=t.slice(i),h[c]?h[c]+=l:h[++c]=l),h.length<2?d[0]?SD(d[0].x):kD(t):(t=d.length,function(f){for(var p=0,g;p<t;++p)h[(g=d[p]).i]=g.x(f);return h.join("")})}var Cv=180/Math.PI,qg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mk(e,t,i,a,o,l){var c,h,d;return(c=Math.sqrt(e*e+t*t))&&(e/=c,t/=c),(d=e*i+t*a)&&(i-=e*d,a-=t*d),(h=Math.sqrt(i*i+a*a))&&(i/=h,a/=h,d/=h),e*a<t*i&&(e=-e,t=-t,d=-d,c=-c),{translateX:o,translateY:l,rotate:Math.atan2(t,e)*Cv,skewX:Math.atan(d)*Cv,scaleX:c,scaleY:h}}var bu;function TD(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qg:Mk(t.a,t.b,t.c,t.d,t.e,t.f)}function _D(e){return e==null||(bu||(bu=document.createElementNS("http://www.w3.org/2000/svg","g")),bu.setAttribute("transform",e),!(e=bu.transform.baseVal.consolidate()))?qg:(e=e.matrix,Mk(e.a,e.b,e.c,e.d,e.e,e.f))}function Dk(e,t,i,a){function o(f){return f.length?f.pop()+" ":""}function l(f,p,g,x,y,C){if(f!==g||p!==x){var k=y.push("translate(",null,t,null,i);C.push({i:k-4,x:mn(f,g)},{i:k-2,x:mn(p,x)})}else(g||x)&&y.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(o(g)+"rotate(",null,a)-2,x:mn(f,p)})):p&&g.push(o(g)+"rotate("+p+a)}function h(f,p,g,x){f!==p?x.push({i:g.push(o(g)+"skewX(",null,a)-2,x:mn(f,p)}):p&&g.push(o(g)+"skewX("+p+a)}function d(f,p,g,x,y,C){if(f!==g||p!==x){var k=y.push(o(y)+"scale(",null,",",null,")");C.push({i:k-4,x:mn(f,g)},{i:k-2,x:mn(p,x)})}else(g!==1||x!==1)&&y.push(o(y)+"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),d(f.scaleX,f.scaleY,p.scaleX,p.scaleY,g,x),f=p=null,function(y){for(var C=-1,k=x.length,v;++C<k;)g[(v=x[C]).i]=v.x(y);return g.join("")}}}var BD=Dk(TD,"px, ","px)","deg)"),ED=Dk(_D,", ",")",")"),Vs=0,mc=0,nc=0,Rk=1e3,ed,yc,rd=0,go=0,Md=0,Fc=typeof performance=="object"&&performance.now?performance:Date,Fk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Vm(){return go||(Fk(LD),go=Fc.now()+Md)}function LD(){go=0}function id(){this._call=this._time=this._next=null}id.prototype=zk.prototype={constructor:id,restart:function(e,t,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?Vm():+i)+(t==null?0:+t),!this._next&&yc!==this&&(yc?yc._next=this:ed=this,yc=this),this._call=e,this._time=i,jg()},stop:function(){this._call&&(this._call=null,this._time=1/0,jg())}};function zk(e,t,i){var a=new id;return a.restart(e,t,i),a}function AD(){Vm(),++Vs;for(var e=ed,t;e;)(t=go-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Vs}function vv(){go=(rd=Fc.now())+Md,Vs=mc=0;try{AD()}finally{Vs=0,DD(),go=0}}function MD(){var e=Fc.now(),t=e-rd;t>Rk&&(Md-=t,rd=e)}function DD(){for(var e,t=ed,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:ed=i);yc=e,jg(a)}function jg(e){if(!Vs){mc&&(mc=clearTimeout(mc));var t=e-go;t>24?(e<1/0&&(mc=setTimeout(vv,e-Fc.now()-Md)),nc&&(nc=clearInterval(nc))):(nc||(rd=Fc.now(),nc=setInterval(MD,Rk)),Vs=1,Fk(vv))}}function kv(e,t,i){var a=new id;return t=t==null?0:+t,a.restart(o=>{a.stop(),e(o+t)},t,i),a}var RD=pk("start","end","cancel","interrupt"),FD=[],Ok=0,Sv=1,Hg=2,$u=3,wv=4,Pg=5,Nu=6;function Dd(e,t,i,a,o,l){var c=e.__transition;if(!c)e.__transition={};else if(i in c)return;zD(e,i,{name:t,index:a,group:o,on:RD,tween:FD,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Ok})}function Xm(e,t){var i=Fi(e,t);if(i.state>Ok)throw new Error("too late; already scheduled");return i}function ia(e,t){var i=Fi(e,t);if(i.state>$u)throw new Error("too late; already running");return i}function Fi(e,t){var i=e.__transition;if(!i||!(i=i[t]))throw new Error("transition not found");return i}function zD(e,t,i){var a=e.__transition,o;a[t]=i,i.timer=zk(l,0,i.time);function l(f){i.state=Sv,i.timer.restart(c,i.delay,i.time),i.delay<=f&&c(f-i.delay)}function c(f){var p,g,x,y;if(i.state!==Sv)return d();for(p in a)if(y=a[p],y.name===i.name){if(y.state===$u)return kv(c);y.state===wv?(y.state=Nu,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete a[p]):+p<t&&(y.state=Nu,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete a[p])}if(kv(function(){i.state===$u&&(i.state=wv,i.timer.restart(h,i.delay,i.time),h(f))}),i.state=Hg,i.on.call("start",e,e.__data__,i.index,i.group),i.state===Hg){for(i.state=$u,o=new Array(x=i.tween.length),p=0,g=-1;p<x;++p)(y=i.tween[p].value.call(e,e.__data__,i.index,i.group))&&(o[++g]=y);o.length=g+1}}function h(f){for(var p=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=Pg,1),g=-1,x=o.length;++g<x;)o[g].call(e,p);i.state===Pg&&(i.on.call("end",e,e.__data__,i.index,i.group),d())}function d(){i.state=Nu,i.timer.stop(),delete a[t];for(var f in a)return;delete e.__transition}}function OD(e,t){var i=e.__transition,a,o,l=!0,c;if(i){t=t==null?null:t+"";for(c in i){if((a=i[c]).name!==t){l=!1;continue}o=a.state>Hg&&a.state<Pg,a.state=Nu,a.timer.stop(),a.on.call(o?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete i[c]}l&&delete e.__transition}}function $D(e){return this.each(function(){OD(this,e)})}function ND(e,t){var i,a;return function(){var o=ia(this,e),l=o.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}}o.tween=a}}function ID(e,t,i){var a,o;if(typeof i!="function")throw new Error;return function(){var l=ia(this,e),c=l.tween;if(c!==a){o=(a=c).slice();for(var h={name:t,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===t){o[d]=h;break}d===f&&o.push(h)}l.tween=o}}function qD(e,t){var i=this._id;if(e+="",arguments.length<2){for(var a=Fi(this.node(),i).tween,o=0,l=a.length,c;o<l;++o)if((c=a[o]).name===e)return c.value;return null}return this.each((t==null?ND:ID)(i,e,t))}function Qm(e,t,i){var a=e._id;return e.each(function(){var o=ia(this,a);(o.value||(o.value={}))[t]=i.apply(this,arguments)}),function(o){return Fi(o,a).value[t]}}function $k(e,t){var i;return(typeof t=="number"?mn:t instanceof Rc?bv:(i=Rc(t))?(t=i,bv):wD)(e,t)}function jD(e){return function(){this.removeAttribute(e)}}function HD(e){return function(){this.removeAttributeNS(e.space,e.local)}}function PD(e,t,i){var a,o=i+"",l;return function(){var c=this.getAttribute(e);return c===o?null:c===a?l:l=t(a=c,i)}}function WD(e,t,i){var a,o=i+"",l;return function(){var c=this.getAttributeNS(e.space,e.local);return c===o?null:c===a?l:l=t(a=c,i)}}function UD(e,t,i){var a,o,l;return function(){var c,h=i(this),d;return h==null?void this.removeAttribute(e):(c=this.getAttribute(e),d=h+"",c===d?null:c===a&&d===o?l:(o=d,l=t(a=c,h)))}}function YD(e,t,i){var a,o,l;return function(){var c,h=i(this),d;return h==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),d=h+"",c===d?null:c===a&&d===o?l:(o=d,l=t(a=c,h)))}}function GD(e,t){var i=Ad(e),a=i==="transform"?ED:$k;return this.attrTween(e,typeof t=="function"?(i.local?YD:UD)(i,a,Qm(this,"attr."+e,t)):t==null?(i.local?HD:jD)(i):(i.local?WD:PD)(i,a,t))}function VD(e,t){return function(i){this.setAttribute(e,t.call(this,i))}}function XD(e,t){return function(i){this.setAttributeNS(e.space,e.local,t.call(this,i))}}function QD(e,t){var i,a;function o(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&XD(e,l)),i}return o._value=t,o}function KD(e,t){var i,a;function o(){var l=t.apply(this,arguments);return l!==a&&(i=(a=l)&&VD(e,l)),i}return o._value=t,o}function ZD(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=Ad(e);return this.tween(i,(a.local?QD:KD)(a,t))}function JD(e,t){return function(){Xm(this,e).delay=+t.apply(this,arguments)}}function tR(e,t){return t=+t,function(){Xm(this,e).delay=t}}function eR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?JD:tR)(t,e)):Fi(this.node(),t).delay}function rR(e,t){return function(){ia(this,e).duration=+t.apply(this,arguments)}}function iR(e,t){return t=+t,function(){ia(this,e).duration=t}}function aR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rR:iR)(t,e)):Fi(this.node(),t).duration}function nR(e,t){if(typeof t!="function")throw new Error;return function(){ia(this,e).ease=t}}function oR(e){var t=this._id;return arguments.length?this.each(nR(t,e)):Fi(this.node(),t).ease}function sR(e,t){return function(){var i=t.apply(this,arguments);if(typeof i!="function")throw new Error;ia(this,e).ease=i}}function lR(e){if(typeof e!="function")throw new Error;return this.each(sR(this._id,e))}function cR(e){typeof e!="function"&&(e=yk(e));for(var t=this._groups,i=t.length,a=new Array(i),o=0;o<i;++o)for(var l=t[o],c=l.length,h=a[o]=[],d,f=0;f<c;++f)(d=l[f])&&e.call(d,d.__data__,f,l)&&h.push(d);return new Da(a,this._parents,this._name,this._id)}function hR(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,i=e._groups,a=t.length,o=i.length,l=Math.min(a,o),c=new Array(a),h=0;h<l;++h)for(var d=t[h],f=i[h],p=d.length,g=c[h]=new Array(p),x,y=0;y<p;++y)(x=d[y]||f[y])&&(g[y]=x);for(;h<a;++h)c[h]=t[h];return new Da(c,this._parents,this._name,this._id)}function uR(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 dR(e,t,i){var a,o,l=uR(t)?Xm:ia;return function(){var c=l(this,e),h=c.on;h!==a&&(o=(a=h).copy()).on(t,i),c.on=o}}function fR(e,t){var i=this._id;return arguments.length<2?Fi(this.node(),i).on.on(e):this.each(dR(i,e,t))}function pR(e){return function(){var t=this.parentNode;for(var i in this.__transition)if(+i!==e)return;t&&t.removeChild(this)}}function gR(){return this.on("end.remove",pR(this._id))}function mR(e){var t=this._name,i=this._id;typeof e!="function"&&(e=Wm(e));for(var a=this._groups,o=a.length,l=new Array(o),c=0;c<o;++c)for(var h=a[c],d=h.length,f=l[c]=new Array(d),p,g,x=0;x<d;++x)(p=h[x])&&(g=e.call(p,p.__data__,x,h))&&("__data__"in p&&(g.__data__=p.__data__),f[x]=g,Dd(f[x],t,i,x,f,Fi(p,i)));return new Da(l,this._parents,t,i)}function yR(e){var t=this._name,i=this._id;typeof e!="function"&&(e=mk(e));for(var a=this._groups,o=a.length,l=[],c=[],h=0;h<o;++h)for(var d=a[h],f=d.length,p,g=0;g<f;++g)if(p=d[g]){for(var x=e.call(p,p.__data__,g,d),y,C=Fi(p,i),k=0,v=x.length;k<v;++k)(y=x[k])&&Dd(y,t,i,k,x,C);l.push(x),c.push(p)}return new Da(l,c,t,i)}var xR=Wc.prototype.constructor;function bR(){return new xR(this._groups,this._parents)}function CR(e,t){var i,a,o;return function(){var l=Gs(this,e),c=(this.style.removeProperty(e),Gs(this,e));return l===c?null:l===i&&c===a?o:o=t(i=l,a=c)}}function Nk(e){return function(){this.style.removeProperty(e)}}function vR(e,t,i){var a,o=i+"",l;return function(){var c=Gs(this,e);return c===o?null:c===a?l:l=t(a=c,i)}}function kR(e,t,i){var a,o,l;return function(){var c=Gs(this,e),h=i(this),d=h+"";return h==null&&(d=h=(this.style.removeProperty(e),Gs(this,e))),c===d?null:c===a&&d===o?l:(o=d,l=t(a=c,h))}}function SR(e,t){var i,a,o,l="style."+t,c="end."+l,h;return function(){var d=ia(this,e),f=d.on,p=d.value[l]==null?h||(h=Nk(t)):void 0;(f!==i||o!==p)&&(a=(i=f).copy()).on(c,o=p),d.on=a}}function wR(e,t,i){var a=(e+="")=="transform"?BD:$k;return t==null?this.styleTween(e,CR(e,a)).on("end.style."+e,Nk(e)):typeof t=="function"?this.styleTween(e,kR(e,a,Qm(this,"style."+e,t))).each(SR(this._id,e)):this.styleTween(e,vR(e,a,t),i).on("end.style."+e,null)}function TR(e,t,i){return function(a){this.style.setProperty(e,t.call(this,a),i)}}function _R(e,t,i){var a,o;function l(){var c=t.apply(this,arguments);return c!==o&&(a=(o=c)&&TR(e,c,i)),a}return l._value=t,l}function BR(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,_R(e,t,i??""))}function ER(e){return function(){this.textContent=e}}function LR(e){return function(){var t=e(this);this.textContent=t??""}}function AR(e){return this.tween("text",typeof e=="function"?LR(Qm(this,"text",e)):ER(e==null?"":e+""))}function MR(e){return function(t){this.textContent=e.call(this,t)}}function DR(e){var t,i;function a(){var o=e.apply(this,arguments);return o!==i&&(t=(i=o)&&MR(o)),t}return a._value=e,a}function RR(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,DR(e))}function FR(){for(var e=this._name,t=this._id,i=Ik(),a=this._groups,o=a.length,l=0;l<o;++l)for(var c=a[l],h=c.length,d,f=0;f<h;++f)if(d=c[f]){var p=Fi(d,t);Dd(d,e,i,f,c,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Da(a,this._parents,e,i)}function zR(){var e,t,i=this,a=i._id,o=i.size();return new Promise(function(l,c){var h={value:c},d={value:function(){--o===0&&l()}};i.each(function(){var f=ia(this,a),p=f.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(h),t._.interrupt.push(h),t._.end.push(d)),f.on=t}),o===0&&l()})}var OR=0;function Da(e,t,i,a){this._groups=e,this._parents=t,this._name=i,this._id=a}function Ik(){return++OR}var Ba=Wc.prototype;Da.prototype={constructor:Da,select:mR,selectAll:yR,selectChild:Ba.selectChild,selectChildren:Ba.selectChildren,filter:cR,merge:hR,selection:bR,transition:FR,call:Ba.call,nodes:Ba.nodes,node:Ba.node,size:Ba.size,empty:Ba.empty,each:Ba.each,on:fR,attr:GD,attrTween:ZD,style:wR,styleTween:BR,text:AR,textTween:RR,remove:gR,tween:qD,delay:eR,duration:aR,ease:oR,easeVarying:lR,end:zR,[Symbol.iterator]:Ba[Symbol.iterator]};function $R(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var NR={time:null,delay:0,duration:250,ease:$R};function IR(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 qR(e){var t,i;e instanceof Da?(t=e._id,e=e._name):(t=Ik(),(i=NR).time=Vm(),e=e==null?null:e+"");for(var a=this._groups,o=a.length,l=0;l<o;++l)for(var c=a[l],h=c.length,d,f=0;f<h;++f)(d=c[f])&&Dd(d,e,t,f,c,i||IR(d,t));return new Da(a,this._parents,e,t)}Wc.prototype.interrupt=$D;Wc.prototype.transition=qR;const Wg=Math.PI,Ug=2*Wg,io=1e-6,jR=Ug-io;function qk(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function HR(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qk;const i=10**t;return function(a){this._+=a[0];for(let o=1,l=a.length;o<l;++o)this._+=Math.round(arguments[o]*i)/i+a[o]}}class PR{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qk:HR(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,o){this._append`Q${+t},${+i},${this._x1=+a},${this._y1=+o}`}bezierCurveTo(t,i,a,o,l,c){this._append`C${+t},${+i},${+a},${+o},${this._x1=+l},${this._y1=+c}`}arcTo(t,i,a,o,l){if(t=+t,i=+i,a=+a,o=+o,l=+l,l<0)throw new Error(`negative radius: ${l}`);let c=this._x1,h=this._y1,d=a-t,f=o-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>io)if(!(Math.abs(g*d-f*p)>io)||!l)this._append`L${this._x1=t},${this._y1=i}`;else{let y=a-c,C=o-h,k=d*d+f*f,v=y*y+C*C,T=Math.sqrt(k),B=Math.sqrt(x),L=l*Math.tan((Wg-Math.acos((k+x-v)/(2*T*B)))/2),M=L/B,F=L/T;Math.abs(M-1)>io&&this._append`L${t+M*p},${i+M*g}`,this._append`A${l},${l},0,0,${+(g*y>p*C)},${this._x1=t+F*d},${this._y1=i+F*f}`}}arc(t,i,a,o,l,c){if(t=+t,i=+i,a=+a,c=!!c,a<0)throw new Error(`negative radius: ${a}`);let h=a*Math.cos(o),d=a*Math.sin(o),f=t+h,p=i+d,g=1^c,x=c?o-l:l-o;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>io||Math.abs(this._y1-p)>io)&&this._append`L${f},${p}`,a&&(x<0&&(x=x%Ug+Ug),x>jR?this._append`A${a},${a},0,1,${g},${t-h},${i-d}A${a},${a},0,1,${g},${this._x1=f},${this._y1=p}`:x>io&&this._append`A${a},${a},0,${+(x>=Wg)},${g},${this._x1=t+a*Math.cos(l)},${this._y1=i+a*Math.sin(l)}`)}rect(t,i,a,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${a=+a}v${+o}h${-a}Z`}toString(){return this._}}function ms(e){return function(){return e}}const Bj=Math.abs,Ej=Math.atan2,Lj=Math.cos,Aj=Math.max,Mj=Math.min,Dj=Math.sin,Rj=Math.sqrt,Tv=1e-12,Km=Math.PI,_v=Km/2,Fj=2*Km;function zj(e){return e>1?0:e<-1?Km:Math.acos(e)}function Oj(e){return e>=1?_v:e<=-1?-_v:Math.asin(e)}function WR(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 PR(t)}function UR(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jk(e){this._context=e}jk.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 Bc(e){return new jk(e)}function YR(e){return e[0]}function GR(e){return e[1]}function VR(e,t){var i=ms(!0),a=null,o=Bc,l=null,c=WR(h);e=typeof e=="function"?e:e===void 0?YR:ms(e),t=typeof t=="function"?t:t===void 0?GR:ms(t);function h(d){var f,p=(d=UR(d)).length,g,x=!1,y;for(a==null&&(l=o(y=c())),f=0;f<=p;++f)!(f<p&&i(g=d[f],f,d))===x&&((x=!x)?l.lineStart():l.lineEnd()),x&&l.point(+e(g,f,d),+t(g,f,d));if(y)return l=null,y+""||null}return h.x=function(d){return arguments.length?(e=typeof d=="function"?d:ms(+d),h):e},h.y=function(d){return arguments.length?(t=typeof d=="function"?d:ms(+d),h):t},h.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ms(!!d),h):i},h.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),h):o},h.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),h):a},h}class Hk{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 Pk(e){return new Hk(e,!0)}function Wk(e){return new Hk(e,!1)}function kn(){}function ad(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 Rd(e){this._context=e}Rd.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:ad(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:ad(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yg(e){return new Rd(e)}function Uk(e){this._context=e}Uk.prototype={areaStart:kn,areaEnd:kn,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:ad(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function XR(e){return new Uk(e)}function Yk(e){this._context=e}Yk.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:ad(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QR(e){return new Yk(e)}function Gk(e,t){this._basis=new Rd(e),this._beta=t}Gk.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],o=t[0],l=e[i]-a,c=t[i]-o,h=-1,d;++h<=i;)d=h/i,this._basis.point(this._beta*e[h]+(1-this._beta)*(a+d*l),this._beta*t[h]+(1-this._beta)*(o+d*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const KR=(function e(t){function i(a){return t===1?new Rd(a):new Gk(a,t)}return i.beta=function(a){return e(+a)},i})(.85);function nd(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 Zm(e,t){this._context=e,this._k=(1-t)/6}Zm.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:nd(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:nd(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 Vk=(function e(t){function i(a){return new Zm(a,t)}return i.tension=function(a){return e(+a)},i})(0);function Jm(e,t){this._context=e,this._k=(1-t)/6}Jm.prototype={areaStart:kn,areaEnd:kn,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:nd(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 ZR=(function e(t){function i(a){return new Jm(a,t)}return i.tension=function(a){return e(+a)},i})(0);function ty(e,t){this._context=e,this._k=(1-t)/6}ty.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:nd(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 JR=(function e(t){function i(a){return new ty(a,t)}return i.tension=function(a){return e(+a)},i})(0);function ey(e,t,i){var a=e._x1,o=e._y1,l=e._x2,c=e._y2;if(e._l01_a>Tv){var h=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,d=3*e._l01_a*(e._l01_a+e._l12_a);a=(a*h-e._x0*e._l12_2a+e._x2*e._l01_2a)/d,o=(o*h-e._y0*e._l12_2a+e._y2*e._l01_2a)/d}if(e._l23_a>Tv){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,o,l,c,e._x2,e._y2)}function Xk(e,t){this._context=e,this._alpha=t}Xk.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:ey(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 Qk=(function e(t){function i(a){return t?new Xk(a,t):new Zm(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Kk(e,t){this._context=e,this._alpha=t}Kk.prototype={areaStart:kn,areaEnd:kn,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:ey(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 tF=(function e(t){function i(a){return t?new Kk(a,t):new Jm(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Zk(e,t){this._context=e,this._alpha=t}Zk.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:ey(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 eF=(function e(t){function i(a){return t?new Zk(a,t):new ty(a,0)}return i.alpha=function(a){return e(+a)},i})(.5);function Jk(e){this._context=e}Jk.prototype={areaStart:kn,areaEnd:kn,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 rF(e){return new Jk(e)}function Bv(e){return e<0?-1:1}function Ev(e,t,i){var a=e._x1-e._x0,o=t-e._x1,l=(e._y1-e._y0)/(a||o<0&&-0),c=(i-e._y1)/(o||a<0&&-0),h=(l*o+c*a)/(a+o);return(Bv(l)+Bv(c))*Math.min(Math.abs(l),Math.abs(c),.5*Math.abs(h))||0}function Lv(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function pg(e,t,i){var a=e._x0,o=e._y0,l=e._x1,c=e._y1,h=(l-a)/3;e._context.bezierCurveTo(a+h,o+h*t,l-h,c-h*i,l,c)}function od(e){this._context=e}od.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:pg(this,this._t0,Lv(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,pg(this,Lv(this,i=Ev(this,e,t)),i);break;default:pg(this,this._t0,i=Ev(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=i}}};function tS(e){this._context=new eS(e)}(tS.prototype=Object.create(od.prototype)).point=function(e,t){od.prototype.point.call(this,t,e)};function eS(e){this._context=e}eS.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,o,l){this._context.bezierCurveTo(t,e,a,i,l,o)}};function rS(e){return new od(e)}function iS(e){return new tS(e)}function aS(e){this._context=e}aS.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=Av(e),o=Av(t),l=0,c=1;c<i;++l,++c)this._context.bezierCurveTo(a[0][l],o[0][l],a[1][l],o[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 Av(e){var t,i=e.length-1,a,o=new Array(i),l=new Array(i),c=new Array(i);for(o[0]=0,l[0]=2,c[0]=e[0]+2*e[1],t=1;t<i-1;++t)o[t]=1,l[t]=4,c[t]=4*e[t]+2*e[t+1];for(o[i-1]=2,l[i-1]=7,c[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)a=o[t]/l[t-1],l[t]-=a,c[t]-=a*c[t-1];for(o[i-1]=c[i-1]/l[i-1],t=i-2;t>=0;--t)o[t]=(c[t]-o[t+1])/l[t];for(l[i-1]=(e[i]+o[i-1])/2,t=0;t<i-1;++t)l[t]=2*e[t+1]-o[t+1];return[o,l]}function nS(e){return new aS(e)}function Fd(e,t){this._context=e,this._t=t}Fd.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 oS(e){return new Fd(e,.5)}function sS(e){return new Fd(e,0)}function lS(e){return new Fd(e,1)}function xc(e,t,i){this.k=e,this.x=t,this.y=i}xc.prototype={constructor:xc,scale:function(e){return e===1?this:new xc(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new xc(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+")"}};xc.prototype;var iF=S(e=>{var o;const{securityLevel:t}=he();let i=Zt("body");if(t==="sandbox"){const c=((o=Zt(`#i${e}`).node())==null?void 0:o.contentDocument)??document;i=Zt(c.body)}return i.select(`#${e}`)},"selectSvgElement");function ry(e){return typeof e>"u"||e===null}S(ry,"isNothing");function cS(e){return typeof e=="object"&&e!==null}S(cS,"isObject");function hS(e){return Array.isArray(e)?e:ry(e)?[]:[e]}S(hS,"toArray");function uS(e,t){var i,a,o,l;if(t)for(l=Object.keys(t),i=0,a=l.length;i<a;i+=1)o=l[i],e[o]=t[o];return e}S(uS,"extend");function dS(e,t){var i="",a;for(a=0;a<t;a+=1)i+=e;return i}S(dS,"repeat");function fS(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}S(fS,"isNegativeZero");var aF=ry,nF=cS,oF=hS,sF=dS,lF=fS,cF=uS,tr={isNothing:aF,isObject:nF,toArray:oF,repeat:sF,isNegativeZero:lF,extend:cF};function iy(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+=`

`+e.mark.snippet),a+" "+i):a}S(iy,"formatError");function Xs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=iy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}S(Xs,"YAMLException$1");Xs.prototype=Object.create(Error.prototype);Xs.prototype.constructor=Xs;Xs.prototype.toString=S(function(t){return this.name+": "+iy(this,t)},"toString");var Ur=Xs;function Iu(e,t,i,a,o){var l="",c="",h=Math.floor(o/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(Iu,"getLine");function qu(e,t){return tr.repeat(" ",t-e.length)+e}S(qu,"padStart");function pS(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],o=[],l,c=-1;l=i.exec(e.buffer);)o.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="",d,f,p=Math.min(e.line+t.linesAfter,o.length).toString().length,g=t.maxLength-(t.indent+p+3);for(d=1;d<=t.linesBefore&&!(c-d<0);d++)f=Iu(e.buffer,a[c-d],o[c-d],e.position-(a[c]-a[c-d]),g),h=tr.repeat(" ",t.indent)+qu((e.line-d+1).toString(),p)+" | "+f.str+`
`+h;for(f=Iu(e.buffer,a[c],o[c],e.position,g),h+=tr.repeat(" ",t.indent)+qu((e.line+1).toString(),p)+" | "+f.str+`
`,h+=tr.repeat("-",t.indent+p+3+f.pos)+`^
`,d=1;d<=t.linesAfter&&!(c+d>=o.length);d++)f=Iu(e.buffer,a[c+d],o[c+d],e.position-(a[c]-a[c+d]),g),h+=tr.repeat(" ",t.indent)+qu((e.line+d+1).toString(),p)+" | "+f.str+`
`;return h.replace(/\n$/,"")}S(pS,"makeSnippet");var hF=pS,uF=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],dF=["scalar","sequence","mapping"];function gS(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(a){t[String(a)]=i})}),t}S(gS,"compileStyleAliases");function mS(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(uF.indexOf(i)===-1)throw new Ur('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=gS(t.styleAliases||null),dF.indexOf(this.kind)===-1)throw new Ur('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}S(mS,"Type$1");var kr=mS;function Gg(e,t){var i=[];return e[t].forEach(function(a){var o=i.length;i.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(o=c)}),i[o]=a}),i}S(Gg,"compileList");function yS(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function a(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(S(a,"collectType"),t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(a);return e}S(yS,"compileMap");function sd(e){return this.extend(e)}S(sd,"Schema$1");sd.prototype.extend=S(function(t){var i=[],a=[];if(t instanceof kr)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 Ur("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(l){if(!(l instanceof kr))throw new Ur("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new Ur("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 Ur("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 kr))throw new Ur("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(sd.prototype);return o.implicit=(this.implicit||[]).concat(i),o.explicit=(this.explicit||[]).concat(a),o.compiledImplicit=Gg(o,"implicit"),o.compiledExplicit=Gg(o,"explicit"),o.compiledTypeMap=yS(o.compiledImplicit,o.compiledExplicit),o},"extend");var fF=sd,pF=new kr("tag:yaml.org,2002:str",{kind:"scalar",construct:S(function(e){return e!==null?e:""},"construct")}),gF=new kr("tag:yaml.org,2002:seq",{kind:"sequence",construct:S(function(e){return e!==null?e:[]},"construct")}),mF=new kr("tag:yaml.org,2002:map",{kind:"mapping",construct:S(function(e){return e!==null?e:{}},"construct")}),yF=new fF({explicit:[pF,gF,mF]});function xS(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}S(xS,"resolveYamlNull");function bS(){return null}S(bS,"constructYamlNull");function CS(e){return e===null}S(CS,"isNull");var xF=new kr("tag:yaml.org,2002:null",{kind:"scalar",resolve:xS,construct:bS,predicate:CS,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 vS(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(vS,"resolveYamlBoolean");function kS(e){return e==="true"||e==="True"||e==="TRUE"}S(kS,"constructYamlBoolean");function SS(e){return Object.prototype.toString.call(e)==="[object Boolean]"}S(SS,"isBoolean");var bF=new kr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:vS,construct:kS,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 wS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}S(wS,"isHexCode");function TS(e){return 48<=e&&e<=55}S(TS,"isOctCode");function _S(e){return 48<=e&&e<=57}S(_S,"isDecCode");function BS(e){if(e===null)return!1;var t=e.length,i=0,a=!1,o;if(!t)return!1;if(o=e[i],(o==="-"||o==="+")&&(o=e[++i]),o==="0"){if(i+1===t)return!0;if(o=e[++i],o==="b"){for(i++;i<t;i++)if(o=e[i],o!=="_"){if(o!=="0"&&o!=="1")return!1;a=!0}return a&&o!=="_"}if(o==="x"){for(i++;i<t;i++)if(o=e[i],o!=="_"){if(!wS(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}if(o==="o"){for(i++;i<t;i++)if(o=e[i],o!=="_"){if(!TS(e.charCodeAt(i)))return!1;a=!0}return a&&o!=="_"}}if(o==="_")return!1;for(;i<t;i++)if(o=e[i],o!=="_"){if(!_S(e.charCodeAt(i)))return!1;a=!0}return!(!a||o==="_")}S(BS,"resolveYamlInteger");function ES(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(ES,"constructYamlInteger");function LS(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!tr.isNegativeZero(e)}S(LS,"isInteger");var CF=new kr("tag:yaml.org,2002:int",{kind:"scalar",resolve:BS,construct:ES,predicate:LS,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"]}}),vF=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function AS(e){return!(e===null||!vF.test(e)||e[e.length-1]==="_")}S(AS,"resolveYamlFloat");function MS(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(MS,"constructYamlFloat");var kF=/^[-+]?[0-9]+e/;function DS(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(tr.isNegativeZero(e))return"-0.0";return i=e.toString(10),kF.test(i)?i.replace("e",".e"):i}S(DS,"representYamlFloat");function RS(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||tr.isNegativeZero(e))}S(RS,"isFloat");var SF=new kr("tag:yaml.org,2002:float",{kind:"scalar",resolve:AS,construct:MS,predicate:RS,represent:DS,defaultStyle:"lowercase"}),FS=yF.extend({implicit:[xF,bF,CF,SF]}),wF=FS,zS=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),OS=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 $S(e){return e===null?!1:zS.exec(e)!==null||OS.exec(e)!==null}S($S,"resolveYamlTimestamp");function NS(e){var t,i,a,o,l,c,h,d=0,f=null,p,g,x;if(t=zS.exec(e),t===null&&(t=OS.exec(e)),t===null)throw new Error("Date resolve error");if(i=+t[1],a=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(i,a,o));if(l=+t[4],c=+t[5],h=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}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,o,l,c,h,d)),f&&x.setTime(x.getTime()-f),x}S(NS,"constructYamlTimestamp");function IS(e){return e.toISOString()}S(IS,"representYamlTimestamp");var TF=new kr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$S,construct:NS,instanceOf:Date,represent:IS});function qS(e){return e==="<<"||e===null}S(qS,"resolveYamlMerge");var _F=new kr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:qS}),ay=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function jS(e){if(e===null)return!1;var t,i,a=0,o=e.length,l=ay;for(i=0;i<o;i++)if(t=l.indexOf(e.charAt(i)),!(t>64)){if(t<0)return!1;a+=6}return a%8===0}S(jS,"resolveYamlBinary");function HS(e){var t,i,a=e.replace(/[\r\n=]/g,""),o=a.length,l=ay,c=0,h=[];for(t=0;t<o;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=o%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(HS,"constructYamlBinary");function PS(e){var t="",i=0,a,o,l=e.length,c=ay;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 o=l%3,o===0?(t+=c[i>>18&63],t+=c[i>>12&63],t+=c[i>>6&63],t+=c[i&63]):o===2?(t+=c[i>>10&63],t+=c[i>>4&63],t+=c[i<<2&63],t+=c[64]):o===1&&(t+=c[i>>2&63],t+=c[i<<4&63],t+=c[64],t+=c[64]),t}S(PS,"representYamlBinary");function WS(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}S(WS,"isBinary");var BF=new kr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:jS,construct:HS,predicate:WS,represent:PS}),EF=Object.prototype.hasOwnProperty,LF=Object.prototype.toString;function US(e){if(e===null)return!0;var t=[],i,a,o,l,c,h=e;for(i=0,a=h.length;i<a;i+=1){if(o=h[i],c=!1,LF.call(o)!=="[object Object]")return!1;for(l in o)if(EF.call(o,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(US,"resolveYamlOmap");function YS(e){return e!==null?e:[]}S(YS,"constructYamlOmap");var AF=new kr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:US,construct:YS}),MF=Object.prototype.toString;function GS(e){if(e===null)return!0;var t,i,a,o,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1){if(a=c[t],MF.call(a)!=="[object Object]"||(o=Object.keys(a),o.length!==1))return!1;l[t]=[o[0],a[o[0]]]}return!0}S(GS,"resolveYamlPairs");function VS(e){if(e===null)return[];var t,i,a,o,l,c=e;for(l=new Array(c.length),t=0,i=c.length;t<i;t+=1)a=c[t],o=Object.keys(a),l[t]=[o[0],a[o[0]]];return l}S(VS,"constructYamlPairs");var DF=new kr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:GS,construct:VS}),RF=Object.prototype.hasOwnProperty;function XS(e){if(e===null)return!0;var t,i=e;for(t in i)if(RF.call(i,t)&&i[t]!==null)return!1;return!0}S(XS,"resolveYamlSet");function QS(e){return e!==null?e:{}}S(QS,"constructYamlSet");var FF=new kr("tag:yaml.org,2002:set",{kind:"mapping",resolve:XS,construct:QS}),KS=wF.extend({implicit:[TF,_F],explicit:[BF,AF,DF,FF]}),Sn=Object.prototype.hasOwnProperty,ld=1,ZS=2,JS=3,cd=4,gg=1,zF=2,Mv=3,OF=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$F=/[\x85\u2028\u2029]/,NF=/[,\[\]\{\}]/,t2=/^(?:!|!!|![a-z\-]+!)$/i,e2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Vg(e){return Object.prototype.toString.call(e)}S(Vg,"_class");function Ai(e){return e===10||e===13}S(Ai,"is_EOL");function vn(e){return e===9||e===32}S(vn,"is_WHITE_SPACE");function Er(e){return e===9||e===32||e===10||e===13}S(Er,"is_WS_OR_EOL");function lo(e){return e===44||e===91||e===93||e===123||e===125}S(lo,"is_FLOW_INDICATOR");function r2(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}S(r2,"fromHexCode");function i2(e){return e===120?2:e===117?4:e===85?8:0}S(i2,"escapedHexLen");function a2(e){return 48<=e&&e<=57?e-48:-1}S(a2,"fromDecimalCode");function Xg(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?"	":e===110?`
`: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(Xg,"simpleEscapeSequence");function n2(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}S(n2,"charFromCodepoint");function ny(e,t,i){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[t]=i}S(ny,"setProperty");var o2=new Array(256),s2=new Array(256);for(eo=0;eo<256;eo++)o2[eo]=Xg(eo)?1:0,s2[eo]=Xg(eo);var eo;function l2(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||KS,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(l2,"State$1");function oy(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=hF(i),new Ur(t,i)}S(oy,"generateError");function $t(e,t){throw oy(e,t)}S($t,"throwError");function zc(e,t){e.onWarning&&e.onWarning.call(null,oy(e,t))}S(zc,"throwWarning");var Dv={YAML:S(function(t,i,a){var o,l,c;t.version!==null&&$t(t,"duplication of %YAML directive"),a.length!==1&&$t(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),o===null&&$t(t,"ill-formed argument of the YAML directive"),l=parseInt(o[1],10),c=parseInt(o[2],10),l!==1&&$t(t,"unacceptable YAML version of the document"),t.version=a[0],t.checkLineBreaks=c<2,c!==1&&c!==2&&zc(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:S(function(t,i,a){var o,l;a.length!==2&&$t(t,"TAG directive accepts exactly two arguments"),o=a[0],l=a[1],t2.test(o)||$t(t,"ill-formed tag handle (first argument) of the TAG directive"),Sn.call(t.tagMap,o)&&$t(t,'there is a previously declared suffix for "'+o+'" tag handle'),e2.test(l)||$t(t,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{$t(t,"tag prefix is malformed: "+l)}t.tagMap[o]=l},"handleTagDirective")};function Ma(e,t,i,a){var o,l,c,h;if(t<i){if(h=e.input.slice(t,i),a)for(o=0,l=h.length;o<l;o+=1)c=h.charCodeAt(o),c===9||32<=c&&c<=1114111||$t(e,"expected valid JSON character");else OF.test(h)&&$t(e,"the stream contains non-printable characters");e.result+=h}}S(Ma,"captureSegment");function Qg(e,t,i,a){var o,l,c,h;for(tr.isObject(i)||$t(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(i),c=0,h=o.length;c<h;c+=1)l=o[c],Sn.call(t,l)||(ny(t,l,i[l]),a[l]=!0)}S(Qg,"mergeMappings");function co(e,t,i,a,o,l,c,h,d){var f,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),f=0,p=o.length;f<p;f+=1)Array.isArray(o[f])&&$t(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Vg(o[f])==="[object Object]"&&(o[f]="[object Object]");if(typeof o=="object"&&Vg(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(f=0,p=l.length;f<p;f+=1)Qg(e,t,l[f],i);else Qg(e,t,l,i);else!e.json&&!Sn.call(i,o)&&Sn.call(t,o)&&(e.line=c||e.line,e.lineStart=h||e.lineStart,e.position=d||e.position,$t(e,"duplicated mapping key")),ny(t,o,l),delete i[o];return t}S(co,"storeMappingPair");function zd(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++):$t(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}S(zd,"readLineBreak");function $e(e,t,i){for(var a=0,o=e.input.charCodeAt(e.position);o!==0;){for(;vn(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Ai(o))for(zd(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return i!==-1&&a!==0&&e.lineIndent<i&&zc(e,"deficient indentation"),a}S($e,"skipSeparationSpace");function Yc(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||Er(i)))}S(Yc,"testDocumentSeparator");function Od(e,t){t===1?e.result+=" ":t>1&&(e.result+=tr.repeat(`
`,t-1))}S(Od,"writeFoldedLines");function c2(e,t,i){var a,o,l,c,h,d,f,p,g=e.kind,x=e.result,y;if(y=e.input.charCodeAt(e.position),Er(y)||lo(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(o=e.input.charCodeAt(e.position+1),Er(o)||i&&lo(o)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,h=!1;y!==0;){if(y===58){if(o=e.input.charCodeAt(e.position+1),Er(o)||i&&lo(o))break}else if(y===35){if(a=e.input.charCodeAt(e.position-1),Er(a))break}else{if(e.position===e.lineStart&&Yc(e)||i&&lo(y))break;if(Ai(y))if(d=e.line,f=e.lineStart,p=e.lineIndent,$e(e,!1,-1),e.lineIndent>=t){h=!0,y=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=d,e.lineStart=f,e.lineIndent=p;break}}h&&(Ma(e,l,c,!1),Od(e,e.line-d),l=c=e.position,h=!1),vn(y)||(c=e.position+1),y=e.input.charCodeAt(++e.position)}return Ma(e,l,c,!1),e.result?!0:(e.kind=g,e.result=x,!1)}S(c2,"readPlainScalar");function h2(e,t){var i,a,o;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=o=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(Ma(e,a,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)a=e.position,e.position++,o=e.position;else return!0;else Ai(i)?(Ma(e,a,o,!0),Od(e,$e(e,!1,t)),a=o=e.position):e.position===e.lineStart&&Yc(e)?$t(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);$t(e,"unexpected end of the stream within a single quoted scalar")}S(h2,"readSingleQuotedScalar");function u2(e,t){var i,a,o,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 Ma(e,i,e.position,!0),e.position++,!0;if(h===92){if(Ma(e,i,e.position,!0),h=e.input.charCodeAt(++e.position),Ai(h))$e(e,!1,t);else if(h<256&&o2[h])e.result+=s2[h],e.position++;else if((c=i2(h))>0){for(o=c,l=0;o>0;o--)h=e.input.charCodeAt(++e.position),(c=r2(h))>=0?l=(l<<4)+c:$t(e,"expected hexadecimal character");e.result+=n2(l),e.position++}else $t(e,"unknown escape sequence");i=a=e.position}else Ai(h)?(Ma(e,i,a,!0),Od(e,$e(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Yc(e)?$t(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}$t(e,"unexpected end of the stream within a double quoted scalar")}S(u2,"readDoubleQuotedScalar");function d2(e,t){var i=!0,a,o,l,c=e.tag,h,d=e.anchor,f,p,g,x,y,C=Object.create(null),k,v,T,B;if(B=e.input.charCodeAt(e.position),B===91)p=93,y=!1,h=[];else if(B===123)p=125,y=!0,h={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=h),B=e.input.charCodeAt(++e.position);B!==0;){if($e(e,!0,t),B=e.input.charCodeAt(e.position),B===p)return e.position++,e.tag=c,e.anchor=d,e.kind=y?"mapping":"sequence",e.result=h,!0;i?B===44&&$t(e,"expected the node content, but found ','"):$t(e,"missed comma between flow collection entries"),v=k=T=null,g=x=!1,B===63&&(f=e.input.charCodeAt(e.position+1),Er(f)&&(g=x=!0,e.position++,$e(e,!0,t))),a=e.line,o=e.lineStart,l=e.position,mo(e,t,ld,!1,!0),v=e.tag,k=e.result,$e(e,!0,t),B=e.input.charCodeAt(e.position),(x||e.line===a)&&B===58&&(g=!0,B=e.input.charCodeAt(++e.position),$e(e,!0,t),mo(e,t,ld,!1,!0),T=e.result),y?co(e,h,C,v,k,T,a,o,l):g?h.push(co(e,null,C,v,k,T,a,o,l)):h.push(k),$e(e,!0,t),B=e.input.charCodeAt(e.position),B===44?(i=!0,B=e.input.charCodeAt(++e.position)):i=!1}$t(e,"unexpected end of the stream within a flow collection")}S(d2,"readFlowCollection");function f2(e,t){var i,a,o=gg,l=!1,c=!1,h=t,d=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)gg===o?o=g===43?Mv:zF:$t(e,"repeat of a chomping mode identifier");else if((p=a2(g))>=0)p===0?$t(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?$t(e,"repeat of an indentation width identifier"):(h=t+p-1,c=!0);else break;if(vn(g)){do g=e.input.charCodeAt(++e.position);while(vn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!Ai(g)&&g!==0)}for(;g!==0;){for(zd(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),Ai(g)){d++;continue}if(e.lineIndent<h){o===Mv?e.result+=tr.repeat(`
`,l?1+d:d):o===gg&&l&&(e.result+=`
`);break}for(a?vn(g)?(f=!0,e.result+=tr.repeat(`
`,l?1+d:d)):f?(f=!1,e.result+=tr.repeat(`
`,d+1)):d===0?l&&(e.result+=" "):e.result+=tr.repeat(`
`,d):e.result+=tr.repeat(`
`,l?1+d:d),l=!0,c=!0,d=0,i=e.position;!Ai(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Ma(e,i,e.position,!1)}return!0}S(f2,"readBlockScalar");function Kg(e,t){var i,a=e.tag,o=e.anchor,l=[],c,h=!1,d;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),d=e.input.charCodeAt(e.position);d!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$t(e,"tab characters must not be used in indentation")),!(d!==45||(c=e.input.charCodeAt(e.position+1),!Er(c))));){if(h=!0,e.position++,$e(e,!0,-1)&&e.lineIndent<=t){l.push(null),d=e.input.charCodeAt(e.position);continue}if(i=e.line,mo(e,t,JS,!1,!0),l.push(e.result),$e(e,!0,-1),d=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&d!==0)$t(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return h?(e.tag=a,e.anchor=o,e.kind="sequence",e.result=l,!0):!1}S(Kg,"readBlockSequence");function p2(e,t,i){var a,o,l,c,h,d,f=e.tag,p=e.anchor,g={},x=Object.create(null),y=null,C=null,k=null,v=!1,T=!1,B;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),B=e.input.charCodeAt(e.position);B!==0;){if(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$t(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(B===63||B===58)&&Er(a))B===63?(v&&(co(e,g,x,y,C,null,c,h,d),y=C=k=null),T=!0,v=!0,o=!0):v?(v=!1,o=!0):$t(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,B=a;else{if(c=e.line,h=e.lineStart,d=e.position,!mo(e,i,ZS,!1,!0))break;if(e.line===l){for(B=e.input.charCodeAt(e.position);vn(B);)B=e.input.charCodeAt(++e.position);if(B===58)B=e.input.charCodeAt(++e.position),Er(B)||$t(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(co(e,g,x,y,C,null,c,h,d),y=C=k=null),T=!0,v=!1,o=!1,y=e.tag,C=e.result;else if(T)$t(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=f,e.anchor=p,!0}else if(T)$t(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)&&(v&&(c=e.line,h=e.lineStart,d=e.position),mo(e,t,cd,!0,o)&&(v?C=e.result:k=e.result),v||(co(e,g,x,y,C,k,c,h,d),y=C=k=null),$e(e,!0,-1),B=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>t)&&B!==0)$t(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&co(e,g,x,y,C,null,c,h,d),T&&(e.tag=f,e.anchor=p,e.kind="mapping",e.result=g),T}S(p2,"readBlockMapping");function g2(e){var t,i=!1,a=!1,o,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&$t(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,o="!!",c=e.input.charCodeAt(++e.position)):o="!",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)):$t(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!Er(c);)c===33&&(a?$t(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),t2.test(o)||$t(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),NF.test(l)&&$t(e,"tag suffix cannot contain flow indicator characters")}l&&!e2.test(l)&&$t(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{$t(e,"tag name is malformed: "+l)}return i?e.tag=l:Sn.call(e.tagMap,o)?e.tag=e.tagMap[o]+l:o==="!"?e.tag="!"+l:o==="!!"?e.tag="tag:yaml.org,2002:"+l:$t(e,'undeclared tag handle "'+o+'"'),!0}S(g2,"readTagProperty");function m2(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&$t(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Er(i)&&!lo(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&$t(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}S(m2,"readAnchorProperty");function y2(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&&!Er(a)&&!lo(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&$t(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),Sn.call(e.anchorMap,i)||$t(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],$e(e,!0,-1),!0}S(y2,"readAlias");function mo(e,t,i,a,o){var l,c,h,d=1,f=!1,p=!1,g,x,y,C,k,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=h=cd===i||JS===i,a&&$e(e,!0,-1)&&(f=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),d===1)for(;g2(e)||m2(e);)$e(e,!0,-1)?(f=!0,h=l,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):h=!1;if(h&&(h=f||o),(d===1||cd===i)&&(ld===i||ZS===i?k=t:k=t+1,v=e.position-e.lineStart,d===1?h&&(Kg(e,v)||p2(e,v,k))||d2(e,k)?p=!0:(c&&f2(e,k)||h2(e,k)||u2(e,k)?p=!0:y2(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&$t(e,"alias node should not have any properties")):c2(e,k,ld===i)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(p=h&&Kg(e,v))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&$t(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,x=e.implicitTypes.length;g<x;g+=1)if(C=e.implicitTypes[g],C.resolve(e.result)){e.result=C.construct(e.result),e.tag=C.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Sn.call(e.typeMap[e.kind||"fallback"],e.tag))C=e.typeMap[e.kind||"fallback"][e.tag];else for(C=null,y=e.typeMap.multi[e.kind||"fallback"],g=0,x=y.length;g<x;g+=1)if(e.tag.slice(0,y[g].tag.length)===y[g].tag){C=y[g];break}C||$t(e,"unknown tag !<"+e.tag+">"),e.result!==null&&C.kind!==e.kind&&$t(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+C.kind+'", not "'+e.kind+'"'),C.resolve(e.result,e.tag)?(e.result=C.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):$t(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(mo,"composeNode");function x2(e){var t=e.position,i,a,o,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&&($e(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&&!Er(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(i,e.position),o=[],a.length<1&&$t(e,"directive name must not be less than one character in length");c!==0;){for(;vn(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!Ai(c));break}if(Ai(c))break;for(i=e.position;c!==0&&!Er(c);)c=e.input.charCodeAt(++e.position);o.push(e.input.slice(i,e.position))}c!==0&&zd(e),Sn.call(Dv,a)?Dv[a](e,a,o):zc(e,'unknown document directive "'+a+'"')}if($e(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,$e(e,!0,-1)):l&&$t(e,"directives end mark is expected"),mo(e,e.lineIndent-1,cd,!1,!0),$e(e,!0,-1),e.checkLineBreaks&&$F.test(e.input.slice(t,e.position))&&zc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Yc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,$e(e,!0,-1));return}if(e.position<e.length-1)$t(e,"end of the stream or a document separator is expected");else return}S(x2,"readDocument");function sy(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new l2(e,t),a=e.indexOf("\0");for(a!==-1&&(i.position=a,$t(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;)x2(i);return i.documents}S(sy,"loadDocuments");function IF(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var a=sy(e,i);if(typeof t!="function")return a;for(var o=0,l=a.length;o<l;o+=1)t(a[o])}S(IF,"loadAll$1");function b2(e,t){var i=sy(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new Ur("expected a single document in the stream, but found more")}}S(b2,"load$1");var qF=b2,jF={load:qF},C2=Object.prototype.toString,v2=Object.prototype.hasOwnProperty,ly=65279,HF=9,Oc=10,PF=13,WF=32,UF=33,YF=34,Zg=35,GF=37,VF=38,XF=39,QF=42,k2=44,KF=45,hd=58,ZF=61,JF=62,tz=63,ez=64,S2=91,w2=93,rz=96,T2=123,iz=124,_2=125,Sr={};Sr[0]="\\0";Sr[7]="\\a";Sr[8]="\\b";Sr[9]="\\t";Sr[10]="\\n";Sr[11]="\\v";Sr[12]="\\f";Sr[13]="\\r";Sr[27]="\\e";Sr[34]='\\"';Sr[92]="\\\\";Sr[133]="\\N";Sr[160]="\\_";Sr[8232]="\\L";Sr[8233]="\\P";var az=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],nz=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function B2(e,t){var i,a,o,l,c,h,d;if(t===null)return{};for(i={},a=Object.keys(t),o=0,l=a.length;o<l;o+=1)c=a[o],h=String(t[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),d=e.compiledTypeMap.fallback[c],d&&v2.call(d.styleAliases,h)&&(h=d.styleAliases[h]),i[c]=h;return i}S(B2,"compileStyleMap");function E2(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 Ur("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+tr.repeat("0",a-t.length)+t}S(E2,"encodeHex");var oz=1,$c=2;function L2(e){this.schema=e.schema||KS,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=tr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=B2(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==='"'?$c:oz,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(L2,"State");function Jg(e,t){for(var i=tr.repeat(" ",t),a=0,o=-1,l="",c,h=e.length;a<h;)o=e.indexOf(`
`,a),o===-1?(c=e.slice(a),a=h):(c=e.slice(a,o+1),a=o+1),c.length&&c!==`
`&&(l+=i),l+=c;return l}S(Jg,"indentString");function ud(e,t){return`
`+tr.repeat(" ",e.indent*t)}S(ud,"generateNextLine");function A2(e,t){var i,a,o;for(i=0,a=e.implicitTypes.length;i<a;i+=1)if(o=e.implicitTypes[i],o.resolve(t))return!0;return!1}S(A2,"testImplicitResolving");function Nc(e){return e===WF||e===HF}S(Nc,"isWhitespace");function Qs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ly||65536<=e&&e<=1114111}S(Qs,"isPrintable");function tm(e){return Qs(e)&&e!==ly&&e!==PF&&e!==Oc}S(tm,"isNsCharOrWhitespace");function em(e,t,i){var a=tm(e),o=a&&!Nc(e);return(i?a:a&&e!==k2&&e!==S2&&e!==w2&&e!==T2&&e!==_2)&&e!==Zg&&!(t===hd&&!o)||tm(t)&&!Nc(t)&&e===Zg||t===hd&&o}S(em,"isPlainSafe");function M2(e){return Qs(e)&&e!==ly&&!Nc(e)&&e!==KF&&e!==tz&&e!==hd&&e!==k2&&e!==S2&&e!==w2&&e!==T2&&e!==_2&&e!==Zg&&e!==VF&&e!==QF&&e!==UF&&e!==iz&&e!==ZF&&e!==JF&&e!==XF&&e!==YF&&e!==GF&&e!==ez&&e!==rz}S(M2,"isPlainSafeFirst");function D2(e){return!Nc(e)&&e!==hd}S(D2,"isPlainSafeLast");function Ts(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(Ts,"codePointAt");function cy(e){var t=/^\n* /;return t.test(e)}S(cy,"needIndentIndicator");var R2=1,rm=2,F2=3,z2=4,ks=5;function O2(e,t,i,a,o,l,c,h){var d,f=0,p=null,g=!1,x=!1,y=a!==-1,C=-1,k=M2(Ts(e,0))&&D2(Ts(e,e.length-1));if(t||c)for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=Ts(e,d),!Qs(f))return ks;k=k&&em(f,p,h),p=f}else{for(d=0;d<e.length;f>=65536?d+=2:d++){if(f=Ts(e,d),f===Oc)g=!0,y&&(x=x||d-C-1>a&&e[C+1]!==" ",C=d);else if(!Qs(f))return ks;k=k&&em(f,p,h),p=f}x=x||y&&d-C-1>a&&e[C+1]!==" "}return!g&&!x?k&&!c&&!o(e)?R2:l===$c?ks:rm:i>9&&cy(e)?ks:c?l===$c?ks:rm:x?z2:F2}S(O2,"chooseScalarStyle");function $2(e,t,i,a,o){e.dump=(function(){if(t.length===0)return e.quotingType===$c?'""':"''";if(!e.noCompatMode&&(az.indexOf(t)!==-1||nz.test(t)))return e.quotingType===$c?'"'+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 d(f){return A2(e,f)}switch(S(d,"testAmbiguity"),O2(t,h,e.indent,c,d,e.quotingType,e.forceQuotes&&!a,o)){case R2:return t;case rm:return"'"+t.replace(/'/g,"''")+"'";case F2:return"|"+im(t,e.indent)+am(Jg(t,l));case z2:return">"+im(t,e.indent)+am(Jg(N2(t,c),l));case ks:return'"'+I2(t)+'"';default:throw new Ur("impossible error: invalid scalar style")}})()}S($2,"writeScalar");function im(e,t){var i=cy(e)?String(t):"",a=e[e.length-1]===`
`,o=a&&(e[e.length-2]===`
`||e===`
`),l=o?"+":a?"":"-";return i+l+`
`}S(im,"blockHeader");function am(e){return e[e.length-1]===`
`?e.slice(0,-1):e}S(am,"dropEndingNewline");function N2(e,t){for(var i=/(\n+)([^\n]*)/g,a=(function(){var f=e.indexOf(`
`);return f=f!==-1?f:e.length,i.lastIndex=f,nm(e.slice(0,f),t)})(),o=e[0]===`
`||e[0]===" ",l,c;c=i.exec(e);){var h=c[1],d=c[2];l=d[0]===" ",a+=h+(!o&&!l&&d!==""?`
`:"")+nm(d,t),o=l}return a}S(N2,"foldString");function nm(e,t){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,a,o=0,l,c=0,h=0,d="";a=i.exec(e);)h=a.index,h-o>t&&(l=c>o?c:h,d+=`
`+e.slice(o,l),o=l+1),c=h;return d+=`
`,e.length-o>t&&c>o?d+=e.slice(o,c)+`
`+e.slice(c+1):d+=e.slice(o),d.slice(1)}S(nm,"foldLine");function I2(e){for(var t="",i=0,a,o=0;o<e.length;i>=65536?o+=2:o++)i=Ts(e,o),a=Sr[i],!a&&Qs(i)?(t+=e[o],i>=65536&&(t+=e[o+1])):t+=a||E2(i);return t}S(I2,"escapeString");function q2(e,t,i){var a="",o=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)),(Ji(e,t,h,!1,!1)||typeof h>"u"&&Ji(e,t,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=o,e.dump="["+a+"]"}S(q2,"writeFlowSequence");function om(e,t,i,a){var o="",l=e.tag,c,h,d;for(c=0,h=i.length;c<h;c+=1)d=i[c],e.replacer&&(d=e.replacer.call(i,String(c),d)),(Ji(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&Ji(e,t+1,null,!0,!0,!1,!0))&&((!a||o!=="")&&(o+=ud(e,t)),e.dump&&Oc===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=l,e.dump=o||"[]"}S(om,"writeBlockSequence");function j2(e,t,i){var a="",o=e.tag,l=Object.keys(i),c,h,d,f,p;for(c=0,h=l.length;c<h;c+=1)p="",a!==""&&(p+=", "),e.condenseFlow&&(p+='"'),d=l[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),Ji(e,t,d,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ji(e,t,f,!1,!1)&&(p+=e.dump,a+=p));e.tag=o,e.dump="{"+a+"}"}S(j2,"writeFlowMapping");function H2(e,t,i,a){var o="",l=e.tag,c=Object.keys(i),h,d,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 Ur("sortKeys must be a boolean or a function");for(h=0,d=c.length;h<d;h+=1)x="",(!a||o!=="")&&(x+=ud(e,t)),f=c[h],p=i[f],e.replacer&&(p=e.replacer.call(i,f,p)),Ji(e,t+1,f,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Oc===e.dump.charCodeAt(0)?x+="?":x+="? "),x+=e.dump,g&&(x+=ud(e,t)),Ji(e,t+1,p,!0,g)&&(e.dump&&Oc===e.dump.charCodeAt(0)?x+=":":x+=": ",x+=e.dump,o+=x));e.tag=l,e.dump=o||"{}"}S(H2,"writeBlockMapping");function sm(e,t,i){var a,o,l,c,h,d;for(o=i?e.explicitTypes:e.implicitTypes,l=0,c=o.length;l<c;l+=1)if(h=o[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(d=e.styleMap[h.tag]||h.defaultStyle,C2.call(h.represent)==="[object Function]")a=h.represent(t,d);else if(v2.call(h.represent,d))a=h.represent[d](t,d);else throw new Ur("!<"+h.tag+'> tag resolver accepts not "'+d+'" style');e.dump=a}return!0}return!1}S(sm,"detectType");function Ji(e,t,i,a,o,l,c){e.tag=null,e.dump=i,sm(e,i,!1)||sm(e,i,!0);var h=C2.call(e.dump),d=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)&&(o=!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?(H2(e,t,e.dump,o),x&&(e.dump="&ref_"+g+e.dump)):(j2(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,o):om(e,t,e.dump,o),x&&(e.dump="&ref_"+g+e.dump)):(q2(e,t,e.dump),x&&(e.dump="&ref_"+g+" "+e.dump));else if(h==="[object String]")e.tag!=="?"&&$2(e,e.dump,t,l,d);else{if(h==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ur("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(Ji,"writeNode");function P2(e,t){var i=[],a=[],o,l;for(dd(e,i,a),o=0,l=a.length;o<l;o+=1)t.duplicates.push(i[a[o]]);t.usedDuplicates=new Array(l)}S(P2,"getDuplicateReferences");function dd(e,t,i){var a,o,l;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)i.indexOf(o)===-1&&i.push(o);else if(t.push(e),Array.isArray(e))for(o=0,l=e.length;o<l;o+=1)dd(e[o],t,i);else for(a=Object.keys(e),o=0,l=a.length;o<l;o+=1)dd(e[a[o]],t,i)}S(dd,"inspectNode");function sz(e,t){t=t||{};var i=new L2(t);i.noRefs||P2(e,i);var a=e;return i.replacer&&(a=i.replacer.call({"":a},"",a)),Ji(i,0,a,!0,!0)?i.dump+`
`:""}S(sz,"dump$1");function lz(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(lz,"renamed");var cz=FS,hz=jF.load;/*! Bundled license information:

js-yaml/dist/js-yaml.mjs:
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
*/var uz=S(e=>{const{handDrawnSeed:t}=he();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Js=S(e=>{const t=dz([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),dz=S(e=>{const t=new Map;return e.forEach(i=>{const[a,o]=i.split(":");t.set(a.trim(),o==null?void 0:o.trim())}),t},"styles2Map"),W2=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"),Rt=S(e=>{const{stylesArray:t}=Js(e),i=[],a=[],o=[],l=[];return t.forEach(c=>{const h=c[0];W2(h)?i.push(c.join(":")+" !important"):(a.push(c.join(":")+" !important"),h.includes("stroke")&&o.push(c.join(":")+" !important"),h==="fill"&&l.push(c.join(":")+" !important"))}),{labelStyles:i.join(";"),nodeStyles:a.join(";"),stylesArray:t,borderStyles:o,backgroundStyles:l}},"styles2String"),Lt=S((e,t)=>{var d;const{themeVariables:i,handDrawnSeed:a}=he(),{nodeBorder:o,mainBkg:l}=i,{stylesMap:c}=Js(e);return Object.assign({roughness:.7,fill:c.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:c.get("stroke")||o,seed:a,strokeWidth:((d=c.get("stroke-width"))==null?void 0:d.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:fz(c.get("stroke-dasharray"))},t)},"userNodeOverrides"),fz=S(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const o=isNaN(t[0])?0:t[0];return[o,o]}const i=isNaN(t[0])?0:t[0],a=isNaN(t[1])?0:t[1];return[i,a]},"getStrokeDashArray"),Cu={},Ze={},Rv;function pz(){return Rv||(Rv=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.BLANK_URL=Ze.relativeFirstCharacters=Ze.whitespaceEscapeCharsRegex=Ze.urlSchemeRegex=Ze.ctrlCharactersRegex=Ze.htmlCtrlEntityRegex=Ze.htmlEntitiesRegex=Ze.invalidProtocolRegex=void 0,Ze.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ze.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ze.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ze.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ze.urlSchemeRegex=/^.+(:|&colon;)/gim,Ze.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ze.relativeFirstCharacters=[".","/"],Ze.BLANK_URL="about:blank"),Ze}var Fv;function gz(){if(Fv)return Cu;Fv=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.sanitizeUrl=l;var e=pz();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(d,f){return String.fromCharCode(f)})}function a(c){return URL.canParse(c)}function o(c){try{return decodeURIComponent(c)}catch{return c}}function l(c){if(!c)return e.BLANK_URL;var h,d=o(c.trim());do d=i(d).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),d=o(d),h=d.match(e.ctrlCharactersRegex)||d.match(e.htmlEntitiesRegex)||d.match(e.htmlCtrlEntityRegex)||d.match(e.whitespaceEscapeCharsRegex);while(h&&h.length>0);var f=d;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 y=p.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return y;if(x==="http:"||x==="https:"){if(!a(y))return e.BLANK_URL;var C=new URL(y);return C.protocol=C.protocol.toLowerCase(),C.hostname=C.hostname.toLowerCase(),C.toString()}return y}return Cu}var mz=gz();function mg(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 yz(){}function U2(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function hy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const xz="[object RegExp]",Y2="[object String]",G2="[object Number]",V2="[object Boolean]",X2="[object Arguments]",bz="[object Symbol]",Cz="[object Date]",vz="[object Map]",kz="[object Set]",Sz="[object Array]",wz="[object ArrayBuffer]",Tz="[object Object]",_z="[object DataView]",Bz="[object Uint8Array]",Ez="[object Uint8ClampedArray]",Lz="[object Uint16Array]",Az="[object Uint32Array]",Mz="[object Int8Array]",Dz="[object Int16Array]",Rz="[object Int32Array]",Fz="[object Float32Array]",zz="[object Float64Array]",zv=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function uy(e){return typeof zv.Buffer<"u"&&zv.Buffer.isBuffer(e)}function Oz(e){return Number.isSafeInteger(e)&&e>=0}function Q2(e){return e!=null&&typeof e!="function"&&Oz(e.length)}function $z(e){return e==="__proto__"}function dy(e){return e==null||typeof e!="object"&&typeof e!="function"}function fy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Nz(e,t){return _s(e,void 0,e,new Map,t)}function _s(e,t,i,a=new Map,o=void 0){const l=o==null?void 0:o(e,t,i,a);if(l!==void 0)return l;if(dy(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]=_s(e[h],h,i,a,o);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,d]of e)c.set(h,_s(d,h,i,a,o));return c}if(e instanceof Set){const c=new Set;a.set(e,c);for(const h of e)c.add(_s(h,void 0,i,a,o));return c}if(uy(e))return e.subarray();if(fy(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);a.set(e,c);for(let h=0;h<e.length;h++)c[h]=_s(e[h],h,i,a,o);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),Si(c,e,i,a,o),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return a.set(e,c),Si(c,e,i,a,o),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return a.set(e,c),Si(c,e,i,a,o),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,Si(c,e,i,a,o),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return a.set(e,c),Si(c,e,i,a,o),c}if(e instanceof Number){const c=new Number(e.valueOf());return a.set(e,c),Si(c,e,i,a,o),c}if(e instanceof String){const c=new String(e.valueOf());return a.set(e,c),Si(c,e,i,a,o),c}if(typeof e=="object"&&Iz(e)){const c=Object.create(Object.getPrototypeOf(e));return a.set(e,c),Si(c,e,i,a,o),c}return e}function Si(e,t,i=e,a,o){const l=[...Object.keys(t),...U2(t)];for(let c=0;c<l.length;c++){const h=l[c],d=Object.getOwnPropertyDescriptor(e,h);(d==null||d.writable)&&(e[h]=_s(t[h],h,i,a,o))}}function Iz(e){switch(hy(e)){case X2:case Sz:case wz:case _z:case V2:case Cz:case Fz:case zz:case Mz:case Dz:case Rz:case vz:case G2:case Tz:case xz:case kz:case Y2:case bz:case Bz:case Ez:case Lz:case Az:return!0;default:return!1}}function qz(e,t){return Nz(e,(i,a,o,l)=>{if(typeof e=="object"){if(hy(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return l.set(e,c),Si(c,e,o,l),c}switch(Object.prototype.toString.call(e)){case G2:case Y2:case V2:{const c=new e.constructor(e==null?void 0:e.valueOf());return Si(c,e),c}case X2:{const c={};return Si(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function Ov(e){return qz(e)}function lm(e){return e!==null&&typeof e=="object"&&hy(e)==="[object Arguments]"}function cm(e){return typeof e=="object"&&e!==null}function jz(e){return cm(e)&&Q2(e)}function Gc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const i=function(...a){const o=t?t.apply(this,a):a[0],l=i.cache;if(l.has(o))return l.get(o);const c=e.apply(this,a);return i.cache=l.set(o,c)||l,c};return i.cache=new(Gc.Cache||Map),i}Gc.Cache=Map;function ju(e){return fy(e)}function Hz(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Pz(e){if(dy(e))return e;if(Array.isArray(e)||fy(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}return typeof File<"u"&&e instanceof File?new i([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function Wz(e,...t){const i=t.slice(0,-1),a=t[t.length-1];let o=e;for(let l=0;l<i.length;l++){const c=i[l];o=Hu(o,c,a,new Map)}return o}function Hu(e,t,i,a){if(dy(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(a.has(t))return Pz(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 o=[...Object.keys(t),...U2(t)];for(let l=0;l<o.length;l++){const c=o[l];if($z(c))continue;let h=t[c],d=e[c];if(lm(h)&&(h={...h}),lm(d)&&(d={...d}),uy(h)&&(h=Ov(h)),Array.isArray(h))if(Array.isArray(d)){const p=[],g=Reflect.ownKeys(d);for(let x=0;x<g.length;x++){const y=g[x];p[y]=d[y]}d=p}else if(jz(d)){const p=[];for(let g=0;g<d.length;g++)p[g]=d[g];d=p}else d=[];const f=i(d,h,c,e,t,a);f!==void 0?e[c]=f:Array.isArray(h)||cm(d)&&cm(h)&&(mg(d)||mg(h)||ju(d)||ju(h))?e[c]=Hu(d,h,i,a):d==null&&mg(h)?e[c]=Hu({},h,i,a):d==null&&ju(h)?e[c]=Ov(h):(d===void 0||h!==void 0)&&(e[c]=h)}return e}function Uz(e,...t){return Wz(e,...t,yz)}function $v(e){if(e==null)return!0;if(Q2(e))return typeof e.splice!="function"&&typeof e!="string"&&!uy(e)&&!ju(e)&&!lm(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return Hz(e)?t.filter(i=>i!=="constructor").length===0:t.length===0}return!0}var Yz="​",Gz={curveBasis:Yg,curveBasisClosed:XR,curveBasisOpen:QR,curveBumpX:Pk,curveBumpY:Wk,curveBundle:KR,curveCardinalClosed:ZR,curveCardinalOpen:JR,curveCardinal:Vk,curveCatmullRomClosed:tF,curveCatmullRomOpen:eF,curveCatmullRom:Qk,curveLinear:Bc,curveLinearClosed:rF,curveMonotoneX:rS,curveMonotoneY:iS,curveNatural:nS,curveStep:oS,curveStepAfter:lS,curveStepBefore:sS},Vz=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xz=S(function(e,t){const i=K2(e,/(?:init\b)|(?:initialize\b)/);let a={};if(Array.isArray(i)){const c=i.map(h=>h.args);Gu(c),a=Je(a,[...c])}else a=i.args;if(!a)return;let o=Nm(e,t);const l="config";return a[l]!==void 0&&(o==="flowchart-v2"&&(o="flowchart"),a[o]=a[l],delete a[l]),a},"detectInit"),K2=S(function(e,t=null){var i,a;try{const o=new RegExp(`[%]{2}(?![{]${Vz.source})(?=[}][%]{2}).*
`,"ig");e=e.trim().replace(o,"").replace(/'/gm,'"'),mt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let l;const c=[];for(;(l=_c.exec(e))!==null;)if(l.index===_c.lastIndex&&_c.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],d=l[3]?l[3].trim():l[4]?JSON.parse(l[4].trim()):null;c.push({type:h,args:d})}return c.length===0?{type:e,args:null}:c.length===1?c[0]:c}catch(o){return mt.error(`ERROR: ${o.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Qz=S(function(e){return e.replace(_c,"")},"removeDirectives"),Kz=S(function(e,t){for(const[i,a]of t.entries())if(a.match(e))return i;return-1},"isSubstringInArray");function py(e,t){if(!e)return t;const i=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Gz[i]??t}S(py,"interpolateToCurve");function Z2(e,t){const i=e.trim();if(i)return t.securityLevel!=="loose"?mz.sanitizeUrl(i):i}S(Z2,"formatUrl");var Zz=S((e,...t)=>{const i=e.split("."),a=i.length-1,o=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[o](...t)},"runFunc");function gy(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}S(gy,"distance");function J2(e){let t,i=0;e.forEach(o=>{i+=gy(o,t),t=o});const a=i/2;return my(e,a)}S(J2,"traverseEdge");function tw(e){return e.length===1?e[0]:J2(e)}S(tw,"calcLabelPosition");var Nv=S((e,t=2)=>{const i=Math.pow(10,t);return Math.round(e*i)/i},"roundNumber"),my=S((e,t)=>{let i,a=t;for(const o of e){if(i){const l=gy(o,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:o.x,y:o.y};if(c>0&&c<1)return{x:Nv((1-c)*i.x+c*o.x,5),y:Nv((1-c)*i.y+c*o.y,5)}}}i=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Jz=S((e,t,i)=>{mt.info(`our points ${JSON.stringify(t)}`),t[0]!==i&&(t=t.reverse());const o=my(t,25),l=e?10:5,c=Math.atan2(t[0].y-o.y,t[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(c)*l+(t[0].x+o.x)/2,h.y=-Math.cos(c)*l+(t[0].y+o.y)/2,h},"calcCardinalityPosition");function ew(e,t,i){const a=structuredClone(i);mt.info("our points",a),t!=="start_left"&&t!=="start_right"&&a.reverse();const o=25+e,l=my(a,o),c=10+e*.5,h=Math.atan2(a[0].y-l.y,a[0].x-l.x),d={x:0,y:0};return t==="start_left"?(d.x=Math.sin(h+Math.PI)*c+(a[0].x+l.x)/2,d.y=-Math.cos(h+Math.PI)*c+(a[0].y+l.y)/2):t==="end_right"?(d.x=Math.sin(h-Math.PI)*c+(a[0].x+l.x)/2-5,d.y=-Math.cos(h-Math.PI)*c+(a[0].y+l.y)/2-5):t==="end_left"?(d.x=Math.sin(h)*c+(a[0].x+l.x)/2-5,d.y=-Math.cos(h)*c+(a[0].y+l.y)/2-5):(d.x=Math.sin(h)*c+(a[0].x+l.x)/2,d.y=-Math.cos(h)*c+(a[0].y+l.y)/2),d}S(ew,"calcTerminalLabelPosition");function rw(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(rw,"getStylesFromArray");var Iv=0,tO=S(()=>(Iv++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Iv),"generateId");function iw(e){let t="";const i="0123456789abcdef",a=i.length;for(let o=0;o<e;o++)t+=i.charAt(Math.floor(Math.random()*a));return t}S(iw,"makeRandomHex");var eO=S(e=>iw(e.length),"random"),rO=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"),iO=S(function(e,t){const i=t.text.replace(Pc.lineBreakRegex," "),[,a]=$d(t.fontSize),o=e.append("text");o.attr("x",t.x),o.attr("y",t.y),o.style("text-anchor",t.anchor),o.style("font-family",t.fontFamily),o.style("font-size",a),o.style("font-weight",t.fontWeight),o.attr("fill",t.fill),t.class!==void 0&&o.attr("class",t.class);const l=o.append("tspan");return l.attr("x",t.x+t.textMargin*2),l.attr("fill",t.fill),l.text(i),o},"drawSimpleText"),aO=Gc((e,t,i)=>{if(!e||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Pc.lineBreakRegex.test(e)))return e;const a=e.split(" ").filter(Boolean),o=[];let l="";return a.forEach((c,h)=>{const d=Ra(`${c} `,i),f=Ra(l,i);if(d>t){const{hyphenatedStrings:x,remainingWord:y}=nO(c,t,"-",i);o.push(l,...x),l=y}else f+d>=t?(o.push(l),l=c):l=[l,c].filter(Boolean).join(" ");h+1===a.length&&o.push(l)}),o.filter(c=>c!=="").join(i.joinWith)},(e,t,i)=>`${e}${t}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),nO=Gc((e,t,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);const o=[...e],l=[];let c="";return o.forEach((h,d)=>{const f=`${c}${h}`;if(Ra(f,a)>=t){const g=d+1,x=o.length===g,y=`${f}${i}`;l.push(x?f:y),c=""}else c=f}),{hyphenatedStrings:l,remainingWord:c}},(e,t,i="-",a)=>`${e}${t}${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`);function aw(e,t){return yy(e,t).height}S(aw,"calculateTextHeight");function Ra(e,t){return yy(e,t).width}S(Ra,"calculateTextWidth");var yy=Gc((e,t)=>{const{fontSize:i=12,fontFamily:a="Arial",fontWeight:o=400}=t;if(!e)return{width:0,height:0};const[,l]=$d(i),c=["sans-serif",a],h=e.split(Pc.lineBreakRegex),d=[],f=Zt("body");if(!f.remove)return{width:0,height:0,lineHeight:0};const p=f.append("svg");for(const x of c){let y=0;const C={width:0,height:0,lineHeight:0};for(const k of h){const v=rO();v.text=k||Yz;const T=iO(p,v).style("font-size",l).style("font-weight",o).style("font-family",x),B=(T._groups||T)[0][0].getBBox();if(B.width===0&&B.height===0)throw new Error("svg element not in render tree");C.width=Math.round(Math.max(C.width,B.width)),y=Math.round(B.height),C.height+=y,C.lineHeight=Math.round(Math.max(C.lineHeight,y))}d.push(C)}p.remove();const g=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[g]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ps,oO=(Ps=class{constructor(t=!1,i){this.count=0,this.count=i?i.length:0,this.next=t?()=>this.count++:()=>Date.now()}},S(Ps,"InitIDGenerator"),Ps),vu,sO=S(function(e){return vu=vu||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),vu.innerHTML=e,unescape(vu.textContent)},"entityDecode");function xy(e){return"str"in e}S(xy,"isDetailedError");var lO=S((e,t,i,a)=>{var l;if(!a)return;const o=(l=e.node())==null?void 0:l.getBBox();o&&e.append("text").text(a).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",t)},"insertTitle"),$d=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 by(e,t){return Uz({},e,t)}S(by,"cleanAndMerge");var Li={assignWithDepth:Je,wrapLabel:aO,calculateTextHeight:aw,calculateTextWidth:Ra,calculateTextDimensions:yy,cleanAndMerge:by,detectInit:Xz,detectDirective:K2,isSubstringInArray:Kz,interpolateToCurve:py,calcLabelPosition:tw,calcCardinalityPosition:Jz,calcTerminalLabelPosition:ew,formatUrl:Z2,getStylesFromArray:rw,generateId:tO,random:eO,runFunc:Zz,entityDecode:sO,insertTitle:lO,isLabelCoordinateInPath:nw,parseFontSize:$d,InitIDGenerator:oO},cO=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)?"ﬂ°°"+a+"¶ß":"ﬂ°"+a+"¶ß"}),t},"encodeEntities"),yo=S(function(e){return e.replace(/ﬂ°°/g,"&#").replace(/ﬂ°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),$j=S((e,t,{counter:i=0,prefix:a,suffix:o},l)=>l||`${a?`${a}_`:""}${e}_${t}_${i}${o?`_${o}`:""}`,"getEdgeId");function ir(e){return e??null}S(ir,"handleUndefinedAttr");function nw(e,t){const i=Math.round(e.x),a=Math.round(e.y),o=t.replace(/(\d+\.\d+)/g,l=>Math.round(parseFloat(l)).toString());return o.includes(i.toString())||o.includes(a.toString())}S(nw,"isLabelCoordinateInPath");var Cy=S(({flowchart:e})=>{var o,l;const t=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.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 ow(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(o=>new Promise(l=>{function c(){if(o.style.display="flex",o.style.flexDirection="column",a){const h=he().fontSize?he().fontSize:window.getComputedStyle(document.body).fontSize,d=5,[f=Z1.fontSize]=$d(h),p=f*d+"px";o.style.minWidth=p,o.style.maxWidth=p}else o.style.width="100%";l(o)}S(c,"setupImage"),setTimeout(()=>{o.complete&&c()}),o.addEventListener("error",c),o.addEventListener("load",c)})))}S(ow,"configureLabelImages");const hO=Object.freeze({left:0,top:0,width:16,height:16}),fd=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sw=Object.freeze({...hO,...fd}),uO=Object.freeze({...sw,body:"",hidden:!1}),dO=Object.freeze({width:null,height:null}),fO=Object.freeze({...dO,...fd}),pO=(e,t,i,a="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;a=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const h=o.pop(),d=o.pop(),f={provider:o.length>0?o[0]:a,prefix:d,name:h};return yg(f)?f:null}const l=o[0],c=l.split("-");if(c.length>1){const h={provider:a,prefix:c.shift(),name:c.join("-")};return yg(h)?h:null}if(i&&a===""){const h={provider:a,prefix:"",name:l};return yg(h,i)?h:null}return null},yg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function gO(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 qv(e,t){const i=gO(e,t);for(const a in uO)a in fd?a in e&&!(a in i)&&(i[a]=fd[a]):a in t?i[a]=t[a]:a in e&&(i[a]=e[a]);return i}function mO(e,t){const i=e.icons,a=e.aliases||Object.create(null),o=Object.create(null);function l(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;const h=a[c]&&a[c].parent,d=h&&l(h);d&&(o[c]=[h].concat(d))}return o[c]}return(t||Object.keys(i).concat(Object.keys(a))).forEach(l),o}function jv(e,t,i){const a=e.icons,o=e.aliases||Object.create(null);let l={};function c(h){l=qv(a[h]||o[h],l)}return c(t),i.forEach(c),qv(e,l)}function yO(e,t){if(e.icons[t])return jv(e,t,[]);const i=mO(e,[t])[t];return i?jv(e,t,i):null}const xO=/(-?[0-9.]*[0-9]+[0-9.]*)/g,bO=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Hv(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(xO);if(a===null||!a.length)return e;const o=[];let l=a.shift(),c=bO.test(l);for(;;){if(c){const h=parseFloat(l);isNaN(h)?o.push(l):o.push(Math.ceil(h*t*i)/i)}else o.push(l);if(l=a.shift(),l===void 0)return o.join("");c=!c}}function CO(e,t="defs"){let i="";const a=e.indexOf("<"+t);for(;a>=0;){const o=e.indexOf(">",a),l=e.indexOf("</"+t);if(o===-1||l===-1)break;const c=e.indexOf(">",l);if(c===-1)break;i+=e.slice(o+1,l).trim(),e=e.slice(0,a).trim()+e.slice(c+1)}return{defs:i,content:e}}function vO(e,t){return e?"<defs>"+e+"</defs>"+t:t}function kO(e,t,i){const a=CO(e);return vO(a.defs,t+a.content+i)}const SO=e=>e==="unset"||e==="undefined"||e==="none";function wO(e,t){const i={...sw,...e},a={...fO,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let l=i.body;[i,a].forEach(k=>{const v=[],T=k.hFlip,B=k.vFlip;let L=k.rotate;T?B?L+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):B&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let M;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:M=o.height/2+o.top,v.unshift("rotate(90 "+M.toString()+" "+M.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:M=o.width/2+o.left,v.unshift("rotate(-90 "+M.toString()+" "+M.toString()+")");break}L%2===1&&(o.left!==o.top&&(M=o.left,o.left=o.top,o.top=M),o.width!==o.height&&(M=o.width,o.width=o.height,o.height=M)),v.length&&(l=kO(l,'<g transform="'+v.join(" ")+'">',"</g>"))});const c=a.width,h=a.height,d=o.width,f=o.height;let p,g;c===null?(g=h===null?"1em":h==="auto"?f:h,p=Hv(g,d/f)):(p=c==="auto"?d:c,g=h===null?Hv(p,f/d):h==="auto"?f:h);const x={},y=(k,v)=>{SO(v)||(x[k]=v.toString())};y("width",p),y("height",g);const C=[o.left,o.top,d,f];return x.viewBox=C.join(" "),{attributes:x,viewBox:C,body:l}}const TO=/\sid="(\S+)"/g,Pv=new Map;function _O(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Pv.get(e)||0;return Pv.set(e,t+1),t?`${e}${t}`:e}function BO(e){const t=[];let i;for(;i=TO.exec(e);)t.push(i[1]);if(!t.length)return e;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(o=>{const l=_O(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+a+"$3")}),e=e.replace(new RegExp(a,"g"),""),e}function EO(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>"}var LO={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},hm=new Map,lw=new Map,AO=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)lw.set(t.name,t.loader);else if("icons"in t)hm.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"),cw=S(async(e,t)=>{const i=pO(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 o=hm.get(a);if(!o){const c=lw.get(a);if(!c)throw new Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:a},hm.set(a,o)}catch(h){throw mt.error(h),new Error(`Failed to load icon set: ${i.prefix}`)}}const l=yO(o,i.name);if(!l)throw new Error(`Icon not found: ${e}`);return l},"getRegisteredIconData"),MO=S(async e=>{try{return await cw(e),!0}catch{return!1}},"isIconAvailable"),Vc=S(async(e,t,i)=>{let a;try{a=await cw(e,t==null?void 0:t.fallbackPrefix)}catch(c){mt.error(c),a=LO}const o=wO(a,t),l=EO(BO(o.body),{...o.attributes,...i});return Di(l,Ee())},"getIconSVG");function vy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vo=vy();function hw(e){vo=e}var Ec={exec:()=>null};function fe(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(o,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(Lr.caret,"$1"),i=i.replace(o,c),a},getRegex:()=>new RegExp(i,t)};return a}var DO=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Lr={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")},RO=/^(?:[ \t]*(?:\n|$))+/,FO=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,OO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ky=/(?:[*+-]|\d{1,9}[.)])/,uw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dw=fe(uw).replace(/bull/g,ky).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(),$O=fe(uw).replace(/bull/g,ky).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(),Sy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,NO=/^[^\n]+/,wy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,IO=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qO=fe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ky).getRegex(),Nd="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",Ty=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jO=fe("^ {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",Ty).replace("tag",Nd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fw=fe(Sy).replace("hr",Xc).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",Nd).getRegex(),HO=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fw).getRegex(),_y={blockquote:HO,code:FO,def:IO,fences:zO,heading:OO,hr:Xc,html:jO,lheading:dw,list:qO,newline:RO,paragraph:fw,table:Ec,text:NO},Wv=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xc).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",Nd).getRegex(),PO={..._y,lheading:$O,table:Wv,paragraph:fe(Sy).replace("hr",Xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wv).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",Nd).getRegex()},WO={..._y,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ty).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:Ec,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(Sy).replace("hr",Xc).replace("heading",` *#{1,6} *[^
]`).replace("lheading",dw).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},UO=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,YO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pw=/^( {2,}|\\)\n(?!\s*$)/,GO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Id=/[\p{P}\p{S}]/u,By=/[\s\p{P}\p{S}]/u,gw=/[^\s\p{P}\p{S}]/u,VO=fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,By).getRegex(),mw=/(?!~)[\p{P}\p{S}]/u,XO=/(?!~)[\s\p{P}\p{S}]/u,QO=/(?:[^\s\p{P}\p{S}]|~)/u,KO=fe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",DO?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yw=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ZO=fe(yw,"u").replace(/punct/g,Id).getRegex(),JO=fe(yw,"u").replace(/punct/g,mw).getRegex(),xw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",t4=fe(xw,"gu").replace(/notPunctSpace/g,gw).replace(/punctSpace/g,By).replace(/punct/g,Id).getRegex(),e4=fe(xw,"gu").replace(/notPunctSpace/g,QO).replace(/punctSpace/g,XO).replace(/punct/g,mw).getRegex(),r4=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gw).replace(/punctSpace/g,By).replace(/punct/g,Id).getRegex(),i4=fe(/\\(punct)/,"gu").replace(/punct/g,Id).getRegex(),a4=fe(/^<(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(),n4=fe(Ty).replace("(?:-->|$)","-->").getRegex(),o4=fe("^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",n4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,s4=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",pd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bw=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",pd).replace("ref",wy).getRegex(),Cw=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",wy).getRegex(),l4=fe("reflink|nolink(?!\\()","g").replace("reflink",bw).replace("nolink",Cw).getRegex(),Uv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ey={_backpedal:Ec,anyPunctuation:i4,autolink:a4,blockSkip:KO,br:pw,code:YO,del:Ec,emStrongLDelim:ZO,emStrongRDelimAst:t4,emStrongRDelimUnd:r4,escape:UO,link:s4,nolink:Cw,punctuation:VO,reflink:bw,reflinkSearch:l4,tag:o4,text:GO,url:Ec},c4={...Ey,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",pd).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pd).getRegex()},um={...Ey,emStrongRDelimAst:e4,emStrongLDelim:JO,url:fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Uv).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:fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Uv).getRegex()},h4={...um,br:fe(pw).replace("{2,}","*").getRegex(),text:fe(um.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ku={normal:_y,gfm:PO,pedantic:WO},oc={normal:Ey,gfm:um,breaks:h4,pedantic:c4},u4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Yv=e=>u4[e];function Gi(e,t){if(t){if(Lr.escapeTest.test(e))return e.replace(Lr.escapeReplace,Yv)}else if(Lr.escapeTestNoEncode.test(e))return e.replace(Lr.escapeReplaceNoEncode,Yv);return e}function Gv(e){try{e=encodeURI(e).replace(Lr.percentDecode,"%")}catch{return null}return e}function Vv(e,t){var l;let i=e.replace(Lr.findPipe,(c,h,d)=>{let f=!1,p=h;for(;--p>=0&&d[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(Lr.splitPipe),o=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(;o<a.length;o++)a[o]=a[o].trim().replace(Lr.slashPipe,"|");return a}function sc(e,t,i){let a=e.length;if(a===0)return"";let o=0;for(;o<a&&e.charAt(a-o-1)===t;)o++;return e.slice(0,a-o)}function d4(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 Xv(e,t,i,a,o){let l=t.href,c=t.title||null,h=e[1].replace(o.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,d}function f4(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let o=a[1];return t.split(`
`).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=o.length?l.slice(o.length):l}).join(`
`)}var gd=class{constructor(t){It(this,"options");It(this,"rules");It(this,"lexer");this.options=t||vo}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:sc(a,`
`)}}}fences(t){let i=this.rules.block.fences.exec(t);if(i){let a=i[0],o=f4(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:o}}}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 o=sc(a,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(a=o.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:sc(i[0],`
`)}}blockquote(t){let i=this.rules.block.blockquote.exec(t);if(i){let a=sc(i[0],`
`).split(`
`),o="",l="",c=[];for(;a.length>0;){let h=!1,d=[],f;for(f=0;f<a.length;f++)if(this.rules.other.blockquoteStart.test(a[f]))d.push(a[f]),h=!0;else if(!h)d.push(a[f]);else break;a=a.slice(f);let p=d.join(`
`),g=p.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
${p}`:p,l=l?`${l}
${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 y=c.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let C=y,k=C.raw+`
`+a.join(`
`),v=this.blockquote(k);c[c.length-1]=v,o=o.substring(0,o.length-C.raw.length)+v.raw,l=l.substring(0,l.length-C.text.length)+v.text;break}else if((y==null?void 0:y.type)==="list"){let C=y,k=C.raw+`
`+a.join(`
`),v=this.list(k);c[c.length-1]=v,o=o.substring(0,o.length-y.raw.length)+v.raw,l=l.substring(0,l.length-C.raw.length)+v.raw,a=k.substring(c.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:o,tokens:c,text:l}}}list(t){let i=this.rules.block.list.exec(t);if(i){let a=i[1].trim(),o=a.length>1,l={type:"list",raw:"",ordered:o,start:o?+a.slice(0,-1):"",loose:!1,items:[]};a=o?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=o?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(`
`,1)[0].replace(this.rules.other.listReplaceTabs,B=>" ".repeat(3*B.length)),y=t.split(`
`,1)[0],C=!x.trim(),k=0;if(this.options.pedantic?(k=2,g=x.trimStart()):C?k=i[1].length+1:(k=i[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,g=x.slice(k),k+=i[1].length),C&&this.rules.other.blankLine.test(y)&&(p+=y+`
`,t=t.substring(y.length+1),f=!0),!f){let B=this.rules.other.nextBulletRegex(k),L=this.rules.other.hrRegex(k),M=this.rules.other.fencesBeginRegex(k),F=this.rules.other.headingBeginRegex(k),$=this.rules.other.htmlBeginRegex(k);for(;t;){let N=t.split(`
`,1)[0],j;if(y=N,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting,"  "),j=y):j=y.replace(this.rules.other.tabCharGlobal,"    "),M.test(y)||F.test(y)||$.test(y)||B.test(y)||L.test(y))break;if(j.search(this.rules.other.nonSpaceChar)>=k||!y.trim())g+=`
`+j.slice(k);else{if(C||x.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||M.test(x)||F.test(x)||L.test(x))break;g+=`
`+y}!C&&!y.trim()&&(C=!0),p+=N+`
`,t=t.substring(N.length+1),x=j.slice(k)}}l.loose||(h?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(h=!0));let v=null,T;this.options.gfm&&(v=this.rules.other.listIsTask.exec(g),v&&(T=v[0]!=="[ ] ",g=g.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:p,task:!!v,checked:T,loose:!1,text:g,tokens:[]}),l.raw+=p}let d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.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," "),o=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:o,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=Vv(i[1]),o=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(h=i[3])!=null&&h.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],c={type:"table",raw:i[0],header:[],align:[],rows:[]};if(a.length===o.length){for(let d of o)this.rules.other.tableAlignRight.test(d)?c.align.push("right"):this.rules.other.tableAlignCenter.test(d)?c.align.push("center"):this.rules.other.tableAlignLeft.test(d)?c.align.push("left"):c.align.push(null);for(let d=0;d<a.length;d++)c.header.push({text:a[d],tokens:this.lexer.inline(a[d]),header:!0,align:c.align[d]});for(let d of l)c.rows.push(Vv(d,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)===`
`?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=sc(a.slice(0,-1),"\\");if((a.length-c.length)%2===0)return}else{let c=d4(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 o=i[2],l="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(o);c&&(o=c[1],l=c[3])}else l=i[3]?i[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?o=o.slice(1):o=o.slice(1,-1)),Xv(i,{href:o&&o.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 o=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=i[o.toLowerCase()];if(!l){let c=a[0].charAt(0);return{type:"text",raw:c,text:c}}return Xv(a,l,a[0],this.lexer,this.rules)}}emStrong(t,i,a=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&a.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!a||this.rules.inline.punctuation.exec(a))){let l=[...o[0]].length-1,c,h,d=l,f=0,p=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,i=i.slice(-1*t.length+l);(o=p.exec(i))!=null;){if(c=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!c)continue;if(h=[...c].length,o[3]||o[4]){d+=h;continue}else if((o[5]||o[6])&&l%3&&!((l+h)%3)){f+=h;continue}if(d-=h,d>0)continue;h=Math.min(h,h+d+f);let g=[...o[0]][0].length,x=t.slice(0,l+o.index+g+h);if(Math.min(l,h)%2){let C=x.slice(1,-1);return{type:"em",raw:x,text:C,tokens:this.lexer.inlineTokens(C)}}let y=x.slice(2,-2);return{type:"strong",raw:x,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){let i=this.rules.inline.code.exec(t);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(a),l=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return o&&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,o;return i[2]==="@"?(a=i[1],o="mailto:"+a):(a=i[1],o=a),{type:"link",raw:i[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}url(t){var a;let i;if(i=this.rules.inline.url.exec(t)){let o,l;if(i[2]==="@")o=i[0],l="mailto:"+o;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]);o=i[0],i[1]==="www."?l="http://"+i[0]:l=i[0]}return{type:"link",raw:i[0],text:o,href:l,tokens:[{type:"text",raw:o,text:o}]}}}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}}}},wi=class dm{constructor(t){It(this,"tokens");It(this,"options");It(this,"state");It(this,"tokenizer");It(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||vo,this.options.tokenizer=this.options.tokenizer||new gd,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:Lr,block:ku.normal,inline:oc.normal};this.options.pedantic?(i.block=ku.pedantic,i.inline=oc.pedantic):this.options.gfm&&(i.block=ku.gfm,this.options.breaks?i.inline=oc.breaks:i.inline=oc.gfm),this.tokenizer.rules=i}static get rules(){return{block:ku,inline:oc}}static lex(t,i){return new dm(i).lex(t)}static lexInline(t,i){return new dm(i).inlineTokens(t)}lex(t){t=t.replace(Lr.carriageReturn,`
`),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 o,l,c;for(this.options.pedantic&&(t=t.replace(Lr.tabCharGlobal,"    ").replace(Lr.spaceLine,""));t;){let h;if((l=(o=this.options.extensions)==null?void 0:o.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+=`
`: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(`
`)?"":`
`)+h.raw,f.text+=`
`+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(`
`)?"":`
`)+h.raw,f.text+=`
`+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 d=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&&(d=t.substring(0,f+1))}if(this.state.top&&(h=this.tokenizer.paragraph(d))){let f=i.at(-1);a&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
`)?"":`
`)+h.raw,f.text+=`
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):i.push(h),a=d.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(`
`)?"":`
`)+h.raw,f.text+=`
`+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 d,f,p,g,x;let a=t,o=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)y.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=o[2]?o[2].length:0,a=a.slice(0,o.index+l)+"["+"a".repeat(o[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((f=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:f.call({lexer:this},a))??a;let c=!1,h="";for(;t;){c||(h=""),c=!1;let y;if((g=(p=this.options.extensions)==null?void 0:p.inline)!=null&&g.some(k=>(y=k.call({lexer:this},t,i))?(t=t.substring(y.raw.length),i.push(y),!0):!1))continue;if(y=this.tokenizer.escape(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.tag(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.link(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(y.raw.length);let k=i.at(-1);y.type==="text"&&(k==null?void 0:k.type)==="text"?(k.raw+=y.raw,k.text+=y.text):i.push(y);continue}if(y=this.tokenizer.emStrong(t,a,h)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.codespan(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.br(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.del(t)){t=t.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.autolink(t)){t=t.substring(y.raw.length),i.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(t))){t=t.substring(y.raw.length),i.push(y);continue}let C=t;if((x=this.options.extensions)!=null&&x.startInline){let k=1/0,v=t.slice(1),T;this.options.extensions.startInline.forEach(B=>{T=B.call({lexer:this},v),typeof T=="number"&&T>=0&&(k=Math.min(k,T))}),k<1/0&&k>=0&&(C=t.substring(0,k+1))}if(y=this.tokenizer.inlineText(C)){t=t.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(h=y.raw.slice(-1)),c=!0;let k=i.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=y.raw,k.text+=y.text):i.push(y);continue}if(t){let k="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return i}},md=class{constructor(t){It(this,"options");It(this,"parser");this.options=t||vo}space(t){return""}code({text:t,lang:i,escaped:a}){var c;let o=(c=(i||"").match(Lr.notSpaceStart))==null?void 0:c[0],l=t.replace(Lr.endingNewline,"")+`
`;return o?'<pre><code class="language-'+Gi(o)+'">'+(a?l:Gi(l,!0))+`</code></pre>
`:"<pre><code>"+(a?l:Gi(l,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:i}){return`<h${i}>${this.parser.parseInline(t)}</h${i}>
`}hr(t){return`<hr>
`}list(t){let i=t.ordered,a=t.start,o="";for(let h=0;h<t.items.length;h++){let d=t.items[h];o+=this.listitem(d)}let l=i?"ol":"ul",c=i&&a!==1?' start="'+a+'"':"";return"<"+l+c+`>
`+o+"</"+l+`>
`}listitem(t){var a;let i="";if(t.task){let o=this.checkbox({checked:!!t.checked});t.loose?((a=t.tokens[0])==null?void 0:a.type)==="paragraph"?(t.tokens[0].text=o+" "+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=o+" "+Gi(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):i+=o+" "}return i+=this.parser.parse(t.tokens,!!t.loose),`<li>${i}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}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 o="";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]);o+=this.tablerow({text:a})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
<thead>
`+i+`</thead>
`+o+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let i=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+i+`</${a}>
`}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>${Gi(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 o=this.parser.parseInline(a),l=Gv(t);if(l===null)return o;t=l;let c='<a href="'+t+'"';return i&&(c+=' title="'+Gi(i)+'"'),c+=">"+o+"</a>",c}image({href:t,title:i,text:a,tokens:o}){o&&(a=this.parser.parseInline(o,this.parser.textRenderer));let l=Gv(t);if(l===null)return Gi(a);t=l;let c=`<img src="${t}" alt="${a}"`;return i&&(c+=` title="${Gi(i)}"`),c+=">",c}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Gi(t.text)}},Ly=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""}},Ti=class fm{constructor(t){It(this,"options");It(this,"renderer");It(this,"textRenderer");this.options=t||vo,this.options.renderer=this.options.renderer||new md,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ly}static parse(t,i){return new fm(i).parse(t)}static parseInline(t,i){return new fm(i).parseInline(t)}parse(t,i=!0){var o,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(o=this.options.extensions)==null?void 0:o.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 d=h;switch(d.type){case"space":{a+=this.renderer.space(d);continue}case"hr":{a+=this.renderer.hr(d);continue}case"heading":{a+=this.renderer.heading(d);continue}case"code":{a+=this.renderer.code(d);continue}case"table":{a+=this.renderer.table(d);continue}case"blockquote":{a+=this.renderer.blockquote(d);continue}case"list":{a+=this.renderer.list(d);continue}case"html":{a+=this.renderer.html(d);continue}case"def":{a+=this.renderer.def(d);continue}case"paragraph":{a+=this.renderer.paragraph(d);continue}case"text":{let f=d,p=this.renderer.text(f);for(;c+1<t.length&&t[c+1].type==="text";)f=t[++c],p+=`
`+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 "'+d.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 o,l;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(o=this.options.extensions)==null?void 0:o.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 d=h;switch(d.type){case"escape":{a+=i.text(d);break}case"html":{a+=i.html(d);break}case"link":{a+=i.link(d);break}case"image":{a+=i.image(d);break}case"strong":{a+=i.strong(d);break}case"em":{a+=i.em(d);break}case"codespan":{a+=i.codespan(d);break}case"br":{a+=i.br(d);break}case"del":{a+=i.del(d);break}case"text":{a+=i.text(d);break}default:{let f='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},Mu,bc=(Mu=class{constructor(t){It(this,"options");It(this,"block");this.options=t||vo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?wi.lex:wi.lexInline}provideParser(){return this.block?Ti.parse:Ti.parseInline}},It(Mu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),It(Mu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Mu),p4=class{constructor(...t){It(this,"defaults",vy());It(this,"options",this.setOptions);It(this,"parse",this.parseMarkdown(!0));It(this,"parseInline",this.parseMarkdown(!1));It(this,"Parser",Ti);It(this,"Renderer",md);It(this,"TextRenderer",Ly);It(this,"Lexer",wi);It(this,"Tokenizer",gd);It(this,"Hooks",bc);this.use(...t)}walkTokens(t,i){var o,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 d of h.header)a=a.concat(this.walkTokens(d.tokens,i));for(let d of h.rows)for(let f of d)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=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&l[h.type]?this.defaults.extensions.childTokens[h.type].forEach(d=>{let f=h[d].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 o={...a};if(o.async=this.defaults.async||o.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 d=l.renderer.apply(this,h);return d===!1&&(d=c.apply(this,h)),d}: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)}),o.extensions=i),a.renderer){let l=this.defaults.renderer||new md(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,d=a.renderer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g||""}}o.renderer=l}if(a.tokenizer){let l=this.defaults.tokenizer||new gd(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,d=a.tokenizer[h],f=l[h];l[h]=(...p)=>{let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}o.tokenizer=l}if(a.hooks){let l=this.defaults.hooks||new bc;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,d=a.hooks[h],f=l[h];bc.passThroughHooks.has(c)?l[h]=p=>{if(this.defaults.async&&bc.passThroughHooksRespectAsync.has(c))return(async()=>{let x=await d.call(l,p);return f.call(l,x)})();let g=d.call(l,p);return f.call(l,g)}:l[h]=(...p)=>{if(this.defaults.async)return(async()=>{let x=await d.apply(l,p);return x===!1&&(x=await f.apply(l,p)),x})();let g=d.apply(l,p);return g===!1&&(g=f.apply(l,p)),g}}o.hooks=l}if(a.walkTokens){let l=this.defaults.walkTokens,c=a.walkTokens;o.walkTokens=function(h){let d=[];return d.push(c.call(this,h)),l&&(d=d.concat(l.call(this,h))),d}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,i){return wi.lex(t,i??this.defaults)}parser(t,i){return Ti.parse(t,i??this.defaults)}parseMarkdown(t){return(i,a)=>{let o={...a},l={...this.defaults,...o},c=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&o.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,d=await(l.hooks?await l.hooks.provideLexer():t?wi.lex:wi.lexInline)(h,l),f=l.hooks?await l.hooks.processAllTokens(d):d;l.walkTokens&&await Promise.all(this.walkTokens(f,l.walkTokens));let p=await(l.hooks?await l.hooks.provideParser():t?Ti.parse:Ti.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?wi.lex:wi.lexInline)(i,l);l.hooks&&(h=l.hooks.processAllTokens(h)),l.walkTokens&&this.walkTokens(h,l.walkTokens);let d=(l.hooks?l.hooks.provideParser():t?Ti.parse:Ti.parseInline)(h,l);return l.hooks&&(d=l.hooks.postprocess(d)),d}catch(h){return c(h)}}}onError(t,i){return a=>{if(a.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Gi(a.message+"",!0)+"</pre>";return i?Promise.resolve(o):o}if(i)return Promise.reject(a);throw a}}},xo=new p4;function ge(e,t){return xo.parse(e,t)}ge.options=ge.setOptions=function(e){return xo.setOptions(e),ge.defaults=xo.defaults,hw(ge.defaults),ge};ge.getDefaults=vy;ge.defaults=vo;ge.use=function(...e){return xo.use(...e),ge.defaults=xo.defaults,hw(ge.defaults),ge};ge.walkTokens=function(e,t){return xo.walkTokens(e,t)};ge.parseInline=xo.parseInline;ge.Parser=Ti;ge.parser=Ti.parse;ge.Renderer=md;ge.TextRenderer=Ly;ge.Lexer=wi;ge.lexer=wi.lex;ge.Tokenizer=gd;ge.Hooks=bc;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;Ti.parse;wi.lex;function vw(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 o=a.reduce(function(h,d){var f=d.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(o.length){var l=new RegExp(`
[	 ]{`.concat(Math.min.apply(Math,o),"}"),"g");a=a.map(function(h){return h.replace(l,`
`)})}a[0]=a[0].replace(/^\r?\n/,"");var c=a[0];return t.forEach(function(h,d){var f=c.match(/(?:^|\n)( *)$/),p=f?f[1]:"",g=h;typeof h=="string"&&h.includes(`
`)&&(g=String(h).split(`
`).map(function(x,y){return y===0?x:"".concat(p).concat(x)}).join(`
`)),c+=g+a[d+1]}),c}function kw(e,{markdownAutoWrap:t}){const a=e.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`);return vw(a)}S(kw,"preprocessMarkdown");function Sw(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(Sw,"nonMarkdownToLines");function ww(e,t={}){const i=kw(e,t),a=ge.lexer(i),o=[[]];let l=0;function c(h,d="normal"){h.type==="text"?h.text.split(`
`).forEach((p,g)=>{g!==0&&(l++,o.push([])),p.split(" ").forEach(x=>{x=x.replace(/&#39;/g,"'"),x&&o[l].push({content:x,type:d})})}):h.type==="strong"||h.type==="em"?h.tokens.forEach(f=>{c(f,h.type)}):h.type==="html"&&o[l].push({content:h.text,type:"normal"})}return S(c,"processNode"),a.forEach(h=>{var d;h.type==="paragraph"?(d=h.tokens)==null||d.forEach(f=>{c(f)}):h.type==="html"?o[l].push({content:h.text,type:"normal"}):o[l].push({content:h.raw,type:"normal"})}),o}S(ww,"markdownToLines");function Tw(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}S(Tw,"nonMarkdownToHTML");function _w(e,{markdownAutoWrap:t}={}){const i=ge.lexer(e);function a(o){var l,c,h;return o.type==="text"?t===!1?o.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):o.text.replace(/\n */g,"<br/>"):o.type==="strong"?`<strong>${(l=o.tokens)==null?void 0:l.map(a).join("")}</strong>`:o.type==="em"?`<em>${(c=o.tokens)==null?void 0:c.map(a).join("")}</em>`:o.type==="paragraph"?`<p>${(h=o.tokens)==null?void 0:h.map(a).join("")}</p>`:o.type==="space"?"":o.type==="html"?`${o.text}`:o.type==="escape"?o.text:(mt.warn(`Unsupported markdown: ${o.type}`),o.raw)}return S(a,"output"),i.map(a).join("")}S(_w,"markdownToHTML");function Bw(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}S(Bw,"splitTextToChars");function Ew(e,t){const i=Bw(t.content);return Ay(e,[],i,t.type)}S(Ew,"splitWordToFitWidth");function Ay(e,t,i,a){if(i.length===0)return[{content:t.join(""),type:a},{content:"",type:a}];const[o,...l]=i,c=[...t,o];return e([{content:c.join(""),type:a}])?Ay(e,c,l,a):(t.length===0&&o&&(t.push(o),i.shift()),[{content:t.join(""),type:a},{content:i.join(""),type:a}])}S(Ay,"splitWordToFitWidthRecursion");function Lw(e,t){if(e.some(({content:i})=>i.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return yd(e,t)}S(Lw,"splitLineToFitWidth");function yd(e,t,i=[],a=[]){if(e.length===0)return a.length>0&&i.push(a),i.length>0?i:[];let o="";e[0].content===" "&&(o=" ",e.shift());const l=e.shift()??{content:" ",type:"normal"},c=[...a];if(o!==""&&c.push({content:o,type:"normal"}),c.push(l),t(c))return yd(e,t,i,c);if(a.length>0)i.push(a),e.unshift(l);else if(l.content){const[h,d]=Ew(t,l);i.push([h]),d.content&&e.unshift(d)}return yd(e,t,i)}S(yd,"splitLineToFitWidthRecursion");function pm(e,t){t&&e.attr("style",t)}S(pm,"applyStyle");var Qv=16384;async function Aw(e,t,i,a,o=!1,l=Ee()){const c=e.append("foreignObject");c.attr("width",`${Math.min(10*i,Qv)}px`),c.attr("height",`${Math.min(10*i,Qv)}px`);const h=c.append("xhtml:div"),d=Ac(t.label)?await uk(t.label.replace(Pc.lineBreakRegex,`
`),l):Di(t.label,l),f=t.isNode?"nodeLabel":"edgeLabel",p=h.append("span");p.html(d),pm(p,t.labelStyle),p.attr("class",`${f} ${a}`),pm(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"),o&&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(Aw,"addHtmlSpan");function qd(e,t,i,a=!1){const o=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*i-.1+"em").attr("dy",i+"em");return a&&o.attr("text-anchor","middle"),o}S(qd,"createTspan");function Mw(e,t,i){const a=e.append("text"),o=qd(a,1,t);jd(o,i);const l=o.node().getComputedTextLength();return a.remove(),l}S(Mw,"computeWidthOfText");function g4(e,t,i){var c;const a=e.append("text"),o=qd(a,1,t);jd(o,[{content:i,type:"normal"}]);const l=(c=o.node())==null?void 0:c.getBoundingClientRect();return l&&a.remove(),l}S(g4,"computeDimensionOfText");function Dw(e,t,i,a=!1,o=!1){const c=t.append("g"),h=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");o&&d.attr("text-anchor","middle");let f=0;for(const p of i){const g=S(y=>Mw(c,1.1,y)<=e,"checkWidth"),x=g(p)?[p]:Lw(p,g);for(const y of x){const C=qd(d,f,1.1,o);jd(C,y),f++}}if(a){const p=d.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 d.node()}S(Dw,"createFormattedText");function gm(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(gm,"decodeHTMLEntities");function jd(e,t){e.text(""),t.forEach((i,a)=>{const o=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?o.text(gm(i.content)):o.text(" "+gm(i.content))})}S(jd,"updateTextContentAndStyles");async function Rw(e,t={}){const i=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,l,c)=>(i.push((async()=>{const h=`${l}:${c}`;return await MO(h)?await Vc(h,void 0,{class:"label-icon"}):`<i class='${Di(o,t).replace(":"," ")}'></i>`})()),o));const a=await Promise.all(i);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>a.shift()??"")}S(Rw,"replaceIconSubstring");var aa=S(async(e,t="",{style:i="",isTitle:a=!1,classes:o="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:d=200,addSvgBackground:f=!1}={},p)=>{if(mt.debug("XYZ createText",t,i,a,o,l,h,"addSvgBackground: ",f),l){const g=c?_w(t,p):Tw(t),x=await Rw(yo(g),p),y=t.replace(/\\\\/g,"\\"),C={isNode:h,label:Ac(t)?y:x,labelStyle:i.replace("fill:","color:")};return await Aw(e,C,d,o,f,p)}else{const g=yo(t.replace(/<br\s*\/?>/g,"<br/>")),x=c?ww(g.replace("<br>","<br/>"),p):Sw(g),y=Dw(d,e,x,t?f:!1,!h);if(h){/stroke:/.exec(i)&&(i=i.replace("stroke:","lineColor:"));const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Zt(y).attr("style",C)}else{const C=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Zt(y).select("rect").attr("style",C.replace(/background:/g,"fill:"));const k=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Zt(y).select("text").attr("style",k)}return a?Zt(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Zt(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}},"createText");function xg(e,t,i){if(e&&e.length){const[a,o]=t,l=Math.PI/180*i,c=Math.cos(l),h=Math.sin(l);for(const d of e){const[f,p]=d;d[0]=(f-a)*c-(p-o)*h+a,d[1]=(f-a)*h+(p-o)*c+o}}}function m4(e,t){return e[0]===t[0]&&e[1]===t[1]}function y4(e,t,i,a=1){const o=i,l=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,h=[0,0];if(o)for(const f of c)xg(f,h,o);const d=(function(f,p,g){const x=[];for(const B of f){const L=[...B];m4(L[0],L[L.length-1])||L.push([L[0][0],L[0][1]]),L.length>2&&x.push(L)}const y=[];p=Math.max(p,.1);const C=[];for(const B of x)for(let L=0;L<B.length-1;L++){const M=B[L],F=B[L+1];if(M[1]!==F[1]){const $=Math.min(M[1],F[1]);C.push({ymin:$,ymax:Math.max(M[1],F[1]),x:$===M[1]?M[0]:F[0],islope:(F[0]-M[0])/(F[1]-M[1])})}}if(C.sort(((B,L)=>B.ymin<L.ymin?-1:B.ymin>L.ymin?1:B.x<L.x?-1:B.x>L.x?1:B.ymax===L.ymax?0:(B.ymax-L.ymax)/Math.abs(B.ymax-L.ymax))),!C.length)return y;let k=[],v=C[0].ymin,T=0;for(;k.length||C.length;){if(C.length){let B=-1;for(let L=0;L<C.length&&!(C[L].ymin>v);L++)B=L;C.splice(0,B+1).forEach((L=>{k.push({s:v,edge:L})}))}if(k=k.filter((B=>!(B.edge.ymax<=v))),k.sort(((B,L)=>B.edge.x===L.edge.x?0:(B.edge.x-L.edge.x)/Math.abs(B.edge.x-L.edge.x))),(g!==1||T%p==0)&&k.length>1)for(let B=0;B<k.length;B+=2){const L=B+1;if(L>=k.length)break;const M=k[B].edge,F=k[L].edge;y.push([[Math.round(M.x),v],[Math.round(F.x),v]])}v+=g,k.forEach((B=>{B.edge.x=B.edge.x+g*B.edge.islope})),T++}return y})(c,l,a);if(o){for(const f of c)xg(f,h,-o);(function(f,p,g){const x=[];f.forEach((y=>x.push(...y))),xg(x,p,g)})(d,h,-o)}return d}function Qc(e,t){var i;const a=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.round(Math.max(o,.1));let l=1;return t.roughness>=1&&(((i=t.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>.7&&(l=o),y4(e,o,a,l||1)}class My{constructor(t){this.helper=t}fillPolygons(t,i){return this._fillPolygons(t,i)}_fillPolygons(t,i){const a=Qc(t,i);return{type:"fillSketch",ops:this.renderLines(a,i)}}renderLines(t,i){const a=[];for(const o of t)a.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],i));return a}}function Hd(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 x4 extends My{fillPolygons(t,i){let a=i.hachureGap;a<0&&(a=4*i.strokeWidth),a=Math.max(a,.1);const o=Qc(t,Object.assign({},i,{hachureGap:a})),l=Math.PI/180*i.hachureAngle,c=[],h=.5*a*Math.cos(l),d=.5*a*Math.sin(l);for(const[f,p]of o)Hd([f,p])&&c.push([[f[0]-h,f[1]+d],[...p]],[[f[0]+h,f[1]-d],[...p]]);return{type:"fillSketch",ops:this.renderLines(c,i)}}}class b4 extends My{fillPolygons(t,i){const a=this._fillPolygons(t,i),o=Object.assign({},i,{hachureAngle:i.hachureAngle+90}),l=this._fillPolygons(t,o);return a.ops=a.ops.concat(l.ops),a}}class C4{constructor(t){this.helper=t}fillPolygons(t,i){const a=Qc(t,i=Object.assign({},i,{hachureAngle:0}));return this.dotsOnLines(a,i)}dotsOnLines(t,i){const a=[];let o=i.hachureGap;o<0&&(o=4*i.strokeWidth),o=Math.max(o,.1);let l=i.fillWeight;l<0&&(l=i.strokeWidth/2);const c=o/4;for(const h of t){const d=Hd(h),f=d/o,p=Math.ceil(f)-1,g=d-p*o,x=(h[0][0]+h[1][0])/2-o/4,y=Math.min(h[0][1],h[1][1]);for(let C=0;C<p;C++){const k=y+g+C*o,v=x-c+2*Math.random()*c,T=k-c+2*Math.random()*c,B=this.helper.ellipse(v,T,l,l,i);a.push(...B.ops)}}return{type:"fillSketch",ops:a}}}class v4{constructor(t){this.helper=t}fillPolygons(t,i){const a=Qc(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,o=i.dashGap<0?i.hachureGap<0?4*i.strokeWidth:i.hachureGap:i.dashGap,l=[];return t.forEach((c=>{const h=Hd(c),d=Math.floor(h/(a+o)),f=(h+o-d*(a+o))/2;let p=c[0],g=c[1];p[0]>g[0]&&(p=c[1],g=c[0]);const x=Math.atan((g[1]-p[1])/(g[0]-p[0]));for(let y=0;y<d;y++){const C=y*(a+o),k=C+a,v=[p[0]+C*Math.cos(x)+f*Math.cos(x),p[1]+C*Math.sin(x)+f*Math.sin(x)],T=[p[0]+k*Math.cos(x)+f*Math.cos(x),p[1]+k*Math.sin(x)+f*Math.sin(x)];l.push(...this.helper.doubleLineOps(v[0],v[1],T[0],T[1],i))}})),l}}class k4{constructor(t){this.helper=t}fillPolygons(t,i){const a=i.hachureGap<0?4*i.strokeWidth:i.hachureGap,o=i.zigzagOffset<0?a:i.zigzagOffset,l=Qc(t,i=Object.assign({},i,{hachureGap:a+o}));return{type:"fillSketch",ops:this.zigzagLines(l,o,i)}}zigzagLines(t,i,a){const o=[];return t.forEach((l=>{const c=Hd(l),h=Math.round(c/(2*i));let d=l[0],f=l[1];d[0]>f[0]&&(d=l[1],f=l[0]);const p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let g=0;g<h;g++){const x=2*g*i,y=2*(g+1)*i,C=Math.sqrt(2*Math.pow(i,2)),k=[d[0]+x*Math.cos(p),d[1]+x*Math.sin(p)],v=[d[0]+y*Math.cos(p),d[1]+y*Math.sin(p)],T=[k[0]+C*Math.cos(p+Math.PI/4),k[1]+C*Math.sin(p+Math.PI/4)];o.push(...this.helper.doubleLineOps(k[0],k[1],T[0],T[1],a),...this.helper.doubleLineOps(T[0],T[1],v[0],v[1],a))}})),o}}const Hr={};class S4{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const w4=0,bg=1,Kv=2,Su={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 Cg(e,t){return e.type===t}function Dy(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:w4,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:bg,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return h[h.length]={type:Kv,text:""},h})(e);let a="BOD",o=0,l=i[o];for(;!Cg(l,Kv);){let c=0;const h=[];if(a==="BOD"){if(l.text!=="M"&&l.text!=="m")return Dy("M0,0"+e);o++,c=Su[l.text],a=l.text}else Cg(l,bg)?c=Su[a]:(o++,c=Su[l.text],a=l.text);if(!(o+c<i.length))throw new Error("Path data ended short");for(let d=o;d<o+c;d++){const f=i[d];if(!Cg(f,bg))throw new Error("Param not a number: "+a+","+f.text);h[h.length]=+f.text}if(typeof Su[a]!="number")throw new Error("Bad segment: "+a);{const d={key:a,data:h};t.push(d),o+=c,l=i[o],a==="M"&&(a="L"),a==="m"&&(a="l")}}return t}function Fw(e){let t=0,i=0,a=0,o=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,o]=h;break;case"m":t+=h[0],i+=h[1],l.push({key:"M",data:[t,i]}),a=t,o=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 d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"C",data:d}),t=d[4],i=d[5];break}case"Q":l.push({key:"Q",data:[...h]}),t=h[2],i=h[3];break;case"q":{const d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"Q",data:d}),t=d[2],i=d[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 d=h.map(((f,p)=>p%2?f+i:f+t));l.push({key:"S",data:d}),t=d[2],i=d[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=o}return l}function zw(e){const t=[];let i="",a=0,o=0,l=0,c=0,h=0,d=0;for(const{key:f,data:p}of e){switch(f){case"M":t.push({key:"M",data:[...p]}),[a,o]=p,[l,c]=p;break;case"C":t.push({key:"C",data:[...p]}),a=p[4],o=p[5],h=p[2],d=p[3];break;case"L":t.push({key:"L",data:[...p]}),[a,o]=p;break;case"H":a=p[0],t.push({key:"L",data:[a,o]});break;case"V":o=p[0],t.push({key:"L",data:[a,o]});break;case"S":{let g=0,x=0;i==="C"||i==="S"?(g=a+(a-h),x=o+(o-d)):(g=a,x=o),t.push({key:"C",data:[g,x,...p]}),h=p[0],d=p[1],a=p[2],o=p[3];break}case"T":{const[g,x]=p;let y=0,C=0;i==="Q"||i==="T"?(y=a+(a-h),C=o+(o-d)):(y=a,C=o);const k=a+2*(y-a)/3,v=o+2*(C-o)/3,T=g+2*(y-g)/3,B=x+2*(C-x)/3;t.push({key:"C",data:[k,v,T,B,g,x]}),h=y,d=C,a=g,o=x;break}case"Q":{const[g,x,y,C]=p,k=a+2*(g-a)/3,v=o+2*(x-o)/3,T=y+2*(g-y)/3,B=C+2*(x-C)/3;t.push({key:"C",data:[k,v,T,B,y,C]}),h=g,d=x,a=y,o=C;break}case"A":{const g=Math.abs(p[0]),x=Math.abs(p[1]),y=p[2],C=p[3],k=p[4],v=p[5],T=p[6];g===0||x===0?(t.push({key:"C",data:[a,o,v,T,v,T]}),a=v,o=T):(a!==v||o!==T)&&(Ow(a,o,v,T,g,x,y,C,k).forEach((function(B){t.push({key:"C",data:B})})),a=v,o=T);break}case"Z":t.push({key:"Z",data:[]}),a=l,o=c}i=f}return t}function lc(e,t,i){return[e*Math.cos(i)-t*Math.sin(i),e*Math.sin(i)+t*Math.cos(i)]}function Ow(e,t,i,a,o,l,c,h,d,f){const p=(g=c,Math.PI*g/180);var g;let x=[],y=0,C=0,k=0,v=0;if(f)[y,C,k,v]=f;else{[e,t]=lc(e,t,-p),[i,a]=lc(i,a,-p);const it=(e-i)/2,X=(t-a)/2;let U=it*it/(o*o)+X*X/(l*l);U>1&&(U=Math.sqrt(U),o*=U,l*=U);const D=o*o,I=l*l,z=D*I-D*X*X-I*it*it,P=D*X*X+I*it*it,G=(h===d?-1:1)*Math.sqrt(Math.abs(z/P));k=G*o*X/l+(e+i)/2,v=G*-l*it/o+(t+a)/2,y=Math.asin(parseFloat(((t-v)/l).toFixed(9))),C=Math.asin(parseFloat(((a-v)/l).toFixed(9))),e<k&&(y=Math.PI-y),i<k&&(C=Math.PI-C),y<0&&(y=2*Math.PI+y),C<0&&(C=2*Math.PI+C),d&&y>C&&(y-=2*Math.PI),!d&&C>y&&(C-=2*Math.PI)}let T=C-y;if(Math.abs(T)>120*Math.PI/180){const it=C,X=i,U=a;C=d&&C>y?y+120*Math.PI/180*1:y+120*Math.PI/180*-1,x=Ow(i=k+o*Math.cos(C),a=v+l*Math.sin(C),X,U,o,l,c,0,d,[C,it,k,v])}T=C-y;const B=Math.cos(y),L=Math.sin(y),M=Math.cos(C),F=Math.sin(C),$=Math.tan(T/4),N=4/3*o*$,j=4/3*l*$,ot=[e,t],K=[e+N*L,t-j*B],Y=[i+N*F,a-j*M],Z=[i,a];if(K[0]=2*ot[0]-K[0],K[1]=2*ot[1]-K[1],f)return[K,Y,Z].concat(x);{x=[K,Y,Z].concat(x);const it=[];for(let X=0;X<x.length;X+=3){const U=lc(x[X][0],x[X][1],p),D=lc(x[X+1][0],x[X+1][1],p),I=lc(x[X+2][0],x[X+2][1],p);it.push([U[0],U[1],D[0],D[1],I[0],I[1]])}return it}}const T4={randOffset:function(e,t){return Wt(e,t)},randOffsetWithRange:function(e,t,i){return xd(e,t,i)},ellipse:function(e,t,i,a,o){const l=Nw(i,a,o);return mm(e,t,o,l).opset},doubleLineOps:function(e,t,i,a,o){return wn(e,t,i,a,o,!0)}};function $w(e,t,i,a,o){return{type:"path",ops:wn(e,t,i,a,o)}}function Pu(e,t,i){const a=(e||[]).length;if(a>2){const o=[];for(let l=0;l<a-1;l++)o.push(...wn(e[l][0],e[l][1],e[l+1][0],e[l+1][1],i));return t&&o.push(...wn(e[a-1][0],e[a-1][1],e[0][0],e[0][1],i)),{type:"path",ops:o}}return a===2?$w(e[0][0],e[0][1],e[1][0],e[1][1],i):{type:"path",ops:[]}}function _4(e,t,i,a,o){return(function(l,c){return Pu(l,!0,c)})([[e,t],[e+i,t],[e+i,t+a],[e,t+a]],o)}function Zv(e,t){if(e.length){const i=typeof e[0][0]=="number"?[e]:e,a=wu(i[0],1*(1+.2*t.roughness),t),o=t.disableMultiStroke?[]:wu(i[0],1.5*(1+.22*t.roughness),e1(t));for(let l=1;l<i.length;l++){const c=i[l];if(c.length){const h=wu(c,1*(1+.2*t.roughness),t),d=t.disableMultiStroke?[]:wu(c,1.5*(1+.22*t.roughness),e1(t));for(const f of h)f.op!=="move"&&a.push(f);for(const f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:a.concat(o)}}return{type:"path",ops:[]}}function Nw(e,t,i){const a=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*a)),l=2*Math.PI/o;let c=Math.abs(e/2),h=Math.abs(t/2);const d=1-i.curveFitting;return c+=Wt(c*d,i),h+=Wt(h*d,i),{increment:l,rx:c,ry:h}}function mm(e,t,i,a){const[o,l]=r1(a.increment,e,t,a.rx,a.ry,1,a.increment*xd(.1,xd(.4,1,i),i),i);let c=bd(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){const[h]=r1(a.increment,e,t,a.rx,a.ry,1.5,0,i),d=bd(h,null,i);c=c.concat(d)}return{estimatedPoints:l,opset:{type:"path",ops:c}}}function Jv(e,t,i,a,o,l,c,h,d){const f=e,p=t;let g=Math.abs(i/2),x=Math.abs(a/2);g+=Wt(.01*g,d),x+=Wt(.01*x,d);let y=o,C=l;for(;y<0;)y+=2*Math.PI,C+=2*Math.PI;C-y>2*Math.PI&&(y=0,C=2*Math.PI);const k=2*Math.PI/d.curveStepCount,v=Math.min(k/2,(C-y)/2),T=i1(v,f,p,g,x,y,C,1,d);if(!d.disableMultiStroke){const B=i1(v,f,p,g,x,y,C,1.5,d);T.push(...B)}return c&&(h?T.push(...wn(f,p,f+g*Math.cos(y),p+x*Math.sin(y),d),...wn(f,p,f+g*Math.cos(C),p+x*Math.sin(C),d)):T.push({op:"lineTo",data:[f,p]},{op:"lineTo",data:[f+g*Math.cos(y),p+x*Math.sin(y)]})),{type:"path",ops:T}}function t1(e,t){const i=zw(Fw(Dy(e))),a=[];let o=[0,0],l=[0,0];for(const{key:c,data:h}of i)switch(c){case"M":l=[h[0],h[1]],o=[h[0],h[1]];break;case"L":a.push(...wn(l[0],l[1],h[0],h[1],t)),l=[h[0],h[1]];break;case"C":{const[d,f,p,g,x,y]=h;a.push(...B4(d,f,p,g,x,y,l,t)),l=[x,y];break}case"Z":a.push(...wn(l[0],l[1],o[0],o[1],t)),l=[o[0],o[1]]}return{type:"path",ops:a}}function vg(e,t){const i=[];for(const a of e)if(a.length){const o=t.maxRandomnessOffset||0,l=a.length;if(l>2){i.push({op:"move",data:[a[0][0]+Wt(o,t),a[0][1]+Wt(o,t)]});for(let c=1;c<l;c++)i.push({op:"lineTo",data:[a[c][0]+Wt(o,t),a[c][1]+Wt(o,t)]})}}return{type:"fillPath",ops:i}}function ys(e,t){return(function(i,a){let o=i.fillStyle||"hachure";if(!Hr[o])switch(o){case"zigzag":Hr[o]||(Hr[o]=new x4(a));break;case"cross-hatch":Hr[o]||(Hr[o]=new b4(a));break;case"dots":Hr[o]||(Hr[o]=new C4(a));break;case"dashed":Hr[o]||(Hr[o]=new v4(a));break;case"zigzag-line":Hr[o]||(Hr[o]=new k4(a));break;default:o="hachure",Hr[o]||(Hr[o]=new My(a))}return Hr[o]})(t,T4).fillPolygons(e,t)}function e1(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Iw(e){return e.randomizer||(e.randomizer=new S4(e.seed||0)),e.randomizer.next()}function xd(e,t,i,a=1){return i.roughness*a*(Iw(i)*(t-e)+e)}function Wt(e,t,i=1){return xd(-e,e,t,i)}function wn(e,t,i,a,o,l=!1){const c=l?o.disableMultiStrokeFill:o.disableMultiStroke,h=ym(e,t,i,a,o,!0,!1);if(c)return h;const d=ym(e,t,i,a,o,!0,!0);return h.concat(d)}function ym(e,t,i,a,o,l,c){const h=Math.pow(e-i,2)+Math.pow(t-a,2),d=Math.sqrt(h);let f=1;f=d<200?1:d>500?.4:-.0016668*d+1.233334;let p=o.maxRandomnessOffset||0;p*p*100>h&&(p=d/10);const g=p/2,x=.2+.2*Iw(o);let y=o.bowing*o.maxRandomnessOffset*(a-t)/200,C=o.bowing*o.maxRandomnessOffset*(e-i)/200;y=Wt(y,o,f),C=Wt(C,o,f);const k=[],v=()=>Wt(g,o,f),T=()=>Wt(p,o,f),B=o.preserveVertices;return c?k.push({op:"move",data:[e+(B?0:v()),t+(B?0:v())]}):k.push({op:"move",data:[e+(B?0:Wt(p,o,f)),t+(B?0:Wt(p,o,f))]}),c?k.push({op:"bcurveTo",data:[y+e+(i-e)*x+v(),C+t+(a-t)*x+v(),y+e+2*(i-e)*x+v(),C+t+2*(a-t)*x+v(),i+(B?0:v()),a+(B?0:v())]}):k.push({op:"bcurveTo",data:[y+e+(i-e)*x+T(),C+t+(a-t)*x+T(),y+e+2*(i-e)*x+T(),C+t+2*(a-t)*x+T(),i+(B?0:T()),a+(B?0:T())]}),k}function wu(e,t,i){if(!e.length)return[];const a=[];a.push([e[0][0]+Wt(t,i),e[0][1]+Wt(t,i)]),a.push([e[0][0]+Wt(t,i),e[0][1]+Wt(t,i)]);for(let o=1;o<e.length;o++)a.push([e[o][0]+Wt(t,i),e[o][1]+Wt(t,i)]),o===e.length-1&&a.push([e[o][0]+Wt(t,i),e[o][1]+Wt(t,i)]);return bd(a,null,i)}function bd(e,t,i){const a=e.length,o=[];if(a>3){const l=[],c=1-i.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let h=1;h+2<a;h++){const d=e[h];l[0]=[d[0],d[1]],l[1]=[d[0]+(c*e[h+1][0]-c*e[h-1][0])/6,d[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]],o.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?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):a===2&&o.push(...ym(e[0][0],e[0][1],e[1][0],e[1][1],i,!0,!0));return o}function r1(e,t,i,a,o,l,c,h){const d=[],f=[];if(h.roughness===0){e/=4,f.push([t+a*Math.cos(-e),i+o*Math.sin(-e)]);for(let p=0;p<=2*Math.PI;p+=e){const g=[t+a*Math.cos(p),i+o*Math.sin(p)];d.push(g),f.push(g)}f.push([t+a*Math.cos(0),i+o*Math.sin(0)]),f.push([t+a*Math.cos(e),i+o*Math.sin(e)])}else{const p=Wt(.5,h)-Math.PI/2;f.push([Wt(l,h)+t+.9*a*Math.cos(p-e),Wt(l,h)+i+.9*o*Math.sin(p-e)]);const g=2*Math.PI+p-.01;for(let x=p;x<g;x+=e){const y=[Wt(l,h)+t+a*Math.cos(x),Wt(l,h)+i+o*Math.sin(x)];d.push(y),f.push(y)}f.push([Wt(l,h)+t+a*Math.cos(p+2*Math.PI+.5*c),Wt(l,h)+i+o*Math.sin(p+2*Math.PI+.5*c)]),f.push([Wt(l,h)+t+.98*a*Math.cos(p+c),Wt(l,h)+i+.98*o*Math.sin(p+c)]),f.push([Wt(l,h)+t+.9*a*Math.cos(p+.5*c),Wt(l,h)+i+.9*o*Math.sin(p+.5*c)])}return[f,d]}function i1(e,t,i,a,o,l,c,h,d){const f=l+Wt(.1,d),p=[];p.push([Wt(h,d)+t+.9*a*Math.cos(f-e),Wt(h,d)+i+.9*o*Math.sin(f-e)]);for(let g=f;g<=c;g+=e)p.push([Wt(h,d)+t+a*Math.cos(g),Wt(h,d)+i+o*Math.sin(g)]);return p.push([t+a*Math.cos(c),i+o*Math.sin(c)]),p.push([t+a*Math.cos(c),i+o*Math.sin(c)]),bd(p,null,d)}function B4(e,t,i,a,o,l,c,h){const d=[],f=[h.maxRandomnessOffset||1,(h.maxRandomnessOffset||1)+.3];let p=[0,0];const g=h.disableMultiStroke?1:2,x=h.preserveVertices;for(let y=0;y<g;y++)y===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Wt(f[0],h)),c[1]+(x?0:Wt(f[0],h))]}),p=x?[o,l]:[o+Wt(f[y],h),l+Wt(f[y],h)],d.push({op:"bcurveTo",data:[e+Wt(f[y],h),t+Wt(f[y],h),i+Wt(f[y],h),a+Wt(f[y],h),p[0],p[1]]});return d}function cc(e){return[...e]}function a1(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(cc(e[0]),cc(e[1]),cc(e[2]),cc(e[2]));else{const o=[];o.push(e[0],e[0]);for(let h=1;h<e.length;h++)o.push(e[h]),h===e.length-1&&o.push(e[h]);const l=[],c=1-t;a.push(cc(o[0]));for(let h=1;h+2<o.length;h++){const d=o[h];l[0]=[d[0],d[1]],l[1]=[d[0]+(c*o[h+1][0]-c*o[h-1][0])/6,d[1]+(c*o[h+1][1]-c*o[h-1][1])/6],l[2]=[o[h+1][0]+(c*o[h][0]-c*o[h+2][0])/6,o[h+1][1]+(c*o[h][1]-c*o[h+2][1])/6],l[3]=[o[h+1][0],o[h+1][1]],a.push(l[1],l[2],l[3])}}return a}function Wu(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function E4(e,t,i){const a=Wu(t,i);if(a===0)return Wu(e,t);let o=((e[0]-t[0])*(i[0]-t[0])+(e[1]-t[1])*(i[1]-t[1]))/a;return o=Math.max(0,Math.min(1,o)),Wu(e,ao(t,i,o))}function ao(e,t,i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i]}function xm(e,t,i,a){const o=a||[];if((function(h,d){const f=h[d+0],p=h[d+1],g=h[d+2],x=h[d+3];let y=3*p[0]-2*f[0]-x[0];y*=y;let C=3*p[1]-2*f[1]-x[1];C*=C;let k=3*g[0]-2*x[0]-f[0];k*=k;let v=3*g[1]-2*x[1]-f[1];return v*=v,y<k&&(y=k),C<v&&(C=v),y+C})(e,t)<i){const h=e[t+0];o.length?(l=o[o.length-1],c=h,Math.sqrt(Wu(l,c))>1&&o.push(h)):o.push(h),o.push(e[t+3])}else{const d=e[t+0],f=e[t+1],p=e[t+2],g=e[t+3],x=ao(d,f,.5),y=ao(f,p,.5),C=ao(p,g,.5),k=ao(x,y,.5),v=ao(y,C,.5),T=ao(k,v,.5);xm([d,x,k,T],0,i,o),xm([T,v,C,g],0,i,o)}var l,c;return o}function L4(e,t){return Cd(e,0,e.length,t)}function Cd(e,t,i,a,o){const l=o||[],c=e[t],h=e[i-1];let d=0,f=1;for(let p=t+1;p<i-1;++p){const g=E4(e[p],c,h);g>d&&(d=g,f=p)}return Math.sqrt(d)>a?(Cd(e,t,f+1,a,l),Cd(e,f,i,a,l)):(l.length||l.push(c),l.push(h)),l}function kg(e,t=.15,i){const a=[],o=(e.length-1)/3;for(let l=0;l<o;l++)xm(e,3*l,t,a);return i&&i>0?Cd(a,0,a.length,i):a}const ii="none";let vd=class{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,o,l){const c=this._o(l);return this._d("line",[$w(t,i,a,o,c)],c)}rectangle(t,i,a,o,l){const c=this._o(l),h=[],d=_4(t,i,a,o,c);if(c.fill){const f=[[t,i],[t+a,i],[t+a,i+o],[t,i+o]];c.fillStyle==="solid"?h.push(vg([f],c)):h.push(ys([f],c))}return c.stroke!==ii&&h.push(d),this._d("rectangle",h,c)}ellipse(t,i,a,o,l){const c=this._o(l),h=[],d=Nw(a,o,c),f=mm(t,i,c,d);if(c.fill)if(c.fillStyle==="solid"){const p=mm(t,i,c,d).opset;p.type="fillPath",h.push(p)}else h.push(ys([f.estimatedPoints],c));return c.stroke!==ii&&h.push(f.opset),this._d("ellipse",h,c)}circle(t,i,a,o){const l=this.ellipse(t,i,a,a,o);return l.shape="circle",l}linearPath(t,i){const a=this._o(i);return this._d("linearPath",[Pu(t,!1,a)],a)}arc(t,i,a,o,l,c,h=!1,d){const f=this._o(d),p=[],g=Jv(t,i,a,o,l,c,h,!0,f);if(h&&f.fill)if(f.fillStyle==="solid"){const x=Object.assign({},f);x.disableMultiStroke=!0;const y=Jv(t,i,a,o,l,c,!0,!1,x);y.type="fillPath",p.push(y)}else p.push((function(x,y,C,k,v,T,B){const L=x,M=y;let F=Math.abs(C/2),$=Math.abs(k/2);F+=Wt(.01*F,B),$+=Wt(.01*$,B);let N=v,j=T;for(;N<0;)N+=2*Math.PI,j+=2*Math.PI;j-N>2*Math.PI&&(N=0,j=2*Math.PI);const ot=(j-N)/B.curveStepCount,K=[];for(let Y=N;Y<=j;Y+=ot)K.push([L+F*Math.cos(Y),M+$*Math.sin(Y)]);return K.push([L+F*Math.cos(j),M+$*Math.sin(j)]),K.push([L,M]),ys([K],B)})(t,i,a,o,l,c,f));return f.stroke!==ii&&p.push(g),this._d("arc",p,f)}curve(t,i){const a=this._o(i),o=[],l=Zv(t,a);if(a.fill&&a.fill!==ii)if(a.fillStyle==="solid"){const c=Zv(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else{const c=[],h=t;if(h.length){const d=typeof h[0][0]=="number"?[h]:h;for(const f of d)f.length<3?c.push(...f):f.length===3?c.push(...kg(a1([f[0],f[0],f[1],f[2]]),10,(1+a.roughness)/2)):c.push(...kg(a1(f),10,(1+a.roughness)/2))}c.length&&o.push(ys([c],a))}return a.stroke!==ii&&o.push(l),this._d("curve",o,a)}polygon(t,i){const a=this._o(i),o=[],l=Pu(t,!0,a);return a.fill&&(a.fillStyle==="solid"?o.push(vg([t],a)):o.push(ys([t],a))),a.stroke!==ii&&o.push(l),this._d("polygon",o,a)}path(t,i){const a=this._o(i),o=[];if(!t)return this._d("path",o,a);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const l=a.fill&&a.fill!=="transparent"&&a.fill!==ii,c=a.stroke!==ii,h=!!(a.simplification&&a.simplification<1),d=(function(p,g,x){const y=zw(Fw(Dy(p))),C=[];let k=[],v=[0,0],T=[];const B=()=>{T.length>=4&&k.push(...kg(T,g)),T=[]},L=()=>{B(),k.length&&(C.push(k),k=[])};for(const{key:F,data:$}of y)switch(F){case"M":L(),v=[$[0],$[1]],k.push(v);break;case"L":B(),k.push([$[0],$[1]]);break;case"C":if(!T.length){const N=k.length?k[k.length-1]:v;T.push([N[0],N[1]])}T.push([$[0],$[1]]),T.push([$[2],$[3]]),T.push([$[4],$[5]]);break;case"Z":B(),k.push([v[0],v[1]])}if(L(),!x)return C;const M=[];for(const F of C){const $=L4(F,x);$.length&&M.push($)}return M})(t,1,h?4-4*(a.simplification||1):(1+a.roughness)/2),f=t1(t,a);if(l)if(a.fillStyle==="solid")if(d.length===1){const p=t1(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else o.push(vg(d,a));else o.push(ys(d,a));return c&&(h?d.forEach((p=>{o.push(Pu(p,!1,a))})):o.push(f)),this._d("path",o,a)}opsToPath(t,i){let a="";for(const o of t.ops){const l=typeof i=="number"&&i>=0?o.data.map((c=>+c.toFixed(i))):o.data;switch(o.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,o=[];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:ii};break;case"fillPath":c={d:this.opsToPath(l),stroke:ii,strokeWidth:0,fill:a.fill||ii};break;case"fillSketch":c=this.fillSketch(l,a)}c&&o.push(c)}return o}fillSketch(t,i){let a=i.fillWeight;return a<0&&(a=i.strokeWidth/2),{d:this.opsToPath(t),stroke:i.fill||ii,strokeWidth:a,fill:ii}}_mergedShape(t){return t.filter(((i,a)=>a===0||i.op!=="move"))}},A4=class{constructor(t,i){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new vd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),o=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(const c of i)switch(c.type){case"path":o.save(),o.strokeStyle=a.stroke==="none"?"transparent":a.stroke,o.lineWidth=a.strokeWidth,a.strokeLineDash&&o.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(o.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(o,c,l),o.restore();break;case"fillPath":{o.save(),o.fillStyle=a.fill||"";const h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,c,l,h),o.restore();break}case"fillSketch":this.fillSketch(o,c,a)}}fillSketch(t,i,a){let o=a.fillWeight;o<0&&(o=a.strokeWidth/2),t.save(),a.fillLineDash&&t.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(t.lineDashOffset=a.fillLineDashOffset),t.strokeStyle=a.fill||"",t.lineWidth=o,this._drawToContext(t,i,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,i,a,o="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(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,i,a,o,l){const c=this.gen.line(t,i,a,o,l);return this.draw(c),c}rectangle(t,i,a,o,l){const c=this.gen.rectangle(t,i,a,o,l);return this.draw(c),c}ellipse(t,i,a,o,l){const c=this.gen.ellipse(t,i,a,o,l);return this.draw(c),c}circle(t,i,a,o){const l=this.gen.circle(t,i,a,o);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,o,l,c,h=!1,d){const f=this.gen.arc(t,i,a,o,l,c,h,d);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 Tu="http://www.w3.org/2000/svg";class M4{constructor(t,i){this.svg=t,this.gen=new vd(i)}draw(t){const i=t.sets||[],a=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,l=o.createElementNS(Tu,"g"),c=t.options.fixedDecimalPlaceDigits;for(const h of i){let d=null;switch(h.type){case"path":d=o.createElementNS(Tu,"path"),d.setAttribute("d",this.opsToPath(h,c)),d.setAttribute("stroke",a.stroke),d.setAttribute("stroke-width",a.strokeWidth+""),d.setAttribute("fill","none"),a.strokeLineDash&&d.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&d.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":d=o.createElementNS(Tu,"path"),d.setAttribute("d",this.opsToPath(h,c)),d.setAttribute("stroke","none"),d.setAttribute("stroke-width","0"),d.setAttribute("fill",a.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||d.setAttribute("fill-rule","evenodd");break;case"fillSketch":d=this.fillSketch(o,h,a)}d&&l.appendChild(d)}return l}fillSketch(t,i,a){let o=a.fillWeight;o<0&&(o=a.strokeWidth/2);const l=t.createElementNS(Tu,"path");return l.setAttribute("d",this.opsToPath(i,a.fixedDecimalPlaceDigits)),l.setAttribute("stroke",a.fill||""),l.setAttribute("stroke-width",o+""),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,o,l){const c=this.gen.line(t,i,a,o,l);return this.draw(c)}rectangle(t,i,a,o,l){const c=this.gen.rectangle(t,i,a,o,l);return this.draw(c)}ellipse(t,i,a,o,l){const c=this.gen.ellipse(t,i,a,o,l);return this.draw(c)}circle(t,i,a,o){const l=this.gen.circle(t,i,a,o);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,o,l,c,h=!1,d){const f=this.gen.arc(t,i,a,o,l,c,h,d);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 At={canvas:(e,t)=>new A4(e,t),svg:(e,t)=>new M4(e,t),generator:e=>new vd(e),newSeed:()=>vd.newSeed()},Pt=S(async(e,t,i)=>{var y,C;let a;const o=t.useHtmlLabels||ra((y=he())==null?void 0:y.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",ir(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const d=!!t.icon||!!t.img,f=t.labelType==="markdown",p=await aa(c,Di(yo(h),he()),{useHtmlLabels:o,width:t.width||((C=he().flowchart)==null?void 0:C.wrappingWidth),classes:f?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:d,markdown:f},he());let g=p.getBBox();const x=((t==null?void 0:t.padding)??0)/2;if(o){const k=p.children[0],v=Zt(p);await ow(k,h),g=k.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}return o?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"),Sg=S(async(e,t,i)=>{var d,f;const a=i.useHtmlLabels??Ar(he()),o=e.insert("g").attr("class","label").attr("style",i.labelStyle||""),l=await aa(o,Di(yo(t),he()),{useHtmlLabels:a,width:i.width||((f=(d=he())==null?void 0:d.flowchart)==null?void 0:f.wrappingWidth),style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img});let c=l.getBBox();const h=i.padding/2;if(Ar(he())){const p=l.children[0],g=Zt(l);c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return a?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),i.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:e,bbox:c,halfPadding:h,label:o}},"insertLabel"),Ot=S((e,t)=>{const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),jt=S((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function oe(e){const t=e.map((i,a)=>`${a===0?"M":"L"}${i.x},${i.y}`);return t.push("Z"),t.join(" ")}S(oe,"createPathFromPoints");function Tn(e,t,i,a,o,l){const c=[],d=i-e,f=a-t,p=d/l,g=2*Math.PI/p,x=t+f/2;for(let y=0;y<=50;y++){const C=y/50,k=e+C*d,v=x+o*Math.sin(g*(k-e));c.push({x:k,y:v})}return c}S(Tn,"generateFullSineWavePoints");function Ic(e,t,i,a,o,l){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}S(Ic,"generateCirclePoints");function bm(e){const t=Array.from(e.childNodes).filter(d=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),a=t.map(d=>d.getAttribute("d")).filter(d=>d!==null).join(" ");i.setAttribute("d",a);const o=t.find(d=>d.getAttribute("fill")!=="none"),l=t.find(d=>d.getAttribute("stroke")!=="none"),c=S((d,f)=>(d==null?void 0:d.getAttribute(f))??void 0,"getAttr");if(o){const d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,p])=>{p&&i.setAttribute(f,p)})}if(l){const d={stroke:c(l,"stroke"),"stroke-width":c(l,"stroke-width")??"1","stroke-opacity":c(l,"stroke-opacity")??"1"};Object.entries(d).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(bm,"mergePaths");var D4=S((e,t)=>{var i=e.x,a=e.y,o=t.x-i,l=t.y-a,c=e.width/2,h=e.height/2,d,f;return Math.abs(l)*c>Math.abs(o)*h?(l<0&&(h=-h),d=l===0?0:h*o/l,f=h):(o<0&&(c=-c),d=c,f=o===0?0:c*l/o),{x:i+d,y:a+f}},"intersectRect"),ko=D4,R4=S(async(e,t,i,a=!1,o=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);const c=he(),h=Ar(c);return await aa(e,l,{style:i,isTitle:a,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),xn=R4,Bn=S((e,t,i,a,o)=>["M",e+o,t,"H",e+i-o,"A",o,o,0,0,1,e+i,t+o,"V",t+a-o,"A",o,o,0,0,1,e+i-o,t+a,"H",e+o,"A",o,o,0,0,1,e,t+a-o,"V",t+o,"A",o,o,0,0,1,e+o,t,"Z"].join(" "),"createRoundedRectPathD"),F4=S(async(e,t)=>{const i=he(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:l,clusterBorder:c}=a,h=c,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:g}=Rt(t),x=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),y=ra(i.flowchart.htmlLabels),C=t.direction==="LR",k=x.insert("g").attr("class","cluster-label swimlane-label"),v=await aa(k,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let T=v.getBBox();if(y){const it=v.children[0],X=Zt(v);T=it.getBoundingClientRect(),X.attr("width",T.width),X.attr("height",T.height)}const B=t.padding??0,L=t.width<=T.width+B?T.width+B:t.width;t.width<=T.width+B?t.diff=(L-t.width)/2-B:t.diff=-B;const M=t.height,F=t.y-M/2,$=t.y+M/2,N=t.x-L/2,j=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:F+M/3,ot=C?4:0,K=T.height+2*ot;let Y,Z;if(C){const it=Math.max(K,T.height+2*ot),X=N+it,U=Math.max(0,L-it);if(t.look==="handDrawn"){const z=At.svg(x),P=Lt(t,{roughness:.7,fill:l,stroke:h,fillWeight:3,seed:o}),G=Lt(t,{roughness:.7,fill:"none",stroke:h,seed:o}),R=z.rectangle(N,F,it,M,P);Y=x.insert(()=>R,":first-child");const q=z.rectangle(X,F,U,M,G);Z=x.insert(()=>q,":first-child"),Y.select("path:nth-child(2)").attr("style",p.join(";")),Y.select("path").attr("style",g.join(";").replace("fill","stroke"))}else Y=x.insert("rect",":first-child"),Z=x.insert("rect",":first-child"),Y.attr("class","swimlane-title").attr("style",f).attr("x",N).attr("y",F).attr("width",it).attr("height",M).attr("fill",l).attr("stroke",h),Z.attr("class","swimlane-body").attr("style",f).attr("x",X).attr("y",F).attr("width",U).attr("height",M).attr("fill","none").attr("stroke",h);const D=N+it/2,I=t.y;k.attr("transform",`translate(${D}, ${I}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{const it=Math.max(0,j-F),X=Math.min(K,it),U=F+X,D=Math.max(0,$-U),I=t.x-L/2;if(t.look==="handDrawn"){const G=At.svg(x),R=Lt(t,{roughness:.7,fill:l,stroke:h,fillWeight:3,seed:o}),q=Lt(t,{roughness:.7,fill:"none",stroke:h,seed:o}),nt=G.rectangle(I,F,L,X,R);Y=x.insert(()=>nt,":first-child");const ht=G.rectangle(I,U,L,D,q);Z=x.insert(()=>ht,":first-child"),Y.select("path:nth-child(2)").attr("style",p.join(";")),Y.select("path").attr("style",g.join(";").replace("fill","stroke"))}else Y=x.insert("rect",":first-child"),Z=x.insert("rect",":first-child"),Y.attr("class","swimlane-title").attr("style",f).attr("x",I).attr("y",F).attr("width",L).attr("height",X).attr("fill",l).attr("stroke",h),Z.attr("class","swimlane-body").attr("style",f).attr("x",I).attr("y",U).attr("width",L).attr("height",D).attr("fill","none").attr("stroke",h);const z=t.x-T.width/2,P=F+(X-T.height)/2;k.attr("transform",`translate(${z}, ${P})`)}if(mt.trace("Swimlane data ",t,JSON.stringify(t)),d){const it=k.select("span");it&&it.attr("style",d)}return t.offsetX=0,t.width=L,t.height=M,t.offsetY=T.height-B/2,t.intersect=function(it){return ko(t,it)},{cluster:x,labelBBox:T}},"swimlane"),qw=S(async(e,t)=>{mt.info("Creating subgraph rect for ",t.id,t);const i=he(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=Rt(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=Ar(i),y=g.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await aa(y,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width}):C=await xn(y,t.label,t.labelStyle||"",!1,!0);let k=C.getBBox();if(Ar(i)){const N=C.children[0],j=Zt(C);k=N.getBoundingClientRect(),j.attr("width",k.width),j.attr("height",k.height)}const v=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,B=t.x-v/2,L=t.y-T/2;mt.trace("Data ",t,JSON.stringify(t));let M;if(t.look==="handDrawn"){const N=At.svg(g),j=Lt(t,{roughness:.7,fill:l,stroke:c,fillWeight:3,seed:o}),ot=N.path(Bn(B,L,v,T,0),j);M=g.insert(()=>(mt.debug("Rough node insert CXC",ot),ot),":first-child"),M.select("path:nth-child(2)").attr("style",f.join(";")),M.select("path").attr("style",p.join(";").replace("fill","stroke"))}else M=g.insert("rect",":first-child"),M.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",B).attr("y",L).attr("width",v).attr("height",T);const{subGraphTitleTopMargin:F}=Cy(i);if(y.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+F})`),h){const N=y.select("span");N&&N.attr("style",h)}const $=M.node().getBBox();return t.offsetX=0,t.width=$.width,t.height=$.height,t.offsetY=k.height-t.padding/2,t.intersect=function(N){return ko(t,N)},{cluster:g,labelBBox:k}},"rect"),z4=S((e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.domId),a=i.insert("rect",":first-child"),o=0*t.padding,l=o/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+o).attr("height",t.height+o).attr("fill","none");const c=a.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(h){return ko(t,h)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),O4=S(async(e,t)=>{const i=he(),{themeVariables:a,handDrawnSeed:o}=i,{altBackground:l,compositeBackground:c,compositeTitleBackground:h,nodeBorder:d}=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 y=await xn(g,t.label,t.labelStyle,void 0,!0);let C=y.getBBox();if(Ar(i)){const ot=y.children[0],K=Zt(y);C=ot.getBoundingClientRect(),K.attr("width",C.width),K.attr("height",C.height)}const k=0*t.padding,v=k/2,T=(t.width<=C.width+t.padding?C.width+t.padding:t.width)+k;t.width<=C.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;const B=t.height+k,L=t.height+k-C.height-6,M=t.x-T/2,F=t.y-B/2;t.width=T;const $=t.y-t.height/2-v+C.height+2;let N;if(t.look==="handDrawn"){const ot=t.cssClasses.includes("statediagram-cluster-alt"),K=At.svg(f),Y=t.rx||t.ry?K.path(Bn(M,F,T,B,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:d,seed:o}):K.rectangle(M,F,T,B,{seed:o});N=f.insert(()=>Y,":first-child");const Z=K.rectangle(M,$,T,L,{fill:ot?l:c,fillStyle:ot?"hachure":"solid",stroke:d,seed:o});N=f.insert(()=>Y,":first-child"),x=f.insert(()=>Z)}else N=p.insert("rect",":first-child"),N.attr("class","outer").attr("x",M).attr("y",F).attr("width",T).attr("height",B).attr("data-look",t.look),x.attr("class","inner").attr("x",M).attr("y",$).attr("width",T).attr("height",L);g.attr("transform",`translate(${t.x-C.width/2}, ${F+1-(Ar(i)?0:3)})`);const j=N.node().getBBox();return t.height=j.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(ot){return ko(t,ot)},{cluster:f,labelBBox:C}},"roundedWithTitle"),$4=S(async(e,t)=>{mt.info("Creating subgraph rect for ",t.id,t);const i=he(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:l,clusterBorder:c}=a,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=Rt(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),x=Ar(i),y=g.insert("g").attr("class","cluster-label "),C=await aa(y,t.label,{style:t.labelStyle,useHtmlLabels:x,isNode:!0,width:t.width});let k=C.getBBox();if(Ar(i)){const N=C.children[0],j=Zt(C);k=N.getBoundingClientRect(),j.attr("width",k.width),j.attr("height",k.height)}const v=t.width<=k.width+t.padding?k.width+t.padding:t.width;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height,B=t.x-v/2,L=t.y-T/2;mt.trace("Data ",t,JSON.stringify(t));let M;if(t.look==="handDrawn"){const N=At.svg(g),j=Lt(t,{roughness:.7,fill:l,stroke:c,fillWeight:4,seed:o}),ot=N.path(Bn(B,L,v,T,t.rx),j);M=g.insert(()=>(mt.debug("Rough node insert CXC",ot),ot),":first-child"),M.select("path:nth-child(2)").attr("style",f.join(";")),M.select("path").attr("style",p.join(";").replace("fill","stroke"))}else M=g.insert("rect",":first-child"),M.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",B).attr("y",L).attr("width",v).attr("height",T);const{subGraphTitleTopMargin:F}=Cy(i);if(y.attr("transform",`translate(${t.x-k.width/2}, ${t.y-t.height/2+F})`),h){const N=y.select("span");N&&N.attr("style",h)}const $=M.node().getBBox();return t.offsetX=0,t.width=$.width,t.height=$.height,t.offsetY=k.height-t.padding/2,t.intersect=function(N){return ko(t,N)},{cluster:g,labelBBox:k}},"kanbanSection"),N4=S((e,t)=>{const i=he(),{themeVariables:a,handDrawnSeed:o}=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"),d=0*t.padding,f=t.width+d;t.diff=-t.padding;const p=t.height+d,g=t.x-f/2,x=t.y-p/2;t.width=f;let y;if(t.look==="handDrawn"){const v=At.svg(c).rectangle(g,x,f,p,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:o});y=c.insert(()=>v,":first-child")}else{y=h.insert("rect",":first-child");let k="outer";t.look,k="divider",y.attr("class",k).attr("x",g).attr("y",x).attr("width",f).attr("height",p).attr("data-look",t.look)}const C=y.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(k){return ko(t,k)},{cluster:c,labelBBox:{}}},"divider"),I4=qw,q4={rect:qw,squareRect:I4,roundedWithTitle:O4,noteGroup:z4,divider:N4,kanbanSection:$4,swimlane:F4},jw=new Map,j4=S(async(e,t)=>{const i=t.shape||"rect",a=await q4[i](e,t);return jw.set(t.id,a),a},"insertCluster"),Uj=S(()=>{jw=new Map},"clear");function Hw(e,t){return e.intersect(t)}S(Hw,"intersectNode");var H4=Hw;function Pw(e,t,i,a){var o=e.x,l=e.y,c=o-a.x,h=l-a.y,d=Math.sqrt(t*t*h*h+i*i*c*c),f=Math.abs(t*i*c/d);a.x<o&&(f=-f);var p=Math.abs(t*i*h/d);return a.y<l&&(p=-p),{x:o+f,y:l+p}}S(Pw,"intersectEllipse");var Ww=Pw;function Uw(e,t,i){return Ww(e,t,t,i)}S(Uw,"intersectCircle");var P4=Uw;function Yw(e,t,i,a){{const o=t.y-e.y,l=e.x-t.x,c=t.x*e.y-e.x*t.y,h=o*i.x+l*i.y+c,d=o*a.x+l*a.y+c,f=1e-6;if(h!==0&&d!==0&&Cm(h,d))return;const p=a.y-i.y,g=i.x-a.x,x=a.x*i.y-i.x*a.y,y=p*e.x+g*e.y+x,C=p*t.x+g*t.y+x;if(Math.abs(y)<f&&Math.abs(C)<f&&Cm(y,C))return;const k=o*g-p*l;if(k===0)return;const v=Math.abs(k/2);let T=l*x-g*c;const B=T<0?(T-v)/k:(T+v)/k;T=p*c-o*x;const L=T<0?(T-v)/k:(T+v)/k;return{x:B,y:L}}}S(Yw,"intersectLine");function Cm(e,t){return e*t>0}S(Cm,"sameSign");var W4=Yw;function Gw(e,t,i){let a=e.x,o=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 d=a-e.width/2-c,f=o-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],y=W4(e,i,{x:d+g.x,y:f+g.y},{x:d+x.x,y:f+x.y});y&&l.push(y)}return l.length?(l.length>1&&l.sort(function(p,g){let x=p.x-i.x,y=p.y-i.y,C=Math.sqrt(x*x+y*y),k=g.x-i.x,v=g.y-i.y,T=Math.sqrt(k*k+v*v);return C<T?-1:C===T?0:1}),l[0]):e}S(Gw,"intersectPolygon");var U4=Gw,Et={node:H4,circle:P4,ellipse:Ww,polygon:U4,rect:ko};function Vw(e,t){const{labelStyles:i}=Rt(t);t.labelStyle=i;const a=jt(t);let o=a;a||(o="anchor");const l=e.insert("g").attr("class",o).attr("id",t.domId||t.id),c=1,{cssStyles:h}=t,d=At.svg(l),f=Lt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);const p=d.circle(0,0,c*2,f),g=l.insert(()=>p,":first-child");return g.attr("class","anchor").attr("style",ir(h)),Ot(t,g),t.intersect=function(x){return mt.info("Circle intersect",t,c,x),Et.circle(t,c,x)},l}S(Vw,"anchor");function vm(e,t,i,a,o,l,c){const d=(e+i)/2,f=(t+a)/2,p=Math.atan2(a-t,i-e),g=(i-e)/2,x=(a-t)/2,y=g/o,C=x/l,k=Math.sqrt(y**2+C**2);if(k>1)throw new Error("The given radii are too small to create an arc between the points.");const v=Math.sqrt(1-k**2),T=d+v*l*Math.sin(p)*(c?-1:1),B=f-v*o*Math.cos(p)*(c?-1:1),L=Math.atan2((t-B)/l,(e-T)/o);let F=Math.atan2((a-B)/l,(i-T)/o)-L;c&&F<0&&(F+=2*Math.PI),!c&&F>0&&(F-=2*Math.PI);const $=[];for(let N=0;N<20;N++){const j=N/19,ot=L+j*F,K=T+o*Math.cos(ot),Y=B+l*Math.sin(ot);$.push({x:K,y:Y})}return $}S(vm,"generateArcPoints");function Xw(e,t,i){const[a,o]=[t,i].sort((l,c)=>c-l);return o*(1-Math.sqrt(1-(e/a/2)**2))}S(Xw,"calculateArcSagitta");async function Qw(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=S(ot=>ot+c,"calcTotalHeight"),d=S(ot=>{const K=ot/2;return[K/(2.5+ot/50),K]},"calcEllipseRadius"),{shapeSvg:f,bbox:p}=await Pt(e,t,jt(t)),g=h(t!=null&&t.height?t==null?void 0:t.height:p.height),[x,y]=d(g),C=Xw(g,x,y),v=(t!=null&&t.width?t==null?void 0:t.width:p.width)+l*2+C-C,T=g,{cssStyles:B}=t,L=[{x:v/2,y:-T/2},{x:-v/2,y:-T/2},...vm(-v/2,-T/2,-v/2,T/2,x,y,!1),{x:v/2,y:T/2},...vm(v/2,T/2,v/2,-T/2,x,y,!0)],M=At.svg(f),F=Lt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const $=oe(L),N=M.path($,F),j=f.insert(()=>N,":first-child");return j.attr("class","basic label-container outer-path"),B&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",B),a&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",a),j.attr("transform",`translate(${x/2}, 0)`),Ot(t,j),t.intersect=function(ot){return Et.polygon(t,L,ot)},f}S(Qw,"bowTieRect");function Fa(e,t,i,a){return e.insert("polygon",":first-child").attr("points",a.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+i/2+")")}S(Fa,"insertPolygonShape");var _u=12;async function Kw(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?28:o,c=t.look==="neo"?24:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=((t==null?void 0:t.width)??d.width)+(t.look==="neo"?l*2:l+_u),p=((t==null?void 0:t.height)??d.height)+(t.look==="neo"?c*2:c),g=0,x=f,y=-p,C=0,k=[{x:g+_u,y},{x,y},{x,y:C},{x:g,y:C},{x:g,y:y+_u},{x:g+_u,y}];let v;const{cssStyles:T}=t;if(t.look==="handDrawn"){const B=At.svg(h),L=Lt(t,{}),M=oe(k),F=B.path(M,L);v=h.insert(()=>F,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),T&&v.attr("style",T)}else v=Fa(h,f,p,k);return a&&v.attr("style",a),Ot(t,v),t.intersect=function(B){return Et.polygon(t,k,B)},h}S(Kw,"card");function Zw(e,t){const{nodeStyles:i}=Rt(t);t.label="";const a=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),{cssStyles:o}=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=At.svg(a),d=Lt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=oe(c),p=h.path(f,d),g=a.insert(()=>p,":first-child");return o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),t.width=28,t.height=28,t.intersect=function(x){return Et.polygon(t,c,x)},a}S(Zw,"choice");async function Ry(e,t,i){const{labelStyles:a,nodeStyles:o}=Rt(t);t.labelStyle=a;const{shapeSvg:l,bbox:c,halfPadding:h}=await Pt(e,t,jt(t)),d=16,f=(i==null?void 0:i.padding)??h,p=t.look==="neo"?c.width/2+d*2:c.width/2+f;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=At.svg(l),C=Lt(t,{}),k=y.circle(0,0,p*2,C);g=l.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",ir(x))}else g=l.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",p).attr("cx",0).attr("cy",0);return Ot(t,g),t.calcIntersect=function(y,C){const k=y.width/2;return Et.circle(y,k,C)},t.intersect=function(y){return mt.info("Circle intersect",t,p,y),Et.circle(t,p,y)},l}S(Ry,"circle");function Jw(e){const t=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),a=e*2,o={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}
                   M ${o.x},${o.y} L ${c.x},${c.y}`}S(Jw,"createLine");function tT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i,t.label="";const o=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),l=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:c}=t,h=At.svg(o),d=Lt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=h.circle(0,0,l*2,d),p=Jw(l),g=h.path(p,d),x=o.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),Ot(t,x),t.intersect=function(y){return mt.info("crossedCircle intersect",t,{radius:l,point:y}),Et.circle(t,l,y)},o}S(tT,"crossedCircle");function Ea(e,t,i,a=100,o=0,l=180){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}S(Ea,"generateCirclePoints");async function eT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Pt(e,t,jt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+h,p=l.height+d,g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...Ea(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...Ea(f/2+g*2,-g,g,20,-180,-270),...Ea(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...Ea(f/2,p/2,g,20,0,90)],C=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...Ea(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...Ea(f/2+f*.1,-g,g,20,-180,-270),...Ea(f/2+f*.1,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...Ea(f/2,p/2,g,20,0,90),{x:-f/2,y:p/2+g},{x:f/2,y:p/2+g}],k=At.svg(o),v=Lt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=oe(y).replace("Z",""),L=k.path(B,v),M=oe(C),F=k.path(M,{...v}),$=o.insert("g",":first-child");return $.insert(()=>F,":first-child").attr("stroke-opacity",0),$.insert(()=>L,":first-child"),$.attr("class","text"),x&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",a),$.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))})`),Ot(t,$),t.intersect=function(N){return Et.polygon(t,C,N)},o}S(eT,"curlyBraceLeft");function La(e,t,i,a=100,o=0,l=180){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:y,y:C})}return c}S(La,"generateCirclePoints");async function rT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Pt(e,t,jt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?d*2:d),g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...La(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...La(f/2+g*2,-g,g,20,-180,-270),...La(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...La(f/2,p/2,g,20,0,90)],C=[{x:-f/2,y:-p/2-g},{x:f/2,y:-p/2-g},...La(f/2,-p/2,g,20,-90,0),{x:f/2+g,y:-g},...La(f/2+g*2,-g,g,20,-180,-270),...La(f/2+g*2,g,g,20,-90,-180),{x:f/2+g,y:p/2},...La(f/2,p/2,g,20,0,90),{x:f/2,y:p/2+g},{x:-f/2,y:p/2+g}],k=At.svg(o),v=Lt(t,{fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=oe(y).replace("Z",""),L=k.path(B,v),M=oe(C),F=k.path(M,{...v}),$=o.insert("g",":first-child");return $.insert(()=>F,":first-child").attr("stroke-opacity",0),$.insert(()=>L,":first-child"),$.attr("class","text"),x&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",a),$.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))})`),Ot(t,$),t.intersect=function(N){return Et.polygon(t,C,N)},o}S(rT,"curlyBraceRight");function dr(e,t,i,a=100,o=0,l=180){const c=[],h=o*Math.PI/180,p=(l*Math.PI/180-h)/(a-1);for(let g=0;g<a;g++){const x=h+g*p,y=e+i*Math.cos(x),C=t+i*Math.sin(x);c.push({x:-y,y:-C})}return c}S(dr,"generateCirclePoints");async function iT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Pt(e,t,jt(t)),h=t.look==="neo"?18:t.padding??0,d=t.look==="neo"?12:t.padding??0,f=l.width+(t.look==="neo"?h*2:h),p=l.height+(t.look==="neo"?d*2:d),g=Math.max(5,p*.1),{cssStyles:x}=t,y=[...dr(f/2,-p/2,g,30,-90,0),{x:-f/2-g,y:g},...dr(f/2+g*2,-g,g,20,-180,-270),...dr(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:-p/2},...dr(f/2,p/2,g,20,0,90)],C=[...dr(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...dr(-f/2-g/2,-g,g,20,0,90),...dr(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...dr(-f/2+g+g/2,p/2,g,30,-180,-270)],k=[{x:f/2,y:-p/2-g},{x:-f/2,y:-p/2-g},...dr(f/2,-p/2,g,20,-90,0),{x:-f/2-g,y:-g},...dr(f/2+g*2,-g,g,20,-180,-270),...dr(f/2+g*2,g,g,20,-90,-180),{x:-f/2-g,y:p/2},...dr(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},...dr(-f/2+g+g/2,-p/2,g,20,-90,-180),{x:f/2-g/2,y:g},...dr(-f/2-g/2,-g,g,20,0,90),...dr(-f/2-g/2,g,g,20,-90,0),{x:f/2-g/2,y:-g},...dr(-f/2+g+g/2,p/2,g,30,-180,-270)],v=At.svg(o),T=Lt(t,{fill:"none"});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const L=oe(y).replace("Z",""),M=v.path(L,T),$=oe(C).replace("Z",""),N=v.path($,T),j=oe(k),ot=v.path(j,{...T}),K=o.insert("g",":first-child");return K.insert(()=>ot,":first-child").attr("stroke-opacity",0),K.insert(()=>M,":first-child"),K.insert(()=>N,":first-child"),K.attr("class","text"),x&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",x),a&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",a),K.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))})`),Ot(t,K),t.intersect=function(Y){return Et.polygon(t,k,Y)},o}S(iT,"curlyBraces");async function aT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=20,d=5,{shapeSvg:f,bbox:p}=await Pt(e,t,jt(t)),g=Math.max(h,(p.width+l*2)*1.25,(t==null?void 0:t.width)??0),x=Math.max(d,p.height+c*2,(t==null?void 0:t.height)??0),y=x/2,{cssStyles:C}=t,k=At.svg(f),v=Lt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=g,B=x,L=T-y,M=B/4,F=[{x:L,y:0},{x:M,y:0},{x:0,y:B/2},{x:M,y:B},{x:L,y:B},...Ic(-L,-B/2,y,50,270,90)],$=oe(F),N=k.path($,v),j=f.insert(()=>N,":first-child");return j.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&j.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&j.selectChildren("path").attr("style",a),j.attr("transform",`translate(${-g/2}, ${-x/2})`),Ot(t,j),t.intersect=function(ot){return Et.polygon(t,F,ot)},f}S(aT,"curvedTrapezoid");var Y4=S((e,t,i,a,o,l)=>[`M${e},${t+l}`,`a${o},${l} 0,0,0 ${i},0`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createCylinderPathD"),G4=S((e,t,i,a,o,l)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`].join(" "),"createOuterCylinderPathD"),V4=S((e,t,i,a,o,l)=>[`M${e-i/2},${-a/2}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),n1=8,o1=8;async function nT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?24:o,c=t.look==="neo"?24:o;if(t.width||t.height){const v=t.width??0;t.width=(t.width??0)-c,t.width<o1&&(t.width=o1);const B=v/2/(2.5+v/50);t.height=(t.height??0)-l-B*3,t.height<n1&&(t.height=n1)}const{shapeSvg:h,bbox:d,label:f}=await Pt(e,t,jt(t)),p=(t.width?t.width:d.width)+c,g=p/2,x=g/(2.5+p/50),y=(t.height?t.height:d.height)+l+x;let C;const{cssStyles:k}=t;if(t.look==="handDrawn"){const v=At.svg(h),T=G4(0,0,p,y,g,x),B=V4(0,x,p,y,g,x),L=Lt(t,{}),M=v.path(T,L),F=v.path(B,Lt(t,{fill:"none"}));C=h.insert(()=>F,":first-child"),C=h.insert(()=>M,":first-child"),C.attr("class","basic label-container"),k&&C.attr("style",k)}else{const v=Y4(0,0,p,y,g,x);C=h.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",ir(k)).attr("style",a)}return C.attr("label-offset-y",x),C.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),Ot(t,C),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+(t.padding??0)/1.5-(d.y-(d.top??0))})`),t.intersect=function(v){const T=Et.rect(t,v),B=T.x-(t.x??0);if(g!=0&&(Math.abs(B)<(t.width??0)/2||Math.abs(B)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-x)){let L=x*x*(1-B*B/(g*g));L>0&&(L=Math.sqrt(L)),L=x-L,v.y-(t.y??0)>0&&(L=-L),T.y+=L}return T},h}S(nT,"cylinder");async function tl(e,t,i){const{labelStyles:a,nodeStyles:o}=Rt(t);t.labelStyle=a;const{shapeSvg:l,bbox:c}=await Pt(e,t,jt(t)),h=Math.max(c.width+i.labelPaddingX*2,(t==null?void 0:t.width)||0),d=Math.max(c.height+i.labelPaddingY*2,(t==null?void 0:t.height)||0),f=-h/2,p=-d/2;let g,{rx:x,ry:y}=t;const{cssStyles:C}=t;if(i!=null&&i.rx&&i.ry&&(x=i.rx,y=i.ry),t.look==="handDrawn"){const k=At.svg(l),v=Lt(t,{}),T=x||y?k.path(Bn(f,p,h,d,x||0),v):k.rectangle(f,p,h,d,v);g=l.insert(()=>T,":first-child"),g.attr("class","basic label-container").attr("style",ir(C))}else g=l.insert("rect",":first-child"),g.attr("class","basic label-container").attr("style",o).attr("rx",ir(x)).attr("ry",ir(y)).attr("x",f).attr("y",p).attr("width",h).attr("height",d);return Ot(t,g),t.calcIntersect=function(k,v){return Et.rect(k,v)},t.intersect=function(k){return Et.rect(t,k)},l}S(tl,"drawRect");async function oT(e,t){const{cssClasses:i,labelPaddingX:a,labelPaddingY:o,padding:l,width:c,height:h}=t,d={rx:0,ry:0,labelPaddingX:a??(l??0)*2,labelPaddingY:o??l??0},f=await tl(e,t,d);if(t.look==="handDrawn"){const y=At.svg(f),C=Lt(t,{}),k=f.select(".basic.label-container > path:nth-child(2)"),v=k.node();if(!v)return f;let T=null;if(v instanceof SVGGraphicsElement)T=v.getBBox();else return f;return f.insert(()=>y.line(T.x,T.y,T.x+T.width,T.y,C),".basic.label-container g.label"),f.insert(()=>y.line(T.x,T.y+T.height,T.x+T.width,T.y+T.height,C),".basic.label-container g.label"),k.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(oT,"datastore");async function sT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?16:t.padding??0,{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(t)),f=h.width+o,p=h.height+l,g=p*.2,x=-f/2,y=-p/2-g/2,{cssStyles:C}=t,k=At.svg(c),v=Lt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=[{x,y:y+g},{x:-x,y:y+g},{x:-x,y:-y},{x,y:-y},{x,y},{x:-x,y},{x:-x,y:y+g}],B=k.polygon(T.map(M=>[M.x,M.y]),v),L=c.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",a),d.attr("transform",`translate(${x+(t.padding??0)/2-(h.x-(h.left??0))}, ${y+g+(t.padding??0)/2-(h.y-(h.top??0))})`),Ot(t,L),t.intersect=function(M){return Et.rect(t,M)},c}S(sT,"dividedRectangle");async function lT(e,t){var y,C;const{labelStyles:i,nodeStyles:a}=Rt(t),o=t.look==="neo"?12:5;t.labelStyle=i;const l=t.padding??0,c=t.look==="neo"?16:l,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=(t!=null&&t.width?(t==null?void 0:t.width)/2:d.width/2)+(c??0),p=f-o;let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=At.svg(h),v=Lt(t,{roughness:.2,strokeWidth:2.5}),T=Lt(t,{roughness:.2,strokeWidth:1.5}),B=k.circle(0,0,f*2,v),L=k.circle(0,0,p*2,T);g=h.insert("g",":first-child"),g.attr("class",ir(t.cssClasses)).attr("style",ir(x)),(y=g.node())==null||y.appendChild(B),(C=g.node())==null||C.appendChild(L)}else{g=h.insert("g",":first-child");const k=g.insert("circle",":first-child"),v=g.insert("circle");g.attr("class","basic label-container").attr("style",a),k.attr("class","outer-circle").attr("style",a).attr("r",f).attr("cx",0).attr("cy",0),v.attr("class","inner-circle").attr("style",a).attr("r",p).attr("cx",0).attr("cy",0)}return Ot(t,g),t.intersect=function(k){return mt.info("DoubleCircle intersect",t,f,k),Et.circle(t,f,k)},h}S(lT,"doublecircle");function cT(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:o}=Rt(t);t.label="",t.labelStyle=a;const l=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),c=7,{cssStyles:h}=t,d=At.svg(l),{nodeBorder:f}=i,p=Lt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(p.roughness=0);const g=d.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),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),Ot(t,x),t.intersect=function(y){return mt.info("filledCircle intersect",t,{radius:c,point:y}),Et.circle(t,c,y)},l}S(cT,"filledCircle");var s1=10,l1=10;async function hT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<s1&&(t.height=s1),t.width=((t==null?void 0:t.width)??0)-l-l/2,t.width<l1&&(t.width=l1));const{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(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:y}=t,C=At.svg(c),k=Lt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=oe(x),T=C.path(v,k),B=c.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),t.width=f,t.height=p,Ot(t,B),d.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(L){return mt.info("Triangle intersect",t,x,L),Et.polygon(t,x,L)},c}S(hT,"flippedTriangle");function uT(e,t,{dir:i,config:{state:a,themeVariables:o}}){const{nodeStyles:l}=Rt(t);t.label="";const c=e.insert("g").attr("class",jt(t)).attr("id",t.domId??t.id),{cssStyles:h}=t;let d=Math.max(70,(t==null?void 0:t.width)??0),f=Math.max(10,(t==null?void 0:t.height)??0);i==="LR"&&(d=Math.max(10,(t==null?void 0:t.width)??0),f=Math.max(70,(t==null?void 0:t.height)??0));const p=-1*d/2,g=-1*f/2,x=At.svg(c),y=Lt(t,{stroke:o.lineColor,fill:o.lineColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=x.rectangle(p,g,d,f,y),k=c.insert(()=>C,":first-child");h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),l&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",l),Ot(t,k);const v=(a==null?void 0:a.padding)??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(T){return Et.rect(t,T)},c}S(uT,"forkJoin");async function dT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=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<o&&(t.width=o));const{shapeSvg:d,bbox:f}=await Pt(e,t,jt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:Math.max(o,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:y}=t,C=At.svg(d),k=Lt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-p/2,y:-g/2},{x:p/2-x,y:-g/2},...Ic(-p/2+x,0,x,50,90,270),{x:p/2-x,y:g/2},{x:-p/2,y:g/2}],T=oe(v),B=C.path(T,k),L=d.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",a),Ot(t,L),t.intersect=function(M){return mt.info("Pill intersect",t,{radius:x,point:M}),Et.polygon(t,v,M)},d}S(dT,"halfRoundedRectangle");var X4=S((e,t,i,a,o)=>[`M${e+o},${t}`,`L${e+i-o},${t}`,`L${e+i},${t-a/2}`,`L${e+i-o},${t-a}`,`L${e+o},${t-a}`,`L${e},${t-a/2}`,"Z"].join(" "),"createHexagonPathD");async function fT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t),o=t.look==="neo"?3.5:4;t.labelStyle=i;const l=t.padding??0,c=70,h=32,d=t.look==="neo"?c:l,f=t.look==="neo"?h:l;if(t.width||t.height){const L=(t.height??0)/o;t.width=((t==null?void 0:t.width)??0)-2*L-f,t.height=(t.height??0)-d}const{shapeSvg:p,bbox:g}=await Pt(e,t,jt(t)),x=(t!=null&&t.height?t==null?void 0:t.height:g.height)+d,y=x/o,C=(t!=null&&t.width?t==null?void 0:t.width:g.width)+2*y+f,k=[{x:y,y:0},{x:C-y,y:0},{x:C,y:-x/2},{x:C-y,y:-x},{x:y,y:-x},{x:0,y:-x/2}];let v;const{cssStyles:T}=t;if(t.look==="handDrawn"){const B=At.svg(p),L=Lt(t,{}),M=X4(0,0,C,x,y),F=B.path(M,L);v=p.insert(()=>F,":first-child").attr("transform",`translate(${-C/2}, ${x/2})`),T&&v.attr("style",T)}else v=Fa(p,C,x,k);return a&&v.attr("style",a),t.width=C,t.height=x,Ot(t,v),t.intersect=function(B){return Et.polygon(t,k,B)},p}S(fT,"hexagon");async function pT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.label="",t.labelStyle=i;const{shapeSvg:o}=await Pt(e,t,jt(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,d=At.svg(o),f=Lt(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=oe(p),x=d.path(g,f),y=o.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),a&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",a),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Ot(t,y),t.intersect=function(C){return mt.info("Pill intersect",t,{points:p}),Et.polygon(t,p,C)},o}S(pT,"hourglass");async function gT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Rt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,label:g}=await Pt(e,t,"icon-shape default"),x=t.pos==="t",y=h,C=h,{nodeBorder:k}=i,{stylesMap:v}=Js(t),T=-C/2,B=-y/2,L=t.label?8:0,M=At.svg(f),F=Lt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const $=M.rectangle(T,B,C,y,F),N=Math.max(C,p.width),j=y+p.height+L,ot=M.rectangle(-N/2,-j/2,N,j,{...F,fill:"transparent",stroke:"none"}),K=f.insert(()=>$,":first-child"),Y=f.insert(()=>ot);if(t.icon){const Z=f.append("g");Z.html(`<g>${await Vc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const it=Z.node().getBBox(),X=it.width,U=it.height,D=it.x,I=it.y;Z.attr("transform",`translate(${-X/2-D},${x?p.height/2+L/2-U/2-I:-p.height/2-L/2-U/2-I})`),Z.attr("style",`color: ${v.get("stroke")??k};`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-j/2:j/2-p.height})`),K.attr("transform",`translate(0,${x?p.height/2+L/2:-p.height/2-L/2})`),Ot(t,Y),t.intersect=function(Z){if(mt.info("iconSquare intersect",t,Z),!t.label)return Et.rect(t,Z);const it=t.x??0,X=t.y??0,U=t.height??0;let D=[];return x?D=[{x:it-p.width/2,y:X-U/2},{x:it+p.width/2,y:X-U/2},{x:it+p.width/2,y:X-U/2+p.height+L},{x:it+C/2,y:X-U/2+p.height+L},{x:it+C/2,y:X+U/2},{x:it-C/2,y:X+U/2},{x:it-C/2,y:X-U/2+p.height+L},{x:it-p.width/2,y:X-U/2+p.height+L}]:D=[{x:it-C/2,y:X-U/2},{x:it+C/2,y:X-U/2},{x:it+C/2,y:X-U/2+y},{x:it+p.width/2,y:X-U/2+y},{x:it+p.width/2/2,y:X+U/2},{x:it-p.width/2,y:X+U/2},{x:it-p.width/2,y:X-U/2+y},{x:it-C/2,y:X-U/2+y}],Et.polygon(t,D,Z)},f}S(gT,"icon");async function mT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Rt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,label:g}=await Pt(e,t,"icon-shape default"),x=20,y=t.label?8:0,C=t.pos==="t",{nodeBorder:k,mainBkg:v}=i,{stylesMap:T}=Js(t),B=At.svg(f),L=Lt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const M=T.get("fill");L.stroke=M??v;const F=f.append("g");t.icon&&F.html(`<g>${await Vc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const $=F.node().getBBox(),N=$.width,j=$.height,ot=$.x,K=$.y,Y=Math.max(N,j)*Math.SQRT2+x*2,Z=B.circle(0,0,Y,L),it=Math.max(Y,p.width),X=Y+p.height+y,U=B.rectangle(-it/2,-X/2,it,X,{...L,fill:"transparent",stroke:"none"}),D=f.insert(()=>Z,":first-child"),I=f.insert(()=>U);return F.attr("transform",`translate(${-N/2-ot},${C?p.height/2+y/2-j/2-K:-p.height/2-y/2-j/2-K})`),F.attr("style",`color: ${T.get("stroke")??k};`),g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${C?-X/2:X/2-p.height})`),D.attr("transform",`translate(0,${C?p.height/2+y/2:-p.height/2-y/2})`),Ot(t,I),t.intersect=function(z){return mt.info("iconSquare intersect",t,z),Et.rect(t,z)},f}S(mT,"iconCircle");async function yT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Rt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Pt(e,t,"icon-shape default"),y=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:v,mainBkg:T}=i,{stylesMap:B}=Js(t),L=-k/2,M=-C/2,F=t.label?8:0,$=At.svg(f),N=Lt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const j=B.get("fill");N.stroke=j??T;const ot=$.path(Bn(L,M,k,C,5),N),K=Math.max(k,p.width),Y=C+p.height+F,Z=$.rectangle(-K/2,-Y/2,K,Y,{...N,fill:"transparent",stroke:"none"}),it=f.insert(()=>ot,":first-child").attr("class","icon-shape2"),X=f.insert(()=>Z);if(t.icon){const U=f.append("g");U.html(`<g>${await Vc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=U.node().getBBox(),I=D.width,z=D.height,P=D.x,G=D.y;U.attr("transform",`translate(${-I/2-P},${y?p.height/2+F/2-z/2-G:-p.height/2-F/2-z/2-G})`),U.attr("style",`color: ${B.get("stroke")??v};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-Y/2:Y/2-p.height})`),it.attr("transform",`translate(0,${y?p.height/2+F/2:-p.height/2-F/2})`),Ot(t,X),t.intersect=function(U){if(mt.info("iconSquare intersect",t,U),!t.label)return Et.rect(t,U);const D=t.x??0,I=t.y??0,z=t.height??0;let P=[];return y?P=[{x:D-p.width/2,y:I-z/2},{x:D+p.width/2,y:I-z/2},{x:D+p.width/2,y:I-z/2+p.height+F},{x:D+k/2,y:I-z/2+p.height+F},{x:D+k/2,y:I+z/2},{x:D-k/2,y:I+z/2},{x:D-k/2,y:I-z/2+p.height+F},{x:D-p.width/2,y:I-z/2+p.height+F}]:P=[{x:D-k/2,y:I-z/2},{x:D+k/2,y:I-z/2},{x:D+k/2,y:I-z/2+C},{x:D+p.width/2,y:I-z/2+C},{x:D+p.width/2/2,y:I+z/2},{x:D-p.width/2,y:I+z/2},{x:D-p.width/2,y:I-z/2+C},{x:D-k/2,y:I-z/2+C}],Et.polygon(t,P,U)},f}S(yT,"iconRounded");async function xT(e,t,{config:{themeVariables:i,flowchart:a}}){const{labelStyles:o}=Rt(t);t.labelStyle=o;const l=t.assetHeight??48,c=t.assetWidth??48,h=Math.max(l,c),d=a==null?void 0:a.wrappingWidth;t.width=Math.max(h,d??0);const{shapeSvg:f,bbox:p,halfPadding:g,label:x}=await Pt(e,t,"icon-shape default"),y=t.pos==="t",C=h+g*2,k=h+g*2,{nodeBorder:v,mainBkg:T}=i,{stylesMap:B}=Js(t),L=-k/2,M=-C/2,F=t.label?8:0,$=At.svg(f),N=Lt(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const j=B.get("fill");N.stroke=j??T;const ot=$.path(Bn(L,M,k,C,.1),N),K=Math.max(k,p.width),Y=C+p.height+F,Z=$.rectangle(-K/2,-Y/2,K,Y,{...N,fill:"transparent",stroke:"none"}),it=f.insert(()=>ot,":first-child"),X=f.insert(()=>Z);if(t.icon){const U=f.append("g");U.html(`<g>${await Vc(t.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);const D=U.node().getBBox(),I=D.width,z=D.height,P=D.x,G=D.y;U.attr("transform",`translate(${-I/2-P},${y?p.height/2+F/2-z/2-G:-p.height/2-F/2-z/2-G})`),U.attr("style",`color: ${B.get("stroke")??v};`)}return x.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-Y/2:Y/2-p.height})`),it.attr("transform",`translate(0,${y?p.height/2+F/2:-p.height/2-F/2})`),Ot(t,X),t.intersect=function(U){if(mt.info("iconSquare intersect",t,U),!t.label)return Et.rect(t,U);const D=t.x??0,I=t.y??0,z=t.height??0;let P=[];return y?P=[{x:D-p.width/2,y:I-z/2},{x:D+p.width/2,y:I-z/2},{x:D+p.width/2,y:I-z/2+p.height+F},{x:D+k/2,y:I-z/2+p.height+F},{x:D+k/2,y:I+z/2},{x:D-k/2,y:I+z/2},{x:D-k/2,y:I-z/2+p.height+F},{x:D-p.width/2,y:I-z/2+p.height+F}]:P=[{x:D-k/2,y:I-z/2},{x:D+k/2,y:I-z/2},{x:D+k/2,y:I-z/2+C},{x:D+p.width/2,y:I-z/2+C},{x:D+p.width/2/2,y:I+z/2},{x:D-p.width/2,y:I+z/2},{x:D-p.width/2,y:I-z/2+C},{x:D-k/2,y:I-z/2+C}],Et.polygon(t,P,U)},f}S(xT,"iconSquare");async function bT(e,t,{config:{flowchart:i}}){const a=new Image;a.src=(t==null?void 0:t.img)??"",await a.decode();const o=Number(a.naturalWidth.toString().replace("px","")),l=Number(a.naturalHeight.toString().replace("px",""));t.imageAspectRatio=o/l;const{labelStyles:c}=Rt(t);t.labelStyle=c;const h=i==null?void 0:i.wrappingWidth;t.defaultWidth=i==null?void 0:i.wrappingWidth;const d=Math.max(t.label?h??0:0,(t==null?void 0:t.assetWidth)??o),f=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:d,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:y}=await Pt(e,t,"image-shape default"),C=t.pos==="t",k=-f/2,v=-p/2,T=t.label?8:0,B=At.svg(g),L=Lt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const M=B.rectangle(k,v,f,p,L),F=Math.max(f,x.width),$=p+x.height+T,N=B.rectangle(-F/2,-$/2,F,$,{...L,fill:"none",stroke:"none"}),j=g.insert(()=>M,":first-child"),ot=g.insert(()=>N);if(t.img){const K=g.append("image");K.attr("href",t.img),K.attr("width",f),K.attr("height",p),K.attr("preserveAspectRatio","none"),K.attr("transform",`translate(${-f/2},${C?$/2-p:-$/2})`)}return y.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${C?-p/2-x.height/2-T/2:p/2-x.height/2+T/2})`),j.attr("transform",`translate(0,${C?x.height/2+T/2:-x.height/2-T/2})`),Ot(t,ot),t.intersect=function(K){if(mt.info("iconSquare intersect",t,K),!t.label)return Et.rect(t,K);const Y=t.x??0,Z=t.y??0,it=t.height??0;let X=[];return C?X=[{x:Y-x.width/2,y:Z-it/2},{x:Y+x.width/2,y:Z-it/2},{x:Y+x.width/2,y:Z-it/2+x.height+T},{x:Y+f/2,y:Z-it/2+x.height+T},{x:Y+f/2,y:Z+it/2},{x:Y-f/2,y:Z+it/2},{x:Y-f/2,y:Z-it/2+x.height+T},{x:Y-x.width/2,y:Z-it/2+x.height+T}]:X=[{x:Y-f/2,y:Z-it/2},{x:Y+f/2,y:Z-it/2},{x:Y+f/2,y:Z-it/2+p},{x:Y+x.width/2,y:Z-it/2+p},{x:Y+x.width/2/2,y:Z+it/2},{x:Y-x.width/2,y:Z+it/2},{x:Y-x.width/2,y:Z-it/2+p},{x:Y-f/2,y:Z-it/2+p}],Et.polygon(t,X,K)},g}S(bT,"imageSquare");async function CT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=o,c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=Math.max(d.width+(c??0)*2,(t==null?void 0:t.width)??0),p=Math.max(d.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:y}=t;if(t.look==="handDrawn"){const C=At.svg(h),k=Lt(t,{}),v=oe(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-f/2}, ${p/2})`),y&&x.attr("style",y)}else x=Fa(h,f,p,g);return a&&x.attr("style",a),t.width=f,t.height=p,Ot(t,x),t.intersect=function(C){return Et.polygon(t,g,C)},h}S(CT,"inv_trapezoid");async function vT(e,t){const{shapeSvg:i,bbox:a,label:o}=await Pt(e,t,"label"),l=i.insert("rect",":first-child");return l.attr("width",.1).attr("height",.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Ot(t,l),t.intersect=function(d){return Et.rect(t,d)},i}S(vT,"labelRect");async function kT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=o,c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=((t==null?void 0:t.height)??d.height)+l,p=((t==null?void 0:t.width)??d.width)+c,g=[{x:0,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:-(3*f)/6,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=At.svg(h),k=Lt(t,{}),v=oe(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=Fa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Ot(t,x),t.intersect=function(C){return Et.polygon(t,g,C)},h}S(kT,"lean_left");async function ST(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=o,c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=((t==null?void 0:t.height)??d.height)+l,p=((t==null?void 0:t.width)??d.width)+c,g=[{x:-3*f/6,y:0},{x:p,y:0},{x:p+3*f/6,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=At.svg(h),k=Lt(t,{}),v=oe(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=Fa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Ot(t,x),t.intersect=function(C){return Et.polygon(t,g,C)},h}S(ST,"lean_right");function wT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",jt(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),d=7,f=[{x:c,y:0},{x:0,y:h+d/2},{x:c-2*d,y:h+d/2},{x:0,y:2*h},{x:c,y:h-d/2},{x:2*d,y:h-d/2}],p=At.svg(o),g=Lt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=oe(f),y=p.path(x,g),C=o.insert(()=>y,":first-child");return C.attr("class","outer-path"),l&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),C.attr("transform",`translate(-${c/2},${-h})`),Ot(t,C),t.intersect=function(k){return mt.info("lightningBolt intersect",t,k),Et.polygon(t,f,k)},o}S(wT,"lightningBolt");var Q4=S((e,t,i,a,o,l,c)=>[`M${e},${t+l}`,`a${o},${l} 0,0,0 ${i},0`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),K4=S((e,t,i,a,o,l,c)=>[`M${e},${t+l}`,`M${e+i},${t+l}`,`a${o},${l} 0,0,0 ${-i},0`,`l0,${a}`,`a${o},${l} 0,0,0 ${i},0`,`l0,${-a}`,`M${e},${t+l+c}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),Z4=S((e,t,i,a,o,l)=>[`M${e-i/2},${-a/2}`,`a${o},${l} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),c1=10,h1=10;async function TT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?24:o;if(t.width||t.height){const T=t.width??0;t.width=(t.width??0)-l,t.width<h1&&(t.width=h1);const L=T/2/(2.5+T/50);t.height=(t.height??0)-c-L*3,t.height<c1&&(t.height=c1)}const{shapeSvg:h,bbox:d,label:f}=await Pt(e,t,jt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2,g=p/2,x=g/(2.5+p/50),y=(t!=null&&t.height?t==null?void 0:t.height:d.height)+x+c*2,C=y*.1;let k;const{cssStyles:v}=t;if(t.look==="handDrawn"){const T=At.svg(h),B=K4(0,0,p,y,g,x,C),L=Z4(0,x,p,y,g,x),M=Lt(t,{}),F=T.path(B,M),$=T.path(L,M);h.insert(()=>$,":first-child").attr("class","line"),k=h.insert(()=>F,":first-child"),k.attr("class","basic label-container"),v&&k.attr("style",v)}else{const T=Q4(0,0,p,y,g,x,C);k=h.insert("path",":first-child").attr("d",T).attr("class","basic label-container outer-path").attr("style",ir(v)).attr("style",a)}return k.attr("label-offset-y",x),k.attr("transform",`translate(${-p/2}, ${-(y/2+x)})`),Ot(t,k),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),t.intersect=function(T){const B=Et.rect(t,T),L=B.x-(t.x??0);if(g!=0&&(Math.abs(L)<(t.width??0)/2||Math.abs(L)==(t.width??0)/2&&Math.abs(B.y-(t.y??0))>(t.height??0)/2-x)){let M=x*x*(1-L*L/(g*g));M>0&&(M=Math.sqrt(M)),M=x-M,T.y-(t.y??0)>0&&(M=-M),B.y+=M}return B},h}S(TT,"linedCylinder");async function _T(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;if(t.width||t.height){const M=t.width;t.width=(M??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:d,label:f}=await Pt(e,t,jt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+(l??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:d.height)+(c??0)*2,x=t.look==="neo"?g/4:g/8,y=g+x,{cssStyles:C}=t,k=At.svg(h),v=Lt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=[{x:-p/2-p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:y/2},...Tn(-p/2-p/2*.1,y/2,p/2+p/2*.1,y/2,x,.8),{x:p/2+p/2*.1,y:-y/2},{x:-p/2-p/2*.1,y:-y/2},{x:-p/2,y:-y/2},{x:-p/2,y:y/2*1.1},{x:-p/2,y:-y/2}],B=k.polygon(T.map(M=>[M.x,M.y]),v),L=h.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",C),a&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",a),L.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-p/2+(t.padding??0)+p/2*.1/2-(d.x-(d.left??0))},${-g/2+(t.padding??0)-x/2-(d.y-(d.top??0))})`),Ot(t,L),t.intersect=function(M){return Et.polygon(t,T,M)},h}S(_T,"linedWaveEdgedRect");async function BT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,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:d,bbox:f,label:p}=await Pt(e,t,jt(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,y=g-2*h,C=x-2*h,k=-y/2,v=-C/2,{cssStyles:T}=t,B=At.svg(d),L=Lt(t,{}),M=[{x:k-h,y:v+h},{x:k-h,y:v+C+h},{x:k+y-h,y:v+C+h},{x:k+y-h,y:v+C},{x:k+y,y:v+C},{x:k+y,y:v+C-h},{x:k+y+h,y:v+C-h},{x:k+y+h,y:v-h},{x:k+h,y:v-h},{x:k+h,y:v},{x:k,y:v},{x:k,y:v+h}],F=[{x:k,y:v+h},{x:k+y-h,y:v+h},{x:k+y-h,y:v+C},{x:k+y,y:v+C},{x:k+y,y:v},{x:k,y:v}];t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const $=oe(M);let N=B.path($,L);const j=oe(F);let ot=B.path(j,L);t.look!=="handDrawn"&&(N=bm(N),ot=bm(ot));const K=d.insert("g",":first-child");return K.insert(()=>N),K.insert(()=>ot),K.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&K.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))})`),Ot(t,K),t.intersect=function(Y){return Et.polygon(t,M,Y)},d}S(BT,"multiRect");async function ET(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Pt(e,t,jt(t)),h=t.padding??0,d=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)-d*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)+d*2,x=Math.max(l.height,(t==null?void 0:t.height)??0)+f*3,y=t.look==="neo"?x/4:x/8,C=x+(p?y/2:-y/2),k=-g/2,v=-C/2,T=10,{cssStyles:B}=t,L=Tn(k-T,v+C+T,k+g-T,v+C+T,y,.8),M=L==null?void 0:L[L.length-1],F=[{x:k-T,y:v+T},{x:k-T,y:v+C+T},...L,{x:k+g-T,y:M.y-T},{x:k+g,y:M.y-T},{x:k+g,y:M.y-2*T},{x:k+g+T,y:M.y-2*T},{x:k+g+T,y:v-T},{x:k+T,y:v-T},{x:k+T,y:v},{x:k,y:v},{x:k,y:v+T}],$=[{x:k,y:v+T},{x:k+g-T,y:v+T},{x:k+g-T,y:M.y-T},{x:k+g,y:M.y-T},{x:k+g,y:v},{x:k,y:v}],N=At.svg(o),j=Lt(t,{});t.look!=="handDrawn"&&(j.roughness=0,j.fillStyle="solid");const ot=oe(F),K=N.path(ot,j),Y=oe($),Z=N.path(Y,j),it=o.insert(()=>K,":first-child");return it.insert(()=>Z),it.attr("class","basic label-container outer-path"),B&&t.look!=="handDrawn"&&it.selectAll("path").attr("style",B),a&&t.look!=="handDrawn"&&it.selectAll("path").attr("style",a),it.attr("transform",`translate(0,${-y/2})`),c.attr("transform",`translate(${-(l.width/2)-T-(l.x-(l.left??0))}, ${-(l.height/2)+T-y/2-(l.y-(l.top??0))})`),Ot(t,it),t.intersect=function(X){return Et.polygon(t,F,X)},o}S(ET,"multiWaveEdgedRectangle");async function LT(e,t,{config:{themeVariables:i}}){const{labelStyles:a,nodeStyles:o}=Rt(t);t.labelStyle=a,t.useHtmlLabels||Ar(Ee())||(t.centerLabel=!0);const{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(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:y}=t,C=At.svg(c),k=Lt(t,{fill:i.noteBkgColor,stroke:i.noteBorderColor});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=C.rectangle(g,x,f,p,k),T=c.insert(()=>v,":first-child");return T.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",y),o&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",o),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Ot(t,T),t.intersect=function(B){return Et.rect(t,B)},c}S(LT,"note");var J4=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 AT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l}=await Pt(e,t,jt(t)),c=l.width+(t.padding??0),h=l.height+(t.padding??0),d=c+h,f=.5,p=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}];let g;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=At.svg(o),C=Lt(t,{}),k=J4(0,0,d),v=y.path(k,C);g=o.insert(()=>v,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x&&g.attr("style",x)}else g=Fa(o,d,d,p),g.attr("transform",`translate(${-d/2+f}, ${d/2})`);return a&&g.attr("style",a),Ot(t,g),t.calcIntersect=function(y,C){const k=y.width,v=[{x:k/2,y:0},{x:k,y:-k/2},{x:k/2,y:-k},{x:0,y:-k/2}],T=Et.polygon(y,v,C);return{x:T.x-.5,y:T.y-.5}},t.intersect=function(y){return this.calcIntersect(t,y)},o}S(AT,"question");async function MT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?21:o??0,c=t.look==="neo"?12:o??0,{shapeSvg:h,bbox:d,label:f}=await Pt(e,t,jt(t)),p=((t==null?void 0:t.width)??d.width)+(t.look==="neo"?l*2:l),g=((t==null?void 0:t.height)??d.height)+(t.look==="neo"?c*2:c),x=-p/2,y=-g/2,C=y/2,k=[{x:x+C,y},{x,y:0},{x:x+C,y:-y},{x:-x,y:-y},{x:-x,y}],{cssStyles:v}=t,T=At.svg(h),B=Lt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=oe(k),M=T.path(L,B),F=h.insert(()=>M,":first-child");return F.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",v),a&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),F.attr("transform",`translate(${-C/2},0)`),f.attr("transform",`translate(${-C/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),Ot(t,F),t.intersect=function($){return Et.polygon(t,k,$)},h}S(MT,"rect_left_inv_arrow");async function DT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;let o;t.cssClasses?o="node "+t.cssClasses:o="node default";const l=e.insert("g").attr("class",o).attr("id",t.domId||t.id),c=l.insert("g"),h=l.insert("g").attr("class","label").attr("style",a),d=t.description,f=t.label,p=await xn(h,f,t.labelStyle,!0,!0);let g={width:0,height:0};if(Ar(he())){const j=p.children[0],ot=Zt(p);g=j.getBoundingClientRect(),ot.attr("width",g.width),ot.attr("height",g.height)}mt.info("Text 2",d);const x=d||[],y=p.getBBox(),C=await xn(h,Array.isArray(x)?x.join("<br/>"):x,t.labelStyle,!0,!0),k=C.children[0],v=Zt(C);g=k.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height);const T=(t.padding||0)/2;Zt(C).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+T+5)+")"),Zt(p).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=h.node().getBBox(),h.attr("transform","translate("+-g.width/2+", "+(-g.height/2-T+3)+")");const B=g.width+(t.padding||0),L=g.height+(t.padding||0),M=-g.width/2-T,F=-g.height/2-T;let $,N;if(t.look==="handDrawn"){const j=At.svg(l),ot=Lt(t,{}),K=j.path(Bn(M,F,B,L,t.rx||0),ot),Y=j.line(-g.width/2-T,-g.height/2-T+y.height+T,g.width/2+T,-g.height/2-T+y.height+T,ot);N=l.insert(()=>(mt.debug("Rough node insert CXC",K),Y),":first-child"),$=l.insert(()=>(mt.debug("Rough node insert CXC",K),K),":first-child")}else $=c.insert("rect",":first-child"),N=c.insert("line"),$.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)),N.attr("class","divider").attr("x1",-g.width/2-T).attr("x2",g.width/2+T).attr("y1",-g.height/2-T+y.height+T).attr("y2",-g.height/2-T+y.height+T);return Ot(t,$),t.intersect=function(j){return Et.rect(t,j)},l}S(DT,"rectWithTitle");async function RT(e,t,{config:{themeVariables:i}}){const a=(i==null?void 0:i.radius)??5,o={rx:a,ry:a,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return tl(e,t,o)}S(RT,"roundedRect");var ro=8;async function FT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0,{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(t)),f=((t==null?void 0:t.width)??h.width)+o*2+(t.look==="neo"?ro:ro*2),p=((t==null?void 0:t.height)??h.height)+l*2,g=f-ro,x=p,y=ro-f/2,C=-p/2,{cssStyles:k}=t,v=At.svg(c),T=Lt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x:y,y:C},{x:y+g,y:C},{x:y+g,y:C+x},{x:y-ro,y:C+x},{x:y-ro,y:C},{x:y,y:C},{x:y,y:C+x}],L=v.polygon(B.map(F=>[F.x,F.y]),T),M=c.insert(()=>L,":first-child");return M.attr("class","basic label-container outer-path").attr("style",ir(k)),a&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",a),k&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",a),d.attr("transform",`translate(${ro/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Ot(t,M),t.intersect=function(F){return Et.rect(t,F)},c}S(FT,"shadedProcess");async function zT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;(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:d,label:f}=await Pt(e,t,jt(t)),p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2,g=((t!=null&&t.height?t==null?void 0:t.height:d.height)+c*2)*1.5,x=p,y=g/1.5,C=-x/2,k=-y/2,{cssStyles:v}=t,T=At.svg(h),B=Lt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=[{x:C,y:k},{x:C,y:k+y},{x:C+x,y:k+y},{x:C+x,y:k-y/2}],M=oe(L),F=T.path(M,B),$=h.insert(()=>F,":first-child");return $.attr("class","basic label-container  outer-path"),v&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",v),a&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",a),$.attr("transform",`translate(0, ${y/4})`),f.attr("transform",`translate(${-x/2+(t.padding??0)-(d.x-(d.left??0))}, ${-y/4+(t.padding??0)-(d.y-(d.top??0))})`),Ot(t,$),t.intersect=function(N){return Et.polygon(t,L,N)},h}S(zT,"slopedRect");async function OT(e,t){const i=t.padding??0,a=t.look==="neo"?16:i*2,o=t.look==="neo"?12:i,l={rx:0,ry:0,labelPaddingX:t.labelPaddingX??a,labelPaddingY:o};return tl(e,t,l)}S(OT,"squareRect");async function $T(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?20:o,c=t.look==="neo"?12:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=d.height+(t.look==="neo"?c*2:c),p=d.width+f/4+(t.look==="neo"?l*2:l),g=f/2,{cssStyles:x}=t,y=At.svg(h),C=Lt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-p/2+g,y:-f/2},{x:p/2-g,y:-f/2},...Ic(-p/2+g,0,g,50,90,270),{x:p/2-g,y:f/2},...Ic(p/2-g,0,g,50,270,450)],v=oe(k),T=y.path(v,C),B=h.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",x),a&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",a),Ot(t,B),t.intersect=function(L){return Et.polygon(t,k,L)},h}S($T,"stadium");async function NT(e,t){const i={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return tl(e,t,i)}S(NT,"state");function IT(e,t,{config:{themeVariables:i}}){var B,L;const{labelStyles:a,nodeStyles:o}=Rt(t);t.labelStyle=a;const{cssStyles:l}=t,{lineColor:c,stateBorder:h,nodeBorder:d,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=At.svg(p),x=Lt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=g.circle(0,0,t.width,{...x,stroke:c,strokeWidth:2}),C=h??d,k=(t.width??0)*5/14,v=g.circle(0,0,k,{...x,fill:C,stroke:C,strokeWidth:2,fillStyle:"solid"}),T=p.insert(()=>y,":first-child");if(T.insert(()=>v),t.look!=="handDrawn"&&T.attr("class","outer-path"),l&&T.selectAll("path").attr("style",l),o&&T.selectAll("path").attr("style",o),t.width<25&&f&&t.look!=="handDrawn"){const M=((L=(B=e.node())==null?void 0:B.ownerSVGElement)==null?void 0:L.id)??"",F=M?`${M}-drop-shadow-small`:"drop-shadow-small";T.attr("style",`filter:url(#${F})`)}return Ot(t,T),t.intersect=function(M){return Et.circle(t,(t.width??0)/2,M)},p}S(IT,"stateEnd");function qT(e,t,{config:{themeVariables:i}}){var h,d;const{lineColor:a,nodeShadow:o}=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=At.svg(l).circle(0,0,t.width,uz(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&&o&&t.look!=="handDrawn"){const f=((d=(h=e.node())==null?void 0:h.ownerSVGElement)==null?void 0:d.id)??"",p=f?`${f}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${p})`)}return Ot(t,c),t.intersect=function(f){return Et.circle(t,(t.width??7)/2,f)},l}S(qT,"stateStart");var xs=8;async function jT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=(t==null?void 0:t.padding)??8,l=t.look==="neo"?28:o,c=t.look==="neo"?12:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=((t==null?void 0:t.width)??d.width)+2*xs+l,p=((t==null?void 0:t.height)??d.height)+c,g=f-2*xs,x=p,y=-f/2,C=-p/2,k=[{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 v=At.svg(h),T=Lt(t,{}),B=v.rectangle(y,C,g+16,x,T),L=v.line(y+xs,C,y+xs,C+x,T),M=v.line(y+xs+g,C,y+xs+g,C+x,T);h.insert(()=>L,":first-child"),h.insert(()=>M,":first-child");const F=h.insert(()=>B,":first-child"),{cssStyles:$}=t;F.attr("class","basic label-container").attr("style",ir($)),Ot(t,F)}else{const v=Fa(h,g,x,k);a&&v.attr("style",a),Ot(t,v)}return t.intersect=function(v){return Et.polygon(t,k,v)},h}S(jT,"subroutine");var wg=.2;async function HT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;(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-wg*(t.height+c*2),10));const{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:d.height)+c*2,p=wg*f,g=wg*f,y=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2+p-p,C=f,k=-y/2,v=-C/2,{cssStyles:T}=t,B=At.svg(h),L=Lt(t,{}),M=[{x:k-p/2,y:v},{x:k+y+p/2,y:v},{x:k+y+p/2,y:v+C},{x:k-p/2,y:v+C}],F=[{x:k+y-p/2,y:v+C},{x:k+y+p/2,y:v+C},{x:k+y+p/2,y:v+C-g}];t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const $=oe(M),N=B.path($,L),j=oe(F),ot=B.path(j,{...L,fillStyle:"solid"}),K=h.insert(()=>ot,":first-child");return K.insert(()=>N,":first-child"),K.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",T),a&&t.look!=="handDrawn"&&K.selectAll("path").attr("style",a),Ot(t,K),t.intersect=function(Y){return Et.polygon(t,M,Y)},h}S(HT,"taggedRect");async function PT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,label:c}=await Pt(e,t,jt(t)),h=Math.max(l.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),d=Math.max(l.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),f=d/8,p=.2*h,g=.2*d,x=d+f,{cssStyles:y}=t,C=At.svg(o),k=Lt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-h/2-h/2*.1,y:x/2},...Tn(-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,B=-x/2-g*.4,L=[{x:T+h-p,y:(B+d)*1.3},{x:T+h,y:B+d-g},{x:T+h,y:(B+d)*.9},...Tn(T+h,(B+d)*1.25,T+h-p,(B+d)*1.3,-d*.02,.5)],M=oe(v),F=C.path(M,k),$=oe(L),N=C.path($,{...k,fillStyle:"solid"}),j=o.insert(()=>N,":first-child");return j.insert(()=>F,":first-child"),j.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",y),a&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",a),j.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Ot(t,j),t.intersect=function(ot){return Et.polygon(t,v,ot)},o}S(PT,"taggedWaveEdgedRectangle");async function WT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l}=await Pt(e,t,jt(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),d=-c/2,f=-h/2,p=o.insert("rect",":first-child");return p.attr("class","text").attr("style",a).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",h),Ot(t,p),t.intersect=function(g){return Et.rect(t,g)},o}S(WT,"text");var t6=S((e,t,i,a,o,l)=>`M${e},${t}
    a${o},${l} 0,0,1 0,${-a}
    l${i},0
    a${o},${l} 0,0,1 0,${a}
    M${i},${-a}
    a${o},${l} 0,0,0 0,${a}
    l${-i},0`,"createCylinderPathD"),e6=S((e,t,i,a,o,l)=>[`M${e},${t}`,`M${e+i},${t}`,`a${o},${l} 0,0,0 0,${-a}`,`l${-i},0`,`a${o},${l} 0,0,0 0,${a}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),r6=S((e,t,i,a,o,l)=>[`M${e+i/2},${-a/2}`,`a${o},${l} 0,0,0 0,${a}`].join(" "),"createInnerCylinderPathD"),u1=5,d1=10;async function UT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?12:o/2;if(t.width||t.height){const k=t.height??0;t.height=(t.height??0)-l,t.height<u1&&(t.height=u1);const T=k/2/(2.5+k/50);t.width=(t.width??0)-l-T*3,t.width<d1&&(t.width=d1)}const{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(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:y}=t;let C;if(t.look==="handDrawn"){const k=At.svg(c),v=e6(0,0,x,f,g,p),T=r6(0,0,x,f,g,p),B=k.path(v,Lt(t,{})),L=k.path(T,Lt(t,{fill:"none"}));C=c.insert(()=>L,":first-child"),C=c.insert(()=>B,":first-child"),C.attr("class","basic label-container"),y&&C.attr("style",y)}else{const k=t6(0,0,x,f,g,p);C=c.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",ir(y)).attr("style",a),C.attr("class","basic label-container outer-path"),y&&C.selectAll("path").attr("style",y),a&&C.selectAll("path").attr("style",a)}return C.attr("label-offset-x",g),C.attr("transform",`translate(${-x/2}, ${f/2} )`),d.attr("transform",`translate(${-(h.width/2)-g-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Ot(t,C),t.intersect=function(k){const v=Et.rect(t,k),T=v.y-(t.y??0);if(p!=0&&(Math.abs(T)<(t.height??0)/2||Math.abs(T)==(t.height??0)/2&&Math.abs(v.x-(t.x??0))>(t.width??0)/2-g)){let B=g*g*(1-T*T/(p*p));B!=0&&(B=Math.sqrt(Math.abs(B))),B=g-B,k.x-(t.x??0)>0&&(B=-B),v.x+=B}return v},c}S(UT,"tiltedCylinder");async function YT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=(t.look==="neo",o),c=t.look==="neo"?o*2:o,{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=((t==null?void 0:t.height)??d.height)+l,p=((t==null?void 0:t.width)??d.width)+c,g=[{x:-3*f/6,y:0},{x:p+3*f/6,y:0},{x:p,y:-f},{x:0,y:-f}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=At.svg(h),k=Lt(t,{}),v=oe(g),T=C.path(v,k);x=h.insert(()=>T,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),y&&x.attr("style",y)}else x=Fa(h,p,f,g);return a&&x.attr("style",a),t.width=p,t.height=f,Ot(t,x),t.intersect=function(C){return Et.polygon(t,g,C)},h}S(YT,"trapezoid");async function GT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o,h=15,d=5;(t.width||t.height)&&(t.height=(t.height??0)-c*2,t.height<d&&(t.height=d),t.width=(t.width??0)-l*2,t.width<h&&(t.width=h));const{shapeSvg:f,bbox:p}=await Pt(e,t,jt(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:y}=t,C=At.svg(f),k=Lt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{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=oe(v),B=C.path(T,k),L=f.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),a&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",a),Ot(t,L),t.intersect=function(M){return Et.polygon(t,v,M)},f}S(GT,"trapezoidalPentagon");var f1=10,p1=10;async function VT(e,t){var M;const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?o*2:o;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-l)/2,t.width<p1&&(t.width=p1),t.height=(t==null?void 0:t.height)??0,t.height<f1&&(t.height=f1));const{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(t)),f=ra((M=he().flowchart)==null?void 0:M.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,y=[{x:0,y:0},{x,y:0},{x:x/2,y:-g}],{cssStyles:C}=t,k=At.svg(c),v=Lt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=oe(y),B=k.path(T,v),L=c.insert(()=>B,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`).attr("class","outer-path");return C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),a&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",a),t.width=p,t.height=g,Ot(t,L),d.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(F){return mt.info("Triangle intersect",t,y,F),Et.polygon(t,y,F)},c}S(VT,"triangle");async function XT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;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:d,bbox:f,label:p}=await Pt(e,t,jt(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,y=t.look==="neo"?x/4:x/8,C=x+(h?y:-y),{cssStyles:k}=t,T=14-g,B=T>0?T/2:0,L=At.svg(d),M=Lt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const F=[{x:-g/2-B,y:C/2},...Tn(-g/2-B,C/2,g/2+B,C/2,y,.8),{x:g/2+B,y:-C/2},{x:-g/2-B,y:-C/2}],$=oe(F),N=L.path($,M),j=d.insert(()=>N,":first-child");return j.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",a),j.attr("transform",`translate(0,${-y/2})`),p.attr("transform",`translate(${-g/2+(t.padding??0)-(f.x-(f.left??0))},${-x/2+(t.padding??0)-y-(f.y-(f.top??0))})`),Ot(t,j),t.intersect=function(ot){return Et.polygon(t,F,ot)},d}S(XT,"waveEdgedRectangle");async function QT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?20:o;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 M=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-c-M*(20/9)),t.width=t.width-l*2}const{shapeSvg:h,bbox:d}=await Pt(e,t,jt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:d.width)+l*2,p=(t!=null&&t.height?t==null?void 0:t.height:d.height)+c,g=p/8,x=p+g*2,{cssStyles:y}=t,C=At.svg(h),k=Lt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=[{x:-f/2,y:x/2},...Tn(-f/2,x/2,f/2,x/2,g,1),{x:f/2,y:-x/2},...Tn(f/2,-x/2,-f/2,-x/2,g,-1)],T=oe(v),B=C.path(T,k),L=h.insert(()=>B,":first-child");return L.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",y),a&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",a),Ot(t,L),t.intersect=function(M){return Et.polygon(t,v,M)},h}S(QT,"waveRectangle");var Re=10;async function KT(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=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)-o*2-Re,10),t.height=Math.max(((t==null?void 0:t.height)??0)-l*2-Re,10));const{shapeSvg:c,bbox:h,label:d}=await Pt(e,t,jt(t)),f=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+Re,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+l*2+Re,g=f-Re,x=p-Re,y=-g/2,C=-x/2,{cssStyles:k}=t,v=At.svg(c),T=Lt(t,{}),B=[{x:y-Re,y:C-Re},{x:y-Re,y:C+x},{x:y+g,y:C+x},{x:y+g,y:C-Re}],L=`M${y-Re},${C-Re} L${y+g},${C-Re} L${y+g},${C+x} L${y-Re},${C+x} L${y-Re},${C-Re}
                M${y-Re},${C} L${y+g},${C}
                M${y},${C-Re} L${y},${C+x}`;t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const M=v.path(L,T),F=c.insert(()=>M,":first-child");return F.attr("transform",`translate(${Re/2}, ${Re/2})`),F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),a&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",a),d.attr("transform",`translate(${-(h.width/2)+Re/2-(h.x-(h.left??0))}, ${-(h.height/2)+Re/2-(h.y-(h.top??0))})`),Ot(t,F),t.intersect=function($){return Et.polygon(t,B,$)},c}S(KT,"windowPane");var g1=new Set(["redux-color","redux-dark-color"]),i6=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Fy(e,t){var Ct,wt,kt,Dt;const i=t;i.alias&&(t.label=i.alias);const{theme:a,themeVariables:o}=Ee(),{rowEven:l,rowOdd:c,nodeBorder:h,borderColorArray:d}=o;if(t.look==="handDrawn"){const{themeVariables:vt}=Ee(),{background:dt}=vt,Tt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${dt}`]};await Fy(e,Tt)}const f=Ee();t.useHtmlLabels=f.htmlLabels;let p=((Ct=f.er)==null?void 0:Ct.diagramPadding)??10,g=((wt=f.er)==null?void 0:wt.entityPadding)??6;const{cssStyles:x}=t,{labelStyles:y,nodeStyles:C}=Rt(t);if(i.attributes.length===0&&t.label){const vt={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5};Ra(t.label,f)+vt.labelPaddingX*2<f.er.minEntityWidth&&(t.width=f.er.minEntityWidth);const dt=await tl(e,t,vt);if(a!=null&&g1.has(a)){const Tt=i.colorIndex??0;dt.attr("data-color-id",`color-${Tt%d.length}`)}if(!ra(f.htmlLabels)){const Tt=dt.select("text"),Bt=(kt=Tt.node())==null?void 0:kt.getBBox();Tt.attr("transform",`translate(${-Bt.width/2}, 0)`)}return dt}f.htmlLabels||(p*=1.25,g*=1.25);let k=jt(t);k||(k="node default");const v=e.insert("g").attr("class",k).attr("id",t.domId||t.id),T=await Ss(v,t.label??"",f,0,0,["name"],y);T.height+=g;let B=0;const L=[],M=[];let F=0,$=0,N=0,j=0,ot=!0,K=!0;for(const vt of i.attributes){const dt=await Ss(v,vt.type,f,0,B,["attribute-type"],y);F=Math.max(F,dt.width+p);const Tt=await Ss(v,vt.name,f,0,B,["attribute-name"],y);$=Math.max($,Tt.width+p);const Bt=await Ss(v,vt.keys.join(),f,0,B,["attribute-keys"],y);N=Math.max(N,Bt.width+p);const J=await Ss(v,vt.comment,f,0,B,["attribute-comment"],y);j=Math.max(j,J.width+p);const St=Math.max(dt.height,Tt.height,Bt.height,J.height)+g;M.push({yOffset:B,rowHeight:St}),B+=St}let Y=4;N<=p&&(ot=!1,N=0,Y--),j<=p&&(K=!1,j=0,Y--);const Z=v.node().getBBox();if(T.width+p*2-(F+$+N+j)>0){const vt=T.width+p*2-(F+$+N+j);F+=vt/Y,$+=vt/Y,N>0&&(N+=vt/Y),j>0&&(j+=vt/Y)}const it=F+$+N+j,X=At.svg(v),U=Lt(t,{});t.look!=="handDrawn"&&(U.roughness=0,U.fillStyle="solid");let D=0;M.length>0&&(D=M.reduce((vt,dt)=>vt+((dt==null?void 0:dt.rowHeight)??0),0));const I=Math.max(Z.width+p*2,(t==null?void 0:t.width)||0,it),z=Math.max((D??0)+T.height,(t==null?void 0:t.height)||0),P=-I/2,G=-z/2;if(v.selectAll("g:not(:first-child)").each((vt,dt,Tt)=>{const Bt=Zt(Tt[dt]),J=Bt.attr("transform");let St=0,Dr=0;if(J){const wr=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(J);wr&&(St=parseFloat(wr[1]),Dr=parseFloat(wr[2]),Bt.attr("class").includes("attribute-name")?St+=F:Bt.attr("class").includes("attribute-keys")?St+=F+$:Bt.attr("class").includes("attribute-comment")&&(St+=F+$+N))}Bt.attr("transform",`translate(${P+p/2+St}, ${Dr+G+T.height+g/2})`)}),v.select(".name").attr("transform","translate("+-T.width/2+", "+(G+g/2)+")"),a!=null&&g1.has(a)){const vt=i.colorIndex??0;v.attr("data-color-id",`color-${vt%d.length}`)}const R=X.rectangle(P,G,I,z,U),q=v.insert(()=>R,":first-child").attr("class","outer-path").attr("style",x.join(""));L.push(0);for(const[vt,dt]of M.entries()){const Bt=(vt+1)%2===0&&dt.yOffset!==0,J=X.rectangle(P,T.height+G+(dt==null?void 0:dt.yOffset),I,dt==null?void 0:dt.rowHeight,{...U,fill:Bt?l:c,stroke:h});v.insert(()=>J,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Bt?"even":"odd"}`)}const nt=1e-4;let ht=ws(P,T.height+G,I+P,T.height+G,nt),yt=X.polygon(ht.map(vt=>[vt.x,vt.y]),U);if(v.insert(()=>yt).attr("class","divider"),ht=ws(F+P,T.height+G,F+P,z+G,nt),yt=X.polygon(ht.map(vt=>[vt.x,vt.y]),U),v.insert(()=>yt).attr("class","divider"),ot){const vt=F+$+P;ht=ws(vt,T.height+G,vt,z+G,nt),yt=X.polygon(ht.map(dt=>[dt.x,dt.y]),U),v.insert(()=>yt).attr("class","divider")}if(K){const vt=F+$+N+P;ht=ws(vt,T.height+G,vt,z+G,nt),yt=X.polygon(ht.map(dt=>[dt.x,dt.y]),U),v.insert(()=>yt).attr("class","divider")}for(const vt of L){const dt=T.height+G+vt;ht=ws(P,dt,I+P,dt,nt),yt=X.polygon(ht.map(Tt=>[Tt.x,Tt.y]),U),v.insert(()=>yt).attr("class","divider")}if(Ot(t,q),C&&t.look!=="handDrawn")if(a!=null&&i6.has(a))v.selectAll("path").attr("style",C);else{const vt=C.split(";"),dt=(Dt=vt==null?void 0:vt.filter(Tt=>Tt.includes("stroke")))==null?void 0:Dt.map(Tt=>`${Tt}`).join("; ");v.selectAll("path").attr("style",dt??""),v.selectAll(".row-rect-even path").attr("style",C)}return t.intersect=function(vt){return Et.rect(t,vt)},v}S(Fy,"erBox");async function Ss(e,t,i,a=0,o=0,l=[],c=""){const h=e.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${a}, ${o})`).attr("style",c);t!==ov(t)&&(t=ov(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const d=h.node().appendChild(await aa(h,t,{width:Ra(t,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(t.includes("&lt;")||t.includes("&gt;")){let p=d.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=d.getBBox();if(ra(i.htmlLabels)){const p=d.children[0];p.style.textAlign="start";const g=Zt(d);f=p.getBoundingClientRect(),g.attr("width",f.width),g.attr("height",f.height)}return f}S(Ss,"addText");function ws(e,t,i,a,o){return e===i?[{x:e-o/2,y:t},{x:e+o/2,y:t},{x:i+o/2,y:a},{x:i-o/2,y:a}]:[{x:e,y:t-o/2},{x:e,y:t+o/2},{x:i,y:a+o/2},{x:i,y:a-o/2}]}S(ws,"lineToPolygon");async function ZT(e,t,i,a,o=i.class.padding??12){const l=a?0:3,c=e.insert("g").attr("class",jt(t)).attr("id",t.domId||t.id);let h=null,d=null,f=null,p=null,g=0,x=0,y=0;if(h=c.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const B=t.annotations[0];await Cc(h,{text:`«${B}»`},0),g=h.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await Cc(d,t,0,["font-weight: bolder"]);const C=d.node().getBBox();x=C.height,f=c.insert("g").attr("class","members-group text");let k=0;for(const B of t.members){const L=await Cc(f,B,k,[B.parseClassifier()]);k+=L+l}y=f.node().getBBox().height,y<=0&&(y=o/2),p=c.insert("g").attr("class","methods-group text");let v=0;for(const B of t.methods){const L=await Cc(p,B,v,[B.parseClassifier()]);v+=L+l}let T=c.node().getBBox();if(h!==null){const B=h.node().getBBox();h.attr("transform",`translate(${-B.width/2})`)}return d.attr("transform",`translate(${-C.width/2}, ${g})`),T=c.node().getBBox(),f.attr("transform",`translate(0, ${g+x+o*2})`),T=c.node().getBBox(),p.attr("transform",`translate(0, ${g+x+(y?y+o*4:o*2)})`),T=c.node().getBBox(),{shapeSvg:c,bbox:T}}S(ZT,"textHelper");async function Cc(e,t,i,a=[]){const o=e.insert("g").attr("class","label").attr("style",a.join("; ")),l=Ee();let c="useHtmlLabels"in t?t.useHtmlLabels:ra(l.htmlLabels)??!0,h="";"text"in t?h=t.text:h=t.label,!c&&h.startsWith("\\")&&(h=h.substring(1)),Ac(h)&&(c=!0);const d=await aa(o,Pm(yo(h)),{width:Ra(h,l)+50,classes:"markdown-node-label",useHtmlLabels:c},l);let f,p=1;if(c){const g=d.children[0],x=Zt(d);p=g.innerHTML.split("<br>").length,g.innerHTML.includes("</math>")&&(p+=g.innerHTML.split("<mrow>").length-1);const y=g.getElementsByTagName("img");if(y){const C=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...y].map(k=>new Promise(v=>{function T(){var B;if(k.style.display="flex",k.style.flexDirection="column",C){const L=((B=l.fontSize)==null?void 0:B.toString())??window.getComputedStyle(document.body).fontSize,F=parseInt(L,10)*5+"px";k.style.minWidth=F,k.style.maxWidth=F}else k.style.width="100%";v(k)}S(T,"setupImage"),setTimeout(()=>{k.complete&&T()}),k.addEventListener("error",T),k.addEventListener("load",T)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}else{a.includes("font-weight: bolder")&&Zt(d).selectAll("tspan").attr("font-weight",""),p=d.children.length;const g=d.children[0];(d.textContent===""||d.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=d.getBBox()}return o.attr("transform","translate(0,"+(-f.height/(2*p)+i)+")"),f.height}S(Cc,"addText");async function JT(e,t){var X,U;const i=he(),{themeVariables:a}=i,{useGradient:o}=a,l=i.class.padding??12,c=l,h=t.useHtmlLabels??ra(i.htmlLabels)??!0,d=t;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];const{shapeSvg:f,bbox:p}=await ZT(e,t,i,h,c),{labelStyles:g,nodeStyles:x}=Rt(t);t.labelStyle=g,t.cssStyles=d.styles||"";const y=((X=d.styles)==null?void 0:X.join(";"))||x||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const C=d.members.length===0&&d.methods.length===0&&!((U=i.class)!=null&&U.hideEmptyMembersBox),k=At.svg(f),v=Lt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const T=Math.max(t.width??0,p.width);let B=Math.max(t.height??0,p.height);const L=(t.height??0)>p.height;d.members.length===0&&d.methods.length===0?B+=c:d.members.length>0&&d.methods.length===0&&(B+=c*2);const M=-T/2,F=-B/2;let $=C?l*2:d.members.length===0&&d.methods.length===0?-l:0;L&&($=l*2);const N=k.rectangle(M-l,F-l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0),T+2*l,B+2*l+$,v),j=f.insert(()=>N,":first-child");j.attr("class","basic label-container outer-path");const ot=j.node().getBBox(),K=f.select(".annotation-group").node().getBBox().height-(C?l/2:0)||0,Y=f.select(".label-group").node().getBBox().height-(C?l/2:0)||0,Z=f.select(".members-group").node().getBBox().height-(C?l/2:0)||0,it=(K+Y+F+l-(F-l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0)))/2;if(f.selectAll(".text").each((D,I,z)=>{var ht,yt;const P=Zt(z[I]),G=P.attr("transform");let R=0;if(G){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(G);wt&&(R=parseFloat(wt[2]))}let q=R+F+l-(C?l:d.members.length===0&&d.methods.length===0?-l/2:0);if(P.attr("class").includes("methods-group")){const Ct=Math.max(Z,c/2);L?q=Math.max(it,K+Y+Ct+F+c*2+l)+c*2:q=K+Y+Ct+F+c*4+l}d.members.length===0&&d.methods.length===0&&((ht=i.class)!=null&&ht.hideEmptyMembersBox)&&(d.annotations.length>0?q=R-c:q=R),h||(q-=4);let nt=M;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(nt=-((yt=P.node())==null?void 0:yt.getBBox().width)/2||0,f.selectAll("text").each(function(Ct,wt,kt){window.getComputedStyle(kt[wt]).textAnchor==="middle"&&(nt=0)})),P.attr("transform",`translate(${nt}, ${q})`)}),d.members.length>0||d.methods.length>0||C){const D=K+Y+F+l,I=k.line(ot.x,D,ot.x+ot.width,D+.001,v);f.insert(()=>I).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(C||d.members.length>0||d.methods.length>0){const D=K+Y+Z+F+c*2+l,I=k.line(ot.x,L?Math.max(it,D):D,ot.x+ot.width,(L?Math.max(it,D):D)+.001,v);f.insert(()=>I).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(d.look!=="handDrawn"&&f.selectAll("path").attr("style",y),j.select(":nth-child(2)").attr("style",y),f.selectAll(".divider").select("path").attr("style",y),t.labelStyle?f.selectAll("span").attr("style",t.labelStyle):f.selectAll("span").attr("style",y),!h){const D=RegExp(/color\s*:\s*([^;]*)/),I=D.exec(y);if(I){const z=I[0].replace("color","fill");f.selectAll("tspan").attr("style",z)}else if(g){const z=D.exec(g);if(z){const P=z[0].replace("color","fill");f.selectAll("tspan").attr("style",P)}}}return Ot(t,j),t.intersect=function(D){return Et.rect(t,D)},f}S(JT,"classBox");async function t_(e,t){var ot,K;const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const o=t,l=t,c=20,h=20,d="verifyMethod"in t,f=jt(t),{themeVariables:p}=he(),{borderColorArray:g,requirementEdgeLabelBackground:x}=p,y=e.insert("g").attr("class",f).attr("id",t.domId??t.id);let C;d?C=await Vi(y,`&lt;&lt;${o.type}&gt;&gt;`,0,t.labelStyle):C=await Vi(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let k=C;const v=await Vi(y,o.name,k,t.labelStyle+"; font-weight: bold;");if(k+=v+h,d){const Y=await Vi(y,`${o.requirementId?`ID: ${o.requirementId}`:""}`,k,t.labelStyle);k+=Y;const Z=await Vi(y,`${o.text?`Text: ${o.text}`:""}`,k,t.labelStyle);k+=Z;const it=await Vi(y,`${o.risk?`Risk: ${o.risk}`:""}`,k,t.labelStyle);k+=it,await Vi(y,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,k,t.labelStyle)}else{const Y=await Vi(y,`${l.type?`Type: ${l.type}`:""}`,k,t.labelStyle);k+=Y,await Vi(y,`${l.docRef?`Doc Ref: ${l.docRef}`:""}`,k,t.labelStyle)}const T=(((ot=y.node())==null?void 0:ot.getBBox().width)??200)+c,B=(((K=y.node())==null?void 0:K.getBBox().height)??200)+c,L=-T/2,M=-B/2,F=At.svg(y),$=Lt(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const N=F.rectangle(L,M,T,B,$),j=y.insert(()=>N,":first-child");if(j.attr("class","basic label-container outer-path").attr("style",a),g!=null&&g.length){const Y=t.colorIndex??0;y.attr("data-color-id",`color-${Y%g.length}`)}if(y.selectAll(".label").each((Y,Z,it)=>{const X=Zt(it[Z]),U=X.attr("transform");let D=0,I=0;if(U){const R=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);R&&(D=parseFloat(R[1]),I=parseFloat(R[2]))}const z=I-B/2;let P=L+c/2;(Z===0||Z===1)&&(P=D),X.attr("transform",`translate(${P}, ${z+c})`)}),k>C+v+h){const Y=M+C+v+h;let Z;if(t.look==="neo"){const U=[[L,Y],[L+T,Y],[L+T,Y+.001],[L,Y+.001]];Z=F.polygon(U,$)}else Z=F.line(L,Y,L+T,Y,$);y.insert(()=>Z).attr("class","divider")}return Ot(t,j),t.intersect=function(Y){return Et.rect(t,Y)},a&&t.look!=="handDrawn"&&(x||g!=null&&g.length)&&y.selectAll("path").attr("style",a),y}S(t_,"requirementBox");async function Vi(e,t,i,a=""){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",a),l=he(),c=l.htmlLabels??!0,h=await aa(o,Pm(yo(t)),{width:Ra(t,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:a},l);let d;if(c){const f=h.children[0],p=Zt(h);d=f.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}else{const f=h.children[0];for(const p of f.children)a&&p.setAttribute("style",a);d=h.getBBox(),d.height+=6}return o.attr("transform",`translate(${-d.width/2},${-d.height/2+i})`),d.height}S(Vi,"addText");var a6=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 e_(e,t,{config:i}){var Z,it;const{labelStyles:a,nodeStyles:o}=Rt(t);t.labelStyle=a||"";const l=10,c=t.width;t.width=(t.width??200)-10;const{shapeSvg:h,bbox:d,label:f}=await Pt(e,t,jt(t)),p=t.padding||10;let g="",x;"ticket"in t&&t.ticket&&((Z=i==null?void 0:i.kanban)!=null&&Z.ticketBaseUrl)&&(g=(it=i==null?void 0:i.kanban)==null?void 0:it.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 y={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let C,k;x?{label:C,bbox:k}=await Sg(x,"ticket"in t&&t.ticket||"",y):{label:C,bbox:k}=await Sg(h,"ticket"in t&&t.ticket||"",y);const{label:v,bbox:T}=await Sg(h,"assigned"in t&&t.assigned||"",y);t.width=c;const B=10,L=(t==null?void 0:t.width)||0,M=Math.max(k.height,T.height)/2,F=Math.max(d.height+B*2,(t==null?void 0:t.height)||0)+M,$=-L/2,N=-F/2;f.attr("transform","translate("+(p-L/2)+", "+(-M-d.height/2)+")"),C.attr("transform","translate("+(p-L/2)+", "+(-M+d.height/2)+")"),v.attr("transform","translate("+(p+L/2-T.width-2*l)+", "+(-M+d.height/2)+")");let j;const{rx:ot,ry:K}=t,{cssStyles:Y}=t;if(t.look==="handDrawn"){const X=At.svg(h),U=Lt(t,{}),D=ot||K?X.path(Bn($,N,L,F,ot||0),U):X.rectangle($,N,L,F,U);j=h.insert(()=>D,":first-child"),j.attr("class","basic label-container").attr("style",Y||null)}else{j=h.insert("rect",":first-child"),j.attr("class","basic label-container __APA__").attr("style",o).attr("rx",ot??5).attr("ry",K??5).attr("x",$).attr("y",N).attr("width",L).attr("height",F);const X="priority"in t&&t.priority;if(X){const U=h.append("line"),D=$+2,I=N+Math.floor((ot??0)/2),z=N+F-Math.floor((ot??0)/2);U.attr("x1",D).attr("y1",I).attr("x2",D).attr("y2",z).attr("stroke-width","4").attr("stroke",a6(X))}}return Ot(t,j),t.height=F,t.intersect=function(X){return Et.rect(t,X)},h}S(e_,"kanbanItem");async function r_(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,halfPadding:c,label:h}=await Pt(e,t,jt(t)),d=l.width+10*c,f=l.height+8*c,p=.15*d,{cssStyles:g}=t,x=l.width+20,y=l.height+20,C=Math.max(d,x),k=Math.max(f,y);h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`);let v;const T=`M0 0 
    a${p},${p} 1 0,0 ${C*.25},${-1*k*.1}
    a${p},${p} 1 0,0 ${C*.25},0
    a${p},${p} 1 0,0 ${C*.25},0
    a${p},${p} 1 0,0 ${C*.25},${k*.1}

    a${p},${p} 1 0,0 ${C*.15},${k*.33}
    a${p*.8},${p*.8} 1 0,0 0,${k*.34}
    a${p},${p} 1 0,0 ${-1*C*.15},${k*.33}

    a${p},${p} 1 0,0 ${-1*C*.25},${k*.15}
    a${p},${p} 1 0,0 ${-1*C*.25},0
    a${p},${p} 1 0,0 ${-1*C*.25},0
    a${p},${p} 1 0,0 ${-1*C*.25},${-1*k*.15}

    a${p},${p} 1 0,0 ${-1*C*.1},${-1*k*.33}
    a${p*.8},${p*.8} 1 0,0 0,${-1*k*.34}
    a${p},${p} 1 0,0 ${C*.1},${-1*k*.33}
  H0 V0 Z`;if(t.look==="handDrawn"){const B=At.svg(o),L=Lt(t,{}),M=B.path(T,L);v=o.insert(()=>M,":first-child"),v.attr("class","basic label-container").attr("style",ir(g))}else v=o.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",T);return v.attr("transform",`translate(${-C/2}, ${-k/2})`),Ot(t,v),t.calcIntersect=function(B,L){return Et.rect(B,L)},t.intersect=function(B){return mt.info("Bang intersect",t,B),Et.rect(t,B)},o}S(r_,"bang");async function i_(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,halfPadding:c,label:h}=await Pt(e,t,jt(t)),d=l.width+2*c,f=l.height+2*c,p=.15*d,g=.25*d,x=.35*d,y=.2*d,{cssStyles:C}=t;let k;const v=`M0 0 
    a${p},${p} 0 0,1 ${d*.25},${-1*d*.1}
    a${x},${x} 1 0,1 ${d*.4},${-1*d*.1}
    a${g},${g} 1 0,1 ${d*.35},${d*.2}

    a${p},${p} 1 0,1 ${d*.15},${f*.35}
    a${y},${y} 1 0,1 ${-1*d*.15},${f*.65}

    a${g},${p} 1 0,1 ${-1*d*.25},${d*.15}
    a${x},${x} 1 0,1 ${-1*d*.5},0
    a${p},${p} 1 0,1 ${-1*d*.25},${-1*d*.15}

    a${p},${p} 1 0,1 ${-1*d*.1},${-1*f*.35}
    a${y},${y} 1 0,1 ${d*.1},${-1*f*.65}
  H0 V0 Z`;if(t.look==="handDrawn"){const T=At.svg(o),B=Lt(t,{}),L=T.path(v,B);k=o.insert(()=>L,":first-child"),k.attr("class","basic label-container").attr("style",ir(C))}else k=o.insert("path",":first-child").attr("class","basic label-container").attr("style",a).attr("d",v);return h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),k.attr("transform",`translate(${-d/2}, ${-f/2})`),Ot(t,k),t.calcIntersect=function(T,B){return Et.rect(T,B)},t.intersect=function(T){return mt.info("Cloud intersect",t,T),Et.rect(t,T)},o}S(i_,"cloud");async function a_(e,t){const{labelStyles:i,nodeStyles:a}=Rt(t);t.labelStyle=i;const{shapeSvg:o,bbox:l,halfPadding:c,label:h}=await Pt(e,t,jt(t)),d=l.width+8*c,f=l.height+2*c,p=5,g=t.look==="neo"?`
    M${-d/2} ${f/2-p}
    v${-f+2*p}
    q0,-${p} ${p},-${p}
    h${d-2*p}
    q${p},0 ${p},${p}
    v${f-p}
    H${-d/2}
    Z
  `:`
    M${-d/2} ${f/2-p}
    v${-f+2*p}
    q0,-${p} ${p},-${p}
    h${d-2*p}
    q${p},0 ${p},${p}
    v${f-2*p}
    q0,${p} ${-p},${p}
    h${-(d-2*p)}
    q${-p},0 ${-p},${-p}
    Z
  `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const x=o.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",a).attr("d",g);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),h.attr("transform",`translate(${-l.width/2}, ${-l.height/2})`),o.append(()=>h.node()),Ot(t,x),t.calcIntersect=function(y,C){return Et.rect(y,C)},t.intersect=function(y){return Et.rect(t,y)},o}S(a_,"defaultMindmapNode");async function n_(e,t){const i={padding:t.padding??0};return Ry(e,t,i)}S(n_,"mindmapCircle");var n6=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:OT},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:RT},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:$T},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:jT},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:nT},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:oT},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ry},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:r_},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:i_},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:AT},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fT},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:ST},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:kT},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:YT},{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:CT},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:lT},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:WT},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Kw},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:FT},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:qT},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:IT},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:uT},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pT},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eT},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rT},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iT},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:wT},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:XT},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dT},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:UT},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:TT},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:aT},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sT},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:VT},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:KT},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:cT},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:GT},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:hT},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zT},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ET},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:BT},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Qw},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tT},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:PT},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:HT},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:QT},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:MT},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:_T}],o6=S(()=>{const t=[...Object.entries({state:NT,choice:Zw,note:LT,rectWithTitle:DT,labelRect:vT,iconSquare:xT,iconCircle:mT,icon:gT,iconRounded:yT,imageSquare:bT,anchor:Vw,kanbanItem:e_,mindmapCircle:n_,defaultMindmapNode:a_,classBox:JT,erBox:Fy,requirementBox:t_}),...n6.flatMap(i=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map(o=>[o,i.handler]))];return Object.fromEntries(t)},"generateShapeMap"),o_=o6();function s6(e){return e in o_}S(s6,"isValidShape");var Pd=new Map;async function s_(e,t,i){let a,o;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const l=t.shape?o_[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),o=await l(a,t,i)}else o=await l(e,t,i),a=o;return a.attr("data-look",ir(t.look)),t.tooltip&&o.attr("title",t.tooltip),Pd.set(t.id,a),t.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}S(s_,"insertNode");var Yj=S((e,t)=>{Pd.set(t.id,e)},"setNodeElem"),Gj=S(()=>{Pd.clear()},"clear"),Vj=S(e=>{const t=Pd.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"),hc=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"),Cr={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},m1={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function vc(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Be(e),t=Be(t);const[i,a]=[e.x,e.y],[o,l]=[t.x,t.y],c=o-i,h=l-a;return{angle:Math.atan(h/c),deltaX:c,deltaY:h}}S(vc,"calculateDeltaAndAngle");var Be=S(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),l6=S(e=>({x:S(function(t,i,a){let o=0;const l=Be(a[0]).x<Be(a[a.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Cr,e.arrowTypeStart)){const{angle:y,deltaX:C}=vc(a[0],a[1]);o=Cr[e.arrowTypeStart]*Math.cos(y)*(C>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(Cr,e.arrowTypeEnd)){const{angle:y,deltaX:C}=vc(a[a.length-1],a[a.length-2]);o=Cr[e.arrowTypeEnd]*Math.cos(y)*(C>=0?1:-1)}const c=Math.abs(Be(t).x-Be(a[a.length-1]).x),h=Math.abs(Be(t).y-Be(a[a.length-1]).y),d=Math.abs(Be(t).x-Be(a[0]).x),f=Math.abs(Be(t).y-Be(a[0]).y),p=Cr[e.arrowTypeStart],g=Cr[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=l==="right"?-1:1,o-=y}if(d<p&&d>0&&f<p){let y=p+x-d;y*=l==="right"?-1:1,o+=y}return Be(t).x+o},"x"),y:S(function(t,i,a){let o=0;const l=Be(a[0]).y<Be(a[a.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Cr,e.arrowTypeStart)){const{angle:y,deltaY:C}=vc(a[0],a[1]);o=Cr[e.arrowTypeStart]*Math.abs(Math.sin(y))*(C>=0?1:-1)}else if(i===a.length-1&&Object.hasOwn(Cr,e.arrowTypeEnd)){const{angle:y,deltaY:C}=vc(a[a.length-1],a[a.length-2]);o=Cr[e.arrowTypeEnd]*Math.abs(Math.sin(y))*(C>=0?1:-1)}const c=Math.abs(Be(t).y-Be(a[a.length-1]).y),h=Math.abs(Be(t).x-Be(a[a.length-1]).x),d=Math.abs(Be(t).y-Be(a[0]).y),f=Math.abs(Be(t).x-Be(a[0]).x),p=Cr[e.arrowTypeStart],g=Cr[e.arrowTypeEnd],x=1;if(c<g&&c>0&&h<g){let y=g+x-c;y*=l==="up"?-1:1,o-=y}if(d<p&&d>0&&f<p){let y=p+x-d;y*=l==="up"?-1:1,o+=y}return Be(t).y+o},"y")}),"getLineFunctionsWithOffset"),c6=S((e,t,i,a,o,l=!1,c)=>{t.arrowTypeStart&&y1(e,"start",t.arrowTypeStart,i,a,o,l,c),t.arrowTypeEnd&&y1(e,"end",t.arrowTypeEnd,i,a,o,l,c)},"addEdgeMarkers"),h6={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}},u6=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],y1=S((e,t,i,a,o,l,c=!1,h)=>{var C;const d=h6[i],f=d&&u6.includes(d.type);if(!d){mt.warn(`Unknown arrow type: ${i}`);return}const p=d.type,y=`${o}_${l}-${p}${t==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(h&&h.trim()!==""){const k=h.replace(/[^\dA-Za-z]/g,"_"),v=`${y}_${k}`;if(!document.getElementById(v)){const T=document.getElementById(y);if(T){const B=T.cloneNode(!0);B.id=v,B.querySelectorAll("path, circle, line").forEach(M=>{M.setAttribute("stroke",h),d.fill&&M.setAttribute("fill",h)}),(C=T.parentNode)==null||C.appendChild(B)}}e.attr(`marker-${t}`,`url(${a}#${v})`)}else e.attr(`marker-${t}`,`url(${a}#${y})`)},"addEdgeMarker"),d6=S(e=>{var t,i;return typeof e=="string"?e:(i=(t=he())==null?void 0:t.flowchart)==null?void 0:i.curve},"resolveEdgeCurveType"),kd=new Map,fr=new Map,Xj=S(()=>{kd.clear(),fr.clear()},"clear"),uc=S(e=>e?typeof e=="string"?e:e.reduce((t,i)=>t+";"+i,""):"","getLabelStyles"),f6=S(async(e,t)=>{const i=he();let a=Ar(i);const{labelStyles:o}=Rt(t);t.labelStyle=o;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 aa(e,t.label,{style:uc(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 y=f.children[0],C=Zt(f);p=y.getBoundingClientRect(),g=p,C.attr("width",p.width),C.attr("height",p.height)}else{const y=Zt(f).select("text").node();y&&typeof y.getBBox=="function"&&(g=y.getBBox())}c.attr("transform",hc(g,a)),kd.set(t.id,l),t.width=p.width,t.height=p.height;let x;if(t.startLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await xn(C,t.startLabelLeft,uc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],B=Zt(k);v=T.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",hc(v,a)),fr.get(t.id)||fr.set(t.id,{}),fr.get(t.id).startLeft=y,kc(x,t.startLabelLeft)}if(t.startLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await xn(C,t.startLabelRight,uc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],B=Zt(k);v=T.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",hc(v,a)),fr.get(t.id)||fr.set(t.id,{}),fr.get(t.id).startRight=y,kc(x,t.startLabelRight)}if(t.endLabelLeft){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await xn(y,t.endLabelLeft,uc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],B=Zt(k);v=T.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",hc(v,a)),fr.get(t.id)||fr.set(t.id,{}),fr.get(t.id).endLeft=y,kc(x,t.endLabelLeft)}if(t.endLabelRight){const y=e.insert("g").attr("class","edgeTerminals"),C=y.insert("g").attr("class","inner"),k=await xn(y,t.endLabelRight,uc(t.labelStyle)||"",!1,!1);x=k;let v=k.getBBox();if(a){const T=k.children[0],B=Zt(k);v=T.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}C.attr("transform",hc(v,a)),fr.get(t.id)||fr.set(t.id,{}),fr.get(t.id).endRight=y,kc(x,t.endLabelRight)}return f},"insertEdgeLabel");function kc(e,t){Ar(he())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}S(kc,"setTerminalWidth");var p6=S((e,t)=>{mt.debug("Moving label abc88 ",e.id,e.label,kd.get(e.id),t);let i=t.updatedPath?t.updatedPath:t.originalPath;const a=he(),{subGraphTitleTotalMargin:o}=Cy(a);if(e.label){const l=kd.get(e.id);let c=e.x,h=e.y;if(i){const d=Li.calcLabelPosition(i);mt.debug("Moving label "+e.label+" from (",c,",",h,") to (",d.x,",",d.y,") abc88"),t.updatedPath&&(c=d.x,h=d.y)}l.attr("transform",`translate(${c}, ${h+o/2})`)}if(e.startLabelLeft){const l=fr.get(e.id).startLeft;let c=e.x,h=e.y;if(i){const d=Li.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.startLabelRight){const l=fr.get(e.id).startRight;let c=e.x,h=e.y;if(i){const d=Li.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelLeft){const l=fr.get(e.id).endLeft;let c=e.x,h=e.y;if(i){const d=Li.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}if(e.endLabelRight){const l=fr.get(e.id).endRight;let c=e.x,h=e.y;if(i){const d=Li.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",i);c=d.x,h=d.y}l.attr("transform",`translate(${c}, ${h})`)}},"positionEdgeLabel"),g6=S((e,t)=>{var c;if(!(e!=null&&e.isLabelEdge)||!((c=e==null?void 0:e.id)!=null&&c.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[i,a]=t,o=Math.abs(a.x-i.x),l=Math.abs(a.y-i.y);return o<.001||l<.001?t:l>=o?[i,{x:i.x,y:a.y},a]:[i,{x:a.x,y:i.y},a]},"orthogonalizeToLabelClippedPoints"),m6=S((e,t)=>{const i=e.x,a=e.y,o=Math.abs(t.x-i),l=Math.abs(t.y-a),c=e.width/2,h=e.height/2;return o>=c||l>=h},"outsideNode"),y6=S((e,t,i)=>{mt.debug(`intersection calc abc89:
  outsidePoint: ${JSON.stringify(t)}
  insidePoint : ${JSON.stringify(i)}
  node        : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const a=e.x,o=e.y,l=Math.abs(a-i.x),c=e.width/2;let h=i.x<t.x?c-l:c+l;const d=e.height/2,f=Math.abs(t.y-i.y),p=Math.abs(t.x-i.x);if(Math.abs(o-t.y)*c>Math.abs(a-t.x)*d){let g=i.y<t.y?t.y-d-o:o-d-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,y=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:y}),h===0&&(x=t.x,y=t.y),p===0&&(x=t.x),f===0&&(y=t.y),{x,y}}},"intersection"),x1=S((e,t)=>{mt.warn("abc88 cutPathAtIntersect",e,t);let i=[],a=e[0],o=!1;return e.forEach(l=>{if(mt.info("abc88 checking point",l,t),!m6(t,l)&&!o){const c=y6(t,a,l);mt.debug("abc88 inside",l,a,c),mt.debug("abc88 intersection",c,t);let h=!1;i.forEach(d=>{h=h||d.x===c.x&&d.y===c.y}),i.some(d=>d.x===c.x&&d.y===c.y)?mt.warn("abc88 no intersect",c,i):i.push(c),o=!0}else mt.warn("abc88 outside",l,a),a=l,o||i.push(l)}),mt.debug("returning points",i),i},"cutPathAtIntersect");function l_(e){const t=[],i=[];for(let a=1;a<e.length-1;a++){const o=e[a-1],l=e[a],c=e[a+1];(o.x===l.x&&l.y===c.y&&Math.abs(l.x-c.x)>5&&Math.abs(l.y-o.y)>5||o.y===l.y&&l.x===c.x&&Math.abs(l.x-o.x)>5&&Math.abs(l.y-c.y)>5)&&(t.push(l),i.push(a))}return{cornerPoints:t,cornerPointPositions:i}}S(l_,"extractCornerPoints");var b1=S(function(e,t,i){const a=t.x-e.x,o=t.y-e.y,l=Math.sqrt(a*a+o*o),c=i/l;return{x:t.x-c*a,y:t.y-c*o}},"findAdjacentPoint"),x6=S(function(e){const{cornerPointPositions:t}=l_(e),i=[];for(let a=0;a<e.length;a++)if(t.includes(a)){const o=e[a-1],l=e[a+1],c=e[a],h=b1(o,c,5),d=b1(l,c,5),f=d.x-h.x,p=d.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-o.x)>10&&Math.abs(l.y-o.y)>=10){mt.debug("Corner point fixing",Math.abs(l.x-o.x),Math.abs(l.y-o.y));const y=5;c.x===h.x?x={x:f<0?h.x-y+g:h.x+y-g,y:p<0?h.y-g:h.y+g}:x={x:f<0?h.x-g:h.x+g,y:p<0?h.y-y+g:h.y+y-g}}else mt.debug("Corner point skipping fixing",Math.abs(l.x-o.x),Math.abs(l.y-o.y));i.push(x,d)}else i.push(e[a]);return i},"fixCorners"),b6=S((e,t,i)=>{const a=e-t-i,o=2,l=2,c=o+l,h=Math.floor(a/c),d=Array(h).fill(`${o} ${l}`).join(" ");return`0 ${t} ${d} ${i}`},"generateDashArray"),C6=S(function(e,t,i,a,o,l,c,h=!1){var z;if(!c)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:d,layout:f}=he();let p=t.points,g=!1;const x=o;var y=l;const C=[];for(const P in t.cssCompiledStyles)W2(P)||C.push(t.cssCompiledStyles[P]);if(f==="swimlane"){if(y.intersect&&x.intersect&&Array.isArray(p)&&p.length>=2)if(p.length===2)p=[x.intersect(p[0]),y.intersect(p[1])];else{const P=p.slice(1,-1),G=P[0],R=P[P.length-1],q=.5,nt=Math.abs(p[p.length-1].x-R.x)<q&&Math.abs(p[p.length-1].y-R.y)<q,ht=x.intersect(G),yt=nt?R:y.intersect(R),Ct=Math.abs(yt.x-R.x)<q&&Math.abs(yt.y-R.y)<q,kt=Math.abs(ht.x-G.x)<q&&Math.abs(ht.y-G.y)<q?[]:[ht],Dt=Ct?[]:[yt];p=[...kt,...P,...Dt]}p=g6(t,p)}else y.intersect&&x.intersect&&!h&&(p=p.slice(1,t.points.length-1),p.unshift(x.intersect(p[0])),p.push(y.intersect(p[p.length-1])));const k=btoa(JSON.stringify(p));t.toCluster&&(mt.info("to cluster abc88",i.get(t.toCluster)),p=x1(t.points,i.get(t.toCluster).node),g=!0),t.fromCluster&&(mt.debug("from cluster abc88",i.get(t.fromCluster),JSON.stringify(p,null,2)),p=x1(p.reverse(),i.get(t.fromCluster).node).reverse(),g=!0);let v=p.filter(P=>!Number.isNaN(P.y));const T=d6(t.curve);T!=="rounded"&&(v=x6(v));let B=Bc;switch(T){case"linear":B=Bc;break;case"basis":B=Yg;break;case"cardinal":B=Vk;break;case"bumpX":B=Pk;break;case"bumpY":B=Wk;break;case"catmullRom":B=Qk;break;case"monotoneX":B=rS;break;case"monotoneY":B=iS;break;case"natural":B=nS;break;case"step":B=oS;break;case"stepAfter":B=lS;break;case"stepBefore":B=sS;break;case"rounded":B=Bc;break;default:B=Yg}const{x:L,y:M}=l6(t),F=VR().x(L).y(M).curve(B);let $;switch(t.thickness){case"normal":$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible";break;default:$="edge-thickness-normal"}switch(t.pattern){case"solid":$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed";break;default:$+=" edge-pattern-solid"}let N,j=T==="rounded"?c_(h_(v,t),5):F(v);const ot=Array.isArray(t.style)?t.style:[t.style];let K=ot.find(P=>P==null?void 0:P.startsWith("stroke:")),Y="";t.animate&&(Y="edge-animation-fast"),t.animation&&(Y="edge-animation-"+t.animation);let Z=!1;if(t.look==="handDrawn"){const P=At.svg(e);Object.assign([],v);const G=P.path(j,{roughness:.3,seed:d});$+=" transition",N=Zt(G).select("path").attr("id",`${c}-${t.id}`).attr("class"," "+$+(t.classes?" "+t.classes:"")+(Y?" "+Y:"")).attr("style",ot?ot.reduce((q,nt)=>q+";"+nt,""):"");let R=N.attr("d");N.attr("d",R),e.node().appendChild(N.node())}else{const P=C.join(";"),G=ot?ot.reduce((Ct,wt)=>Ct+wt+";",""):"",R=(P?P+";"+G+";":G)+";"+(ot?ot.reduce((Ct,wt)=>Ct+";"+wt,""):"");N=e.append("path").attr("d",j).attr("id",`${c}-${t.id}`).attr("class"," "+$+(t.classes?" "+t.classes:"")+(Y?" "+Y:"")).attr("style",R),K=(z=R.match(/stroke:([^;]+)/))==null?void 0:z[1],Z=t.animate===!0||!!t.animation||P.includes("animation");const q=N.node(),nt=typeof q.getTotalLength=="function"?q.getTotalLength():0,ht=m1[t.arrowTypeStart]||0,yt=m1[t.arrowTypeEnd]||0;if(t.look==="neo"&&!Z){const wt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?b6(nt,ht,yt):`0 ${ht} ${nt-ht-yt} ${yt}`}; stroke-dashoffset: 0;`;N.attr("style",wt+N.attr("style"))}}N.attr("data-edge",!0),N.attr("data-et","edge"),N.attr("data-id",t.id),N.attr("data-points",k),N.attr("data-look",ir(t.look)),t.showPoints&&v.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let it="";(he().flowchart.arrowMarkerAbsolute||he().state.arrowMarkerAbsolute)&&(it=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,it=it.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),mt.info("arrowTypeStart",t.arrowTypeStart),mt.info("arrowTypeEnd",t.arrowTypeEnd);const X=!Z&&(t==null?void 0:t.look)==="neo";c6(N,t,it,c,a,X,K);const U=Math.floor(p.length/2),D=p[U];Li.isLabelCoordinateInPath(D,N.attr("d"))||(g=!0);let I={};return g&&(I.updatedPath=p),I.originalPath=t.points,I},"insertEdge");function c_(e,t){if(e.length<2)return"";let i="";const a=e.length,o=1e-5;for(let l=0;l<a;l++){const c=e[l],h=e[l-1],d=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=d.x-c.x,x=d.y-c.y,y=Math.hypot(f,p),C=Math.hypot(g,x);if(y<o||C<o){i+=`L${c.x},${c.y}`;continue}const k=f/y,v=p/y,T=g/C,B=x/C,L=k*T+v*B,M=Math.max(-1,Math.min(1,L)),F=Math.acos(M);if(F<o||Math.abs(Math.PI-F)<o){i+=`L${c.x},${c.y}`;continue}const $=Math.min(t/Math.sin(F/2),y/2,C/2),N=c.x-k*$,j=c.y-v*$,ot=c.x+T*$,K=c.y+B*$;i+=`L${N},${j}`,i+=`Q${c.x},${c.y} ${ot},${K}`}}return i}S(c_,"generateRoundedPath");function km(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(km,"calculateDeltaAndAngle");function h_(e,t){const i=e.map(o=>({...o}));if(e.length>=2&&Cr[t.arrowTypeStart]){const o=Cr[t.arrowTypeStart],l=e[0],c=e[1],{angle:h}=km(l,c),d=o*Math.cos(h),f=o*Math.sin(h);i[0].x=l.x+d,i[0].y=l.y+f}const a=e.length;if(a>=2&&Cr[t.arrowTypeEnd]){const o=Cr[t.arrowTypeEnd],l=e[a-1],c=e[a-2],{angle:h}=km(c,l),d=o*Math.cos(h),f=o*Math.sin(h);i[a-1].x=l.x-d,i[a-1].y=l.y-f}return i}S(h_,"applyMarkerOffsetsToPoints");var v6=S((e,t,i,a)=>{t.forEach(o=>{W6[o](e,i,a)})},"insertMarkers"),k6=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"),S6=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"),w6=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"),T6=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"),_6=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"),B6=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"),E6=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"),L6=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"),A6=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"),M6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{transitionColor:l}=o;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"),D6=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"),R6=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 o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),F6=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"),z6=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 o=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");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),O6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{strokeWidth:l}=o;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"),$6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{strokeWidth:l,mainBkg:c}=o,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 d=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");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${l}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${l}`)},"zero_or_one_neo"),N6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{strokeWidth:l}=o;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"),I6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{strokeWidth:l,mainBkg:c}=o,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 d=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");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${l}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${l}`)},"zero_or_more_neo"),q6=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
      L20,10
      M20,10
      L0,20`)},"requirement_arrow"),j6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{strokeWidth:l}=o;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
      L20,10
      M20,10
      L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),H6=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"),P6=S((e,t,i)=>{const a=Ee(),{themeVariables:o}=a,{strokeWidth:l}=o,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"),W6={extension:k6,composition:S6,aggregation:w6,dependency:T6,lollipop:_6,point:B6,circle:E6,cross:L6,barb:A6,barbNeo:M6,only_one:D6,zero_or_one:R6,one_or_more:F6,zero_or_more:z6,only_one_neo:O6,zero_or_one_neo:$6,one_or_more_neo:N6,zero_or_more_neo:I6,requirement_arrow:q6,requirement_contains:H6,requirement_arrow_neo:j6,requirement_contains_neo:P6},U6=v6,Y6={common:Pc,getConfig:Ee,insertCluster:j4,insertEdge:C6,insertEdgeLabel:f6,insertMarkers:U6,insertNode:s_,interpolateToCurve:py,labelHelper:Pt,log:mt,positionEdgeLabel:p6},qc={},u_=S(e=>{for(const t of e)qc[t.name]=t},"registerLayoutLoaders"),G6=S(()=>{u_([{name:"dagre",loader:S(async()=>await Qt(()=>import("./dagre-VKFMJZFB-_FzRq_-o.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader")},{name:"swimlane",loader:S(async()=>await Qt(()=>import("./swimlanes-5IMT3BWC-vA6X041u.js"),__vite__mapDeps([5,1,2,3]),import.meta.url),"loader")},{name:"cose-bilkent",loader:S(async()=>await Qt(()=>import("./cose-bilkent-JH36ORCC-1NrWvAMb.js"),__vite__mapDeps([6,7]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");G6();var Qj=S(async(e,t,i)=>{if(!(e.layoutAlgorithm in qc))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const g of e.nodes){const x=g.domId||g.id;g.domId=`${e.diagramId}-${x}`}const a=qc[e.layoutAlgorithm],o=await a.loader(),{theme:l,themeVariables:c}=e.config,{useGradient:h,gradientStart:d,gradientStop:f}=c,p=t.attr("id");if(t.append("defs").append("filter").attr("id",`${p}-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",`${l!=null&&l.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${p}-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",`${l!=null&&l.includes("dark")?"#FFFFFF":"#000000"}`),h){const g=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");g.append("svg:stop").attr("offset","0%").attr("stop-color",d).attr("stop-opacity",1),g.append("svg:stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}return o.render(e,t,Y6,{algorithm:a.algorithm},i)},"render"),Kj=S((e="",{fallback:t="dagre"}={})=>{if(e in qc)return e;if(t in qc)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"),zy="comm",d_="rule",f_="decl",V6="@media",X6="@import",Q6="@supports",K6="@namespace",Sm="@keyframes",p_="@layer",Z6="@scope",J6=Math.abs,Lc=String.fromCharCode;function g_(e){return e.trim()}function wm(e,t,i){return e.replace(t,i)}function Ls(e,t){return e.charCodeAt(t)|0}function Ks(e,t,i){return e.slice(t,i)}function Qi(e){return e.length}function m_(e){return e.length}function Bu(e,t){return t.push(e),e}var Wd=1,Zs=1,y_=0,mi=0,Pe=0,el="";function Oy(e,t,i,a,o,l,c,h){return{value:e,root:t,parent:i,type:a,props:o,children:l,line:Wd,column:Zs,length:c,return:"",siblings:h}}function t8(){return Pe}function e8(){return Pe=mi>0?Ls(el,--mi):0,Zs--,Pe===10&&(Zs=1,Wd--),Pe}function Mi(){return Pe=mi<y_?Ls(el,mi++):0,Zs++,Pe===10&&(Zs=1,Wd++),Pe}function bn(){return Ls(el,mi)}function Uu(){return mi}function Ud(e,t){return Ks(el,e,t)}function jc(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 r8(e){return Wd=Zs=1,y_=Qi(el=e),mi=0,[]}function i8(e){return el="",e}function Tg(e){return g_(Ud(mi-1,Tm(e===91?e+2:e===40?e+1:e)))}function a8(e){for(;(Pe=bn())&&Pe<33;)Mi();return jc(e)>2||jc(Pe)>3?"":" "}function n8(e,t){for(;--t&&Mi()&&!(Pe<48||Pe>102||Pe>57&&Pe<65||Pe>70&&Pe<97););return Ud(e,Uu()+(t<6&&bn()==32&&Mi()==32))}function Tm(e){for(;Mi();)switch(Pe){case e:return mi;case 34:case 39:e!==34&&e!==39&&Tm(Pe);break;case 40:e===41&&Tm(e);break;case 92:Mi();break}return mi}function o8(e,t){for(;Mi()&&e+Pe!==57;)if(e+Pe===84&&bn()===47)break;return"/*"+Ud(t,mi-1)+"*"+Lc(e===47?e:Mi())}function s8(e){for(;!jc(bn());)Mi();return Ud(e,mi)}function l8(e){return i8(Yu("",null,null,null,[""],e=r8(e),0,[0],e))}function Yu(e,t,i,a,o,l,c,h,d){for(var f=0,p=0,g=c,x=0,y=0,C=0,k=1,v=1,T=1,B=0,L=0,M="",F=o,$=l,N=a,j=M;v;)switch(C=L,L=Mi()){case 40:C!=108&&Ls(j,g-1)==58?(B++,j+="("):j+=Tg(L);break;case 41:B--,j+=")";break;case 34:case 39:case 91:j+=Tg(L);break;case 9:case 10:case 13:case 32:if(B>0){j+=Lc(L);break}j+=a8(C);break;case 92:j+=n8(Uu()-1,7);continue;case 47:switch(bn()){case 42:case 47:Bu(c8(o8(Mi(),Uu()),t,i,d),d),(jc(C||1)==5||jc(bn()||1)==5)&&Qi(j)&&Ks(j,-1,void 0)!==" "&&(j+=" ");break;default:j+="/"}break;case 123*k:h[f++]=Qi(j)*T;case 125*k:case 59:case 0:if(B>0&&L){j+=Lc(L);break}switch(L){case 0:case 125:v=0;case 59+p:T==-1&&(j=wm(j,/\f/g,"")),y>0&&(Qi(j)-g||k===0)&&Bu(y>32?v1(j+";",a,i,g-1,d):v1(wm(j," ","")+";",a,i,g-2,d),d);break;case 59:j+=";";default:if(Bu(N=C1(j,t,i,f,p,o,h,M,F=[],$=[],g,l),l),L===123)if(p===0)Yu(j,t,N,N,F,l,g,h,$);else{switch(x){case 99:if(Ls(j,3)===110)break;case 108:if(Ls(j,2)===97)break;default:p=0;case 100:case 109:case 115:}p?Yu(e,N,N,a&&Bu(C1(e,N,N,0,0,o,h,M,o,F=[],g,$),$),o,$,g,h,a?F:$):Yu(j,N,N,N,[""],$,0,h,$)}}f=p=y=0,k=T=1,M=j="",g=c;break;case 58:g=1+Qi(j),y=C;default:if(k<1){if(L==123)--k;else if(L==125&&k++==0&&e8()==125)continue}switch(j+=Lc(L),L*k){case 38:T=p>0?1:(j+="\f",-1);break;case 44:if(B>0)break;h[f++]=(Qi(j)-1)*T,T=1;break;case 64:bn()===45&&(j+=Tg(Mi())),x=bn(),p=g=Qi(M=j+=s8(Uu())),L++;break;case 45:C===45&&Qi(j)==2&&(k=0)}}return l}function C1(e,t,i,a,o,l,c,h,d,f,p,g){for(var x=o-1,y=o===0?l:[""],C=m_(y),k=0,v=0,T=0;k<a;++k)for(var B=0,L=Ks(e,x+1,x=J6(v=c[k])),M=e;B<C;++B)(M=g_(v>0?y[B]+" "+L:wm(L,/&\f/g,y[B])))&&(d[T++]=M);return Oy(e,t,i,o===0?d_:h,d,f,p,g)}function c8(e,t,i,a){return Oy(e,t,i,zy,Lc(t8()),Ks(e,2,-2),0,a)}function v1(e,t,i,a,o){return Oy(e,t,i,f_,Ks(e,0,a),Ks(e,a+1,-1),a,o)}function _m(e,t){for(var i="",a=0;a<e.length;a++)i+=t(e[a],a,e,t)||"";return i}function h8(e,t,i,a){switch(e.type){case p_:if(e.children.length)break;case X6:case K6:case f_:return e.return=e.return||e.value;case zy:return"";case Sm:return e.return=e.value+"{"+_m(e.children,a)+"}";case d_:if(!Qi(e.value=e.props.join(",")))return""}return Qi(i=_m(e.children,a))?e.return=e.value+"{"+i+"}":""}function u8(e){var t=m_(e);return function(i,a,o,l){for(var c="",h=0;h<t;h++)c+=e[h](i,a,o,l)||"";return c}}var x_="c4",d8=S(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),f8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-Br8qPxMc.js");return{diagram:t}},__vite__mapDeps([8,9]),import.meta.url);return{id:x_,diagram:e}},"loader"),p8={id:x_,detector:d8,loader:f8},g8=p8,b_="flowchart",m8=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"),y8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-rOIHNp-r.js").then(i=>i.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]),import.meta.url);return{id:b_,diagram:e}},"loader"),x8={id:b_,detector:m8,loader:y8},b8=x8,C_="flowchart-v2",C8=S((e,t)=>{var i,a,o;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)&&((o=t==null?void 0:t.flowchart)==null?void 0:o.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),v8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-rOIHNp-r.js").then(i=>i.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]),import.meta.url);return{id:C_,diagram:e}},"loader"),k8={id:C_,detector:C8,loader:v8},S8=k8,v_="swimlane",w8=S(e=>/^\s*swimlane-beta\b/.test(e),"detector"),T8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-BpseX2El.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,13,9,14]),import.meta.url);return{id:v_,diagram:e}},"loader"),_8={id:v_,detector:w8,loader:T8},B8=_8,k_="er",E8=S(e=>/^\s*erDiagram/.test(e),"detector"),L8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-BtVpEuaX.js");return{diagram:t}},__vite__mapDeps([16,12,13,14]),import.meta.url);return{id:k_,diagram:e}},"loader"),A8={id:k_,detector:E8,loader:L8},M8=A8,S_="gitGraph",D8=S(e=>/^\s*gitGraph/.test(e),"detector"),R8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-hFLr96Vz.js");return{diagram:t}},__vite__mapDeps([17,18,19,20]),import.meta.url);return{id:S_,diagram:e}},"loader"),F8={id:S_,detector:D8,loader:R8},z8=F8,w_="gantt",O8=S(e=>/^\s*gantt/.test(e),"detector"),$8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-BWFlc77F.js");return{diagram:t}},__vite__mapDeps([21,22,23,24]),import.meta.url);return{id:w_,diagram:e}},"loader"),N8={id:w_,detector:O8,loader:$8},I8=N8,T_="info",q8=S(e=>/^\s*info/.test(e),"detector"),j8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-CSZuTFiu.js");return{diagram:t}},__vite__mapDeps([25,20]),import.meta.url);return{id:T_,diagram:e}},"loader"),H8={id:T_,detector:q8,loader:j8},__="pie",P8=S(e=>/^\s*pie/.test(e),"detector"),W8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-CvSXFQN0.js");return{diagram:t}},__vite__mapDeps([26,19,20,27,28,23]),import.meta.url);return{id:__,diagram:e}},"loader"),U8={id:__,detector:P8,loader:W8},B_="quadrantChart",Y8=S(e=>/^\s*quadrantChart/.test(e),"detector"),G8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-B5X_j6LC.js");return{diagram:t}},__vite__mapDeps([29,22,23,24]),import.meta.url);return{id:B_,diagram:e}},"loader"),V8={id:B_,detector:Y8,loader:G8},X8=V8,E_="xychart",Q8=S(e=>/^\s*xychart(-beta)?/.test(e),"detector"),K8=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-DVU-BO20.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24]),import.meta.url);return{id:E_,diagram:e}},"loader"),Z8={id:E_,detector:Q8,loader:K8},J8=Z8,L_="requirement",t$=S(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),e$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-CRAm__nK.js");return{diagram:t}},__vite__mapDeps([31,12,13]),import.meta.url);return{id:L_,diagram:e}},"loader"),r$={id:L_,detector:t$,loader:e$},i$=r$,A_="sequence",a$=S(e=>/^\s*sequenceDiagram/.test(e),"detector"),n$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-i5JjyU_K.js");return{diagram:t}},__vite__mapDeps([32,18,9]),import.meta.url);return{id:A_,diagram:e}},"loader"),o$={id:A_,detector:a$,loader:n$},s$=o$,M_="class",l$=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"),c$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-C_HYbY5A.js");return{diagram:t}},__vite__mapDeps([33,34,11,12,13,9]),import.meta.url);return{id:M_,diagram:e}},"loader"),h$={id:M_,detector:l$,loader:c$},u$=h$,D_="classDiagram",d$=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"),f$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-C_HYbY5A.js");return{diagram:t}},__vite__mapDeps([35,34,11,12,13,9]),import.meta.url);return{id:D_,diagram:e}},"loader"),p$={id:D_,detector:d$,loader:f$},g$=p$,R_="state",m$=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"),y$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-NYLwYa6P.js");return{diagram:t}},__vite__mapDeps([36,37,12,13,9,2,4,3]),import.meta.url);return{id:R_,diagram:e}},"loader"),x$={id:R_,detector:m$,loader:y$},b$=x$,F_="stateDiagram",C$=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"),v$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-CQxvb6Yl.js");return{diagram:t}},__vite__mapDeps([38,37,12,13,9]),import.meta.url);return{id:F_,diagram:e}},"loader"),k$={id:F_,detector:C$,loader:v$},S$=k$,z_="journey",w$=S(e=>/^\s*journey/.test(e),"detector"),T$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-B8VOwJPb.js");return{diagram:t}},__vite__mapDeps([39,11,9,27]),import.meta.url);return{id:z_,diagram:e}},"loader"),_$={id:z_,detector:w$,loader:T$},B$=_$,E$=S((e,t,i)=>{mt.debug(`rendering svg for syntax error
`);const a=iF(t),o=a.append("g");a.attr("viewBox","0 0 2412 512"),dk(a,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),O_={draw:E$},L$=O_,A$={db:{},renderer:O_,parser:{parse:S(()=>{},"parse")}},M$=A$,$_="flowchart-elk",D$=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"),R$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-rOIHNp-r.js").then(i=>i.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,14]),import.meta.url);return{id:$_,diagram:e}},"loader"),F$={id:$_,detector:D$,loader:R$},z$=F$,N_="timeline",O$=S(e=>/^\s*timeline/.test(e),"detector"),$$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-BoOQRFoo.js");return{diagram:t}},__vite__mapDeps([40,27]),import.meta.url);return{id:N_,diagram:e}},"loader"),N$={id:N_,detector:O$,loader:$$},I$=N$,I_="mindmap",q$=S(e=>/^\s*mindmap/.test(e),"detector"),j$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-B28FBwCP.js");return{diagram:t}},__vite__mapDeps([41,12,13]),import.meta.url);return{id:I_,diagram:e}},"loader"),H$={id:I_,detector:q$,loader:j$},P$=H$,q_="kanban",W$=S(e=>/^\s*kanban/.test(e),"detector"),U$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-YSTJ9rem.js");return{diagram:t}},__vite__mapDeps([42,11]),import.meta.url);return{id:q_,diagram:e}},"loader"),Y$={id:q_,detector:W$,loader:U$},G$=Y$,j_="sankey",V$=S(e=>/^\s*sankey(-beta)?/.test(e),"detector"),X$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-DSJrqWPF.js");return{diagram:t}},__vite__mapDeps([43,28,23]),import.meta.url);return{id:j_,diagram:e}},"loader"),Q$={id:j_,detector:V$,loader:X$},K$=Q$,H_="packet",Z$=S(e=>/^\s*packet(-beta)?/.test(e),"detector"),J$=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-hxpf__o2.js");return{diagram:t}},__vite__mapDeps([44,19,20]),import.meta.url);return{id:H_,diagram:e}},"loader"),tN={id:H_,detector:Z$,loader:J$},P_="radar",eN=S(e=>/^\s*radar-beta/.test(e),"detector"),rN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-D1hW5B4N.js");return{diagram:t}},__vite__mapDeps([45,19,20]),import.meta.url);return{id:P_,diagram:e}},"loader"),iN={id:P_,detector:eN,loader:rN},W_="block",aN=S(e=>/^\s*block(-beta)?/.test(e),"detector"),nN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-B6IZodPA.js");return{diagram:t}},__vite__mapDeps([46,11,2,14]),import.meta.url);return{id:W_,diagram:e}},"loader"),oN={id:W_,detector:aN,loader:nN},sN=oN,U_="treeView",lN=S(e=>/^\s*treeView-beta/.test(e),"detector"),cN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-XXhHjmTz.js");return{diagram:t}},__vite__mapDeps([47,18,19,20]),import.meta.url);return{id:U_,diagram:e}},"loader"),hN={id:U_,detector:lN,loader:cN},uN=hN,Y_="architecture",dN=S(e=>/^\s*architecture/.test(e),"detector"),fN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-YoUrCZNr.js");return{diagram:t}},__vite__mapDeps([48,19,20,7]),import.meta.url);return{id:Y_,diagram:e}},"loader"),pN={id:Y_,detector:dN,loader:fN},gN=pN,G_="eventmodeling",mN=S(e=>/^\s*eventmodeling/.test(e),"detector"),yN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-BjwJUZGh.js");return{diagram:t}},__vite__mapDeps([49,19,20]),import.meta.url);return{id:G_,diagram:e}},"loader"),xN={id:G_,detector:mN,loader:yN},bN=xN,V_="ishikawa",CN=S(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),vN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-BUuTqhLz.js");return{diagram:t}},[],import.meta.url);return{id:V_,diagram:e}},"loader"),kN={id:V_,detector:CN,loader:vN},X_="venn",SN=S(e=>/^\s*venn-beta/.test(e),"detector"),wN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-BoMiqrKR.js");return{diagram:t}},[],import.meta.url);return{id:X_,diagram:e}},"loader"),TN={id:X_,detector:SN,loader:wN},_N=TN,Q_="treemap",BN=S(e=>/^\s*treemap/.test(e),"detector"),EN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-D3iCgJ1h.js");return{diagram:t}},__vite__mapDeps([50,19,13,20,24,28,23]),import.meta.url);return{id:Q_,diagram:e}},"loader"),LN={id:Q_,detector:BN,loader:EN},K_="wardley",AN=S(e=>/^\s*wardley-beta/i.test(e),"detector"),MN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-BvjBgVR-.js");return{diagram:t}},__vite__mapDeps([51,19,20]),import.meta.url);return{id:K_,diagram:e}},"loader"),DN={id:K_,detector:AN,loader:MN},RN=DN,Z_="cynefin",FN=S(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),zN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-BnaWjqQX.js");return{diagram:t}},__vite__mapDeps([52,19,20]),import.meta.url);return{id:Z_,diagram:e}},"loader"),ON={id:Z_,detector:FN,loader:zN},J_="railroad",$N=S(e=>/^\s*railroad-beta/i.test(e),"detector"),NN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-BSwDrC7U.js");return{diagram:t}},__vite__mapDeps([53,54,19,20]),import.meta.url);return{id:J_,diagram:e}},"loader"),IN={id:J_,detector:$N,loader:NN},tB="railroadEbnf",qN=S(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),jN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-C6f2ITwd.js");return{diagram:t}},__vite__mapDeps([55,54,19,20]),import.meta.url);return{id:tB,diagram:e}},"loader"),HN={id:tB,detector:qN,loader:jN},eB="railroadAbnf",PN=S(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),WN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-V5Wqix3f.js");return{diagram:t}},__vite__mapDeps([56,54,19,20]),import.meta.url);return{id:eB,diagram:e}},"loader"),UN={id:eB,detector:PN,loader:WN},rB="railroadPeg",YN=S(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),GN=S(async()=>{const{diagram:e}=await Qt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-Dn8YYxfi.js");return{diagram:t}},__vite__mapDeps([57,54,19,20]),import.meta.url);return{id:rB,diagram:e}},"loader"),VN={id:rB,detector:YN,loader:GN},k1=!1,Yd=S(()=>{k1||(k1=!0,Ku("error",M$,e=>e.toLowerCase().trim()==="error"),Ku("---",{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("---")),Dg(z$,P$,gN),Dg(g8,G$,g$,u$,M8,I8,H8,U8,i$,s$,B8,S8,b8,I$,z8,S$,b$,B$,X8,K$,tN,J8,sN,bN,uN,iN,kN,LN,IN,HN,UN,VN,_N,RN,ON))},"addDiagrams"),XN=S(async()=>{mt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(po).map(async([i,{detector:a,loader:o}])=>{if(o)try{Og(i)}catch{try{const{diagram:l,id:c}=await o();Ku(c,l,a)}catch(l){throw mt.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete po[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"),QN="graphics-document document";function iB(e,t){e.attr("role",QN),t!==""&&e.attr("aria-roledescription",t)}S(iB,"setA11yDiagramInfo");function aB(e,t,i,a){if(e.insert!==void 0){if(i){const o=`chart-desc-${a}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(i)}if(t){const o=`chart-title-${a}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}S(aB,"addSVGa11yTitleDescription");var uo,Bm=(uo=class{constructor(t,i,a,o,l){this.type=t,this.text=i,this.db=a,this.parser=o,this.renderer=l}static async fromText(t,i={}){var f,p;const a=Ee(),o=Nm(t,a);t=cO(t)+`
`;try{Og(o)}catch{const g=K3(o);if(!g)throw new ok(`Diagram ${o} not found.`);const{id:x,diagram:y}=await g();Ku(x,y)}const{db:l,parser:c,renderer:h,init:d}=Og(o);return c.parser&&(c.parser.yy=l),(f=l.clear)==null||f.call(l),d==null||d(a),i.title&&((p=l.setDiagramTitle)==null||p.call(l,i.title)),await c.parse(t),new uo(o,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(uo,"Diagram"),uo),S1=[],KN=S(()=>{S1.forEach(e=>{e()}),S1=[]},"attachFunctions"),ZN=S(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function nB(e){const t=e.match(nk);if(!t)return{text:e,metadata:{}};const i=t[1],a=i?t[2].split(`
`).map(c=>c.startsWith(i)?c.slice(i.length):c).join(`
`):t[2];let o=hz(a,{schema:cz})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const l={};return o.displayMode&&(l.displayMode=o.displayMode.toString()),o.title&&(l.title=o.title.toString()),o.config&&(l.config=o.config),{text:e.slice(t[0].length),metadata:l}}S(nB,"extractFrontMatter");var JN=S(e=>e.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,i,a)=>"<"+i+a.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),tI=S(e=>{const{text:t,metadata:i}=nB(e),{displayMode:a,title:o,config:l={}}=i;return a&&(l.gantt||(l.gantt={}),l.gantt.displayMode=a),{title:o,config:l,text:t}},"processFrontmatter"),eI=S(e=>{const t=Li.detectInit(e)??{},i=Li.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:Qz(e),directive:t}},"processDirectives");function $y(e){const t=JN(e),i=tI(t),a=eI(i.text),o=by(i.config,a.directive);return e=ZN(a.text),{code:e,title:i.title,config:o}}S($y,"preprocessDiagram");function oB(e){const t=new TextEncoder().encode(e),i=Array.from(t,a=>String.fromCodePoint(a)).join("");return btoa(i)}S(oB,"toBase64");var rI=5e4,iI="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",aI="sandbox",nI="loose",oI="http://www.w3.org/2000/svg",sI="http://www.w3.org/1999/xlink",lI="http://www.w3.org/1999/xhtml",cI="100%",hI="100%",uI="border:0;margin:0;",dI="margin:0",fI="allow-top-navigation-by-user-activation allow-popups",pI='The "iframe" tag is not supported by your browser.',gI=["foreignobject"],mI=["dominant-baseline"];function Ny(e){const t=$y(e);return Xu(),V3(t.config??{}),t}S(Ny,"processAndSetConfigs");async function sB(e,t){Yd();try{const{code:i,config:a}=Ny(e);return{diagramType:(await cB(i)).type,config:a}}catch(i){if(t!=null&&t.suppressErrors)return!1;throw i}}S(sB,"parse");var w1=S((e,t,i=[])=>{const a=J1(`{ ${i.join(" !important; ")} !important; }`);return`.${e} ${t} ${a}`},"cssImportantStyles"),yI=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=Ar(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(d=>{$v(d.styles)||h.forEach(f=>{i.insertRule(w1(d.id,f,d.styles),i.cssRules.length)}),$v(d.textStyles)||i.insertRule(w1(d.id,"tspan",((d==null?void 0:d.textStyles)||[]).map(f=>f.replace("color","fill"))),i.cssRules.length)})}let a="";if(e.themeCSS!==void 0)if(typeof i.replaceSync=="function"){const o=new CSSStyleSheet;o.replaceSync(e.themeCSS),a=zg(o)+`
`}else a+=`${e.themeCSS}
`;return a+zg(i)},"createCssStyles"),xI=S((e,t)=>_m(l8(`${e}{${t}}`),u8([S(function(a,o,l,c){if(a.type==="rule"&&Array.isArray(a.props)){if(a.parent&&a.parent.type===Sm)return;a.props=a.props.map(h=>h.startsWith(e)?h:`${e} ${h}`)}else a.type.startsWith("@")&&([...[V6,Q6,p_,Z6,"@container","@starting-style"],Sm].includes(a.type)||(mt.warn(`Removing unsupported at-rule ${a.type} from CSS`),a.type=zy))},"addNamespace"),h8])),"compileCSS"),bI=S((e,t,i,a)=>{const o=yI(e,i),l=gM(t,o,{...e.themeVariables,theme:e.theme,look:e.look},a);return xI(a,l)},"createUserStyles"),CI=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=yo(a),a=a.replace(/<br>/g,"<br/>"),a},"cleanUpSvgCode"),vI=S((e="",t)=>{var o,l;const i=(l=(o=t==null?void 0:t.viewBox)==null?void 0:o.baseVal)!=null&&l.height?t.viewBox.baseVal.height+"px":hI,a=oB(`<body style="${dI}">${e}</body>`);return`<iframe style="width:${cI};height:${i};${uI}" src="data:text/html;charset=UTF-8;base64,${a}" sandbox="${fI}">
  ${pI}
</iframe>`},"putIntoIFrame"),T1=S((e,t,i,a,o)=>{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",oI);return o&&c.attr("xmlns:xlink",o),c.append("g"),e},"appendDivSvgG");function Em(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}S(Em,"sandboxedIframe");var kI=S((e,t,i,a)=>{var o,l,c;(o=e.getElementById(t))==null||o.remove(),(l=e.getElementById(i))==null||l.remove(),(c=e.getElementById(a))==null||c.remove()},"removeExistingElements"),SI=S(async function(e,t,i){var Z,it,X,U,D,I;Yd();const a=Ny(t);t=a.code;const o=Ee();mt.debug(o),t.length>((o==null?void 0:o.maxTextSize)??rI)&&(t=iI);const l=`#${e}`,c="i"+e,h="#"+c,d="d"+e,f="#"+d,p=S(()=>{const P=Zt(x?h:f).node();P&&"remove"in P&&P.remove()},"removeTempElements");let g=Zt(document.body);const x=o.securityLevel===aI,y=o.securityLevel===nI,C=o.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),x){const z=Em(Zt(i),c);g=Zt(z.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Zt(i);T1(g,e,d,`font-family: ${C}`,sI)}else{if(kI(document,e,d,c),x){const z=Em(Zt(document.body),c);g=Zt(z.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=Zt("body");T1(g,e,d)}let k,v;try{k=await Bm.fromText(t,{title:a.title})}catch(z){if(o.suppressErrorRendering)throw p(),z;k=await Bm.fromText("error"),v=z}const T=g.select(f).node(),B=k.type,L=T.firstChild,M=L.firstChild,F=(it=(Z=k.renderer).getClasses)==null?void 0:it.call(Z,t,k),$=bI(o,B,F,l),N=document.createElement("style");N.innerHTML=$,L.insertBefore(N,M);try{await k.renderer.draw(t,e,"11.16.0",k)}catch(z){throw o.suppressErrorRendering?p():L$.draw(t,e,"11.16.0"),z}const j=g.select(`${f} svg`),ot=(U=(X=k.db).getAccTitle)==null?void 0:U.call(X),K=(I=(D=k.db).getAccDescription)==null?void 0:I.call(D);hB(B,j,ot,K),g.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",lI);let Y=g.select(f).node().innerHTML;if(mt.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),Y=CI(Y,x,ra(o.arrowMarkerAbsolute)),x){const z=g.select(f+" svg").node();Y=vI(Y,z)}else y||(Y=Us.sanitize(Y,{ADD_TAGS:gI,ADD_ATTR:mI,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(KN(),v)throw v;return p(),{diagramType:B,svg:Y,bindFunctions:k.db.bindFunctions}},"render");function lB(e={}){var a;const t=Je({},e);t!=null&&t.fontFamily&&!((a=t.themeVariables)!=null&&a.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Y3(t),t!=null&&t.theme&&t.theme in Aa?t.themeVariables=Aa[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Aa.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?U3(t):tk();$m(i.logLevel),Yd()}S(lB,"initialize");var cB=S((e,t={})=>{const{code:i}=$y(e);return Bm.fromText(i,t)},"getDiagramFromText");function hB(e,t,i,a){iB(t,e),aB(t,i,a,t.attr("id"))}S(hB,"addA11yInfo");var bo=Object.freeze({render:SI,parse:sB,getDiagramFromText:cB,initialize:lB,getConfig:Ee,setConfig:ek,getSiteConfig:tk,updateSiteConfig:G3,reset:S(()=>{Xu()},"reset"),globalReset:S(()=>{Xu(Ys)},"globalReset"),defaultConfig:Ys});$m(Ee().logLevel);Xu(Ee());var wI=S((e,t,i)=>{mt.warn(e),xy(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 TI(e)}catch(t){if(xy(t)&&mt.error(t.str),ai.parseError&&ai.parseError(t),!e.suppressErrors)throw mt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),TI=S(async function({postRenderCallback:e,querySelector:t,nodes:i}={querySelector:".mermaid"}){const a=bo.getConfig();mt.debug(`${e?"":"No "}Callback function found`);let o;if(i)o=i;else if(t)o=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");mt.debug(`Found ${o.length} diagrams`),(a==null?void 0:a.startOnLoad)!==void 0&&(mt.debug("Start On Load: "+(a==null?void 0:a.startOnLoad)),bo.updateSiteConfig({startOnLoad:a==null?void 0:a.startOnLoad}));const l=new Li.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed);let c;const h=[];for(const d of Array.from(o)){if(mt.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const f=`mermaid-${l.next()}`;c=d.innerHTML,c=vw(Li.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>");const p=Li.detectInit(c);p&&mt.debug("Detected early reinit: ",p);try{const{svg:g,bindFunctions:x}=await gB(f,c,d);d.innerHTML=g,e&&await e(f),x&&x(d)}catch(g){wI(g,h,ai.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),dB=S(function(e){bo.initialize(e)},"initialize"),_I=S(async function(e,t,i){mt.warn("mermaid.init is deprecated. Please use run instead."),e&&dB(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"),BI=S(async(e,{lazyLoad:t=!0}={})=>{Yd(),Dg(...e),t===!1&&await XN()},"registerExternalDiagrams"),fB=S(function(){if(ai.startOnLoad){const{startOnLoad:e}=bo.getConfig();e&&ai.run().catch(t=>mt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",fB,!1);var EI=S(function(e){ai.parseError=e},"setParseErrorHandler"),Sd=[],_g=!1,pB=S(async()=>{if(!_g){for(_g=!0;Sd.length>0;){const e=Sd.shift();if(e)try{await e()}catch(t){mt.error("Error executing queue",t)}}_g=!1}},"executeQueue"),LI=S(async(e,t)=>new Promise((i,a)=>{const o=S(()=>new Promise((l,c)=>{bo.parse(e,t).then(h=>{l(h),i(h)},h=>{var d;mt.error("Error parsing",h),(d=ai.parseError)==null||d.call(ai,h),c(h),a(h)})}),"performCall");Sd.push(o),pB().catch(a)}),"parse"),gB=S((e,t,i)=>new Promise((a,o)=>{const l=S(()=>new Promise((c,h)=>{bo.render(e,t,i).then(d=>{c(d),a(d)},d=>{var f;mt.error("Error parsing",d),(f=ai.parseError)==null||f.call(ai,d),h(d),o(d)})}),"performCall");Sd.push(l),pB().catch(o)}),"render"),AI=S(()=>Object.keys(po).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ai={startOnLoad:!0,mermaidAPI:bo,parse:LI,render:gB,init:_I,run:uB,registerExternalDiagrams:BI,registerLayoutLoaders:u_,initialize:dB,parseError:void 0,contentLoaded:fB,setParseErrorHandler:EI,detectType:Nm,registerIconPacks:AO,getRegisteredDiagramsMetadata:AI},rl=ai;/*! Check if previously processed *//*!
 * Wait for document loaded before starting the execution
 */rl.initialize({startOnLoad:!1,securityLevel:"strict"});const _1=/```mermaid\s*\n([\s\S]*?)```/g;function mB(e){const t=[];_1.lastIndex=0;let i;for(;(i=_1.exec(e))!==null;)t.push((i[1]??"").trim());return t}function MI(e){const i=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;let a=parseFloat(i.getAttribute("width")??""),o=parseFloat(i.getAttribute("height")??"");const l=i.getAttribute("viewBox");if((!a||!o)&&l){const c=l.split(/[\s,]+/).map(Number);c.length===4&&(a||(a=c[2]??0),o||(o=c[3]??0))}return(!a||a<=0)&&(a=800),(!o||o<=0)&&(o=600),i.setAttribute("width",String(a)),i.setAttribute("height",String(o)),{svg:new XMLSerializer().serializeToString(i),width:a,height:o}}async function DI(e,t,i){const a=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(a);try{const l=new Image;l.width=t,l.height=i,l.src=o,await l.decode();const c=2,h=document.createElement("canvas");h.width=Math.max(1,Math.round(t*c)),h.height=Math.max(1,Math.round(i*c));const d=h.getContext("2d");return d?(d.fillStyle="#ffffff",d.fillRect(0,0,h.width,h.height),d.drawImage(l,0,0,h.width,h.height),{dataUrl:h.toDataURL("image/png"),width:t,height:i}):null}catch{return null}finally{URL.revokeObjectURL(o)}}async function RI(e,t){try{const i=`pdf-mermaid-${t}-${Date.now()}`,{svg:a}=await rl.render(i,e),o=MI(a);return await DI(o.svg,o.width,o.height)}catch{return null}}async function FI(e){const t=mB(e),i=[];for(let a=0;a<t.length;a++){const o=t[a]??"";i.push(await RI(o,a))}return i}function Iy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var So=Iy();function yB(e){So=e}var no={exec:()=>null};function bs(e){let t=[];return i=>{let a=Math.max(0,Math.min(3,i-1)),o=t[a];return o||(o=e(a),t[a]=o),o}}function le(e,t=""){let i=typeof e=="string"?e:e.source,a={replace:(o,l)=>{let c=typeof l=="string"?l:l.source;return c=c.replace(vr.caret,"$1"),i=i.replace(o,c),a},getRegex:()=>new RegExp(i,t)};return a}var zI=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),vr={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:bs(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`)),hrRegex:bs(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:bs(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:bs(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:bs(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:bs(e=>new RegExp(`^ {0,${e}}>`))},OI=/^(?:[ \t]*(?:\n|$))+/,$I=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,NI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Kc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,II=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qy=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,xB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bB=le(xB).replace(/bull/g,qy).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(),qI=le(xB).replace(/bull/g,qy).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(),jy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jI=/^[^\n]+/,Hy=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,HI=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),PI=le(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,qy).getRegex(),Gd="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",Py=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,WI=le("^ {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",Py).replace("tag",Gd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),CB=le(jy).replace("hr",Kc).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]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gd).getRegex(),UI=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",CB).getRegex(),Wy={blockquote:UI,code:$I,def:HI,fences:NI,heading:II,hr:Kc,html:WI,lheading:bB,list:PI,newline:OI,paragraph:CB,table:no,text:jI},B1=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kc).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",Gd).getRegex(),YI={...Wy,lheading:qI,table:B1,paragraph:le(jy).replace("hr",Kc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gd).getRegex()},GI={...Wy,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Py).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:no,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(jy).replace("hr",Kc).replace("heading",` *#{1,6} *[^
]`).replace("lheading",bB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},VI=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,XI=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vB=/^( {2,}|\\)\n(?!\s*$)/,QI=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,il=/[\p{P}\p{S}]/u,Vd=/[\s\p{P}\p{S}]/u,Uy=/[^\s\p{P}\p{S}]/u,KI=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Vd).getRegex(),kB=/(?!~)[\p{P}\p{S}]/u,ZI=/(?!~)[\s\p{P}\p{S}]/u,JI=/(?:[^\s\p{P}\p{S}]|~)/u,tq=le(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",zI?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),SB=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,eq=le(SB,"u").replace(/punct/g,il).getRegex(),rq=le(SB,"u").replace(/punct/g,kB).getRegex(),wB="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",iq=le(wB,"gu").replace(/notPunctSpace/g,Uy).replace(/punctSpace/g,Vd).replace(/punct/g,il).getRegex(),aq=le(wB,"gu").replace(/notPunctSpace/g,JI).replace(/punctSpace/g,ZI).replace(/punct/g,kB).getRegex(),nq=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Uy).replace(/punctSpace/g,Vd).replace(/punct/g,il).getRegex(),oq=le(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,il).getRegex(),sq="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",lq=le(sq,"gu").replace(/notPunctSpace/g,Uy).replace(/punctSpace/g,Vd).replace(/punct/g,il).getRegex(),cq=le(/\\(punct)/,"gu").replace(/punct/g,il).getRegex(),hq=le(/^<(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(),uq=le(Py).replace("(?:-->|$)","-->").getRegex(),dq=le("^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",uq).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,fq=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",wd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),TB=le(/^!?\[(label)\]\[(ref)\]/).replace("label",wd).replace("ref",Hy).getRegex(),_B=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hy).getRegex(),pq=le("reflink|nolink(?!\\()","g").replace("reflink",TB).replace("nolink",_B).getRegex(),E1=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Yy={_backpedal:no,anyPunctuation:cq,autolink:hq,blockSkip:tq,br:vB,code:XI,del:no,delLDelim:no,delRDelim:no,emStrongLDelim:eq,emStrongRDelimAst:iq,emStrongRDelimUnd:nq,escape:VI,link:fq,nolink:_B,punctuation:KI,reflink:TB,reflinkSearch:pq,tag:dq,text:QI,url:no},gq={...Yy,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",wd).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wd).getRegex()},Lm={...Yy,emStrongRDelimAst:aq,emStrongLDelim:rq,delLDelim:oq,delRDelim:lq,url:le(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",E1).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:le(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",E1).getRegex()},mq={...Lm,br:le(vB).replace("{2,}","*").getRegex(),text:le(Lm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Eu={normal:Wy,gfm:YI,pedantic:GI},dc={normal:Yy,gfm:Lm,breaks:mq,pedantic:gq},yq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},L1=e=>yq[e];function Xi(e,t){if(t){if(vr.escapeTest.test(e))return e.replace(vr.escapeReplace,L1)}else if(vr.escapeTestNoEncode.test(e))return e.replace(vr.escapeReplaceNoEncode,L1);return e}function A1(e){try{e=encodeURI(e).replace(vr.percentDecode,"%")}catch{return null}return e}function M1(e,t){var l;let i=e.replace(vr.findPipe,(c,h,d)=>{let f=!1,p=h;for(;--p>=0&&d[p]==="\\";)f=!f;return f?"|":" |"}),a=i.split(vr.splitPipe),o=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(;o<a.length;o++)a[o]=a[o].trim().replace(vr.slashPipe,"|");return a}function pn(e,t,i){let a=e.length;if(a===0)return"";let o=0;for(;o<a&&e.charAt(a-o-1)===t;)o++;return e.slice(0,a-o)}function D1(e){let t=e.split(`
`),i=t.length-1;for(;i>=0&&vr.blankLine.test(t[i]);)i--;return t.length-i<=2?e:t.slice(0,i+1).join(`
`)}function xq(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 bq(e,t=0){let i=t,a="";for(let o of e)if(o==="	"){let l=4-i%4;a+=" ".repeat(l),i+=l}else a+=o,i++;return a}function R1(e,t,i,a,o){let l=t.href,c=t.title||null,h=e[1].replace(o.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:c,text:h,tokens:a.inlineTokens(h)};return a.state.inLink=!1,d}function Cq(e,t,i){let a=e.match(i.other.indentCodeCompensation);if(a===null)return t;let o=a[1];return t.split(`
`).map(l=>{let c=l.match(i.other.beginningSpace);if(c===null)return l;let[h]=c;return h.length>=o.length?l.slice(o.length):l}).join(`
`)}var Td=class{constructor(e){It(this,"options");It(this,"rules");It(this,"lexer");this.options=e||So}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let i=this.options.pedantic?t[0]:D1(t[0]),a=i.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i,codeBlockStyle:"indented",text:a}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let i=t[0],a=Cq(i,t[3]||"",this.rules);return{type:"code",raw:i,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(this.rules.other.endingHash.test(i)){let a=pn(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:pn(t[0],`
`),depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:pn(t[0],`
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let i=pn(t[0],`
`).split(`
`),a="",o="",l=[];for(;i.length>0;){let c=!1,h=[],d;for(d=0;d<i.length;d++)if(this.rules.other.blockquoteStart.test(i[d]))h.push(i[d]),c=!0;else if(!c)h.push(i[d]);else break;i=i.slice(d);let f=h.join(`
`),p=f.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
${f}`:f,o=o?`${o}
${p}`:p;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,l,!0),this.lexer.state.top=g,i.length===0)break;let x=l.at(-1);if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){let y=x,C=y.raw+`
`+i.join(`
`),k=this.blockquote(C);l[l.length-1]=k,a=a.substring(0,a.length-y.raw.length)+k.raw,o=o.substring(0,o.length-y.text.length)+k.text;break}else if((x==null?void 0:x.type)==="list"){let y=x,C=y.raw+`
`+i.join(`
`),k=this.list(C);l[l.length-1]=k,a=a.substring(0,a.length-x.raw.length)+k.raw,o=o.substring(0,o.length-y.raw.length)+k.raw,i=C.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:a,tokens:l,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),a=i.length>1,o={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let l=this.rules.other.listItemRegex(i),c=!1;for(;e;){let d=!1,f="",p="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let g=bq(t[2].split(`
`,1)[0],t[1].length),x=e.split(`
`,1)[0],y=!g.trim(),C=0;if(this.options.pedantic?(C=2,p=g.trimStart()):y?C=t[1].length+1:(C=g.search(this.rules.other.nonSpaceChar),C=C>4?1:C,p=g.slice(C),C+=t[1].length),y&&this.rules.other.blankLine.test(x)&&(f+=x+`
`,e=e.substring(x.length+1),d=!0),!d){let k=this.rules.other.nextBulletRegex(C),v=this.rules.other.hrRegex(C),T=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),L=this.rules.other.htmlBeginRegex(C),M=this.rules.other.blockquoteBeginRegex(C);for(;e;){let F=e.split(`
`,1)[0],$;if(x=F,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting,"  "),$=x):$=x.replace(this.rules.other.tabCharGlobal,"    "),T.test(x)||B.test(x)||L.test(x)||M.test(x)||k.test(x)||v.test(x))break;if($.search(this.rules.other.nonSpaceChar)>=C||!x.trim())p+=`
`+$.slice(C);else{if(y||g.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||T.test(g)||B.test(g)||v.test(g))break;p+=`
`+x}y=!x.trim(),f+=F+`
`,e=e.substring(F.length+1),g=$.slice(C)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0)),o.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),o.raw+=f}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d of o.items){this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]);let f=d.tokens[0];if(d.task&&((f==null?void 0:f.type)==="text"||(f==null?void 0:f.type)==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(d.raw);if(p){let g={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};d.checked=g.checked,o.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=g.raw+d.tokens[0].raw,d.tokens[0].text=g.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(g)):d.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):d.tokens.unshift(g)}}else d.task&&(d.task=!1);if(!o.loose){let p=d.tokens.filter(x=>x.type==="space"),g=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=g}}if(o.loose)for(let d of o.items){d.loose=!0;for(let f of d.tokens)f.type==="text"&&(f.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let i=D1(t[0]);return{type:"html",block:!0,raw:i,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:i}}}def(e){let t=this.rules.block.def.exec(e);if(t){let i=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:i,raw:pn(t[0],`
`),href:a,title:o}}}table(e){var c;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let i=M1(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:pn(t[0],`
`),header:[],align:[],rows:[]};if(i.length===a.length){for(let h of a)this.rules.other.tableAlignRight.test(h)?l.align.push("right"):this.rules.other.tableAlignCenter.test(h)?l.align.push("center"):this.rules.other.tableAlignLeft.test(h)?l.align.push("left"):l.align.push(null);for(let h=0;h<i.length;h++)l.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:l.align[h]});for(let h of o)l.rows.push(M1(h,l.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:l.align[f]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let i=t[1].trim();return{type:"heading",raw:pn(t[0],`
`),depth:t[2].charAt(0)==="="?1:2,text:i,tokens:this.lexer.inline(i)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let i=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:i,tokens:this.lexer.inline(i)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let i=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let l=pn(i.slice(0,-1),"\\");if((i.length-l.length)%2===0)return}else{let l=xq(t[2],"()");if(l===-2)return;if(l>-1){let c=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let a=t[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(a);l&&(a=l[1],o=l[3])}else o=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),R1(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[a.toLowerCase()];if(!o){let l=i[0].charAt(0);return{type:"text",raw:l,text:l}}return R1(i,o,i[0],this.lexer,this.rules)}}emStrong(e,t,i=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||!a[1]&&!a[2]&&!a[3]&&!a[4]||a[4]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[3])||!i||this.rules.inline.punctuation.exec(i))){let o=[...a[0]].length-1,l,c,h=o,d=0,f=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+o);(a=f.exec(t))!==null;){if(l=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!l)continue;if(c=[...l].length,a[3]||a[4]){h+=c;continue}else if((a[5]||a[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+d);let p=[...a[0]][0].length,g=e.slice(0,o+a.index+p+c);if(Math.min(o,c)%2){let y=g.slice(1,-1);return{type:"em",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}let x=g.slice(2,-2);return{type:"strong",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:t[0],text:i}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,i=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!i||this.rules.inline.punctuation.exec(i))){let o=[...a[0]].length-1,l,c,h=o,d=this.rules.inline.delRDelim;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(a=d.exec(t))!==null;){if(l=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!l||(c=[...l].length,c!==o))continue;if(a[3]||a[4]){h+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h);let f=[...a[0]][0].length,p=e.slice(0,o+a.index+f+c),g=p.slice(o,-o);return{type:"del",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let i,a;return t[2]==="@"?(i=t[1],a="mailto:"+i):(i=t[1],a=i),{type:"link",raw:t[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(e){var i;let t;if(t=this.rules.inline.url.exec(e)){let a,o;if(t[2]==="@")a=t[0],o="mailto:"+a;else{let l;do l=t[0],t[0]=((i=this.rules.inline._backpedal.exec(t[0]))==null?void 0:i[0])??"";while(l!==t[0]);a=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let i=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:i}}}},_i=class Am{constructor(t){It(this,"tokens");It(this,"options");It(this,"state");It(this,"inlineQueue");It(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||So,this.options.tokenizer=this.options.tokenizer||new Td,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:vr,block:Eu.normal,inline:dc.normal};this.options.pedantic?(i.block=Eu.pedantic,i.inline=dc.pedantic):this.options.gfm&&(i.block=Eu.gfm,this.options.breaks?i.inline=dc.breaks:i.inline=dc.gfm),this.tokenizer.rules=i}static get rules(){return{block:Eu,inline:dc}}static lex(t,i){return new Am(i).lex(t)}static lexInline(t,i){return new Am(i).inlineTokens(t)}lex(t){t=t.replace(vr.carriageReturn,`
`),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(vr.tabCharGlobal,"    ").replace(vr.spaceLine,""));let o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let d;if((c=(l=this.options.extensions)==null?void 0:l.block)!=null&&c.some(p=>(d=p.call({lexer:this},t,i))?(t=t.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.space(t)){t=t.substring(d.raw.length);let p=i.at(-1);d.raw.length===1&&p!==void 0?p.raw+=`
`:i.push(d);continue}if(d=this.tokenizer.code(t)){t=t.substring(d.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(`
`)?"":`
`)+d.raw,p.text+=`
`+d.text,this.inlineQueue.at(-1).src=p.text):i.push(d);continue}if(d=this.tokenizer.fences(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.heading(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.hr(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.blockquote(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.list(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.html(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.def(t)){t=t.substring(d.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(`
`)?"":`
`)+d.raw,p.text+=`
`+d.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[d.tag]||(this.tokens.links[d.tag]={href:d.href,title:d.title},i.push(d));continue}if(d=this.tokenizer.table(t)){t=t.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.lheading(t)){t=t.substring(d.raw.length),i.push(d);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(y=>{x=y.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&&(d=this.tokenizer.paragraph(f))){let p=i.at(-1);a&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
`)?"":`
`)+d.raw,p.text+=`
`+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d),a=f.length!==t.length,t=t.substring(d.raw.length);continue}if(d=this.tokenizer.text(t)){t=t.substring(d.raw.length);let p=i.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
`)?"":`
`)+d.raw,p.text+=`
`+d.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):i.push(d);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,y;this.tokenizer.lexer=this;let a=t,o=null;if(this.tokens.links){let C=Object.keys(this.tokens.links);if(C.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)C.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)l=o[2]?o[2].length:0,a=a.slice(0,o.index+l)+"["+"a".repeat(o[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="",d=1/0;for(;t;){if(t.length<d)d=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(h=""),c=!1;let C;if((x=(g=this.options.extensions)==null?void 0:g.inline)!=null&&x.some(v=>(C=v.call({lexer:this},t,i))?(t=t.substring(C.raw.length),i.push(C),!0):!1))continue;if(C=this.tokenizer.escape(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.tag(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.link(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(C.raw.length);let v=i.at(-1);C.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=C.raw,v.text+=C.text):i.push(C);continue}if(C=this.tokenizer.emStrong(t,a,h)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.codespan(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.br(t)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.del(t,a,h)){t=t.substring(C.raw.length),i.push(C);continue}if(C=this.tokenizer.autolink(t)){t=t.substring(C.raw.length),i.push(C);continue}if(!this.state.inLink&&(C=this.tokenizer.url(t))){t=t.substring(C.raw.length),i.push(C);continue}let k=t;if((y=this.options.extensions)!=null&&y.startInline){let v=1/0,T=t.slice(1),B;this.options.extensions.startInline.forEach(L=>{B=L.call({lexer:this},T),typeof B=="number"&&B>=0&&(v=Math.min(v,B))}),v<1/0&&v>=0&&(k=t.substring(0,v+1))}if(C=this.tokenizer.inlineText(k)){t=t.substring(C.raw.length),C.raw.slice(-1)!=="_"&&(h=C.raw.slice(-1)),c=!0;let v=i.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=C.raw,v.text+=C.text):i.push(C);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)}},_d=class{constructor(e){It(this,"options");It(this,"parser");this.options=e||So}space(e){return""}code({text:e,lang:t,escaped:i}){var l;let a=(l=(t||"").match(vr.notSpaceStart))==null?void 0:l[0],o=e.replace(vr.endingNewline,"")+`
`;return a?'<pre><code class="language-'+Xi(a)+'">'+(i?o:Xi(o,!0))+`</code></pre>
`:"<pre><code>"+(i?o:Xi(o,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(e){let t=e.ordered,i=e.start,a="";for(let c=0;c<e.items.length;c++){let h=e.items[c];a+=this.listitem(h)}let o=t?"ol":"ul",l=t&&i!==1?' start="'+i+'"':"";return"<"+o+l+`>
`+a+"</"+o+`>
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let t="",i="";for(let o=0;o<e.header.length;o++)i+=this.tablecell(e.header[o]);t+=this.tablerow({text:i});let a="";for(let o=0;o<e.rows.length;o++){let l=e.rows[o];i="";for(let c=0;c<l.length;c++)i+=this.tablecell(l[c]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+a+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Xi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:i}){let a=this.parser.parseInline(i),o=A1(e);if(o===null)return a;e=o;let l='<a href="'+e+'"';return t&&(l+=' title="'+Xi(t)+'"'),l+=">"+a+"</a>",l}image({href:e,title:t,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let o=A1(e);if(o===null)return Xi(i);e=o;let l=`<img src="${e}" alt="${Xi(i)}"`;return t&&(l+=` title="${Xi(t)}"`),l+=">",l}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xi(e.text)}},Gy=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Bi=class Mm{constructor(t){It(this,"options");It(this,"renderer");It(this,"textRenderer");this.options=t||So,this.options.renderer=this.options.renderer||new _d,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gy}static parse(t,i){return new Mm(i).parse(t)}static parseInline(t,i){return new Mm(i).parseInline(t)}parse(t){var a,o;this.renderer.parser=this;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((o=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&o[c.type]){let d=c,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.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 d='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return i}parseInline(t,i=this.renderer){var o,l;this.renderer.parser=this;let a="";for(let c=0;c<t.length;c++){let h=t[c];if((l=(o=this.options.extensions)==null?void 0:o.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 d=h;switch(d.type){case"escape":{a+=i.text(d);break}case"html":{a+=i.html(d);break}case"link":{a+=i.link(d);break}case"image":{a+=i.image(d);break}case"checkbox":{a+=i.checkbox(d);break}case"strong":{a+=i.strong(d);break}case"em":{a+=i.em(d);break}case"codespan":{a+=i.codespan(d);break}case"br":{a+=i.br(d);break}case"del":{a+=i.del(d);break}case"text":{a+=i.text(d);break}default:{let f='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},Du,Sc=(Du=class{constructor(e){It(this,"options");It(this,"block");this.options=e||So}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?_i.lex:_i.lexInline}provideParser(e=this.block){return e?Bi.parse:Bi.parseInline}},It(Du,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),It(Du,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Du),Vy=class{constructor(...e){It(this,"defaults",Iy());It(this,"options",this.setOptions);It(this,"parse",this.parseMarkdown(!0));It(this,"parseInline",this.parseMarkdown(!1));It(this,"Parser",Bi);It(this,"Renderer",_d);It(this,"TextRenderer",Gy);It(this,"Lexer",_i);It(this,"Tokenizer",Td);It(this,"Hooks",Sc);this.use(...e)}walkTokens(e,t){var a,o;let i=[];for(let l of e)switch(i=i.concat(t.call(this,l)),l.type){case"table":{let c=l;for(let h of c.header)i=i.concat(this.walkTokens(h.tokens,t));for(let h of c.rows)for(let d of h)i=i.concat(this.walkTokens(d.tokens,t));break}case"list":{let c=l;i=i.concat(this.walkTokens(c.items,t));break}default:{let c=l;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(h=>{let d=c[h].flat(1/0);i=i.concat(this.walkTokens(d,t))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=t.renderers[o.name];l?t.renderers[o.name]=function(...c){let h=o.renderer.apply(this,c);return h===!1&&(h=l.apply(this,c)),h}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=t[o.level];l?l.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),a.extensions=t),i.renderer){let o=this.defaults.renderer||new _d(this.defaults);for(let l in i.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,h=i.renderer[c],d=o[c];o[c]=(...f)=>{let p=h.apply(o,f);return p===!1&&(p=d.apply(o,f)),p||""}}a.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Td(this.defaults);for(let l in i.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,h=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let p=h.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}a.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Sc;for(let l in i.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,h=i.hooks[c],d=o[c];Sc.passThroughHooks.has(l)?o[c]=f=>{if(this.defaults.async&&Sc.passThroughHooksRespectAsync.has(l))return(async()=>{let g=await h.call(o,f);return d.call(o,g)})();let p=h.call(o,f);return d.call(o,p)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let g=await h.apply(o,f);return g===!1&&(g=await d.apply(o,f)),g})();let p=h.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}a.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,l=i.walkTokens;a.walkTokens=function(c){let h=[];return h.push(l.call(this,c)),o&&(h=h.concat(o.call(this,c))),h}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _i.lex(e,t??this.defaults)}parser(e,t){return Bi.parse(e,t??this.defaults)}parseMarkdown(e){return(t,i)=>{let a={...i},o={...this.defaults,...a},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(t):t,h=await(o.hooks?await o.hooks.provideLexer(e):e?_i.lex:_i.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser(e):e?Bi.parse:Bi.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(l);try{o.hooks&&(t=o.hooks.preprocess(t));let c=(o.hooks?o.hooks.provideLexer(e):e?_i.lex:_i.lexInline)(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let h=(o.hooks?o.hooks.provideParser(e):e?Bi.parse:Bi.parseInline)(c,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(c){return l(c)}}}onError(e,t){return i=>{if(i.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+Xi(i.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(i);throw i}}},Co=new Vy;function ve(e,t){return Co.parse(e,t)}ve.options=ve.setOptions=function(e){return Co.setOptions(e),ve.defaults=Co.defaults,yB(ve.defaults),ve};ve.getDefaults=Iy;ve.defaults=So;ve.use=function(...e){return Co.use(...e),ve.defaults=Co.defaults,yB(ve.defaults),ve};ve.walkTokens=function(e,t){return Co.walkTokens(e,t)};ve.parseInline=Co.parseInline;ve.Parser=Bi;ve.parser=Bi.parse;ve.Renderer=_d;ve.TextRenderer=Gy;ve.Lexer=_i;ve.lexer=_i.lex;ve.Tokenizer=Td;ve.Hooks=Sc;ve.parse=ve;ve.options;ve.setOptions;ve.use;ve.walkTokens;ve.parseInline;Bi.parse;_i.lex;rl.initialize({startOnLoad:!1,securityLevel:"strict"});const vq="en";function Bd(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const kq=`
  :root { color-scheme: light; }
  * { box-sizing: border-box; }
  body { margin: 0; background: #f5f6f8; }
  .doc {
    max-width: 900px; margin: 0 auto; padding: 40px;
    background: #ffffff; color: #1a1a1a;
    font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6;
  }
  .doc h1, .doc h2, .doc h3, .doc h4 { line-height: 1.3; margin: 1.2em 0 0.5em; }
  .doc h1 { border-bottom: 2px solid #e0e0e0; padding-bottom: 0.3em; }
  .doc p { margin: 0.6em 0; }
  .doc table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.9em; }
  .doc th, .doc td { border: 1px solid #d0d0d0; padding: 6px 10px; text-align: left; vertical-align: top; }
  .doc th { background: #f0f2f5; }
  .doc pre.md-code {
    background: #f0f2f5; border: 1px solid #d0d0d0; border-radius: 4px;
    padding: 10px; overflow-x: auto; font-size: 0.9em;
  }
  .doc code { font-family: Consolas, 'Courier New', monospace; }
  .doc .mermaid-diagram { display: flex; justify-content: center; margin: 1.2em 0; }
  .doc .mermaid-diagram svg { max-width: 100%; height: auto; }
  .doc .mermaid-error {
    background: #fff4f4; border: 1px solid #e0b4b4; border-radius: 4px;
    padding: 10px; color: #7a2020; overflow-x: auto;
  }
  .doc hr { border: none; border-top: 1px solid #e0e0e0; margin: 1.5em 0; }
`;function Sq(e){const t=e.match(/^#\s+(.+)$/m);return t?t[1].trim():"Dokumentation"}function wq(e,t){return`<!DOCTYPE html>
<html lang="${Bd(vq)}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${Bd(t)}</title>
<style>${kq}</style>
</head>
<body>
<main class="doc">
${e}
</main>
</body>
</html>
`}async function Tq(e){const t=mB(e),i=[];for(let a=0;a<t.length;a++){const o=t[a]??"";try{const{svg:l}=await rl.render(`html-mermaid-${a}-${Date.now()}`,o);i.push(l)}catch{i.push(`<pre class="mermaid-error">${Bd(o)}</pre>`)}}return i}async function _q(e){const t=await Tq(e);let i=0;const o=new Vy({renderer:{code({text:l,lang:c}){return(c??"").trim().toLowerCase()==="mermaid"?`<div class="mermaid-diagram">${t[i++]??""}</div>`:`<pre class="md-code"><code>${Bd(l)}</code></pre>`}}}).parse(e,{async:!1});return wq(o,Sq(e))}rl.initialize({startOnLoad:!1,securityLevel:"strict"});function F1(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const Bq=new Vy({renderer:{code({text:e,lang:t}){return(t??"").trim().toLowerCase()==="mermaid"?`<pre class="mermaid">${F1(e)}</pre>`:`<pre class="md-code"><code>${F1(e)}</code></pre>`}}});function Eq({markdown:e}){const t=gt.useRef(null),i=gt.useMemo(()=>Bq.parse(e,{async:!1}),[e]);return gt.useEffect(()=>{const a=t.current;if(!a)return;const o=Array.from(a.querySelectorAll("pre.mermaid"));o.length!==0&&(o.forEach(l=>l.removeAttribute("data-processed")),rl.run({nodes:o}).catch(()=>{}))},[i]),w.jsx("div",{ref:t,className:"markdown-preview",dangerouslySetInnerHTML:{__html:i}})}function Lq(){const{t:e}=Ue(),{result:t}=_n(),i=Mr(),[a,o]=gt.useState(null),[l,c]=gt.useState(!1),[h,d]=gt.useState(null),[f,p]=gt.useState(!1),[g,x]=gt.useState(null),[y,C]=gt.useState(null),[k,v]=gt.useState(!1),[T,B]=gt.useState(null),L=(t==null?void 0:t.outputPath)??"",M=t==null?void 0:t.version,F=t==null?void 0:t.changesCount,$=M!=null;async function N(){var it;o(null);const Z=await Ws(L);Z.success||o(((it=Z.error)==null?void 0:it.message)??e("error.unexpected"))}async function j(){var X;o(null),d(null),c(!0);let Z="[]";try{const U=await ng(L);if(U.success&&U.data){const D=await FI(U.data.content);Z=JSON.stringify(D)}}catch{Z="[]"}const it=await iA(L,Z);c(!1),it.success&&it.data?d(it.data.pdfPath):o(((X=it.error)==null?void 0:X.message)??e("error.unexpected"))}async function ot(){var U,D;o(null),x(null),p(!0);const Z=await ng(L);if(!Z.success||!Z.data){p(!1),o(((U=Z.error)==null?void 0:U.message)??e("error.unexpected"));return}const it=await _q(Z.data.content),X=await aA(L,it);p(!1),X.success&&X.data?x(X.data.htmlPath):o(((D=X.error)==null?void 0:D.message)??e("error.unexpected"))}function K(){i({type:"goBack"})}async function Y(){var it;B(null),v(!0);const Z=await ng(L);v(!1),Z.success&&Z.data?C(Z.data.content):B(((it=Z.error)==null?void 0:it.message)??e("error.unexpected"))}return w.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-lg)"},children:[w.jsx("div",{style:{width:"64px",height:"64px",borderRadius:"50%",backgroundColor:"var(--color-success-bg)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2rem"},"aria-hidden":"true",children:"✓"}),w.jsx("h1",{style:{fontSize:"var(--font-size-heading)",textAlign:"center",margin:0},children:e("result.success")}),w.jsxs("div",{style:{backgroundColor:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",padding:"var(--spacing-md)",width:"100%",maxWidth:"560px",wordBreak:"break-all"},children:[w.jsx("p",{style:{margin:0,fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",marginBottom:"var(--spacing-xs)"},children:e("result.outputPath")}),w.jsx("p",{style:{margin:0,fontSize:"var(--font-size-body)",color:"var(--color-text)"},children:L})]}),$&&w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-lg)",alignItems:"center"},children:[w.jsxs("span",{style:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[e("result.version"),": ",w.jsx("strong",{children:M})]}),F!=null&&w.jsxs("span",{style:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[e("result.changesCount"),": ",w.jsx("strong",{children:F})]})]}),a&&w.jsxs("p",{role:"alert",style:{color:"var(--color-error)",backgroundColor:"var(--color-error-bg)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",width:"100%"},children:[e("result.openError")," ",a]}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)"},children:[w.jsx("button",{type:"button",onClick:N,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:Z=>{Z.currentTarget.style.backgroundColor="var(--color-primary-hover)"},onMouseLeave:Z=>{Z.currentTarget.style.backgroundColor="var(--color-primary)"},children:e("result.openFile")}),w.jsx("button",{type:"button",onClick:j,disabled:l,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:l?"wait":"pointer",opacity:l?.7:1,transition:"background-color var(--transition-fast)"},onMouseEnter:Z=>{l||(Z.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:Z=>{Z.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(l?"result.pdfExporting":"result.exportPdf")}),w.jsx("button",{type:"button",onClick:ot,disabled:f,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:f?"wait":"pointer",opacity:f?.7:1,transition:"background-color var(--transition-fast)"},onMouseEnter:Z=>{f||(Z.currentTarget.style.backgroundColor="var(--color-primary-hover)")},onMouseLeave:Z=>{Z.currentTarget.style.backgroundColor="var(--color-primary)"},children:e(f?"result.htmlExporting":"result.exportHtml")}),w.jsx("button",{type:"button",onClick:Y,disabled:k,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:k?"wait":"pointer",opacity:k?.7:1,transition:"background-color var(--transition-fast)"},onMouseEnter:Z=>{k||(Z.currentTarget.style.backgroundColor="var(--color-success-bg)")},onMouseLeave:Z=>{Z.currentTarget.style.backgroundColor="transparent"},children:e(k?"result.previewLoading":"result.preview")}),w.jsx("button",{type:"button",onClick:K,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:Z=>{Z.currentTarget.style.backgroundColor="var(--color-success-bg)"},onMouseLeave:Z=>{Z.currentTarget.style.backgroundColor="transparent"},children:e("result.newDoc")})]}),h&&w.jsxs("p",{style:{color:"var(--color-success)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",textAlign:"center"},children:[e("result.pdfSuccess")," ",h]}),g&&w.jsxs("p",{style:{color:"var(--color-success)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",textAlign:"center"},children:[e("result.htmlSuccess")," ",g]}),T&&w.jsxs("p",{role:"alert",style:{color:"var(--color-error)",backgroundColor:"var(--color-error-bg)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",width:"100%"},children:[e("result.previewError")," ",T]}),y!==null&&w.jsx("div",{role:"dialog","aria-modal":"true","aria-label":e("result.previewTitle"),style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",padding:"var(--spacing-lg)",zIndex:1e3},onClick:()=>C(null),children:w.jsxs("div",{style:{backgroundColor:"var(--color-background)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",width:"100%",maxWidth:"900px",maxHeight:"90vh",display:"flex",flexDirection:"column",overflow:"hidden"},onClick:Z=>Z.stopPropagation(),children:[w.jsxs("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"var(--spacing-md) var(--spacing-lg)",borderBottom:"1px solid var(--color-border)"},children:[w.jsx("h2",{style:{margin:0,fontSize:"var(--font-size-heading)"},children:e("result.previewTitle")}),w.jsx("button",{type:"button",onClick:()=>C(null),style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer"},children:e("result.previewClose")})]}),w.jsx("div",{style:{padding:"var(--spacing-lg)",overflowY:"auto",textAlign:"left"},children:w.jsx(Eq,{markdown:y})})]})})]})}const Aq=[{nameKey:"imprint.dep.python.name",descKey:"imprint.dep.python.desc"},{nameKey:"imprint.dep.powerbi.name",descKey:"imprint.dep.powerbi.desc"},{nameKey:"imprint.dep.adomd.name",descKey:"imprint.dep.adomd.desc"},{nameKey:"imprint.dep.pythonnet.name",descKey:"imprint.dep.pythonnet.desc"},{nameKey:"imprint.dep.fabric.name",descKey:"imprint.dep.fabric.desc"},{nameKey:"imprint.dep.msal.name",descKey:"imprint.dep.msal.desc"}];function Mq(e){const t=new Map;for(const i of e){const a=t.get(i.prefix)??[];a.push(i),t.set(i.prefix,a)}return t}const z1=[{prefix:"META_",name:"Kurzbeschreibung",descriptionKey:"imprint.fields.group.META_"},{prefix:"KONTAKT_",name:"Verantwortlicher",descriptionKey:"imprint.fields.group.KONTAKT_"},{prefix:"BIZ_",name:"Fachbereich",descriptionKey:"imprint.fields.group.BIZ_"},{prefix:"KPI_",name:"Kennzahl",descriptionKey:"imprint.fields.group.KPI_"},{prefix:"GLOSSAR_",name:"Begriff",descriptionKey:"imprint.fields.group.GLOSSAR_"},{prefix:"DS_",name:"Quelle",descriptionKey:"imprint.fields.group.DS_"},{prefix:"PQ_",name:"Abfrage",descriptionKey:"imprint.fields.group.PQ_"},{prefix:"PQT_",name:"Transformation",descriptionKey:"imprint.fields.group.PQT_"},{prefix:"PARAM_",name:"Parameter",descriptionKey:"imprint.fields.group.PARAM_"},{prefix:"COL_",name:"Spalte",descriptionKey:"imprint.fields.group.COL_"},{prefix:"MODELL_",name:"Tabelle",descriptionKey:"imprint.fields.group.MODELL_"},{prefix:"DAX_",name:"Measure",descriptionKey:"imprint.fields.group.DAX_"},{prefix:"TBLTYP_",name:"Tabellentyp",descriptionKey:"imprint.fields.group.TBLTYP_"},{prefix:"REL_",name:"Beziehung",descriptionKey:"imprint.fields.group.REL_"},{prefix:"RLS_",name:"Regel",descriptionKey:"imprint.fields.group.RLS_"},{prefix:"SEC_",name:"Rolle",descriptionKey:"imprint.fields.group.SEC_"},{prefix:"REFRESH_",name:"Zeitplan",descriptionKey:"imprint.fields.group.REFRESH_"},{prefix:"OPS_",name:"Prozess",descriptionKey:"imprint.fields.group.OPS_"},{prefix:"VER_",name:"Version",descriptionKey:"imprint.fields.group.VER_"},{prefix:"LOG_",name:"Eintrag",descriptionKey:"imprint.fields.group.LOG_"},{prefix:"REVIEW_",name:"Freigabe",descriptionKey:"imprint.fields.group.REVIEW_"}];function Dq(){const{t:e}=Ue(),t=Mr();function i(){t({type:"goBack"})}return w.jsx("main",{style:ce.container,children:w.jsxs("div",{style:ce.content,children:[w.jsxs("button",{type:"button",onClick:i,style:ce.backButton,"aria-label":e("dialog.back"),children:["← ",e("dialog.back")]}),w.jsx("h1",{style:ce.heading,children:e("imprint.heading")}),w.jsxs("section",{style:ce.section,children:[w.jsx("h2",{style:ce.sectionHeading,children:e("imprint.deps.heading")}),w.jsx("ul",{style:ce.depList,children:Aq.map(a=>w.jsxs("li",{style:ce.depItem,children:[w.jsx("span",{style:ce.depName,children:e(a.nameKey)}),w.jsx("span",{children:e(a.descKey)})]},a.nameKey))})]}),w.jsxs("section",{style:ce.section,children:[w.jsx("h2",{style:ce.sectionHeading,children:e("imprint.fields.heading")}),z1.length===0?w.jsx("p",{style:ce.paragraph,children:e("imprint.fields.empty")}):Array.from(Mq(z1).entries()).map(([a,o])=>w.jsxs("div",{style:ce.fieldGroup,children:[w.jsx("h3",{style:ce.groupHeading,children:e("imprint.fields.group."+a)}),w.jsx("ul",{style:ce.fieldList,children:o.map(l=>w.jsxs("li",{style:ce.fieldItem,children:[w.jsx("span",{style:ce.fieldPrefix,children:l.prefix}),w.jsx("span",{style:ce.fieldName,children:l.name})]},l.prefix+l.name))})]},a))]}),w.jsxs("section",{style:ce.section,children:[w.jsx("h2",{style:ce.sectionHeading,children:e("imprint.template.heading")}),w.jsxs("ol",{style:ce.orderedList,children:[w.jsx("li",{style:ce.listItem,children:e("imprint.template.step1")}),w.jsx("li",{style:ce.listItem,children:e("imprint.template.step2")}),w.jsx("li",{style:ce.listItem,children:e("imprint.template.step3")})]}),w.jsx("p",{style:ce.paragraph,children:e("imprint.template.naming")}),w.jsx("p",{style:ce.paragraph,children:e("imprint.template.custom")})]}),w.jsx(Rq,{})]})})}const Bg="Oliver Gropp",O1="https://www.linkedin.com/in/oliver-gropp-a6b731163/",$1="https://www.oliver-gropp.com";function Rq(){const{t:e}=Ue(),[t,i]=gt.useState(null);async function a(o,l){o.preventDefault(),(await Ws(l)).success?i(null):i(e("imprint.error.openUrl"))}return w.jsxs("section",{style:ce.section,children:[w.jsx("h2",{style:ce.sectionHeading,children:e("imprint.author.heading")}),w.jsx("p",{style:ce.authorName,children:Bg}),w.jsxs("div",{style:ce.authorLinks,children:[w.jsx("a",{href:O1,rel:"noopener noreferrer",target:"_blank","aria-label":`${e("imprint.author.linkedin")} – ${Bg}`,onClick:o=>a(o,O1),style:ce.authorLink,children:e("imprint.author.linkedin")}),w.jsx("a",{href:$1,rel:"noopener noreferrer",target:"_blank","aria-label":`${e("imprint.author.website")} – ${Bg}`,onClick:o=>a(o,$1),style:ce.authorLink,children:e("imprint.author.website")})]}),t&&w.jsx("p",{style:ce.urlError,children:t})]})}const ce={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflowY:"auto",padding:"var(--spacing-xl)"},content:{width:"100%",maxWidth:"800px"},backButton:{display:"inline-flex",alignItems:"center",gap:"var(--spacing-xs)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)",transition:"border-color var(--transition-fast)",marginBottom:"var(--spacing-lg)"},heading:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-lg)"},section:{marginBottom:"var(--spacing-lg)"},sectionHeading:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-md)"},depList:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},depItem:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},depName:{fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},orderedList:{margin:"0 0 var(--spacing-md) 0",paddingLeft:"var(--spacing-lg)",color:"var(--color-text)"},listItem:{marginBottom:"var(--spacing-xs)",fontSize:"var(--font-size-body)",lineHeight:"1.5"},paragraph:{margin:"0 0 var(--spacing-sm) 0",fontSize:"var(--font-size-body)",color:"var(--color-text)",lineHeight:"1.5"},fieldGroup:{marginBottom:"var(--spacing-md)"},groupHeading:{fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-xs)"},fieldList:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},fieldItem:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},fieldPrefix:{fontFamily:"monospace",fontSize:"var(--font-size-small)",color:"var(--color-text-hint)"},fieldName:{color:"var(--color-text)"},authorName:{margin:"0 0 var(--spacing-sm) 0",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)"},authorLinks:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)"},authorLink:{color:"var(--color-primary)",fontSize:"var(--font-size-body)",textDecoration:"underline",cursor:"pointer"},urlError:{margin:"var(--spacing-sm) 0 0 0",fontSize:"var(--font-size-small)",color:"var(--color-error, #d32f2f)"}},Fq="2.0.1",N1=[{version:"2.0.1",date:"2026-07-08",changes:[{type:"added",de:'Neuer Bereich „Andere Fabric-Elemente dokumentieren": Einzelne Fabric-Elemente – Dataflows (Gen1 & Gen2), Notebooks, Copy Jobs, Data Pipelines, Lakehouses, Warehouses, Eventhouses, Dashboards, KQL-Datenbanken, SQL Databases, Environments, Mirrored Databases, Eventstreams, Spark Job Definitions, KQL-Querysets, Reflexe (Data Activator) und API-for-GraphQL-Items – lassen sich gezielt über Workspace, Elementtyp und Element-ID dokumentieren. Inkl. Dokumentations-Update: manuell gepflegte Abschnitte bleiben erhalten, Version und Änderungsprotokoll werden fortgeschrieben.',en:'New "Document other Fabric elements" area: individual Fabric elements – dataflows (Gen1 & Gen2), notebooks, copy jobs, data pipelines, lakehouses, warehouses, eventhouses, dashboards, KQL databases, SQL databases, environments, mirrored databases, eventstreams, Spark job definitions, KQL querysets, reflexes (Data Activator) and API for GraphQL items – can be documented specifically via workspace, element type and element ID. Incl. documentation update: manually maintained sections are preserved while version and change log are carried forward.'},{type:"added",de:"Eigene, an den jeweiligen Elementtyp angepasste Dokumentationsvorlagen (über den Vorlagen-Editor anpassbar).",en:"Dedicated documentation templates tailored to each element type (customizable via the template editor)."},{type:"added",de:"Beim Fabric-Workspace-Export werden diese Elemente mit eigener Dokumentation erfasst und in der Workspace-Übersicht aufgeführt.",en:"The Fabric workspace export captures these elements with dedicated documentation and lists them in the workspace overview."}]},{version:"2.0.0",date:"2025-06-23",changes:[{type:"added",de:"Vier Verbindungsmethoden: Microsoft Fabric Service, lokaler Power-BI-Bericht, PBIP-Projektordner und Aktualisierung bestehender Dokumentation.",en:"Four connection methods: Microsoft Fabric Service, local Power BI report, PBIP project folder, and updating existing documentation."},{type:"added",de:"Dokumentation kompletter Fabric-Workspaces inkl. aller Semantic Models und Berichte.",en:"Documentation of complete Fabric workspaces including all semantic models and reports."},{type:"added",de:"Fabric IQ Readiness-Analyse für PBIP-Ordner.",en:"Fabric IQ readiness analysis for PBIP folders."},{type:"added",de:"Anpassbare Dokumentationsvorlage über den integrierten Vorlagen-Editor.",en:"Customizable documentation template via the built-in template editor."},{type:"added",de:"Versionsvergleich (Diff) zweier Dokumentationsstände.",en:"Version comparison (diff) of two documentation states."},{type:"added",de:"Export der erzeugten Dokumentation als PDF und HTML.",en:"Export of generated documentation as PDF and HTML."},{type:"added",de:"Automatische Änderungserkennung mit Versionsinkrement und Änderungsprotokoll beim Aktualisieren bestehender Dokumente.",en:"Automatic change detection with version increment and change log when updating existing documents."}]}],zq={added:"changelog.type.added",changed:"changelog.type.changed",fixed:"changelog.type.fixed",removed:"changelog.type.removed"},Oq={added:"#2e7d32",changed:"#1565c0",fixed:"#c77700",removed:"#b71c1c"};function $q(e,t){const i=new Date(e+"T00:00:00");return Number.isNaN(i.getTime())?e:i.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Nq(){const{t:e}=Ue(),t=Mr();function i(){t({type:"goBack"})}return w.jsx("main",{style:Pr.container,children:w.jsxs("div",{style:Pr.content,children:[w.jsxs("button",{type:"button",onClick:i,style:Pr.backButton,"aria-label":e("dialog.back"),children:["← ",e("dialog.back")]}),w.jsx("h1",{style:Pr.heading,children:e("changelog.heading")}),w.jsxs("p",{style:Pr.currentVersion,children:[e("changelog.currentVersion"),": ",Fq]}),N1.length===0?w.jsx("p",{style:Pr.paragraph,children:e("changelog.empty")}):N1.map(a=>w.jsxs("section",{style:Pr.section,children:[w.jsxs("div",{style:Pr.releaseHeader,children:[w.jsxs("h2",{style:Pr.sectionHeading,children:["v",a.version]}),w.jsx("span",{style:Pr.releaseDate,children:$q(a.date)})]}),w.jsx("ul",{style:Pr.changeList,children:a.changes.map((o,l)=>w.jsxs("li",{style:Pr.changeItem,children:[w.jsx("span",{style:{...Pr.badge,background:Oq[o.type]},children:e(zq[o.type])}),w.jsx("span",{style:Pr.changeText,children:o.en})]},l))})]},a.version))]})})}const Pr={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",overflowY:"auto",padding:"var(--spacing-xl)"},content:{width:"100%",maxWidth:"800px"},backButton:{display:"inline-flex",alignItems:"center",gap:"var(--spacing-xs)",padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)",transition:"border-color var(--transition-fast)",marginBottom:"var(--spacing-lg)"},heading:{fontSize:"var(--font-size-heading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",marginBottom:"var(--spacing-xs)"},currentVersion:{margin:"0 0 var(--spacing-lg) 0",fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},section:{marginBottom:"var(--spacing-lg)"},releaseHeader:{display:"flex",alignItems:"baseline",gap:"var(--spacing-md)",borderBottom:"1px solid var(--color-border)",paddingBottom:"var(--spacing-xs)",marginBottom:"var(--spacing-md)"},sectionHeading:{fontSize:"var(--font-size-subheading)",fontWeight:"var(--font-weight-semibold)",color:"var(--color-text)",margin:0},releaseDate:{fontSize:"var(--font-size-small)",color:"var(--color-text-hint)"},changeList:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:"var(--spacing-sm)"},changeItem:{display:"flex",alignItems:"flex-start",gap:"var(--spacing-sm)"},badge:{flexShrink:0,display:"inline-block",minWidth:"72px",textAlign:"center",padding:"2px var(--spacing-sm)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-small)",fontWeight:"var(--font-weight-semibold)",color:"#ffffff",textTransform:"uppercase",letterSpacing:"0.03em"},changeText:{fontSize:"var(--font-size-body)",color:"var(--color-text)",lineHeight:"1.5"},paragraph:{margin:"0 0 var(--spacing-sm) 0",fontSize:"var(--font-size-body)",color:"var(--color-text)",lineHeight:"1.5"}};function Iq(){const{readinessResult:e}=_n(),t=Mr(),[i,a]=gt.useState(null),{t:o}=Ue(),l=(e==null?void 0:e.outputPath)??"";async function c(){var f;a(null);const d=await Ws(l);d.success||a(((f=d.error)==null?void 0:f.message)??"Unknown error")}function h(){t({type:"reset"})}return w.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-lg)"},children:[w.jsx("div",{style:{width:"64px",height:"64px",borderRadius:"50%",backgroundColor:"var(--color-success-bg)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2rem"},"aria-hidden":"true",children:"✓"}),w.jsx("h1",{style:{fontSize:"var(--font-size-heading)",textAlign:"center",margin:0},children:o("readiness.title")}),w.jsxs("div",{style:{backgroundColor:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",padding:"var(--spacing-md)",width:"100%",maxWidth:"560px",wordBreak:"break-all"},children:[w.jsx("p",{style:{margin:0,fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",marginBottom:"var(--spacing-xs)"},children:o("readiness.filePath")}),w.jsx("p",{style:{margin:0,fontSize:"var(--font-size-body)",color:"var(--color-text)"},children:l})]}),i&&w.jsxs("p",{role:"alert",style:{color:"var(--color-error)",backgroundColor:"var(--color-error-bg)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",margin:0,maxWidth:"560px",width:"100%"},children:[o("readiness.errorOpen"),": ",i]}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)"},children:[w.jsx("button",{type:"button",onClick:c,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:d=>{d.currentTarget.style.backgroundColor="var(--color-primary-hover)"},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="var(--color-primary)"},children:o("readiness.openFile")}),w.jsx("button",{type:"button",onClick:h,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",fontWeight:"var(--font-weight-semibold)",cursor:"pointer",transition:"background-color var(--transition-fast)"},onMouseEnter:d=>{d.currentTarget.style.backgroundColor="var(--color-success-bg)"},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="transparent"},children:o("readiness.backHome")})]})]})}const qq=new Set(["META_ReportName","DS_Quelle","DS_System","DS_SchemaTabellen","DS_Owner","DS_Domäne","PQ_Name","PQ_Quelle","PQ_ZielTabelle","PQ_Beschreibung","PQT_Abfrage","PQT_MCode","PQT_Schrittname","PQT_Beschreibung","COL_Abfrage","COL_Spalte","COL_QuellTyp","COL_ZielTyp","COL_Transformation","MODELL_DatasetName","MODELL_BerichtName","DEP_BerichtName","DEP_BerichtID","DEP_BerichtURL","TBLTYP_Tabelle","TBLTYP_Typ","TBLTYP_Beschreibung","REL_Von","REL_Nach","REL_Kardinalität","REL_Kreuzfilter","REL_Aktiv","DAX_Measure","DAX_Beschreibung","DAX_Formel","RLS_Rolle","RLS_Beschreibung","RLS_Tabelle","RLS_FilterLogik","REFRESH_Frequenz","REFRESH_Uhrzeit","ENDORSEMENT_Analyse","DS_Lineage","DS_Architektur","MODELL_Visuals","META_Version","META_LetzteAktualisierung"]),jq=new Set(["WS_Name","WS_ID","WS_Beschreibung","WS_Typ","WS_DedizierteKapazitaet","WS_Kapazitaet","WS_ExportDatum","WS_AnzahlModelle","WS_AnzahlBerichte","WS_AnzahlDataflows","WS_AnzahlNotebooks","WS_AnzahlCopyjobs","WS_AnzahlPipelines","WS_AnzahlLakehouses","WS_AnzahlWarehouses","WS_AnzahlEventhouses","WS_AnzahlDashboards","WS_AnzahlSonstige","WS_AnzahlKQLDatenbanken","WS_AnzahlSQLDatabases","WS_AnzahlEnvironments","WS_AnzahlMirroredDatabases","WS_AnzahlEventstreams","WS_AnzahlSparkJobs","WS_AnzahlKQLQuerysets","WS_AnzahlReflexe","WS_AnzahlGraphQLApis","WS_ModelleTabelle","WS_BerichteTabelle","WS_DataflowsTabelle","WS_NotebooksTabelle","WS_CopyjobsTabelle","WS_PipelinesTabelle","WS_LakehousesTabelle","WS_WarehousesTabelle","WS_EventhousesTabelle","WS_DashboardsTabelle","WS_SonstigeTabelle","WS_BenutzerTabelle","WS_KQLDatenbankenTabelle","WS_SQLDatabasesTabelle","WS_EnvironmentsTabelle","WS_MirroredDatabasesTabelle","WS_EventstreamsTabelle","WS_SparkJobsTabelle","WS_KQLQuerysetsTabelle","WS_ReflexeTabelle","WS_GraphQLApisTabelle"]),Hq=new Set(["RPT_Name","RPT_Beschreibung","RPT_WebUrl","RPT_Endorsement","RPT_ModellName","RPT_ModellReferenz","RPT_Visuals","RPT_Zugriffe","RPT_ExportDatum"]),Pq=new Set(["DF_Name","DF_Beschreibung","DF_Generation","DF_ID","DF_WebUrl","DF_ConfiguredBy","DF_ModifiedTime","DF_ExportDatum","DF_EntitaetenTabelle","DF_AttributeTabelle","DF_DatenquellenTabelle","DF_Queries","DF_MashupDokument","DF_ServiceHinweis","DF_RefreshPlan"]),Wq=new Set(["NB_Name","NB_Beschreibung","NB_ID","NB_WebUrl","NB_DefaultLanguage","NB_DefaultLakehouse","NB_ConfiguredBy","NB_ModifiedTime","NB_ExportDatum","NB_ZellenTabelle","NB_Sprachen","NB_CodeZellen","NB_MarkdownDoku","NB_ServiceHinweis","NB_DatenquellenTabelle","NB_Ausfuehrung"]),Uq=new Set(["CJ_Name","CJ_Beschreibung","CJ_ID","CJ_WebUrl","CJ_JobModus","CJ_QuelleTyp","CJ_ZielTyp","CJ_Timeout","CJ_Retry","CJ_ConfiguredBy","CJ_ModifiedTime","CJ_ExportDatum","CJ_VerbindungsTabelle","CJ_ObjekteTabelle","CJ_Kopierauftraege","CJ_ServiceHinweis","CJ_Ausfuehrung"]),Yq=new Set(["PL_Name","PL_Beschreibung","PL_ID","PL_WebUrl","PL_AnzahlAktivitaeten","PL_ConfiguredBy","PL_ModifiedTime","PL_ExportDatum","PL_AktivitaetenTabelle","PL_AbhaengigkeitenAbschnitt","PL_ParameterTabelle","PL_VariablenTabelle","PL_ServiceHinweis","PL_DatenquellenTabelle","PL_Ausfuehrung"]),Gq=new Set(["DB_Name","DB_Beschreibung","DB_ID","DB_WebUrl","DB_ReadOnly","DB_DataClassification","DB_AnzahlKacheln","DB_ConfiguredBy","DB_ModifiedTime","DB_ExportDatum","DB_KachelnTabelle","DB_KachelnDetail","DB_VerknuepfungenTabelle","DB_ServiceHinweis","DB_DatenquellenTabelle"]),Vq=new Set(["LH_Name","LH_Beschreibung","LH_ID","LH_WebUrl","LH_DefaultSchema","LH_SqlConnection","LH_SqlEndpointId","LH_SqlStatus","LH_ConfiguredBy","LH_ModifiedTime","LH_ExportDatum","LH_TabellenTabelle","LH_TabellenDetail","LH_EndpunktTabelle","LH_ServiceHinweis","LH_DatenquellenTabelle","LH_EndpointHinweis","LH_Beladung"]),Xq=new Set(["WH_Name","WH_Beschreibung","WH_ID","WH_WebUrl","WH_Connection","WH_Collation","WH_CreatedDate","WH_LastUpdated","WH_ConfiguredBy","WH_ExportDatum","WH_EndpunktTabelle","WH_ServiceHinweis","WH_DatenquellenTabelle","WH_EndpointHinweis","WH_Beladung"]),Qq=new Set(["EH_Name","EH_Beschreibung","EH_ID","EH_WebUrl","EH_QueryUri","EH_IngestionUri","EH_MinConsumption","EH_AnzahlDatenbanken","EH_ConfiguredBy","EH_ModifiedTime","EH_ExportDatum","EH_DatenbankenTabelle","EH_DatenbankenDetail","EH_EndpunktTabelle","EH_ServiceHinweis","EH_DatenquellenTabelle","EH_EndpointHinweis","EH_Ingestion"]),Kq=new Set(["KH_Name","KH_Beschreibung","KH_ID","KH_WebUrl","KH_DatabaseType","KH_ParentEventhouse","KH_QueryUri","KH_IngestionUri","KH_ConfiguredBy","KH_ModifiedTime","KH_ExportDatum","KH_EndpunktTabelle","KH_ServiceHinweis","KH_DatenquellenTabelle","KH_EndpointHinweis","KH_Beladung"]),Zq=new Set(["SQ_Name","SQ_Beschreibung","SQ_ID","SQ_WebUrl","SQ_DatabaseName","SQ_ServerFqdn","SQ_Connection","SQ_Collation","SQ_ConfiguredBy","SQ_ModifiedTime","SQ_ExportDatum","SQ_EndpunktTabelle","SQ_ServiceHinweis","SQ_DatenquellenTabelle","SQ_EndpointHinweis","SQ_Beladung"]),Jq=new Set(["ENV_Name","ENV_Beschreibung","ENV_ID","ENV_WebUrl","ENV_RuntimeVersion","ENV_AnzahlBibliotheken","ENV_ConfiguredBy","ENV_ModifiedTime","ENV_ExportDatum","ENV_BibliothekenTabelle","ENV_ComputeTabelle","ENV_ServiceHinweis","ENV_DatenquellenTabelle","ENV_VerwendungHinweis","ENV_Beladung"]),tj=new Set(["MD_Name","MD_Beschreibung","MD_ID","MD_WebUrl","MD_SourceType","MD_SourceDatabase","MD_DefaultSchema","MD_TargetFormat","MD_AnzahlTabellen","MD_ConfiguredBy","MD_ModifiedTime","MD_ExportDatum","MD_QuelleTabelle","MD_TabellenTabelle","MD_ServiceHinweis","MD_DatenquellenTabelle","MD_ReplikationHinweis","MD_Beladung"]),ej=new Set(["ES_Name","ES_Beschreibung","ES_ID","ES_WebUrl","ES_AnzahlQuellen","ES_AnzahlZiele","ES_AnzahlOperatoren","ES_ConfiguredBy","ES_ModifiedTime","ES_ExportDatum","ES_QuellenTabelle","ES_ZieleTabelle","ES_OperatorenTabelle","ES_ServiceHinweis","ES_DatenquellenTabelle","ES_VerarbeitungHinweis","ES_Beladung"]),rj=new Set(["SJ_Name","SJ_Beschreibung","SJ_ID","SJ_WebUrl","SJ_Language","SJ_ExecutableFile","SJ_MainClass","SJ_DefaultLakehouse","SJ_ConfiguredBy","SJ_ModifiedTime","SJ_ExportDatum","SJ_KonfigTabelle","SJ_BibliothekenTabelle","SJ_ServiceHinweis","SJ_LogikHinweis","SJ_Beladung"]),ij=new Set(["QS_Name","QS_Beschreibung","QS_ID","QS_WebUrl","QS_AnzahlAbfragen","QS_ConfiguredBy","QS_ModifiedTime","QS_ExportDatum","QS_AbfragenTabelle","QS_AbfragenDetail","QS_ServiceHinweis","QS_VerwendungHinweis","QS_Beladung"]),aj=new Set(["RX_Name","RX_Beschreibung","RX_ID","RX_WebUrl","RX_AnzahlObjekte","RX_AnzahlRegeln","RX_ConfiguredBy","RX_ModifiedTime","RX_ExportDatum","RX_ObjekteTabelle","RX_RegelnTabelle","RX_ServiceHinweis","RX_LogikHinweis","RX_Beladung"]),nj=new Set(["GQ_Name","GQ_Beschreibung","GQ_ID","GQ_WebUrl","GQ_AnzahlDatenquellen","GQ_ConfiguredBy","GQ_ModifiedTime","GQ_ExportDatum","GQ_DatenquellenTabelle","GQ_DatenquellenTabelle2","GQ_SchemaBlock","GQ_ServiceHinweis","GQ_VerwendungHinweis","GQ_Beladung"]),oj={report:qq,workspaceOverview:jq,workspaceReport:Hq,dataflow:Pq,notebook:Wq,copyjob:Uq,pipeline:Yq,lakehouse:Vq,warehouse:Xq,eventhouse:Qq,dashboard:Gq,kqldatabase:Kq,sqldatabase:Zq,environment:Jq,mirroreddatabase:tj,eventstream:ej,sparkjob:rj,kqlqueryset:ij,reflex:aj,graphqlapi:nj},BB=/\{\{(\w+)\}\}/g;function sj(e,t,i){const a=e.split(`
`),o=[];let l="",c="",h=[],d=0;function f(){if(d>0){const p=h.join(`
`),g=[],x=new Set;for(const y of p.matchAll(BB)){const C=y[1]??"";C&&!x.has(C)&&(x.add(C),g.push({id:`${d}-${C}`,name:C,label:t[C]??C.replace(/_/g," "),required:i.has(C)}))}o.push({id:d,title:c,enabled:!0,params:g,rawContent:p})}else l=h.join(`
`)}for(const p of a)p.match(/^## \d+\./)?(f(),d++,c=p.replace(/^## \d+\.\s*/,""),h=[]):h.push(p);return f(),{header:l,chapters:o}}function lj(e,t){let i=e,a=1;for(const o of t){if(!o.enabled)continue;const l=new Set(o.params.map(h=>h.name)),c=o.rawContent.split(`
`).filter(h=>{const d=[...h.matchAll(BB)];return d.length===0?!0:d.some(f=>l.has(f[1]??""))});i+=`
## ${a}. ${o.title}${c.join(`
`)}`,a++}return i}function cj(){const{t:e}=Ue(),t=Mr(),[i,a]=gt.useState(""),[o,l]=gt.useState([]),[c,h]=gt.useState(null),[d,f]=gt.useState(!0),[p,g]=gt.useState(!1),[x,y]=gt.useState(null),[C,k]=gt.useState(null),[v,T]=gt.useState(null),[B,L]=gt.useState(""),[M,F]=gt.useState([]),[$,N]=gt.useState("report");async function j(z){var G;f(!0),y(null),h(null),k(null),T(null);const P=await oA(z);if(P.success&&P.data){const R=oj[z]??new Set,q=sj(P.data.content,P.data.labels??{},R);a(q.header),l(q.chapters)}else y({type:"error",text:((G=P.error)==null?void 0:G.message)??e("error.unexpected")}),a(""),l([]);f(!1)}gt.useEffect(()=>{(async()=>{const z=await nA();z.success&&z.data&&F(z.data.templates),await j("report")})()},[]);async function ot(z){N(z),await j(z)}function K(z){l(P=>P.map(G=>G.id===z?{...G,enabled:!G.enabled}:G))}function Y(z,P){l(G=>G.map(R=>R.id===z?{...R,title:P}:R)),k(null)}function Z(z,P){l(G=>{const R=G.findIndex(Ct=>Ct.id===z),q=P==="up"?R-1:R+1;if(q<0||q>=G.length)return G;const nt=[...G],ht=nt[R],yt=nt[q];return nt[R]=yt,nt[q]=ht,nt})}function it(z,P){l(G=>G.map(R=>R.id===z?{...R,params:R.params.filter(q=>q.id!==P)}:R))}function X(z,P,G){l(R=>R.map(q=>q.id===z?{...q,params:q.params.map(nt=>nt.id===P?{...nt,label:G}:nt)}:q)),T(null)}function U(z,P,G){l(R=>R.map(q=>{if(q.id!==z)return q;const nt=q.params.findIndex(kt=>kt.id===P),ht=G==="up"?nt-1:nt+1;if(ht<0||ht>=q.params.length)return q;const yt=[...q.params],Ct=yt[nt],wt=yt[ht];return yt[nt]=wt,yt[ht]=Ct,{...q,params:yt}}))}function D(z){if(!B.trim())return;const P=B.trim(),G=P.replace(/\s+/g,"_");l(R=>R.map(q=>{if(q.id!==z)return q;const nt=`${q.id}-${G}`;if(q.params.some(yt=>yt.name===G))return q;const ht=q.rawContent+`
{{${G}}}`;return{...q,params:[...q.params,{id:nt,name:G,label:P,required:!1}],rawContent:ht}})),L("")}async function I(){var G;g(!0),y(null);const z=lj(i,o),P=await sA(z,$);g(!1),P.success?y({type:"success",text:e("templateEditor.saved")}):y({type:"error",text:((G=P.error)==null?void 0:G.message)??e("error.unexpected")})}return d?w.jsx("main",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:w.jsx("p",{children:e("templateEditor.loading")})}):w.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",padding:"var(--spacing-md)",gap:"var(--spacing-sm)",overflow:"auto"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsx("h1",{style:{fontSize:"var(--font-size-heading)",margin:0},children:e("templateEditor.title")}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[w.jsx("button",{type:"button",onClick:I,disabled:p,style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"var(--color-primary)",color:"var(--color-primary-contrast)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},children:e(p?"templateEditor.saving":"templateEditor.save")}),w.jsx("button",{type:"button",onClick:()=>t({type:"goBack"}),style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},children:e("dialog.back")})]})]}),x&&w.jsx("p",{style:{margin:0,padding:"var(--spacing-xs) var(--spacing-sm)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",color:x.type==="success"?"var(--color-success)":"var(--color-error)",backgroundColor:x.type==="success"?"var(--color-success-bg)":"var(--color-error-bg)"},children:x.text}),w.jsx("p",{style:{margin:0,color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)"},children:e("templateEditor.hint")}),w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)"},children:[w.jsx("label",{htmlFor:"template-select",style:{fontSize:"var(--font-size-body)",fontWeight:600},children:e("templateEditor.select")}),w.jsx("select",{id:"template-select",value:$,onChange:z=>void ot(z.target.value),disabled:p,style:{padding:"var(--spacing-xs) var(--spacing-sm)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",color:"var(--color-text)",fontFamily:"var(--font-family)",minWidth:"280px"},children:M.map(z=>w.jsx("option",{value:z.key,children:z.name},z.key))})]}),w.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:o.map((z,P)=>w.jsxs("div",{style:{border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",overflow:"hidden"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--spacing-sm)",padding:"var(--spacing-sm)",backgroundColor:z.enabled?"var(--color-surface)":"var(--color-error-bg)",opacity:z.enabled?1:.6},children:[w.jsx("input",{type:"checkbox",checked:z.enabled,onChange:()=>K(z.id),style:{width:"18px",height:"18px",cursor:"pointer"}}),w.jsxs("span",{style:{fontWeight:"bold",minWidth:"28px",color:"var(--color-text-secondary)"},children:[P+1,"."]}),C===z.id?w.jsx("input",{autoFocus:!0,defaultValue:z.title,onBlur:G=>Y(z.id,G.target.value),onKeyDown:G=>{G.key==="Enter"&&Y(z.id,G.currentTarget.value),G.key==="Escape"&&k(null)},style:{flex:1,fontSize:"var(--font-size-body)",padding:"2px 6px",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)"}}):w.jsx("span",{onClick:()=>k(z.id),title:e("templateEditor.clickToRename"),style:{flex:1,cursor:"text",fontSize:"var(--font-size-body)"},children:z.title}),w.jsx("button",{type:"button",onClick:()=>h(c===z.id?null:z.id),style:{width:"28px",height:"28px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center"},children:c===z.id?"▾":"▸"}),w.jsx("button",{type:"button",onClick:()=>Z(z.id,"up"),disabled:P===0,style:{width:"28px",height:"28px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:P===0?"default":"pointer",fontSize:"15px",display:"flex",alignItems:"center",justifyContent:"center",opacity:P===0?.3:1},children:"⬆"}),w.jsx("button",{type:"button",onClick:()=>Z(z.id,"down"),disabled:P===o.length-1,style:{width:"28px",height:"28px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:P===o.length-1?"default":"pointer",fontSize:"15px",display:"flex",alignItems:"center",justifyContent:"center",opacity:P===o.length-1?.3:1},children:"⬇"})]}),c===z.id&&z.enabled&&w.jsxs("div",{style:{padding:"var(--spacing-sm)",paddingTop:0,borderTop:"1px solid var(--color-border)",backgroundColor:"var(--color-surface)"},children:[w.jsxs("p",{style:{margin:"var(--spacing-xs) 0",fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},children:[e("templateEditor.params")," (",z.params.length,")"]}),z.params.map((G,R)=>w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"3px 0"},children:[v===G.id?w.jsx("input",{autoFocus:!0,defaultValue:G.label,onBlur:q=>X(z.id,G.id,q.target.value),onKeyDown:q=>{q.key==="Enter"&&X(z.id,G.id,q.currentTarget.value),q.key==="Escape"&&T(null)},style:{flex:1,fontSize:"13px",padding:"2px 6px",border:"1px solid var(--color-primary)",borderRadius:"3px"}}):w.jsxs("span",{onClick:()=>{G.required||T(G.id)},style:{flex:1,fontSize:"13px",cursor:G.required?"default":"text",color:G.required?"var(--color-primary)":"var(--color-text)"},children:[G.required?"🔒 ":"",G.label]}),w.jsx("button",{type:"button",onClick:()=>U(z.id,G.id,"up"),disabled:R===0,style:{width:"22px",height:"22px",border:"1px solid var(--color-border)",borderRadius:"3px",background:"var(--color-surface)",cursor:R===0?"default":"pointer",fontSize:"13px",display:"flex",alignItems:"center",justifyContent:"center",opacity:R===0?.3:1},children:"⬆"}),w.jsx("button",{type:"button",onClick:()=>U(z.id,G.id,"down"),disabled:R===z.params.length-1,style:{width:"22px",height:"22px",border:"1px solid var(--color-border)",borderRadius:"3px",background:"var(--color-surface)",cursor:R===z.params.length-1?"default":"pointer",fontSize:"13px",display:"flex",alignItems:"center",justifyContent:"center",opacity:R===z.params.length-1?.3:1},children:"⬇"}),!G.required&&w.jsx("button",{type:"button",onClick:()=>it(z.id,G.id),title:e("templateEditor.removeParam"),style:{width:"22px",height:"22px",border:"1px solid var(--color-error)",borderRadius:"3px",background:"var(--color-error-bg)",color:"var(--color-error)",cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]},G.id)),w.jsxs("div",{style:{display:"flex",gap:"6px",marginTop:"var(--spacing-xs)"},children:[w.jsx("input",{type:"text",placeholder:e("templateEditor.newParamPlaceholder"),value:B,onChange:G=>L(G.target.value),onKeyDown:G=>{G.key==="Enter"&&D(z.id)},style:{flex:1,fontSize:"13px",padding:"4px 8px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)"}}),w.jsxs("button",{type:"button",onClick:()=>D(z.id),style:{padding:"4px 12px",fontSize:"13px",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",color:"var(--color-primary)",cursor:"pointer"},children:["+ ",e("templateEditor.addParam")]})]})]})]},z.id))})]})}function hj(){const{t:e}=Ue(),t=Mr(),[i,a]=gt.useState(""),[o,l]=gt.useState(""),[c,h]=gt.useState(null),[d,f]=gt.useState(null),[p,g]=gt.useState(!1),[x,y]=gt.useState("rendered");async function C(v){const T=await Om("Markdown files (*.md)");T.success&&T.data&&(v==="old"?a(T.data):l(T.data))}async function k(){var T;if(!i||!o)return;g(!0),f(null),h(null);const v=await lA(i,o);g(!1),v.success&&v.data?h(v.data):f(((T=v.error)==null?void 0:T.message)??e("error.unexpected"))}return w.jsxs("main",{style:{flex:1,display:"flex",flexDirection:"column",padding:"var(--spacing-md)",gap:"var(--spacing-sm)",overflow:"hidden"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsx("h1",{style:{fontSize:"var(--font-size-heading)",margin:0},children:e("diff.title")}),w.jsx("button",{type:"button",onClick:()=>t({type:"goBack"}),style:{padding:"var(--spacing-xs) var(--spacing-md)",backgroundColor:"transparent",color:"var(--color-primary)",border:"1px solid var(--color-primary)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},children:e("dialog.back")})]}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-md)",alignItems:"center",flexWrap:"wrap"},children:[w.jsxs("div",{style:{flex:1,minWidth:"200px"},children:[w.jsx("label",{style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",display:"block",marginBottom:"4px"},children:e("diff.oldVersion")}),w.jsxs("div",{style:{display:"flex",gap:"6px"},children:[w.jsx("input",{type:"text",readOnly:!0,value:i?i.split(/[\\/]/).pop()??"":"",placeholder:e("diff.selectFile"),style:{flex:1,padding:"6px 10px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",backgroundColor:"var(--color-surface)"}}),w.jsx("button",{type:"button",onClick:()=>C("old"),style:{padding:"6px 12px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",fontSize:"var(--font-size-body)"},children:"…"})]})]}),w.jsxs("div",{style:{flex:1,minWidth:"200px"},children:[w.jsx("label",{style:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)",display:"block",marginBottom:"4px"},children:e("diff.newVersion")}),w.jsxs("div",{style:{display:"flex",gap:"6px"},children:[w.jsx("input",{type:"text",readOnly:!0,value:o?o.split(/[\\/]/).pop()??"":"",placeholder:e("diff.selectFile"),style:{flex:1,padding:"6px 10px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",backgroundColor:"var(--color-surface)"}}),w.jsx("button",{type:"button",onClick:()=>C("new"),style:{padding:"6px 12px",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",fontSize:"var(--font-size-body)"},children:"…"})]})]}),w.jsx("button",{type:"button",onClick:k,disabled:!i||!o||p,style:{padding:"var(--spacing-sm) var(--spacing-lg)",backgroundColor:i&&o?"var(--color-primary)":"var(--color-border)",color:i&&o?"var(--color-primary-contrast)":"var(--color-text-secondary)",border:"none",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",cursor:i&&o?"pointer":"default",alignSelf:"flex-end"},children:e(p?"diff.comparing":"diff.compare")})]}),d&&w.jsx("p",{style:{margin:0,color:"var(--color-error)",fontSize:"var(--font-size-body)"},children:d}),c&&w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[w.jsxs("span",{style:{fontSize:"var(--font-size-body)",color:"var(--color-text-secondary)"},children:[e("diff.summary"),": ",w.jsx("strong",{children:c.totalChanges})," ",e("diff.changes")]}),w.jsxs("div",{style:{display:"flex",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",overflow:"hidden"},children:[w.jsx("button",{type:"button",onClick:()=>y("rendered"),style:{padding:"4px 12px",fontSize:"var(--font-size-hint)",border:"none",cursor:"pointer",backgroundColor:x==="rendered"?"var(--color-primary)":"var(--color-surface)",color:x==="rendered"?"var(--color-primary-contrast)":"var(--color-text)"},children:e("diff.viewRendered")}),w.jsx("button",{type:"button",onClick:()=>y("code"),style:{padding:"4px 12px",fontSize:"var(--font-size-hint)",border:"none",borderLeft:"1px solid var(--color-border)",cursor:"pointer",backgroundColor:x==="code"?"var(--color-primary)":"var(--color-surface)",color:x==="code"?"var(--color-primary-contrast)":"var(--color-text)"},children:e("diff.viewCode")})]})]}),c&&x==="code"&&w.jsxs("div",{style:{flex:1,overflow:"auto",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontFamily:"Consolas, monospace",fontSize:"12px",lineHeight:"1.6"},children:[c.lines.map((v,T)=>w.jsx(uj,{line:v},T)),c.lines.length===0&&w.jsx("p",{style:{padding:"var(--spacing-md)",color:"var(--color-text-secondary)",textAlign:"center"},children:e("diff.identical")})]}),c&&x==="rendered"&&w.jsx("div",{style:{flex:1,overflow:"auto",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",fontSize:"13px",lineHeight:"1.7"},children:c.lines.length===0?w.jsx("p",{style:{padding:"var(--spacing-md)",color:"var(--color-text-secondary)",textAlign:"center"},children:e("diff.identical")}):w.jsx(dj,{lines:c.lines})})]})}function uj({line:e}){const t={add:{backgroundColor:"#e6ffec",color:"#1a7f37",padding:"1px 8px"},remove:{backgroundColor:"#ffebe9",color:"#cf222e",padding:"1px 8px"},context:{backgroundColor:"transparent",color:"var(--color-text)",padding:"1px 8px"},hunk:{backgroundColor:"#ddf4ff",color:"#0969da",padding:"4px 8px",fontWeight:"bold"},header:{backgroundColor:"var(--color-surface)",color:"var(--color-text-secondary)",padding:"4px 8px",fontStyle:"italic"}},i=e.type==="add"?"+ ":e.type==="remove"?"- ":"  ";return w.jsx("div",{style:{...t[e.type],whiteSpace:"pre-wrap",borderBottom:"1px solid var(--color-border)"},children:e.type==="header"||e.type==="hunk"?e.text:i+e.text})}function dj({lines:e}){const t=[];for(let i=0;i<e.length;i++){const a=e[i];if(a.type==="header"||a.type==="hunk")continue;const o=a.text;a.type==="remove"?t.push(w.jsx("div",{style:{backgroundColor:"#ffebe9",padding:"2px 12px",borderLeft:"3px solid #cf222e"},children:w.jsx(Eg,{text:o,strikethrough:!0})},i)):a.type==="add"?t.push(w.jsx("div",{style:{backgroundColor:"#e6ffec",padding:"2px 12px",borderLeft:"3px solid #1a7f37"},children:w.jsx(Eg,{text:o})},i)):t.push(w.jsx("div",{style:{padding:"2px 12px"},children:w.jsx(Eg,{text:o})},i))}return w.jsx(w.Fragment,{children:t})}function Eg({text:e,strikethrough:t}){const i=e,a=t?{textDecoration:"line-through",opacity:.7}:{};if(i.startsWith("#### "))return w.jsx("h4",{style:{margin:"4px 0",fontSize:"13px",...a},children:i.slice(5)});if(i.startsWith("### "))return w.jsx("h3",{style:{margin:"4px 0",fontSize:"14px",...a},children:i.slice(4)});if(i.startsWith("## "))return w.jsx("h2",{style:{margin:"6px 0",fontSize:"15px",...a},children:i.slice(3)});if(i.startsWith("# "))return w.jsx("h1",{style:{margin:"8px 0",fontSize:"17px",...a},children:i.slice(2)});if(i.includes("|")&&i.trim().startsWith("|")){const l=i.split("|").filter((c,h,d)=>h>0&&h<d.length-1);return l.every(c=>/^[\s\-:]+$/.test(c))?null:w.jsx("div",{style:{display:"flex",gap:"4px",fontSize:"12px",...a},children:l.map((c,h)=>w.jsx("span",{style:{flex:1,padding:"2px 4px",backgroundColor:"rgba(0,0,0,0.03)",borderRadius:"2px"},children:c.trim()},h))})}if(/^---+$/.test(i.trim()))return w.jsx("hr",{style:{margin:"6px 0",border:"none",borderTop:"1px solid var(--color-border)"}});if(!i.trim())return w.jsx("div",{style:{height:"8px"}});const o=i.split(/(\*\*.*?\*\*)/);return w.jsx("p",{style:{margin:"2px 0",...a},children:o.map((l,c)=>l.startsWith("**")&&l.endsWith("**")?w.jsx("strong",{children:l.slice(2,-2)},c):w.jsx("span",{children:l},c))})}const fj=300;function pj(){const{t:e}=Ue(),t=Mr(),[i,a]=gt.useState("dialog"),[o,l]=gt.useState(null),[c,h]=gt.useState(""),[d,f]=gt.useState(""),[p,g]=gt.useState(""),[x,y]=gt.useState(""),[C,k]=gt.useState(!1),[v,T]=gt.useState(""),[B,L]=gt.useState(!1),[M,F]=gt.useState(0),[$,N]=gt.useState(""),j=gt.useRef(null),[ot,K]=gt.useState(null),[Y,Z]=gt.useState([]),[it,X]=gt.useState(0),[U,D]=gt.useState(null),[I,z]=gt.useState({}),[P,G]=gt.useState(null);gt.useEffect(()=>()=>q(),[]);function R(){q(),j.current=setInterval(async()=>{const dt=await Fm();dt.success&&dt.data&&(F(dt.data.percent),N(dt.data.message))},fj)}function q(){j.current!==null&&(clearInterval(j.current),j.current=null)}function nt(){return{tenantId:c||void 0,workspaceId:d,clientId:p||void 0,clientSecret:x||void 0,authMode:p&&x?"service_principal":"sso"}}async function ht(){var dt;if(l(null),!d.trim()){l(e("workspace.error.workspaceRequired"));return}if(!c.trim()){l(e("workspace.error.tenantRequired"));return}if(!v.trim()){l(e("workspace.error.folderRequired"));return}a("busy"),N(e("workspace.busy.enumerating")),F(0),R();try{const Tt=await cA(nt(),v,B);if(q(),!Tt.success||!Tt.data){l(((dt=Tt.error)==null?void 0:dt.message)??e("error.unexpected")),a("dialog");return}K(Tt.data),Tt.data.onlyWorkspace?await kt():a("items")}catch{q(),l(e("error.unexpected")),a("dialog")}}async function yt(){var dt;l(null),a("busy"),N(e("workspace.busy.extracting")),F(0),R();try{const Tt=await hA();if(q(),!Tt.success||!Tt.data){l(((dt=Tt.error)==null?void 0:dt.message)??e("error.unexpected")),a("items");return}const Bt=Tt.data.documents;Z(Bt),Bt.length>0?(X(0),await Ct(Bt[0].index),a("form")):await kt()}catch{q(),l(e("error.unexpected")),a("items")}}async function Ct(dt){const Tt=await uA(dt);if(Tt.success&&Tt.data){D({name:Tt.data.name,sections:Tt.data.sections});const Bt={};for(const J of Tt.data.sections)for(const St of J.fields)Bt[St.name]=St.value;z(Bt)}else D({name:"",sections:[]}),z({})}async function wt(dt){const Tt=Y[it];dt&&Tt&&await dA(Tt.index,I);const Bt=it+1;Bt<Y.length?(X(Bt),await Ct(Y[Bt].index)):await kt()}async function kt(){var dt;a("busy"),N(e("workspace.busy.generating")),F(50),R();try{const Tt=await fA();if(q(),!Tt.success||!Tt.data){l(((dt=Tt.error)==null?void 0:dt.message)??e("error.unexpected")),a(Y.length>0?"form":"items");return}G(Tt.data),a("result")}catch{q(),l(e("error.unexpected")),a("items")}}async function Dt(){await P1(),q()}function vt(){q(),t({type:"reset"})}if(i==="busy")return w.jsxs("main",{style:_t.center,children:[w.jsx("h2",{style:_t.subheading,children:$}),w.jsx("div",{style:_t.progressTrack,children:w.jsx("div",{style:{..._t.progressFill,width:`${M}%`}})}),w.jsxs("p",{style:_t.muted,children:[M,"%"]}),w.jsx("button",{type:"button",style:_t.backButton,onClick:Dt,children:e("workspace.cancel")})]});if(i==="items"&&ot)return w.jsx("main",{style:_t.container,children:w.jsxs("div",{style:_t.wideCard,children:[w.jsx("h2",{style:_t.title,children:e("workspace.items.title")}),w.jsx("p",{style:_t.description,children:ot.workspaceName}),w.jsxs("div",{style:_t.statsRow,children:[w.jsx(Cs,{label:e("workspace.items.models"),value:ot.modelCount}),w.jsx(Cs,{label:e("workspace.items.reports"),value:ot.reportCount}),w.jsx(Cs,{label:e("workspace.items.other"),value:ot.otherCount}),w.jsx(Cs,{label:e("workspace.items.users"),value:ot.userCount})]}),o&&w.jsx("div",{style:_t.errorBanner,role:"alert",children:o}),w.jsx("div",{style:_t.tableWrap,children:w.jsxs("table",{style:_t.table,children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{style:_t.th,children:e("workspace.items.colName")}),w.jsx("th",{style:_t.th,children:e("workspace.items.colType")}),w.jsx("th",{style:_t.th,children:e("workspace.items.colReports")})]})}),w.jsx("tbody",{children:ot.items.map((dt,Tt)=>w.jsxs("tr",{children:[w.jsx("td",{style:_t.td,children:dt.name}),w.jsx("td",{style:_t.td,children:dt.type}),w.jsx("td",{style:_t.td,children:dt.reports??""})]},`${dt.type}-${dt.name}-${Tt}`))})]})}),w.jsxs("div",{style:_t.actions,children:[w.jsx("button",{type:"button",style:_t.backButton,onClick:vt,children:e("dialog.back")}),w.jsx("button",{type:"button",style:_t.primaryButton,onClick:yt,children:e("workspace.items.continue")})]})]})});if(i==="form"&&U){const dt=Y.length,Tt=`${e("workspace.form.doc")} ${it+1} / ${dt}: ${U.name}`;return w.jsx("main",{style:_t.container,children:w.jsxs("div",{style:_t.wideCard,children:[w.jsx("h2",{style:_t.title,children:Tt}),w.jsx("div",{style:_t.progressTrack,children:w.jsx("div",{style:{..._t.progressFill,width:`${it/dt*100}%`}})}),w.jsx("div",{style:_t.formScroll,children:U.sections.map(Bt=>w.jsxs("div",{style:{marginBottom:"var(--spacing-md)"},children:[w.jsx("h3",{style:_t.sectionTitle,children:Bt.title}),Bt.fields.map(J=>w.jsx(gj,{field:J,value:I[J.name]??"",onChange:St=>z(Dr=>({...Dr,[J.name]:St}))},J.name))]},Bt.title))}),w.jsxs("div",{style:_t.actions,children:[w.jsx("button",{type:"button",style:_t.backButton,onClick:()=>void wt(!1),children:e("workspace.form.skip")}),w.jsx("button",{type:"button",style:_t.primaryButton,onClick:()=>void wt(!0),children:it+1<dt?e("workspace.form.apply"):e("workspace.form.applyLast")})]})]})})}return i==="result"&&P?w.jsx("main",{style:_t.container,children:w.jsxs("div",{style:_t.wideCard,children:[w.jsx("h2",{style:_t.title,children:e("workspace.result.title")}),w.jsx("p",{style:_t.description,children:e("workspace.result.outputDir")}),w.jsx("p",{style:_t.pathText,children:P.outputDir}),w.jsxs("div",{style:_t.statsRow,children:[w.jsx(Cs,{label:e("workspace.result.files"),value:P.fileCount}),w.jsx(Cs,{label:e("workspace.result.errors"),value:P.errorCount})]}),P.errorCount>0&&P.errors.length>0&&w.jsx("div",{style:_t.errorList,children:P.errors.slice(0,10).map((dt,Tt)=>w.jsxs("div",{style:_t.errorListItem,children:["• ",dt]},Tt))}),w.jsxs("div",{style:_t.actions,children:[w.jsx("button",{type:"button",style:_t.primaryButton,onClick:()=>void Ws(P.overviewPath),children:e("workspace.result.openOverview")}),P.errorLogPath&&w.jsx("button",{type:"button",style:_t.backButton,onClick:()=>void Ws(P.errorLogPath),children:e("workspace.result.openLog")}),w.jsx("button",{type:"button",style:_t.backButton,onClick:vt,children:e("workspace.result.backHome")})]})]})}):w.jsx("main",{style:_t.container,children:w.jsxs("div",{style:_t.dialogCard,children:[w.jsx("h2",{style:_t.title,children:e("workspace.dialog.title")}),w.jsx("p",{style:_t.description,children:e("workspace.dialog.desc")}),o&&w.jsx("div",{style:_t.errorBanner,role:"alert",children:o}),w.jsxs("div",{style:_t.fields,children:[w.jsx(Lu,{label:e("fabric.tenantId"),value:c,onChange:h,placeholder:e("fabric.tenantId.placeholder")}),w.jsx(Lu,{label:e("fabric.workspaceId"),value:d,onChange:f,placeholder:e("fabric.workspaceId.placeholder"),required:!0}),w.jsxs("div",{style:_t.fieldWrapper,children:[w.jsx("label",{style:_t.label,children:e("workspace.targetFolder")}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[w.jsx("input",{readOnly:!0,value:v,placeholder:e("workspace.noFolder"),style:{..._t.input,flex:1}}),w.jsx("button",{type:"button",style:_t.backButton,onClick:async()=>{const dt=await zm();dt.success&&dt.data&&T(dt.data)},children:e("workspace.selectFolder")})]})]}),w.jsxs("label",{style:_t.checkboxRow,children:[w.jsx("input",{type:"checkbox",checked:B,onChange:dt=>L(dt.target.checked)}),w.jsxs("span",{children:[e("workspace.onlyWorkspace"),w.jsxs("span",{style:_t.hintText,children:[" — ",e("workspace.onlyWorkspace.hint")]})]})]})]}),w.jsxs("div",{style:_t.advancedSection,children:[w.jsxs("button",{type:"button",style:_t.advancedToggle,onClick:()=>k(!C),children:[w.jsx("span",{children:C?"▾":"▸"})," ",e("fabric.advanced")]}),C&&w.jsxs("div",{style:_t.advancedContent,children:[w.jsx(Lu,{label:e("fabric.clientId"),value:p,onChange:g,placeholder:e("fabric.clientId.placeholder")}),w.jsx(Lu,{label:e("fabric.clientSecret"),value:x,onChange:y,placeholder:e("fabric.clientSecret.placeholder"),type:"password"})]})]}),w.jsxs("div",{style:_t.actions,children:[w.jsx("button",{type:"button",style:_t.backButton,onClick:vt,children:e("dialog.back")}),w.jsx("button",{type:"button",style:_t.primaryButton,onClick:ht,children:e("workspace.start")})]})]})})}function Cs({label:e,value:t}){return w.jsxs("div",{style:_t.stat,children:[w.jsx("div",{style:_t.statValue,children:t}),w.jsx("div",{style:_t.statLabel,children:e})]})}function Lu({label:e,value:t,onChange:i,placeholder:a,required:o,type:l="text"}){return w.jsxs("div",{style:_t.fieldWrapper,children:[w.jsxs("label",{style:_t.label,children:[e,o&&w.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),w.jsx("input",{type:l,value:t,onChange:c=>i(c.target.value),placeholder:a,style:_t.input})]})}function gj({field:e,value:t,onChange:i}){const a=t.length>60||t.includes(`
`);return w.jsxs("div",{style:_t.fieldWrapper,children:[w.jsxs("label",{style:_t.label,children:[e.label,e.source==="auto"&&w.jsx("span",{style:_t.autoBadge,children:" (auto)"})]}),a?w.jsx("textarea",{value:t,onChange:o=>i(o.target.value),rows:3,style:{..._t.input,resize:"vertical",fontFamily:"var(--font-family)"}}):w.jsx("input",{value:t,onChange:o=>i(o.target.value),style:_t.input}),e.tooltip&&w.jsx("span",{style:_t.hintText,children:e.tooltip})]})}const _t={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},center:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-md)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"520px"},wideCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"760px"},title:{fontSize:"var(--font-size-heading)",fontWeight:600,marginBottom:"var(--spacing-xs)"},subheading:{fontSize:"var(--font-size-subheading)"},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-lg)"},pathText:{fontFamily:"monospace",fontSize:"var(--font-size-body)",wordBreak:"break-all",marginBottom:"var(--spacing-md)"},fields:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},fieldWrapper:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",marginBottom:"var(--spacing-sm)"},label:{fontSize:"var(--font-size-body)",fontWeight:600,color:"var(--color-text)"},input:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",outline:"none",fontFamily:"var(--font-family)"},checkboxRow:{display:"flex",alignItems:"flex-start",gap:"var(--spacing-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},hintText:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)"},autoBadge:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)",fontWeight:400},advancedSection:{marginTop:"var(--spacing-md)"},advancedToggle:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",background:"none",border:"none",cursor:"pointer",fontSize:"var(--font-size-body)",color:"var(--color-primary)",fontWeight:600,padding:"var(--spacing-xs) 0",fontFamily:"var(--font-family)"},advancedContent:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)",paddingLeft:"var(--spacing-md)",borderLeft:"2px solid var(--color-border)"},actions:{display:"flex",justifyContent:"space-between",marginTop:"var(--spacing-xl)",gap:"var(--spacing-md)"},backButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)"},primaryButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"none",borderRadius:"var(--radius-sm)",background:"var(--color-primary)",color:"var(--color-primary-contrast)",cursor:"pointer",fontFamily:"var(--font-family)",fontWeight:600},errorBanner:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-md)",border:"1px solid var(--color-error)"},statsRow:{display:"flex",gap:"var(--spacing-lg)",marginBottom:"var(--spacing-lg)"},stat:{display:"flex",flexDirection:"column",alignItems:"center"},statValue:{fontSize:"var(--font-size-heading)",fontWeight:700,color:"var(--color-primary)"},statLabel:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},tableWrap:{maxHeight:"280px",overflowY:"auto",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)"},table:{width:"100%",borderCollapse:"collapse",fontSize:"var(--font-size-body)"},th:{textAlign:"left",padding:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)",position:"sticky",top:0,background:"var(--color-surface)"},td:{padding:"var(--spacing-sm)",borderBottom:"1px solid var(--color-border)"},formScroll:{maxHeight:"360px",overflowY:"auto",paddingRight:"var(--spacing-sm)"},sectionTitle:{fontSize:"var(--font-size-subheading)",marginBottom:"var(--spacing-sm)",marginTop:"var(--spacing-md)"},progressTrack:{width:"100%",maxWidth:"480px",height:"8px",backgroundColor:"var(--color-border)",borderRadius:"4px",overflow:"hidden",marginBottom:"var(--spacing-sm)"},progressFill:{height:"100%",backgroundColor:"var(--color-primary)",borderRadius:"4px",transition:"width 200ms ease-out"},muted:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0},errorList:{maxHeight:"160px",overflowY:"auto",background:"var(--color-error-bg)",borderRadius:"var(--radius-sm)",padding:"var(--spacing-sm)",marginBottom:"var(--spacing-md)"},errorListItem:{color:"var(--color-error)",fontSize:"var(--font-size-hint)"}},mj=300;function yj(){const{t:e}=Ue(),t=Mr(),[i,a]=gt.useState("dialog"),[o,l]=gt.useState(null),[c,h]=gt.useState(""),[d,f]=gt.useState(""),[p,g]=gt.useState(""),[x,y]=gt.useState(""),[C,k]=gt.useState(!1),[v,T]=gt.useState(["Dataflow"]),[B,L]=gt.useState("Dataflow"),[M,F]=gt.useState("Gen1"),[$,N]=gt.useState(""),[j,ot]=gt.useState(!1),[K,Y]=gt.useState(""),[Z,it]=gt.useState(""),[X,U]=gt.useState(0),[D,I]=gt.useState(""),z=gt.useRef(null),[P,G]=gt.useState(null);gt.useEffect(()=>{let kt=!1;return(async()=>{const Dt=await pA();!kt&&Dt.success&&Dt.data&&Dt.data.types.length>0&&(T(Dt.data.types),L(Dt.data.types[0]))})(),()=>{kt=!0,q()}},[]);function R(){q(),z.current=setInterval(async()=>{const kt=await Fm();kt.success&&kt.data&&(U(kt.data.percent),I(kt.data.message))},mj)}function q(){z.current!==null&&(clearInterval(z.current),z.current=null)}function nt(){return{tenantId:c||void 0,workspaceId:d,clientId:p||void 0,clientSecret:x||void 0,authMode:p&&x?"service_principal":"sso"}}const ht=B==="Dataflow";async function yt(){var kt;if(l(null),!d.trim()){l(e("element.error.workspaceRequired"));return}if(!c.trim()){l(e("element.error.tenantRequired"));return}if(!$.trim()){l(e("element.error.idRequired"));return}if(j){if(!Z.trim()){l(e("element.error.docRequired"));return}}else if(!K.trim()){l(e("element.error.folderRequired"));return}a("busy"),I(e("element.busy")),U(0),R();try{const Dt=await gA(nt(),B,$.trim(),ht?M:"",j?"":K,j?Z:"");if(q(),!Dt.success||!Dt.data){l(((kt=Dt.error)==null?void 0:kt.message)??e("error.unexpected")),a("dialog");return}G(Dt.data),a("result")}catch{q(),l(e("error.unexpected")),a("dialog")}}async function Ct(){await P1(),q(),a("dialog")}function wt(){q(),t({type:"reset"})}return i==="busy"?w.jsxs("main",{style:qt.center,children:[w.jsx("h2",{style:qt.subheading,children:D}),w.jsx("div",{style:qt.progressTrack,children:w.jsx("div",{style:{...qt.progressFill,width:`${X}%`}})}),w.jsxs("p",{style:qt.muted,children:[X,"%"]}),w.jsx("button",{type:"button",style:qt.backButton,onClick:Ct,children:e("workspace.cancel")})]}):i==="result"&&P?w.jsx("main",{style:qt.container,children:w.jsxs("div",{style:qt.wideCard,children:[w.jsx("h2",{style:qt.title,children:P.isUpdate?e("element.result.titleUpdate"):e("element.result.title")}),w.jsx("p",{style:qt.description,children:e("element.result.outputPath")}),w.jsx("p",{style:qt.pathText,children:P.outputPath}),w.jsxs("div",{style:qt.statsRow,children:[w.jsx(fc,{label:e("element.result.type"),value:P.elementType}),P.elementType==="Dataflow"&&w.jsx(fc,{label:e("element.result.generation"),value:P.generation}),P.entityCount>0&&w.jsx(fc,{label:P.elementType==="Notebook"?e("element.result.cells"):P.elementType==="CopyJob"?e("element.result.objects"):P.elementType==="Lakehouse"?e("element.result.tables"):P.elementType==="Eventhouse"?e("element.result.databases"):P.elementType==="DataPipeline"?e("element.result.activities"):P.elementType==="Dashboard"?e("element.result.tiles"):P.elementType==="Environment"?e("element.result.libraries"):P.elementType==="MirroredDatabase"?e("element.result.tables"):P.elementType==="Eventstream"?e("element.result.nodes"):P.elementType==="KQLQueryset"?e("element.result.queries"):P.elementType==="Reflex"?e("element.result.rules"):P.elementType==="GraphQLApi"?e("element.result.datasources"):e("element.result.entities"),value:String(P.entityCount)}),w.jsx(fc,{label:e("element.result.version"),value:P.version}),P.isUpdate&&w.jsx(fc,{label:e("element.result.changes"),value:String(P.changesCount)})]}),w.jsxs("div",{style:qt.actions,children:[w.jsx("button",{type:"button",style:qt.primaryButton,onClick:()=>void Ws(P.outputPath),children:e("element.result.open")}),w.jsx("button",{type:"button",style:qt.backButton,onClick:()=>a("dialog"),children:e("element.result.another")}),w.jsx("button",{type:"button",style:qt.backButton,onClick:wt,children:e("workspace.result.backHome")})]})]})}):w.jsx("main",{style:qt.container,children:w.jsxs("div",{style:qt.dialogCard,children:[w.jsx("h2",{style:qt.title,children:e("element.dialog.title")}),w.jsx("p",{style:qt.description,children:e("element.dialog.desc")}),o&&w.jsx("div",{style:qt.errorBanner,role:"alert",children:o}),w.jsxs("div",{style:qt.fields,children:[w.jsx(Au,{label:e("fabric.tenantId"),value:c,onChange:h,placeholder:e("fabric.tenantId.placeholder")}),w.jsx(Au,{label:e("fabric.workspaceId"),value:d,onChange:f,placeholder:e("fabric.workspaceId.placeholder"),required:!0}),w.jsxs("div",{style:qt.fieldWrapper,children:[w.jsx("label",{style:qt.label,children:e("element.type")}),w.jsx("select",{value:B,onChange:kt=>L(kt.target.value),style:qt.input,children:v.map(kt=>w.jsx("option",{value:kt,children:kt},kt))})]}),ht&&w.jsxs("div",{style:qt.fieldWrapper,children:[w.jsx("label",{style:qt.label,children:e("element.generation")}),w.jsxs("select",{value:M,onChange:kt=>F(kt.target.value),style:qt.input,children:[w.jsx("option",{value:"Gen1",children:"Gen1"}),w.jsx("option",{value:"Gen2",children:"Gen2"})]}),w.jsx("span",{style:qt.hintText,children:e("element.generation.hint")})]}),w.jsxs("div",{style:qt.fieldWrapper,children:[w.jsxs("label",{style:qt.label,children:[e("element.id"),w.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),w.jsx("input",{value:$,onChange:kt=>N(kt.target.value),placeholder:e("element.id.placeholder"),style:qt.input}),w.jsx("span",{style:qt.hintText,children:e("element.id.hint")})]}),w.jsxs("label",{style:qt.checkboxRow,children:[w.jsx("input",{type:"checkbox",checked:j,onChange:kt=>ot(kt.target.checked)}),w.jsxs("span",{children:[e("element.update"),w.jsxs("span",{style:qt.hintText,children:[" — ",e("element.update.hint")]})]})]}),j?w.jsxs("div",{style:qt.fieldWrapper,children:[w.jsx("label",{style:qt.label,children:e("element.existingDoc")}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[w.jsx("input",{readOnly:!0,value:Z,placeholder:e("element.noDoc"),style:{...qt.input,flex:1}}),w.jsx("button",{type:"button",style:qt.backButton,onClick:async()=>{const kt=await Om("Markdown files (*.md)");kt.success&&kt.data&&it(kt.data)},children:e("element.selectDoc")})]})]}):w.jsxs("div",{style:qt.fieldWrapper,children:[w.jsx("label",{style:qt.label,children:e("workspace.targetFolder")}),w.jsxs("div",{style:{display:"flex",gap:"var(--spacing-sm)"},children:[w.jsx("input",{readOnly:!0,value:K,placeholder:e("workspace.noFolder"),style:{...qt.input,flex:1}}),w.jsx("button",{type:"button",style:qt.backButton,onClick:async()=>{const kt=await zm();kt.success&&kt.data&&Y(kt.data)},children:e("workspace.selectFolder")})]})]})]}),w.jsxs("div",{style:qt.advancedSection,children:[w.jsxs("button",{type:"button",style:qt.advancedToggle,onClick:()=>k(!C),children:[w.jsx("span",{children:C?"▾":"▸"})," ",e("fabric.advanced")]}),C&&w.jsxs("div",{style:qt.advancedContent,children:[w.jsx(Au,{label:e("fabric.clientId"),value:p,onChange:g,placeholder:e("fabric.clientId.placeholder")}),w.jsx(Au,{label:e("fabric.clientSecret"),value:x,onChange:y,placeholder:e("fabric.clientSecret.placeholder"),type:"password"})]})]}),w.jsxs("div",{style:qt.actions,children:[w.jsx("button",{type:"button",style:qt.backButton,onClick:wt,children:e("dialog.back")}),w.jsx("button",{type:"button",style:qt.primaryButton,onClick:yt,children:e(j?"element.submitUpdate":"element.submit")})]})]})})}function fc({label:e,value:t}){return w.jsxs("div",{style:qt.stat,children:[w.jsx("div",{style:qt.statValue,children:t}),w.jsx("div",{style:qt.statLabel,children:e})]})}function Au({label:e,value:t,onChange:i,placeholder:a,required:o,type:l="text"}){return w.jsxs("div",{style:qt.fieldWrapper,children:[w.jsxs("label",{style:qt.label,children:[e,o&&w.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),w.jsx("input",{type:l,value:t,onChange:c=>i(c.target.value),placeholder:a,style:qt.input})]})}const qt={container:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)"},center:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--spacing-xl)",gap:"var(--spacing-md)"},dialogCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"520px"},wideCard:{backgroundColor:"var(--color-surface)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-card)",padding:"var(--spacing-xl)",width:"100%",maxWidth:"640px"},title:{fontSize:"var(--font-size-heading)",fontWeight:600,marginBottom:"var(--spacing-xs)"},subheading:{fontSize:"var(--font-size-subheading)"},description:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-lg)"},pathText:{fontFamily:"monospace",fontSize:"var(--font-size-body)",wordBreak:"break-all",marginBottom:"var(--spacing-md)"},fields:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)"},fieldWrapper:{display:"flex",flexDirection:"column",gap:"var(--spacing-xs)",marginBottom:"var(--spacing-sm)"},label:{fontSize:"var(--font-size-body)",fontWeight:600,color:"var(--color-text)"},input:{padding:"var(--spacing-sm) var(--spacing-md)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",outline:"none",fontFamily:"var(--font-family)"},checkboxRow:{display:"flex",alignItems:"flex-start",gap:"var(--spacing-sm)",fontSize:"var(--font-size-body)",cursor:"pointer"},hintText:{color:"var(--color-text-hint)",fontSize:"var(--font-size-hint)"},advancedSection:{marginTop:"var(--spacing-md)"},advancedToggle:{display:"flex",alignItems:"center",gap:"var(--spacing-xs)",background:"none",border:"none",cursor:"pointer",fontSize:"var(--font-size-body)",color:"var(--color-primary)",fontWeight:600,padding:"var(--spacing-xs) 0",fontFamily:"var(--font-family)"},advancedContent:{display:"flex",flexDirection:"column",gap:"var(--spacing-md)",marginTop:"var(--spacing-md)",paddingLeft:"var(--spacing-md)",borderLeft:"2px solid var(--color-border)"},actions:{display:"flex",justifyContent:"space-between",marginTop:"var(--spacing-xl)",gap:"var(--spacing-md)"},backButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-sm)",background:"var(--color-surface)",cursor:"pointer",color:"var(--color-text)",fontFamily:"var(--font-family)"},primaryButton:{padding:"var(--spacing-sm) var(--spacing-lg)",fontSize:"var(--font-size-body)",border:"none",borderRadius:"var(--radius-sm)",background:"var(--color-primary)",color:"var(--color-primary-contrast)",cursor:"pointer",fontFamily:"var(--font-family)",fontWeight:600},errorBanner:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",padding:"var(--spacing-sm) var(--spacing-md)",borderRadius:"var(--radius-sm)",fontSize:"var(--font-size-body)",marginBottom:"var(--spacing-md)",border:"1px solid var(--color-error)"},statsRow:{display:"flex",gap:"var(--spacing-lg)",marginBottom:"var(--spacing-lg)",flexWrap:"wrap"},stat:{display:"flex",flexDirection:"column",alignItems:"center"},statValue:{fontSize:"var(--font-size-subheading)",fontWeight:700,color:"var(--color-primary)"},statLabel:{fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},progressTrack:{width:"100%",maxWidth:"480px",height:"8px",backgroundColor:"var(--color-border)",borderRadius:"4px",overflow:"hidden",marginBottom:"var(--spacing-sm)"},progressFill:{height:"100%",backgroundColor:"var(--color-primary)",borderRadius:"4px",transition:"width 200ms ease-out"},muted:{color:"var(--color-text-secondary)",fontSize:"var(--font-size-body)",margin:0}};function xj({status:e}){const{t}=Ue(),i=e??t("status.ready");return w.jsx("footer",{style:{padding:"var(--spacing-sm) var(--spacing-md)",backgroundColor:"var(--color-surface)",borderTop:"1px solid var(--color-border)",fontSize:"var(--font-size-hint)",color:"var(--color-text-secondary)"},children:i})}function bj(){const{view:e}=_n();return w.jsxs(w.Fragment,{children:[e==="Welcome"&&w.jsx(QL,{}),e==="FabricDialog"&&w.jsx(yA,{}),e==="LocalDialog"&&w.jsx(xA,{}),e==="PBIPDialog"&&w.jsx(bA,{}),e==="UpdateDialog"&&w.jsx(CA,{}),e==="Progress"&&w.jsx(SA,{}),e==="FormView"&&w.jsx(_A,{}),e==="ResultView"&&w.jsx(Lq,{}),e==="ReadinessResult"&&w.jsx(Iq,{}),e==="ImprintView"&&w.jsx(Dq,{}),e==="ChangelogView"&&w.jsx(Nq,{}),e==="TemplateEditor"&&w.jsx(cj,{}),e==="DiffView"&&w.jsx(hj,{}),e==="Workspace"&&w.jsx(pj,{}),e==="ElementFlow"&&w.jsx(yj,{}),w.jsx(xj,{})]})}function Cj(){return w.jsx(WL,{children:w.jsx(bj,{})})}HL.createRoot(document.getElementById("root")).render(w.jsx(gt.StrictMode,{children:w.jsx(Cj,{})}));export{_v as $,by as A,Z1 as B,eO as C,iF as D,T3 as E,wj as F,hz as G,Ac as H,Sj as I,cz as J,$d as K,aM as L,uk as M,Us as N,ov as O,VR as P,Yg as Q,tO as R,Hc as S,Ri as T,st as U,lt as V,dM as W,fk as X,WR as Y,Yz as Z,S as _,xM as a,Ar as a$,Tv as a0,Fj as a1,Lj as a2,Dj as a3,Mj as a4,Bj as a5,Km as a6,Rj as a7,Ej as a8,ms as a9,g4 as aA,dy as aB,hy as aC,ju as aD,Az as aE,Lz as aF,Ez as aG,Bz as aH,bz as aI,Y2 as aJ,kz as aK,xz as aL,Tz as aM,G2 as aN,vz as aO,Rz as aP,Dz as aQ,Mz as aR,zz as aS,Fz as aT,Cz as aU,V2 as aV,_z as aW,wz as aX,Sz as aY,X2 as aZ,l6 as a_,Oj as aa,zj as ab,Aj as ac,j4 as ad,s_ as ae,Vj as af,Yt as ag,Zi as ah,Vc as ai,AO as aj,yy as ak,At as al,U6 as am,Gj as an,Xj as ao,Uj as ap,Ot as aq,Yj as ar,Cy as as,C6 as at,p6 as au,f6 as av,Qt as aw,kd as ax,fr as ay,Cr as az,yM as b,aa as b0,hc as b1,rw as b2,yo as b3,ow as b4,Y1 as b5,UR as b6,kj as b7,DL as b8,LO as b9,Tj as ba,Gm as bb,mn as bc,Rc as bd,bv as be,wD as bf,Rt as bg,W2 as bh,Yr as bi,yD as bj,Ym as bk,Bk as bl,Uc as bm,Ak as bn,_j as bo,RA as bp,s6 as bq,he as c,Zt as d,dk as e,Je as f,CM as g,Ra as h,Di as i,mz as j,Pc as k,mt as l,aw as m,vM as n,kM as o,mM as p,$j as q,Cn as r,bM as s,LA as t,Kj as u,Qj as v,aO as w,Li as x,Ee as y,wM as z};
